]> git.vomp.tv Git - vompserver.git/blob - services/scraper2vdr.h
IPv6 support for discovery protocol
[vompserver.git] / services / scraper2vdr.h
1 #ifndef __SCRAPER2VDRSERVICES_H
2 #define __SCRAPER2VDRSERVICES_H
3
4 #include <string>
5 #include <vector>
6 #include <vdr/epg.h>
7 #include <vdr/recording.h>
8
9 enum tvType {
10     tSeries,
11     tMovie,
12     tNone,
13 };
14
15 /*********************************************************************
16 * Helper Structures
17 *********************************************************************/
18 class cTvMedia {
19 public:
20         cTvMedia(void) {
21                 path = "";
22                 width = height = 0;
23         };
24     std::string path;
25     int width;
26     int height;
27 };
28
29 class cEpisode {
30 public:
31     cEpisode(void) {
32         number = 0;
33         season = 0;
34         name = "";
35         firstAired = "";
36         guestStars = "";
37         overview = "";
38         rating = 0.0;
39     };
40     int number;
41     int season;
42     std::string name;
43     std::string firstAired;
44     std::string guestStars;
45     std::string overview;
46     float rating;
47     cTvMedia episodeImage;
48 };
49
50 class cActor {
51 public:
52     cActor(void) {
53         name = "";
54         role = "";
55     };
56     std::string name;
57     std::string role;
58     cTvMedia actorThumb;
59 };
60
61 /*********************************************************************
62 * Data Structures for Service Calls
63 *********************************************************************/
64
65 // Data structure for service "GetEventType"
66 class ScraperGetEventType {
67 public:
68         ScraperGetEventType(void) {
69                 event = NULL;
70         recording = NULL;
71                 type = tNone;
72                 movieId = 0;
73                 seriesId = 0;
74                 episodeId = 0;
75         };
76 // in
77     const cEvent *event;             // check type for this event 
78     const cRecording *recording;     // or for this recording
79 //out
80     tvType type;                         //typeSeries or typeMovie
81     int movieId;
82     int seriesId;
83     int episodeId;
84 };
85
86 //Data structure for full series and episode information
87 class cMovie {
88 public:
89     cMovie(void) {
90         title = "";
91         originalTitle = "";
92         tagline = "";    
93         overview = "";
94         adult = false;
95         collectionName = "";
96         budget = 0;
97         revenue = 0;
98         genres = "";
99         homepage = "";
100         releaseDate = "";
101         runtime = 0;
102         popularity = 0.0;
103         voteAverage = 0.0;
104     };
105 //IN
106     int movieId;                    // movieId fetched from ScraperGetEventType
107 //OUT    
108     std::string title;
109     std::string originalTitle;
110     std::string tagline;    
111     std::string overview;
112     bool adult;
113     std::string collectionName;
114     int budget;
115     int revenue;
116     std::string genres;
117     std::string homepage;
118     std::string releaseDate;
119     int runtime;
120     float popularity;
121     float voteAverage;
122     cTvMedia poster;
123     cTvMedia fanart;
124     cTvMedia collectionPoster;
125     cTvMedia collectionFanart;
126     std::vector<cActor> actors;
127 };
128
129 //Data structure for full series and episode information
130 class cSeries {
131 public:
132     cSeries(void) {
133         seriesId = 0;
134         episodeId = 0;
135         name = "";
136         overview = "";
137         firstAired = "";
138         network = "";
139         genre = "";
140         rating = 0.0;
141         status = "";
142     };
143 //IN
144     int seriesId;                   // seriesId fetched from ScraperGetEventType
145     int episodeId;                  // episodeId fetched from ScraperGetEventType
146 //OUT
147     std::string name;
148     std::string overview;
149     std::string firstAired;
150     std::string network;
151     std::string genre;
152     float rating;
153     std::string status;
154     cEpisode episode;
155     std::vector<cActor> actors;
156     std::vector<cTvMedia> posters;
157     std::vector<cTvMedia> banners;
158     std::vector<cTvMedia> fanarts;
159     cTvMedia seasonPoster;
160 };
161
162 // Data structure for service "GetPosterBanner"
163 class ScraperGetPosterBanner {
164 public:
165         ScraperGetPosterBanner(void) {
166                 type = tNone;
167         };
168 // in
169     const cEvent *event;             // check type for this event 
170 //out
171     tvType type;                         //typeSeries or typeMovie
172     cTvMedia poster;
173     cTvMedia banner;
174 };
175
176 // Data structure for service "GetPoster"
177 class ScraperGetPoster {
178 public:
179 // in
180     const cEvent *event;             // check type for this event
181     const cRecording *recording;     // or for this recording
182 //out
183     cTvMedia poster;
184 };
185
186 // Data structure for service "GetPosterThumb"
187 class ScraperGetPosterThumb {
188 public:
189 // in
190     const cEvent *event;             // check type for this event
191     const cRecording *recording;     // or for this recording
192 //out
193     cTvMedia poster;
194 };
195
196 #endif //__SCRAPER2VDRSERVICES_H