+/**
+ * UpdateAccountCallback:
+ *
+ * @self: a #ModestMailOperation
+ * @new_headers: the list of new headers received
+ * @user_data: generic data passed to user defined function.
+ *
+ * This is the callback of the update_account operation. It informs
+ * the caller about the amount of new messages that have been
+ * downloaded
+ */
+typedef void (*UpdateAccountCallback) (ModestMailOperation *self,
+ TnyList *new_headers,
+ gpointer user_data);
+
+
+/**
+ * SaveToDraftsCallback:
+ *
+ * @self: a #ModestMailOperation
+ * @saved_draft: the new draft message that has been saved
+ * @user_data: generic data passed to user defined function.
+ *
+ * This is the callback of the save_to_drafts operation. It returns
+ * the newly created msg stored in the Drafts folder
+ */
+typedef void (*SaveToDraftstCallback) (ModestMailOperation *self,
+ TnyMsg *saved_draft,
+ gpointer user_data);
+
+
+/* This struct represents the internal state of a mail operation in a
+ given time */
+typedef struct {
+ guint done;
+ guint total;
+ gdouble bytes_done;
+ gdouble bytes_total;
+ gboolean finished;
+ ModestMailOperationStatus status;
+ ModestMailOperationTypeOperation op_type;
+} ModestMailOperationState;
+
+
+struct _ModestMailOperation {
+ GObject parent;
+ /* insert public members, if any */
+};
+
+struct _ModestMailOperationClass {
+ GObjectClass parent_class;
+
+ /* Signals */
+ void (*progress_changed) (ModestMailOperation *self, ModestMailOperationState *state, gpointer user_data);
+ void (*operation_started) (ModestMailOperation *self, gpointer user_data);
+ void (*operation_finished) (ModestMailOperation *self, gpointer user_data);
+};