CPPMyth
Library to interoperate with MythTV server
mythdto.cpp
1 /*
2  * Copyright (C) 2014 Jean-Luc Barriere
3  *
4  * This Program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2, or (at your option)
7  * any later version.
8  *
9  * This Program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; see the file COPYING. If not, write to
16  * the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
17  * MA 02110-1301 USA
18  * http://www.gnu.org/copyleft/gpl.html
19  *
20  */
21 
22 #include "mythdto.h"
23 #include "mythdto75.h" // Base protocol version 75
24 #include "mythdto76.h" // Add protocol version 76
25 #include "mythdto82.h" // Add protocol version 82
26 #include "mythdto85.h" // Add protocol version 85
27 
28 #include <cstddef>
29 
30 const bindings_t *MythDTO::getVersionBindArray(unsigned ranking)
31 {
32  (void)ranking;
33  return &MythDTO75::VersionBindArray2_0;
34 }
35 
36 const bindings_t *MythDTO::getListBindArray(unsigned proto)
37 {
38  (void)proto;
39  return &MythDTO75::ListBindArray;
40 }
41 
43 {
44  if (proto >= 75)
45  return &MythDTO75::ChannelBindArray;
46  return NULL;
47 }
48 
50 {
51  if (proto >= 82)
52  return &MythDTO82::RecordingBindArray;
53  if (proto >= 75)
54  return &MythDTO75::RecordingBindArray;
55  return NULL;
56 }
57 
59 {
60  if (proto >= 75)
61  return &MythDTO75::ArtworkBindArray;
62  return NULL;
63 }
64 
66 {
67  if (proto >= 75)
68  return &MythDTO75::ProgramBindArray;
69  return NULL;
70 }
71 
73 {
74  if (proto >= 75)
75  return &MythDTO75::CaptureCardBindArray;
76  return NULL;
77 }
78 
80 {
81  if (proto >= 75)
82  return &MythDTO75::VideoSourceBindArray;
83  return NULL;
84 }
85 
87 {
88  if (proto >= 76)
89  return &MythDTO76::RecordScheduleBindArray;
90  if (proto >= 75)
91  return &MythDTO75::RecordScheduleBindArray;
92  return NULL;
93 }
94 
96 {
97  if (proto >= 85)
98  return &MythDTO85::CuttingBindArray;
99  return NULL;
100 }
const bindings_t * getRecordingBindArray(unsigned proto)
Returns bindings for Myth::Recording.
Definition: mythdto.cpp:49
const bindings_t * getProgramBindArray(unsigned proto)
Returns bindings for Myth::Program.
Definition: mythdto.cpp:65
const bindings_t * getListBindArray(unsigned proto)
Returns bindings for Myth::List.
Definition: mythdto.cpp:36
const bindings_t * getCuttingBindArray(unsigned proto)
Returns bindings for Myth::Mark.
Definition: mythdto.cpp:95
const bindings_t * getArtworkBindArray(unsigned proto)
Returns bindings for Myth::Artwork.
Definition: mythdto.cpp:58
Brings together all attribute bindings of an object.
Definition: mythdto.h:66
const bindings_t * getChannelBindArray(unsigned proto)
Returns bindings for Myth::Channel.
Definition: mythdto.cpp:42
const bindings_t * getCaptureCardBindArray(unsigned proto)
Returns bindings for Myth::CaptureCard.
Definition: mythdto.cpp:72
const bindings_t * getVideoSourceBindArray(unsigned proto)
Returns bindings for Myth::VideoSource.
Definition: mythdto.cpp:79
const bindings_t * getVersionBindArray(unsigned ranking)
Returns bindings for Myth::Version.
Definition: mythdto.cpp:30
const bindings_t * getRecordScheduleBindArray(unsigned proto)
Returns bindings for Myth::RecordSchedule.
Definition: mythdto.cpp:86