[Pkg-telepathy-commits] [telepathy-gabble-1] 01/11: Imported Upstream version 0.99.8+21+ga9f4bc0

Simon McVittie smcv at debian.org
Wed May 14 12:08:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-gabble-1.

commit 1a19dbe65458728607438f7ab118e26a92cd3c6e
Author: Simon McVittie <smcv at debian.org>
Date:   Wed Apr 2 17:13:50 2014 +0100

    Imported Upstream version 0.99.8+21+ga9f4bc0
---
 ChangeLog                |  6 ++++++
 src/call-content.c       |  2 +-
 src/call-stream.c        |  2 +-
 src/conn-sidecars.c      |  8 ++++----
 src/connection.c         | 10 ----------
 src/connection.h         |  3 ---
 src/server-tls-channel.c |  2 +-
 src/tls-certificate.c    | 21 ++++++++++-----------
 8 files changed, 23 insertions(+), 31 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2427af5..1a5cd15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+commit a9f4bc06fe2a5a46081c7b27afc229ba9560ae0a
+Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date:   2014-04-02 13:29:32 +0100
+
+    Adapt for removal of TpDBusDaemon
+
 commit c3c3bb5c6f22269e0a130f96917972ad7263316c
 Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
 Date:   2014-03-24 20:12:03 +0000
