Project: Added (minfoprovider) service daemon
authorSimón Pena <spenap@gmail.com>
Sat, 29 May 2010 21:37:45 +0000 (23:37 +0200)
committerSimón Pena <spenap@gmail.com>
Sun, 30 May 2010 20:06:28 +0000 (22:06 +0200)
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

TODO
src/Makefile.am
src/maevies-service.c [new file with mode: 0644]

diff --git a/TODO b/TODO
index 173db4c..d0ad8e4 100644 (file)
--- 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
index f096e03..5764f52 100644 (file)
@@ -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 (file)
index 0000000..5875bdb
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * maevies-service.c
+ *
+ * This file is part of maevies
+ * Copyright (C) 2010 Simón Pena <spenap@gmail.com>
+ *
+ * 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 <dbus/dbus-glib.h>
+
+#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;
+}
+