Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CMediaSource Class Referencefinal

Represents a share. More...

#include <MediaSource.h>

Public Types

enum  SourceType {
  SOURCE_TYPE_UNKNOWN = 0 , SOURCE_TYPE_LOCAL = 1 , SOURCE_TYPE_DVD = 2 , SOURCE_TYPE_VIRTUAL_DVD = 3 ,
  SOURCE_TYPE_REMOTE = 4 , SOURCE_TYPE_VPATH = 5 , SOURCE_TYPE_REMOVABLE = 6
}
 

Public Member Functions

bool operator== (const CMediaSource &right) const
 
void FromNameAndPaths (const std::string &category, const std::string &name, const std::vector< std::string > &paths)
 
bool IsWritable () const
 

Public Attributes

std::string strName
 Name of the share, can be chosen freely.
 
std::string strStatus
 Status of the share (eg has disk etc.)
 
std::string strDiskUniqueId
 removable:// + DVD Label + DVD ID for resume point storage, if available
 
std::string strPath
 Path of the share, eg. iso9660:// or F:
 
SourceType m_iDriveType = SOURCE_TYPE_UNKNOWN
 The type of the media source.
 
LockType m_iLockMode = LOCK_MODE_EVERYONE
 The type of Lock UI to show when accessing the media source.
 
std::string m_strLockCode
 Input code for Lock UI to verify, can be chosen freely.
 
int m_iHasLock = LOCK_STATE_NO_LOCK
 
int m_iBadPwdCount = 0
 Number of wrong passwords user has entered since share was last unlocked.
 
std::string m_strThumbnailImage
 Path to a thumbnail image for the share, or blank for default.
 
std::vector< std::string > vecPaths
 
bool m_ignore = false
 
bool m_allowSharing = true
 <Do not store in xml
 

Detailed Description

Represents a share.

See also
VECMediaSource, IVECSOURCES

Member Enumeration Documentation

◆ SourceType

Enumerator
SOURCE_TYPE_UNKNOWN 
SOURCE_TYPE_LOCAL 
SOURCE_TYPE_DVD 
SOURCE_TYPE_VIRTUAL_DVD 
SOURCE_TYPE_REMOTE 
SOURCE_TYPE_VPATH 
SOURCE_TYPE_REMOVABLE 

Member Function Documentation

◆ FromNameAndPaths()

void CMediaSource::FromNameAndPaths ( const std::string & category,
const std::string & name,
const std::vector< std::string > & paths )

◆ IsWritable()

bool CMediaSource::IsWritable ( ) const

◆ operator==()

bool CMediaSource::operator== ( const CMediaSource & right) const

Member Data Documentation

◆ m_allowSharing

bool CMediaSource::m_allowSharing = true

<Do not store in xml

◆ m_iBadPwdCount

int CMediaSource::m_iBadPwdCount = 0

Number of wrong passwords user has entered since share was last unlocked.

◆ m_iDriveType

SourceType CMediaSource::m_iDriveType = SOURCE_TYPE_UNKNOWN

The type of the media source.

Value can be:

  • SOURCE_TYPE_UNKNOWN
    Unknown source, maybe a wrong path.
  • SOURCE_TYPE_LOCAL
    Harddisk source.
  • SOURCE_TYPE_DVD
    DVD-ROM source of the build in drive, strPath may vary.
  • SOURCE_TYPE_VIRTUAL_DVD
    DVD-ROM source, strPath is fix.
  • SOURCE_TYPE_REMOTE
    Network source.

◆ m_ignore

bool CMediaSource::m_ignore = false

◆ m_iHasLock

int CMediaSource::m_iHasLock = LOCK_STATE_NO_LOCK

◆ m_iLockMode

LockType CMediaSource::m_iLockMode = LOCK_MODE_EVERYONE

The type of Lock UI to show when accessing the media source.

Value can be:

  • CMediaSource::LOCK_MODE_EVERYONE
    Default value. No lock UI is shown, user can freely access the source.
  • LOCK_MODE_NUMERIC
    Lock code is entered via OSD numpad or IrDA remote buttons.
  • LOCK_MODE_GAMEPAD
    Lock code is entered via XBOX gamepad buttons.
  • LOCK_MODE_QWERTY
    Lock code is entered via OSD keyboard or PC USB keyboard.
  • LOCK_MODE_SAMBA
    Lock code is entered via OSD keyboard or PC USB keyboard and passed directly to SMB for authentication.
  • LOCK_MODE_EEPROM_PARENTAL
    Lock code is retrieved from XBOX EEPROM and entered via XBOX gamepad or remote.
  • LOCK_MODE_UNKNOWN
    Value is unknown or unspecified.

◆ m_strLockCode

std::string CMediaSource::m_strLockCode

Input code for Lock UI to verify, can be chosen freely.

◆ m_strThumbnailImage

std::string CMediaSource::m_strThumbnailImage

Path to a thumbnail image for the share, or blank for default.

◆ strDiskUniqueId

std::string CMediaSource::strDiskUniqueId

removable:// + DVD Label + DVD ID for resume point storage, if available

◆ strName

std::string CMediaSource::strName

Name of the share, can be chosen freely.

◆ strPath

std::string CMediaSource::strPath

Path of the share, eg. iso9660:// or F:

◆ strStatus

std::string CMediaSource::strStatus

Status of the share (eg has disk etc.)

◆ vecPaths

std::vector<std::string> CMediaSource::vecPaths

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