aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-05-13 23:35:25 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:49:56 +0800
commitcecbf767e3364d3342aef9b73206d4e29c692953 (patch)
tree726f46de215c100caf269d827d520099f0107ad9
parent1cde27a07305bc03e8f7d6d676a24e9ccda8e566 (diff)
downloadgsoc2013-empathy-cecbf767e3364d3342aef9b73206d4e29c692953.tar
gsoc2013-empathy-cecbf767e3364d3342aef9b73206d4e29c692953.tar.gz
gsoc2013-empathy-cecbf767e3364d3342aef9b73206d4e29c692953.tar.bz2
gsoc2013-empathy-cecbf767e3364d3342aef9b73206d4e29c692953.tar.lz
gsoc2013-empathy-cecbf767e3364d3342aef9b73206d4e29c692953.tar.xz
gsoc2013-empathy-cecbf767e3364d3342aef9b73206d4e29c692953.tar.zst
gsoc2013-empathy-cecbf767e3364d3342aef9b73206d4e29c692953.zip
Add empathy_ft_handler_get_use_hash
This is needed, as the GConf property might change during the transfer.
-rw-r--r--libempathy/empathy-ft-handler.c20
-rw-r--r--libempathy/empathy-ft-handler.h1
2 files changed, 20 insertions, 1 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index a41909570..be1c1a098 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -392,7 +392,7 @@ check_hash_incoming (EmpathyFTHandler *handler)
HashingData *hash_data;
EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
- if (priv->content_hash != NULL)
+ if (!EMP_STR_EMPTY (priv->content_hash))
{
hash_data = g_slice_new0 (HashingData);
hash_data->total_bytes = priv->total_bytes;
@@ -996,6 +996,9 @@ empathy_ft_handler_new_outgoing (EmpathyContact *contact,
CallbacksData *data;
EmpathyFTHandlerPriv *priv;
+ DEBUG ("New handler outgoing, use hash %s",
+ use_hash ? "True" : "False");
+
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
g_return_if_fail (G_IS_FILE (source));
@@ -1090,6 +1093,9 @@ empathy_ft_handler_incoming_set_destination (EmpathyFTHandler *handler,
GFile *destination,
gboolean use_hash)
{
+ DEBUG ("Set incoming destination, use hash %s",
+ use_hash ? "True" : "False");
+
g_return_if_fail (EMPATHY_IS_FT_HANDLER (handler));
g_return_if_fail (G_IS_FILE (destination));
@@ -1146,6 +1152,18 @@ empathy_ft_handler_get_gfile (EmpathyFTHandler *handler)
}
gboolean
+empathy_ft_handler_get_use_hash (EmpathyFTHandler *handler)
+{
+ EmpathyFTHandlerPriv *priv;
+
+ g_return_val_if_fail (EMPATHY_IS_FT_HANDLER (handler), FALSE);
+
+ priv = GET_PRIV (handler);
+
+ return priv->use_hash;
+}
+
+gboolean
empathy_ft_handler_is_incoming (EmpathyFTHandler *handler)
{
EmpathyFTHandlerPriv *priv;
diff --git a/libempathy/empathy-ft-handler.h b/libempathy/empathy-ft-handler.h
index 654c3a6f1..7ad2a9308 100644
--- a/libempathy/empathy-ft-handler.h
+++ b/libempathy/empathy-ft-handler.h
@@ -77,6 +77,7 @@ const char * empathy_ft_handler_get_filename (EmpathyFTHandler *handler);
const char * empathy_ft_handler_get_content_type (EmpathyFTHandler *handler);
EmpathyContact * empathy_ft_handler_get_contact (EmpathyFTHandler *handler);
GFile * empathy_ft_handler_get_gfile (EmpathyFTHandler *handler);
+gboolean empathy_ft_handler_get_use_hash (EmpathyFTHandler *handler);
gboolean empathy_ft_handler_is_incoming (EmpathyFTHandler *handler);
guint64 empathy_ft_handler_get_transferred_bytes (EmpathyFTHandler *handler);
guint64 empathy_ft_handler_get_total_bytes (EmpathyFTHandler *handler);