![]() |
Kodi Documentation
19.0
Kodi is an open source media player and entertainment hub.
|
#include <PVRTimers.h>
Public Member Functions | |
CPVRTimers (void) | |
~CPVRTimers (void) override | |
bool | Load (void) |
(re)load the timers from the clients. More... | |
void | Unload () |
unload all timers. More... | |
bool | Update (void) |
refresh the timer list from the clients. More... | |
bool | LoadFromDatabase (void) |
load the local timers from database. More... | |
std::shared_ptr< CPVRTimerInfoTag > | GetNextActiveTimer (bool bIgnoreReminders=true) const |
std::shared_ptr< CPVRTimerInfoTag > | GetNextActiveTVTimer (void) const |
std::shared_ptr< CPVRTimerInfoTag > | GetNextActiveRadioTimer (void) const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > | GetActiveTimers (void) const |
std::shared_ptr< CPVRTimerInfoTag > | GetNextReminderToAnnnounce () |
void | GetAll (CFileItemList &items) const |
int | AmountActiveTimers (void) const |
int | AmountActiveTVTimers (void) const |
int | AmountActiveRadioTimers (void) 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 (void) const |
bool | IsRecordingOnChannel (const CPVRChannel &channel) const |
Check if a recording is running on the given channel. More... | |
CPVRTimerInfoTagPtr | GetActiveTimerForChannel (const CPVRChannelPtr &channel) const |
Obtain the active timer for a given channel. More... | |
int | AmountActiveRecordings (void) const |
int | AmountActiveTVRecordings (void) const |
int | AmountActiveRadioRecordings (void) const |
bool | GetDirectory (const std::string &strPath, CFileItemList &items) const |
Get all timers for the given path. More... | |
bool | DeleteTimersOnChannel (const CPVRChannelPtr &channel, bool bDeleteTimerRules=true, bool bCurrentlyActiveOnly=false) |
Delete all timers on a channel. More... | |
CDateTime | GetNextEventTime (void) 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. More... | |
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. More... | |
bool | RenameTimer (const std::shared_ptr< CPVRTimerInfoTag > &tag, const std::string &strNewName) |
Rename a timer on the client. Doesn't update the timer in the container. The backend will do this. More... | |
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. More... | |
CPVRTimerInfoTagPtr | GetTimerForEpgTag (const CPVREpgInfoTagPtr &epgTag) const |
Get the timer tag that matches the given epg tag. More... | |
CPVRTimerInfoTagPtr | GetTimerRule (const CPVRTimerInfoTagPtr &timer) const |
CFileItemPtr | GetTimerRule (const CFileItemPtr &item) const |
void | UpdateChannels (void) |
Update the channel pointers. More... | |
void | Notify (const Observable &obs, const ObservableMessage msg) override |
Process a message from an observable. More... | |
CPVRTimerInfoTagPtr | GetById (unsigned int iTimerId) const |
![]() | |
bool | UpdateFromClient (const CPVRTimerInfoTagPtr &timer) |
Add a timer tag to this container or update the tag if already present in this container. More... | |
CPVRTimerInfoTagPtr | GetByClient (int iClientId, int iClientIndex) const |
Get the timer tag denoted by given client id and timer id. More... | |
const MapTags & | GetTags () const |
Get the timertags map. More... | |
![]() | |
Observer ()=default | |
virtual | ~Observer ()=default |
Additional Inherited Members | |
![]() | |
typedef std::vector< CPVRTimerInfoTagPtr > | VecTimerInfoTag |
typedef std::map< CDateTime, VecTimerInfoTag > | MapTags |
![]() | |
void | InsertEntry (const std::shared_ptr< CPVRTimerInfoTag > &newTimer) |
![]() | |
CCriticalSection | m_critSection |
unsigned int | m_iLastId = 0 |
MapTags | m_tags |
CPVRTimers::CPVRTimers | ( | void | ) |
|
override |
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 | ( | void | ) | const |
int CPVRTimers::AmountActiveRadioTimers | ( | void | ) | const |
int CPVRTimers::AmountActiveRecordings | ( | void | ) | const |
int CPVRTimers::AmountActiveTimers | ( | void | ) | const |
int CPVRTimers::AmountActiveTVRecordings | ( | void | ) | const |
int CPVRTimers::AmountActiveTVTimers | ( | void | ) | 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 CPVRChannelPtr & | 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 |
CPVRTimerInfoTagPtr CPVRTimers::GetActiveTimerForChannel | ( | const CPVRChannelPtr & | channel | ) | const |
Obtain the active timer for a given channel.
channel | The channel to check. |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > CPVRTimers::GetActiveTimers | ( | void | ) | const |
std::vector< std::shared_ptr< CPVRTimerInfoTag > > CPVRTimers::GetActiveTVRecordings | ( | ) | const |
void CPVRTimers::GetAll | ( | CFileItemList & | items | ) | const |
Get all timers
items | The list to add the timers to |
CPVRTimerInfoTagPtr CPVRTimers::GetById | ( | unsigned int | iTimerId | ) | const |
Get a timer tag given it's unique ID
iTimerId | The ID to find |
bool CPVRTimers::GetDirectory | ( | const std::string & | strPath, |
CFileItemList & | items | ||
) | const |
Get all timers for the given path.
strPath | The vfs path to get the timers for. |
items | The results. |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetNextActiveRadioTimer | ( | void | ) | const |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetNextActiveTimer | ( | bool | bIgnoreReminders = true | ) | const |
bIgnoreReminders | include or ignore reminders |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetNextActiveTVTimer | ( | void | ) | const |
std::shared_ptr< CPVRTimerInfoTag > CPVRTimers::GetNextReminderToAnnnounce | ( | ) |
CPVRTimerInfoTagPtr CPVRTimers::GetTimerForEpgTag | ( | const CPVREpgInfoTagPtr & | epgTag | ) | const |
Get the timer tag that matches the given epg tag.
epgTag | The epg tag. |
CPVRTimerInfoTagPtr CPVRTimers::GetTimerRule | ( | const CPVRTimerInfoTagPtr & | timer | ) | const |
Get the timer rule for a given timer tag
timer | The timer to query the timer rule for |
CFileItemPtr CPVRTimers::GetTimerRule | ( | const CFileItemPtr & | item | ) | const |
Get the timer rule for a given timer tag
item | The timer to query the timer rule for |
bool CPVRTimers::IsRecording | ( | void | ) | const |
bool CPVRTimers::IsRecordingOnChannel | ( | const CPVRChannel & | channel | ) | const |
Check if a recording is running on the given channel.
channel | The channel to check. |
bool CPVRTimers::Load | ( | void | ) |
(re)load the timers from the clients.
bool CPVRTimers::LoadFromDatabase | ( | void | ) |
load the local timers from database.
|
overridevirtual |
Process a message from an observable.
obs | The observable that sends the message. |
msg | The message. |
Implements Observer.
bool CPVRTimers::RenameTimer | ( | const std::shared_ptr< CPVRTimerInfoTag > & | tag, |
const std::string & | strNewName | ||
) |
Rename a timer on the client. Doesn't update the timer in the container. The backend will do this.
tag | The timer to rename. |
void CPVRTimers::Unload | ( | ) |
unload all timers.
bool CPVRTimers::Update | ( | void | ) |
refresh the timer list from the 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. |