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

PVR add-on timer type
Representation of a timer event. More...

Topics

 Value Help
 
 class PVRTimersResultSet
 PVR add-on timer transfer class
To transfer the content of kodi::addon::CInstancePVRClient::GetTimers().
 

Classes

class  kodi::addon::PVRTimer
 

Functions

void kodi::addon::PVRTimer::SetClientIndex (unsigned int clientIndex)
 required
The index of this timer given by the client.
 
unsigned int kodi::addon::PVRTimer::GetClientIndex () const
 To get with SetClientIndex changed values.
 
void kodi::addon::PVRTimer::SetState (PVR_TIMER_STATE state)
 required
The state of this timer.
 
PVR_TIMER_STATE kodi::addon::PVRTimer::GetState () const
 To get with SetState changed values.
 
void kodi::addon::PVRTimer::SetTimerType (unsigned int timerType)
 required
The type of this timer.
 
unsigned int kodi::addon::PVRTimer::GetTimerType () const
 To get with SetTimerType changed values.
 
void kodi::addon::PVRTimer::SetTitle (const std::string &title)
 required
A title for this timer.
 
std::string kodi::addon::PVRTimer::GetTitle () const
 To get with SetTitle changed values.
 
void kodi::addon::PVRTimer::SetParentClientIndex (unsigned int parentClientIndex)
 optional
For timers scheduled by a repeating timer.
 
unsigned int kodi::addon::PVRTimer::GetParentClientIndex () const
 To get with SetParentClientIndex changed values.
 
void kodi::addon::PVRTimer::SetClientChannelUid (int clientChannelUid)
 optional
Unique identifier of the channel to record on.
 
int kodi::addon::PVRTimer::GetClientChannelUid () const
 To get with SetClientChannelUid changed values.
 
void kodi::addon::PVRTimer::SetStartTime (time_t startTime)
 optional
Start time of the recording in UTC.
 
time_t kodi::addon::PVRTimer::GetStartTime () const
 To get with SetStartTime changed values.
 
void kodi::addon::PVRTimer::SetEndTime (time_t endTime)
 optional
End time of the recording in UTC.
 
time_t kodi::addon::PVRTimer::GetEndTime () const
 To get with SetEndTime changed values.
 
void kodi::addon::PVRTimer::SetStartAnyTime (bool startAnyTime)
 optional
For EPG based (not Manual) timers indicates startTime does not apply.
 
bool kodi::addon::PVRTimer::GetStartAnyTime () const
 To get with SetStartAnyTime changed values.
 
void kodi::addon::PVRTimer::SetEndAnyTime (bool endAnyTime)
 optional
For EPG based (not Manual) timers indicates endTime does not apply.
 
bool kodi::addon::PVRTimer::GetEndAnyTime () const
 To get with SetEndAnyTime changed values.
 
void kodi::addon::PVRTimer::SetEPGSearchString (const std::string &epgSearchString)
 optional
A string used to search epg data for repeating epg-based timers.
 
std::string kodi::addon::PVRTimer::GetEPGSearchString () const
 To get with SetEPGSearchString changed values.
 
void kodi::addon::PVRTimer::SetFullTextEpgSearch (bool fullTextEpgSearch)
 optional
Indicates, whether SetEPGSearchString() is to match against the epg episode title only or also against "other" epg data (backend-dependent).
 
bool kodi::addon::PVRTimer::GetFullTextEpgSearch () const
 To get with SetFullTextEpgSearch changed values.
 
void kodi::addon::PVRTimer::SetDirectory (const std::string &directory)
 optional
The (relative) directory where the recording will be stored in.
 
std::string kodi::addon::PVRTimer::GetDirectory () const
 To get with SetDirectory changed values.
 
void kodi::addon::PVRTimer::SetSummary (const std::string &summary)
 optional
The summary for this timer.
 
std::string kodi::addon::PVRTimer::GetSummary () const
 To get with SetDirectory changed values.
 
void kodi::addon::PVRTimer::SetPriority (int priority)
 optional
The priority of this timer.
 
int kodi::addon::PVRTimer::GetPriority () const
 To get with SetPriority changed values.
 
void kodi::addon::PVRTimer::SetLifetime (int priority)
 optional
Lifetime of recordings created by this timer.
 
int kodi::addon::PVRTimer::GetLifetime () const
 To get with SetLifetime changed values.
 
void kodi::addon::PVRTimer::SetMaxRecordings (int maxRecordings)
 optional
Maximum number of recordings this timer shall create.
 
