1 /* 2 * e-mail-session-utils.h 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as published by 6 * the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but 9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 * for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public License 14 * along with this program; if not, see <http://www.gnu.org/licenses/>. 15 * 16 */ 17 18 #if !defined (__LIBEMAIL_ENGINE_H_INSIDE__) && !defined (LIBEMAIL_ENGINE_COMPILATION) 19 #error "Only <libemail-engine/libemail-engine.h> should be included directly." 20 #endif 21 22 #ifndef E_MAIL_SESSION_UTILS_H 23 #define E_MAIL_SESSION_UTILS_H 24 25 /* High-level operations with Evolution-specific policies. */ 26 27 #include <libemail-engine/e-mail-session.h> 28 29 #define E_MAIL_ERROR (e_mail_error_quark ()) 30 31 G_BEGIN_DECLS 32 33 typedef enum { 34 E_MAIL_ERROR_POST_PROCESSING 35 } EMailError; 36 37 GQuark e_mail_error_quark (void) G_GNUC_CONST; 38 gboolean e_mail_session_append_to_local_folder_sync 39 (EMailSession *session, 40 EMailLocalFolder local_id, 41 CamelMimeMessage *message, 42 CamelMessageInfo *info, 43 gchar **appended_uid, 44 GCancellable *cancellable, 45 GError **error); 46 void e_mail_session_append_to_local_folder 47 (EMailSession *session, 48 EMailLocalFolder local_id, 49 CamelMimeMessage *message, 50 CamelMessageInfo *info, 51 gint io_priority, 52 GCancellable *cancellable, 53 GAsyncReadyCallback callback, 54 gpointer user_data); 55 gboolean e_mail_session_append_to_local_folder_finish 56 (EMailSession *session, 57 GAsyncResult *result, 58 gchar **appended_uid, 59 GError **error); 60 gboolean e_mail_session_handle_draft_headers_sync 61 (EMailSession *session, 62 CamelMimeMessage *message, 63 GCancellable *cancellable, 64 GError **error); 65 void e_mail_session_handle_draft_headers 66 (EMailSession *session, 67 CamelMimeMessage *message, 68 gint io_priority, 69 GCancellable *cancellable, 70 GAsyncReadyCallback callback, 71 gpointer user_data); 72 gboolean e_mail_session_handle_draft_headers_finish 73 (EMailSession *session, 74 GAsyncResult *result, 75 GError **error); 76 gboolean e_mail_session_handle_source_headers_sync 77 (EMailSession *session, 78 CamelMimeMessage *message, 79 GCancellable *cancellable, 80 GError **error); 81 void e_mail_session_handle_source_headers 82 (EMailSession *session, 83 CamelMimeMessage *message, 84 gint io_priority, 85 GCancellable *cancellable, 86 GAsyncReadyCallback callback, 87 gpointer user_data); 88 gboolean e_mail_session_handle_source_headers_finish 89 (EMailSession *session, 90 GAsyncResult *result, 91 GError **error); 92 void e_mail_session_send_to (EMailSession *session, 93 CamelMimeMessage *message, 94 gint io_priority, 95 GCancellable *cancellable, 96 CamelFilterGetFolderFunc get_folder_func, 97 gpointer get_folder_data, 98 GAsyncReadyCallback callback, 99 gpointer user_data); 100 gboolean e_mail_session_send_to_finish (EMailSession *session, 101 GAsyncResult *result, 102 GError **error); 103 CamelFolder * e_mail_session_get_fcc_for_message_sync 104 (EMailSession *session, 105 CamelMimeMessage *message, 106 gboolean *out_use_sent_folder, 107 GCancellable *cancellable, 108 GError **error); 109 void e_mail_session_get_fcc_for_message 110 (EMailSession *session, 111 CamelMimeMessage *message, 112 gint io_priority, 113 GCancellable *cancellable, 114 GAsyncReadyCallback callback, 115 gpointer user_data); 116 CamelFolder * e_mail_session_get_fcc_for_message_finish 117 (EMailSession *session, 118 GAsyncResult *result, 119 gboolean *out_use_sent_folder, 120 GError **error); 121 CamelService * e_mail_session_ref_transport (EMailSession *session, 122 const gchar *transport_uid); 123 CamelService * e_mail_session_ref_default_transport 124 (EMailSession *session); 125 CamelService * e_mail_session_ref_transport_for_message 126 (EMailSession *session, 127 CamelMimeMessage *message); 128 129 G_END_DECLS 130 131 #endif /* E_MAIL_SESSION_UTILS_H */ 132