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

#include <MediaSourceSettings.h>

Inheritance diagram for CMediaSourceSettings:
ISettingsHandler

Public Member Functions

void OnSettingsLoaded () override
 Settings have been loaded.
 
void OnSettingsUnloaded () override
 Setting values have been unloaded.
 
bool Load ()
 
bool Load (const std::string &file)
 
bool Save ()
 
bool Save (const std::string &file) const
 
void Clear ()
 
std::vector< CMediaSource > * GetSources (const std::string &type)
 
const std::string & GetDefaultSource (const std::string &type) const
 
void SetDefaultSource (const std::string &type, const std::string &source)
 
bool UpdateSource (const std::string &strType, const std::string &strOldName, const std::string &strUpdateChild, const std::string &strUpdateValue)
 
bool DeleteSource (const std::string &strType, const std::string &strName, const std::string &strPath, bool virtualSource=false)
 
bool AddShare (const std::string &type, const CMediaSource &share)
 
bool UpdateShare (const std::string &type, const std::string &oldName, const CMediaSource &share)
 
- Public Member Functions inherited from ISettingsHandler
virtual ~ISettingsHandler ()=default
 
virtual bool OnSettingsLoading ()
 Settings loading has been initiated.
 
virtual bool OnSettingsSaving () const
 Settings saving has been initiated.
 
virtual void OnSettingsSaved () const
 Settings have been saved.
 
virtual void OnSettingsCleared ()
 Settings have been cleared.
 

Static Public Member Functions

static CMediaSourceSettingsGetInstance ()
 
static std::string GetSourcesFile ()
 

Protected Member Functions

 CMediaSourceSettings ()
 
 CMediaSourceSettings (const CMediaSourceSettings &)=delete
 
CMediaSourceSettingsoperator= (CMediaSourceSettings const &)=delete
 
 ~CMediaSourceSettings () override
 

Constructor & Destructor Documentation

◆ CMediaSourceSettings() [1/2]

CMediaSourceSettings::CMediaSourceSettings ( )
protected

◆ CMediaSourceSettings() [2/2]

CMediaSourceSettings::CMediaSourceSettings ( const CMediaSourceSettings & )
protecteddelete

◆ ~CMediaSourceSettings()

CMediaSourceSettings::~CMediaSourceSettings ( )
overrideprotecteddefault

Member Function Documentation

◆ AddShare()

bool CMediaSourceSettings::AddShare ( const std::string & type,
const CMediaSource & share )

◆ Clear()

void CMediaSourceSettings::Clear ( )

◆ DeleteSource()

bool CMediaSourceSettings::DeleteSource ( const std::string & strType,
const std::string & strName,
const std::string & strPath,
bool virtualSource = false )

◆ GetDefaultSource()

const std::string & CMediaSourceSettings::GetDefaultSource ( const std::string & type) const

◆ GetInstance()

CMediaSourceSettings & CMediaSourceSettings::GetInstance ( )
static

◆ GetSources()

std::vector< CMediaSource > * CMediaSourceSettings::GetSources ( const std::string & type)

◆ GetSourcesFile()

std::string CMediaSourceSettings::GetSourcesFile ( )
static

◆ Load() [1/2]

bool CMediaSourceSettings::Load ( )

◆ Load() [2/2]

bool CMediaSourceSettings::Load ( const std::string & file)

◆ OnSettingsLoaded()

void CMediaSourceSettings::OnSettingsLoaded ( )
overridevirtual

Settings have been loaded.

This callback can be used to trigger loading other settings.

Reimplemented from ISettingsHandler.

◆ OnSettingsUnloaded()

void CMediaSourceSettings::OnSettingsUnloaded ( )
overridevirtual

Setting values have been unloaded.

This callback can be used to trigger uninitializing any state variables (e.g. before re-loading the settings).

Reimplemented from ISettingsHandler.

◆ operator=()

CMediaSourceSettings & CMediaSourceSettings::operator= ( CMediaSourceSettings const & )
protecteddelete

◆ Save() [1/2]

bool CMediaSourceSettings::Save ( )

◆ Save() [2/2]

bool CMediaSourceSettings::Save ( const std::string & file) const

◆ SetDefaultSource()

void CMediaSourceSettings::SetDefaultSource ( const std::string & type,
const std::string & source )

◆ UpdateShare()

bool CMediaSourceSettings::UpdateShare ( const std::string & type,
const std::string & oldName,
const CMediaSource & share )

◆ UpdateSource()

bool CMediaSourceSettings::UpdateSource ( const std::string & strType,
const std::string & strOldName,
const std::string & strUpdateChild,
const std::string & strUpdateValue )

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