11 #include "addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h" 24 static const int DEFAULT_RECORDING_PRIORITY = 50;
25 static const int DEFAULT_RECORDING_LIFETIME = 99;
26 static const unsigned int DEFAULT_RECORDING_DUPLICATEHANDLING = 0;
35 static const std::vector<std::shared_ptr<CPVRTimerType>>
GetAllTypes();
42 static const std::shared_ptr<CPVRTimerType>
GetFirstAvailableType(
const std::shared_ptr<CPVRClient>& client);
50 static std::shared_ptr<CPVRTimerType>
CreateFromIds(
unsigned int iTypeId,
int iClientId);
60 uint64_t iMustNotHaveAttr,
67 const std::string& strDescription =
"");
87 unsigned int GetTypeId()
const {
return m_iTypeId; }
388 void InitDescription();
393 void InitPreventDuplicateEpisodesValues(
const PVR_TIMER_TYPE& type);
396 int m_iClientId = -1;
397 unsigned int m_iTypeId;
398 uint64_t m_iAttributes;
399 std::string m_strDescription;
400 std::vector< std::pair<std::string, int> > m_priorityValues;
401 int m_iPriorityDefault = DEFAULT_RECORDING_PRIORITY;
402 std::vector< std::pair<std::string, int> > m_lifetimeValues;
403 int m_iLifetimeDefault = DEFAULT_RECORDING_LIFETIME;
404 std::vector< std::pair<std::string, int> > m_maxRecordingsValues;
405 int m_iMaxRecordingsDefault = 0;
406 std::vector< std::pair<std::string, int> > m_preventDupEpisodesValues;
407 unsigned int m_iPreventDupEpisodesDefault = DEFAULT_RECORDING_DUPLICATEHANDLING;
408 std::vector< std::pair<std::string, int> > m_recordingGroupValues;
409 unsigned int m_iRecordingGroupDefault = 0;
bool IsManual() const
Check whether this type is for epg-based or manual timers.
Definition: PVRTimerType.h:123
bool IsManualOnetime() const
Check whether this type is for one time manual timers.
Definition: PVRTimerType.h:153
bool SupportsEpgTitleMatch() const
Check whether this type supports matching a search string against epg episode title.
Definition: PVRTimerType.h:238
bool SupportsChannels() const
Check whether this type supports channels.
Definition: PVRTimerType.h:209
0000 0000 0000 0000 1000 0000 0000 0000 : This type supports placing recordings in user defined fold...
Definition: pvr_timers.h:169
bool IsEpgBasedTimerRule() const
Check whether this type is for epg-based timer rules.
Definition: PVRTimerType.h:135
bool SupportsStartAnyTime() const
Check whether this type supports start any time.
Definition: PVRTimerType.h:226
bool ForbidsNewInstances() const
Check whether this type forbids creation of new timers of this type.
Definition: PVRTimerType.h:171
void GetMaxRecordingsValues(std::vector< std::pair< std::string, int >> &list) const
Obtain a list with all possible values for the MaxRecordings attribute.
Definition: PVRTimerType.cpp:351
"C" PVR add-on timer event type.
Definition: pvr_timers.h:378
bool IsEpgBasedOnetime() const
Check whether this type is for one time epg-based timers.
Definition: PVRTimerType.h:141
0000 0000 0000 0100 0000 0000 0000 0000 : Enables an 'Any Time' over-ride option for start time (usi...
Definition: pvr_timers.h:180
bool IsTimerRule() const
Check whether this type is for timer rules or one time timers.
Definition: PVRTimerType.h:105
0000 0000 0000 0000 0000 0000 0000 0010 : Defines whether this is a type for repeating or one-shot t...
Definition: pvr_timers.h:112
int GetRecordingGroupDefault() const
Obtain the default value for the Recording Group attribute.
Definition: PVRTimerType.h:385
bool SupportsEndTime() const
Check whether this type supports end time.
Definition: PVRTimerType.h:221
0000 0000 0000 0000 0100 0000 0000 0000 : This type supports recording lifetime (kodi::addon::PVRTim...
Definition: pvr_timers.h:165
0000 0000 0100 0000 0000 0000 0000 0000 : This type should not appear on any create menus which prov...
Definition: pvr_timers.h:196
bool IsEpgBased() const
Check whether this type is for epg-based or manual timers.
Definition: PVRTimerType.h:129
Definition: ContextMenuManager.h:24
bool SupportsFirstDay() const
Check whether this type supports a first day the timer is active.
Definition: PVRTimerType.h:251
bool SupportsStartTime() const
Check whether this type supports start time.
Definition: PVRTimerType.h:215
int GetLifetimeDefault() const
Obtain the default value for the lifetime attribute.
Definition: PVRTimerType.h:349
static std::shared_ptr< CPVRTimerType > CreateFromAttributes(uint64_t iMustHaveAttr, uint64_t iMustNotHaveAttr, int iClientId)
Create a timer type from given timer type attributes and client id.
Definition: PVRTimerType.cpp:141
int GetPreventDuplicateEpisodesDefault() const
Obtain the default value for the duplicate episode prevention attribute.
Definition: PVRTimerType.h:373
bool SupportsRecordingGroup() const
Check whether this type supports recording groups.
Definition: PVRTimerType.h:313
static std::shared_ptr< CPVRTimerType > CreateFromIds(unsigned int iTypeId, int iClientId)
Create a timer type from given timer type id and client id.
Definition: PVRTimerType.cpp:119
bool IsReadOnly() const
Check whether this type is readonly (must not be modified after initial creation).
Definition: PVRTimerType.h:159
int GetClientId() const
Get the PVR client id for this type.
Definition: PVRTimerType.h:81
0000 0000 0000 0000 0000 0000 0010 0000 : This type supports channels (kodi::addon::PVRTimer::SetCli...
Definition: pvr_timers.h:129
uint64_t GetAttributes() const
Get the attributes of this type.
Definition: PVRTimerType.h:99
bool ForbidsEpgTagOnCreate() const
Check whether this timer type is forbidden when epg tag info is present.
Definition: PVRTimerType.h:177
0000 0000 0000 0010 0000 0000 0000 0000 : This type supports a recording end time (kodi::addon::PVRT...
Definition: pvr_timers.h:176
int GetMaxRecordingsDefault() const
Obtain the default value for the MaxRecordings attribute.
Definition: PVRTimerType.h:361
bool SupportsRecordOnlyNewEpisodes() const
Check whether this type supports the "record only new episodes" feature.
Definition: PVRTimerType.h:263
bool RequiresEpgSeriesOnCreate() const
Check whether this timer type requires epg tag info including series attributes to be present...
Definition: PVRTimerType.h:191
void GetLifetimeValues(std::vector< std::pair< std::string, int >> &list) const
Obtain a list with all possible values for the lifetime attribute.
Definition: PVRTimerType.cpp:327
bool SupportsPriority() const
Check whether this type supports recording priorities.
Definition: PVRTimerType.h:289
0000 0000 0001 0000 0000 0000 0000 0000 : This type supports specifying a maximum recordings setting...
Definition: pvr_timers.h:188
bool IsManualTimerRule() const
Check whether this type is for manual timer rules.
Definition: PVRTimerType.h:147
0000 0000 0000 0000 0000 0010 0000 0000 : This type supports a first day the timer gets active (kodi...
Definition: pvr_timers.h:147
static const std::vector< std::shared_ptr< CPVRTimerType > > GetAllTypes()
Return a list with all known timer types.
Definition: PVRTimerType.cpp:28
static const std::shared_ptr< CPVRTimerType > GetFirstAvailableType(const std::shared_ptr< CPVRClient > &client)
Return the first available timer type from given client.
Definition: PVRTimerType.cpp:106
int GetPriorityDefault() const
Obtain the default value for the priority attribute.
Definition: PVRTimerType.h:337
bool SupportsRecordingFolders() const
Check whether this type supports user specified recording folders.
Definition: PVRTimerType.h:307
0000 0000 0000 0000 0000 0000 0001 0000 : This type supports enabling/disabling of the timer (kodi::...
Definition: pvr_timers.h:125
bool AllowsDelete() const
Check whether this type allows deletion.
Definition: PVRTimerType.h:165
void GetPriorityValues(std::vector< std::pair< std::string, int >> &list) const
Obtain a list with all possible values for the priority attribute.
Definition: PVRTimerType.cpp:287
bool SupportsEndAnyTime() const
Check whether this type supports end any time.
Definition: PVRTimerType.h:232
bool SupportsWeekdays() const
Check whether this type supports weekdays for timer schedules.
Definition: PVRTimerType.h:257
bool SupportsEndMargin() const
Check whether this type supports post record time.
Definition: PVRTimerType.h:279
0000 0000 0010 0000 0000 0000 0000 0000 : This type should not appear on any create menus which don'...
Definition: pvr_timers.h:192
0000 0001 0000 0000 0000 0000 0000 0000 : This type supports 'any channel', for example when definin...
Definition: pvr_timers.h:213
bool SupportsMaxRecordings() const
Check whether this type supports MaxRecordings for recordings.
Definition: PVRTimerType.h:301
0000 1000 0000 0000 0000 0000 0000 0000 : Timers of this type do trigger a reminder if time is up...
Definition: pvr_timers.h:224
void GetRecordingGroupValues(std::vector< std::pair< std::string, int >> &list) const
Obtain a list with all possible values for the recording group attribute.
Definition: PVRTimerType.cpp:414
0000 0000 0000 0000 0000 0100 0000 0000 : This type supports weekdays for defining the recording sch...
Definition: pvr_timers.h:151
bool SupportsAnyChannel() const
Check whether this type supports 'any channel', for example for defining a timer rule that should mat...
Definition: PVRTimerType.h:319
bool SupportsStartMargin() const
Check whether this type supports pre record time.
Definition: PVRTimerType.h:269
0000 0010 0000 0000 0000 0000 0000 0000 : This type should not appear on any create menus which don'...
Definition: pvr_timers.h:218
0000 0000 0000 0000 0000 1000 0000 0000 : This type supports the "record only new episodes" feature ...
Definition: pvr_timers.h:155
0001 0000 0000 0000 0000 0000 0000 0000 : This type supports pre record time (kodi::addon::PVRTimer:...
Definition: pvr_timers.h:227
bool IsReminder() const
Check whether this type is for reminder timers or recording timers.
Definition: PVRTimerType.h:111
0010 0000 0000 0000 0000 0000 0000 0000 : This type supports post record time (kodi::addon::PVRTimer...
Definition: pvr_timers.h:230
0000 0000 0000 0000 0000 0000 0100 0000 : This type supports a recording start time (kodi::addon::PV...
Definition: pvr_timers.h:133
0000 0000 1000 0000 0000 0000 0000 0000 : This type should not appear on any create menus unless ass...
Definition: pvr_timers.h:209
Definition: PVRTimerType.h:28
0000 0000 0000 0000 0001 0000 0000 0000 : This type supports pre and post record time (kodi::addon::...
Definition: pvr_timers.h:159
bool RequiresEpgSeriesLinkOnCreate() const
Check whether this timer type requires epg tag info including a series link to be present...
Definition: PVRTimerType.h:197
bool SupportsReadOnlyDelete() const
Check whether this type supports deletion of an otherwise read-only timer.
Definition: PVRTimerType.h:325
0000 0000 0000 0000 0000 0001 0000 0000 : This type supports matching "more" epg data (not just epis...
Definition: pvr_timers.h:143
0000 0000 0000 0000 0000 0000 1000 0000 : This type supports matching epg episode title usingkodi::a...
Definition: pvr_timers.h:137
0000 0000 0000 0001 0000 0000 0000 0000 : This type supports a list of recording groups (kodi::addon...
Definition: pvr_timers.h:173
bool SupportsEnableDisable() const
Check whether this type supports the "enabling/disabling" of timers of its type.
Definition: PVRTimerType.h:203
0000 0000 0000 0000 0000 0000 0000 0001 : Defines whether this is a type for manual (time-based) or ...
Definition: pvr_timers.h:108
0000 0000 0000 0000 0000 0000 0000 1000 : Timers of this type must not be created by Kodi...
Definition: pvr_timers.h:120
0000 0000 0000 0000 0010 0000 0000 0000 : This type supports recording priority (kodi::addon::PVRTim...
Definition: pvr_timers.h:162
bool IsOnetime() const
Check whether this type is for timer rules or one time timers.
Definition: PVRTimerType.h:117
const std::string & GetDescription() const
Get the plain text (UI) description of this type.
Definition: PVRTimerType.h:93
bool SupportsLifetime() const
Check whether this type supports lifetime for recordings.
Definition: PVRTimerType.h:295
void GetPreventDuplicateEpisodesValues(std::vector< std::pair< std::string, int >> &list) const
Obtain a list with all possible values for the duplicate episode prevention attribute.
Definition: PVRTimerType.cpp:387
bool RequiresEpgTagOnCreate() const
Check whether this timer type requires epg tag info to be present.
Definition: PVRTimerType.h:183
unsigned int GetTypeId() const
Get the numeric type id of this type.
Definition: PVRTimerType.h:87
0000 0000 0000 0000 0000 0000 0000 0100 : Timers of this type must not be edited by Kodi...
Definition: pvr_timers.h:116
bool SupportsEpgFulltextMatch() const
Check whether this type supports matching a search string against extended (fulltext) epg data...
Definition: PVRTimerType.h:245
0000 0000 0000 1000 0000 0000 0000 0000 : Enables a separate 'Any Time' over-ride for end time (usin...
Definition: pvr_timers.h:184
0000 0100 0000 0000 0000 0000 0000 0000 : This type allows deletion of an otherwise read-only timer...
Definition: pvr_timers.h:221