* Gathered the argument checking code to one single function in the D-Bus methods
[modest] / src / modest-mail-operation.h
index 70c3678..8b78c2d 100644 (file)
@@ -76,7 +76,7 @@ typedef enum {
 } ModestMailOperationTypeOperation;
 
 /**
- * ErrorCheckingAsyncUserCallback:
+ * ErrorCheckingUserCallback:
  *
  * @mail_op: the current mail operation.
  * @user_data: generic data passed to user defined function.
@@ -87,6 +87,17 @@ typedef enum {
 typedef void (*ErrorCheckingUserCallback) (ModestMailOperation *mail_op, gpointer user_data);
 
 /**
+ * ErrorCheckingUserDataDestroyer:
+ *
+ * @user_data: generic data passed to user defined function.
+ *
+ * This function is used to destroy the user_data passed to the error
+ * checking user callback function
+ */
+typedef void (*ErrorCheckingUserDataDestroyer) (gpointer user_data);
+
+
+/**
  * GetMsgAsyncUserCallback:
  *
  * @mail_op: the current #ModestMailOperation.
@@ -100,7 +111,9 @@ typedef void (*ErrorCheckingUserCallback) (ModestMailOperation *mail_op, gpointe
  */
 typedef void (*GetMsgAsyncUserCallback) (ModestMailOperation *mail_op, 
                                         TnyHeader *header, 
+                                        gboolean canceled, 
                                         TnyMsg *msg, 
+                                        GError *err,
                                         gpointer user_data);
 
 /**
@@ -227,7 +240,8 @@ ModestMailOperation*    modest_mail_operation_new     (GObject *source);
  **/
 ModestMailOperation*    modest_mail_operation_new_with_error_handling     (GObject *source,
                                                                           ErrorCheckingUserCallback error_handler,
-                                                                          gpointer user_data);
+                                                                          gpointer user_data,
+                                                                          ErrorCheckingUserDataDestroyer error_handler_destroyer);
 /**
  * modest_mail_operation_execute_error_handler
  * @self: a #ModestMailOperation
@@ -659,8 +673,26 @@ void      modest_mail_operation_refresh_folder  (ModestMailOperation *self,
                                                 RefreshAsyncUserCallback user_callback,
                                                 gpointer user_data);
 
+/**
+ * modest_mail_operation_get_account:
+ * @self: a #ModestMailOperation
+ * 
+ * Gets the account associated to a mail operation
+ * 
+ * Returns: the #TnyAccount associated to the #ModestMailOperation
+ **/
 TnyAccount *modest_mail_operation_get_account   (ModestMailOperation *self);
 
+
+/**
+ * modest_mail_operation_noop:
+ * @self: a #ModestMailOperation
+ * 
+ * Does nothing except emitting operation-started and
+ * operation-finished
+ **/
+void modest_mail_operation_noop (ModestMailOperation *self);
+
 G_END_DECLS
 
 #endif /* __MODEST_MAIL_OPERATION_H__ */