[glib/gdbus-merge] GDBus: Nuke G_BUS_TYPE_NONE



commit 68078ed648eec314507ff997e89b053a1d9a6891
Author: David Zeuthen <davidz redhat com>
Date:   Thu May 13 18:04:48 2010 -0400

    GDBus: Nuke G_BUS_TYPE_NONE

 gio/gdbusnameowning.c    |    1 -
 gio/gdbusnamewatching.c  |    1 -
 gio/gdbusproxywatching.c |    3 +--
 gio/gioenums.h           |   12 +++++-------
 gio/tests/gdbus-peer.c   |    1 -
 5 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c
index ead9a5f..e149132 100644
--- a/gio/gdbusnameowning.c
+++ b/gio/gdbusnameowning.c
@@ -591,7 +591,6 @@ g_bus_own_name (GBusType                  bus_type,
 {
   Client *client;
 
-  g_return_val_if_fail (bus_type != G_BUS_TYPE_NONE, 0);
   g_return_val_if_fail (g_dbus_is_name (name) && !g_dbus_is_unique_name (name), 0);
 
   G_LOCK (lock);
diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c
index f93a2ce..9fe944d 100644
--- a/gio/gdbusnamewatching.c
+++ b/gio/gdbusnamewatching.c
@@ -551,7 +551,6 @@ g_bus_watch_name (GBusType                  bus_type,
 {
   Client *client;
 
-  g_return_val_if_fail (bus_type != G_BUS_TYPE_NONE, 0);
   g_return_val_if_fail (g_dbus_is_name (name), 0);
 
   G_LOCK (lock);
diff --git a/gio/gdbusproxywatching.c b/gio/gdbusproxywatching.c
index 282254d..2edcb82 100644
--- a/gio/gdbusproxywatching.c
+++ b/gio/gdbusproxywatching.c
@@ -255,7 +255,7 @@ on_name_vanished (GDBusConnection *connection,
 
 /**
  * g_bus_watch_proxy:
- * @bus_type: The type of bus to watch a name on (can't be #G_BUS_TYPE_NONE).
+ * @bus_type: The type of bus to watch a name on.
  * @name: The name (well-known or unique) to watch.
  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
  * @object_path: The object path of the remote object to watch.
@@ -318,7 +318,6 @@ g_bus_watch_proxy (GBusType                   bus_type,
 {
   Client *client;
 
-  g_return_val_if_fail (bus_type != G_BUS_TYPE_NONE, 0);
   g_return_val_if_fail (g_dbus_is_name (name), 0);
   g_return_val_if_fail (g_variant_is_object_path (object_path), 0);
   g_return_val_if_fail (g_dbus_is_interface_name (interface_name), 0);
diff --git a/gio/gioenums.h b/gio/gioenums.h
index 71ed59a..936f991 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -740,21 +740,19 @@ typedef enum {
 
 /**
  * GBusType:
- * @G_BUS_TYPE_NONE: Not a message bus connection.
- * @G_BUS_TYPE_SESSION: The login session message bus.
+ * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
  * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
- * @G_BUS_TYPE_STARTER: Connect to the bus that activated the program.
+ * @G_BUS_TYPE_SESSION: The login session message bus.
  *
- * An enumeration to specify the type of a #GDBusConnection.
+ * An enumeration for well-known message buses.
  *
  * Since: 2.26
  */
 typedef enum
 {
-  G_BUS_TYPE_NONE    = -1,
-  G_BUS_TYPE_SESSION = 0,
+  G_BUS_TYPE_STARTER = 0,
   G_BUS_TYPE_SYSTEM  = 1,
-  G_BUS_TYPE_STARTER = 2
+  G_BUS_TYPE_SESSION = 2
 } GBusType;
 
 /**
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index 2444a1d..63ddc6d 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -510,7 +510,6 @@ test_peer (void)
     g_main_loop_run (loop);
   g_assert_cmpint (data.current_connections->len, ==, 1);
   g_assert_cmpint (data.num_connection_attempts, ==, 1);
-  //g_assert (g_dbus_connection_get_bus_type (c) == G_BUS_TYPE_NONE);
   g_assert (g_dbus_connection_get_unique_name (c) == NULL);
   g_assert_cmpstr (g_dbus_connection_get_guid (c), ==, test_guid);
 



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