int kodi::addon::PVRTimer::GetMaxRecordings () const
 To get with SetMaxRecordings changed values.
 
void kodi::addon::PVRTimer::SetRecordingGroup (unsigned int recordingGroup)
 optional
Integer ref to addon/backend defined list of recording groups.
 
unsigned int kodi::addon::PVRTimer::GetRecordingGroup () const
 To get with SetRecordingGroup changed values.
 
void kodi::addon::PVRTimer::SetFirstDay (time_t firstDay)
 optional
The first day this timer is active, for repeating timers.
 
time_t kodi::addon::PVRTimer::GetFirstDay () const
 To get with SetFirstDay changed values.
 
void kodi::addon::PVRTimer::SetWeekdays (unsigned int weekdays)
 optional
Week days, for repeating timers (see PVR_WEEKDAY_* constant values)
 
unsigned int kodi::addon::PVRTimer::GetWeekdays () const
 To get with SetFirstDay changed values.
 
void kodi::addon::PVRTimer::SetPreventDuplicateEpisodes (unsigned int preventDuplicateEpisodes)
 optional
Prevent duplicate episodes.
 
unsigned int kodi::addon::PVRTimer::GetPreventDuplicateEpisodes () const
 To get with SetPreventDuplicateEpisodes changed values.
 
void kodi::addon::PVRTimer::SetEPGUid (unsigned int epgUid)
 optional
EPG event id associated with this timer. Event ids must be unique for a channel.
 
unsigned int kodi::addon::PVRTimer::GetEPGUid () const
 To get with SetEPGUid changed values.
 
void kodi::addon::PVRTimer::SetMarginStart (unsigned int marginStart)
 optional
If set, the backend starts the recording selected minutes before SetStartTime.
 
unsigned int kodi::addon::PVRTimer::GetMarginStart () const
 To get with SetMarginStart changed values.
 
void kodi::addon::PVRTimer::SetMarginEnd (unsigned int marginEnd)
 optional
If set, the backend ends the recording selected minutes after SetEndTime.
 
unsigned int kodi::addon::PVRTimer::GetMarginEnd () const
 To get with SetMarginEnd changed values.
 
void kodi::addon::PVRTimer::SetGenreType (int genreType)
 optional
Genre type.
 
int kodi::addon::PVRTimer::GetGenreType () const
 To get with SetGenreType changed values.
 
void kodi::addon::PVRTimer::SetGenreSubType (int genreSubType)
 optional
Genre sub type.
 
int kodi::addon::PVRTimer::GetGenreSubType () const
 To get with SetGenreType changed values.
 
void kodi::addon::PVRTimer::SetSeriesLink (const std::string &seriesLink)
 optional
Series link for this timer.
 
std::string kodi::addon::PVRTimer::GetSeriesLink () const
 To get with SetSeriesLink changed values.
 

Detailed Description

PVR add-on timer type
Representation of a timer event.

The related values here are automatically initiated to defaults and need only be set if supported and used.


The following table contains values that can be set with class PVRTimer :

Name Type Set call Get call Usage
Client index unsigned int SetClientIndex GetClientIndex required to set
State PVR_TIMER_STATE SetState GetState required to set
Type unsigned int SetTimerType GetTimerType required to set
Title std::string SetTitle GetTitle required to set
Parent client index unsigned int SetParentClientIndex GetParentClientIndex optional
Client channel unique identifier int SetClientChannelUid GetClientChannelUid optional
Start time time_t SetStartTime GetStartTime optional
End time time_t SetEndTime GetEndTime optional
Start any time bool SetStartAnyTime GetStartAnyTime optional
End any time bool SetEndAnyTime GetEndAnyTime optional
EPG search string std::string SetEPGSearchString GetEPGSearchString optional
Full text EPG search bool SetFullTextEpgSearch GetFullTextEpgSearch optional
Recording store directory std::string SetDirectory GetDirectory optional
Timer priority int SetPriority GetPriority optional
Timer lifetime int SetLifetime GetLifetime optional
Max recordings int SetMaxRecordings GetMaxRecordings optional
Recording group unsigned int SetRecordingGroup GetRecordingGroup optional
First start day time_t SetFirstDay GetFirstDay optional
Used timer weekdays unsigned int SetWeekdays GetWeekdays optional
Prevent duplicate episodes unsigned int SetPreventDuplicateEpisodes GetPreventDuplicateEpisodes optional
EPG unique identifier unsigned int SetEPGUid GetEPGUid optional
Margin start unsigned int SetMarginStart GetMarginStart optional
Margin end unsigned int SetMarginEnd GetMarginEnd optional
Genre type int SetGenreType GetGenreType optional
Genre sub type int SetGenreSubType GetGenreSubType optional
Series link std::string SetSeriesLink GetSeriesLink optional

