[glibmm] Gio::Application: Add dbus_register/unregister_vfunc
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::Application: Add dbus_register/unregister_vfunc
- Date: Wed, 30 Nov 2016 12:30:08 +0000 (UTC)
commit 16a23782f37d0f3a779fdb8197c02f4fe5e11940
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Wed Nov 30 13:27:16 2016 +0100
Gio::Application: Add dbus_register/unregister_vfunc
* gio/src/application.hg: Add dbus_register and dbus_unregister vfuncs.
* gio/src/gio_vfuncs.defs: Add dbus_register and dbus_unregister.
Remove shutdown. It's a signal.
Based on a patch by Ritesh Khadgaray <khadgaray gmail com>. Bug 762191
gio/src/application.hg | 8 ++++----
gio/src/gio_vfuncs.defs | 16 +++++++++++++++-
2 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/gio/src/application.hg b/gio/src/application.hg
index 8c4d80f..e4d3a63 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -367,9 +367,6 @@ public:
_WRAP_PROPERTY("resource-base-path", bool, newin "2,44")
_WRAP_PROPERTY("is-busy", bool)
-//#m4 _CONVERSION(`const gchar*', `const Glib::ustring&', `Glib::ustring($3)')
-//#m4 _CONVERSION(`GVariant*', `const Glib::VariantBase&', `Glib::wrap($3, true)')
-
_WRAP_SIGNAL(void startup(), "startup")
_WRAP_SIGNAL(void shutdown(), "shutdown", newin "2,46")
@@ -407,7 +404,6 @@ protected:
_WRAP_VFUNC(bool local_command_line(char**& arguments, int& exit_status), local_command_line)
#m4 _CONVERSION(`GVariant*',`const Glib::VariantBase&',`Glib::wrap($3,true)')
-
_WRAP_VFUNC(void before_emit(const Glib::VariantBase& platform_data), "before_emit")
_WRAP_VFUNC(void after_emit(const Glib::VariantBase& platform_data), "after_emit")
@@ -417,6 +413,10 @@ protected:
_WRAP_VFUNC(void quit_mainloop(), "quit_mainloop")
_WRAP_VFUNC(void run_mainloop(), "run_mainloop")
+#m4 _CONVERSION(`GDBusConnection*', `const Glib::RefPtr<DBus::connection>&', `Glib::wrap($3, true)')
+#m4 _CONVERSION(`const Glib::RefPtr<DBus::Connection>&',`GDBusConnection*',__CONVERT_REFPTR_TO_P)
+ _WRAP_VFUNC(bool dbus_register(const Glib::RefPtr<DBus::Connection>& connection, const Glib::ustring&
object_path), "dbus_register", errthrow)
+ _WRAP_VFUNC(void dbus_unregister(const Glib::RefPtr<DBus::Connection>& connection, const Glib::ustring&
object_path), "dbus_unregister")
private:
/** This is just a way to call Glib::init() (which calls g_type_init()) before
diff --git a/gio/src/gio_vfuncs.defs b/gio/src/gio_vfuncs.defs
index 4bcfa1e..116b003 100644
--- a/gio/src/gio_vfuncs.defs
+++ b/gio/src/gio_vfuncs.defs
@@ -311,9 +311,23 @@
(return-type "void")
)
-(define-vfunc shutdown
+(define-vfunc dbus_register
+ (of-object "GApplication")
+ (return-type "gboolean")
+ (parameters
+ '("GDBusConnection*" "connection")
+ '("const-gchar*" "object_path")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc dbus_unregister
(of-object "GApplication")
(return-type "void")
+ (parameters
+ '("GDBusConnection*" "connection")
+ '("const-gchar*" "object_path")
+ )
)
; GAsyncInitable
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]