aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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