Added the movie_info_provider layer, to abstract the concrete providers from the...
[maevies] / src / tmdb_movie.h
1 /*
2  * tmdb_movie.h
3  *
4  * This file is part of maevies
5  * Copyright (C) 2009 Simón Pena <spenap@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License for more details.
16  *
17  */
18
19 #ifndef TMDB_MOVIE_H_
20 #define TMDB_MOVIE_H_
21
22 #include <stdio.h>
23 #include <rest-0.6/rest/rest-proxy.h>
24 #include <rest-0.6/rest/rest-proxy-call.h>
25 #include <rest-0.6/rest/rest-xml-parser.h>
26
27 #define TMDB_API_KEY "249e1a42df9bee09fac5e92d3a51396b"
28 #define TMDB_SERVICE_URL "http://api.themoviedb.org/2.1"
29 #define TMDB_LANGUAGE "en"
30 #define TMDB_FORMAT "xml"
31 #define TMDB_SEARCH_METHOD "Movie.search"
32
33 typedef struct _TMDBMovie TMDBMovie;
34
35 struct _TMDBMovie {
36
37         gint popularity;
38         const gchar *name;
39         const gchar *alternative_name;
40         gint id;
41         const gchar *imdb_id;
42         const gchar *url;
43         const gchar *overview;
44         gint rating;
45         GDate *released;
46         gint runtime;
47         // categories;
48         // images
49 };
50
51 TMDBMovie *tmdb_get_info(const gchar *name);
52
53 #endif /* TMDB_MOVIE_H_ */