![]() |
Kodi Documentation
18.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 channel list from the clients. More... | |
CFileItemPtr | GetNextActiveTimer (void) const |
CFileItemPtr | GetNextActiveTVTimer (void) const |
CFileItemPtr | GetNextActiveRadioTimer (void) const |
std::vector< CFileItemPtr > | GetActiveTimers (void) const |
void | GetAll (CFileItemList &items) const |
bool | HasActiveTimers (void) const |
int | AmountActiveTimers (void) const |
int | AmountActiveTVTimers (void) const |
int | AmountActiveRadioTimers (void) const |
std::vector< CFileItemPtr > | GetActiveRecordings (void) const |
std::vector< CFileItemPtr > | GetActiveTVRecordings (void) const |
std::vector< CFileItemPtr > | GetActiveRadioRecordings (void) 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 |
CPVRTimerInfoTagPtr | GetTimerForEpgTag (const CPVREpgInfoTagPtr &epgTag) const |
Get the timer tag that matches the given epg tag. More... | |
bool | HasRecordingTimerForRecording (const CPVRRecording &recording) const |
Check whether there is a timer currently recording the given recording. More... | |
CPVRTimerInfoTagPtr | GetRecordingTimerForRecording (const CPVRRecording &recording) const |
Get the timer currently recording the given recording, if any. 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, unsigned int iClientTimerId) 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 |
Static Public Member Functions | |
static bool | AddTimer (const CPVRTimerInfoTagPtr &tag) |
Add a timer to the client. Doesn't add the timer to the container. The backend will do this. More... | |
static TimerOperationResult | DeleteTimer (const CPVRTimerInfoTagPtr &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... | |
static bool | RenameTimer (const CPVRTimerInfoTagPtr &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... | |
static bool | UpdateTimer (const CPVRTimerInfoTagPtr &tag) |
Update the timer on the client. Doesn't update the timer in the container. The backend will do this. More... | |
Additional Inherited Members | |
![]() | |
typedef std::vector< CPVRTimerInfoTagPtr > | VecTimerInfoTag |
typedef std::map< CDateTime, VecTimerInfoTag > | MapTags |
![]() | |
void | InsertTimer (const CPVRTimerInfoTagPtr &newTimer) |
![]() | |
CCriticalSection | m_critSection |
unsigned int | m_iLastId = 0 |
MapTags | m_tags |
CPVRTimers::CPVRTimers | ( | void | ) |
|
override |
|
static |
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 |
|
static |
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< CFileItemPtr > CPVRTimers::GetActiveRadioRecordings | ( | void | ) | const |
std::vector< CFileItemPtr > CPVRTimers::GetActiveRecordings | ( | void | ) | const |
CPVRTimerInfoTagPtr CPVRTimers::GetActiveTimerForChannel | ( | const CPVRChannelPtr & | channel | ) | const |
Obtain the active timer for a given channel.
channel | The channel to check. |
std::vector< CFileItemPtr > CPVRTimers::GetActiveTimers | ( | void | ) | const |
std::vector< CFileItemPtr > CPVRTimers::GetActiveTVRecordings | ( | void | ) | 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. |
CFileItemPtr CPVRTimers::GetNextActiveRadioTimer | ( | void | ) | const |
CFileItemPtr CPVRTimers::GetNextActiveTimer | ( | void | ) | const |
CFileItemPtr CPVRTimers::GetNextActiveTVTimer | ( | void | ) | const |
CPVRTimerInfoTagPtr CPVRTimers::GetRecordingTimerForRecording | ( | const CPVRRecording & | recording | ) | const |
Get the timer currently recording the given recording, if any.
recording | The recording to check. |
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::HasActiveTimers | ( | void | ) | const |
bool CPVRTimers::HasRecordingTimerForRecording | ( | const CPVRRecording & | recording | ) | const |
Check whether there is a timer currently recording the given recording.
recording | The recording to check. |
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.
|
overridevirtual |
Process a message from an observable.
obs | The observable that sends the message. |
msg | The message. |
Implements Observer.
|
static |
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 channel list from the clients.
|
static |
Update the timer on the client. Doesn't update the timer in the container. The backend will do this.
tag | The timer to update. |