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

#include <Application.h>

Inheritance diagram for CApplication:
CXBApplicationEx IPlayerCallback IMsgTargetCallback ISettingCallback ISettingsHandler ISubSettings KODI::MESSAGING::IMessageTarget IWindowManagerCallback

Public Types

enum  ESERVERS {
  ES_WEBSERVER = 1 , ES_AIRPLAYSERVER , ES_JSONRPCSERVER , ES_UPNPRENDERER ,
  ES_UPNPSERVER , ES_EVENTSERVER , ES_ZEROCONF
}
 

Public Member Functions

 CApplication (void)
 
 ~CApplication (void) override
 
bool Initialize () override
 
void FrameMove (bool processEvents, bool processGUI=true) override
 
void Render () override
 
virtual void Preflight ()
 
bool Create (const CAppParamParser &params)
 
bool Cleanup () override
 
bool IsInitialized ()
 
bool CreateGUI ()
 
bool InitWindow (RESOLUTION res=RES_INVALID)
 
void StartServices ()
 
void StopServices ()
 
bool StartServer (enum ESERVERS eServer, bool bStart, bool bWait=false)
 
bool IsCurrentThread () const
 
void Stop (int exitCode)
 
void UnloadSkin (bool forReload=false)
 
bool LoadCustomWindows ()
 
void ReloadSkin (bool confirm=false)
 
const std::string & CurrentFile ()
 
CFileItemCurrentFileItem ()
 
std::shared_ptr< CFileItemCurrentFileItemPtr ()
 
CFileItemCurrentUnstackedItem ()
 
bool OnMessage (CGUIMessage &message) override
 
CApplicationPlayerGetAppPlayer ()
 
std::string GetCurrentPlayer ()
 
CApplicationStackHelperGetAppStackHelper ()
 
void OnPlayBackEnded () override
 
void OnPlayBackStarted (const CFileItem &file) override
 
void OnPlayerCloseFile (const CFileItem &file, const CBookmark &bookmark) override
 
void OnPlayBackPaused () override
 
void OnPlayBackResumed () override
 
void OnPlayBackStopped () override
 
void OnPlayBackError () override
 
void OnQueueNextItem () override
 
void OnPlayBackSeek (int64_t iTime, int64_t seekOffset) override
 
void OnPlayBackSeekChapter (int iChapter) override
 
void OnPlayBackSpeedChanged (int iSpeed) override
 
void OnAVChange () override
 
void OnAVStarted (const CFileItem &file) override
 
void RequestVideoSettings (const CFileItem &fileItem) override
 
void StoreVideoSettings (const CFileItem &fileItem, CVideoSettings vs) override
 
int GetMessageMask () override
 Should return the message mask that it wishes to receive messages for. More...
 
void OnApplicationMessage (KODI::MESSAGING::ThreadMessage *pMsg) override
 This gets called whenever a message matching the registered message mask is processed. More...
 
bool PlayMedia (CFileItem &item, const std::string &player, int iPlaylist)
 
bool ProcessAndStartPlaylist (const std::string &strPlayList, PLAYLIST::CPlayList &playlist, int iPlaylist, int track=0)
 
bool PlayFile (CFileItem item, const std::string &player, bool bRestart=false)
 
void StopPlaying ()
 
void Restart (bool bSamePosition=true)
 
void DelayedPlayerRestart ()
 
void CheckDelayedPlayerRestart ()
 
bool IsPlayingFullScreenVideo () const
 
bool IsFullScreen ()
 
bool OnAction (const CAction &action)
 
void CheckShutdown ()
 
void InhibitIdleShutdown (bool inhibit)
 
bool IsIdleShutdownInhibited () const
 
void CheckScreenSaverAndDPMS ()
 
void ActivateScreenSaver (bool forceType=false)
 
void CloseNetworkShares ()
 
void ShowAppMigrationMessage ()
 
void Process () override
 
void ProcessSlow ()
 
void ResetScreenSaver ()
 
float GetVolume (bool percentage=true) const
 
void SetVolume (float iValue, bool isPercentage=true)
 
bool IsMuted () const
 
bool IsMutedInternal () const
 
void ToggleMute (void)
 
void SetMute (bool mute)
 
void ShowVolumeBar (const CAction *action=NULL)
 
int GetSubtitleDelay ()
 
int GetAudioDelay ()
 
void ResetSystemIdleTimer ()
 
void ResetScreenSaverTimer ()
 
void StopScreenSaverTimer ()
 
bool WakeUpScreenSaverAndDPMS (bool bPowerOffKeyPressed=false)
 
bool WakeUpScreenSaver (bool bPowerOffKeyPressed=false)
 
double GetTotalTime () const
 Returns the total time in fractional seconds of the currently playing media. More...
 
double GetTime () const
 Returns the current time in fractional seconds of the currently playing media. More...
 
float GetPercentage () const
 
float GetCachePercentage () const
 
void SeekPercentage (float percent)
 
void SeekTime (double dTime=0.0)
 
void StopShutdownTimer ()
 
void ResetShutdownTimers ()
 
void StopVideoScan ()
 
void StopMusicScan ()
 
bool IsMusicScanning () const
 
bool IsVideoScanning () const
 
void StartVideoCleanup (bool userInitiated=true, const std::string &content="")
 Starts a video library cleanup. More...
 
void StartVideoScan (const std::string &path, bool userInitiated=true, bool scanAll=false)
 Starts a video library update. More...
 
void StartMusicCleanup (bool userInitiated=true)
 Starts a music library cleanup. More...
 
void StartMusicScan (const std::string &path, bool userInitiated=true, int flags=0)
 Starts a music library update. More...
 
void StartMusicAlbumScan (const std::string &strDirectory, bool refresh=false)
 
void StartMusicArtistScan (const std::string &strDirectory, bool refresh=false)
 
void UpdateLibraries ()
 
void UpdateCurrentPlayArt ()
 
bool ExecuteXBMCAction (std::string action, const CGUIListItemPtr &item=NULL)
 
bool IsInScreenSaver ()
 
std::string ScreensaverIdInUse ()
 
bool IsDPMSActive ()
 
int GlobalIdleTime ()
 
bool PlatformDirectoriesEnabled ()
 
bool IsStandAlone ()
 
bool IsEnableTestMode ()
 
bool IsAppFocused () const
 
void Minimize ()
 
bool ToggleDPMS (bool manual)
 
bool SwitchToFullScreen (bool force=false)
 
bool GetRenderGUI () const override
 
bool SetLanguage (const std::string &strLanguage)
 
bool LoadLanguage (bool reload)
 
ReplayGainSettingsGetReplayGainSettings ()
 
void SetLoggingIn (bool switchingProfiles)
 
void RegisterActionListener (IActionListener *listener)
 Register an action listener. More...
 
void UnregisterActionListener (IActionListener *listener)
 Unregister an action listener. More...
 
void LockFrameMoveGuard ()
 Locks calls from outside kodi (e.g. python) until framemove is processed. More...
 
void UnlockFrameMoveGuard ()
 Unlocks calls from outside kodi (e.g. python). More...
 
void SetRenderGUI (bool renderGUI)
 
- Public Member Functions inherited from CXBApplicationEx
 CXBApplicationEx ()
 
 ~CXBApplicationEx () override
 
int Run (const CAppParamParser &params)
 
void Destroy ()
 
- Public Member Functions inherited from IWindowManagerCallback
 IWindowManagerCallback (void)
 
virtual ~IWindowManagerCallback (void)
 
- Public Member Functions inherited from IPlayerCallback
virtual ~IPlayerCallback ()=default
 
- Public Member Functions inherited from IMsgTargetCallback
virtual ~IMsgTargetCallback ()=default
 
- Public Member Functions inherited from ISettingCallback
virtual ~ISettingCallback ()=default
 
virtual bool OnSettingChanging (std::shared_ptr< const CSetting > setting)
 The value of the given setting is being changed. More...
 
virtual void OnSettingPropertyChanged (std::shared_ptr< const CSetting > setting, const char *propertyName)
 The given property of the given setting has changed. More...
 
- Public Member Functions inherited from ISettingsHandler
virtual ~ISettingsHandler ()=default
 
virtual bool OnSettingsLoading ()
 Settings loading has been initiated. More...
 
virtual void OnSettingsLoaded ()
 Settings have been loaded. More...
 
virtual void OnSettingsSaved () const
 Settings have been saved. More...
 
virtual void OnSettingsUnloaded ()
 Setting values have been unloaded. More...
 
virtual void OnSettingsCleared ()
 Settings have been cleared. More...
 
- Public Member Functions inherited from ISubSettings
virtual ~ISubSettings ()=default
 
virtual void Clear ()
 Clear any loaded setting values. More...
 
- Public Member Functions inherited from KODI::MESSAGING::IMessageTarget
virtual ~IMessageTarget ()=default
 

Public Attributes

int m_iScreenSaveLock = 0
 
std::string m_strPlayListFile
 
std::unique_ptr< CServiceManagerm_ServiceManager
 
- Public Attributes inherited from CXBApplicationEx
bool m_bStop
 
int m_ExitCode
 
bool m_AppFocused
 
bool m_renderGUI
 

Static Public Attributes

static const unsigned int ACTION_PREV_ITEM_THRESHOLD = 3
 

Protected Member Functions

bool OnSettingsSaving () const override
 Settings saving has been initiated. More...
 
bool Load (const TiXmlNode *settings) override
 Load settings from the given XML node. More...
 
bool Save (TiXmlNode *settings) const override
 Save settings to the given XML node. More...
 
void OnSettingChanged (std::shared_ptr< const CSetting > setting) override
 The value of the given setting has changed. More...
 
void OnSettingAction (std::shared_ptr< const CSetting > setting) override
 The given setting has been activated. More...
 
bool OnSettingUpdate (std::shared_ptr< CSetting > setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) override
 The given setting needs to be updated. More...
 
bool LoadSkin (const std::string &skinID)
 
void CheckOSScreenSaverInhibitionSetting ()
 
void PlaybackCleanup ()
 
bool OnEvent (XBMC_Event &newEvent)
 
bool NotifyActionListeners (const CAction &action) const
 Delegates the action to all registered action handlers. More...
 
void Mute ()
 
void UnMute ()
 
void SetHardwareVolume (float hardwareVolume)
 
void VolumeChanged ()
 
bool PlayStack (CFileItem &item, bool bRestart)
 
float NavigationIdleTime ()
 
void HandlePortEvents ()
 
void HandleShutdownMessage ()
 Helper method to determine how to handle TMSG_SHUTDOWN. More...
 

Protected Attributes

std::shared_ptr< ANNOUNCEMENT::CAnnouncementManagerm_pAnnouncementManager
 
std::unique_ptr< CSettingsComponentm_pSettingsComponent
 
std::unique_ptr< CGUIComponentm_pGUI
 
std::unique_ptr< CWinSystemBasem_pWinSystem
 
std::unique_ptr< ActiveAE::CActiveAEm_pActiveAE
 
std::shared_ptr< CAppInboundProtocolm_pAppPort
 
std::deque< XBMC_Eventm_portEvents
 
CCriticalSection m_portSection
 
bool m_confirmSkinChange = true
 
bool m_ignoreSkinSettingChanges = false
 
bool m_saveSkinOnUnloading = true
 
bool m_autoExecScriptExecuted = false
 
bool m_screensaverActive = false
 
std::string m_screensaverIdInUse
 
ADDON::AddonPtr m_pythonScreenSaver
 
KODI::WINDOWING::COSScreenSaverInhibitor m_globalScreensaverInhibitor
 
KODI::WINDOWING::COSScreenSaverInhibitor m_screensaverInhibitor
 
CStopWatch m_idleTimer
 
CStopWatch m_screenSaverTimer
 
CStopWatch m_restartPlayerTimer
 
CStopWatch m_frameTime
 
CStopWatch m_navigationTimer
 
CStopWatch m_slowTimer
 
CStopWatch m_shutdownTimer
 
XbmcThreads::EndTime m_guiRefreshTimer
 
bool m_bInhibitIdleShutdown = false
 
std::unique_ptr< DPMSSupportm_dpms
 
bool m_dpmsIsActive = false
 
bool m_dpmsIsManual = false
 
CFileItemPtr m_itemCurrentFile
 
std::string m_prevMedia
 
ThreadIdentifier m_threadID = 0
 
bool m_bInitializing = true
 
bool m_bPlatformDirectories = true
 
int m_nextPlaylistItem = -1
 
unsigned int m_lastRenderTime = 0
 
bool m_skipGuiRender = false
 
bool m_bStandalone = false
 
bool m_bTestMode = false
 
bool m_bSystemScreenSaverEnable = false
 
std::unique_ptr< MUSIC_INFO::CMusicInfoScannerm_musicInfoScanner
 
bool m_muted = false
 
float m_volumeLevel = VOLUME_MAXIMUM
 
CInertialScrollingHandlerm_pInertialScrollingHandler
 
ReplayGainSettings m_replayGainSettings
 
std::vector< IActionListener * > m_actionListeners
 
std::vector< std::string > m_incompatibleAddons
 

Friends

class CAppInboundProtocol
 

Member Enumeration Documentation

◆ ESERVERS

Enumerator
ES_WEBSERVER 
ES_AIRPLAYSERVER 
ES_JSONRPCSERVER 
ES_UPNPRENDERER 
ES_UPNPSERVER 
ES_EVENTSERVER 
ES_ZEROCONF 

Constructor & Destructor Documentation

◆ CApplication()

CApplication::CApplication ( void  )

◆ ~CApplication()

CApplication::~CApplication ( void  )
override

Member Function Documentation

