diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-04-24 14:27:46 +0200 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-04-25 18:11:13 +0200 |
commit | 96f71247990d446ee27cae012b431550d7c40068 (patch) | |
tree | 5ec72b30f1c9b3e26ba9fcab1c268855cddfc761 | |
parent | 16f01f6e73c09bce16c1d497d16e32d885045124 (diff) |
tp_automatic_client_factory_new() now returns a TpSimpleClientFactory*
All useful API is on the base class, so returning a TpAutomaticClientFactory
is useless and force ugly casting. It is common usage to return
base class.
-rw-r--r-- | telepathy-glib/automatic-client-factory.c | 2 | ||||
-rw-r--r-- | telepathy-glib/automatic-client-factory.h | 2 | ||||
-rw-r--r-- | telepathy-glib/base-client.c | 4 | ||||
-rw-r--r-- | telepathy-glib/proxy.c | 3 | ||||
-rw-r--r-- | tests/dbus/call-channel.c | 3 |
5 files changed, 6 insertions, 8 deletions
diff --git a/telepathy-glib/automatic-client-factory.c b/telepathy-glib/automatic-client-factory.c index a63a82a38..6c1fcc583 100644 --- a/telepathy-glib/automatic-client-factory.c +++ b/telepathy-glib/automatic-client-factory.c @@ -277,7 +277,7 @@ tp_automatic_client_factory_class_init (TpAutomaticClientFactoryClass *cls) * * Since: 0.15.5 */ -TpAutomaticClientFactory * +TpSimpleClientFactory * tp_automatic_client_factory_new (TpDBusDaemon *dbus) { return g_object_new (TP_TYPE_AUTOMATIC_CLIENT_FACTORY, diff --git a/telepathy-glib/automatic-client-factory.h b/telepathy-glib/automatic-client-factory.h index 2f7c88083..8601adea6 100644 --- a/telepathy-glib/automatic-client-factory.h +++ b/telepathy-glib/automatic-client-factory.h @@ -61,7 +61,7 @@ GType tp_automatic_client_factory_get_type (void); (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_AUTOMATIC_CLIENT_FACTORY, \ TpAutomaticClientFactoryClass)) -TpAutomaticClientFactory *tp_automatic_client_factory_new (TpDBusDaemon *dbus); +TpSimpleClientFactory *tp_automatic_client_factory_new (TpDBusDaemon *dbus); G_END_DECLS diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c index 0b361569e..029ec1f28 100644 --- a/telepathy-glib/base-client.c +++ b/telepathy-glib/base-client.c @@ -1156,8 +1156,8 @@ tp_base_client_constructed (GObject *object) if (self->priv->dbus == NULL) self->priv->dbus = tp_dbus_daemon_dup (NULL); - self->priv->factory = (TpSimpleClientFactory *) - tp_automatic_client_factory_new (self->priv->dbus); + self->priv->factory = tp_automatic_client_factory_new ( + self->priv->dbus); } } diff --git a/telepathy-glib/proxy.c b/telepathy-glib/proxy.c index 8835e4ac2..a359bdbbb 100644 --- a/telepathy-glib/proxy.c +++ b/telepathy-glib/proxy.c @@ -1406,8 +1406,7 @@ _tp_proxy_ensure_factory (gpointer proxy, } else { - self->priv->factory = (TpSimpleClientFactory *) - tp_automatic_client_factory_new (self->dbus_daemon); + self->priv->factory = tp_automatic_client_factory_new (self->dbus_daemon); } _tp_simple_client_factory_insert_proxy (self->priv->factory, self); diff --git a/tests/dbus/call-channel.c b/tests/dbus/call-channel.c index 528912e7d..71c53b7ae 100644 --- a/tests/dbus/call-channel.c +++ b/tests/dbus/call-channel.c @@ -107,8 +107,7 @@ setup (Test *test, "example", parameters, &bus_name, &object_path, &test->error, NULL); g_assert_no_error (test->error); - test->factory = (TpSimpleClientFactory *) - tp_automatic_client_factory_new (test->dbus); + test->factory = tp_automatic_client_factory_new (test->dbus); tp_simple_client_factory_add_channel_features_varargs (test->factory, TP_CHANNEL_FEATURE_CONTACTS, 0); |