MythTV  master
serviceUtil.h
Go to the documentation of this file.
1 // Program Name: serviceUtil.h
3 // Created : Mar. 7, 2011
4 //
5 // Copyright (c) 2011 David Blain <dblain@mythtv.org>
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //
25 
26 #ifndef SERVICEUTIL_H
27 #define SERVICEUTIL_H
28 
30 #include "datacontracts/recRule.h"
35 #include "datacontracts/input.h"
37 #include "datacontracts/cutList.h"
39 
40 #include "programinfo.h"
41 #include "programdata.h"
42 #include "recordingrule.h"
44 #include "channelgroup.h"
45 #include "inputinfo.h"
46 #include "channelinfo.h"
47 #include "recordinginfo.h"
48 #include "musicmetadata.h"
49 
50 #define ADD_SQL(settings_var, bindvar, col, api_param, val) { \
51  (settings_var) += QString("%1=:%2, ").arg(col, api_param); \
52  (bindvar)[QString(":").append(api_param)] = val; \
53  }
54 
55 #define HAS_PARAM(p) m_parsedParams.contains(p)
56 
57 const QStringList KnownServices = { "Capture", "Channel", "Content", \
58  "Dvr", "Guide", "Music", \
59  "Myth", "Video" };
60 
61 void FillProgramInfo( DTC::Program *pProgram,
62  ProgramInfo *pInfo,
63  bool bIncChannel = true,
64  bool bDetails = true,
65  bool bIncCast = true);
66 
67 bool FillChannelInfo( DTC::ChannelInfo *pChannel,
68  uint nChanID,
69  bool bDetails = true );
70 
71 bool FillChannelInfo( DTC::ChannelInfo *pChannel,
72  const ChannelInfo &channelInfo,
73  bool bDetails = true );
74 
75 void FillChannelGroup( DTC::ChannelGroup *pGroup, const ChannelGroupItem& pGroupItem);
76 
77 void FillRecRuleInfo( DTC::RecRule *pRecRule,
78  RecordingRule *pRule );
79 
80 void FillArtworkInfoList( DTC::ArtworkInfoList *pArtworkInfoList,
81  const QString &sInetref,
82  uint nSeason );
83 
84 void FillGenreList( DTC::GenreList *pGenreList, int videoID);
85 
87  DTC::VideoMetadataInfo *pVideoMetadataInfo,
89  bool bDetails);
90 
91 void FillMusicMetadataInfo (DTC::MusicMetadataInfo *pVideoMetadataInfo,
92  MusicMetadata *pMetadata, bool bDetails);
93 
94 void FillInputInfo( DTC::Input *input, const InputInfo& inputInfo);
95 
96 void FillCastMemberList( DTC::CastMemberList *pCastMemberList,
97  ProgramInfo *pInfo);
98 
99 void FillCutList( DTC::CutList* pCutList, RecordingInfo* rInfo, int marktype);
100 
101 void FillCommBreak( DTC::CutList* pCutList, RecordingInfo* rInfo, int marktype);
102 
103 void FillSeek(DTC::CutList* pCutList, RecordingInfo* rInfo, MarkTypes marktype);
104 
105 int CreateRecordingGroup(const QString& groupName);
106 
107 DBCredits * jsonCastToCredits(const QJsonObject &cast);
108 
109 #endif // SERVICEUTIL_H
ChannelInfo
Definition: channelinfo.h:31
KnownServices
const QStringList KnownServices
Definition: serviceUtil.h:57
FillCutList
void FillCutList(DTC::CutList *pCutList, RecordingInfo *rInfo, int marktype)
Definition: serviceUtil.cpp:635
DTC::Program
Definition: programAndChannel.h:145
FillChannelGroup
void FillChannelGroup(DTC::ChannelGroup *pGroup, const ChannelGroupItem &pGroupItem)
Definition: serviceUtil.cpp:258
simple_ref_ptr
Definition: quicksp.h:24
ChannelGroupItem
Definition: channelgroup.h:15
RecordingInfo
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:35
programdata.h
DTC::GenreList
Definition: genreList.h:25
FillInputInfo
void FillInputInfo(DTC::Input *input, const InputInfo &inputInfo)
Definition: serviceUtil.cpp:539
RecordingRule
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:32
FillSeek
void FillSeek(DTC::CutList *pCutList, RecordingInfo *rInfo, MarkTypes marktype)
Definition: serviceUtil.cpp:727
FillMusicMetadataInfo
void FillMusicMetadataInfo(DTC::MusicMetadataInfo *pVideoMetadataInfo, MusicMetadata *pMetadata, bool bDetails)
Definition: serviceUtil.cpp:510
MusicMetadata
Definition: musicmetadata.h:80
FillCastMemberList
void FillCastMemberList(DTC::CastMemberList *pCastMemberList, ProgramInfo *pInfo)
Definition: serviceUtil.cpp:556
FillArtworkInfoList
void FillArtworkInfoList(DTC::ArtworkInfoList *pArtworkInfoList, const QString &sInetref, uint nSeason)
Definition: serviceUtil.cpp:333
DBCredits
std::vector< DBPerson > DBCredits
Definition: programdata.h:73
musicMetadataInfo.h
genreList.h
DTC::CastMemberList
Definition: castMemberList.h:16
programinfo.h
DTC::Input
Definition: input.h:24
FillRecRuleInfo
void FillRecRuleInfo(DTC::RecRule *pRecRule, RecordingRule *pRule)
Definition: serviceUtil.cpp:272
cutList.h
jsonCastToCredits
DBCredits * jsonCastToCredits(const QJsonObject &cast)
Definition: serviceUtil.cpp:765
FillVideoMetadataInfo
void FillVideoMetadataInfo(DTC::VideoMetadataInfo *pVideoMetadataInfo, const VideoMetadataListManager::VideoMetadataPtr &pMetadata, bool bDetails)
Definition: serviceUtil.cpp:407
FillGenreList
void FillGenreList(DTC::GenreList *pGenreList, int videoID)
Definition: serviceUtil.cpp:380
recRule.h
uint
unsigned int uint
Definition: compat.h:140
FillProgramInfo
void FillProgramInfo(DTC::Program *pProgram, ProgramInfo *pInfo, bool bIncChannel=true, bool bDetails=true, bool bIncCast=true)
Definition: serviceUtil.cpp:44
videometadatalistmanager.h
channelinfo.h
programAndChannel.h
DTC::ChannelGroup
Definition: channelGroup.h:23
recordinginfo.h
channelGroup.h
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
channelgroup.h
CreateRecordingGroup
int CreateRecordingGroup(const QString &groupName)
Definition: serviceUtil.cpp:745
DTC::RecRule
Definition: recRule.h:15
FillCommBreak
void FillCommBreak(DTC::CutList *pCutList, RecordingInfo *rInfo, int marktype)
Definition: serviceUtil.cpp:681
MarkTypes
MarkTypes
Definition: programtypes.h:48
DTC::VideoMetadataInfo
Definition: videoMetadataInfo.h:29
videoMetadataInfo.h
inputinfo.h
InputInfo
Definition: inputinfo.h:14
DTC::MusicMetadataInfo
Definition: musicMetadataInfo.h:25
DTC::ChannelInfo
Definition: programAndChannel.h:30
artworkInfoList.h
recordingrule.h
DTC::ArtworkInfoList
Definition: artworkInfoList.h:25
input.h
castMemberList.h
musicmetadata.h
FillChannelInfo
bool FillChannelInfo(DTC::ChannelInfo *pChannel, uint nChanID, bool bDetails=true)
Definition: serviceUtil.cpp:172
DTC::CutList
Definition: cutList.h:25