[glibmm] Gio::DBus::Object: Add the signals of the interface.



commit 8f805264bd71dc8031dac7c9831f434c15c19a86
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date:   Fri Mar 16 00:13:06 2012 -0400

    Gio::DBus::Object: Add the signals of the interface.
    
    	* gio/src/dbusobject.hg: Add the signal_interface_[added|removed]()
    	signals of the interface.
    	* tools/extra_defs_gen/generate_defs_gio.cc: Add the GDBusObject GType
    	to the signal and properties generation utility.
    	* gio/src/gio_signals.defs: Regenerate the defs file to get the
    	signals of the interface.
    	* tools/m4/convert_gio.m4: Add a necessary conversion for wrapping the
    	signals.
    
    	* gio/src/dbusinterface.hg: Whitespace corrections.

 ChangeLog                                 |   15 +++++++++++++++
 gio/src/dbusinterface.hg                  |    3 ++-
 gio/src/dbusobject.hg                     |    5 +++++
 gio/src/gio_signals.defs                  |   20 ++++++++++++++++++++
 tools/extra_defs_gen/generate_defs_gio.cc |    1 +
 tools/m4/convert_gio.m4                   |    1 +
 6 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ef0c99d..bc1ecc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2012-03-16  Josà Alburquerque  <jaalburquerque gmail com>
+
+	Gio::DBus::Object: Add the signals of the interface.
+
+	* gio/src/dbusobject.hg: Add the signal_interface_[added|removed]()
+	signals of the interface.
+	* tools/extra_defs_gen/generate_defs_gio.cc: Add the GDBusObject GType
+	to the signal and properties generation utility.
+	* gio/src/gio_signals.defs: Regenerate the defs file to get the
+	signals of the interface.
+	* tools/m4/convert_gio.m4: Add a necessary conversion for wrapping the
+	signals.
+
+	* gio/src/dbusinterface.hg: Whitespace corrections.
+
 2012-03-15  Josà Alburquerque  <jaalburquerque gmail com>
 
 	DateTime: Correct the declaration of the TimeVal struct.
diff --git a/gio/src/dbusinterface.hg b/gio/src/dbusinterface.hg
index 7d414dc..ad11ea1 100644
--- a/gio/src/dbusinterface.hg
+++ b/gio/src/dbusinterface.hg
@@ -53,15 +53,16 @@ class Interface : public Glib::Interface
 public:
   _WRAP_METHOD(Glib::RefPtr<InterfaceInfo> get_info(), g_dbus_interface_get_info)
   _WRAP_METHOD(Glib::RefPtr<const InterfaceInfo> get_info() const, g_dbus_interface_get_info, constversion)
+
   _WRAP_METHOD(Glib::RefPtr<Gio::DBus::Object> get_object(), g_dbus_interface_get_object)
   _WRAP_METHOD(Glib::RefPtr<const Gio::DBus::Object> get_object() const, g_dbus_interface_get_object, constversion)
 
   _WRAP_METHOD(Glib::RefPtr<Gio::DBus::Object> dup_object(), g_dbus_interface_dup_object)
   _WRAP_METHOD(Glib::RefPtr<const Gio::DBus::Object> dup_object() const, g_dbus_interface_dup_object, constversion)
+
   _WRAP_METHOD(void set_object(const Glib::RefPtr<Gio::DBus::Object>& object), g_dbus_interface_set_object)
 
   _WRAP_VFUNC(Glib::RefPtr<InterfaceInfo> get_info() const, "get_info")
-
   _WRAP_VFUNC(Glib::RefPtr<Gio::DBus::Object> get_object() const, "get_object")
 
 #m4 _CONVERSION(`GDBusObject*',`const Glib::RefPtr<Gio::DBus::Object>&',`Glib::wrap($3, true)')
diff --git a/gio/src/dbusobject.hg b/gio/src/dbusobject.hg
index 3dedefc..55390e0 100644
--- a/gio/src/dbusobject.hg
+++ b/gio/src/dbusobject.hg
@@ -60,6 +60,11 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Gio::DBus::Interface> get_interface(const Glib::ustring& interface_name), g_dbus_object_get_interface)
   _WRAP_METHOD(Glib::RefPtr<const Gio::DBus::Interface> get_interface(const Glib::ustring& interface_name) const, g_dbus_object_get_interface, constversion)
 
+#m4 _CONVERSION(`GDBusInterface*',`const Glib::RefPtr<Gio::DBus::Interface>&',`Glib::wrap($3, true)')
+
+  _WRAP_SIGNAL(void interface_added(const Glib::RefPtr<Gio::DBus::Interface>& interface), "interface_added")
+  _WRAP_SIGNAL(void interface_removed(const Glib::RefPtr<Gio::DBus::Interface>& interface), "interface_removed")
+
 #m4 _CONVERSION(`Glib::ustring',`const gchar*',`$3.c_str()')
   _WRAP_VFUNC(Glib::ustring get_object_path() const, "get_object_path")
 
diff --git a/gio/src/gio_signals.defs b/gio/src/gio_signals.defs
index f322e24..d9a1d5c 100644
--- a/gio/src/gio_signals.defs
+++ b/gio/src/gio_signals.defs
@@ -1802,6 +1802,26 @@
 
 ;; From GDBusInterfaceInfo
 
+;; From GDBusObject
+
+(define-signal interface-added
+  (of-object "GDBusObject")
+  (return-type "void")
+  (when "last")
+  (parameters
+    '("GDBusInterface*" "p0")
+  )
+)
+
+(define-signal interface-removed
+  (of-object "GDBusObject")
+  (return-type "void")
+  (when "last")
+  (parameters
+    '("GDBusInterface*" "p0")
+  )
+)
+
 ;; From GDBusNodeInfo
 
 ;; From GDBusMessage
diff --git a/tools/extra_defs_gen/generate_defs_gio.cc b/tools/extra_defs_gen/generate_defs_gio.cc
index 7003c63..ad5aa04 100644
--- a/tools/extra_defs_gen/generate_defs_gio.cc
+++ b/tools/extra_defs_gen/generate_defs_gio.cc
@@ -123,6 +123,7 @@ int main(int, char**)
             << get_defs(G_TYPE_DBUS_SIGNAL_INFO)
             << get_defs(G_TYPE_DBUS_PROPERTY_INFO)
             << get_defs(G_TYPE_DBUS_INTERFACE_INFO)
+            << get_defs(G_TYPE_DBUS_OBJECT)
             << get_defs(G_TYPE_DBUS_NODE_INFO)
             << get_defs(G_TYPE_DBUS_MESSAGE)
             << get_defs(G_TYPE_DBUS_METHOD_INVOCATION)
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index 5f6e440..5cd6d26 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -100,6 +100,7 @@ _CONVERSION(`GDBusInterfaceInfo*',`const Glib::RefPtr<InterfaceInfo>',`Glib::wra
 # DBusInterface
 _CONVERSION(`GDBusInterface*',`Glib::RefPtr<Gio::DBus::Interface>',`Glib::wrap($3)')
 _CONVERSION(`Glib::RefPtr<Gio::DBus::Interface>',`GDBusInterface*',`Glib::unwrap($3)')
+_CONVERSION(`const Glib::RefPtr<Gio::DBus::Interface>&',`GDBusInterface*',`Glib::unwrap($3)')
 
 # DBusObject
 _CONVERSION(`GDBusObject*',`Glib::RefPtr<Gio::DBus::Object>',`Glib::wrap($3)')



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