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
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:34
void FillRecRuleInfo(DTC::RecRule *pRecRule, RecordingRule *pRule)
void FillVideoMetadataInfo(DTC::VideoMetadataInfo *pVideoMetadataInfo, const VideoMetadataListManager::VideoMetadataPtr &pMetadata, bool bDetails)
void FillProgramInfo(DTC::Program *pProgram, ProgramInfo *pInfo, bool bIncChannel=true, bool bDetails=true, bool bIncCast=true)
Definition: serviceUtil.cpp:44
MarkTypes
Definition: programtypes.h:48
Holds information on recordings and videos.
Definition: programinfo.h:67
void FillCutList(DTC::CutList *pCutList, RecordingInfo *rInfo, int marktype)
void FillArtworkInfoList(DTC::ArtworkInfoList *pArtworkInfoList, const QString &sInetref, uint nSeason)
bool FillChannelInfo(DTC::ChannelInfo *pChannel, uint nChanID, bool bDetails=true)
unsigned int uint
Definition: compat.h:140
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:32
void FillCastMemberList(DTC::CastMemberList *pCastMemberList, ProgramInfo *pInfo)
void FillCommBreak(DTC::CutList *pCutList, RecordingInfo *rInfo, int marktype)
void FillSeek(DTC::CutList *pCutList, RecordingInfo *rInfo, MarkTypes marktype)
void FillMusicMetadataInfo(DTC::MusicMetadataInfo *pVideoMetadataInfo, MusicMetadata *pMetadata, bool bDetails)
void FillGenreList(DTC::GenreList *pGenreList, int videoID)
void FillInputInfo(DTC::Input *input, const InputInfo &inputInfo)
const QStringList KnownServices
Definition: serviceUtil.h:56
void FillChannelGroup(DTC::ChannelGroup *pGroup, const ChannelGroupItem &pGroupItem)