diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-02 13:29:32 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-02 13:29:32 +0100 |
commit | a9f4bc06fe2a5a46081c7b27afc229ba9560ae0a (patch) | |
tree | 35b0167e96d38caeba9e243a4d8f97bde1081566 | |
parent | c3c3bb5c6f22269e0a130f96917972ad7263316c (diff) |
Adapt for removal of TpDBusDaemonnext-factory
-rw-r--r-- | src/call-content.c | 2 | ||||
-rw-r--r-- | src/call-stream.c | 2 | ||||
-rw-r--r-- | src/conn-sidecars.c | 8 | ||||
-rw-r--r-- | src/connection.c | 10 | ||||
-rw-r--r-- | src/connection.h | 3 | ||||
-rw-r--r-- | src/server-tls-channel.c | 2 | ||||
-rw-r--r-- | src/tls-certificate.c | 21 |
7 files changed, 17 insertions, 31 deletions
diff --git a/src/call-content.c b/src/call-content.c index da9494d1d..a25d894b9 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 fc64d5018..bedc071b5 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 cd1aea1ea..4229be78d 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 88202bbaa..dc5e232a8 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 76a3807ee..c3ab12139 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 7b3c0c658..4cd5fccdc 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 0cada47ca..9b5a208b5 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, |