Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
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#pragma once
10
11#include "../../AddonBase.h"
12#include "../../c-api/addon-instance/pvr.h"
13#include "General.h"
14
15//¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
16// "C++" Definitions group 6 - PVR timers
17#ifdef __cplusplus
18
19namespace kodi
20{
21namespace addon
22{
23
24//==============================================================================
38class PVRTimer : public DynamicCStructHdl<PVRTimer, PVR_TIMER>
39{
40 friend class CInstancePVRClient;
41
42public:
44 PVRTimer()
45 {
46 m_cStructure->state = PVR_TIMER_STATE_NEW;
47 m_cStructure->iTimerType = PVR_TIMER_TYPE_NONE;
48 m_cStructure->iClientChannelUid = PVR_TIMER_VALUE_NOT_AVAILABLE;
49 m_cStructure->iPriority = PVR_TIMER_VALUE_NOT_AVAILABLE;
50 m_cStructure->iLifetime = PVR_TIMER_VALUE_NOT_AVAILABLE;
51 m_cStructure->iMaxRecordings = PVR_TIMER_VALUE_NOT_AVAILABLE;
52 m_cStructure->iWeekdays = PVR_WEEKDAY_NONE;
53 m_cStructure->iGenreType = PVR_TIMER_VALUE_NOT_AVAILABLE;
54 m_cStructure->iGenreSubType = PVR_TIMER_VALUE_NOT_AVAILABLE;
55 }
56 PVRTimer(const PVRTimer& timer) : DynamicCStructHdl(timer) {}
92
95
104 void SetClientIndex(unsigned int clientIndex) { m_cStructure->iClientIndex = clientIndex; }
105
107 unsigned int GetClientIndex() const { return m_cStructure->iClientIndex; }
108
123 void SetState(PVR_TIMER_STATE state) { m_cStructure->state = state; }
124
126 PVR_TIMER_STATE GetState() const { return m_cStructure->state; }
127
149 void SetTimerType(unsigned int timerType) { m_cStructure->iTimerType = timerType; }
150
152 unsigned int GetTimerType() const { return m_cStructure->iTimerType; }
153
156 void SetTitle(const std::string& title)
157 {
158 ReallocAndCopyString(&m_cStructure->strTitle, title.c_str());
159 }
160
162 std::string GetTitle() const { return m_cStructure->strTitle ? m_cStructure->strTitle : ""; }
163
170 void SetParentClientIndex(unsigned int parentClientIndex)
171 {
172 m_cStructure->iParentClientIndex = parentClientIndex;
173 }
174
176 unsigned int GetParentClientIndex() const { return m_cStructure->iParentClientIndex; }
177
183 void SetClientChannelUid(int clientChannelUid)
184 {
185 m_cStructure->iClientChannelUid = clientChannelUid;
186 }
187
189 int GetClientChannelUid() const { return m_cStructure->iClientChannelUid; }
190
196 void SetStartTime(time_t startTime) { m_cStructure->startTime = startTime; }
197
199 time_t GetStartTime() const { return m_cStructure->startTime; }
200
203 void SetEndTime(time_t endTime) { m_cStructure->endTime = endTime; }
204
206 time_t GetEndTime() const { return m_cStructure->endTime; }
207
212 void SetStartAnyTime(bool startAnyTime) { m_cStructure->bStartAnyTime = startAnyTime; }
213
215 bool GetStartAnyTime() const { return m_cStructure->bStartAnyTime; }
216
221 void SetEndAnyTime(bool endAnyTime) { m_cStructure->bEndAnyTime = endAnyTime; }
222
224 bool GetEndAnyTime() const { return m_cStructure->bEndAnyTime; }
225
230 void SetEPGSearchString(const std::string& epgSearchString)
231 {
232 ReallocAndCopyString(&m_cStructure->strEpgSearchString, epgSearchString.c_str());
233 }
234
236 std::string GetEPGSearchString() const
237 {
238 return m_cStructure->strEpgSearchString ? m_cStructure->strEpgSearchString : "";
239 }
240
244 void SetFullTextEpgSearch(bool fullTextEpgSearch)
245 {
246 m_cStructure->bFullTextEpgSearch = fullTextEpgSearch;
247 }
248
250 bool GetFullTextEpgSearch() const { return m_cStructure->bFullTextEpgSearch; }
251
254 void SetDirectory(const std::string& directory)
255 {
256 ReallocAndCopyString(&m_cStructure->strDirectory, directory.c_str());
257 }
258
260 std::string GetDirectory() const
261 {
262 return m_cStructure->strDirectory ? m_cStructure->strDirectory : "";
263 }
264
267 void SetSummary(const std::string& summary)
268 {
269 ReallocAndCopyString(&m_cStructure->strSummary, summary.c_str());
270 }
271
273 std::string GetSummary() const
274 {
275 return m_cStructure->strSummary ? m_cStructure->strSummary : "";
276 }
277
280 void SetPriority(int priority) { m_cStructure->iPriority = priority; }
281
283 int GetPriority() const { return m_cStructure->iPriority; }
284
290 void SetLifetime(int priority) { m_cStructure->iLifetime = priority; }
291
293 int GetLifetime() const { return m_cStructure->iLifetime; }
294
299 void SetMaxRecordings(int maxRecordings) { m_cStructure->iMaxRecordings = maxRecordings; }
300
302 int GetMaxRecordings() const { return m_cStructure->iMaxRecordings; }
303
306 void SetRecordingGroup(unsigned int recordingGroup)
307 {
308 m_cStructure->iRecordingGroup = recordingGroup;
309 }
310
312 unsigned int GetRecordingGroup() const { return m_cStructure->iRecordingGroup; }
313
316 void SetFirstDay(time_t firstDay) { m_cStructure->firstDay = firstDay; }
317
319 time_t GetFirstDay() const { return m_cStructure->firstDay; }
320
337 void SetWeekdays(unsigned int weekdays) { m_cStructure->iWeekdays = weekdays; }
338
340 unsigned int GetWeekdays() const { return m_cStructure->iWeekdays; }
341
351 void SetPreventDuplicateEpisodes(unsigned int preventDuplicateEpisodes)
352 {
353 m_cStructure->iPreventDuplicateEpisodes = preventDuplicateEpisodes;
354 }
355
357 unsigned int GetPreventDuplicateEpisodes() const
358 {
359 return m_cStructure->iPreventDuplicateEpisodes;
360 }
361
367 void SetEPGUid(unsigned int epgUid) { m_cStructure->iEpgUid = epgUid; }
368
370 unsigned int GetEPGUid() const { return m_cStructure->iEpgUid; }
371
375 void SetMarginStart(unsigned int marginStart) { m_cStructure->iMarginStart = marginStart; }
376
378 unsigned int GetMarginStart() const { return m_cStructure->iMarginStart; }
379
383 void SetMarginEnd(unsigned int marginEnd) { m_cStructure->iMarginEnd = marginEnd; }
384
386 unsigned int GetMarginEnd() const { return m_cStructure->iMarginEnd; }
387
407 void SetGenreType(int genreType) { m_cStructure->iGenreType = genreType; }
408
410 int GetGenreType() const { return m_cStructure->iGenreType; }
411
445 void SetGenreSubType(int genreSubType) { m_cStructure->iGenreSubType = genreSubType; }
446
448 int GetGenreSubType() const { return m_cStructure->iGenreSubType; }
449
455 void SetSeriesLink(const std::string& seriesLink)
456 {
457 ReallocAndCopyString(&m_cStructure->strSeriesLink, seriesLink.c_str());
458 }
459
461 std::string GetSeriesLink() const
462 {
463 return m_cStructure->strSeriesLink ? m_cStructure->strSeriesLink : "";
464 }
465
466 //----------------------------------------------------------------------------
467
476 void SetCustomProperties(const std::vector<PVRSettingKeyValuePair>& properties)
477 {
478 PVRSettingKeyValuePair::ReallocAndCopyData(&m_cStructure->customProps,
479 &m_cStructure->iCustomPropsSize, properties);
480 }
481
483 std::vector<PVRSettingKeyValuePair> GetCustomProperties() const
484 {
485 std::vector<PVRSettingKeyValuePair> ret;
486 if (m_cStructure->iCustomPropsSize)
487 {
488 ret.reserve(m_cStructure->iCustomPropsSize);
489 for (unsigned int i = 0; i < m_cStructure->iCustomPropsSize; ++i)
490 {
491 ret.emplace_back(m_cStructure->customProps[i].iKey, m_cStructure->customProps[i].eType,
492 m_cStructure->customProps[i].iValue,
493 m_cStructure->customProps[i].strValue);
494 }
495 }
496 return ret;
497 }
499
500 static void AllocResources(const PVR_TIMER* source, PVR_TIMER* target)
501 {
502 target->strTitle = AllocAndCopyString(source->strTitle);
503 target->strEpgSearchString = AllocAndCopyString(source->strEpgSearchString);
504 target->strDirectory = AllocAndCopyString(source->strDirectory);
505 target->strSummary = AllocAndCopyString(source->strSummary);
506 target->strSeriesLink = AllocAndCopyString(source->strSeriesLink);
507
508 target->customProps =
509 PVRSettingKeyValuePair::AllocAndCopyData(source->customProps, source->iCustomPropsSize);
510 target->iCustomPropsSize = source->iCustomPropsSize;
511 }
512
513 static void FreeResources(PVR_TIMER* target)
514 {
515 FreeString(target->strTitle);
516 FreeString(target->strEpgSearchString);
517 FreeString(target->strDirectory);
518 FreeString(target->strSummary);
519 FreeString(target->strSeriesLink);
520
521 PVRSettingKeyValuePair::FreeResources(target->customProps, target->iCustomPropsSize);
522 target->customProps = nullptr;
523 target->iCustomPropsSize = 0;
524 }
525
526private:
527 PVRTimer(const PVR_TIMER* timer) : DynamicCStructHdl(timer) {}
528 PVRTimer(PVR_TIMER* timer) : DynamicCStructHdl(timer) {}
529};
530
532//------------------------------------------------------------------------------
533
534//==============================================================================
544{
545public:
547 PVRTimersResultSet() = delete;
548 PVRTimersResultSet(const AddonInstance_PVR* instance, PVR_HANDLE handle)
549 : m_instance(instance), m_handle(handle)
550 {
551 }
556
560 void Add(const kodi::addon::PVRTimer& tag)
561 {
562 m_instance->toKodi->TransferTimerEntry(m_instance->toKodi->kodiInstance, m_handle, tag);
563 }
564
566
567private:
568 const AddonInstance_PVR* m_instance = nullptr;
569 const PVR_HANDLE m_handle;
570};
572//------------------------------------------------------------------------------
573
574//==============================================================================
586class PVRTimerType : public DynamicCStructHdl<PVRTimerType, PVR_TIMER_TYPE>
587{
588 friend class CInstancePVRClient;
589
590public:
593 {
594 m_cStructure->iPrioritiesDefault = -1;
595 m_cStructure->iLifetimesDefault = -1;
596 m_cStructure->iPreventDuplicateEpisodesDefault = -1;
597 m_cStructure->iRecordingGroupDefault = -1;
598 m_cStructure->iMaxRecordingsDefault = -1;
599 }
600 PVRTimerType(const PVRTimerType& type) : DynamicCStructHdl(type) {}
631
634
637 void SetId(unsigned int id) { m_cStructure->iId = id; }
638
640 unsigned int GetId() const { return m_cStructure->iId; }
641
656 void SetAttributes(uint64_t attributes) { m_cStructure->iAttributes = attributes; }
657
659 uint64_t GetAttributes() const { return m_cStructure->iAttributes; }
660
667 void SetDescription(const std::string& description)
668 {
669 ReallocAndCopyString(&m_cStructure->strDescription, description.c_str());
670 }
671
673 std::string GetDescription() const
674 {
675 return m_cStructure->strDescription ? m_cStructure->strDescription : "";
676 }
677
678 //----------------------------------------------------------------------------
679
692 void SetPriorities(const std::vector<PVRTypeIntValue>& priorities, int prioritiesDefault = -1)
693 {
694 PVRTypeIntValue::ReallocAndCopyData(&m_cStructure->priorities, &m_cStructure->iPrioritiesSize,
695 priorities);
696 if (prioritiesDefault != -1)
697 m_cStructure->iPrioritiesDefault = prioritiesDefault;
698 }
699
701 std::vector<PVRTypeIntValue> GetPriorities() const
702 {
703 std::vector<PVRTypeIntValue> ret;
704 for (unsigned int i = 0; i < m_cStructure->iPrioritiesSize; ++i)
705 ret.emplace_back(m_cStructure->priorities[i].iValue,
706 m_cStructure->priorities[i].strDescription);
707 return ret;
708 }
709
715 void SetPrioritiesDefault(int prioritiesDefault)
716 {
717 m_cStructure->iPrioritiesDefault = prioritiesDefault;
718 }
719
721 int GetPrioritiesDefault() const { return m_cStructure->iPrioritiesDefault; }
722
723 //----------------------------------------------------------------------------
724
737 void SetLifetimes(const std::vector<PVRTypeIntValue>& lifetimes, int lifetimesDefault = -1)
738 {
739 PVRTypeIntValue::ReallocAndCopyData(&m_cStructure->lifetimes, &m_cStructure->iLifetimesSize,
740 lifetimes);
741 if (lifetimesDefault != -1)
742 m_cStructure->iLifetimesDefault = lifetimesDefault;
743 }
744
746 std::vector<PVRTypeIntValue> GetLifetimes() const
747 {
748 std::vector<PVRTypeIntValue> ret;
749 for (unsigned int i = 0; i < m_cStructure->iLifetimesSize; ++i)
750 ret.emplace_back(m_cStructure->lifetimes[i].iValue,
751 m_cStructure->lifetimes[i].strDescription);
752 return ret;
753 }
754
760 void SetLifetimesDefault(int lifetimesDefault)
761 {
762 m_cStructure->iLifetimesDefault = lifetimesDefault;
763 }
764
766 int GetLifetimesDefault() const { return m_cStructure->iLifetimesDefault; }
767
768 //----------------------------------------------------------------------------
769
784 void SetPreventDuplicateEpisodes(const std::vector<PVRTypeIntValue>& preventDuplicateEpisodes,
785 int preventDuplicateEpisodesDefault = -1)
786 {
787 PVRTypeIntValue::ReallocAndCopyData(&m_cStructure->preventDuplicateEpisodes,
788 &m_cStructure->iPreventDuplicateEpisodesSize,
789 preventDuplicateEpisodes);
790 if (preventDuplicateEpisodesDefault != -1)
791 m_cStructure->iPreventDuplicateEpisodesDefault = preventDuplicateEpisodesDefault;
792 }
793
795 std::vector<PVRTypeIntValue> GetPreventDuplicateEpisodes() const
796 {
797 std::vector<PVRTypeIntValue> ret;
798 for (unsigned int i = 0; i < m_cStructure->iPreventDuplicateEpisodesSize; ++i)
799 ret.emplace_back(m_cStructure->preventDuplicateEpisodes[i].iValue,
800 m_cStructure->preventDuplicateEpisodes[i].strDescription);
801 return ret;
802 }
803
809 void SetPreventDuplicateEpisodesDefault(int preventDuplicateEpisodesDefault)
810 {
811 m_cStructure->iPreventDuplicateEpisodesDefault = preventDuplicateEpisodesDefault;
812 }
813
816 {
817 return m_cStructure->iPreventDuplicateEpisodesDefault;
818 }
819
820 //----------------------------------------------------------------------------
821
832 void SetRecordingGroups(const std::vector<PVRTypeIntValue>& recordingGroup,
833 int recordingGroupDefault = -1)
834 {
835 PVRTypeIntValue::ReallocAndCopyData(&m_cStructure->recordingGroup,
836 &m_cStructure->iRecordingGroupSize, recordingGroup);
837 if (recordingGroupDefault != -1)
838 m_cStructure->iRecordingGroupDefault = recordingGroupDefault;
839 }
840
842 std::vector<PVRTypeIntValue> GetRecordingGroups() const
843 {
844 std::vector<PVRTypeIntValue> ret;
845 for (unsigned int i = 0; i < m_cStructure->iRecordingGroupSize; ++i)
846 ret.emplace_back(m_cStructure->recordingGroup[i].iValue,
847 m_cStructure->recordingGroup[i].strDescription);
848 return ret;
849 }
850
856 void SetRecordingGroupDefault(int recordingGroupDefault)
857 {
858 m_cStructure->iRecordingGroupDefault = recordingGroupDefault;
859 }
860
862 int GetRecordingGroupDefault() const { return m_cStructure->iRecordingGroupDefault; }
863
864 //----------------------------------------------------------------------------
865
876 void SetMaxRecordings(const std::vector<PVRTypeIntValue>& maxRecordings,
877 int maxRecordingsDefault = -1)
878 {
879 PVRTypeIntValue::ReallocAndCopyData(&m_cStructure->maxRecordings,
880 &m_cStructure->iMaxRecordingsSize, maxRecordings);
881 if (maxRecordingsDefault != -1)
882 m_cStructure->iMaxRecordingsDefault = maxRecordingsDefault;
883 }
884
886 std::vector<PVRTypeIntValue> GetMaxRecordings() const
887 {
888 std::vector<PVRTypeIntValue> ret;
889 for (unsigned int i = 0; i < m_cStructure->iMaxRecordingsSize; ++i)
890 ret.emplace_back(m_cStructure->maxRecordings[i].iValue,
891 m_cStructure->maxRecordings[i].strDescription);
892 return ret;
893 }
894
899 void SetMaxRecordingsDefault(int maxRecordingsDefault)
900 {
901 m_cStructure->iMaxRecordingsDefault = maxRecordingsDefault;
902 }
903
905 int GetMaxRecordingsDefault() const { return m_cStructure->iMaxRecordingsDefault; }
906
907 //----------------------------------------------------------------------------
908
917 void SetCustomSettingDefinitions(const std::vector<PVRSettingDefinition>& defs)
918 {
919 PVRSettingDefinition::ReallocAndCopyData(&m_cStructure->customSettingDefs,
920 &m_cStructure->iCustomSettingDefsSize, defs);
921 }
922
924 std::vector<PVRSettingDefinition> GetCustomSettingDefinitions() const
925 {
926 std::vector<PVRSettingDefinition> ret;
927 if (m_cStructure->iCustomSettingDefsSize)
928 {
929 ret.reserve(m_cStructure->iCustomSettingDefsSize);
930 for (unsigned int i = 0; i < m_cStructure->iCustomSettingDefsSize; ++i)
931 {
932 const PVR_SETTING_DEFINITION* def{m_cStructure->customSettingDefs[i]};
933
935 if (def->intSettingDefinition)
936 {
937 const PVR_INT_SETTING_DEFINITION* intSettingDef{def->intSettingDefinition};
938
939 std::vector<PVRTypeIntValue> intValues;
940 if (intSettingDef->iValuesSize)
941 {
942 intValues.reserve(intSettingDef->iValuesSize);
943 for (unsigned int j = 0; j < intSettingDef->iValuesSize; ++j)
944 {
945 intValues.emplace_back(intSettingDef->values[j].iValue,
946 intSettingDef->values[j].strDescription);
947 }
948 }
949 intDef = {intValues, intSettingDef->iDefaultValue, intSettingDef->iMinValue,
950 intSettingDef->iStep, intSettingDef->iMaxValue};
951 }
952
954 if (def->stringSettingDefinition)
955 {
956 const PVR_STRING_SETTING_DEFINITION* stringSettingDef{def->stringSettingDefinition};
957
958 std::vector<PVRTypeStringValue> stringValues;
959 if (stringSettingDef->iValuesSize)
960 {
961 stringValues.reserve(stringSettingDef->iValuesSize);
962 for (unsigned int j = 0; j < stringSettingDef->iValuesSize; ++j)
963 {
964 stringValues.emplace_back(stringSettingDef->values[j].strValue,
965 stringSettingDef->values[j].strDescription);
966 }
967 }
968 stringDef = {stringValues, stringSettingDef->strDefaultValue,
969 stringSettingDef->bAllowEmptyValue};
970 }
971
972 ret.emplace_back(def->iId, def->strName, def->eType, def->iReadonlyConditions, intDef,
973 stringDef);
974 }
975 }
976 return ret;
977 }
979
980 static void AllocResources(const PVR_TIMER_TYPE* source, PVR_TIMER_TYPE* target)
981 {
982 target->strDescription = AllocAndCopyString(source->strDescription);
983
984 if (target->iPrioritiesSize)
985 {
986 target->priorities =
987 PVRTypeIntValue::AllocAndCopyData(source->priorities, source->iPrioritiesSize);
988 }
989
990 if (target->iLifetimesSize)
991 {
992 target->lifetimes =
993 PVRTypeIntValue::AllocAndCopyData(source->lifetimes, source->iLifetimesSize);
994 }
995
996 if (target->iPreventDuplicateEpisodesSize)
997 {
998 target->preventDuplicateEpisodes = PVRTypeIntValue::AllocAndCopyData(
999 source->preventDuplicateEpisodes, source->iPreventDuplicateEpisodesSize);
1000 }
1001
1002 if (target->iRecordingGroupSize)
1003 {
1004 target->recordingGroup =
1005 PVRTypeIntValue::AllocAndCopyData(source->recordingGroup, source->iRecordingGroupSize);
1006 }
1007
1008 if (target->iMaxRecordingsSize)
1009 {
1010 target->maxRecordings =
1011 PVRTypeIntValue::AllocAndCopyData(source->maxRecordings, source->iMaxRecordingsSize);
1012 }
1013
1014 if (target->iCustomSettingDefsSize)
1015 {
1016 target->customSettingDefs = PVRSettingDefinition::AllocAndCopyData(
1017 source->customSettingDefs, source->iCustomSettingDefsSize);
1018 }
1019 }
1020
1021 static void FreeResources(PVR_TIMER_TYPE* target)
1022 {
1023 FreeString(target->strDescription);
1024 target->strDescription = nullptr;
1025
1026 PVRTypeIntValue::FreeResources(target->priorities, target->iPrioritiesSize);
1027 target->priorities = nullptr;
1028 target->iPrioritiesSize = 0;
1029
1030 PVRTypeIntValue::FreeResources(target->lifetimes, target->iLifetimesSize);
1031 target->lifetimes = nullptr;
1032 target->iLifetimesSize = 0;
1033
1034 PVRTypeIntValue::FreeResources(target->preventDuplicateEpisodes,
1035 target->iPreventDuplicateEpisodesSize);
1036 target->preventDuplicateEpisodes = nullptr;
1037 target->iPreventDuplicateEpisodesSize = 0;
1038
1039 PVRTypeIntValue::FreeResources(target->recordingGroup, target->iRecordingGroupSize);
1040 target->recordingGroup = nullptr;
1041 target->iRecordingGroupSize = 0;
1042
1043 PVRTypeIntValue::FreeResources(target->maxRecordings, target->iMaxRecordingsSize);
1044 target->maxRecordings = nullptr;
1045 target->iMaxRecordingsSize = 0;
1046
1047 PVRSettingDefinition::FreeResources(target->customSettingDefs, target->iCustomSettingDefsSize);
1048 target->customSettingDefs = nullptr;
1049 target->iCustomSettingDefsSize = 0;
1050 }
1051
1052private:
1053 PVRTimerType(const PVR_TIMER_TYPE* type) : DynamicCStructHdl(type) {}
1054 PVRTimerType(PVR_TIMER_TYPE* type) : DynamicCStructHdl(type) {}
1055};
1057//------------------------------------------------------------------------------
1058
1059} /* namespace addon */
1060} /* namespace kodi */
1061
1062#endif /* __cplusplus */
Definition AddonBase.h:288
Definition General.h:289
Definition Timers.h:39
Definition Timers.h:587
Definition Timers.h:544
#define PVR_TIMER_TYPE_NONE
Numeric PVR timer type definitions (kodi::addon::PVRTimer::SetTimerType() values).
Definition pvr_timers.h:39
#define PVR_TIMER_VALUE_NOT_AVAILABLE
Value where set in background to inform that related part not used.
Definition pvr_timers.h:79
PVR_TIMER_STATE
Definition pvr_timers.h:292
@ PVR_TIMER_STATE_NEW
0 : The timer was just created on the backend and is not yet active.
Definition pvr_timers.h:296
@ PVR_WEEKDAY_NONE
0000 0000 : Nothing selected.
Definition pvr_timers.h:252
time_t GetFirstDay() const
To get with SetFirstDay changed values.
Definition Timers.h:319
void SetGenreSubType(int genreSubType)
optional Genre sub type.
Definition Timers.h:445
unsigned int GetMarginStart() const
To get with SetMarginStart changed values.
Definition Timers.h:378
void SetClientIndex(unsigned int clientIndex)
required The index of this timer given by the client.
Definition Timers.h:104
void SetPriority(int priority)
optional The priority of this timer.
Definition Timers.h:280
std::vector< PVRSettingKeyValuePair > GetCustomProperties() const
To get with SetCustomProperties changed values.
Definition Timers.h:483
void SetStartTime(time_t startTime)
optional Start time of the recording in UTC.
Definition Timers.h:196
unsigned int GetParentClientIndex() const
To get with SetParentClientIndex changed values.
Definition Timers.h:176
unsigned int GetClientIndex() const
To get with SetClientIndex changed values.
Definition Timers.h:107
unsigned int GetEPGUid() const
To get with SetEPGUid changed values.
Definition Timers.h:370
void SetFirstDay(time_t firstDay)
optional The first day this timer is active, for repeating timers.
Definition Timers.h:316
unsigned int GetWeekdays() const
To get with SetFirstDay changed values.
Definition Timers.h:340
void SetPreventDuplicateEpisodes(unsigned int preventDuplicateEpisodes)
optional Prevent duplicate episodes.
Definition Timers.h:351
unsigned int GetPreventDuplicateEpisodes() const
To get with SetPreventDuplicateEpisodes changed values.
Definition Timers.h:357
void SetParentClientIndex(unsigned int parentClientIndex)
optional For timers scheduled by a repeating timer.
Definition Timers.h:170
unsigned int GetTimerType() const
To get with SetTimerType changed values.
Definition Timers.h:152
PVR_TIMER_STATE GetState() const
To get with SetState changed values.
Definition Timers.h:126
void SetWeekdays(unsigned int weekdays)
optional Week days, for repeating timers (see PVR_WEEKDAY_* constant values)
Definition Timers.h:337
void SetTitle(const std::string &title)
required A title for this timer.
Definition Timers.h:156
void SetEndAnyTime(bool endAnyTime)
optional For EPG based (not Manual) timers indicates endTime does not apply.
Definition Timers.h:221
void SetClientChannelUid(int clientChannelUid)
optional Unique identifier of the channel to record on.
Definition Timers.h:183
void SetLifetime(int priority)
optional Lifetime of recordings created by this timer.
Definition Timers.h:290
void SetSeriesLink(const std::string &seriesLink)
optional Series link for this timer.
Definition Timers.h:455
time_t GetEndTime() const
To get with SetEndTime changed values.
Definition Timers.h:206
void SetEPGUid(unsigned int epgUid)
optional EPG event id associated with this timer. Event ids must be unique for a channel.
Definition Timers.h:367
void SetMaxRecordings(int maxRecordings)
optional Maximum number of recordings this timer shall create.
Definition Timers.h:299
void SetCustomProperties(const std::vector< PVRSettingKeyValuePair > &properties)
optional Array containing the custom properties.
Definition Timers.h:476
std::string GetDirectory() const
To get with SetDirectory changed values.
Definition Timers.h:260
bool GetStartAnyTime() const
To get with SetStartAnyTime changed values.
Definition Timers.h:215
void SetState(PVR_TIMER_STATE state)
required The state of this timer.
Definition Timers.h:123
unsigned int GetMarginEnd() const
To get with SetMarginEnd changed values.
Definition Timers.h:386
void SetTimerType(unsigned int timerType)
required The type of this timer.
Definition Timers.h:149
int GetMaxRecordings() const
To get with SetMaxRecordings changed values.
Definition Timers.h:302
std::string GetEPGSearchString() const
To get with SetEPGSearchString changed values.
Definition Timers.h:236
void SetSummary(const std::string &summary)
optional The summary for this timer.
Definition Timers.h:267
int GetPriority() const
To get with SetPriority changed values.
Definition Timers.h:283
void SetStartAnyTime(bool startAnyTime)
optional For EPG based (not Manual) timers indicates startTime does not apply.
Definition Timers.h:212
std::string GetTitle() const
To get with SetTitle changed values.
Definition Timers.h:162
void SetDirectory(const std::string &directory)
optional The (relative) directory where the recording will be stored in.
Definition Timers.h:254
unsigned int GetRecordingGroup() const
To get with SetRecordingGroup changed values.
Definition Timers.h:312
int GetClientChannelUid() const
To get with SetClientChannelUid changed values.
Definition Timers.h:189
int GetLifetime() const
To get with SetLifetime changed values.
Definition Timers.h:293
time_t GetStartTime() const
To get with SetStartTime changed values.
Definition Timers.h:199
std::string GetSummary() const
To get with SetDirectory changed values.
Definition Timers.h:273
void SetFullTextEpgSearch(bool fullTextEpgSearch)
optional Indicates, whether SetEPGSearchString() is to match against the epg episode title only or al...
Definition Timers.h:244
void SetEPGSearchString(const std::string &epgSearchString)
optional A string used to search epg data for repeating epg-based timers.
Definition Timers.h:230
void SetRecordingGroup(unsigned int recordingGroup)
optional Integer ref to addon/backend defined list of recording groups.
Definition Timers.h:306
void SetGenreType(int genreType)
optional Genre type.
Definition Timers.h:407
bool GetEndAnyTime() const
To get with SetEndAnyTime changed values.
Definition Timers.h:224
int GetGenreType() const
To get with SetGenreType changed values.
Definition Timers.h:410
int GetGenreSubType() const
To get with SetGenreType changed values.
Definition Timers.h:448
bool GetFullTextEpgSearch() const
To get with SetFullTextEpgSearch changed values.
Definition Timers.h:250
void SetMarginEnd(unsigned int marginEnd)
optional If set, the backend ends the recording selected minutes after SetEndTime.
Definition Timers.h:383
void SetEndTime(time_t endTime)
optional End time of the recording in UTC.
Definition Timers.h:203
std::string GetSeriesLink() const
To get with SetSeriesLink changed values.
Definition Timers.h:461
void SetMarginStart(unsigned int marginStart)
optional If set, the backend starts the recording selected minutes before SetStartTime.
Definition Timers.h:375
std::vector< PVRTypeIntValue > GetPriorities() const
To get with SetPriorities changed values.
Definition Timers.h:701
int GetLifetimesDefault() const
To get with SetLifetimesDefault changed values.
Definition Timers.h:766
std::string GetDescription() const
To get with SetDescription changed values.
Definition Timers.h:673
void SetLifetimes(const std::vector< PVRTypeIntValue > &lifetimes, int lifetimesDefault=-1)
optional Lifetime value definitions.
Definition Timers.h:737
void SetMaxRecordings(const std::vector< PVRTypeIntValue > &maxRecordings, int maxRecordingsDefault=-1)
optional Array containing the possible values of PVRTimer::SetMaxRecordings().
Definition Timers.h:876
void SetDescription(const std::string &description)
optional A short localized string describing the purpose of the type. (e.g. "Any time at this channel...
Definition Timers.h:667
unsigned int GetId() const
To get with SetAttributes changed values.
Definition Timers.h:640
int GetPrioritiesDefault() const
To get with SetPrioritiesDefault changed values.
Definition Timers.h:721
void SetPreventDuplicateEpisodes(const std::vector< PVRTypeIntValue > &preventDuplicateEpisodes, int preventDuplicateEpisodesDefault=-1)
optional Prevent duplicate episodes value definitions.
Definition Timers.h:784
std::vector< PVRTypeIntValue > GetRecordingGroups() const
To get with SetRecordingGroups changed values.
Definition Timers.h:842
std::vector< PVRTypeIntValue > GetPreventDuplicateEpisodes() const
To get with SetPreventDuplicateEpisodes changed values.
Definition Timers.h:795
int GetRecordingGroupDefault() const
To get with SetRecordingGroupDefault changed values.
Definition Timers.h:862
void SetCustomSettingDefinitions(const std::vector< PVRSettingDefinition > &defs)
optional Array containing the possible custom integer setting definitions.
Definition Timers.h:917
void SetPrioritiesDefault(int prioritiesDefault)
optional The default value for PVRTimer::SetPriority().
Definition Timers.h:715
int GetPreventDuplicateEpisodesDefault() const
To get with SetPreventDuplicateEpisodesDefault changed values.
Definition Timers.h:815
void SetLifetimesDefault(int lifetimesDefault)
optional The default value for SetLifetimes().
Definition Timers.h:760
std::vector< PVRSettingDefinition > GetCustomSettingDefinitions() const
To get with SetCustomSettingDefinitions changed values.
Definition Timers.h:924
void SetRecordingGroups(const std::vector< PVRTypeIntValue > &recordingGroup, int recordingGroupDefault=-1)
optional Array containing the possible values of PVRTimer::SetRecordingGroup()
Definition Timers.h:832
int GetMaxRecordingsDefault() const
To get with SetMaxRecordingsDefault changed values.
Definition Timers.h:905
void SetPriorities(const std::vector< PVRTypeIntValue > &priorities, int prioritiesDefault=-1)
optional Priority value definitions.
Definition Timers.h:692
void SetId(unsigned int id)
required This type's identifier. Ids must be > PVR_TIMER_TYPE_NONE.
Definition Timers.h:637
void SetMaxRecordingsDefault(int maxRecordingsDefault)
optional The default value for SetMaxRecordings().
Definition Timers.h:899
void SetRecordingGroupDefault(int recordingGroupDefault)
optional The default value for PVRTimer::SetRecordingGroup().
Definition Timers.h:856
void SetPreventDuplicateEpisodesDefault(int preventDuplicateEpisodesDefault)
optional The default value for PVRTimer::SetPreventDuplicateEpisodes().
Definition Timers.h:809
void SetAttributes(uint64_t attributes)
required Defines the attributes for this type (PVR_TIMER_TYPE_* constants).
Definition Timers.h:656
std::vector< PVRTypeIntValue > GetMaxRecordings() const
To get with SetMaxRecordings changed values.
Definition Timers.h:886
uint64_t GetAttributes() const
To get with SetAttributes changed values.
Definition Timers.h:659
std::vector< PVRTypeIntValue > GetLifetimes() const
To get with SetLifetimes changed values.
Definition Timers.h:746
void Add(const kodi::addon::PVRTimer &tag)
To add and give content from addon to Kodi on related call.
Definition Timers.h:560
Definition pvr.h:362
"C" Representation of an integer setting definition.
Definition pvr_general.h:388
"C" Representation of a setting definition.
Definition pvr_general.h:422
"C" Representation of a string setting definition.
Definition pvr_general.h:406
"C" PVR add-on timer type.
Definition pvr_timers.h:379
"C" PVR add-on timer event.
Definition pvr_timers.h:338