diff --git a/src/call-content.c b/src/call-content.c
index da9494d..a25d894 100644
--- a/src/call-content.c
+++ b/src/call-content.c
@@ -150,7 +150,7 @@ gabble_call_content_new_offer (GabbleCallContent *self,
 
   /* FIXME: no idea... */
   md = tp_call_content_media_description_new (
-      tp_base_connection_get_dbus_daemon (conn), path, handle,
+      tp_base_connection_get_dbus_connection (conn), path, handle,
       (content != NULL), (content == NULL));
 
   if (content != NULL)
diff --git a/src/call-stream.c b/src/call-stream.c
index fc64d50..bedc071 100644
--- a/src/call-stream.c
+++ b/src/call-stream.c
@@ -264,7 +264,7 @@ _hook_up_endpoint (GabbleCallStream *self,
 {
   TpBaseCallStream *base = (TpBaseCallStream *) self;
   TpBaseConnection *conn = tp_base_call_stream_get_connection (base);
-  TpDBusDaemon *bus = tp_base_connection_get_dbus_daemon (conn);
+  GDBusConnection *bus = tp_base_connection_get_dbus_connection (conn);
   TpCallStreamEndpoint *endpoint;
   TpStreamTransportType type = 0;
   GPtrArray *tp_candidates;
diff --git a/src/conn-sidecars.c b/src/conn-sidecars.c
index cd1aea1..4229be7 100644
--- a/src/conn-sidecars.c
+++ b/src/conn-sidecars.c
@@ -85,11 +85,11 @@ connection_install_sidecar (
     GabbleSidecar *sidecar,
     const gchar *sidecar_iface)
 {
-  TpDBusDaemon *bus = tp_base_connection_get_dbus_daemon (
+  GDBusConnection *bus = tp_base_connection_get_dbus_connection (
       (TpBaseConnection *) conn);
   gchar *path = make_sidecar_path (conn, sidecar_iface);
 
-  tp_dbus_daemon_register_object (bus, path, G_OBJECT (sidecar));
+  tp_dbus_connection_register_object (bus, path, G_OBJECT (sidecar));
   g_hash_table_insert (conn->sidecars, g_strdup (sidecar_iface),
       g_object_ref (sidecar));
 
@@ -286,7 +286,7 @@ sidecars_conn_status_changed_cb (
     guint reason,
     gpointer unused)
 {
-  TpDBusDaemon *bus = tp_base_connection_get_dbus_daemon (
+  GDBusConnection *bus = tp_base_connection_get_dbus_connection (
       (TpBaseConnection *) conn);
   GHashTableIter iter;
   gpointer key, value;
@@ -298,7 +298,7 @@ sidecars_conn_status_changed_cb (
       while (g_hash_table_iter_next (&iter, NULL, &value))
         {
           DEBUG ("removing %s from the bus", gabble_sidecar_get_interface (value));
-          tp_dbus_daemon_unregister_object (bus, G_OBJECT (value));
+          tp_dbus_connection_unregister_object (bus, G_OBJECT (value));
         }
 
       g_hash_table_iter_init (&iter, conn->pending_sidecars);
diff --git a/src/connection.c b/src/connection.c
index 88202bb..dc5e232 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -510,19 +510,11 @@ gabble_connection_constructed (GObject *object)
 static void
 gabble_connection_init (GabbleConnection *self)
 {
-  GError *error = NULL;
   GabbleConnectionPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
       GABBLE_TYPE_CONNECTION, GabbleConnectionPrivate);
 
   DEBUG("Initializing (GabbleConnection *)%p", self);
 
-  self->daemon = tp_dbus_daemon_dup (&error);
-
-  if (self->daemon == NULL)
-    {
-      g_error ("Failed to connect to dbus daemon: %s", error->message);
-    }
-
   self->priv = priv;
   priv->iq_reply_cancellable = g_cancellable_new ();
 
@@ -1277,8 +1269,6 @@ gabble_connection_dispose (GObject *object)
 
   conn_sidecars_dispose (self);
 
-  tp_clear_object (&self->daemon);
-
   if (G_OBJECT_CLASS (gabble_connection_parent_class)->dispose)
     G_OBJECT_CLASS (gabble_connection_parent_class)->dispose (object);
 }
diff --git a/src/connection.h b/src/connection.h
index 76a3807..c3ab121 100644
--- a/src/connection.h
+++ b/src/connection.h
@@ -174,9 +174,6 @@ struct _GabbleConnection {
     TpBaseConnection parent;
     TpPresenceMixin presence;
 
-    /* DBus daemon instance */
-    TpDBusDaemon *daemon;
-
     WockySession *session;
 
     /* channel factories borrowed from TpBaseConnection's list */
diff --git a/src/server-tls-channel.c b/src/server-tls-channel.c
index 7b3c0c6..4cd5fcc 100644
--- a/src/server-tls-channel.c
+++ b/src/server-tls-channel.c
@@ -195,7 +195,7 @@ gabble_server_tls_channel_constructed (GObject *object)
       "object-path", cert_object_path,
       "certificate-chain-data", certificates,
       "certificate-type", cert_type_to_str (cert_type),
-      "dbus-daemon", GABBLE_CONNECTION (base_conn)->daemon,
+      "dbus-connection", tp_base_connection_get_dbus_connection (base_conn),
       NULL);
   self->priv->server_cert_path = cert_object_path;
 
diff --git a/src/tls-certificate.c b/src/tls-certificate.c
index 0cada47..9b5a208 100644
--- a/src/tls-certificate.c
+++ b/src/tls-certificate.c
@@ -47,7 +47,7 @@ struct _GabbleTLSCertificatePrivate {
   GPtrArray *rejections;
   GPtrArray *cert_data;
 
-  TpDBusDaemon *daemon;
+  GDBusConnection *dbus_connection;
 
   gboolean dispose_has_run;
 };
@@ -60,7 +60,7 @@ enum {
   PROP_CERTIFICATE_CHAIN_DATA,
 
   /* not exported */
-  PROP_DBUS_DAEMON,
+  PROP_DBUS_CONNECTION,
 
   NUM_PROPERTIES
 };
@@ -115,8 +115,8 @@ gabble_tls_certificate_set_property (GObject *object,
     case PROP_CERTIFICATE_CHAIN_DATA:
       self->priv->cert_data = g_value_dup_boxed (value);
       break;
-    case PROP_DBUS_DAEMON:
-      self->priv->daemon = g_value_dup_object (value);
+    case PROP_DBUS_CONNECTION:
+      self->priv->dbus_connection = g_value_dup_object (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, value);
@@ -149,7 +149,7 @@ gabble_tls_certificate_dispose (GObject *object)
 
   self->priv->dispose_has_run = TRUE;
 
-  tp_clear_object (&self->priv->daemon);
+  g_clear_object (&self->priv->dbus_connection);
 
   G_OBJECT_CLASS (gabble_tls_certificate_parent_class)->dispose (object);
 }
@@ -165,7 +165,7 @@ gabble_tls_certificate_constructed (GObject *object)
     chain_up (object);
 
   /* register the certificate on the bus */
-  tp_dbus_daemon_register_object (self->priv->daemon,
+  tp_dbus_connection_register_object (self->priv->dbus_connection,
       self->priv->object_path, self);
 }
 
@@ -242,12 +242,11 @@ gabble_tls_certificate_class_init (GabbleTLSCertificateClass *klass)
       G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
   g_object_class_install_property (oclass, PROP_CERTIFICATE_CHAIN_DATA, pspec);
 
-  pspec = g_param_spec_object ("dbus-daemon",
-      "The DBus daemon connection",
-      "The connection to the DBus daemon owning the CM",
-      TP_TYPE_DBUS_DAEMON,
+  pspec = g_param_spec_object ("dbus-connection",
+      "D-Bus connection", "D-Bus connection",
+      G_TYPE_DBUS_CONNECTION,
       G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
-  g_object_class_install_property (oclass, PROP_DBUS_DAEMON, pspec);
+  g_object_class_install_property (oclass, PROP_DBUS_CONNECTION, pspec);
 
   klass->dbus_props_class.interfaces = prop_interfaces;
   tp_dbus_properties_mixin_class_init (oclass,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-gabble-1.git



More information about the Pkg-telepathy-commits mailing list