typedef enum _ModestMailOperationStatus {
MODEST_MAIL_OPERATION_STATUS_INVALID,
MODEST_MAIL_OPERATION_STATUS_SUCCESS,
+ MODEST_MAIL_OPERATION_STATUS_FINISHED_WITH_ERRORS,
MODEST_MAIL_OPERATION_STATUS_FAILED,
MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS,
- MODEST_MAIL_OPERATION_STATUS_CANCELLED
+ MODEST_MAIL_OPERATION_STATUS_CANCELED
} ModestMailOperationStatus;
struct _ModestMailOperation {
struct _ModestMailOperationClass {
GObjectClass parent_class;
- /* insert signal callback declarations, eg. */
- /* void (* my_event) (ModestMailOperation* obj); */
+
+ /* Signals */
+ void (*progress_changed) (ModestMailOperation *mail_op, gpointer user_data);
};
/* member functions */
ModestMailOperationReplyType reply_type,
ModestMailOperationReplyMode reply_mode);
-void modest_mail_operation_update_account (ModestMailOperation *mail_op,
+gboolean modest_mail_operation_update_account (ModestMailOperation *mail_op,
TnyStoreAccount *store_account);
/* Functions that perform store operations */
gboolean remove_to_trash);
/* Functions to control mail operations */
-ModestMailOperationStatus modest_mail_operation_get_status (ModestMailOperation *mail_op);
+guint modest_mail_operation_get_task_done (ModestMailOperation *mail_op);
+
+guint modest_mail_operation_get_task_total (ModestMailOperation *mail_op);
+
+
+gboolean modest_mail_operation_is_finished (ModestMailOperation *mail_op);
+
+ModestMailOperationStatus modest_mail_operation_get_status (ModestMailOperation *mail_op);
-const GError* modest_mail_operation_get_error (ModestMailOperation *mail_op);
+const GError* modest_mail_operation_get_error (ModestMailOperation *mail_op);
-void modest_mail_operation_cancel (ModestMailOperation *mail_op);
+void modest_mail_operation_cancel (ModestMailOperation *mail_op);
G_END_DECLS