Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <PVRTimers.h>
Public Member Functions | |
CPVRTimers () | |
~CPVRTimers () override=default | |
void | Start () |
start the timer update thread. | |
void | Stop () |
stop the timer update thread. | |
bool | Update (const std::vector< std::shared_ptr< CPVRClient > > &clients) |
Update all timers from PVR database and from given clients. | |
void | Unload () |
unload all timers. | |
bool | UpdateFromClients (const std::vector< std::shared_ptr< CPVRClient > > &clients) |
Update data with recordings from the given clients, sync with local data. | |
std::shared_ptr< CPVRTimerInfoTag > | GetNextActiveTimer (bool bIgnoreReminders=true) const |
std::shared_ptr< CPVRTimerInfoTag > | GetNextActiveTVTimer () const |
std::shared_ptr< CPVRTimerInfoTag > | GetNextActiveRadioTimer () const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > | GetActiveTimers () const |
std::shared_ptr< CPVRTimerInfoTag > | GetNextReminderToAnnnounce () |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > | GetAll () const |
int | AmountActiveTimers () const |
int | AmountActiveTVTimers () const |
int | AmountActiveRadioTimers () const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > | GetActiveRecordings () const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > | GetActiveTVRecordings () const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > | GetActiveRadioRecordings () const |
bool | IsRecording () const |
bool | IsRecordingOnChannel (const CPVRChannel &channel) const |
Check if a recording is running on the given channel. | |
std::shared_ptr< CPVRTimerInfoTag > | GetActiveTimerForChannel (const std::shared_ptr< const CPVRChannel > &channel) const |
Obtain the active timer for a given channel. | |
int | AmountActiveRecordings () const |
int | AmountActiveTVRecordings () const |
int | AmountActiveRadioRecordings () const |
bool | DeleteTimersOnChannel (const std::shared_ptr< CPVRChannel > &channel, bool bDeleteTimerRules=true, bool bCurrentlyActiveOnly=false) |
Delete all timers on a channel. | |
CDateTime | GetNextEventTime () const |
bool | AddTimer (const std::shared_ptr< CPVRTimerInfoTag > &tag) |
Add a timer to the client. Doesn't add the timer to the container. The backend will do this. | |
TimerOperationResult | DeleteTimer (const std::shared_ptr< CPVRTimerInfoTag > &tag, bool bForce=false, bool bDeleteRule=false) |
Delete a timer on the client. Doesn't delete the timer from the container. The backend will do this. | |
bool | UpdateTimer (const std::shared_ptr< CPVRTimerInfoTag > &tag) |
Update the timer on the client. Doesn't update the timer in the container. The backend will do this. | |
std::shared_ptr< CPVRTimerInfoTag > | GetTimerForEpgTag (const std::shared_ptr< const CPVREpgInfoTag > &epgTag) const |
Get the timer tag that matches the given epg tag. | |
std::shared_ptr< CPVRTimerInfoTag > | GetTimerRule (const std::shared_ptr< const CPVRTimerInfoTag > &timer) const |
Get the timer rule for a given timer tag. | |
void | UpdateChannels () |
Update the channel pointers. | |
void | Notify (const PVREvent &event) |
CEventStream callback for PVR events. | |
std::shared_ptr< CPVRTimerInfoTag > | GetById (unsigned int iTimerId) const |
Get a timer tag given it's unique ID. | |
Public Member Functions inherited from PVR::CPVRTimersContainer | |
bool | UpdateFromClient (const std::shared_ptr< CPVRTimerInfoTag > &timer) |
Add a timer tag to this container or update the tag if already present in this container. | |
std::shared_ptr< CPVRTimerInfoTag > | GetByClient (int iClientId, int iClientIndex) const |
Get the timer tag denoted by given client id and timer id. | |
const MapTags & | GetTags () const |
Get the timertags map. | |
Additional Inherited Members | |
Public Types inherited from PVR::CPVRTimersContainer | |
typedef std::vector< std::shared_ptr< CPVRTimerInfoTag > > | VecTimerInfoTag |
typedef std::map< CDateTime, VecTimerInfoTag > | MapTags |
Protected Member Functions inherited from PVR::CPVRTimersContainer | |
void | InsertEntry (const std::shared_ptr< CPVRTimerInfoTag > &newTimer) |
Protected Attributes inherited from PVR::CPVRTimersContainer | |
CCriticalSection | m_critSection |
unsigned int | m_iLastId = 0 |
MapTags | m_tags |
CPVRTimers::CPVRTimers | ( | ) |
|
overridedefault |
bool CPVRTimers::AddTimer | ( | const std::shared_ptr< CPVRTimerInfoTag > & | tag | ) |
Add a timer to the client. Doesn't add the timer to the container. The backend will do this.
tag | The timer to add. |
int CPVRTimers::AmountActiveRadioRecordings | ( | ) | const |
int CPVRTimers::AmountActiveRadioTimers | ( | ) | const |
int CPVRTimers::AmountActiveRecordings | ( | ) | const |
int CPVRTimers::AmountActiveTimers | ( | ) | const |
int CPVRTimers::AmountActiveTVRecordings | ( | ) | const |
int CPVRTimers::AmountActiveTVTimers | ( | ) | const |
TimerOperationResult CPVRTimers::DeleteTimer | ( | const std::shared_ptr< CPVRTimerInfoTag > & | tag, |
bool | bForce = false, | ||
bool | bDeleteRule = false ) |
Delete a timer on the client. Doesn't delete the timer from the container. The backend will do this.
tag | The timer to delete. |
bForce | Control what to do in case the timer is currently recording. True to force to delete the timer, false to return TimerDeleteResult::RECORDING. |
bDeleteRule | Also delete the timer rule that scheduled the timer instead of single timer only. |
bool CPVRTimers::DeleteTimersOnChannel | ( | const std::shared_ptr< CPVRChannel > & | channel, |
bool | bDeleteTimerRules = true, | ||
bool | bCurrentlyActiveOnly = false ) |
Delete all timers on a channel.
channel | The channel to delete the timers for. |
bDeleteTimerRules | True to delete timer rules too, false otherwise. |
bCurrentlyActiveOnly | True to delete timers that are currently running only. |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > CPVRTimers::GetActiveRadioRecordings | ( | ) | const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > CPVRTimers::GetActiveRecordings | ( | ) | const |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetActiveTimerForChannel | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) | const |
Obtain the active timer for a given channel.
channel | The channel to check. |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > CPVRTimers::GetActiveTimers | ( | ) | const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > CPVRTimers::GetActiveTVRecordings | ( | ) | const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > CPVRTimers::GetAll | ( | ) | const |
Get all timers
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetById | ( | unsigned int | iTimerId | ) | const |
Get a timer tag given it's unique ID.
iTimerId | The ID to find |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetNextActiveRadioTimer | ( | ) | const |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetNextActiveTimer | ( | bool | bIgnoreReminders = true | ) | const |
bIgnoreReminders | include or ignore reminders |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetNextActiveTVTimer | ( | ) | const |
CDateTime CPVRTimers::GetNextEventTime | ( | ) | const |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetNextReminderToAnnnounce | ( | ) |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetTimerForEpgTag | ( | const std::shared_ptr< const CPVREpgInfoTag > & | epgTag | ) | const |
Get the timer tag that matches the given epg tag.
epgTag | The epg tag. |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetTimerRule | ( | const std::shared_ptr< const CPVRTimerInfoTag > & | timer | ) | const |
Get the timer rule for a given timer tag.
timer | The timer to query the timer rule for |
bool CPVRTimers::IsRecording | ( | ) | const |
bool CPVRTimers::IsRecordingOnChannel | ( | const CPVRChannel & | channel | ) | const |
Check if a recording is running on the given channel.
channel | The channel to check. |
CEventStream callback for PVR events.
event | The event. |
void CPVRTimers::Start | ( | ) |
start the timer update thread.
void CPVRTimers::Stop | ( | ) |
stop the timer update thread.
void CPVRTimers::Unload | ( | ) |
unload all timers.
bool CPVRTimers::Update | ( | const std::vector< std::shared_ptr< CPVRClient > > & | clients | ) |
void CPVRTimers::UpdateChannels | ( | ) |
Update the channel pointers.
bool CPVRTimers::UpdateFromClients | ( | const std::vector< std::shared_ptr< CPVRClient > > & | clients | ) |
Update data with recordings from the given clients, sync with local data.
clients | The clients to fetch data from. Leave empty to fetch data from all created clients. |
bool CPVRTimers::UpdateTimer | ( | const std::shared_ptr< CPVRTimerInfoTag > & | tag | ) |
Update the timer on the client. Doesn't update the timer in the container. The backend will do this.
tag | The timer to update. |