[glib] GApplication: merge DBus interface into C source
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GApplication: merge DBus interface into C source
- Date: Tue, 19 Oct 2010 11:46:59 +0000 (UTC)
commit 0ce1462d1a4d4510bcac1b6fb9cf4d9f38b44de9
Author: Ryan Lortie <desrt desrt ca>
Date: Tue Oct 19 13:44:30 2010 +0200
GApplication: merge DBus interface into C source
instead of having it in a separate file that causes problems to the
build system (I want to avoid using EXTRA_DIST here).
gio/Makefile.am | 1 +
gio/gapplicationimpl-dbus-interface.c | 93 ---------------------------------
gio/gapplicationimpl-dbus.c | 84 ++++++++++++++++++++++++++++-
3 files changed, 82 insertions(+), 96 deletions(-)
---
diff --git a/gio/Makefile.am b/gio/Makefile.am
index f432ae7..b92856b 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -148,6 +148,7 @@ application_sources = \
gaction.c \
gsimpleaction.c \
gapplicationcommandline.c \
+ gapplicationimpl.h \
gapplicationimpl-dbus.c \
gapplication.c
diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c
index 1f6a360..7a65595 100644
--- a/gio/gapplicationimpl-dbus.c
+++ b/gio/gapplicationimpl-dbus.c
@@ -30,10 +30,85 @@
#include <string.h>
#include <stdio.h>
-#include "gapplicationimpl-dbus-interface.c"
#include "gapplicationcommandline.h"
#include "gdbusmethodinvocation.h"
+/* DBus Interface definition {{{1 */
+static const GDBusArgInfo platform_data_arg = { -1, (gchar *) "platform_data", (gchar *) "a{sv}" };
+
+static const GDBusArgInfo open_uris_arg = { -1, (gchar *) "uris", (gchar *) "as" };
+static const GDBusArgInfo open_hint_arg = { -1, (gchar *) "hint", (gchar *) "s" };
+
+static const GDBusArgInfo invoke_action_name_arg = { -1, (gchar *) "name", (gchar *) "s" };
+static const GDBusArgInfo invoke_action_args_arg = { -1, (gchar *) "args", (gchar *) "v" };
+
+static const GDBusArgInfo cmdline_path_arg = { -1, (gchar *) "path", (gchar *) "o" };
+static const GDBusArgInfo cmdline_arguments_arg = { -1, (gchar *) "arguments", (gchar *) "aay" };
+static const GDBusArgInfo cmdline_exit_status_arg = { -1, (gchar *) "exit_status", (gchar *) "i" };
+
+static const GDBusArgInfo *activate_in[] = { &platform_data_arg, NULL };
+static const GDBusArgInfo *activate_out[] = { NULL };
+
+static const GDBusArgInfo *open_in[] = { &open_uris_arg, &open_hint_arg, &platform_data_arg, NULL };
+static const GDBusArgInfo *open_out[] = { NULL };
+
+static const GDBusArgInfo *cmdline_in[] = { &cmdline_path_arg, &cmdline_arguments_arg, &platform_data_arg, NULL };
+static const GDBusArgInfo *cmdline_out[] = { &cmdline_exit_status_arg, NULL };
+
+static const GDBusMethodInfo activate_method = {
+ -1, (gchar *) "Activate",
+ (GDBusArgInfo **) activate_in,
+ (GDBusArgInfo **) activate_out
+};
+
+static const GDBusMethodInfo open_method = {
+ -1, (gchar *) "Open",
+ (GDBusArgInfo **) open_in,
+ (GDBusArgInfo **) open_out
+};
+
+static const GDBusMethodInfo command_line_method = {
+ -1, (gchar *) "CommandLine",
+ (GDBusArgInfo **) cmdline_in,
+ (GDBusArgInfo **) cmdline_out
+};
+
+static const GDBusMethodInfo *application_methods[] = {
+ &activate_method, &open_method, &command_line_method, NULL
+};
+
+const GDBusInterfaceInfo org_gtk_Application = {
+ -1, (gchar *) "org.gtk.Application",
+ (GDBusMethodInfo **) application_methods
+};
+
+static const GDBusArgInfo message_arg = { -1, (gchar *) "message", (gchar *) "s" };
+static const GDBusArgInfo *print_in[] = { &message_arg, NULL };
+static const GDBusArgInfo *print_out[] = { NULL };
+
+static const GDBusMethodInfo stdout_method = {
+ -1, (gchar *) "Print",
+ (GDBusArgInfo **) print_in,
+ (GDBusArgInfo **) print_out
+};
+
+static const GDBusMethodInfo stderr_method = {
+ -1, (gchar *) "PrintError",
+ (GDBusArgInfo **) print_in,
+ (GDBusArgInfo **) print_out
+};
+
+static const GDBusMethodInfo *cmdline_methods[] = {
+ &stdout_method, &stderr_method, NULL
+};
+
+const GDBusInterfaceInfo org_gtk_private_Cmdline = {
+ -1, (gchar *) "org.gtk.private.CommandLine",
+ (GDBusMethodInfo **) cmdline_methods
+};
+
+
+/* GApplication implementation {{{1 */
struct _GApplicationImpl
{
GDBusConnection *session_bus;
@@ -427,8 +502,7 @@ g_application_impl_flush (GApplicationImpl *impl)
}
-
-
+/* GDBusCommandLine implementation {{{1 */
typedef GApplicationCommandLineClass GDBusCommandLineClass;
static GType g_dbus_command_line_get_type (void);
@@ -526,3 +600,7 @@ g_dbus_command_line_new (GDBusMethodInvocation *invocation)
return G_APPLICATION_COMMAND_LINE (gdbcl);
}
+
+/* Epilogue {{{1 */
+
+/* vim:set foldmethod=marker: */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]