Function Documentation

◆ GetClientChannelUid()

int kodi::addon::PVRTimer::GetClientChannelUid ( ) const
inline

To get with SetClientChannelUid changed values.

◆ GetClientIndex()

unsigned int kodi::addon::PVRTimer::GetClientIndex ( ) const
inline

To get with SetClientIndex changed values.

◆ GetDirectory()

std::string kodi::addon::PVRTimer::GetDirectory ( ) const
inline

To get with SetDirectory changed values.

◆ GetEndAnyTime()

bool kodi::addon::PVRTimer::GetEndAnyTime ( ) const
inline

To get with SetEndAnyTime changed values.

◆ GetEndTime()

time_t kodi::addon::PVRTimer::GetEndTime ( ) const
inline

To get with SetEndTime changed values.

◆ GetEPGSearchString()

std::string kodi::addon::PVRTimer::GetEPGSearchString ( ) const
inline

To get with SetEPGSearchString changed values.

◆ GetEPGUid()

unsigned int kodi::addon::PVRTimer::GetEPGUid ( ) const
inline

To get with SetEPGUid changed values.

◆ GetFirstDay()

time_t kodi::addon::PVRTimer::GetFirstDay ( ) const
inline

To get with SetFirstDay changed values.

◆ GetFullTextEpgSearch()

bool kodi::addon::PVRTimer::GetFullTextEpgSearch ( ) const
inline

To get with SetFullTextEpgSearch changed values.

◆ GetGenreSubType()

int kodi::addon::PVRTimer::GetGenreSubType ( ) const
inline

To get with SetGenreType changed values.

◆ GetGenreType()

int kodi::addon::PVRTimer::GetGenreType ( ) const
inline

To get with SetGenreType changed values.

◆ GetLifetime()

int kodi::addon::PVRTimer::GetLifetime ( ) const
inline

To get with SetLifetime changed values.

◆ GetMarginEnd()

unsigned int kodi::addon::PVRTimer::GetMarginEnd ( ) const
inline

To get with SetMarginEnd changed values.

◆ GetMarginStart()

unsigned int kodi::addon::PVRTimer::GetMarginStart ( ) const
inline

To get with SetMarginStart changed values.

◆ GetMaxRecordings()

int kodi::addon::PVRTimer::GetMaxRecordings ( ) const
inline

To get with SetMaxRecordings changed values.

◆ GetParentClientIndex()

unsigned int kodi::addon::PVRTimer::GetParentClientIndex ( ) const
inline

To get with SetParentClientIndex changed values.

◆ GetPreventDuplicateEpisodes()

unsigned int kodi::addon::PVRTimer::GetPreventDuplicateEpisodes ( ) const
inline

To get with SetPreventDuplicateEpisodes changed values.

◆ GetPriority()

int kodi::addon::PVRTimer::GetPriority ( ) const
inline

To get with SetPriority changed values.

◆ GetRecordingGroup()

unsigned int kodi::addon::PVRTimer::GetRecordingGroup ( ) const
inline

To get with SetRecordingGroup changed values.

◆ GetSeriesLink()

std::string kodi::addon::PVRTimer::GetSeriesLink ( ) const
inline

To get with SetSeriesLink changed values.

◆ GetStartAnyTime()

bool kodi::addon::PVRTimer::GetStartAnyTime ( ) const
inline

To get with SetStartAnyTime changed values.

◆ GetStartTime()

time_t kodi::addon::PVRTimer::GetStartTime ( ) const
inline

To get with SetStartTime changed values.

◆ GetState()

PVR_TIMER_STATE kodi::addon::PVRTimer::GetState ( ) const
inline

To get with SetState changed values.

◆ GetSummary()

std::string kodi::addon::PVRTimer::GetSummary ( ) const
inline

To get with SetDirectory changed values.

◆ GetTimerType()

unsigned int kodi::addon::PVRTimer::GetTimerType ( ) const
inline

To get with SetTimerType changed values.

◆ GetTitle()

std::string kodi::addon::PVRTimer::GetTitle ( ) const
inline

To get with SetTitle changed values.

◆ GetWeekdays()

unsigned int kodi::addon::PVRTimer::GetWeekdays ( ) const
inline

To get with SetFirstDay changed values.

◆ SetClientChannelUid()

void kodi::addon::PVRTimer::SetClientChannelUid ( int clientChannelUid)
inline

optional
Unique identifier of the channel to record on.

PVR_TIMER_ANY_CHANNEL will denote "any channel", not a specific one. PVR_CHANNEL_INVALID_UID denotes that channel uid is not available.

◆ SetClientIndex()

void kodi::addon::PVRTimer::SetClientIndex ( unsigned int clientIndex)
inline

required
The index of this timer given by the client.

PVR_TIMER_NO_CLIENT_INDEX indicates that the index was not yet set by the client, for example for new timers created by Kodi and passed the first time to the client. A valid index must be greater than PVR_TIMER_NO_CLIENT_INDEX.

◆ SetDirectory()

void kodi::addon::PVRTimer::SetDirectory ( const std::string & directory)
inline

optional
The (relative) directory where the recording will be stored in.

◆ SetEndAnyTime()

void kodi::addon::PVRTimer::SetEndAnyTime ( bool endAnyTime)
inline

optional
For EPG based (not Manual) timers indicates endTime does not apply.

Default = false

◆ SetEndTime()

void kodi::addon::PVRTimer::SetEndTime ( time_t endTime)
inline

optional
End time of the recording in UTC.

◆ SetEPGSearchString()

void kodi::addon::PVRTimer::SetEPGSearchString ( const std::string & epgSearchString)
inline

optional
A string used to search epg data for repeating epg-based timers.

Format is backend-dependent, for example regexp.

◆ SetEPGUid()

void kodi::addon::PVRTimer::SetEPGUid ( unsigned int epgUid)
inline

optional
EPG event id associated with this timer. Event ids must be unique for a channel.

Valid ids must be greater than EPG_TAG_INVALID_UID.

◆ SetFirstDay()

void kodi::addon::PVRTimer::SetFirstDay ( time_t firstDay)
inline

optional
The first day this timer is active, for repeating timers.

◆ SetFullTextEpgSearch()

void kodi::addon::PVRTimer::SetFullTextEpgSearch ( bool fullTextEpgSearch)
inline

optional
Indicates, whether SetEPGSearchString() is to match against the epg episode title only or also against "other" epg data (backend-dependent).

◆ SetGenreSubType()

void kodi::addon::PVRTimer::SetGenreSubType ( int genreSubType)
inline

optional
Genre sub type.

Subtypes groups related to set by SetGenreType:

Main genre type List with available sub genre types
EPG_EVENT_CONTENTMASK_UNDEFINED Nothing, should be 0
EPG_EVENT_CONTENTMASK_MOVIEDRAMA EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA
EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS
EPG_EVENT_CONTENTMASK_SHOW EPG_EVENT_CONTENTSUBMASK_SHOW
EPG_EVENT_CONTENTMASK_SPORTS EPG_EVENT_CONTENTSUBMASK_SPORTS
EPG_EVENT_CONTENTMASK_CHILDRENYOUTH EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH
EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE
EPG_EVENT_CONTENTMASK_ARTSCULTURE EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE
EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS
EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE
EPG_EVENT_CONTENTMASK_LEISUREHOBBIES EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES
EPG_EVENT_CONTENTMASK_SPECIAL EPG_EVENT_CONTENTSUBMASK_SPECIAL
EPG_EVENT_CONTENTMASK_USERDEFINED Can be defined by you

Example:

...
kodi::addon::PVRTimer tag;
...
const char struct KODI_ADDON_AUDIODECODER_INFO_TAG * tag
Definition addons/kodi-dev-kit/include/kodi/c-api/addon-instance/AudioDecoder.h:122
@ EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE
0x60 : Music/Ballet/Dance. See EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE about related sub types.
Definition pvr_epg.h:94
@ EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_JAZZ
0x4 : Jazz.
Definition pvr_epg.h:333

◆ SetGenreType()

void kodi::addon::PVRTimer::SetGenreType ( int genreType)
inline

optional
Genre type.


Example:

...
kodi::addon::PVRTimer tag;
...
@ EPG_EVENT_CONTENTMASK_MOVIEDRAMA
0x10 : Movie/Drama. See EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA about related sub types.
Definition pvr_epg.h:69
Note
If confirmed that backend brings the types in ETSI EN 300 468 conform values, can be EPG_EVENT_CONTENTMASK ignored and to set here with backend value.

◆ SetLifetime()

void kodi::addon::PVRTimer::SetLifetime ( int priority)
inline

