* Fixed some GNOME build problems
[modest] / src / modest-mail-operation.h
index e7e4081..d2f1760 100644 (file)
@@ -74,6 +74,7 @@ typedef enum _ModestMailOperationId {
        MODEST_MAIL_OPERATION_ID_UNKNOWN,
 } ModestMailOperationId;
 
+
 struct _ModestMailOperation {
         GObject parent;
        /* insert public members, if any */
@@ -150,6 +151,37 @@ void    modest_mail_operation_send_new_mail   (ModestMailOperation *self,
                                               const GList *attachments_list,
                                               TnyHeaderFlags priority_flags);
 
+
+/**
+ * modest_mail_operation_save_to_drafts:
+ * @self: a #ModestMailOperation
+ * @transport_account: a non-NULL #TnyTransportAccount
+ * @from: the email address of the mail sender
+ * @to: a non-NULL email address of the mail receiver
+ * @cc: a comma-separated list of email addresses where to send a carbon copy
+ * @bcc: a comma-separated list of email addresses where to send a blind carbon copy
+ * @subject: the subject of the new mail
+ * @plain_body: the plain text body of the new mail.
+ * @html_body: the html version of the body of the new mail. If NULL, the mail will
+ *             be sent with the plain body only.
+ * @attachments_list: a #GList of attachments, each attachment must be a #TnyMimePart
+ * 
+ * Save a mail message to drafts using the provided
+ * #TnyTransportAccount. This operation is synchronous, so the
+ * #ModestMailOperation should not be added to any
+ * #ModestMailOperationQueue
+  **/
+void    modest_mail_operation_save_to_drafts   (ModestMailOperation *self,
+                                               TnyTransportAccount *transport_account,
+                                               const gchar *from,
+                                               const gchar *to,
+                                               const gchar *cc,
+                                               const gchar *bcc,
+                                               const gchar *subject,
+                                               const gchar *plain_body,
+                                               const gchar *html_body,
+                                               const GList *attachments_list,
+                                               TnyHeaderFlags priority_flags);
 /**
  * modest_mail_operation_update_account:
  * @self: a #ModestMailOperation
@@ -302,6 +334,25 @@ void          modest_mail_operation_remove_msg     (ModestMailOperation *self,
                                                    TnyHeader *header,
                                                    gboolean remove_to_trash);
 
+/**
+ * modest_mail_operation_process_msg:
+ * @self: a #ModestMailOperation
+ * @header: the #TnyHeader of the message to get
+ * @num_ops: number of times to repeat operation with next header. 
+ * @user_callback: a #TnyGetMsgCallback function to call after tinymail operation execution.
+ * @user_data: user data passed to both, user_callback and update_status_callback.
+ * 
+ * Gets a message and process it using @callback function
+ * pased as argument. This operation is assynchronous, so the
+ * #ModestMailOperation should be added to
+ * #ModestMailOperationQueue
+ **/
+void          modest_mail_operation_process_msg     (ModestMailOperation *self,
+                                                    TnyHeader *header,
+                                                    guint num_ops,
+                                                    TnyGetMsgCallback user_callback,
+                                                    gpointer user_data);
+
 /* Functions to control mail operations */
 /**
  * modest_mail_operation_get_task_done: