MythTV  master
recordingtypes.h
Go to the documentation of this file.
1 #ifndef RECORDINGTYPES_H_
2 #define RECORDINGTYPES_H_
3 
5 //
6 // WARNING
7 //
8 // The enums in this header are used in libmythservicecontracts,
9 // and for database values: hence when removing something from
10 // these enums leave a gap, and when adding a new value give it
11 // a explicit integer value.
12 //
14 
15 #include <QString>
16 #include <QVariant>
17 
18 #include "mythbaseexp.h"
19 
20 enum RecordingType : std::uint8_t
21 {
25  //kChannelRecord = 3, (Obsolete)
31  //kFindDailyRecord = 9, (Obsolete)
32  //kFindWeeklyRecord = 10, (Obsolete)
34 }; // note stored in uint8_t in ProgramInfo
35 MBASE_PUBLIC QString toString(RecordingType rectype);
37 MBASE_PUBLIC QString toRawString(RecordingType rectype);
38 MBASE_PUBLIC QChar toQChar( RecordingType rectype);
40 static inline QVariant toVariant(RecordingType rectype)
41  {return QVariant::fromValue(static_cast<int>(rectype)); }
42 
44 
45 enum RecordingDupInType : std::uint8_t
46 {
47  kDupsUnset = 0x00,
50  kDupsInAll = 0x0F,
51  kDupsNewEpi = 0x10
52 }; // note stored in uint8_t in ProgramInfo
58 MBASE_PUBLIC RecordingDupInType dupInFromStringAndBool(const QString& type, bool newEpisodesOnly);
59 static inline QVariant toVariant(RecordingDupInType recdupin)
60  {return QVariant::fromValue(static_cast<int>(recdupin)); }
61 
62 enum RecordingDupMethodType : std::uint8_t
63 {
65  kDupCheckNone = 0x01,
66  kDupCheckSub = 0x02,
67  kDupCheckDesc = 0x04,
70 }; // note stored in uint8_t in ProgramInfo
75 static inline QVariant toVariant(RecordingDupMethodType recdupmeth)
76  {return QVariant::fromValue(static_cast<int>(recdupmeth)); }
77 
78 enum RecSearchType : std::uint8_t
79 {
80  kNoSearch = 0,
86 };
87 MBASE_PUBLIC QString toString(RecSearchType rectype);
88 MBASE_PUBLIC QString toRawString(RecSearchType rectype);
90 static inline QVariant toVariant(RecSearchType recsearch)
91  {return QVariant::fromValue(static_cast<int>(recsearch)); }
92 
93 enum class AutoExtendType : uint8_t
94 {
95  None = 0,
96  ESPN,
97  MLB,
98  Last
99 };
100 MBASE_PUBLIC QString toString(AutoExtendType extType);
101 MBASE_PUBLIC QString toDescription(AutoExtendType extType);
104 static inline QVariant toVariant(AutoExtendType extType)
105  {return QVariant::fromValue(static_cast<int>(extType)); }
106 
107 #endif
108 
kDupsNewEpi
@ kDupsNewEpi
Definition: recordingtypes.h:51
kKeywordSearch
@ kKeywordSearch
Definition: recordingtypes.h:83
kDupsUnset
@ kDupsUnset
Definition: recordingtypes.h:47
kWeeklyRecord
@ kWeeklyRecord
Definition: recordingtypes.h:27
dupInFromString
MBASE_PUBLIC RecordingDupInType dupInFromString(const QString &type)
Definition: recordingtypes.cpp:216
kDupsInAll
@ kDupsInAll
Definition: recordingtypes.h:50
newEpifromDupIn
MBASE_PUBLIC bool newEpifromDupIn(RecordingDupInType recdupin)
Definition: recordingtypes.cpp:211
mythbaseexp.h
kTitleSearch
@ kTitleSearch
Definition: recordingtypes.h:82
recTypeFromString
MBASE_PUBLIC RecordingType recTypeFromString(const QString &type)
Definition: recordingtypes.cpp:101
kNotRecording
@ kNotRecording
Definition: recordingtypes.h:22
RecSearchType
RecSearchType
Definition: recordingtypes.h:78
kSingleRecord
@ kSingleRecord
Definition: recordingtypes.h:23
kPeopleSearch
@ kPeopleSearch
Definition: recordingtypes.h:84
AutoExtendType
AutoExtendType
Definition: recordingtypes.h:93
RecTypePrecedence
MBASE_PUBLIC int RecTypePrecedence(RecordingType rectype)
Converts a RecordingType to a simple integer so it's specificity can be compared to another.
Definition: recordingtypes.cpp:7
AutoExtendType::None
@ None
kDupCheckDesc
@ kDupCheckDesc
Definition: recordingtypes.h:67
kDontRecord
@ kDontRecord
Definition: recordingtypes.h:30
kDupCheckNone
@ kDupCheckNone
Definition: recordingtypes.h:65
toRawString
MBASE_PUBLIC QString toRawString(RecordingType rectype)
Converts "rectype" into an untranslated string.
Definition: recordingtypes.cpp:76
MBASE_PUBLIC
#define MBASE_PUBLIC
Definition: mythbaseexp.h:15
toString
MBASE_PUBLIC QString toString(RecordingType rectype)
Converts "rectype" into a human readable string.
Definition: recordingtypes.cpp:25
kOneRecord
@ kOneRecord
Definition: recordingtypes.h:28
AutoExtendType::Last
@ Last
kDupsInOldRecorded
@ kDupsInOldRecorded
Definition: recordingtypes.h:49
toQChar
MBASE_PUBLIC QChar toQChar(RecordingType rectype)
Converts "rectype" into a human readable character.
Definition: recordingtypes.cpp:126
kDupCheckSub
@ kDupCheckSub
Definition: recordingtypes.h:66
kNoSearch
@ kNoSearch
Definition: recordingtypes.h:80
kManualSearch
@ kManualSearch
Definition: recordingtypes.h:85
kDupCheckSubThenDesc
@ kDupCheckSubThenDesc
Definition: recordingtypes.h:69
toVariant
static QVariant toVariant(RecordingType rectype)
Definition: recordingtypes.h:40
kOverrideRecord
@ kOverrideRecord
Definition: recordingtypes.h:29
kDupCheckUnset
@ kDupCheckUnset
Definition: recordingtypes.h:64
kDupCheckSubDesc
@ kDupCheckSubDesc
Definition: recordingtypes.h:68
kDailyRecord
@ kDailyRecord
Definition: recordingtypes.h:24
autoExtendTypeFromString
MBASE_PUBLIC AutoExtendType autoExtendTypeFromString(const QString &type)
Definition: recordingtypes.cpp:383
kDupsInRecorded
@ kDupsInRecorded
Definition: recordingtypes.h:48
AutoExtendType::MLB
@ MLB
AutoExtendType::ESPN
@ ESPN
kTemplateRecord
@ kTemplateRecord
Definition: recordingtypes.h:33
dupInFromStringAndBool
MBASE_PUBLIC RecordingDupInType dupInFromStringAndBool(const QString &type, bool newEpisodesOnly)
Definition: recordingtypes.cpp:229
kPowerSearch
@ kPowerSearch
Definition: recordingtypes.h:81
RecordingDupMethodType
RecordingDupMethodType
Definition: recordingtypes.h:62
RecordingType
RecordingType
Definition: recordingtypes.h:20
kAllRecord
@ kAllRecord
Definition: recordingtypes.h:26
toDescription
MBASE_PUBLIC QString toDescription(RecordingType rectype)
Converts "rectype" into a human readable description.
Definition: recordingtypes.cpp:50
dupMethodFromString
MBASE_PUBLIC RecordingDupMethodType dupMethodFromString(const QString &type)
Definition: recordingtypes.cpp:293
searchTypeFromString
MBASE_PUBLIC RecSearchType searchTypeFromString(const QString &type)
Definition: recordingtypes.cpp:329
autoExtendTypeFromInt
MBASE_PUBLIC AutoExtendType autoExtendTypeFromInt(uint8_t type)
Definition: recordingtypes.cpp:376
RecordingDupInType
RecordingDupInType
Definition: recordingtypes.h:45