optional
Lifetime of recordings created by this timer.

Value > 0 days after which recordings will be deleted by the backend, < 0 addon defined integer list reference, == 0 disabled.

◆ SetMarginEnd()

void kodi::addon::PVRTimer::SetMarginEnd ( unsigned int marginEnd)
inline

optional
If set, the backend ends the recording selected minutes after SetEndTime.

◆ SetMarginStart()

void kodi::addon::PVRTimer::SetMarginStart ( unsigned int marginStart)
inline

optional
If set, the backend starts the recording selected minutes before SetStartTime.

◆ SetMaxRecordings()

void kodi::addon::PVRTimer::SetMaxRecordings ( int maxRecordings)
inline

optional
Maximum number of recordings this timer shall create.

Value > 0 number of recordings, < 0 addon defined integer list reference, == 0 disabled.

◆ SetParentClientIndex()

void kodi::addon::PVRTimer::SetParentClientIndex ( unsigned int parentClientIndex)
inline

optional
For timers scheduled by a repeating timer.

The index of the repeating timer that scheduled this timer (it's clientIndex value). Use PVR_TIMER_NO_PARENT to indicate that this timer was no scheduled by a repeating timer.

◆ SetPreventDuplicateEpisodes()

void kodi::addon::PVRTimer::SetPreventDuplicateEpisodes ( unsigned int preventDuplicateEpisodes)
inline

optional
Prevent duplicate episodes.

Should 1 if backend should only record new episodes in case of a repeating epg-based timer, 0 if all episodes shall be recorded (no duplicate detection).

Actual algorithm for duplicate detection is defined by the backend. Addons may define own values for different duplicate detection algorithms, thus this is not just a bool.

◆ SetPriority()

void kodi::addon::PVRTimer::SetPriority ( int priority)
inline

optional
The priority of this timer.

◆ SetRecordingGroup()

void kodi::addon::PVRTimer::SetRecordingGroup ( unsigned int recordingGroup)
inline

optional
Integer ref to addon/backend defined list of recording groups.

◆ SetSeriesLink()

void kodi::addon::PVRTimer::SetSeriesLink ( const std::string & seriesLink)
inline

optional
Series link for this timer.

If set for an epg-based timer rule, matching events will be found by checking with here, instead of SetTitle() (and SetFullTextEpgSearch()).

◆ SetStartAnyTime()

void kodi::addon::PVRTimer::SetStartAnyTime ( bool startAnyTime)
inline

optional
For EPG based (not Manual) timers indicates startTime does not apply.

Default = false.

◆ SetStartTime()

void kodi::addon::PVRTimer::SetStartTime ( time_t startTime)
inline

optional
Start time of the recording in UTC.

Instant timers that are sent to the add-on by Kodi will have this value set to 0.

◆ SetState()

void kodi::addon::PVRTimer::SetState ( PVR_TIMER_STATE state)
inline

required
The state of this timer.

Note
PVR_TIMER_STATE_NEW is default.

Example:

Definition Timers.h:39
@ PVR_TIMER_STATE_RECORDING
2 : The timer is currently recordings.
Definition pvr_timers.h:302

◆ SetSummary()

void kodi::addon::PVRTimer::SetSummary ( const std::string & summary)
inline

optional
The summary for this timer.

◆ SetTimerType()

void kodi::addon::PVRTimer::SetTimerType ( unsigned int timerType)
inline

required
The type of this timer.

It is private to the addon and can be freely defined by the addon. The value must be greater than PVR_TIMER_TYPE_NONE.

Kodi does not interpret this value (except for checking for PVR_TIMER_TYPE_NONE), but will pass the right id to the addon with every PVRTimer instance, thus the addon easily can determine the timer type.

Note
PVR_TIMER_TYPE_NONE is default.

Example:

tag.SetTimerType(123);

◆ SetTitle()

void kodi::addon::PVRTimer::SetTitle ( const std::string & title)
inline

required
A title for this timer.

◆ SetWeekdays()

void kodi::addon::PVRTimer::SetWeekdays ( unsigned int weekdays)
inline

optional
Week days, for repeating timers (see PVR_WEEKDAY_* constant values)

Note
PVR_WEEKDAY_NONE is default.

Example:

...
kodi::addon::PVRTimer tag;
...
@ PVR_WEEKDAY_SATURDAY
0010 0000 : To select Saturday.
Definition pvr_timers.h:270
@ PVR_WEEKDAY_MONDAY
0000 0001 : To select Monday.
Definition pvr_timers.h:255