11 #include "IDirectory.h" 12 #include "MediaSource.h" 33 inline unsigned int GetNumberOfSources()
35 return static_cast<uint32_t
>(m_vecSources.size());
38 bool IsSource(
const std::string& strPath, VECSOURCES *sources = NULL, std::string *name = NULL)
const;
39 bool IsInSource(
const std::string& strPath)
const;
41 inline const CMediaSource& operator [](
const int index)
const 43 return m_vecSources[index];
48 return m_vecSources[index];
51 void GetSources(VECSOURCES &sources)
const;
53 void AllowNonLocalSources(
bool allow) { m_allowNonLocalSources = allow; }
55 std::shared_ptr<IDirectory> GetDirImpl() {
return m_pDir; }
56 void ReleaseDirImpl() { m_pDir.reset(); }
61 VECSOURCES m_vecSources;
62 bool m_allowNonLocalSources;
63 std::shared_ptr<IDirectory> m_pDir;
void SetSources(const VECSOURCES &vecSources)
Add shares to the virtual directory.
Definition: VirtualDirectory.cpp:40
Interface to the directory on a file system.
Definition: IDirectory.h:51
Represents a list of files.
Definition: FileItem.h:702
bool IsInSource(const std::string &strPath) const
Is the share path in the virtual directory.
Definition: VirtualDirectory.cpp:143
Get access to shares and it's directories.
Definition: VirtualDirectory.h:24
bool GetDirectory(const CURL &url, CFileItemList &items) override
Retrieve the shares or the content of a directory.
Definition: VirtualDirectory.cpp:54
void CancelDirectory() override
Cancel the current directory fetch (if possible).
Definition: VirtualDirectory.cpp:90
bool IsSource(const std::string &strPath, VECSOURCES *sources=NULL, std::string *name=NULL) const
Is the share strPath in the virtual directory.
Definition: VirtualDirectory.cpp:103