[glibmm] DBusConnection: Reorder parameters to allow default values for flags.



commit 63d7707bd9eaf874a30ba5ae1d8cd59391c3de95
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Thu Oct 28 01:11:42 2010 -0400

    	DBusConnection: Reorder parameters to allow default values for flags.
    
    	* gio/src/dbusconnection.{ccg,hg}: Reorder the parameters in the
    	constructors and create methods so that the DBusConnection flag
    	parameter has a default value.
    	* gio/src/dbusproxy.hg (get_cached_property): Docs re-formatting.

 ChangeLog                  |    9 ++++++
 gio/src/dbusconnection.ccg |   59 ++++++++++++++++++++-----------------------
 gio/src/dbusconnection.hg  |   35 ++++++++++++--------------
 gio/src/dbusproxy.hg       |    3 +-
 4 files changed, 53 insertions(+), 53 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3676d32..da63a33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-28  José Alburquerque  <jaalburqu svn gnome org>
+
+	DBusConnection: Reorder parameters to allow default values for flags.
+
+	* gio/src/dbusconnection.{ccg,hg}: Reorder the parameters in the
+	constructors and create methods so that the DBusConnection flag
+	parameter has a default value.
+	* gio/src/dbusproxy.hg (get_cached_property): Docs re-formatting.
+
 2010-10-26  José Alburquerque  <jaalburqu svn gnome org>
 
 	DBusConnection: Add docs to some methods.
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg
index 0e65ef3..cf3cc8d 100644
--- a/gio/src/dbusconnection.ccg
+++ b/gio/src/dbusconnection.ccg
@@ -25,9 +25,8 @@ namespace Gio
 {
 
 DBusConnection::DBusConnection(const Glib::RefPtr<IOStream>& stream,
-  const Glib::ustring& guid, DBusConnectionFlags flags,
-  const Glib::RefPtr<DBusAuthObserver>& observer,
-  const SlotAsyncReady& slot,
+  const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
+  const SlotAsyncReady& slot, DBusConnectionFlags flags,
   const Glib::RefPtr<Cancellable>& cancellable)
 :
   _CONSTRUCT("stream", Glib::unwrap(stream),
@@ -39,9 +38,8 @@ DBusConnection::DBusConnection(const Glib::RefPtr<IOStream>& stream,
 }
 
 DBusConnection::DBusConnection(const Glib::ustring& address,
-  DBusConnectionFlags flags, const Glib::RefPtr<DBusAuthObserver>& observer,
-  const SlotAsyncReady& slot,
-  const Glib::RefPtr<Cancellable>& cancellable)
+  const Glib::RefPtr<DBusAuthObserver>& observer, const SlotAsyncReady& slot,
+  DBusConnectionFlags flags, const Glib::RefPtr<Cancellable>& cancellable)
 :
   _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
     "flags", static_cast<GDBusConnectionFlags>(flags),
@@ -51,9 +49,8 @@ DBusConnection::DBusConnection(const Glib::ustring& address,
 }
 
 DBusConnection::DBusConnection(const Glib::RefPtr<IOStream>& stream,
-  const Glib::ustring& guid, DBusConnectionFlags flags,
-  const Glib::RefPtr<DBusAuthObserver>& observer,
-  const Glib::RefPtr<Cancellable>& cancellable)
+  const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
+  DBusConnectionFlags flags, const Glib::RefPtr<Cancellable>& cancellable)
 :
   _CONSTRUCT("stream", Glib::unwrap(stream),
     "guid", (guid.empty() ? 0 : guid.c_str()),
@@ -64,7 +61,7 @@ DBusConnection::DBusConnection(const Glib::RefPtr<IOStream>& stream,
 }
 
 DBusConnection::DBusConnection(const Glib::ustring& address,
-  DBusConnectionFlags flags, const Glib::RefPtr<DBusAuthObserver>& observer,
+  const Glib::RefPtr<DBusAuthObserver>& observer, DBusConnectionFlags flags,
   const Glib::RefPtr<Cancellable>& cancellable)
 :
   _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
@@ -75,54 +72,52 @@ DBusConnection::DBusConnection(const Glib::ustring& address,
 }
 
 void DBusConnection::create(const Glib::RefPtr<IOStream>& stream,
-  const Glib::ustring& guid, DBusConnectionFlags flags,
-  const Glib::RefPtr<DBusAuthObserver>& observer,
-  const SlotAsyncReady& slot,
+  const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
+  const SlotAsyncReady& slot, DBusConnectionFlags flags,
   const Glib::RefPtr<Cancellable>& cancellable)
 {
-  // Note that this does not return anything, because it is async - see create_finish().
+  // Note that this does not return anything, because it is async - see
+  // create_finish().
 
   // Create the connection, taking an extra reference without returning it.
   // The extra reference is taken so the connection is not destroyed when it
   // goes out of scope.  The finished connection will be returned in the slot
   // by calling create_finish().
-  Glib::RefPtr<DBusConnection>(new DBusConnection(stream, guid, flags,
-    observer, slot, cancellable))->reference();
+  Glib::RefPtr<DBusConnection>(new DBusConnection(stream, guid, observer,
+    slot, flags, cancellable))->reference();
 }
 
 Glib::RefPtr<DBusConnection> DBusConnection::create(
-  const Glib::RefPtr<IOStream>& stream,
-  const Glib::ustring& guid, DBusConnectionFlags flags,
-  const Glib::RefPtr<DBusAuthObserver>& observer,
+  const Glib::RefPtr<IOStream>& stream, const Glib::ustring& guid,
+  const Glib::RefPtr<DBusAuthObserver>& observer, DBusConnectionFlags flags,
   const Glib::RefPtr<Cancellable>& cancellable)
 {
-  return Glib::RefPtr<DBusConnection>(new DBusConnection(stream, guid, flags,
-    observer, cancellable));
+  return Glib::RefPtr<DBusConnection>(new DBusConnection(stream, guid,
+    observer, flags, cancellable));
 }
 
 
 void DBusConnection::create_for_address(const Glib::ustring& address,
-  DBusConnectionFlags flags, const Glib::RefPtr<DBusAuthObserver>& observer,
-  const SlotAsyncReady& slot,
-  const Glib::RefPtr<Cancellable>& cancellable)
+  const Glib::RefPtr<DBusAuthObserver>& observer, const SlotAsyncReady& slot,
+  DBusConnectionFlags flags, const Glib::RefPtr<Cancellable>& cancellable)
 {
-  // Note that this does not return anything, because it is async - see create_finish().
+  // Note that this does not return anything, because it is async - see
+  // create_finish().
 
   // Create the connection, taking an extra reference without returning it.
   // The extra reference is taken so the connection is not destroyed when it
   // goes out of scope.  The finished connection will be returned in the slot
   // by calling create_finish().
-  Glib::RefPtr<DBusConnection>(new DBusConnection(address, flags,
-    observer, slot, cancellable))->reference();
+  Glib::RefPtr<DBusConnection>(new DBusConnection(address, observer, slot,
+    flags, cancellable))->reference();
 }
 
 Glib::RefPtr<DBusConnection> DBusConnection::create_for_address(
-  const Glib::ustring& address,
-  DBusConnectionFlags flags, const Glib::RefPtr<DBusAuthObserver>& observer,
-  const Glib::RefPtr<Cancellable>& cancellable)
+  const Glib::ustring& address, const Glib::RefPtr<DBusAuthObserver>& observer,
+  DBusConnectionFlags flags, const Glib::RefPtr<Cancellable>& cancellable)
 {
-  return Glib::RefPtr<DBusConnection>(new DBusConnection(address, flags,
-    observer, cancellable));
+  return Glib::RefPtr<DBusConnection>(new DBusConnection(address, observer,
+    flags, cancellable));
 }
 
 void DBusConnection::get(BusType bus_type, const SlotAsyncReady& slot,
diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg
index 988bdc1..d6886e4 100644
--- a/gio/src/dbusconnection.hg
+++ b/gio/src/dbusconnection.hg
@@ -62,26 +62,22 @@ protected:
 protected:
 
   DBusConnection(const Glib::RefPtr<IOStream>& stream,
-    const Glib::ustring& guid, DBusConnectionFlags flags,
-    const Glib::RefPtr<DBusAuthObserver>& observer,
-    const SlotAsyncReady& slot,
+    const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
+    const SlotAsyncReady& slot, DBusConnectionFlags flags,
     const Glib::RefPtr<Cancellable>& cancellable);
 
   DBusConnection(const Glib::RefPtr<IOStream>& stream,
-    const Glib::ustring& guid, DBusConnectionFlags flags,
-    const Glib::RefPtr<DBusAuthObserver>& observer,
-    const Glib::RefPtr<Cancellable>& cancellable);
+    const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
+    DBusConnectionFlags flags, const Glib::RefPtr<Cancellable>& cancellable);
 