◆ ActivateScreenSaver()

void CApplication::ActivateScreenSaver ( bool  forceType = false)

◆ CheckDelayedPlayerRestart()

void CApplication::CheckDelayedPlayerRestart ( )

◆ CheckOSScreenSaverInhibitionSetting()

void CApplication::CheckOSScreenSaverInhibitionSetting ( )
protected

◆ CheckScreenSaverAndDPMS()

void CApplication::CheckScreenSaverAndDPMS ( )

◆ CheckShutdown()

void CApplication::CheckShutdown ( )

◆ Cleanup()

bool CApplication::Cleanup ( )
overridevirtual

Reimplemented from CXBApplicationEx.

◆ CloseNetworkShares()

void CApplication::CloseNetworkShares ( )

◆ Create()

bool CApplication::Create ( const CAppParamParser params)
Todo:
  • move to CPlatformXXX
Todo:
  • move to CPlatformXXX
Todo:
  • move to CPlatformXXX

must create these here. Ideally this should be using special://home/ and be platform agnostic (i.e. unify the InitDirectories*() functions)

Todo:
  • move to CPlatformXXX
Todo:
  • move to CPlatformXXX ???
Todo:
  • move to CPlatformXXX
Todo:
  • move to CPlatformXXX
Todo:
  • move to CPlatformXXX

◆ CreateGUI()

bool CApplication::CreateGUI ( )

◆ CurrentFile()

const std::string & CApplication::CurrentFile ( )

◆ CurrentFileItem()

CFileItem & CApplication::CurrentFileItem ( )

◆ CurrentFileItemPtr()

std::shared_ptr< CFileItem > CApplication::CurrentFileItemPtr ( )

◆ CurrentUnstackedItem()

CFileItem & CApplication::CurrentUnstackedItem ( )

◆ DelayedPlayerRestart()

void CApplication::DelayedPlayerRestart ( )

◆ ExecuteXBMCAction()

bool CApplication::ExecuteXBMCAction ( std::string  action,
const CGUIListItemPtr item = NULL 
)

◆ FrameMove()

void CApplication::FrameMove ( bool  processEvents,
bool  processGUI = true 
)
overridevirtual

◆ GetAppPlayer()

CApplicationPlayer & CApplication::GetAppPlayer ( )

◆ GetAppStackHelper()

CApplicationStackHelper & CApplication::GetAppStackHelper ( )

◆ GetAudioDelay()

int CApplication::GetAudioDelay ( )

◆ GetCachePercentage()

float CApplication::GetCachePercentage ( ) const

◆ GetCurrentPlayer()

std::string CApplication::GetCurrentPlayer ( )

◆ GetMessageMask()

int CApplication::GetMessageMask ( )
overridevirtual

Should return the message mask that it wishes to receive messages for.

The message mask is defined in "messaging/ApplicationMessenger.h" pick the next one available when creating a new

Implements KODI::MESSAGING::IMessageTarget.

◆ GetPercentage()

float CApplication::GetPercentage ( ) const

◆ GetRenderGUI()

bool CApplication::GetRenderGUI ( ) const
inlineoverridevirtual

Reimplemented from IWindowManagerCallback.

◆ GetReplayGainSettings()

ReplayGainSettings & CApplication::GetReplayGainSettings ( )
inline

◆ GetSubtitleDelay()

int CApplication::GetSubtitleDelay ( )

◆ GetTime()

double CApplication::GetTime ( ) const

Returns the current time in fractional seconds of the currently playing media.

Beware that this method returns fractional seconds whereas IPlayer::GetTime() returns milliseconds.

◆ GetTotalTime()

double CApplication::GetTotalTime ( ) const

Returns the total time in fractional seconds of the currently playing media.

Beware that this method returns fractional seconds whereas IPlayer::GetTotalTime() returns milliseconds.

◆ GetVolume()

float CApplication::GetVolume ( bool  percentage = true) const

◆ GlobalIdleTime()

int CApplication::GlobalIdleTime ( )

◆ HandlePortEvents()

void CApplication::HandlePortEvents ( )
protected

◆ HandleShutdownMessage()

void CApplication::HandleShutdownMessage ( )
protected

Helper method to determine how to handle TMSG_SHUTDOWN.

◆ InhibitIdleShutdown()

void CApplication::InhibitIdleShutdown ( bool  inhibit)

◆ Initialize()

bool CApplication::Initialize ( )
overridevirtual

Reimplemented from CXBApplicationEx.

◆ InitWindow()

bool CApplication::InitWindow ( RESOLUTION  res = RES_INVALID)

◆ IsAppFocused()

bool CApplication::IsAppFocused ( ) const
inline

