2007-04-30 Murray Cumming <murrayc@murrayc.com>
[modest] / src / modest-mail-operation.h
index a67b0ee..d2739b9 100644 (file)
@@ -70,6 +70,7 @@ typedef enum _ModestMailOperationId {
        MODEST_MAIL_OPERATION_ID_RECEIVE,
        MODEST_MAIL_OPERATION_ID_OPEN,
        MODEST_MAIL_OPERATION_ID_DELETE,
+       MODEST_MAIL_OPERATION_ID_INFO,
        MODEST_MAIL_OPERATION_ID_UNKNOWN,
 } ModestMailOperationId;
 
@@ -89,8 +90,7 @@ struct _ModestMailOperationClass {
 GType        modest_mail_operation_get_type    (void) G_GNUC_CONST;
 
 /* typical parameter-less _new function */
-ModestMailOperation*    modest_mail_operation_new_with_id     (ModestMailOperationId id);
-ModestMailOperation*    modest_mail_operation_new             (void);
+ModestMailOperation*    modest_mail_operation_new     (ModestMailOperationId id);
 
 /**
  * modest_mail_operation_get_id
@@ -150,6 +150,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