aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-05-01 01:49:47 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:47:36 +0800
commita64bc30f336c9dc6fa8e22f33cae3a97d5819d7d (patch)
tree8d395a1c39667ac108dfb826ec16c97d56ddc6d0 /libempathy
parentcb541929d5079a6c817685776ee86b1b7c4664fc (diff)
downloadgsoc2013-empathy-a64bc30f336c9dc6fa8e22f33cae3a97d5819d7d.tar
gsoc2013-empathy-a64bc30f336c9dc6fa8e22f33cae3a97d5819d7d.tar.gz
gsoc2013-empathy-a64bc30f336c9dc6fa8e22f33cae3a97d5819d7d.tar.bz2
gsoc2013-empathy-a64bc30f336c9dc6fa8e22f33cae3a97d5819d7d.tar.lz
gsoc2013-empathy-a64bc30f336c9dc6fa8e22f33cae3a97d5819d7d.tar.xz
gsoc2013-empathy-a64bc30f336c9dc6fa8e22f33cae3a97d5819d7d.tar.zst
gsoc2013-empathy-a64bc30f336c9dc6fa8e22f33cae3a97d5819d7d.zip
Add empathy_ft_handler_get_total_bytes API
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-ft-handler.c20
-rw-r--r--libempathy/empathy-ft-handler.h9
2 files changed, 19 insertions, 10 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index 15085b83f..8ac5430b3 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -95,7 +95,7 @@ typedef struct {
guint64 mtime;
gchar *content_hash;
EmpFileHashType content_hash_type;
- EmpathyFTHandlerState current_state;
+ EmpFileTransferState current_state;
} EmpathyFTHandlerPriv;
static guint signals[LAST_SIGNAL] = { 0 };
@@ -977,9 +977,9 @@ empathy_ft_handler_get_gfile (EmpathyFTHandler *handler)
return priv->gfile;
}
-/* FIXME! */
-EmpathyFTHandlerState
-empathy_ft_handler_get_state (EmpathyFTHandler *handler)
+EmpFileTransferState
+empathy_ft_handler_get_state (EmpathyFTHandler *handler,
+ char **state_string)
{
EmpathyFTHandlerPriv *priv;
@@ -1016,3 +1016,15 @@ empathy_ft_handler_get_transferred_bytes (EmpathyFTHandler *handler)
return priv->transferred_bytes;
}
+
+guint64
+empathy_ft_handler_get_total_bytes (EmpathyFTHandler *handler)
+{
+ EmpathyFTHandlerPriv *priv;
+
+ g_return_val_if_fail (EMPATHY_IS_FT_HANDLER (handler), 0);
+
+ priv = GET_PRIV (handler);
+
+ return priv->total_bytes;
+}
diff --git a/libempathy/empathy-ft-handler.h b/libempathy/empathy-ft-handler.h
index 3e4b2186a..53a12e6f8 100644
--- a/libempathy/empathy-ft-handler.h
+++ b/libempathy/empathy-ft-handler.h
@@ -53,11 +53,6 @@ typedef struct {
GObjectClass parent_class;
} EmpathyFTHandlerClass;
-/* we need to define some additional states for the handler */
-typedef enum {
- EMPATHY_FT_HANDLER_STATE_SETUP = 6
-} EmpathyFTHandlerState;
-
typedef void (* EmpathyFTHandlerReadyCallback) (EmpathyFTHandler *handler,
GError *error,
gpointer user_data);
@@ -82,9 +77,11 @@ 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);
-EmpathyFTHandlerState empathy_ft_handler_get_state (EmpathyFTHandler *handler);
+EmpFileTransferState empathy_ft_handler_get_state (EmpathyFTHandler *handler,
+ char **state_string);
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);
G_END_DECLS