◆ IsCurrentThread()

bool CApplication::IsCurrentThread ( ) const

◆ IsDPMSActive()

bool CApplication::IsDPMSActive ( )
inline

◆ IsEnableTestMode()

bool CApplication::IsEnableTestMode ( )
inline

◆ IsFullScreen()

bool CApplication::IsFullScreen ( )

◆ IsIdleShutdownInhibited()

bool CApplication::IsIdleShutdownInhibited ( ) const

◆ IsInitialized()

bool CApplication::IsInitialized ( )
inline

◆ IsInScreenSaver()

bool CApplication::IsInScreenSaver ( )
inline

◆ IsMusicScanning()

bool CApplication::IsMusicScanning ( ) const

◆ IsMuted()

bool CApplication::IsMuted ( ) const

◆ IsMutedInternal()

bool CApplication::IsMutedInternal ( ) const
inline

◆ IsPlayingFullScreenVideo()

bool CApplication::IsPlayingFullScreenVideo ( ) const

◆ IsStandAlone()

bool CApplication::IsStandAlone ( )
inline

◆ IsVideoScanning()

bool CApplication::IsVideoScanning ( ) const

◆ Load()

bool CApplication::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.

◆ LoadCustomWindows()

bool CApplication::LoadCustomWindows ( )

◆ LoadLanguage()

bool CApplication::LoadLanguage ( bool  reload)

◆ LoadSkin()

bool CApplication::LoadSkin ( const std::string &  skinID)
protected

◆ LockFrameMoveGuard()

void CApplication::LockFrameMoveGuard ( )

Locks calls from outside kodi (e.g. python) until framemove is processed.

◆ Minimize()

void CApplication::Minimize ( )

◆ Mute()

void CApplication::Mute ( )
protected

◆ NavigationIdleTime()

float CApplication::NavigationIdleTime ( )
protected

◆ NotifyActionListeners()

bool CApplication::NotifyActionListeners ( const CAction action) const
protected

Delegates the action to all registered action handlers.

Parameters
actionThe action
Returns
true, if the action was taken by one of the action listener.

◆ OnAction()

bool CApplication::OnAction ( const CAction action)

◆ OnApplicationMessage()

void CApplication::OnApplicationMessage ( KODI::MESSAGING::ThreadMessage msg)
overridevirtual

This gets called whenever a message matching the registered message mask is processed.

There are no ordering guarantees here so implementations should never rely on a certain ordering of messages.

Cleaning up any pointers stored in the message payload is not specified and is decided by the implementer of the message. In general prefer to delete any data in this method to keep the callsites cleaner and simpler but if data is to be passed back it's perfectly valid to handle it any way that fits the situation as long as it's documented along with the message.

To return a simple value the result parameter of

See also
ThreadMessage can be used as it will be used as the return value for
CApplicationMessenger::SendMsg. It is up to the implementer to decide if this is to be used and it should be documented along with any new message implemented.

Implements KODI::MESSAGING::IMessageTarget.

◆ OnAVChange()

void CApplication::OnAVChange ( )
overridevirtual

Reimplemented from IPlayerCallback.

◆ OnAVStarted()

void CApplication::OnAVStarted ( const CFileItem file)
overridevirtual

Reimplemented from IPlayerCallback.

◆ OnEvent()

bool CApplication::OnEvent ( XBMC_Event newEvent)
protected

◆ OnMessage()

bool CApplication::OnMessage ( CGUIMessage message)
overridevirtual

Implements IMsgTargetCallback.

◆ OnPlayBackEnded()

void CApplication::OnPlayBackEnded ( )
overridevirtual

Implements IPlayerCallback.

◆ OnPlayBackError()

void CApplication::OnPlayBackError ( )
overridevirtual

Implements IPlayerCallback.

◆ OnPlayBackPaused()

void CApplication::OnPlayBackPaused ( )
overridevirtual

Reimplemented from IPlayerCallback.

◆ OnPlayBackResumed()

void CApplication::OnPlayBackResumed ( )
overridevirtual

Reimplemented from IPlayerCallback.

◆ OnPlayBackSeek()

void CApplication::OnPlayBackSeek ( int64_t  iTime,
int64_t  seekOffset 
)
overridevirtual

Reimplemented from IPlayerCallback.

◆ OnPlayBackSeekChapter()

void CApplication::OnPlayBackSeekChapter ( int  iChapter)
overridevirtual

Reimplemented from IPlayerCallback.

◆ OnPlayBackSpeedChanged()

void CApplication::OnPlayBackSpeedChanged ( int  iSpeed)
overridevirtual

Reimplemented from IPlayerCallback.

