Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <PVRTimerInfoTag.h>
Classes | |
struct | CustomPropDetails |
custom property detail: type, value More... | |
Public Types | |
using | CustomPropsMap = std::map<unsigned int, CustomPropDetails> |
custom properties map: <prop id, details> | |
Public Member Functions | |
CPVRTimerInfoTag (bool bRadio=false) | |
CPVRTimerInfoTag (const PVR_TIMER &timer, const std::shared_ptr< CPVRChannel > &channel, unsigned int iClientId, const ADDON::CAddonVersion &addonApiVersion) | |
bool | operator== (const CPVRTimerInfoTag &right) const |
bool | operator!= (const CPVRTimerInfoTag &right) const |
void | Serialize (CVariant &value) const override |
void | SetEpgInfoTag (const std::shared_ptr< CPVREpgInfoTag > &tag) |
Associate the given epg tag with this timer. | |
std::shared_ptr< CPVREpgInfoTag > | GetEpgInfoTag (bool bCreate=true) const |
get the epg info tag associated with this timer, if any | |
bool | UpdateEntry (const std::shared_ptr< const CPVRTimerInfoTag > &tag) |
updates this timer excluding the state of any children. | |
bool | UpdateChildState (const std::shared_ptr< const CPVRTimerInfoTag > &childTimer, bool bAdd) |
merge in the state of this child timer. | |
void | ResetChildState () |
reset the state of children related to this timer. | |
bool | IsActive () const |
Whether this timer is active. | |
bool | IsBroken () const |
Whether this timer is broken. | |
bool | HasConflict () const |
Whether this timer has a conflict. | |
bool | IsRecording () const |
Whether this timer is currently recording. | |
bool | IsDisabled () const |
Whether this timer is disabled, for example by the user. | |
const std::shared_ptr< CPVRTimerType > | GetTimerType () const |
Gets the type of this timer. | |
void | SetTimerType (const std::shared_ptr< CPVRTimerType > &type) |
Sets the type of this timer. | |
bool | IsTimerRule () const |
Checks whether this is a timer rule (vs. one time timer). | |
bool | IsReminder () const |
Checks whether this is a reminder timer (vs. recording timer). | |
bool | IsManual () const |
Checks whether this is a manual (vs. epg-based) timer. | |
bool | IsEpgBased () const |
Checks whether this is an epg-based (vs. manual) timer. | |
int | ClientID () const |
The ID of the client for this timer. | |
bool | IsOwnedByClient () const |
Check, whether this timer is owned by a pvr client or by Kodi. | |
bool | IsRadio () const |
Whether this timer is for Radio or TV. | |
const std::string & | Path () const |
The path that identifies this timer. | |
int | ClientIndex () const |
The index for this timer, as given by the client. | |
int | ParentClientIndex () const |
The index for the parent of this timer, as given by the client. Timers scheduled by a timer rule will have a parant index != PVR_TIMER_NO_PARENT. | |
bool | HasParent () const |
Whether this timer has a parent. | |
unsigned int | TimerID () const |
The local ID for this timer, as given by Kodi. | |
void | SetTimerID (unsigned int id) |
Set the local ID for this timer. | |
int | ClientChannelUID () const |
The UID of the channel for this timer. | |
PVR_TIMER_STATE | State () const |
The state for this timer. | |
void | SetState (PVR_TIMER_STATE state) |
Set the state for this timer. | |
const std::string & | Title () const |
The title for this timer. | |
bool | HasChannel () const |
Check whether this timer has an associated channel. | |
std::shared_ptr< CPVRChannel > | Channel () const |
Get the channel associated with this timer, if any. | |
void | UpdateChannel () |
Update the channel associated with this timer, based on current client ID and channel UID. | |
std::string | ChannelName () const |
The name of the channel associated with this timer, if any. | |
std::string | ChannelIcon () const |
The path for the channel icon associated with this timer, if any. | |
CDateTime | StartAsUTC () const |
The start date and time for this timer, as UTC. | |
CDateTime | StartAsLocalTime () const |
The start date and time for this timer, as local time. | |
void | SetStartFromUTC (const CDateTime &start) |
Set the start date and time from a CDateTime instance carrying the data as UTC. | |
void | SetStartFromLocalTime (const CDateTime &start) |
Set the start date and time from a CDateTime instance carrying the data as local time. | |
CDateTime | EndAsUTC () const |
The end date and time for this timer, as UTC. | |
CDateTime | EndAsLocalTime () const |
The end date and time for this timer, as local time. | |
void | SetEndFromUTC (const CDateTime &end) |
Set the end date and time from a CDateTime instance carrying the data as UTC. | |
void | SetEndFromLocalTime (const CDateTime &end) |
Set the end date and time from a CDateTime instance carrying the data as local time. | |
CDateTime | FirstDayAsUTC () const |
The first day for this timer, as UTC. | |
CDateTime | FirstDayAsLocalTime () const |
The first day for this timer, as local time. | |
void | SetFirstDayFromUTC (const CDateTime &firstDay) |
Set the first dday from a CDateTime instance carrying the data as UTC. | |
void | SetFirstDayFromLocalTime (const CDateTime &firstDay) |
Set the first dday from a CDateTime instance carrying the data as local time. | |
int | GetDuration () const |
Get the duration of this timer in seconds, excluding padding times. | |
unsigned int | MarginStart () const |
Get time in minutes to start the recording before the start time of the programme. | |
unsigned int | MarginEnd () const |
Get time in minutes to end the recording after the end time of the programme. | |
unsigned int | WeekDays () const |
For timer rules, the days of week this timer rule is scheduled for. | |
bool | IsStartAnyTime () const |
For timer rules, whether start time is "any time", not a particular time. | |
bool | IsEndAnyTime () const |
For timer rules, whether end time is "any time", not a particular time. | |
bool | IsFullTextEpgSearch () const |
For timer rules, whether only the EPG programme title shall be searched or also other data like the programme's plot, if available. | |
const std::string & | EpgSearchString () const |
For timer rules, the epg data match string for searches. Format is backend-dependent, for example regexp. | |
const std::string & | SeriesLink () const |
The series link for this timer. | |
const std::string & | Directory () const |
The directory for the recordings for this timer. | |
int | Priority () const |
The priority for this timer. | |
int | Lifetime () const |
The life time for this timer. | |
int | MaxRecordings () const |
The maximum number of recordings for this timer. | |
int | PreventDupEpisodesPolicy () const |
The policy to be used to prevent duplicate episodes for this timer. | |
int | RecordingGroup () const |
The recording group for this timer. | |
const CustomPropsMap & | GetCustomProperties () const |
Get custom properties for this tag. | |
unsigned int | UniqueBroadcastID () const |
Get the UID of the epg event associated with this timer tag, if any. | |
bool | AddToClient () const |
Add this timer to the backend, transferring all local data of this timer to the backend. | |
TimerOperationResult | DeleteFromClient (bool bForce=false) const |
Delete this timer on the backend. | |
bool | UpdateOnClient () |
Update this timer on the backend, transferring all local data of this timer to the backend. | |
bool | Persist () |
Persist this timer in the local database. | |
bool | DeleteFromDatabase () |
Delete this timer from the local database. | |
std::string | GetNotificationText () const |
GUI support: Get the text for the timer GUI notification. | |
std::string | GetDeletedNotificationText () const |
GUI support: Get the text for the timer GUI notification when a timer has been deleted. | |
const std::string & | Summary () const |
GUI support: Get the summary text for this timer, reflecting the timer schedule in a human readable form. | |
void | UpdateSummary () |
GUI support: Update the summary text for this timer. | |
std::string | GetStatus (bool bRadio) const |
GUI support: Get the status text for this timer, reflecting its current state in a human readable form. | |
std::string | GetTypeAsString () const |
GUI support: Get the timer string in a human readable form. | |
Public Member Functions inherited from ISerializable |
Static Public Member Functions | |
static std::shared_ptr< CPVRTimerInfoTag > | CreateInstantTimerTag (const std::shared_ptr< CPVRChannel > &channel, int iDuration=DEFAULT_PVRRECORD_INSTANTRECORDTIME) |
create a tag for an instant timer for a given channel | |
static std::shared_ptr< CPVRTimerInfoTag > | CreateTimerTag (const std::shared_ptr< CPVRChannel > &channel, const CDateTime &start, int iDuration) |
create a tag for a timer for a given channel at given time for given duration | |
static std::shared_ptr< CPVRTimerInfoTag > | CreateFromEpg (const std::shared_ptr< CPVREpgInfoTag > &tag, bool bCreateRule, bool bCreateReminder, bool bReadOnly=false) |
create a recording or reminder timer or timer rule for the given epg info tag. | |
static std::shared_ptr< CPVRTimerInfoTag > | CreateFromEpg (const std::shared_ptr< CPVREpgInfoTag > &tag, bool bCreateRule=false) |
create a timer or timer rule for the given epg info tag. | |
static std::shared_ptr< CPVRTimerInfoTag > | CreateReminderFromDate (const CDateTime &start, int iDuration, const std::shared_ptr< CPVRTimerInfoTag > &parent=std::shared_ptr< CPVRTimerInfoTag >()) |
create a reminder timer for the given start date. | |
static std::shared_ptr< CPVRTimerInfoTag > | CreateReminderFromEpg (const std::shared_ptr< CPVREpgInfoTag > &tag, const std::shared_ptr< CPVRTimerInfoTag > &parent=std::shared_ptr< CPVRTimerInfoTag >()) |
create a reminder timer for the given epg info tag. | |
static CDateTime | ConvertUTCToLocalTime (const CDateTime &utc) |
Helper function to convert a given CDateTime containing data as UTC to local time. | |
static CDateTime | ConvertLocalTimeToUTC (const CDateTime &local) |
Helper function to convert a given CDateTime containing data as local time to UTC. | |
static std::string | GetWeekdaysString (unsigned int iWeekdays, bool bEpgBased, bool bLongMultiDaysFormat) |
GUI support: Return string representation for any possible combination of weekdays. | |
Static Public Attributes | |
static constexpr int | DEFAULT_PVRRECORD_INSTANTRECORDTIME = -1 |
Friends | |
class | CGUIDialogPVRTimerSettings |
class | CPVRDatabase |
Additional Inherited Members | |
Protected Member Functions inherited from ISerializable | |
~ISerializable ()=default | |
using PVR::CPVRTimerInfoTag::CustomPropsMap = std::map<unsigned int, CustomPropDetails> |
custom properties map: <prop id, details>
|
explicit |
CPVRTimerInfoTag::CPVRTimerInfoTag | ( | const PVR_TIMER & | timer, |
const std::shared_ptr< CPVRChannel > & | channel, | ||
unsigned int | iClientId, | ||
const ADDON::CAddonVersion & | addonApiVersion ) |
bool CPVRTimerInfoTag::AddToClient | ( | ) | const |
Add this timer to the backend, transferring all local data of this timer to the backend.
std::shared_ptr< CPVRChannel > CPVRTimerInfoTag::Channel | ( | ) | const |
Get the channel associated with this timer, if any.
std::string CPVRTimerInfoTag::ChannelIcon | ( | ) | const |
The path for the channel icon associated with this timer, if any.
std::string CPVRTimerInfoTag::ChannelName | ( | ) | const |
The name of the channel associated with this timer, if any.
|
inline |
The UID of the channel for this timer.
|
inline |
The ID of the client for this timer.
|
inline |
The index for this timer, as given by the client.
|
static |
create a recording or reminder timer or timer rule for the given epg info tag.
tag | the epg info tag |
bCreateRule | if true, create a timer rule, create a one shot timer otherwise |
bCreateReminder | if true, create a reminder timer or rule, create a recording timer or rule otherwise |
bReadOnly | whether the timer/rule is read only |
|
static |
create a timer or timer rule for the given epg info tag.
tag | the epg info tag |
bCreateRule | if true, create a timer rule, create a one shot timer otherwise |
|
static |
create a tag for an instant timer for a given channel
channel | is the channel the instant timer is to be created for |
iDuration | is the duration for the instant timer, DEFAULT_PVRRECORD_INSTANTRECORDTIME denotes system default (setting value) |
|
static |
create a reminder timer for the given start date.
start | the start date |
iDuration | the duration the reminder is valid |
parent | If non-zero, the new timer will be made a child of the given timer rule |
|
static |
create a reminder timer for the given epg info tag.
tag | the epg info tag |
parent | If non-zero, the new timer will be made a child of the given timer rule |
|
static |
create a tag for a timer for a given channel at given time for given duration
channel | is the channel the timer is to be created for |
start | is the start time for the recording |
iDuration | is the duration of the recording |
TimerOperationResult CPVRTimerInfoTag::DeleteFromClient | ( | bool | bForce = false | ) | const |
Delete this timer on the backend.
bForce | Control what to do in case the timer is currently recording. True to force to delete the timer, false to return TimerDeleteResult::RECORDING. |
bool CPVRTimerInfoTag::DeleteFromDatabase | ( | ) |
Delete this timer from the local database.
|
inline |
The directory for the recordings for this timer.
CDateTime CPVRTimerInfoTag::EndAsLocalTime | ( | ) | const |
The end date and time for this timer, as local time.
CDateTime CPVRTimerInfoTag::EndAsUTC | ( | ) | const |
The end date and time for this timer, as UTC.
|
inline |
For timer rules, the epg data match string for searches. Format is backend-dependent, for example regexp.
CDateTime CPVRTimerInfoTag::FirstDayAsLocalTime | ( | ) | const |
The first day for this timer, as local time.
CDateTime CPVRTimerInfoTag::FirstDayAsUTC | ( | ) | const |
The first day for this timer, as UTC.
|
inline |
Get custom properties for this tag.
std::string CPVRTimerInfoTag::GetDeletedNotificationText | ( | ) | const |
int CPVRTimerInfoTag::GetDuration | ( | ) | const |
Get the duration of this timer in seconds, excluding padding times.
std::shared_ptr< CPVREpgInfoTag > CPVRTimerInfoTag::GetEpgInfoTag | ( | bool | bCreate = true | ) | const |
get the epg info tag associated with this timer, if any
bCreate | if true, try to find the epg tag if not yet set (lazy evaluation) |
std::string CPVRTimerInfoTag::GetNotificationText | ( | ) | const |
std::string CPVRTimerInfoTag::GetStatus | ( | bool | bRadio | ) | const |
GUI support: Get the status text for this timer, reflecting its current state in a human readable form.
|
inline |
Gets the type of this timer.
std::string CPVRTimerInfoTag::GetTypeAsString | ( | ) | const |
GUI support: Get the timer string in a human readable form.
Get the type string of this timer
|
static |
GUI support: Return string representation for any possible combination of weekdays.
iWeekdays | weekdays as bit mask (0x01 = Mo, 0x02 = Tu, ...) |
bEpgBased | context is an epg-based timer |
bLongMultiDaysFormat | use long format. ("Mo-__-We-__-Fr-Sa-__" vs. "Mo-We-Fr-Sa") |
bool CPVRTimerInfoTag::HasChannel | ( | ) | const |
Check whether this timer has an associated channel.
|
inline |
Whether this timer has a conflict.
|
inline |
Whether this timer has a parent.
|
inline |
Whether this timer is active.
|
inline |
Whether this timer is broken.
|
inline |
Whether this timer is disabled, for example by the user.
|
inline |
For timer rules, whether end time is "any time", not a particular time.
|
inline |
Checks whether this is an epg-based (vs. manual) timer.
|
inline |
For timer rules, whether only the EPG programme title shall be searched or also other data like the programme's plot, if available.
|
inline |
Checks whether this is a manual (vs. epg-based) timer.
bool CPVRTimerInfoTag::IsOwnedByClient | ( | ) | const |
Check, whether this timer is owned by a pvr client or by Kodi.
|
inline |
Whether this timer is for Radio or TV.
|
inline |
Whether this timer is currently recording.
|
inline |
Checks whether this is a reminder timer (vs. recording timer).
|
inline |
For timer rules, whether start time is "any time", not a particular time.
|
inline |
Checks whether this is a timer rule (vs. one time timer).
|
inline |
The life time for this timer.
|
inline |
Get time in minutes to end the recording after the end time of the programme.
|
inline |
Get time in minutes to start the recording before the start time of the programme.
|
inline |
The maximum number of recordings for this timer.
bool CPVRTimerInfoTag::operator!= | ( | const CPVRTimerInfoTag & | right | ) | const |
bool CPVRTimerInfoTag::operator== | ( | const CPVRTimerInfoTag & | right | ) | const |
|
inline |
The index for the parent of this timer, as given by the client. Timers scheduled by a timer rule will have a parant index != PVR_TIMER_NO_PARENT.
const std::string & CPVRTimerInfoTag::Path | ( | ) | const |
The path that identifies this timer.
bool CPVRTimerInfoTag::Persist | ( | ) |
Persist this timer in the local database.
|
inline |
The policy to be used to prevent duplicate episodes for this timer.
|
inline |
The priority for this timer.
|
inline |
The recording group for this timer.
void CPVRTimerInfoTag::ResetChildState | ( | ) |
reset the state of children related to this timer.
Implements ISerializable.
const std::string & CPVRTimerInfoTag::SeriesLink | ( | ) | const |
The series link for this timer.
Set the end date and time from a CDateTime instance carrying the data as local time.
start | The end date and time as local time. |
Set the end date and time from a CDateTime instance carrying the data as UTC.
start | The end date and time as UTC. |
void CPVRTimerInfoTag::SetEpgInfoTag | ( | const std::shared_ptr< CPVREpgInfoTag > & | tag | ) |
Associate the given epg tag with this timer.
tag | The epg tag to assign. |
Set the first dday from a CDateTime instance carrying the data as local time.
start | The first day as local time. |
Set the first dday from a CDateTime instance carrying the data as UTC.
start | The first day as UTC. |
Set the start date and time from a CDateTime instance carrying the data as local time.
start | The start date and time as local time. |
Set the start date and time from a CDateTime instance carrying the data as UTC.
start | The start date and time as UTC. |
|
inline |
Set the state for this timer.
state | The state to set. |
Set the local ID for this timer.
id | The ID to set. |
void CPVRTimerInfoTag::SetTimerType | ( | const std::shared_ptr< CPVRTimerType > & | type | ) |
Sets the type of this timer.
the | new timer type. |
CDateTime CPVRTimerInfoTag::StartAsLocalTime | ( | ) | const |
The start date and time for this timer, as local time.
CDateTime CPVRTimerInfoTag::StartAsUTC | ( | ) | const |
The start date and time for this timer, as UTC.
|
inline |
The state for this timer.
const std::string & CPVRTimerInfoTag::Summary | ( | ) | const |
GUI support: Get the summary text for this timer, reflecting the timer schedule in a human readable form.
|
inline |
The local ID for this timer, as given by Kodi.
const std::string & CPVRTimerInfoTag::Title | ( | ) | const |
The title for this timer.
|
inline |
Get the UID of the epg event associated with this timer tag, if any.
void CPVRTimerInfoTag::UpdateChannel | ( | ) |
Update the channel associated with this timer, based on current client ID and channel UID.
bool CPVRTimerInfoTag::UpdateChildState | ( | const std::shared_ptr< const CPVRTimerInfoTag > & | childTimer, |
bool | bAdd ) |
merge in the state of this child timer.
childTimer | The child timer |
bAdd | If true, add child's data to parent's state, otherwise subtract. |
bool CPVRTimerInfoTag::UpdateEntry | ( | const std::shared_ptr< const CPVRTimerInfoTag > & | tag | ) |
updates this timer excluding the state of any children.
tag | A timer containing the data that shall be merged into this timer's data. |
bool CPVRTimerInfoTag::UpdateOnClient | ( | ) |
Update this timer on the backend, transferring all local data of this timer to the backend.
|
inline |
For timer rules, the days of week this timer rule is scheduled for.
|
friend |
|
friend |
|
staticconstexpr |