aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-05-13 21:02:16 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:49:56 +0800
commit872178334e6171c60b5bcf1cede7ae5a36645da1 (patch)
tree08eb889157773a04419ae5e688da35aa38eba0e6 /libempathy
parent46881a51c2c317d482de1889ad29f3e58a0cfe10 (diff)
downloadgsoc2013-empathy-872178334e6171c60b5bcf1cede7ae5a36645da1.tar
gsoc2013-empathy-872178334e6171c60b5bcf1cede7ae5a36645da1.tar.gz
gsoc2013-empathy-872178334e6171c60b5bcf1cede7ae5a36645da1.tar.bz2
gsoc2013-empathy-872178334e6171c60b5bcf1cede7ae5a36645da1.tar.lz
gsoc2013-empathy-872178334e6171c60b5bcf1cede7ae5a36645da1.tar.xz
gsoc2013-empathy-872178334e6171c60b5bcf1cede7ae5a36645da1.tar.zst
gsoc2013-empathy-872178334e6171c60b5bcf1cede7ae5a36645da1.zip
Add use_hash params for incoming transfers
Add use_hash params for incoming transfers to the FT Factory and Handler, so that we will use them to check hash for received files.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-ft-factory.c5
-rw-r--r--libempathy/empathy-ft-factory.h2
-rw-r--r--libempathy/empathy-ft-handler.c10
-rw-r--r--libempathy/empathy-ft-handler.h2
4 files changed, 11 insertions, 8 deletions
diff --git a/libempathy/empathy-ft-factory.c b/libempathy/empathy-ft-factory.c
index e36f553c8..e294eba61 100644
--- a/libempathy/empathy-ft-factory.c
+++ b/libempathy/empathy-ft-factory.c
@@ -169,13 +169,14 @@ void
empathy_ft_factory_set_destination_for_incoming_handler
(EmpathyFTFactory *factory,
EmpathyFTHandler *handler,
- GFile *destination)
+ GFile *destination,
+ gboolean use_hash)
{
g_return_if_fail (EMPATHY_IS_FT_FACTORY (factory));
g_return_if_fail (EMPATHY_IS_FT_HANDLER (handler));
g_return_if_fail (G_IS_FILE (destination));
- empathy_ft_handler_incoming_set_destination (handler, destination);
+ empathy_ft_handler_incoming_set_destination (handler, destination, use_hash);
g_signal_emit (factory, signals[NEW_FT_HANDLER], 0, handler, FALSE);
}
diff --git a/libempathy/empathy-ft-factory.h b/libempathy/empathy-ft-factory.h
index 18310bd2d..82dcb660b 100644
--- a/libempathy/empathy-ft-factory.h
+++ b/libempathy/empathy-ft-factory.h
@@ -64,7 +64,7 @@ void empathy_ft_factory_claim_channel (EmpathyFTFactory *factory,
EmpathyDispatchOperation *operation);
void empathy_ft_factory_set_destination_for_incoming_handler
(EmpathyFTFactory *factory, EmpathyFTHandler *handler,
- GFile *destination);
+ GFile *destination, gboolean use_hash);
G_END_DECLS
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index 5e6d02922..f2fafd73b 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -250,7 +250,7 @@ empathy_ft_handler_class_init (EmpathyFTHandlerClass *klass)
param_spec = g_param_spec_object ("gfile",
"gfile", "The GFile we're handling",
G_TYPE_FILE,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_G_FILE, param_spec);
param_spec = g_param_spec_object ("tp-file",
@@ -261,7 +261,7 @@ empathy_ft_handler_class_init (EmpathyFTHandlerClass *klass)
param_spec = g_param_spec_boolean ("use-hash",
"use-hash", "Whether we should use checksum when sending or receiving",
- FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_USE_HASH, param_spec);
/* signals */
@@ -996,12 +996,14 @@ empathy_ft_handler_cancel_transfer (EmpathyFTHandler *handler)
void
empathy_ft_handler_incoming_set_destination (EmpathyFTHandler *handler,
- GFile *destination)
+ GFile *destination,
+ gboolean use_hash)
{
g_return_if_fail (EMPATHY_IS_FT_HANDLER (handler));
g_return_if_fail (G_IS_FILE (destination));
- g_object_set (handler, "gfile", destination, NULL);
+ g_object_set (handler, "gfile", destination,
+ "use-hash", use_hash, NULL);
}
const char *
diff --git a/libempathy/empathy-ft-handler.h b/libempathy/empathy-ft-handler.h
index 70232e00e..654c3a6f1 100644
--- a/libempathy/empathy-ft-handler.h
+++ b/libempathy/empathy-ft-handler.h
@@ -67,7 +67,7 @@ void empathy_ft_handler_new_outgoing (EmpathyContact *contact,
void empathy_ft_handler_new_incoming (EmpathyTpFile *tp_file,
EmpathyFTHandlerReadyCallback callback, gpointer user_data);
void empathy_ft_handler_incoming_set_destination (EmpathyFTHandler *handler,
- GFile *destination);
+ GFile *destination, gboolean use_hash);
void empathy_ft_handler_start_transfer (EmpathyFTHandler *handler);
void empathy_ft_handler_cancel_transfer (EmpathyFTHandler *handler);