MythTV  master
v2serviceUtil.h
Go to the documentation of this file.
1 #ifndef V2SERVICEUTIL_H
2 #define V2SERVICEUTIL_H
3 
4 // Qt
5 #include <QDir>
6 
7 // MythTV
10 #include "libmythtv/channelgroup.h"
11 #include "libmythtv/channelinfo.h"
12 #include "libmythtv/inputinfo.h"
13 #include "libmythtv/programdata.h"
16 
17 // MythBackend
18 #include "v2channelGroup.h"
19 #include "v2cutList.h"
20 #include "v2input.h"
22 #include "v2programList.h"
23 #include "v2recRule.h"
24 #include "v2videoMetadataInfo.h"
25 #include "v2captureCardList.h"
26 
27 template <typename T>
28 static inline void
29 ADD_SQLv2(QString& settings_var, MSqlBindings& bindvar,
30  const QString& col, const QString& api_param, const T& val)
31 {
32  settings_var += QString("%1=:%2, ").arg(col, api_param);
33  bindvar[QString(":").append(api_param)] = val;
34 }
35 
36 const QStringList KnownServicesV2 = { "Capture", "Channel", "Content", \
37  "Dvr", "Guide", "Music", \
38  "Myth", "Video", "Config" };
40  V2VideoMetadataInfo *pVideoMetadataInfo,
42  bool bDetails);
43 
44 void V2FillMusicMetadataInfo (V2MusicMetadataInfo *pVideoMetadataInfo,
45  MusicMetadata *pMetadata, bool bDetails);
46 
47 void V2FillGenreList( V2GenreList *pGenreList, int videoID);
48 
49 void V2FillProgramInfo( V2Program *pProgram,
50  ProgramInfo *pInfo,
51  bool bIncChannel = true,
52  bool bDetails = true,
53  bool bIncCast = true,
54  bool bIncArtWork = true,
55  bool bIncRecording = true);
56 
57 bool V2FillChannelInfo( V2ChannelInfo *pChannel,
58  uint nChanID,
59  bool bDetails = true );
60 
61 bool V2FillChannelInfo( V2ChannelInfo *pChannel,
62  const ChannelInfo &channelInfo,
63  bool bDetails = true );
64 
65 void V2FillChannelGroup( V2ChannelGroup *pGroup, const ChannelGroupItem& pGroupItem);
66 
67 void V2FillRecRuleInfo( V2RecRule *pRecRule,
68  RecordingRule *pRule );
69 
70 void V2FillCastMemberList( V2CastMemberList *pCastMemberList,
71  ProgramInfo *pInfo);
72 
73 void V2FillArtworkInfoList( V2ArtworkInfoList *pArtworkInfoList,
74  const QString &sInetref,
75  uint nSeason );
76 
77 DBCredits * V2jsonCastToCredits(const QJsonObject &cast);
78 
79 void V2FillCutList( V2CutList* pCutList, ProgramInfo* rInfo, int marktype);
80 
81 void V2FillCommBreak( V2CutList* pCutList, ProgramInfo* rInfo, int marktype);
82 
83 void V2FillSeek(V2CutList* pCutList, RecordingInfo* rInfo, MarkTypes marktype);
84 
85 void V2FillInputInfo( V2Input *input, const InputInfo& inputInfo);
86 
87 int V2CreateRecordingGroup(const QString& groupName);
88 
89 void FillEncoderList(QVariantList& list, QObject* parent);
90 
91 int FillUpcomingList(QVariantList& list, QObject* parent,
92  int& nStartIndex,
93  int& nCount,
94  bool bShowAll,
95  int nRecordId,
96  int nRecStatus,
97  const QString &Sort = QString());
98 
99 void FillFrontendList(QVariantList &list, QObject* parent, bool OnLine);
100 
101 V2CaptureDeviceList* getV4l2List ( const QRegularExpression &driver, const QString & cardType );
102 
103 uint fillSelectionsFromDir(const QDir& dir,
104  uint minor_min, uint minor_max,
105  const QString& card, const QRegularExpression& driver,
106  bool allow_duplicates, V2CaptureDeviceList *pList,
107  const QString & cardType);
108 
109 V2CaptureDeviceList* getFirewireList (const QString & cardType);
110 
111 #endif //V2SERVICEUTIL_H
ChannelInfo
Definition: channelinfo.h:31
MSqlBindings
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:100
V2FillVideoMetadataInfo
void V2FillVideoMetadataInfo(V2VideoMetadataInfo *pVideoMetadataInfo, const VideoMetadataListManager::VideoMetadataPtr &pMetadata, bool bDetails)
Definition: v2serviceUtil.cpp:386
FillEncoderList
void FillEncoderList(QVariantList &list, QObject *parent)
Definition: v2serviceUtil.cpp:708
V2FillChannelInfo
bool V2FillChannelInfo(V2ChannelInfo *pChannel, uint nChanID, bool bDetails=true)
Definition: v2serviceUtil.cpp:163
V2ArtworkInfoList
Definition: v2artworkInfoList.h:22
ADD_SQLv2
static void ADD_SQLv2(QString &settings_var, MSqlBindings &bindvar, const QString &col, const QString &api_param, const T &val)
Definition: v2serviceUtil.h:29
V2FillProgramInfo
void V2FillProgramInfo(V2Program *pProgram, ProgramInfo *pInfo, bool bIncChannel=true, bool bDetails=true, bool bIncCast=true, bool bIncArtWork=true, bool bIncRecording=true)
Definition: v2serviceUtil.cpp:40
simple_ref_ptr
Definition: quicksp.h:24
V2FillChannelGroup
void V2FillChannelGroup(V2ChannelGroup *pGroup, const ChannelGroupItem &pGroupItem)
Definition: v2serviceUtil.cpp:247
v2programList.h
ChannelGroupItem
Definition: channelgroup.h:15
V2FillInputInfo
void V2FillInputInfo(V2Input *input, const InputInfo &inputInfo)
Definition: v2serviceUtil.cpp:513
RecordingInfo
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:35
programdata.h
V2ChannelGroup
Definition: v2channelGroup.h:19
RecordingRule
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:28
fillSelectionsFromDir
uint fillSelectionsFromDir(const QDir &dir, uint minor_min, uint minor_max, const QString &card, const QRegularExpression &driver, bool allow_duplicates, V2CaptureDeviceList *pList, const QString &cardType)
Definition: v2serviceUtil.cpp:973
MusicMetadata
Definition: musicmetadata.h:80
V2CaptureDeviceList
Definition: v2captureCardList.h:97
FillFrontendList
void FillFrontendList(QVariantList &list, QObject *parent, bool OnLine)
Definition: v2serviceUtil.cpp:880
V2FillCutList
void V2FillCutList(V2CutList *pCutList, ProgramInfo *rInfo, int marktype)
Definition: v2serviceUtil.cpp:602
DBCredits
std::vector< DBPerson > DBCredits
Definition: programdata.h:73
v2cutList.h
getV4l2List
V2CaptureDeviceList * getV4l2List(const QRegularExpression &driver, const QString &cardType)
Definition: v2serviceUtil.cpp:942
v2recRule.h
V2FillArtworkInfoList
void V2FillArtworkInfoList(V2ArtworkInfoList *pArtworkInfoList, const QString &sInetref, uint nSeason)
Definition: v2serviceUtil.cpp:319
FillUpcomingList
int FillUpcomingList(QVariantList &list, QObject *parent, int &nStartIndex, int &nCount, bool bShowAll, int nRecordId, int nRecStatus, const QString &Sort=QString())
Definition: v2serviceUtil.cpp:771
v2captureCardList.h
V2FillMusicMetadataInfo
void V2FillMusicMetadataInfo(V2MusicMetadataInfo *pVideoMetadataInfo, MusicMetadata *pMetadata, bool bDetails)
Definition: v2serviceUtil.cpp:488
getFirewireList
V2CaptureDeviceList * getFirewireList(const QString &cardType)
Definition: v2serviceUtil.cpp:1044
V2jsonCastToCredits
DBCredits * V2jsonCastToCredits(const QJsonObject &cast)
Definition: v2serviceUtil.cpp:922
KnownServicesV2
const QStringList KnownServicesV2
Definition: v2serviceUtil.h:36
V2CutList
Definition: v2cutList.h:21
V2FillCastMemberList
void V2FillCastMemberList(V2CastMemberList *pCastMemberList, ProgramInfo *pInfo)
Definition: v2serviceUtil.cpp:528
uint
unsigned int uint
Definition: compat.h:81
videometadatalistmanager.h
channelinfo.h
V2MusicMetadataInfo
Definition: v2musicMetadataInfo.h:22
v2musicMetadataInfoList.h
recordinginfo.h
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
channelgroup.h
V2FillSeek
void V2FillSeek(V2CutList *pCutList, RecordingInfo *rInfo, MarkTypes marktype)
Definition: v2serviceUtil.cpp:690
MarkTypes
MarkTypes
Definition: programtypes.h:47
v2input.h
V2FillCommBreak
void V2FillCommBreak(V2CutList *pCutList, ProgramInfo *rInfo, int marktype)
Definition: v2serviceUtil.cpp:644
V2Program
Definition: v2programAndChannel.h:121
V2FillGenreList
void V2FillGenreList(V2GenreList *pGenreList, int videoID)
Definition: v2serviceUtil.cpp:362
inputinfo.h
InputInfo
Definition: inputinfo.h:14
V2CastMemberList
Definition: v2castMemberList.h:13
v2channelGroup.h
V2GenreList
Definition: v2genreList.h:22
recordingrule.h
V2CreateRecordingGroup
int V2CreateRecordingGroup(const QString &groupName)
Definition: v2serviceUtil.cpp:902
V2FillRecRuleInfo
void V2FillRecRuleInfo(V2RecRule *pRecRule, RecordingRule *pRule)
Definition: v2serviceUtil.cpp:261
V2Input
Definition: v2input.h:20
musicmetadata.h
V2ChannelInfo
Definition: v2programAndChannel.h:27
V2VideoMetadataInfo
Definition: v2videoMetadataInfo.h:9
V2RecRule
Definition: v2recRule.h:12
v2videoMetadataInfo.h