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

CSkinTimerManager is the container and manager for Skin timers. Its role is that of checking if the timer boolean conditions are valid, start or stop timers and execute the respective builtin actions linked to the timer lifecycle. More...

#include <SkinTimerManager.h>

Public Member Functions

 CSkinTimerManager (CGUIInfoManager &infoMgr)
 Skin timer manager constructor.
 
 CSkinTimerManager ()=delete
 
 ~CSkinTimerManager ()=default
 Default skin timer manager destructor.
 
void LoadTimers (const std::string &path)
 Loads all the skin timers.
 
void Stop ()
 Stops the manager.
 
size_t GetTimerCount () const
 Gets the total number of timers registered in the manager.
 
bool TimerExists (const std::string &timer) const
 Checks if the timer with name timer exists.
 
std::unique_ptr< CSkinTimerGrabTimer (const std::string &timer)
 Move a given timer, removing it from the manager.
 
bool TimerIsRunning (const std::string &timer) const
 Checks if the timer with name timer is running.
 
float GetTimerElapsedSeconds (const std::string &timer) const
 Get the elapsed seconds since the timer with name timer was started.
 
void TimerStart (const std::string &timer) const
 Starts/Enables a given skin timer.
 
void TimerStop (const std::string &timer) const
 Stops/Disables a given skin timer.
 
void Process ()
 Run the main manager processing loop.
 

Detailed Description

CSkinTimerManager is the container and manager for Skin timers. Its role is that of checking if the timer boolean conditions are valid, start or stop timers and execute the respective builtin actions linked to the timer lifecycle.

Note
This component should only be called by the main/rendering thread
See also
Skin_Timers
CSkinTimer

Constructor & Destructor Documentation

◆ CSkinTimerManager() [1/2]

CSkinTimerManager::CSkinTimerManager ( CGUIInfoManager & infoMgr)

Skin timer manager constructor.

Parameters
infoMgrreference to the infomanager

◆ CSkinTimerManager() [2/2]

CSkinTimerManager::CSkinTimerManager ( )
delete

◆ ~CSkinTimerManager()

CSkinTimerManager::~CSkinTimerManager ( )
default

Default skin timer manager destructor.

Member Function Documentation

◆ GetTimerCount()

size_t CSkinTimerManager::GetTimerCount ( ) const

Gets the total number of timers registered in the manager.

Returns
the timer count

◆ GetTimerElapsedSeconds()

float CSkinTimerManager::GetTimerElapsedSeconds ( const std::string & timer) const

Get the elapsed seconds since the timer with name timer was started.

Parameters
timerthe name of the skin timer
Returns
the elapsed time in seconds the given timer is running (0 if not running or if it does not exist)

◆ GrabTimer()

std::unique_ptr< CSkinTimer > CSkinTimerManager::GrabTimer ( const std::string & timer)

Move a given timer, removing it from the manager.

Parameters
timerthe name of the skin timer
Returns
the timer (moved), nullptr if it doesn't exist

◆ LoadTimers()

void CSkinTimerManager::LoadTimers ( const std::string & path)

Loads all the skin timers.

Parameters
path- the path for the skin Timers.xml file

◆ Process()

void CSkinTimerManager::Process ( )

Run the main manager processing loop.

◆ Stop()

void CSkinTimerManager::Stop ( )

Stops the manager.

◆ TimerExists()

bool CSkinTimerManager::TimerExists ( const std::string & timer) const

Checks if the timer with name timer exists.

Parameters
timerthe name of the skin timer
Returns
true if the given timer exists, false otherwise

◆ TimerIsRunning()

bool CSkinTimerManager::TimerIsRunning ( const std::string & timer) const

Checks if the timer with name timer is running.

Parameters
timerthe name of the skin timer
Returns
true if the given timer exists and is running, false otherwise

◆ TimerStart()

void CSkinTimerManager::TimerStart ( const std::string & timer) const

Starts/Enables a given skin timer.

Parameters
timerthe name of the skin timer

◆ TimerStop()

void CSkinTimerManager::TimerStop ( const std::string & timer) const

Stops/Disables a given skin timer.

Parameters
timerthe name of the skin timer

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