◆ OnPlayBackStarted()

void CApplication::OnPlayBackStarted ( const CFileItem file)
overridevirtual

Implements IPlayerCallback.

◆ OnPlayBackStopped()

void CApplication::OnPlayBackStopped ( )
overridevirtual

Implements IPlayerCallback.

◆ OnPlayerCloseFile()

void CApplication::OnPlayerCloseFile ( const CFileItem file,
const CBookmark bookmark 
)
overridevirtual

Reimplemented from IPlayerCallback.

◆ OnQueueNextItem()

void CApplication::OnQueueNextItem ( )
overridevirtual

Implements IPlayerCallback.

◆ OnSettingAction()

void CApplication::OnSettingAction ( 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 CApplication::OnSettingChanged ( 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.

◆ OnSettingsSaving()

bool CApplication::OnSettingsSaving ( ) const
overrideprotectedvirtual

Settings saving has been initiated.

Returns
True if the settings should be saved, false if the saving should be aborted.

Reimplemented from ISettingsHandler.

◆ OnSettingUpdate()

bool CApplication::OnSettingUpdate ( 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.

◆ PlatformDirectoriesEnabled()

bool CApplication::PlatformDirectoriesEnabled ( )
inline

◆ PlaybackCleanup()

void CApplication::PlaybackCleanup ( )
protected

◆ PlayFile()

bool CApplication::PlayFile ( CFileItem  item,
const std::string &  player,
bool  bRestart = false 
)
Todo:
  • this will fail if user seeks back to first file in stack

◆ PlayMedia()

bool CApplication::PlayMedia ( CFileItem item,
const std::string &  player,
int  iPlaylist 
)

◆ PlayStack()

bool CApplication::PlayStack ( CFileItem item,
bool  bRestart 
)
protected

◆ Preflight()

void CApplication::Preflight ( )
virtual

◆ Process()

void CApplication::Process ( void  )
overridevirtual

◆ ProcessAndStartPlaylist()

bool CApplication::ProcessAndStartPlaylist ( const std::string &  strPlayList,
PLAYLIST::CPlayList playlist,
int  iPlaylist,
int  track = 0 
)

◆ ProcessSlow()

void CApplication::ProcessSlow ( )

◆ RegisterActionListener()

void CApplication::RegisterActionListener ( IActionListener listener)

Register an action listener.

Parameters
listenerThe listener to register

◆ ReloadSkin()

void CApplication::ReloadSkin ( bool  confirm = false)

◆ Render()

void CApplication::Render ( void  )
overridevirtual

◆ RequestVideoSettings()

void CApplication::RequestVideoSettings ( const CFileItem fileItem)
overridevirtual

Reimplemented from IPlayerCallback.

◆ ResetScreenSaver()

void CApplication::ResetScreenSaver ( )

◆ ResetScreenSaverTimer()

void CApplication::ResetScreenSaverTimer ( )

◆ ResetShutdownTimers()

void CApplication::ResetShutdownTimers ( )

◆ ResetSystemIdleTimer()

void CApplication::ResetSystemIdleTimer ( )

◆ Restart()

void CApplication::Restart ( bool  bSamePosition = true)

◆ Save()

bool CApplication::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.

◆ ScreensaverIdInUse()

std::string CApplication::ScreensaverIdInUse ( )
inline

◆ SeekPercentage()

void CApplication::SeekPercentage ( float  percent)

◆ SeekTime()

void CApplication::SeekTime ( double  dTime = 0.0)

◆ SetHardwareVolume()

void CApplication::SetHardwareVolume ( float  hardwareVolume)
protected

◆ SetLanguage()

bool CApplication::SetLanguage ( const std::string &  strLanguage)

◆ SetLoggingIn()

void CApplication::SetLoggingIn ( bool  switchingProfiles)

◆ SetMute()

void CApplication::SetMute ( bool  mute)

◆ SetRenderGUI()

void CApplication::SetRenderGUI ( bool  renderGUI)

◆ SetVolume()

void CApplication::SetVolume ( float  iValue,
bool  isPercentage = true 
)

◆ ShowAppMigrationMessage()

void CApplication::ShowAppMigrationMessage ( )

◆ ShowVolumeBar()

void CApplication::ShowVolumeBar ( const CAction action = NULL)

◆ StartMusicAlbumScan()

void CApplication::StartMusicAlbumScan ( const std::string &  strDirectory,
bool  refresh = false 
)

◆ StartMusicArtistScan()

void CApplication::StartMusicArtistScan ( const std::string &  strDirectory,
bool  refresh = false 
)

◆ StartMusicCleanup()

void CApplication::StartMusicCleanup ( bool  userInitiated = true)

Starts a music library cleanup.

Parameters
userInitiatedWhether the action was initiated by the user (either via GUI or any other method) or not. It is meant to hide or show dialogs.

◆ StartMusicScan()

void CApplication::StartMusicScan ( const std::string &  path,
bool  userInitiated = true,
int  flags = 0 
)

Starts a music library update.

Parameters
pathThe path to scan or "" (empty string) for a global scan.
userInitiatedWhether the action was initiated by the user (either via GUI or any other method) or not. It is meant to hide or show dialogs.
flagsFlags for controlling the scanning process. See xbmc/music/infoscanner/MusicInfoScanner.h for possible values.

◆ StartServer()

bool CApplication::StartServer ( enum ESERVERS  eServer,
bool  bStart,
bool  bWait = false 
)

◆ StartServices()

void CApplication::StartServices ( )

◆ StartVideoCleanup()

void CApplication::StartVideoCleanup ( bool  userInitiated = true,
const std::string &  content = "" 
)

Starts a video library cleanup.

Parameters
userInitiatedWhether the action was initiated by the user (either via GUI or any other method) or not. It is meant to hide or show dialogs.
contentContent type to clean, blank for everything

◆ StartVideoScan()

void CApplication::StartVideoScan ( const std::string &  path,
bool  userInitiated = true,
bool  scanAll = false 
)

Starts a video library update.

Parameters
pathThe path to scan or "" (empty string) for a global scan.
userInitiatedWhether the action was initiated by the user (either via GUI or any other method) or not. It is meant to hide or show dialogs.
scanAllWhether to scan everything not already scanned (regardless of whether the user normally doesn't want a folder scanned).

◆ Stop()

void CApplication::Stop ( int  exitCode)

◆ StopMusicScan()

void CApplication::StopMusicScan ( )

◆ StopPlaying()

void CApplication::StopPlaying ( )

◆ StopScreenSaverTimer()

void CApplication::StopScreenSaverTimer ( )

◆ StopServices()

void CApplication::StopServices ( )

◆ StopShutdownTimer()

void CApplication::StopShutdownTimer ( )

◆ StopVideoScan()

void CApplication::StopVideoScan ( )

◆ StoreVideoSettings()

void CApplication::StoreVideoSettings ( const CFileItem fileItem,
CVideoSettings  vs 
)
overridevirtual

Reimplemented from IPlayerCallback.

◆ SwitchToFullScreen()

bool CApplication::SwitchToFullScreen ( bool  force = false)

◆ ToggleDPMS()

bool CApplication::ToggleDPMS ( bool  manual)

◆ ToggleMute()

void CApplication::ToggleMute ( void  )

◆ UnloadSkin()

void CApplication::UnloadSkin ( bool  forReload = false)

◆ UnlockFrameMoveGuard()

void CApplication::UnlockFrameMoveGuard ( )

Unlocks calls from outside kodi (e.g. python).

◆ UnMute()

void CApplication::UnMute ( )
protected

◆ UnregisterActionListener()

void CApplication::UnregisterActionListener ( IActionListener listener)

Unregister an action listener.

Parameters
listenerThe listener to unregister

◆ UpdateCurrentPlayArt()

void CApplication::UpdateCurrentPlayArt ( )

◆ UpdateLibraries()

void CApplication::UpdateLibraries ( )

◆ VolumeChanged()

void CApplication::VolumeChanged ( )
protected

◆ WakeUpScreenSaver()

bool CApplication::WakeUpScreenSaver ( bool  bPowerOffKeyPressed = false)

◆ WakeUpScreenSaverAndDPMS()

bool CApplication::WakeUpScreenSaverAndDPMS ( bool  bPowerOffKeyPressed = false)
Todo:
if screensaver lock is specified but screensaver is not active (DPMS came first), activate screensaver now.

Friends And Related Function Documentation

◆ CAppInboundProtocol

friend class CAppInboundProtocol
friend

Member Data Documentation

◆ ACTION_PREV_ITEM_THRESHOLD

const unsigned int CApplication::ACTION_PREV_ITEM_THRESHOLD = 3
static

◆ m_actionListeners

std::vector<IActionListener *> CApplication::m_actionListeners
protected

◆ m_autoExecScriptExecuted

bool CApplication::m_autoExecScriptExecuted = false
protected

◆ m_bInhibitIdleShutdown

bool CApplication::m_bInhibitIdleShutdown = false
protected

◆ m_bInitializing

bool CApplication::m_bInitializing = true
protected

◆ m_bPlatformDirectories

bool CApplication::m_bPlatformDirectories = true
protected

◆ m_bStandalone

bool CApplication::m_bStandalone = false
protected

◆ m_bSystemScreenSaverEnable

bool CApplication::m_bSystemScreenSaverEnable = false
protected

◆ m_bTestMode

bool CApplication::m_bTestMode = false
protected

◆ m_confirmSkinChange

bool CApplication::m_confirmSkinChange = true
protected

◆ m_dpms

std::unique_ptr<DPMSSupport> CApplication::m_dpms
protected

◆ m_dpmsIsActive

bool CApplication::m_dpmsIsActive = false
protected

◆ m_dpmsIsManual

bool CApplication::m_dpmsIsManual = false
protected

◆ m_frameTime

CStopWatch CApplication::m_frameTime
protected

◆ m_globalScreensaverInhibitor

KODI::WINDOWING::COSScreenSaverInhibitor CApplication::m_globalScreensaverInhibitor
protected

◆ m_guiRefreshTimer

XbmcThreads::EndTime CApplication::m_guiRefreshTimer
protected

◆ m_idleTimer

CStopWatch CApplication::m_idleTimer
protected

◆ m_ignoreSkinSettingChanges

bool CApplication::m_ignoreSkinSettingChanges = false
protected

◆ m_incompatibleAddons

std::vector<std::string> CApplication::m_incompatibleAddons
protected

Result of addon migration

◆ m_iScreenSaveLock

int CApplication::m_iScreenSaveLock = 0

◆ m_itemCurrentFile

CFileItemPtr CApplication::m_itemCurrentFile
protected

◆ m_lastRenderTime

unsigned int CApplication::m_lastRenderTime = 0
protected

◆ m_musicInfoScanner

std::unique_ptr<MUSIC_INFO::CMusicInfoScanner> CApplication::m_musicInfoScanner
protected

◆ m_muted

bool CApplication::m_muted = false
protected

◆ m_navigationTimer

CStopWatch CApplication::m_navigationTimer
protected

◆ m_nextPlaylistItem

int CApplication::m_nextPlaylistItem = -1
protected

◆ m_pActiveAE

std::unique_ptr<ActiveAE::CActiveAE> CApplication::m_pActiveAE
protected

◆ m_pAnnouncementManager

std::shared_ptr<ANNOUNCEMENT::CAnnouncementManager> CApplication::m_pAnnouncementManager
protected

◆ m_pAppPort

std::shared_ptr<CAppInboundProtocol> CApplication::m_pAppPort
protected

◆ m_pGUI

std::unique_ptr<CGUIComponent> CApplication::m_pGUI
protected

◆ m_pInertialScrollingHandler

CInertialScrollingHandler* CApplication::m_pInertialScrollingHandler
protected

◆ m_portEvents

std::deque<XBMC_Event> CApplication::m_portEvents
protected

◆ m_portSection

CCriticalSection CApplication::m_portSection
protected

◆ m_prevMedia

std::string CApplication::m_prevMedia
protected

◆ m_pSettingsComponent

std::unique_ptr<CSettingsComponent> CApplication::m_pSettingsComponent
protected

◆ m_pWinSystem

std::unique_ptr<CWinSystemBase> CApplication::m_pWinSystem
protected

◆ m_pythonScreenSaver

ADDON::AddonPtr CApplication::m_pythonScreenSaver
protected

◆ m_replayGainSettings

ReplayGainSettings CApplication::m_replayGainSettings
protected

◆ m_restartPlayerTimer

CStopWatch CApplication::m_restartPlayerTimer
protected

◆ m_saveSkinOnUnloading

bool CApplication::m_saveSkinOnUnloading = true
protected

◆ m_screensaverActive

bool CApplication::m_screensaverActive = false
protected

◆ m_screensaverIdInUse

std::string CApplication::m_screensaverIdInUse
protected

◆ m_screensaverInhibitor

KODI::WINDOWING::COSScreenSaverInhibitor CApplication::m_screensaverInhibitor
protected

◆ m_screenSaverTimer

CStopWatch CApplication::m_screenSaverTimer
protected

◆ m_ServiceManager

std::unique_ptr<CServiceManager> CApplication::m_ServiceManager

◆ m_shutdownTimer

CStopWatch CApplication::m_shutdownTimer
protected

◆ m_skipGuiRender

bool CApplication::m_skipGuiRender = false
protected

◆ m_slowTimer

CStopWatch CApplication::m_slowTimer
protected

◆ m_strPlayListFile

std::string CApplication::m_strPlayListFile

◆ m_threadID

ThreadIdentifier CApplication::m_threadID = 0
protected

◆ m_volumeLevel

float CApplication::m_volumeLevel = VOLUME_MAXIMUM
protected

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