-  DBusConnection(const Glib::ustring& address, DBusConnectionFlags flags,
+  DBusConnection(const Glib::ustring& address,
     const Glib::RefPtr<DBusAuthObserver>& observer,
-    const SlotAsyncReady& slot,
+    const SlotAsyncReady& slot, DBusConnectionFlags flags,
     const Glib::RefPtr<Cancellable>& cancellable);
 
-
-
-  DBusConnection(const Glib::ustring& address, DBusConnectionFlags flags,
+  DBusConnection(const Glib::ustring& address,
     const Glib::RefPtr<DBusAuthObserver>& observer,
-    const Glib::RefPtr<Cancellable>& cancellable);
+    DBusConnectionFlags flags, const Glib::RefPtr<Cancellable>& cancellable);
 
 public:
 
@@ -108,9 +104,9 @@ public:
 
   _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new)
   void create(const Glib::RefPtr<IOStream>& stream,
-    const Glib::ustring& guid, DBusConnectionFlags flags,
-    const Glib::RefPtr<DBusAuthObserver>& observer,
+    const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
     const SlotAsyncReady& slot,
+    DBusConnectionFlags flags = Gio::DBUS_CONNECTION_FLAGS_NONE,
     const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
 
   /// @throw Glib::Error.
@@ -118,8 +114,8 @@ public:
 
   _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address)
   void create_for_address(const Glib::ustring& address,
-    DBusConnectionFlags flags, const Glib::RefPtr<DBusAuthObserver>& observer,
-    const SlotAsyncReady& slot,
+    const Glib::RefPtr<DBusAuthObserver>& observer, const SlotAsyncReady& slot,
+    DBusConnectionFlags flags = Gio::DBUS_CONNECTION_FLAGS_NONE,
     const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
 
   /// @throw Glib::Error.
@@ -129,15 +125,16 @@ public:
   /** @throw Glib::Error.
    */
   Glib::RefPtr<DBusConnection> create(const Glib::RefPtr<IOStream>& stream,
-    const Glib::ustring& guid, DBusConnectionFlags flags,
-    const Glib::RefPtr<DBusAuthObserver>& observer,
+    const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
+    DBusConnectionFlags flags = Gio::DBUS_CONNECTION_FLAGS_NONE,
     const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
 
   _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync)
   /** @throw Glib::Error.
    */
   Glib::RefPtr<DBusConnection> create_for_address(const Glib::ustring& address,
-    DBusConnectionFlags flags, const Glib::RefPtr<DBusAuthObserver>& observer,
+    const Glib::RefPtr<DBusAuthObserver>& observer,
+    DBusConnectionFlags flags = Gio::DBUS_CONNECTION_FLAGS_NONE,
     const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>());
 
   /** Closes the connection. Note that this never causes the process to exit
diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg
index af1dc1d..134c7ec 100644
--- a/gio/src/dbusproxy.hg
+++ b/gio/src/dbusproxy.hg
@@ -150,10 +150,9 @@ public:
    * If proxy has an expected interface (see property_g_interface_info()),
    * then @a property_name (for existence) is checked against it.
    *
-   * @param property_name Property name.
-   *
    * @param property An output parameter in which to hold to the variant
    * instance that holds the value for @a property_name.
+   * @param property_name Property name.
    *
    * @newin{2,26}
    */



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