#define TMDB_MOVIE_H_
#include <stdio.h>
+#include <stdlib.h>
#include <rest-0.6/rest/rest-proxy.h>
#include <rest-0.6/rest/rest-proxy-call.h>
#include <rest-0.6/rest/rest-xml-parser.h>
+#define GET_MESSAGE(x) ( (x) ? x : " - " )
#define TMDB_API_KEY "249e1a42df9bee09fac5e92d3a51396b"
#define TMDB_SERVICE_URL "http://api.themoviedb.org/2.1"
#define TMDB_LANGUAGE "en"
struct _TMDBMovie {
gint popularity;
- const gchar *name;
- const gchar *alternative_name;
+ gchar *name;
+ gchar *alternative_name;
gint id;
- const gchar *imdb_id;
- const gchar *url;
- const gchar *overview;
- gint rating;
+ gchar *imdb_id;
+ gchar *url;
+ gchar *overview;
+ gfloat rating;
GDate *released;
gint runtime;
- // categories;
- // images
+/* categories */
+/* images */
};
TMDBMovie *tmdb_get_info(const gchar *name);
+void tmdb_movie_unref(TMDBMovie *movie);
+
+void tmdb_movie_print(const TMDBMovie *movie);
+
#endif /* TMDB_MOVIE_H_ */