[glib/wip/gapplication] Add gnullappliaction.c



commit 25b11beafdee57c59b3fcdaaee52653b5e2d3f7e
Author: Colin Walters <walters verbum org>
Date:   Thu May 27 15:35:45 2010 -0400

    Add gnullappliaction.c

 gio/Makefile.am        |    2 +-
 gio/gapplication.c     |    2 +
 gio/gnullapplication.c |   56 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/gio/Makefile.am b/gio/Makefile.am
index 366574d..8bb0949 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -374,7 +374,7 @@ libgio_2_0_la_SOURCES =		\
 	$(marshal_sources) 	\
 	$(NULL)
 
-EXTRA_DIST += gunixapplication.c
+EXTRA_DIST += gnullapplication.c gunixapplication.c
 
 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
 
diff --git a/gio/gapplication.c b/gio/gapplication.c
index f306871..b29d4e1 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -115,6 +115,8 @@ static void     _g_application_platform_on_actions_changed      (GApplication  *
 
 #ifdef G_OS_UNIX
 #include "gunixapplication.c"
+#else
+#include "gnullapplication.c"
 #endif
 
 static gboolean
diff --git a/gio/gnullapplication.c b/gio/gnullapplication.c
new file mode 100644
index 0000000..2856733
--- /dev/null
+++ b/gio/gnullapplication.c
@@ -0,0 +1,56 @@
+/* GIO - GLib Input, Output and Streaming Library
+ *
+ * Copyright © 2010 Red Hat, Inc
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Colin Walters <walters verbum org>
+ */
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "gioerror.h"
+
+static void
+_g_application_platform_init (GApplication *app)
+{
+}
+
+static gboolean
+_g_application_platform_acquire_single_instance (const char   *appid,
+                                                 GError      **error)
+{
+  return TRUE;
+}
+
+static void
+_g_application_platform_on_actions_changed (GApplication *app)
+{
+}
+
+static void
+_g_application_platform_remote_invoke_action (GApplication  *app,
+                                              const char    *action,
+                                              guint          timestamp)
+{
+}
+
+static void
+_g_application_platform_default_quit (void)
+{
+  exit (0);
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]