aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-02-21 00:26:15 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-02-21 00:26:15 +0800
commit07a5cbcf40dfeb175e2c8f269d92ac236d989d31 (patch)
treeeba194e6eae701033c9583d213c109734bf65064
parent3d16b945cf3a9e460bd542f827676c8914325075 (diff)
downloadgsoc2013-empathy-07a5cbcf40dfeb175e2c8f269d92ac236d989d31.tar
gsoc2013-empathy-07a5cbcf40dfeb175e2c8f269d92ac236d989d31.tar.gz
gsoc2013-empathy-07a5cbcf40dfeb175e2c8f269d92ac236d989d31.tar.bz2
gsoc2013-empathy-07a5cbcf40dfeb175e2c8f269d92ac236d989d31.tar.lz
gsoc2013-empathy-07a5cbcf40dfeb175e2c8f269d92ac236d989d31.tar.xz
gsoc2013-empathy-07a5cbcf40dfeb175e2c8f269d92ac236d989d31.tar.zst
gsoc2013-empathy-07a5cbcf40dfeb175e2c8f269d92ac236d989d31.zip
Use tp-glib generated code for file transfers rather than extensions.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=2523
-rw-r--r--libempathy/empathy-dispatch-operation.c2
-rw-r--r--libempathy/empathy-dispatcher.c14
-rw-r--r--libempathy/empathy-tp-contact-factory.c2
-rw-r--r--libempathy/empathy-tp-file.c56
-rw-r--r--libempathy/empathy-tp-file.h3
-rw-r--r--src/empathy-event-manager.c2
-rw-r--r--src/empathy-ft-manager.c56
-rw-r--r--src/empathy.c2
8 files changed, 68 insertions, 69 deletions
diff --git a/libempathy/empathy-dispatch-operation.c b/libempathy/empathy-dispatch-operation.c
index ee5b64d96..1786e4169 100644
--- a/libempathy/empathy-dispatch-operation.c
+++ b/libempathy/empathy-dispatch-operation.c
@@ -403,7 +403,7 @@ empathy_dispatch_operation_channel_ready_cb (TpChannel *channel,
priv->channel_wrapper = G_OBJECT (call);
}
- else if (channel_type == EMP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
+ else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
{
EmpathyTpFile *file = empathy_tp_file_new (channel);
priv->channel_wrapper = G_OBJECT (file);
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index ab00503c8..38eb71a9e 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -543,7 +543,7 @@ dispatcher_connection_new_channel (EmpathyDispatcher *dispatcher,
* doesn't make sense to handle it if we didn't request it. The same goes
* for channels we discovered by the Channels property or ListChannels */
if (!incoming && tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT)
- && tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER))
+ && tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER))
{
DEBUG ("Ignoring incoming channel of type %s on %s",
channel_type, object_path);
@@ -1469,7 +1469,7 @@ empathy_dispatcher_send_file_to_contact (EmpathyContact *contact,
/* org.freedesktop.Telepathy.Channel.ChannelType */
value = tp_g_value_slice_new (G_TYPE_STRING);
- g_value_set_string (value, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER);
+ g_value_set_string (value, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER);
g_hash_table_insert (request, TP_IFACE_CHANNEL ".ChannelType", value);
/* org.freedesktop.Telepathy.Channel.TargetHandleType */
@@ -1481,30 +1481,30 @@ empathy_dispatcher_send_file_to_contact (EmpathyContact *contact,
value = tp_g_value_slice_new (G_TYPE_STRING);
g_value_set_string (value, content_type);
g_hash_table_insert (request,
- EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentType", value);
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentType", value);
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Filename */
value = tp_g_value_slice_new (G_TYPE_STRING);
g_value_set_string (value, filename);
g_hash_table_insert (request,
- EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename", value);
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename", value);
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Size */
value = tp_g_value_slice_new (G_TYPE_UINT64);
g_value_set_uint64 (value, size);
g_hash_table_insert (request,
- EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", value);
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", value);
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Date */
value = tp_g_value_slice_new (G_TYPE_UINT64);
g_value_set_uint64 (value, date);
g_hash_table_insert (request,
- EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Date", value);
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Date", value);
/* The contact handle might not be known yet */
request_data = new_dispatcher_request_data (dispatcher, connection,
- EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, TP_HANDLE_TYPE_CONTACT, 0, request,
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, TP_HANDLE_TYPE_CONTACT, 0, request,
contact, callback, user_data);
connection_data->outstanding_requests = g_list_prepend
(connection_data->outstanding_requests, request_data);
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c
index 9fe143e43..d83ba12a8 100644
--- a/libempathy/empathy-tp-contact-factory.c
+++ b/libempathy/empathy-tp-contact-factory.c
@@ -856,7 +856,7 @@ get_requestable_channel_classes_cb (TpProxy *connection,
TP_IFACE_CHANNEL ".ChannelType");
if (chan_type == NULL ||
tp_strdiff (g_value_get_string (chan_type),
- EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) {
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) {
continue;
}
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index d02c052e3..2d43cbba6 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -285,17 +285,17 @@ struct _EmpathyTpFilePriv {
GOutputStream *out_stream;
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer D-Bus properties */
- EmpFileTransferState state;
+ TpFileTransferState state;
gchar *content_type;
gchar *filename;
guint64 size;
- EmpFileHashType content_hash_type;
+ TpFileHashType content_hash_type;
gchar *content_hash;
gchar *description;
guint64 transferred_bytes;
gboolean incoming;
- EmpFileTransferStateChangeReason state_change_reason;
+ TpFileTransferStateChangeReason state_change_reason;
time_t start_time;
gchar *unix_socket_path;
GCancellable *cancellable;
@@ -336,13 +336,13 @@ tp_file_invalidated_cb (TpProxy *proxy,
{
DEBUG ("Channel invalidated: %s", message);
- if (tp_file->priv->state != EMP_FILE_TRANSFER_STATE_COMPLETED &&
- tp_file->priv->state != EMP_FILE_TRANSFER_STATE_CANCELLED)
+ if (tp_file->priv->state != TP_FILE_TRANSFER_STATE_COMPLETED &&
+ tp_file->priv->state != TP_FILE_TRANSFER_STATE_CANCELLED)
{
/* The channel is not in a finished state, an error occured */
- tp_file->priv->state = EMP_FILE_TRANSFER_STATE_CANCELLED;
+ tp_file->priv->state = TP_FILE_TRANSFER_STATE_CANCELLED;
tp_file->priv->state_change_reason =
- EMP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_ERROR;
+ TP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_ERROR;
g_object_notify (G_OBJECT (tp_file), "state");
}
}
@@ -443,7 +443,7 @@ tp_file_start_transfer (EmpathyTpFile *tp_file)
}
static void
-tp_file_state_changed_cb (TpProxy *proxy,
+tp_file_state_changed_cb (TpChannel *channel,
guint state,
guint reason,
gpointer user_data,
@@ -465,7 +465,7 @@ tp_file_state_changed_cb (TpProxy *proxy,
/* If the channel is open AND we have the socket path, we can start the
* transfer. The socket path could be NULL if we are not doing the actual
* data transfer but are just an observer for the channel. */
- if (state == EMP_FILE_TRANSFER_STATE_OPEN &&
+ if (state == TP_FILE_TRANSFER_STATE_OPEN &&
tp_file->priv->unix_socket_path != NULL)
tp_file_start_transfer (tp_file);
@@ -476,7 +476,7 @@ tp_file_state_changed_cb (TpProxy *proxy,
}
static void
-tp_file_transferred_bytes_changed_cb (TpProxy *proxy,
+tp_file_transferred_bytes_changed_cb (TpChannel *channel,
guint64 count,
gpointer user_data,
GObject *weak_object)
@@ -513,12 +513,12 @@ tp_file_constructor (GType type,
g_signal_connect (tp_file->priv->channel, "invalidated",
G_CALLBACK (tp_file_invalidated_cb), tp_file);
- emp_cli_channel_type_file_transfer_connect_to_file_transfer_state_changed (
- TP_PROXY (tp_file->priv->channel), tp_file_state_changed_cb, NULL, NULL,
+ tp_cli_channel_type_file_transfer_connect_to_file_transfer_state_changed (
+ tp_file->priv->channel, tp_file_state_changed_cb, NULL, NULL,
G_OBJECT (tp_file), NULL);
- emp_cli_channel_type_file_transfer_connect_to_transferred_bytes_changed (
- TP_PROXY (tp_file->priv->channel), tp_file_transferred_bytes_changed_cb,
+ tp_cli_channel_type_file_transfer_connect_to_transferred_bytes_changed (
+ tp_file->priv->channel, tp_file_transferred_bytes_changed_cb,
NULL, NULL, G_OBJECT (tp_file), NULL);
account = empathy_channel_get_account (tp_file->priv->channel);
@@ -528,7 +528,7 @@ tp_file_constructor (GType type,
tp_file->priv->factory, account, (guint) handle);
tp_cli_dbus_properties_run_get_all (tp_file->priv->channel,
- -1, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, &properties, NULL, NULL);
+ -1, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, &properties, NULL, NULL);
tp_cli_dbus_properties_run_get (tp_file->priv->channel,
-1, TP_IFACE_CHANNEL, "Requested", &requested, NULL, NULL);
@@ -540,7 +540,7 @@ tp_file_constructor (GType type,
g_hash_table_lookup (properties, "State"));
tp_file->priv->state_change_reason =
- EMP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE;
+ TP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE;
tp_file->priv->transferred_bytes = g_value_get_uint64 (
g_hash_table_lookup (properties, "TransferredBytes"));
@@ -621,7 +621,7 @@ tp_file_channel_set_dbus_property (gpointer proxy,
{
DEBUG ("Setting %s property", property);
tp_cli_dbus_properties_call_set (TP_PROXY (proxy), -1,
- EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, property, value,
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, property, value,
NULL, NULL, NULL, NULL);
}
@@ -735,7 +735,7 @@ empathy_tp_file_get_channel (EmpathyTpFile *tp_file)
}
static void
-tp_file_method_cb (TpProxy *proxy,
+tp_file_method_cb (TpChannel *channel,
const GValue *address,
const GError *error,
gpointer user_data,
@@ -754,7 +754,7 @@ tp_file_method_cb (TpProxy *proxy,
DEBUG ("Got unix socket path: %s", tp_file->priv->unix_socket_path);
- if (tp_file->priv->state == EMP_FILE_TRANSFER_STATE_OPEN)
+ if (tp_file->priv->state == TP_FILE_TRANSFER_STATE_OPEN)
tp_file_start_transfer (tp_file);
}
@@ -766,7 +766,7 @@ tp_file_method_cb (TpProxy *proxy,
* @error: a #GError set if there is an error when opening @gfile
*
* Accepts a file transfer that's in the "local pending" state (i.e.
- * EMP_FILE_TRANSFER_STATE_LOCAL_PENDING).
+ * TP_FILE_TRANSFER_STATE_LOCAL_PENDING).
*/
void
empathy_tp_file_accept (EmpathyTpFile *tp_file,
@@ -792,8 +792,7 @@ empathy_tp_file_accept (EmpathyTpFile *tp_file,
g_value_init (&nothing, G_TYPE_STRING);
g_value_set_static_string (&nothing, "");
- emp_cli_channel_type_file_transfer_call_accept_file (TP_PROXY (
- tp_file->priv->channel),
+ tp_cli_channel_type_file_transfer_call_accept_file (tp_file->priv->channel,
-1, TP_SOCKET_ADDRESS_TYPE_UNIX, TP_SOCKET_ACCESS_CONTROL_LOCALHOST,
&nothing, offset, tp_file_method_cb, NULL, NULL, G_OBJECT (tp_file));
}
@@ -805,7 +804,7 @@ empathy_tp_file_accept (EmpathyTpFile *tp_file,
* @error: a #GError set if there is an error when opening @gfile
*
* Offers a file transfer that's in the "not offered" state (i.e.
- * EMP_FILE_TRANSFER_STATE_NOT_OFFERED).
+ * TP_FILE_TRANSFER_STATE_NOT_OFFERED).
*/
void
empathy_tp_file_offer (EmpathyTpFile *tp_file, GFile *gfile, GError **error)
@@ -821,9 +820,8 @@ empathy_tp_file_offer (EmpathyTpFile *tp_file, GFile *gfile, GError **error)
g_value_init (&nothing, G_TYPE_STRING);
g_value_set_static_string (&nothing, "");
- emp_cli_channel_type_file_transfer_call_provide_file (
- TP_PROXY (tp_file->priv->channel), -1,
- TP_SOCKET_ADDRESS_TYPE_UNIX, TP_SOCKET_ACCESS_CONTROL_LOCALHOST,
+ tp_cli_channel_type_file_transfer_call_provide_file (tp_file->priv->channel,
+ -1, TP_SOCKET_ADDRESS_TYPE_UNIX, TP_SOCKET_ACCESS_CONTROL_LOCALHOST,
&nothing, tp_file_method_cb, NULL, NULL, G_OBJECT (tp_file));
}
@@ -848,12 +846,12 @@ empathy_tp_file_is_incoming (EmpathyTpFile *tp_file)
return tp_file->priv->incoming;
}
-guint
+TpFileTransferState
empathy_tp_file_get_state (EmpathyTpFile *tp_file,
- guint *reason)
+ TpFileTransferStateChangeReason *reason)
{
g_return_val_if_fail (EMPATHY_IS_TP_FILE (tp_file),
- EMP_FILE_TRANSFER_STATE_NONE);
+ TP_FILE_TRANSFER_STATE_NONE);
if (reason != NULL)
*reason = tp_file->priv->state_change_reason;
diff --git a/libempathy/empathy-tp-file.h b/libempathy/empathy-tp-file.h
index 966663f90..42c54e4f0 100644
--- a/libempathy/empathy-tp-file.h
+++ b/libempathy/empathy-tp-file.h
@@ -75,7 +75,8 @@ void empathy_tp_file_offer (EmpathyTpFile *tp_file, GFile *gfile,
EmpathyContact *empathy_tp_file_get_contact (EmpathyTpFile *tp_file);
const gchar *empathy_tp_file_get_filename (EmpathyTpFile *tp_file);
gboolean empathy_tp_file_is_incoming (EmpathyTpFile *tp_file);
-guint empathy_tp_file_get_state (EmpathyTpFile *tp_file, guint *reason);
+TpFileTransferState empathy_tp_file_get_state (
+ EmpathyTpFile *tp_file, TpFileTransferStateChangeReason *reason);
guint64 empathy_tp_file_get_size (EmpathyTpFile *tp_file);
guint64 empathy_tp_file_get_transferred_bytes (EmpathyTpFile *tp_file);
gint empathy_tp_file_get_remaining_time (EmpathyTpFile *tp_file);
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index f15acb04b..ae1932574 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -838,7 +838,7 @@ event_manager_approve_channel_cb (EmpathyDispatcher *dispatcher,
}
}
- else if (!tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER))
+ else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER))
{
EmpathyContact *contact;
gchar *header;
diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c
index e246ac965..ed2228d16 100644
--- a/src/empathy-ft-manager.c
+++ b/src/empathy-ft-manager.c
@@ -129,7 +129,7 @@ ft_manager_update_buttons (EmpathyFTManager *ft_manager)
GtkTreeModel *model;
GtkTreeIter iter;
EmpathyTpFile *tp_file;
- EmpFileTransferState state;
+ TpFileTransferState state;
gboolean open_enabled = FALSE;
gboolean abort_enabled = FALSE;
@@ -141,12 +141,12 @@ ft_manager_update_buttons (EmpathyFTManager *ft_manager)
state = empathy_tp_file_get_state (tp_file, NULL);
/* I can open the file if the transfer is completed and was incoming */
- open_enabled = (state == EMP_FILE_TRANSFER_STATE_COMPLETED &&
+ open_enabled = (state == TP_FILE_TRANSFER_STATE_COMPLETED &&
empathy_tp_file_is_incoming (tp_file));
/* I can abort if the transfer is not already finished */
- abort_enabled = (state != EMP_FILE_TRANSFER_STATE_CANCELLED &&
- state != EMP_FILE_TRANSFER_STATE_COMPLETED);
+ abort_enabled = (state != TP_FILE_TRANSFER_STATE_CANCELLED &&
+ state != TP_FILE_TRANSFER_STATE_COMPLETED);
g_object_unref (tp_file);
}
@@ -156,21 +156,21 @@ ft_manager_update_buttons (EmpathyFTManager *ft_manager)
}
static const gchar *
-ft_manager_state_change_reason_to_string (EmpFileTransferStateChangeReason reason)
+ft_manager_state_change_reason_to_string (TpFileTransferStateChangeReason reason)
{
switch (reason)
{
- case EMP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE:
+ case TP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE:
return _("No reason was specified");
- case EMP_FILE_TRANSFER_STATE_CHANGE_REASON_REQUESTED:
+ case TP_FILE_TRANSFER_STATE_CHANGE_REASON_REQUESTED:
return _("The change in state was requested");
- case EMP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_STOPPED:
+ case TP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_STOPPED:
return _("You canceled the file transfer");
- case EMP_FILE_TRANSFER_STATE_CHANGE_REASON_REMOTE_STOPPED:
+ case TP_FILE_TRANSFER_STATE_CHANGE_REASON_REMOTE_STOPPED:
return _("The other participant canceled the file transfer");
- case EMP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_ERROR:
+ case TP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_ERROR:
return _("Error while trying to transfer the file");
- case EMP_FILE_TRANSFER_STATE_CHANGE_REASON_REMOTE_ERROR:
+ case TP_FILE_TRANSFER_STATE_CHANGE_REASON_REMOTE_ERROR:
return _("The other participant is unable to transfer the file");
}
return _("Unknown reason");
@@ -195,8 +195,8 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager,
guint64 total_size;
gint remaining = -1;
gint percent;
- EmpFileTransferState state;
- EmpFileTransferStateChangeReason reason;
+ TpFileTransferState state;
+ TpFileTransferStateChangeReason reason;
gboolean incoming;
row_ref = ft_manager_get_row_from_tp_file (ft_manager, tp_file);
@@ -211,14 +211,14 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager,
switch (state)
{
- case EMP_FILE_TRANSFER_STATE_NONE:
+ case TP_FILE_TRANSFER_STATE_NONE:
/* This should never happen, the CM is broken. But we avoid warning
* because it's not our fault. */
DEBUG ("State is NONE, probably a broken CM");
break;
- case EMP_FILE_TRANSFER_STATE_PENDING:
- case EMP_FILE_TRANSFER_STATE_OPEN:
- case EMP_FILE_TRANSFER_STATE_ACCEPTED:
+ case TP_FILE_TRANSFER_STATE_PENDING:
+ case TP_FILE_TRANSFER_STATE_OPEN:
+ case TP_FILE_TRANSFER_STATE_ACCEPTED:
if (incoming)
/* translators: first %s is filename, second %s is the contact name */
first_line_format = _("Receiving \"%s\" from %s");
@@ -228,7 +228,7 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager,
first_line = g_strdup_printf (first_line_format, filename, contact_name);
- if (state == EMP_FILE_TRANSFER_STATE_OPEN || incoming)
+ if (state == TP_FILE_TRANSFER_STATE_OPEN || incoming)
{
gchar *total_size_str;
gchar *transferred_bytes_str;
@@ -254,7 +254,7 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager,
remaining = empathy_tp_file_get_remaining_time (tp_file);
break;
- case EMP_FILE_TRANSFER_STATE_COMPLETED:
+ case TP_FILE_TRANSFER_STATE_COMPLETED:
if (incoming)
/* translators: first %s is filename, second %s
* is the contact name */
@@ -272,7 +272,7 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager,
break;
- case EMP_FILE_TRANSFER_STATE_CANCELLED:
+ case TP_FILE_TRANSFER_STATE_CANCELLED:
if (incoming)
/* translators: first %s is filename, second %s
* is the contact name */
@@ -299,8 +299,8 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager,
if (remaining < 0)
{
- if (state != EMP_FILE_TRANSFER_STATE_COMPLETED &&
- state != EMP_FILE_TRANSFER_STATE_CANCELLED)
+ if (state != TP_FILE_TRANSFER_STATE_COMPLETED &&
+ state != TP_FILE_TRANSFER_STATE_CANCELLED)
remaining_str = g_strdup (C_("remaining time", "Unknown"));
}
else
@@ -449,11 +449,11 @@ remove_finished_transfer_foreach (gpointer key,
{
EmpathyTpFile *tp_file = EMPATHY_TP_FILE (key);
EmpathyFTManager *self = EMPATHY_FT_MANAGER (user_data);
- EmpFileTransferState state;
+ TpFileTransferState state;
state = empathy_tp_file_get_state (tp_file, NULL);
- if (state == EMP_FILE_TRANSFER_STATE_COMPLETED ||
- state == EMP_FILE_TRANSFER_STATE_CANCELLED)
+ if (state == TP_FILE_TRANSFER_STATE_COMPLETED ||
+ state == TP_FILE_TRANSFER_STATE_CANCELLED)
{
ft_manager_remove_file_from_model (self, tp_file);
return TRUE;
@@ -468,7 +468,7 @@ ft_manager_state_changed_cb (EmpathyTpFile *tp_file,
EmpathyFTManager *ft_manager)
{
if (empathy_tp_file_get_state (tp_file, NULL) ==
- EMP_FILE_TRANSFER_STATE_COMPLETED)
+ TP_FILE_TRANSFER_STATE_COMPLETED)
{
GtkRecentManager *manager;
const gchar *uri;
@@ -1062,7 +1062,7 @@ void
empathy_ft_manager_add_tp_file (EmpathyFTManager *ft_manager,
EmpathyTpFile *tp_file)
{
- EmpFileTransferState state;
+ TpFileTransferState state;
g_return_if_fail (EMPATHY_IS_FT_MANAGER (ft_manager));
g_return_if_fail (EMPATHY_IS_TP_FILE (tp_file));
@@ -1073,7 +1073,7 @@ empathy_ft_manager_add_tp_file (EmpathyFTManager *ft_manager,
empathy_contact_get_name (empathy_tp_file_get_contact (tp_file)),
empathy_tp_file_get_filename (tp_file), state);
- if (state == EMP_FILE_TRANSFER_STATE_PENDING &&
+ if (state == TP_FILE_TRANSFER_STATE_PENDING &&
empathy_tp_file_is_incoming (tp_file))
ft_manager_display_accept_dialog (ft_manager, tp_file);
else
diff --git a/src/empathy.c b/src/empathy.c
index c99e4b50d..0c1197a17 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -115,7 +115,7 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
factory = empathy_call_factory_get ();
empathy_call_factory_claim_channel (factory, operation);
- } else if (channel_type == EMP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER) {
+ } else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER) {
EmpathyFTManager *ft_manager;
EmpathyTpFile *tp_file;