Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
ISettingCallback Class Reference

#include <ISettingCallback.h>

Inheritance diagram for ISettingCallback:
ADDON::CAddonSettings ADDON::CAddonSystemSettings ADDON::CRepositoryUpdater ActiveAE::CActiveAESettings CAdvancedSettings CAndroidUtils CApplication CCharsetConverter CDiscSettings CDisplaySettings CGUIAudioManager CGUIDialogSettingsBase CGUIPassword CInputManager CLangInfo CLibInputSettings CLinuxTimezone CMediaSettings CNetworkServices CProfileManager CRssManager CSeekHandler CSetting CSettingsManager CStereoscopicsManager CWakeOnAccess CWeatherManager KODI::GAME::CGameSettings PERIPHERALS::CPeripherals PVR::CPVRActionListener PVR::CPVRChannelGroup PVR::CPVRSettings XBMCHelper

Public Member Functions

virtual ~ISettingCallback ()=default
 
virtual bool OnSettingChanging (std::shared_ptr< const CSetting > setting)
 The value of the given setting is being changed. More...
 
virtual void OnSettingChanged (std::shared_ptr< const CSetting > setting)
 The value of the given setting has changed. More...
 
virtual void OnSettingAction (std::shared_ptr< const CSetting > setting)
 The given setting has been activated. More...
 
virtual bool OnSettingUpdate (std::shared_ptr< CSetting > setting, const char *oldSettingId, const TiXmlNode *oldSettingNode)
 The given setting needs to be updated. More...
 
virtual void OnSettingPropertyChanged (std::shared_ptr< const CSetting > setting, const char *propertyName)
 The given property of the given setting has changed. More...
 

Constructor & Destructor Documentation

◆ ~ISettingCallback()

virtual ISettingCallback::~ISettingCallback ( )
virtualdefault

Member Function Documentation

◆ OnSettingAction()

virtual void ISettingCallback::OnSettingAction ( std::shared_ptr< const CSetting setting)
inlinevirtual

◆ OnSettingChanged()

◆ OnSettingChanging()

virtual bool ISettingCallback::OnSettingChanging ( std::shared_ptr< const CSetting setting)
inlinevirtual

The value of the given setting is being changed.

This callback is triggered whenever the value of a setting is being changed. The given CSetting already contains the new value and the handler of the callback has the possibility to allow or revert changing the value of the setting. In case of a revert OnSettingChanging() is called again to inform all listeners that the value change has been reverted.

Parameters
settingThe setting whose value is being changed (already containing the changed value)
Returns
True if the new value is acceptable otherwise false

Reimplemented in CNetworkServices, XBMCHelper, PVR::CGUIDialogPVRRecordingSettings, CDisplaySettings, and CSetting.

◆ OnSettingPropertyChanged()

virtual void ISettingCallback::OnSettingPropertyChanged ( std::shared_ptr< const CSetting setting,
const char *  propertyName 
)
inlinevirtual

The given property of the given setting has changed.

This callback is triggered when a property (e.g. enabled or the list of dynamic options) has changed.

Parameters
settingThe setting which has a changed property
propertyNameThe string representation of the changed property

Reimplemented in CGUIDialogSettingsBase, and CSetting.

◆ OnSettingUpdate()

virtual bool ISettingCallback::OnSettingUpdate ( std::shared_ptr< CSetting setting,
const char *  oldSettingId,
const TiXmlNode *  oldSettingNode 
)
inlinevirtual

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 in CApplication, CGUIAudioManager, CNetworkServices, CDisplaySettings, and CSetting.


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