11 #include "IStorageProvider.h" 12 #include "MediaSource.h" 13 #include "storage/discs/IDiscDriveHandler.h" 14 #include "threads/CriticalSection.h" 15 #include "utils/DiscsUtils.h" 16 #include "utils/Job.h" 22 #include "PlatformDefs.h" 45 void GetLocalDrives(VECSOURCES &localDrives,
bool includeQ =
true);
46 void GetRemovableDrives(VECSOURCES &removableDrives);
47 void GetNetworkLocations(VECSOURCES &locations,
bool autolocations =
true);
49 bool AddNetworkLocation(
const std::string &path);
50 bool HasLocation(
const std::string& path)
const;
51 bool RemoveLocation(
const std::string& path);
52 bool SetLocationPath(
const std::string& oldPath,
const std::string& newPath);
54 void AddAutoSource(
const CMediaSource &share,
bool bAutorun=
false);
56 bool IsDiscInDrive(
const std::string& devicePath=
"");
57 bool IsAudio(
const std::string& devicePath=
"");
58 bool HasOpticalDrive();
59 std::string TranslateDevicePath(
const std::string& devicePath,
bool bReturnAsDevice=
false);
60 DriveState GetDriveStatus(
const std::string& devicePath =
"");
63 bool RemoveCdInfo(
const std::string& devicePath=
"");
64 std::string GetDiskLabel(
const std::string& devicePath=
"");
65 std::string GetDiskUniqueId(
const std::string& devicePath=
"");
72 std::shared_ptr<IDiscDriveHandler> GetDiscDriveHandler();
74 std::string GetDiscPath();
75 void SetHasOpticalDrive(
bool bstatus);
77 bool Eject(
const std::string& mountpath);
78 void EjectTray(
const bool bEject=
true,
const char cDriveLetter=
'\0' );
79 void CloseTray(
const char cDriveLetter=
'\0');
80 void ToggleTray(
const char cDriveLetter=
'\0');
84 std::vector<std::string> GetDiskUsage();
106 bool playStubFile(
const CFileItem& item);
109 std::vector<CNetworkLocation> m_locations;
111 CCriticalSection m_muAutoSource, m_CritSecStorageProvider;
113 std::map<std::string,MEDIA_DETECT::CCdInfo*> m_mapCdInfo;
116 std::string m_strFirstAvailDrive;
121 void LoadAddonSources()
const;
127 CMediaSource GetRootAddonTypeSource(
const std::string& type)
const;
135 CMediaSource ComputeRootAddonTypeSource(
const std::string& type,
136 const std::string& label,
137 const std::string& thumb)
const;
139 std::unique_ptr<IStorageProvider> m_platformStorage;
141 std::shared_ptr<IDiscDriveHandler> m_platformDiscDriveHander;
145 void RemoveDiscInfo(
const std::string& devicePath);
146 std::map<std::string, UTILS::DISCS::DiscInfo> m_mapDiscInfo;
Abstracts the info the app knows about a disc (type, name, serial)
Definition: DiscsUtils.h:29
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
Definition: MediaManager.h:26
Callback interface for asynchronous jobs.
Definition: Job.h:31
Represents a file on a share.
Definition: FileItem.h:102
Definition: IStorageProvider.h:44