Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <MediaManager.h>
Public Member Functions | |
CMediaManager () | |
void | Initialize () |
void | Stop () |
bool | LoadSources () |
bool | SaveSources () |
void | GetLocalDrives (std::vector< CMediaSource > &localDrives, bool includeQ=true) |
void | GetRemovableDrives (std::vector< CMediaSource > &removableDrives) |
void | GetNetworkLocations (std::vector< CMediaSource > &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. | |
void | OnStorageSafelyRemoved (const MEDIA_DETECT::STORAGE::StorageDevice &device) override |
Callback executed when a new storage device is safely removed. | |
void | OnStorageUnsafelyRemoved (const MEDIA_DETECT::STORAGE::StorageDevice &device) override |
Callback executed when a new storage device is unsafely removed. | |
void | OnJobComplete (unsigned int jobID, bool success, CJob *job) override |
The callback used when a job completes. | |
bool | playStubFile (const CFileItem &item) |
Public Member Functions inherited from IStorageEventsCallback | |
virtual | ~IStorageEventsCallback ()=default |
Public Member Functions inherited from IJobCallback | |
virtual | ~IJobCallback ()=default |
Destructor for job call back objects. | |
virtual void | OnJobAbort (unsigned int jobID, CJob *job) |
An optional callback function used when a job will be aborted. | |
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. | |
Protected Attributes | |
std::vector< CNetworkLocation > | m_locations |
CCriticalSection | m_muAutoSource |
CCriticalSection | m_CritSecStorageProvider |
bool | m_bhasoptical |
std::string | m_strFirstAvailDrive |
CMediaManager::CMediaManager | ( | ) |
void CMediaManager::AddAutoSource | ( | const CMediaSource & | share, |
bool | bAutorun = false ) |
bool CMediaManager::AddNetworkLocation | ( | const std::string & | path | ) |
void CMediaManager::CloseTray | ( | const char | cDriveLetter = '\0' | ) |
bool CMediaManager::Eject | ( | const std::string & | mountpath | ) |
std::string CMediaManager::GetDiscPath | ( | ) |
std::vector< std::string > CMediaManager::GetDiskUsage | ( | ) |
DriveState CMediaManager::GetDriveStatus | ( | const std::string & | devicePath = "" | ) |
void CMediaManager::GetLocalDrives | ( | std::vector< CMediaSource > & | localDrives, |
bool | includeQ = true ) |
void CMediaManager::GetNetworkLocations | ( | std::vector< CMediaSource > & | locations, |
bool | autolocations = true ) |
void CMediaManager::GetRemovableDrives | ( | std::vector< CMediaSource > & | removableDrives | ) |
bool CMediaManager::HasLocation | ( | const std::string & | path | ) | const |
bool CMediaManager::HasOpticalDrive | ( | ) |
void CMediaManager::Initialize | ( | ) |
bool CMediaManager::IsAudio | ( | const std::string & | devicePath = "" | ) |
bool CMediaManager::IsDiscInDrive | ( | const std::string & | devicePath = "" | ) |
bool CMediaManager::LoadSources | ( | ) |
|
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.
jobID | the unique id of the job (as retrieved from CJobManager::AddJob) |
success | the result from the DoWork call |
job | the job that has been processed. The job will be destroyed after this function returns |
Implements IJobCallback.
|
overridevirtual |
Callback executed when a new storage device is added.
device | the storage device |
Implements IStorageEventsCallback.
|
overridevirtual |
Callback executed when a new storage device is safely removed.
device | the storage device |
Implements IStorageEventsCallback.
|
overridevirtual |
Callback executed when a new storage device is unsafely removed.
device | the storage device |
Implements IStorageEventsCallback.
void CMediaManager::ProcessEvents | ( | ) |
void CMediaManager::RemoveAutoSource | ( | const CMediaSource & | share | ) |
bool CMediaManager::RemoveLocation | ( | const std::string & | path | ) |
bool CMediaManager::SaveSources | ( | ) |
bool CMediaManager::SetLocationPath | ( | const std::string & | oldPath, |
const std::string & | newPath ) |
void CMediaManager::Stop | ( | ) |
void CMediaManager::ToggleTray | ( | const char | cDriveLetter = '\0' | ) |
std::string CMediaManager::TranslateDevicePath | ( | const std::string & | devicePath, |
bool | bReturnAsDevice = false ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |