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 "recordingrule.h"
43 #include "channelgroup.h"
44 #include "inputinfo.h"
45 #include "channelinfo.h"
46 #include "recordinginfo.h"
47 #include "musicmetadata.h"
48 
49 #define ADD_SQL(settings_var, bindvar, col, api_param, val) { \
50  (settings_var) += QString("%1=:%2, ").arg(col).arg(api_param); \
51  (bindvar)[QString(":").append(api_param)] = val; \
52  }
53 
54 #define HAS_PARAM(p) m_parsedParams.contains(p)
55 
56 const QStringList KnownServices = { "Capture", "Channel", "Content", \
57  "Dvr", "Guide", "Music", \
58  "Myth", "Video" };
59 
60 void FillProgramInfo( DTC::Program *pProgram,
61  ProgramInfo *pInfo,
62  bool bIncChannel = true,
63  bool bDetails = true,
64  bool bIncCast = true);
65 
66 bool FillChannelInfo( DTC::ChannelInfo *pChannel,
67  uint nChanID,
68  bool bDetails = true );
69 
70 bool FillChannelInfo( DTC::ChannelInfo *pChannel,
71  const ChannelInfo &channelInfo,
72  bool bDetails = true );
73 
74 void FillChannelGroup( DTC::ChannelGroup *pGroup, const ChannelGroupItem& pGroupItem);
75 
76 void FillRecRuleInfo( DTC::RecRule *pRecRule,
77  RecordingRule *pRule );
78 
79 void FillArtworkInfoList( DTC::ArtworkInfoList *pArtworkInfoList,
80  const QString &sInetref,
81  uint nSeason );
82 
83 void FillGenreList( DTC::GenreList *pGenreList, int videoID);
84 
86  DTC::VideoMetadataInfo *pVideoMetadataInfo,
88  bool bDetails);
89 
90 void FillMusicMetadataInfo (DTC::MusicMetadataInfo *pVideoMetadataInfo,
91  MusicMetadata *pMetadata, bool bDetails);
92 
93 void FillInputInfo( DTC::Input *input, const InputInfo& inputInfo);
94 
95 void FillCastMemberList( DTC::CastMemberList *pCastMemberList,
96  ProgramInfo *pInfo);
97 
98 void FillCutList( DTC::CutList* pCutList, RecordingInfo* rInfo, int marktype);
99 
100 void FillCommBreak( DTC::CutList* pCutList, RecordingInfo* rInfo, int marktype);
101 
102 void FillSeek(DTC::CutList* pCutList, RecordingInfo* rInfo, MarkTypes marktype);
103 
104 
105 #endif // SERVICEUTIL_H
ChannelInfo
Definition: channelinfo.h:34
KnownServices
const QStringList KnownServices
Definition: serviceUtil.h:56
FillCutList
void FillCutList(DTC::CutList *pCutList, RecordingInfo *rInfo, int marktype)
Definition: serviceUtil.cpp:617
DTC::Program
Definition: programAndChannel.h:146
FillChannelGroup
void FillChannelGroup(DTC::ChannelGroup *pGroup, const ChannelGroupItem &pGroupItem)
Definition: serviceUtil.cpp:254
simple_ref_ptr
Definition: quicksp.h:25
ChannelGroupItem
Definition: channelgroup.h:17
RecordingInfo
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:35
DTC::GenreList
Definition: genreList.h:26
FillInputInfo
void FillInputInfo(DTC::Input *input, const InputInfo &inputInfo)
Definition: serviceUtil.cpp:522
RecordingRule
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:33
FillSeek
void FillSeek(DTC::CutList *pCutList, RecordingInfo *rInfo, MarkTypes marktype)
Definition: serviceUtil.cpp:709
FillMusicMetadataInfo
void FillMusicMetadataInfo(DTC::MusicMetadataInfo *pVideoMetadataInfo, MusicMetadata *pMetadata, bool bDetails)
Definition: serviceUtil.cpp:493
MusicMetadata
Definition: musicmetadata.h:81
FillCastMemberList
void FillCastMemberList(DTC::CastMemberList *pCastMemberList, ProgramInfo *pInfo)
Definition: serviceUtil.cpp:539
FillArtworkInfoList
void FillArtworkInfoList(DTC::ArtworkInfoList *pArtworkInfoList, const QString &sInetref, uint nSeason)
Definition: serviceUtil.cpp:328
musicMetadataInfo.h
genreList.h
DTC::CastMemberList
Definition: castMemberList.h:17
programinfo.h
DTC::Input
Definition: input.h:25
FillRecRuleInfo
void FillRecRuleInfo(DTC::RecRule *pRecRule, RecordingRule *pRule)
Definition: serviceUtil.cpp:268
cutList.h
FillVideoMetadataInfo
void FillVideoMetadataInfo(DTC::VideoMetadataInfo *pVideoMetadataInfo, const VideoMetadataListManager::VideoMetadataPtr &pMetadata, bool bDetails)
Definition: serviceUtil.cpp:398
FillGenreList
void FillGenreList(DTC::GenreList *pGenreList, int videoID)
Definition: serviceUtil.cpp:371
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:24
recordinginfo.h
channelGroup.h
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
channelgroup.h
DTC::RecRule
Definition: recRule.h:16
FillCommBreak
void FillCommBreak(DTC::CutList *pCutList, RecordingInfo *rInfo, int marktype)
Definition: serviceUtil.cpp:663
MarkTypes
MarkTypes
Definition: programtypes.h:48
DTC::VideoMetadataInfo
Definition: videoMetadataInfo.h:30
videoMetadataInfo.h
inputinfo.h
InputInfo
Definition: inputinfo.h:15
DTC::MusicMetadataInfo
Definition: musicMetadataInfo.h:26
DTC::ChannelInfo
Definition: programAndChannel.h:31
artworkInfoList.h
recordingrule.h
DTC::ArtworkInfoList
Definition: artworkInfoList.h:26
input.h
castMemberList.h
musicmetadata.h
FillChannelInfo
bool FillChannelInfo(DTC::ChannelInfo *pChannel, uint nChanID, bool bDetails=true)
Definition: serviceUtil.cpp:168
DTC::CutList
Definition: cutList.h:26