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();
43 const std::shared_ptr<const CPVRClient>& client);
51 static std::shared_ptr<CPVRTimerType>
CreateFromIds(
unsigned int iTypeId,
int iClientId);
61 uint64_t iMustNotHaveAttr,
68 const std::string& strDescription =
"");
94 unsigned int GetTypeId()
const {
return m_iTypeId; }
395 void InitDescription();
400 void InitPreventDuplicateEpisodesValues(
const PVR_TIMER_TYPE& type);
403 int m_iClientId = -1;
404 unsigned int m_iTypeId;
405 uint64_t m_iAttributes;
406 std::string m_strDescription;
407 std::vector< std::pair<std::string, int> > m_priorityValues;
408 int m_iPriorityDefault = DEFAULT_RECORDING_PRIORITY;
409 std::vector< std::pair<std::string, int> > m_lifetimeValues;
410 int m_iLifetimeDefault = DEFAULT_RECORDING_LIFETIME;
411 std::vector< std::pair<std::string, int> > m_maxRecordingsValues;
412 int m_iMaxRecordingsDefault = 0;
413 std::vector< std::pair<std::string, int> > m_preventDupEpisodesValues;
414 unsigned int m_iPreventDupEpisodesDefault = DEFAULT_RECORDING_DUPLICATEHANDLING;
415 std::vector< std::pair<std::string, int> > m_recordingGroupValues;
416 unsigned int m_iRecordingGroupDefault = 0;
bool IsManual() const
Check whether this type is for epg-based or manual timers.
Definition: PVRTimerType.h:130
bool IsManualOnetime() const
Check whether this type is for one time manual timers.
Definition: PVRTimerType.h:160
bool SupportsEpgTitleMatch() const
Check whether this type supports matching a search string against epg episode title.
Definition: PVRTimerType.h:245
bool SupportsChannels() const
Check whether this type supports channels.
Definition: PVRTimerType.h:216
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:142
bool SupportsStartAnyTime() const
Check whether this type supports start any time.
Definition: PVRTimerType.h:233
bool ForbidsNewInstances() const
Check whether this type forbids creation of new timers of this type.
Definition: PVRTimerType.h:178
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:370
"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:148
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:112
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
void Update(const CPVRTimerType &type)
Update the data of this instance with the data given by another type instance.
Definition: PVRTimerType.cpp:218
int GetRecordingGroupDefault() const
Obtain the default value for the Recording Group attribute.
Definition: PVRTimerType.h:392
bool SupportsEndTime() const
Check whether this type supports end time.
Definition: PVRTimerType.h:228
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:136
Definition: ContextMenuManager.h:24
bool SupportsFirstDay() const
Check whether this type supports a first day the timer is active.
Definition: PVRTimerType.h:258
bool SupportsStartTime() const
Check whether this type supports start time.
Definition: PVRTimerType.h:222
int GetLifetimeDefault() const
Obtain the default value for the lifetime attribute.
Definition: PVRTimerType.h:356
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:142
int GetPreventDuplicateEpisodesDefault() const
Obtain the default value for the duplicate episode prevention attribute.
Definition: PVRTimerType.h:380
bool SupportsRecordingGroup() const
Check whether this type supports recording groups.
Definition: PVRTimerType.h:320
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:120
bool IsReadOnly() const
Check whether this type is readonly (must not be modified after initial creation).
Definition: PVRTimerType.h:166
int GetClientId() const
Get the PVR client id for this type.
Definition: PVRTimerType.h:88
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:106
bool ForbidsEpgTagOnCreate() const
Check whether this timer type is forbidden when epg tag info is present.
Definition: PVRTimerType.h:184
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:368
bool SupportsRecordOnlyNewEpisodes() const
Check whether this type supports the "record only new episodes" feature.
Definition: PVRTimerType.h:270
bool RequiresEpgSeriesOnCreate() const
Check whether this timer type requires epg tag info including series attributes to be present...
Definition: PVRTimerType.h:198
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:346
bool SupportsPriority() const
Check whether this type supports recording priorities.
Definition: PVRTimerType.h:296
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:154
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< const 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:344
bool SupportsRecordingFolders() const
Check whether this type supports user specified recording folders.
Definition: PVRTimerType.h:314
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:172
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:306
bool SupportsEndAnyTime() const
Check whether this type supports end any time.
Definition: PVRTimerType.h:239
bool SupportsWeekdays() const
Check whether this type supports weekdays for timer schedules.
Definition: PVRTimerType.h:264
bool SupportsEndMargin() const
Check whether this type supports post record time.
Definition: PVRTimerType.h:286
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:308
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:433
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:326
bool SupportsStartMargin() const
Check whether this type supports pre record time.
Definition: PVRTimerType.h:276
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:118
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:204
bool SupportsReadOnlyDelete() const
Check whether this type supports deletion of an otherwise read-only timer.
Definition: PVRTimerType.h:332
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:210
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:124
const std::string & GetDescription() const
Get the plain text (UI) description of this type.
Definition: PVRTimerType.h:100
bool SupportsLifetime() const
Check whether this type supports lifetime for recordings.
Definition: PVRTimerType.h:302
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:406
bool RequiresEpgTagOnCreate() const
Check whether this timer type requires epg tag info to be present.
Definition: PVRTimerType.h:190
unsigned int GetTypeId() const
Get the numeric type id of this type.
Definition: PVRTimerType.h:94
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:252
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