[glibmm] Gio::DBus::Connection::emit_signal(): Say why convert empty strings.



commit 69d8fbe6ac19810ce7602f08b7170fe74aa4ffdc
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Thu Jun 9 15:38:01 2011 -0400

    Gio::DBus::Connection::emit_signal(): Say why convert empty strings.
    
    	* gio/src/dbusconnection.ccg (emit_signal): Explain why empty strings
    	are converted to NULL when passed to the C API.

 ChangeLog                  |    7 +++++++
 gio/src/dbusconnection.ccg |    4 ++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7485956..0fd9d0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-09  José Alburquerque  <jaalburqu svn gnome org>
+
+	Gio::DBus::Connection::emit_signal(): Say why convert empty strings.
+
+	* gio/src/dbusconnection.ccg (emit_signal): Explain why empty strings
+	are converted to NULL when passed to the C API.
+
 2011-06-08  José Alburquerque  <jaalburqu svn gnome org>
 
 	Gio::DBus::Connection::emit_signal(): Replace empty strings with NULL.
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg
index 64e2424..c874066 100644
--- a/gio/src/dbusconnection.ccg
+++ b/gio/src/dbusconnection.ccg
@@ -761,6 +761,10 @@ void Connection::emit_signal(
 {
   GError* gerror = 0;
 
+  // Strings are checked to see if they are empty so that NULL can be passed
+  // for those strings to the C API.  This is done because some strings such as
+  // the bus name can be NULL in the C API meaning that the signal should be
+  // emitted to all the listeners.
   g_dbus_connection_emit_signal(gobj(),
     (destination_bus_name.empty() ? 0 : destination_bus_name.c_str()),
     (object_path.empty()? 0 : object_path.c_str()),



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