[glibmm] DBus::[Connection|Proxy]: Change ifdef G_OS_LINUX to ifdef G_OS_UNIX.



commit 5ceae1ab42e9bebffd8de06ddc5b22873a06adcf
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Wed Jan 30 09:00:25 2013 +0100

    DBus::[Connection|Proxy]: Change ifdef G_OS_LINUX to ifdef G_OS_UNIX.
    
    * gio/src/dbusconnection.[ccg|hg]:
    * gio/src/dbusproxy.[ccg|hg]: Change G_OS_LINUX to G_OS_UNIX. Glib does not
    define G_OS_LINUX. Correct function declarations for DBus::Proxy::call().

 ChangeLog                  |    8 ++++++++
 gio/src/dbusconnection.ccg |    4 ++--
 gio/src/dbusconnection.hg  |    8 ++++----
 gio/src/dbusproxy.ccg      |   11 +++++------
 gio/src/dbusproxy.hg       |   14 +++++---------
 5 files changed, 24 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d1692fd..93d325e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-01-30  Kjell Ahlstedt  <kjell ahlstedt bredband net>
+
+	DBus::[Connection|Proxy]: Change ifdef G_OS_LINUX to ifdef G_OS_UNIX.
+
+	* gio/src/dbusconnection.[ccg|hg]:
+	* gio/src/dbusproxy.[ccg|hg]: Change G_OS_LINUX to G_OS_UNIX. Glib does not
+	define G_OS_LINUX. Correct function declarations for DBus::Proxy::call().
+
 2013-01-29  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
 	gmmproc: Improve the conversion of documentation to Doxygen format.
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg
index e10cba4..f2f6035 100644
--- a/gio/src/dbusconnection.ccg
+++ b/gio/src/dbusconnection.ccg
@@ -719,7 +719,7 @@ Glib::VariantContainerBase Connection::call_sync(
   return Glib::VariantContainerBase(gvariant, false); //Dont' take an extra reference.
 }
 
-#ifdef G_OS_LINUX
+#ifdef G_OS_UNIX
 // With a UnixFDList.
 void Connection::call(
   const Glib::ustring&                object_path,
@@ -770,7 +770,7 @@ void Connection::call(
     static_cast<GDBusCallFlags>(flags), timeout_msec, Glib::unwrap(fd_list),
     0, &SignalProxy_async_callback, slot_copy);
 }
-#endif // G_OS_LINUX
+#endif // G_OS_UNIX
 
 void Connection::emit_signal(
   const Glib::ustring&                object_path,
diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg
index cde70db..36a36b6 100644
--- a/gio/src/dbusconnection.hg
+++ b/gio/src/dbusconnection.hg
@@ -726,7 +726,7 @@ public:
     CallFlags                           flags = Gio::DBus::CALL_FLAGS_NONE,
     const Glib::VariantType&            reply_type = Glib::VariantType());
 
-#ifdef G_OS_LINUX
+#ifdef G_OS_UNIX
   /** Like call() but also takes a GUnixFDList object.
    * This method is only available on UNIX.
    *
@@ -788,8 +788,8 @@ public:
    * @throw Glib::Error.
    * @newin{2,34}
    */
