]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2006-02-15 John (J5) Palmieri <johnp@redhat.com>
authorJohn (J5) Palmieri <johnp@redhat.com>
Wed, 15 Feb 2006 21:42:54 +0000 (21:42 +0000)
committerJohn (J5) Palmieri <johnp@redhat.com>
Wed, 15 Feb 2006 21:42:54 +0000 (21:42 +0000)
* dbus/dbus-glib.h:
* glib/dbus-gmain.h:
(dbus_g_connection_open): new method for openning
a connection to an arbitrary address in the glib bindings

* ChangeLog: checkin last entry which doesn't seem to be commited

ChangeLog
dbus/dbus-glib.h
glib/dbus-gmain.c

index f60c515e370c1c532988a111d9b687b509fd74de..5055ea5eec23400abf82e394ef418516aa8b73cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-02-15  John (J5) Palmieri  <johnp@redhat.com>
+
+       * dbus/dbus-glib.h:
+       * glib/dbus-gmain.h:
+       (dbus_g_connection_open): new method for openning
+       a connection to an arbitrary address in the glib bindings
+
+       * ChangeLog: checkin last entry which doesn't seem to be commited
+
+2006-02-13  John (J5) Palmieri  <johnp@redhat.com>
+
+       * tools/dbus-launch.c: Fixed sh syntax output
+
 2006-02-13  Robert McQueen  <robot101@debian.org>
 
        * glib/dbus-binding-tool-glib.c, glib/dbus-gmain.c,
@@ -14,6 +27,7 @@
        but it's now possible to store these in arrays, emit them in
        signals, etc.
 
+>>>>>>> 1.959
 2006-02-10  John (J5) Palmieri  <johnp@redhat.com>
 
        * dbus/dbus-signature.c (dbus_signature_iter_recurse): Correctly
index 217ce74a07c9ba2d1c86005bb3202fcbb1c8504f..1c319259c38966e696e3b9ec7491bc37908c9e3c 100644 (file)
@@ -68,8 +68,11 @@ gboolean         dbus_g_error_has_name    (GError      *error,
 const char *     dbus_g_error_get_name    (GError      *error);
 
 void             dbus_g_thread_init (void);
-DBusGConnection* dbus_g_bus_get     (DBusBusType   type,
-                                     GError      **error);
+
+DBusGConnection* dbus_g_connection_open (const gchar  *address,
+                                         GError      **error);
+DBusGConnection* dbus_g_bus_get         (DBusBusType   type,
+                                         GError      **error);
 
 typedef struct _DBusGObjectInfo DBusGObjectInfo;
 typedef struct _DBusGMethodInfo DBusGMethodInfo;
index 267f0bfa880c25ae078abdc7852f5e03be09acc1..d2716103f18fbb68b6f145df5826c3b1acd2ced7 100644 (file)
@@ -696,6 +696,43 @@ dbus_server_setup_with_g_main (DBusServer   *server,
   g_error ("Not enough memory to set up DBusServer for use with GLib");
 }
 
+/**
+ * Returns a connection to the given address.
+ * 
+ * (Internally, calls dbus_connection_open() then calls
+ * dbus_connection_setup_with_g_main() on the result.)
+ *
+ * @param address address of the connection to open 
+ * @param error address where an error can be returned.
+ * @returns a DBusConnection
+ */
+DBusGConnection*
+dbus_g_connection_open (const gchar  *address,
+                        GError      **error)
+{
+  DBusConnection *connection;
+  DBusError derror;
+
+  g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+  _dbus_g_value_types_init ();
+  
+  dbus_error_init (&derror);
+
+  connection = dbus_connection_open (socket, &derror);
+  if (connection == NULL)
+    {
+      dbus_set_g_error (error, &derror);
+      dbus_error_free (&derror);
+      return NULL;
+    }
+
+  /* does nothing if it's already been done */
+  dbus_connection_setup_with_g_main (connection, NULL);
+
+  return DBUS_G_CONNECTION_FROM_CONNECTION (connection);
+}
+
 /**
  * Returns a connection to the given bus. The connection is a global variable
  * shared with other callers of this function.