summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorNaba Kumar <kh_naba@users.sourceforge.net>2007-03-09 15:45:27 +0000
committerNaba Kumar <kh_naba@users.sourceforge.net>2007-03-09 15:45:27 +0000
commit56d5d75f3ae3b9c0dc362363935510b1b2d4c8a2 (patch)
treef70b7a39f93154cc5bed358ce0178d35782dcb04 /server
Initial import of mission-control (starting from version 4.17)
git-svn-id: https://mission-control.svn.sourceforge.net/svnroot/mission-control/trunk@1 d91c8aed-3f2b-0410-a83d-924a1c20a0ba
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.am15
-rw-r--r--server/mc-server.c62
-rw-r--r--server/org.freedesktop.Telepathy.MissionControl.service.in3
3 files changed, 80 insertions, 0 deletions
diff --git a/server/Makefile.am b/server/Makefile.am
new file mode 100644
index 00000000..0f0a862c
--- /dev/null
+++ b/server/Makefile.am
@@ -0,0 +1,15 @@
+INCLUDES = $(DBUS_CFLAGS) $(TELEPATHY_CFLAGS) -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -DMC_DISABLE_DEPRECATED \
+ -DLIBDIR="@libdir@" -DLIBVERSION="0"
+
+if HAVE_SERVER
+
+servicefiledir=$(prefix)/share/dbus-1/services
+servicefile_DATA=org.freedesktop.Telepathy.MissionControl.service
+
+bin_PROGRAMS = mission-control
+mission_control_SOURCES = mc-server.c
+mission_control_LDADD = $(top_srcdir)/src/libmissioncontrol-server.la
+
+endif
diff --git a/server/mc-server.c b/server/mc-server.c
new file mode 100644
index 00000000..2d5117b8
--- /dev/null
+++ b/server/mc-server.c
@@ -0,0 +1,62 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 8 -*- */
+/*
+ * This file is part of mission-control
+ *
+ * Copyright (C) 2007 Nokia Corporation.
+ *
+ * Contact: Naba Kumar <naba.kumar@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <glib.h>
+#include "mcd-service.h"
+
+
+static void
+on_abort (McdService * mcd)
+{
+ g_debug ("Exiting now ...");
+
+ mcd_debug_print_tree (mcd);
+
+ g_object_unref (mcd);
+ g_debug ("MC now exits .. bye bye");
+ exit (0);
+}
+
+int
+main (int argc, char **argv)
+{
+ McdService *mcd;
+
+ g_type_init ();
+
+
+ mcd = mcd_service_new ();
+
+ /* Listen for suicide notification */
+ g_signal_connect_after (mcd, "abort", G_CALLBACK (on_abort), mcd);
+
+ /* connect */
+ mcd_mission_connect (MCD_MISSION (mcd));
+
+ mcd_service_run (MCD_OBJECT (mcd));
+
+ return 0;
+}
diff --git a/server/org.freedesktop.Telepathy.MissionControl.service.in b/server/org.freedesktop.Telepathy.MissionControl.service.in
new file mode 100644
index 00000000..9ac6d7ac
--- /dev/null
+++ b/server/org.freedesktop.Telepathy.MissionControl.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.freedesktop.Telepathy.MissionControl
+Exec=@prefix@/bin/mission-control