Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::GAME::CGameSettings Class Reference

#include <GameSettings.h>

Inheritance diagram for KODI::GAME::CGameSettings:
ISettingCallback Observable

Public Member Functions

 CGameSettings ()
 
 ~CGameSettings () override
 
bool GamesEnabled ()
 
bool ShowOSDHelp ()
 
void SetShowOSDHelp (bool bShow)
 
void ToggleGames ()
 
bool AutosaveEnabled ()
 
bool RewindEnabled ()
 
unsigned int MaxRewindTimeSec ()
 
std::string GetRAUsername () const
 
std::string GetRAToken () const
 
void OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override
 The value of the given setting has changed.
 
- 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 OnSettingAction (const std::shared_ptr< const CSetting > &setting)
 The given setting has been activated.
 
virtual bool OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode)
 The given setting needs to be updated.
 
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 Observable
 Observable ()=default
 
virtual ~Observable ()=default
 
Observableoperator= (const Observable &observable)
 
virtual void RegisterObserver (Observer *obs)
 Register an observer.
 
virtual void UnregisterObserver (Observer *obs)
 Unregister an observer.
 
virtual void NotifyObservers (const ObservableMessage message=ObservableMessageNone)
 Send a message to all observers when m_bObservableChanged is true.
 
virtual void SetChanged (bool bSetTo=true)
 Mark an observable changed.
 
virtual bool IsObserving (const Observer &obs) const
 Check whether this observable is being observed by an observer.
 

Additional Inherited Members

- Protected Member Functions inherited from Observable
void SendMessage (const ObservableMessage message)
 Send a message to all observer when m_bObservableChanged is true.
 
- Protected Attributes inherited from Observable
std::atomic< boolm_bObservableChanged {false}
 
std::vector< Observer * > m_observers
 
CCriticalSection m_obsCritSection
 

Constructor & Destructor Documentation

◆ CGameSettings()

CGameSettings::CGameSettings ( )

◆ ~CGameSettings()

CGameSettings::~CGameSettings ( )
override

Member Function Documentation

◆ AutosaveEnabled()

bool CGameSettings::AutosaveEnabled ( )

◆ GamesEnabled()

bool CGameSettings::GamesEnabled ( )

◆ GetRAToken()

std::string CGameSettings::GetRAToken ( ) const

◆ GetRAUsername()

std::string CGameSettings::GetRAUsername ( ) const

◆ MaxRewindTimeSec()

unsigned int CGameSettings::MaxRewindTimeSec ( )

◆ OnSettingChanged()

void CGameSettings::OnSettingChanged ( const std::shared_ptr< const CSetting > & setting)
overridevirtual

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.

◆ RewindEnabled()

bool CGameSettings::RewindEnabled ( )

◆ SetShowOSDHelp()

void CGameSettings::SetShowOSDHelp ( bool bShow)
Todo
Asynchronous save

◆ ShowOSDHelp()

bool CGameSettings::ShowOSDHelp ( )

◆ ToggleGames()

void CGameSettings::ToggleGames ( )

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