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

Class handling application support for settings. More...

#include <ApplicationSettingsHandling.h>

Inheritance diagram for CApplicationSettingsHandling:
ISettingCallback ISettingsHandler ISubSettings CApplication

Protected Member Functions

void RegisterSettings ()
 
void UnregisterSettings ()
 
bool Load (const TiXmlNode *settings) override
 Load settings from the given XML node.
 
bool Save (TiXmlNode *settings) const override
 Save settings to the given XML node.
 
void OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override
 The value of the given setting has changed.
 
void OnSettingAction (const std::shared_ptr< const CSetting > &setting) override
 The given setting has been activated.
 
bool OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) override
 The given setting needs to be updated.
 

Additional Inherited Members

- Public Member Functions inherited from ISettingCallback
virtual ~ISettingCallback ()=default
 
virtual bool OnSettingChanging (const std::shared_ptr< const CSetting > &setting)
 The value of the given setting is being changed.
 
virtual void OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName)
 The given property of the given setting has changed.
 
- Public Member Functions inherited from ISettingsHandler
virtual ~ISettingsHandler ()=default
 
virtual bool OnSettingsLoading ()
 Settings loading has been initiated.
 
virtual void OnSettingsLoaded ()
 Settings have been loaded.
 
virtual bool OnSettingsSaving () const
 Settings saving has been initiated.
 
virtual void OnSettingsSaved () const
 Settings have been saved.
 
virtual void OnSettingsUnloaded ()
 Setting values have been unloaded.
 
virtual void OnSettingsCleared ()
 Settings have been cleared.
 
- Public Member Functions inherited from ISubSettings
virtual ~ISubSettings ()=default
 
virtual void Clear ()
 Clear any loaded setting values.
 

Detailed Description

Class handling application support for settings.

Member Function Documentation

◆ Load()

bool CApplicationSettingsHandling::Load ( const TiXmlNode * settings)
overrideprotectedvirtual

Load settings from the given XML node.

Parameters
settingsXML node containing setting values
Returns
True if loading the settings was successful, false otherwise.

Reimplemented from ISubSettings.

◆ OnSettingAction()

void CApplicationSettingsHandling::OnSettingAction ( const std::shared_ptr< const CSetting > & setting)
overrideprotectedvirtual

The given setting has been activated.

This callback is triggered whenever the given setting has been activated. This callback is only fired for CSettingAction settings.

Parameters
settingThe setting which has been activated.

Reimplemented from ISettingCallback.

◆ OnSettingChanged()

void CApplicationSettingsHandling::OnSettingChanged ( const std::shared_ptr< const CSetting > & setting)
overrideprotectedvirtual

The value of the given setting has changed.

This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.

Parameters
settingThe setting whose value has been changed

Reimplemented from ISettingCallback.

◆ OnSettingUpdate()

bool CApplicationSettingsHandling::OnSettingUpdate ( const std::shared_ptr< CSetting > & setting,
const char * oldSettingId,
const TiXmlNode * oldSettingNode )
overrideprotectedvirtual

The given setting needs to be updated.

This callback is triggered when a setting needs to be updated because its value is outdated. This only happens when initially loading the value of a setting and will not be triggered afterwards.

Parameters
settingThe setting which needs to be updated.
oldSettingIdThe id of the previous setting.
oldSettingNodeThe old setting node
Returns
True if the setting has been successfully updated otherwise false

Reimplemented from ISettingCallback.

◆ RegisterSettings()

void CApplicationSettingsHandling::RegisterSettings ( )
protected

◆ Save()

bool CApplicationSettingsHandling::Save ( TiXmlNode * settings) const
overrideprotectedvirtual

Save settings to the given XML node.

Parameters
settingsXML node in which the settings will be saved
Returns
True if saving the settings was successful, false otherwise.

Reimplemented from ISubSettings.

◆ UnregisterSettings()

void CApplicationSettingsHandling::UnregisterSettings ( )
protected

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