-  _WRAP_METHOD(Glib::VariantContainerBase call_finish(const Glib::RefPtr<AsyncResult>& res{.}, Glib::RefPtr<UnixFDList>& out_fd_list{.>>}), g_dbus_connection_call_with_unix_fd_list_finish, errthrow, ifdef G_OS_LINUX)
-#endif // G_OS_LINUX
+  _WRAP_METHOD(Glib::VariantContainerBase call_finish(const Glib::RefPtr<AsyncResult>& res{.}, Glib::RefPtr<UnixFDList>& out_fd_list{.>>}), g_dbus_connection_call_with_unix_fd_list_finish, errthrow, ifdef G_OS_UNIX)
+#endif // G_OS_UNIX
 
   _WRAP_METHOD(
     Glib::VariantContainerBase call_sync(
@@ -805,7 +805,7 @@ public:
       CallFlags                           flags{.} = Gio::DBus::CALL_FLAGS_NONE,
       const Glib::VariantType&            reply_type{.} = Glib::VariantType()
     ),
-    g_dbus_connection_call_with_unix_fd_list_sync, errthrow, ifdef G_OS_LINUX
+    g_dbus_connection_call_with_unix_fd_list_sync, errthrow, ifdef G_OS_UNIX
   )
 
   /** Emits a signal.
diff --git a/gio/src/dbusproxy.ccg b/gio/src/dbusproxy.ccg
index 260dd14..3c93d4b 100644
--- a/gio/src/dbusproxy.ccg
+++ b/gio/src/dbusproxy.ccg
@@ -364,9 +364,9 @@ Glib::VariantContainerBase Proxy::call_sync(
   return Glib::VariantContainerBase(gvariant, false); //Dont' take an extra reference.
 }
 
-#ifdef G_OS_LINUX
+#ifdef G_OS_UNIX
 // With a UnixFDList.
-void Connection::call(
+void Proxy::call(
   const Glib::ustring&                method_name,
   const Glib::VariantContainerBase&   parameters,
   const SlotAsyncReady&               slot,
@@ -387,14 +387,13 @@ void Connection::call(
 }
 
 // Non-cancellable version (with a UnixFDList).
-void Connection::call(
+void Proxy::call(
   const Glib::ustring&                method_name,
   const Glib::VariantContainerBase&   parameters,
   const SlotAsyncReady&               slot,
   const Glib::RefPtr<UnixFDList>&     fd_list,
   int                                 timeout_msec,
-  CallFlags                           flags,
-  const Glib::VariantType&            reply_type)
+  CallFlags                           flags)
 {
   // Create a copy of the slot.
   // A pointer to it will be passed through the callback's data parameter
@@ -406,7 +405,7 @@ void Connection::call(
     static_cast<GDBusCallFlags>(flags), timeout_msec, Glib::unwrap(fd_list),
     0, &SignalProxy_async_callback, slot_copy);
 }
-#endif // G_OS_LINUX
+#endif // G_OS_UNIX
 
 } //namespace DBus
 
diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg
index 1434431..298f9b2 100644
--- a/gio/src/dbusproxy.hg
+++ b/gio/src/dbusproxy.hg
@@ -324,7 +324,7 @@ public:
   );
 
 
-#ifdef G_OS_LINUX
+#ifdef G_OS_UNIX
 //TODO: Use _WRAP_METHOD() for this?
   /** Like call() but also takes a GUnixFDList object.
    * This method is only available on UNIX.
@@ -360,16 +360,12 @@ public:
    * @newin{2,34}
    */
   void call(
-    const Glib::ustring&                object_path,
-    const Glib::ustring&                interface_name,
     const Glib::ustring&                method_name,
     const Glib::VariantContainerBase&   parameters,
     const SlotAsyncReady&               slot,
     const Glib::RefPtr<UnixFDList>&     fd_list,
-    const Glib::ustring&                bus_name = Glib::ustring(),
     int                                 timeout_msec = -1,
-    CallFlags                           flags = Gio::DBus::CALL_FLAGS_NONE,
-    const Glib::VariantType&            reply_type = Glib::VariantType());
+    CallFlags                           flags = Gio::DBus::CALL_FLAGS_NONE);
 
   /** Finishes an operation started with call() (with a UnixFDList).
    * @param res A AsyncResult obtained from the SlotAsyncReady passed to
@@ -378,8 +374,8 @@ public:
    * @throw Glib::Error.
    * @newin{2,34}
    */
-  _WRAP_METHOD(Glib::VariantContainerBase call_finish(const Glib::RefPtr<AsyncResult>& res{.}, Glib::RefPtr<UnixFDList>& out_fd_list{.>>}), g_dbus_proxy_call_with_unix_fd_list_finish, errthrow, ifdef G_OS_LINUX)
-#endif // G_OS_LINUX
+  _WRAP_METHOD(Glib::VariantContainerBase call_finish(const Glib::RefPtr<AsyncResult>& res{.}, Glib::RefPtr<UnixFDList>& out_fd_list{.>>}), g_dbus_proxy_call_with_unix_fd_list_finish, errthrow, ifdef G_OS_UNIX)
+#endif // G_OS_UNIX
 
   _WRAP_METHOD(
     Glib::VariantContainerBase call_sync(
@@ -391,7 +387,7 @@ public:
       int                                 timeout_msec{.} = -1,
       CallFlags                           flags{.} = Gio::DBus::CALL_FLAGS_NONE
     ),
-    g_dbus_proxy_call_with_unix_fd_list_sync, errthrow, ifdef G_OS_LINUX
+    g_dbus_proxy_call_with_unix_fd_list_sync, errthrow, ifdef G_OS_UNIX
   )
 
  //_WRAP_PROPERTY("g-bus-type", BusType) // write-only construct-only



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