xbmc
Public Member Functions | Protected Attributes | List of all members
CMediaManager Class Reference
Inheritance diagram for CMediaManager:
Inheritance graph
[legend]
Collaboration diagram for CMediaManager:
Collaboration graph
[legend]

Public Member Functions

void Initialize ()
 
void Stop ()
 
bool LoadSources ()
 
bool SaveSources ()
 
void GetLocalDrives (VECSOURCES &localDrives, bool includeQ=true)
 
void GetRemovableDrives (VECSOURCES &removableDrives)
 
void GetNetworkLocations (VECSOURCES &locations, bool autolocations=true)
 
bool AddNetworkLocation (const std::string &path)
 
bool HasLocation (const std::string &path) const
 
bool RemoveLocation (const std::string &path)
 
bool SetLocationPath (const std::string &oldPath, const std::string &newPath)
 
void AddAutoSource (const CMediaSource &share, bool bAutorun=false)
 
void RemoveAutoSource (const CMediaSource &share)
 
bool IsDiscInDrive (const std::string &devicePath="")
 
bool IsAudio (const std::string &devicePath="")
 
bool HasOpticalDrive ()
 
std::string TranslateDevicePath (const std::string &devicePath, bool bReturnAsDevice=false)
 
DriveState GetDriveStatus (const std::string &devicePath="")
 
std::string GetDiscPath ()
 
void SetHasOpticalDrive (bool bstatus)
 
bool Eject (const std::string &mountpath)
 
void EjectTray (const bool bEject=true, const char cDriveLetter='\0')
 
void CloseTray (const char cDriveLetter='\0')
 
void ToggleTray (const char cDriveLetter='\0')
 
void ProcessEvents ()
 
std::vector< std::string > GetDiskUsage ()
 
void OnStorageAdded (const MEDIA_DETECT::STORAGE::StorageDevice &device) override
 Callback executed when a new storage device is added. More...
 
void OnStorageSafelyRemoved (const MEDIA_DETECT::STORAGE::StorageDevice &device) override
 Callback executed when a new storage device is safely removed. More...
 
void OnStorageUnsafelyRemoved (const MEDIA_DETECT::STORAGE::StorageDevice &device) override
 Callback executed when a new storage device is unsafely removed. More...
 
void OnJobComplete (unsigned int jobID, bool success, CJob *job) override
 The callback used when a job completes. More...
 
bool playStubFile (const CFileItem &item)
 
- Public Member Functions inherited from IJobCallback
virtual ~IJobCallback ()=default
 Destructor for job call back objects. More...
 
virtual void OnJobAbort (unsigned int jobID, CJob *job)
 An optional callback function used when a job will be aborted. More...
 
virtual void OnJobProgress (unsigned int jobID, unsigned int progress, unsigned int total, const CJob *job)
 An optional callback function that a job may call while processing. More...
 

Protected Attributes

std::vector< CNetworkLocationm_locations
 
CCriticalSection m_muAutoSource
 
CCriticalSection m_CritSecStorageProvider
 
bool m_bhasoptical
 
std::string m_strFirstAvailDrive
 

Member Function Documentation

◆ OnJobComplete()

void CMediaManager::OnJobComplete ( unsigned int  jobID,
bool  success,
CJob job 
)
inlineoverridevirtual

The callback used when a job completes.

OnJobComplete is called at the completion of the job's DoWork() function, and is used to return information to the caller on the result of the job. On returning form this function the CJobManager will destroy this job.

Parameters
jobIDthe unique id of the job (as retrieved from CJobManager::AddJob)
successthe result from the DoWork call
jobthe job that has been processed. The job will be destroyed after this function returns
See also
CJobManager and CJob

Implements IJobCallback.

◆ OnStorageAdded()

void CMediaManager::OnStorageAdded ( const MEDIA_DETECT::STORAGE::StorageDevice device)
overridevirtual

Callback executed when a new storage device is added.

See also
IStorageEventsCallback
Parameters
devicethe storage device

Implements IStorageEventsCallback.

◆ OnStorageSafelyRemoved()

void CMediaManager::OnStorageSafelyRemoved ( const MEDIA_DETECT::STORAGE::StorageDevice device)
overridevirtual

Callback executed when a new storage device is safely removed.

See also
IStorageEventsCallback
Parameters
devicethe storage device

Implements IStorageEventsCallback.

◆ OnStorageUnsafelyRemoved()

void CMediaManager::OnStorageUnsafelyRemoved ( const MEDIA_DETECT::STORAGE::StorageDevice device)
overridevirtual

Callback executed when a new storage device is unsafely removed.

See also
IStorageEventsCallback
Parameters
devicethe storage device

Implements IStorageEventsCallback.

◆ TranslateDevicePath()

std::string CMediaManager::TranslateDevicePath ( const std::string &  devicePath,
bool  bReturnAsDevice = false 
)
Todo:
translate cdda://<device>/

The documentation for this class was generated from the following files: