aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-21 22:02:36 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-27 21:11:27 +0800
commitef81d18e65bb14cbd98cf07eb9d899f9c628d70e (patch)
tree42acf7d7bd2319abaeb51fe970235cac7ecd5919 /libempathy
parenta3d1d0df9e007c2d59c03ecaecf19321f60151c1 (diff)
downloadgsoc2013-empathy-ef81d18e65bb14cbd98cf07eb9d899f9c628d70e.tar
gsoc2013-empathy-ef81d18e65bb14cbd98cf07eb9d899f9c628d70e.tar.gz
gsoc2013-empathy-ef81d18e65bb14cbd98cf07eb9d899f9c628d70e.tar.bz2
gsoc2013-empathy-ef81d18e65bb14cbd98cf07eb9d899f9c628d70e.tar.lz
gsoc2013-empathy-ef81d18e65bb14cbd98cf07eb9d899f9c628d70e.tar.xz
gsoc2013-empathy-ef81d18e65bb14cbd98cf07eb9d899f9c628d70e.tar.zst
gsoc2013-empathy-ef81d18e65bb14cbd98cf07eb9d899f9c628d70e.zip
remove empathy_tp_file_is_incoming()
https://bugzilla.gnome.org/show_bug.cgi?id=658245
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-ft-handler.c2
-rw-r--r--libempathy/empathy-tp-file.c23
-rw-r--r--libempathy/empathy-tp-file.h2
3 files changed, 3 insertions, 24 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index 83557d480..1b4edcc56 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -1589,7 +1589,7 @@ empathy_ft_handler_is_incoming (EmpathyFTHandler *handler)
if (priv->tpfile == NULL)
return FALSE;
- return empathy_tp_file_is_incoming (priv->tpfile);
+ return !tp_channel_get_requested ((TpChannel *) priv->tpfile);
}
/**
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index d6d565654..7698ce7e1 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -76,7 +76,6 @@ struct _EmpathyTpFilePrivate {
TpSocketAccessControl socket_access_control;
/* transfer properties */
- gboolean incoming;
gint64 start_time;
GArray *socket_address;
guint port;
@@ -335,7 +334,7 @@ tp_file_start_transfer (EmpathyTpFile *self)
if (self->priv->progress_callback != NULL)
self->priv->progress_callback (self, 0, self->priv->progress_user_data);
- if (self->priv->incoming)
+ if (!tp_channel_get_requested ((TpChannel *) self))
{
GInputStream *socket_stream;
@@ -421,7 +420,7 @@ tp_file_state_changed_cb (TpChannel *proxy,
"old state = %u, state = %u, reason = %u\n"
"\tincoming = %s, in_stream = %s, out_stream = %s",
self->priv->state, state, reason,
- self->priv->incoming ? "yes" : "no",
+ tp_channel_get_requested (proxy) ? "no" : "yes",
self->priv->in_stream ? "present" : "not present",
self->priv->out_stream ? "present" : "not present");
@@ -723,8 +722,6 @@ do_constructed (GObject *object)
g_signal_connect (self, "invalidated",
G_CALLBACK (tp_file_invalidated_cb), self);
- self->priv->incoming = !tp_channel_get_requested (channel);
-
tp_cli_channel_type_file_transfer_connect_to_file_transfer_state_changed (
channel, tp_file_state_changed_cb, NULL, NULL, object, NULL);
@@ -869,22 +866,6 @@ empathy_tp_file_offer (EmpathyTpFile *self,
}
/**
- * empathy_tp_file_is_incoming:
- * @self: an #EmpathyTpFile
- *
- * Returns whether @self is incoming.
- *
- * Return value: %TRUE if the @self is incoming, otherwise %FALSE
- */
-gboolean
-empathy_tp_file_is_incoming (EmpathyTpFile *self)
-{
- g_return_val_if_fail (EMPATHY_IS_TP_FILE (self), FALSE);
-
- return self->priv->incoming;
-}
-
-/**
* empathy_tp_file_cancel:
* @self: an #EmpathyTpFile
*
diff --git a/libempathy/empathy-tp-file.h b/libempathy/empathy-tp-file.h
index 7d8520426..6afb806df 100644
--- a/libempathy/empathy-tp-file.h
+++ b/libempathy/empathy-tp-file.h
@@ -122,8 +122,6 @@ void empathy_tp_file_offer (EmpathyTpFile *tp_file,
void empathy_tp_file_cancel (EmpathyTpFile *tp_file);
void empathy_tp_file_close (EmpathyTpFile *tp_file);
-gboolean empathy_tp_file_is_incoming (EmpathyTpFile *tp_file);
-
G_END_DECLS
#endif /* __EMPATHY_TP_FILE_H__ */