struct _MvsTMDBMovieServicePrivate {
MvsTmdbMovie *movie;
DBusGConnection *connection;
- guint id;
+ gchar *suffix;
};
gboolean
return *title != NULL;
}
+gboolean
+mvs_tmdb_movie_service_get_popularity (MvsTMDBMovieService *self, gchar **popularity,
+ GError **error)
+{
+ *popularity = g_strdup (mvs_tmdb_movie_get_popularity (self->priv->movie));
+ return *popularity != NULL;
+}
+
+gboolean
+mvs_tmdb_movie_service_get_rating (MvsTMDBMovieService *self, gchar **rating)
+{
+ *rating = g_strdup (mvs_tmdb_movie_get_rating (self->priv->movie));
+ return *rating != NULL;
+}
+
+gboolean
+mvs_tmdb_movie_service_get_released (MvsTMDBMovieService *self, gchar **released)
+{
+ *released = g_strdup (mvs_tmdb_movie_get_released (self->priv->movie));
+ return *released != NULL;
+}
+
+gboolean
+mvs_tmdb_movie_service_get_overview (MvsTMDBMovieService *self, gchar **overview)
+{
+ *overview = g_strdup (mvs_tmdb_movie_get_overview (self->priv->movie));
+ return *overview != NULL;
+}
+
#include "mvs-tmdb-movie-service-glue.h"
static void
g_error_free (error);
}
- object_path = g_strdup_printf (TMDB_MOVIE_SERVICE_OBJECT_PATH "/%d",
- self->priv->id);
+ object_path = g_strdup_printf (TMDB_MOVIE_SERVICE_OBJECT_PATH "/%s",
+ self->priv->suffix);
dbus_g_connection_register_g_object (self->priv->connection,
object_path,
if (self->priv->connection) {
dbus_g_connection_unref (self->priv->connection);
}
+ g_free (self->priv->suffix);
g_object_unref (self->priv->movie);
G_OBJECT_CLASS (mvs_tmdb_movie_service_parent_class)->finalize (object);
}
self->priv = GET_PRIVATE (self);
self->priv->movie = NULL;
self->priv->connection = NULL;
+ self->priv->suffix = NULL;
}
MvsTMDBMovieService*
mvs_tmdb_movie_service_new (DBusGConnection *connection,
- MvsTmdbMovie *movie, guint id)
+ MvsTmdbMovie *movie, const gchar *suffix)
{
MvsTMDBMovieService *instance = g_object_new (MVS_TYPE_TMDB_MOVIE_SERVICE, NULL);
- instance->priv->id = id;
+ instance->priv->suffix = g_strdup(suffix);
g_object_set (instance, "connection", connection, NULL);
instance->priv->movie = movie;
return instance;