Kodi Development  20.0
for Binary and Script based Add-Ons
pvr_timers.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #ifndef C_API_ADDONINSTANCE_PVR_TIMERS_H
10 #define C_API_ADDONINSTANCE_PVR_TIMERS_H
11 
12 #include "pvr_defines.h"
13 
14 #include <stdbool.h>
15 #include <stdint.h>
16 #include <time.h>
17 
18 //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
19 // "C" Definitions group 6 - PVR timers
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif /* __cplusplus */
24 
25  //============================================================================
33 
34  //============================================================================
39  #define PVR_TIMER_TYPE_NONE 0
40  //----------------------------------------------------------------------------
41 
42  //============================================================================
47  #define PVR_TIMER_NO_CLIENT_INDEX 0
48  //----------------------------------------------------------------------------
49 
50  //============================================================================
55  #define PVR_TIMER_NO_PARENT PVR_TIMER_NO_CLIENT_INDEX
56  //----------------------------------------------------------------------------
57 
58  //============================================================================
63  #define PVR_TIMER_NO_EPG_UID EPG_TAG_INVALID_UID
64  //----------------------------------------------------------------------------
65 
66  //============================================================================
72  #define PVR_TIMER_ANY_CHANNEL -1
73  //----------------------------------------------------------------------------
74 
75  //============================================================================
79  #define PVR_TIMER_VALUE_NOT_AVAILABLE -1
80  //----------------------------------------------------------------------------
81 
83  //----------------------------------------------------------------------------
84 
85 
86  //============================================================================
102  typedef enum PVR_TIMER_TYPES
103  {
106 
110 
114 
118 
122 
127 
131 
135 
139 
145 
149 
153 
157 
161 
164 
167 
171 
175 
178 
182 
186 
190 
194 
198 
211 
215 
220 
223 
226 
229 
232  } PVR_TIMER_TYPES;
234  //----------------------------------------------------------------------------
235 
236  //============================================================================
250  typedef enum PVR_WEEKDAYS
251  {
254 
256  PVR_WEEKDAY_MONDAY = (1 << 0),
257 
260 
263 
266 
268  PVR_WEEKDAY_FRIDAY = (1 << 4),
269 
272 
274  PVR_WEEKDAY_SUNDAY = (1 << 6),
275 
282  //----------------------------------------------------------------------------
283 
284  //============================================================================
292  typedef enum PVR_TIMER_STATE
293  {
298 
301 
304 
307 
310 
313 
317 
321 
324 
328  } PVR_TIMER_STATE;
330  //----------------------------------------------------------------------------
331 
340  typedef struct PVR_TIMER
341  {
342  unsigned int iClientIndex;
343  unsigned int iParentClientIndex;
344  int iClientChannelUid;
345  time_t startTime;
346  time_t endTime;
347  bool bStartAnyTime;
348  bool bEndAnyTime;
349  enum PVR_TIMER_STATE state;
350  unsigned int iTimerType;
351  char strTitle[PVR_ADDON_NAME_STRING_LENGTH];
352  char strEpgSearchString[PVR_ADDON_NAME_STRING_LENGTH];
353  bool bFullTextEpgSearch;
354  char strDirectory[PVR_ADDON_URL_STRING_LENGTH];
355  char strSummary[PVR_ADDON_DESC_STRING_LENGTH];
356  int iPriority;
357  int iLifetime;
358  int iMaxRecordings;
359  unsigned int iRecordingGroup;
360  time_t firstDay;
361  unsigned int iWeekdays;
362  unsigned int iPreventDuplicateEpisodes;
363  unsigned int iEpgUid;
364  unsigned int iMarginStart;
365  unsigned int iMarginEnd;
366  int iGenreType;
367  int iGenreSubType;
368  char strSeriesLink[PVR_ADDON_URL_STRING_LENGTH];
369  } PVR_TIMER;
370 
379  typedef struct PVR_TIMER_TYPE
380  {
381  unsigned int iId;
382  uint64_t iAttributes;
383  char strDescription[PVR_ADDON_TIMERTYPE_STRING_LENGTH];
384 
385  unsigned int iPrioritiesSize;
386  struct PVR_ATTRIBUTE_INT_VALUE priorities[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
387  int iPrioritiesDefault;
388 
389  unsigned int iLifetimesSize;
390  struct PVR_ATTRIBUTE_INT_VALUE lifetimes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
391  int iLifetimesDefault;
392 
393  unsigned int iPreventDuplicateEpisodesSize;
394  struct PVR_ATTRIBUTE_INT_VALUE preventDuplicateEpisodes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
395  unsigned int iPreventDuplicateEpisodesDefault;
396 
397  unsigned int iRecordingGroupSize;
398  struct PVR_ATTRIBUTE_INT_VALUE recordingGroup[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
399  unsigned int iRecordingGroupDefault;
400 
401  unsigned int iMaxRecordingsSize;
402  struct PVR_ATTRIBUTE_INT_VALUE maxRecordings[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE_SMALL];
403  int iMaxRecordingsDefault;
404  } PVR_TIMER_TYPE;
405 
406 #ifdef __cplusplus
407 }
408 #endif /* __cplusplus */
409 
410 #endif /* !C_API_ADDONINSTANCE_PVR_TIMERS_H */
PVR_TIMER_STATE
Definition: pvr_timers.h:293
@ PVR_TIMER_STATE_NEW
0 : The timer was just created on the backend and is not yet active.
Definition: pvr_timers.h:297
@ PVR_TIMER_STATE_CONFLICT_NOK
7 : The scheduled timer conflicts with another one and won't be recorded.
Definition: pvr_timers.h:320
@ PVR_TIMER_STATE_CONFLICT_OK
6 : The scheduled timer conflicts with another one, but will be recorded.
Definition: pvr_timers.h:316
@ PVR_TIMER_STATE_DISABLED
9 : The timer was disabled by the user, can be enabled via setting the state to PVR_TIMER_STATE_SCHED...
Definition: pvr_timers.h:327
@ PVR_TIMER_STATE_RECORDING
2 : The timer is currently recordings.
Definition: pvr_timers.h:303
@ PVR_TIMER_STATE_ERROR
8 : The timer is scheduled, but can't be recorded for some reason.
Definition: pvr_timers.h:323
@ PVR_TIMER_STATE_COMPLETED
3 : The recording completed successfully.
Definition: pvr_timers.h:306
@ PVR_TIMER_STATE_SCHEDULED
1 : The timer is scheduled for recording.
Definition: pvr_timers.h:300
@ PVR_TIMER_STATE_ABORTED
4 : Recording started, but was aborted.
Definition: pvr_timers.h:309
@ PVR_TIMER_STATE_CANCELLED
5 : The timer was scheduled, but was canceled.
Definition: pvr_timers.h:312
PVR_TIMER_TYPES
Definition: pvr_timers.h:103
@ PVR_TIMER_TYPE_FORBIDS_EPG_TAG_ON_CREATE
0000 0000 0100 0000 0000 0000 0000 0000 : This type should not appear on any create menus which prov...
Definition: pvr_timers.h:197
@ PVR_TIMER_TYPE_SUPPORTS_RECORDING_GROUP
0000 0000 0000 0001 0000 0000 0000 0000 : This type supports a list of recording groups (kodi::addon...
Definition: pvr_timers.h:174
@ PVR_TIMER_TYPE_FORBIDS_NEW_INSTANCES
0000 0000 0000 0000 0000 0000 0000 1000 : Timers of this type must not be created by Kodi....
Definition: pvr_timers.h:121
@ PVR_TIMER_TYPE_SUPPORTS_START_END_MARGIN
0000 0000 0000 0000 0001 0000 0000 0000 : This type supports pre and post record time (kodi::addon::...
Definition: pvr_timers.h:160
@ PVR_TIMER_TYPE_SUPPORTS_END_ANYTIME
0000 0000 0000 1000 0000 0000 0000 0000 : Enables a separate 'Any Time' over-ride for end time (usin...
Definition: pvr_timers.h:185
@ PVR_TIMER_TYPE_SUPPORTS_TITLE_EPG_MATCH
0000 0000 0000 0000 0000 0000 1000 0000 : This type supports matching epg episode title usingkodi::a...
Definition: pvr_timers.h:138
@ PVR_TIMER_TYPE_SUPPORTS_START_TIME
0000 0000 0000 0000 0000 0000 0100 0000 : This type supports a recording start time (kodi::addon::PV...
Definition: pvr_timers.h:134
@ PVR_TIMER_TYPE_SUPPORTS_RECORDING_FOLDERS
0000 0000 0000 0000 1000 0000 0000 0000 : This type supports placing recordings in user defined fold...
Definition: pvr_timers.h:170
@ PVR_TIMER_TYPE_REQUIRES_EPG_TAG_ON_CREATE
0000 0000 0010 0000 0000 0000 0000 0000 : This type should not appear on any create menus which don'...
Definition: pvr_timers.h:193
@ PVR_TIMER_TYPE_SUPPORTS_ENABLE_DISABLE
0000 0000 0000 0000 0000 0000 0001 0000 : This type supports enabling/disabling of the timer (kodi::...
Definition: pvr_timers.h:126
@ PVR_TIMER_TYPE_REQUIRES_EPG_SERIES_ON_CREATE
0000 0000 1000 0000 0000 0000 0000 0000 : This type should not appear on any create menus unless ass...
Definition: pvr_timers.h:210
@ PVR_TIMER_TYPE_SUPPORTS_WEEKDAYS
0000 0000 0000 0000 0000 0100 0000 0000 : This type supports weekdays for defining the recording sch...
Definition: pvr_timers.h:152
@ PVR_TIMER_TYPE_SUPPORTS_RECORD_ONLY_NEW_EPISODES
0000 0000 0000 0000 0000 1000 0000 0000 : This type supports the "record only new episodes" feature ...
Definition: pvr_timers.h:156
@ PVR_TIMER_TYPE_IS_REPEATING
0000 0000 0000 0000 0000 0000 0000 0010 : Defines whether this is a type for repeating or one-shot t...
Definition: pvr_timers.h:113
@ PVR_TIMER_TYPE_SUPPORTS_MAX_RECORDINGS
0000 0000 0001 0000 0000 0000 0000 0000 : This type supports specifying a maximum recordings setting...
Definition: pvr_timers.h:189
@ PVR_TIMER_TYPE_SUPPORTS_CHANNELS
0000 0000 0000 0000 0000 0000 0010 0000 : This type supports channels (kodi::addon::PVRTimer::SetCli...
Definition: pvr_timers.h:130
@ PVR_TIMER_TYPE_SUPPORTS_FULLTEXT_EPG_MATCH
0000 0000 0000 0000 0000 0001 0000 0000 : This type supports matching "more" epg data (not just epis...
Definition: pvr_timers.h:144
@ PVR_TIMER_TYPE_SUPPORTS_LIFETIME
0000 0000 0000 0000 0100 0000 0000 0000 : This type supports recording lifetime (kodi::addon::PVRTim...
Definition: pvr_timers.h:166
@ PVR_TIMER_TYPE_SUPPORTS_END_TIME
0000 0000 0000 0010 0000 0000 0000 0000 : This type supports a recording end time (kodi::addon::PVRT...
Definition: pvr_timers.h:177
@ PVR_TIMER_TYPE_SUPPORTS_PRIORITY
0000 0000 0000 0000 0010 0000 0000 0000 : This type supports recording priority (kodi::addon::PVRTim...
Definition: pvr_timers.h:163
@ PVR_TIMER_TYPE_IS_MANUAL
0000 0000 0000 0000 0000 0000 0000 0001 : Defines whether this is a type for manual (time-based) or ...
Definition: pvr_timers.h:109
@ PVR_TIMER_TYPE_SUPPORTS_READONLY_DELETE
0000 0100 0000 0000 0000 0000 0000 0000 : This type allows deletion of an otherwise read-only timer.
Definition: pvr_timers.h:222
@ PVR_TIMER_TYPE_SUPPORTS_ANY_CHANNEL
0000 0001 0000 0000 0000 0000 0000 0000 : This type supports 'any channel', for example when definin...
Definition: pvr_timers.h:214
@ PVR_TIMER_TYPE_IS_READONLY
0000 0000 0000 0000 0000 0000 0000 0100 : Timers of this type must not be edited by Kodi.
Definition: pvr_timers.h:117
@ PVR_TIMER_TYPE_SUPPORTS_END_MARGIN
0010 0000 0000 0000 0000 0000 0000 0000 : This type supports post record time (kodi::addon::PVRTimer...
Definition: pvr_timers.h:231
@ PVR_TIMER_TYPE_SUPPORTS_START_ANYTIME
0000 0000 0000 0100 0000 0000 0000 0000 : Enables an 'Any Time' over-ride option for start time (usi...
Definition: pvr_timers.h:181
@ PVR_TIMER_TYPE_SUPPORTS_START_MARGIN
0001 0000 0000 0000 0000 0000 0000 0000 : This type supports pre record time (kodi::addon::PVRTimer:...
Definition: pvr_timers.h:228
@ PVR_TIMER_TYPE_SUPPORTS_FIRST_DAY
0000 0000 0000 0000 0000 0010 0000 0000 : This type supports a first day the timer gets active (kodi...
Definition: pvr_timers.h:148
@ PVR_TIMER_TYPE_IS_REMINDER
0000 1000 0000 0000 0000 0000 0000 0000 : Timers of this type do trigger a reminder if time is up.
Definition: pvr_timers.h:225
@ PVR_TIMER_TYPE_REQUIRES_EPG_SERIESLINK_ON_CREATE
0000 0010 0000 0000 0000 0000 0000 0000 : This type should not appear on any create menus which don'...
Definition: pvr_timers.h:219
@ PVR_TIMER_TYPE_ATTRIBUTE_NONE
0000 0000 0000 0000 0000 0000 0000 0000 : Empty attribute value.
Definition: pvr_timers.h:105
PVR_WEEKDAY
Definition: pvr_timers.h:251
@ PVR_WEEKDAY_SATURDAY
0010 0000 : To select Saturday.
Definition: pvr_timers.h:271
@ PVR_WEEKDAY_FRIDAY
0001 0000 : To select Friday.
Definition: pvr_timers.h:268
@ PVR_WEEKDAY_ALLDAYS
0111 1111 : To select all days of week.
Definition: pvr_timers.h:277
@ PVR_WEEKDAY_WEDNESDAY
0000 0100 : To select Wednesday.
Definition: pvr_timers.h:262
@ PVR_WEEKDAY_NONE
0000 0000 : Nothing selected.
Definition: pvr_timers.h:253
@ PVR_WEEKDAY_MONDAY
0000 0001 : To select Monday.
Definition: pvr_timers.h:256
@ PVR_WEEKDAY_TUESDAY
0000 0010 : To select Tuesday.
Definition: pvr_timers.h:259
@ PVR_WEEKDAY_THURSDAY
0000 1000 : To select Thursday.
Definition: pvr_timers.h:265
@ PVR_WEEKDAY_SUNDAY
0100 0000 : To select Sunday.
Definition: pvr_timers.h:274
"C" Representation of a general attribute integer value.
Definition: pvr_defines.h:48
"C" PVR add-on timer event type.
Definition: pvr_timers.h:380
"C" PVR add-on timer event.
Definition: pvr_timers.h:341