telepathy-logger: TplCallChannel, TplTextChannel: Do not take TpAccount arg in constructor
Xavier Claessens
xclaesse at kemper.freedesktop.org
Thu Jul 5 08:06:42 PDT 2012
Module: telepathy-logger
Branch: master
Commit: d9b0a90777b544b2d6db688b403ae14c2defd99a
URL: http://cgit.freedesktop.org/telepathy/telepathy-logger/commit/?id=d9b0a90777b544b2d6db688b403ae14c2defd99a
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Tue Jul 3 17:24:49 2012 +0200
TplCallChannel, TplTextChannel: Do not take TpAccount arg in constructor
It can be taken from the TpConnection
---
telepathy-logger/call-channel-internal.h | 1 -
telepathy-logger/call-channel.c | 5 +----
telepathy-logger/text-channel-internal.h | 2 +-
telepathy-logger/text-channel.c | 5 +----
4 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/telepathy-logger/call-channel-internal.h b/telepathy-logger/call-channel-internal.h
index a03bfa1..e86ce05 100644
--- a/telepathy-logger/call-channel-internal.h
+++ b/telepathy-logger/call-channel-internal.h
@@ -63,7 +63,6 @@ GType _tpl_call_channel_get_type (void);
TplCallChannel * _tpl_call_channel_new (TpConnection *conn,
const gchar *object_path,
GHashTable *tp_chan_props,
- TpAccount *account,
GError **error);
G_END_DECLS
diff --git a/telepathy-logger/call-channel.c b/telepathy-logger/call-channel.c
index 3c188c0..29fc57a 100644
--- a/telepathy-logger/call-channel.c
+++ b/telepathy-logger/call-channel.c
@@ -470,7 +470,6 @@ _tpl_call_channel_init (TplCallChannel *self)
* @object_path: the channel's DBus path
* @tp_chan_props: channel's immutable properties, obtained for example by
* %tp_channel_borrow_immutable_properties()
- * @account: TpAccount instance, related to the new #TplCallChannel
* @error: location of the GError, used in case a problem is raised while
* creating the channel
*
@@ -493,7 +492,6 @@ TplCallChannel *
_tpl_call_channel_new (TpConnection *conn,
const gchar *object_path,
GHashTable *tp_chan_props,
- TpAccount *account,
GError **error)
{
TpProxy *conn_proxy = TP_PROXY (conn);
@@ -503,7 +501,6 @@ _tpl_call_channel_new (TpConnection *conn,
* specific properties */
g_return_val_if_fail (TP_IS_CONNECTION (conn), NULL);
- g_return_val_if_fail (TP_IS_ACCOUNT (account), NULL);
g_return_val_if_fail (!TPL_STR_EMPTY (object_path), NULL);
g_return_val_if_fail (tp_chan_props != NULL, NULL);
@@ -519,7 +516,7 @@ _tpl_call_channel_new (TpConnection *conn,
"channel-properties", tp_chan_props,
NULL);
- self->priv->account = g_object_ref (account);
+ self->priv->account = g_object_ref (tp_connection_get_account (conn));
return self;
}
diff --git a/telepathy-logger/text-channel-internal.h b/telepathy-logger/text-channel-internal.h
index 20a98f0..d74c9bf 100644
--- a/telepathy-logger/text-channel-internal.h
+++ b/telepathy-logger/text-channel-internal.h
@@ -67,7 +67,7 @@ typedef struct
GType _tpl_text_channel_get_type (void);
TplTextChannel * _tpl_text_channel_new (TpConnection *conn,
- const gchar *object_path, GHashTable *tp_chan_props, TpAccount *account,
+ const gchar *object_path, GHashTable *tp_chan_props,
GError **error);
G_END_DECLS
diff --git a/telepathy-logger/text-channel.c b/telepathy-logger/text-channel.c
index c79c723..6307f9e 100644
--- a/telepathy-logger/text-channel.c
+++ b/telepathy-logger/text-channel.c
@@ -835,7 +835,6 @@ _tpl_text_channel_init (TplTextChannel *self)
* @object_path: the channel's DBus path
* @tp_chan_props: channel's immutable properties, obtained for example by
* %tp_channel_borrow_immutable_properties()
- * @account: TpAccount instance, related to the new #TplTextChannel
* @error: location of the GError, used in case a problem is raised while
* creating the channel
*
@@ -858,7 +857,6 @@ TplTextChannel *
_tpl_text_channel_new (TpConnection *conn,
const gchar *object_path,
GHashTable *tp_chan_props,
- TpAccount *account,
GError **error)
{
TpProxy *conn_proxy = TP_PROXY (conn);
@@ -867,7 +865,6 @@ _tpl_text_channel_new (TpConnection *conn,
/* Do what tpl_channel_new does + set TplTextChannel specific */
g_return_val_if_fail (TP_IS_CONNECTION (conn), NULL);
- g_return_val_if_fail (TP_IS_ACCOUNT (account), NULL);
g_return_val_if_fail (!TPL_STR_EMPTY (object_path), NULL);
g_return_val_if_fail (tp_chan_props != NULL, NULL);
@@ -884,7 +881,7 @@ _tpl_text_channel_new (TpConnection *conn,
"channel-properties", tp_chan_props,
NULL);
- self->priv->account = g_object_ref (account);
+ self->priv->account = g_object_ref (tp_connection_get_account (conn));
return self;
}
More information about the telepathy-commits
mailing list