xbmc
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  //============================================================================
101  typedef enum PVR_TIMER_TYPES
102  {
105 
109 
113 
117 
121 
126 
130 
134 
138 
144 
148 
152 
156 
160 
163 
166 
170 
174 
177 
181 
185 
189 
193 
197 
210 
214 
219 
222 
225 
228 
231  } PVR_TIMER_TYPES;
233  //----------------------------------------------------------------------------
234 
235  //============================================================================
249  typedef enum PVR_WEEKDAYS
250  {
253 
255  PVR_WEEKDAY_MONDAY = (1 << 0),
256 
259 
262 
265 
267  PVR_WEEKDAY_FRIDAY = (1 << 4),
268 
271 
273  PVR_WEEKDAY_SUNDAY = (1 << 6),
274 
279  } PVR_WEEKDAY;
281  //----------------------------------------------------------------------------
282 
283  //============================================================================
291  typedef enum PVR_TIMER_STATE
292  {
297 
300 
303 
306 
309 
312 
316 
320 
323 
327  } PVR_TIMER_STATE;
329  //----------------------------------------------------------------------------
330 
339  typedef struct PVR_TIMER
340  {
341  unsigned int iClientIndex;
342  unsigned int iParentClientIndex;
343  int iClientChannelUid;
344  time_t startTime;
345  time_t endTime;
346  bool bStartAnyTime;
347  bool bEndAnyTime;
348  enum PVR_TIMER_STATE state;
349  unsigned int iTimerType;
350  char strTitle[PVR_ADDON_NAME_STRING_LENGTH];
351  char strEpgSearchString[PVR_ADDON_NAME_STRING_LENGTH];
352  bool bFullTextEpgSearch;
353  char strDirectory[PVR_ADDON_URL_STRING_LENGTH];
354  char strSummary[PVR_ADDON_DESC_STRING_LENGTH];
355  int iPriority;
356  int iLifetime;
357  int iMaxRecordings;
358  unsigned int iRecordingGroup;
359  time_t firstDay;
360  unsigned int iWeekdays;
361  unsigned int iPreventDuplicateEpisodes;
362  unsigned int iEpgUid;
363  unsigned int iMarginStart;
364  unsigned int iMarginEnd;
365  int iGenreType;
366  int iGenreSubType;
367  char strSeriesLink[PVR_ADDON_URL_STRING_LENGTH];
368  } PVR_TIMER;
369 
378  typedef struct PVR_TIMER_TYPE
379  {
380  unsigned int iId;
381  uint64_t iAttributes;
382  char strDescription[PVR_ADDON_TIMERTYPE_STRING_LENGTH];
383 
384  unsigned int iPrioritiesSize;
385  struct PVR_ATTRIBUTE_INT_VALUE priorities[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
386  int iPrioritiesDefault;
387 
388  unsigned int iLifetimesSize;
389  struct PVR_ATTRIBUTE_INT_VALUE lifetimes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
390  int iLifetimesDefault;
391 
392  unsigned int iPreventDuplicateEpisodesSize;
393  struct PVR_ATTRIBUTE_INT_VALUE preventDuplicateEpisodes[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
394  unsigned int iPreventDuplicateEpisodesDefault;
395 
396  unsigned int iRecordingGroupSize;
397  struct PVR_ATTRIBUTE_INT_VALUE recordingGroup[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE];
398  unsigned int iRecordingGroupDefault;
399 
400  unsigned int iMaxRecordingsSize;
401  struct PVR_ATTRIBUTE_INT_VALUE maxRecordings[PVR_ADDON_TIMERTYPE_VALUES_ARRAY_SIZE_SMALL];
402  int iMaxRecordingsDefault;
403  } PVR_TIMER_TYPE;
404 
405 #ifdef __cplusplus
406 }
407 #endif /* __cplusplus */
408 
409 #endif /* !C_API_ADDONINSTANCE_PVR_TIMERS_H */
3 : The recording completed successfully.
Definition: pvr_timers.h:305
6 : The scheduled timer conflicts with another one, but will be recorded.
Definition: pvr_timers.h:315
0 : The timer was just created on the backend and is not yet active.
Definition: pvr_timers.h:296
0000 0000 0000 0000 1000 0000 0000 0000 : This type supports placing recordings in user defined fold...
Definition: pvr_timers.h:169
0100 0000 : To select Sunday.
Definition: pvr_timers.h:273
"C" PVR add-on timer event type.
Definition: pvr_timers.h:378
0001 0000 : To select Friday.
Definition: pvr_timers.h:267
0000 0000 0000 0100 0000 0000 0000 0000 : Enables an &#39;Any Time&#39; over-ride option for start time (usi...
Definition: pvr_timers.h:180
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
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
0000 1000 : To select Thursday.
Definition: pvr_timers.h:264
PVR_TIMER_TYPES
Definition: pvr_timers.h:101
0000 0000 0000 0000 0000 0000 0010 0000 : This type supports channels (kodi::addon::PVRTimer::SetCli...
Definition: pvr_timers.h:129
0000 0000 0000 0000 0000 0000 0000 0000 : Empty attribute value.
Definition: pvr_timers.h:104
0000 0000 0000 0010 0000 0000 0000 0000 : This type supports a recording end time (kodi::addon::PVRT...
Definition: pvr_timers.h:176
5 : The timer was scheduled, but was canceled.
Definition: pvr_timers.h:311
4 : Recording started, but was aborted.
Definition: pvr_timers.h:308
0000 0000 0001 0000 0000 0000 0000 0000 : This type supports specifying a maximum recordings setting...
Definition: pvr_timers.h:188
1 : The timer is scheduled for recording.
Definition: pvr_timers.h:299
0000 0000 0000 0000 0000 0010 0000 0000 : This type supports a first day the timer gets active (kodi...
Definition: pvr_timers.h:147
9 : The timer was disabled by the user, can be enabled via setting the state to PVR_TIMER_STATE_SCHED...
Definition: pvr_timers.h:326
0010 0000 : To select Saturday.
Definition: pvr_timers.h:270
0000 0000 0000 0000 0000 0000 0001 0000 : This type supports enabling/disabling of the timer (kodi::...
Definition: pvr_timers.h:125
PVR_WEEKDAYS
Definition: pvr_timers.h:249
0111 1111 : To select all days of week.
Definition: pvr_timers.h:276
0000 0000 0010 0000 0000 0000 0000 0000 : This type should not appear on any create menus which don&#39;...
Definition: pvr_timers.h:192
0000 0001 0000 0000 0000 0000 0000 0000 : This type supports &#39;any channel&#39;, for example when definin...
Definition: pvr_timers.h:213
0000 0000 : Nothing selected.
Definition: pvr_timers.h:252
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
0000 0000 0000 0000 0000 0100 0000 0000 : This type supports weekdays for defining the recording sch...
Definition: pvr_timers.h:151
8 : The timer is scheduled, but can&#39;t be recorded for some reason.
Definition: pvr_timers.h:322
2 : The timer is currently recordings.
Definition: pvr_timers.h:302
0000 0100 : To select Wednesday.
Definition: pvr_timers.h:261
0000 0010 : To select Tuesday.
Definition: pvr_timers.h:258
PVR_TIMER_STATE
Definition: pvr_timers.h:291
0000 0010 0000 0000 0000 0000 0000 0000 : This type should not appear on any create menus which don&#39;...
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
0010 0000 0000 0000 0000 0000 0000 0000 : This type supports post record time (kodi::addon::PVRTimer...
Definition: pvr_timers.h:230
"C" Representation of a general attribute integer value.
Definition: pvr_defines.h:47
"C" PVR add-on timer event.
Definition: pvr_timers.h:339
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
0000 0000 0000 0000 0001 0000 0000 0000 : This type supports pre and post record time (kodi::addon::...
Definition: pvr_timers.h:159
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
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 0001 : To select Monday.
Definition: pvr_timers.h:255
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
7 : The scheduled timer conflicts with another one and won&#39;t be recorded.
Definition: pvr_timers.h:319
0000 0000 0000 0000 0000 0000 0000 0100 : Timers of this type must not be edited by Kodi...
Definition: pvr_timers.h:116
0000 0000 0000 1000 0000 0000 0000 0000 : Enables a separate &#39;Any Time&#39; 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