From: Simón Pena Date: Sat, 29 May 2010 21:37:45 +0000 (+0200) Subject: Project: Added (minfoprovider) service daemon X-Git-Url: https://vcs.maemo.org/git/?p=maevies;a=commitdiff_plain;h=839a2bd65988753da9fbd0213ea77a0222070c04 Project: Added (minfoprovider) service daemon A daemon is added to allow launching the DBus movie info provider service. The Makefile.am is updated accordingly The TODO file is updated so that it reflects the progress --- diff --git a/TODO b/TODO index 173db4c..d0ad8e4 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,4 @@ Release 0.1: -* Expose DataProvider via DBus - - Creating dataprovider-service gobject - + Query: service, terms - + Signal: response received - - Creating mvs-service daemon * Expose TMDBMovie via DBus - Creating TMDB movie-service gobject + Getters for each property diff --git a/src/Makefile.am b/src/Makefile.am index f096e03..5764f52 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,14 +1,33 @@ -bin_PROGRAMS = mvs +bin_PROGRAMS = mvs \ + maevies_service mvs_SOURCES = \ main.c - + mvs_CFLAGS = \ $(DEPS_CFLAGS) mvs_LDADD = \ $(DEPS_LIBS) +maevies_service_SOURCES = \ + maevies-service.c \ + mvs-minfo-provider.c \ + mvs-minfo-provider.h \ + mvs-minfo-provider-service.c \ + mvs-minfo-provider-service.h \ + mvs-minfo-provider-service-glue.h \ + mvs-tmdb-movie.c \ + mvs-tmdb-movie.h \ + mvs-watc-movie.c \ + mvs-watc-movie.h + +maevies_service_CFLAGS = \ + $(DEPS_CFLAGS) + +maevies_service_LDADD = \ + $(DEPS_LIBS) + MAINTAINERCLEANFILES = \ *.in \ *~ diff --git a/src/maevies-service.c b/src/maevies-service.c new file mode 100644 index 0000000..5875bdb --- /dev/null +++ b/src/maevies-service.c @@ -0,0 +1,49 @@ +/* + * maevies-service.c + * + * This file is part of maevies + * Copyright (C) 2010 Simón Pena + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#include + +#include "mvs-minfo-provider-service.h" + +int +main (int argc, char **argv) +{ + MvsMInfoProviderService *service; + DBusGConnection *connection; + GError *error = NULL; + GMainLoop *loop; + + g_type_init(); + + connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); + if (connection == NULL) { + g_warning ("Unable to connect to dbus: %sn", error->message); + g_error_free (error); + return -1; + } + + loop = g_main_loop_new (NULL, FALSE); + service = mvs_minfo_provider_service_new (connection); + + g_main_loop_run (loop); + + g_object_unref (service); + + return 0; +} +