[glibmm] Gio::DBusInterfaceSkeleton: Constant corrections.



commit d424a09781e2167d833a7d682a9cf58df644c88c
Author: José Alburquerque <jaalburquerque gmail com>
Date:   Thu Jun 6 11:16:10 2013 -0400

    Gio::DBusInterfaceSkeleton: Constant corrections.
    
        * gio/src/dbusinterfaceskeleton.hg (get_info): Add a const get_info()
        method returning a constant InterfaceInfo and make the original one
        non-constant.
        (has_connection): Accept the Connection as constant because it should
        not be modified.
        * tools/m4/convert_gio.m4: Add a needed conversion.

 ChangeLog                        |   11 +++++++++++
 gio/src/dbusinterfaceskeleton.hg |    6 ++++--
 tools/m4/convert_gio.m4          |    1 +
 3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 85e6ff1..589ebca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-06-06  José Alburquerque  <jaalburquerque gmail com>
+
+       Gio::DBusInterfaceSkeleton: Constant corrections.
+
+       * gio/src/dbusinterfaceskeleton.hg (get_info): Add a const get_info()
+       method returning a constant InterfaceInfo and make the original one
+       non-constant.
+       (has_connection): Accept the Connection as constant because it should
+       not be modified.
+       * tools/m4/convert_gio.m4: Add a needed conversion.
+
 2013-06-05  José Alburquerque  <jaalburquerque gmail com>
 
        giomm: Add the Gio::DBus::InterfaceSkeleton class.
diff --git a/gio/src/dbusinterfaceskeleton.hg b/gio/src/dbusinterfaceskeleton.hg
index 3a3c538..f956488 100644
--- a/gio/src/dbusinterfaceskeleton.hg
+++ b/gio/src/dbusinterfaceskeleton.hg
@@ -48,7 +48,9 @@ class InterfaceSkeleton
 
 public:
   _WRAP_METHOD(void flush(), g_dbus_interface_skeleton_flush)
-  _WRAP_METHOD(Glib::RefPtr<InterfaceInfo> get_info() const, g_dbus_interface_skeleton_get_info)
+
+  _WRAP_METHOD(Glib::RefPtr<InterfaceInfo> get_info(), g_dbus_interface_skeleton_get_info)
+  _WRAP_METHOD(Glib::RefPtr<const InterfaceInfo> get_info() const, g_dbus_interface_skeleton_get_info, 
constversion)
 
   //TODO: _WRAP_METHOD(GDBusInterfaceVTable* get_vtable(), g_dbus_interface_skeleton_get_vtable)
 
@@ -66,7 +68,7 @@ public:
 #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<const Connection> >',`Glib::ListHandler< 
Glib::RefPtr<const Connection> >::list_to_vector($3, Glib::OWNERSHIP_DEEP)')
   _WRAP_METHOD(std::vector< Glib::RefPtr<const Connection> > get_connections() const, 
g_dbus_interface_skeleton_get_connections)
 
-  _WRAP_METHOD(bool has_connection(const Glib::RefPtr<Connection>& connection) const, 
g_dbus_interface_skeleton_has_connection)
+  _WRAP_METHOD(bool has_connection(const Glib::RefPtr<const Connection>& connection) const, 
g_dbus_interface_skeleton_has_connection)
 
   _WRAP_METHOD(Glib::ustring get_object_path() const, g_dbus_interface_skeleton_get_object_path)
 
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index 3a827ad..e08b167 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -99,6 +99,7 @@ _CONVERSION(`GCredentials*',`Glib::RefPtr<const Credentials>',`Glib::wrap($3)')
 
 # DBusConnection
 _CONVERSION(`const Glib::RefPtr<Connection>&',`GDBusConnection*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<const Connection>&',`GDBusConnection*',__CONVERT_CONST_REFPTR_TO_P)
 _CONVERSION(`GDBusConnection*',`Glib::RefPtr<Connection>',Glib::wrap($3))
 _CONVERSION(`GDBusConnection*',`Glib::RefPtr<const Connection>',Glib::wrap($3))
 _CONVERSION(`GDBusConnection*',`Glib::RefPtr<DBus::Connection>',Glib::wrap($3))


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