## Legacy Utilities

Legacy Utilities

## Synopsis

    void                mail_config_init                    (EMailSession *session);
    gint                mail_config_get_address_count       (void);
    gchar *             mail_config_folder_to_cachename     (CamelFolder *folder,
                                                             const gchar *prefix);
    gint                mail_config_get_sync_timeout        (void);
    void                mail_config_reload_junk_headers     (EMailSession *session);
    gboolean            mail_config_get_lookup_book         (void);
    gboolean            mail_config_get_lookup_book_local_only
                                                            (void);
    void                mail_transfer_messages              (EMailSession *session,
                                                             CamelFolder *source,
                                                             GPtrArray *uids,
                                                             gboolean delete_from_source,
                                                             const gchar *dest_uri,
                                                             guint32 dest_flags,
                                                             void (*done) (gboolean ok, gpointer data),
                                                             gpointer data);
    void                mail_sync_folder                    (CamelFolder *folder,
                                                             gboolean test_for_expunge,
                                                             void (*done) (CamelFolder *folder, gpointer data),
                                                             gpointer data);
    void                mail_sync_store                     (CamelStore *store,
                                                             gint expunge,
                                                             void (*done) (CamelStore *store, gpointer data),
                                                             gpointer data);
    void                mail_empty_trash                    (CamelStore *store);
    void                mail_send_queue                     (EMailSession *session,
                                                             CamelFolder *queue,
                                                             CamelTransport *transport,
                                                             const gchar *type,
                                                             GCancellable *cancellable,
                                                             CamelFilterGetFolderFunc get_folder,
                                                             gpointer get_data,
                                                             CamelFilterStatusFunc *status,
                                                             gpointer status_data,
                                                             void (*done) (gpointer data),
                                                             gpointer data);
    void                (*MailProviderFetchLockFunc)        (const gchar *source);
    void                (*MailProviderFetchUnlockFunc)      (const gchar *source);
    CamelFolder         (*MailProviderFetchInboxFunc)       (const gchar *source,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                mail_fetch_mail                     (CamelStore *store,
                                                             const gchar *type,
                                                             MailProviderFetchLockFunc lock_func,
                                                             MailProviderFetchUnlockFunc unlock_func,
                                                             MailProviderFetchInboxFunc fetch_inbox_func,
                                                             GCancellable *cancellable,
                                                             CamelFilterGetFolderFunc get_folder,
                                                             gpointer get_data,
                                                             CamelFilterStatusFunc *status,
                                                             gpointer status_data,
                                                             void (*done) (gpointer data),
                                                             gpointer data);
    void                mail_filter_folder                  (EMailSession *session,
                                                             CamelFolder *source_folder,
                                                             GPtrArray *uids,
                                                             const gchar *type,
                                                             gboolean notify);
    void                mail_execute_shell_command          (CamelFilterDriver *driver,
                                                             gint argc,
                                                             gchar **argv,
                                                             gpointer data);
    gchar *             mail_tool_do_movemail               (CamelStore *store,
                                                             GError **error);
    struct _camel_header_raw * mail_tool_remove_xevolution_headers
                                                            (CamelMimeMessage *message);
    void                mail_tool_restore_xevolution_headers
                                                            (CamelMimeMessage *message,
                                                             struct _camel_header_raw *Param2);
    gchar *             mail_tool_generate_forward_subject  (CamelMimeMessage *msg);
    CamelMimePart *     mail_tool_make_message_attachment   (CamelMimeMessage *message);
    struct              MailMsg;
    struct              MailMsgInfo;
    gchar *             (*MailMsgDescFunc)                  (MailMsg *msg);
    void                (*MailMsgExecFunc)                  (MailMsg *msg,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                (*MailMsgDoneFunc)                  (MailMsg *msg);
    void                (*MailMsgFreeFunc)                  (MailMsg *msg);
    void                (*MailMsgDispatchFunc)              (gpointer msg);
    void                (*MailMsgCreateActivityFunc)        (GCancellable *cancellable);
    void                (*MailMsgSubmitActivityFunc)        (GCancellable *cancellable);
    void                (*MailMsgFreeActivityFunc)          (GCancellable *cancellable);
    void                (*MailMsgCompleteActivityFunc)      (GCancellable *cancellable);
    void                (*MailMsgCancelActivityFunc)        (GCancellable *cancellable);
    void                (*MailMsgAlertErrorFunc)            (GCancellable *cancellable,
                                                             const gchar *what,
                                                             const gchar *message);
    EAlertSink          (*MailMsgGetAlertSinkFunc)          (void);
    void                mail_msg_init                       (void);
    void                mail_msg_register_activities        (MailMsgCreateActivityFunc Param1,
                                                             MailMsgSubmitActivityFunc Param2,
                                                             MailMsgFreeActivityFunc Param3,
                                                             MailMsgCompleteActivityFunc Param4,
                                                             MailMsgCancelActivityFunc Param5,
                                                             MailMsgAlertErrorFunc Param6,
                                                             MailMsgGetAlertSinkFunc Param7);
    EAlertSink *        mail_msg_get_alert_sink             (void);
    gpointer            mail_msg_new                        (MailMsgInfo *info);
    gpointer            mail_msg_ref                        (gpointer msg);
    void                mail_msg_unref                      (gpointer msg);
    void                mail_msg_check_error                (gpointer msg);
    void                mail_msg_cancel                     (guint msgid);
    gboolean            mail_msg_active                     (void);
    void                mail_msg_main_loop_push             (gpointer msg);
    void                mail_msg_unordered_push             (gpointer msg);
    void                mail_msg_fast_ordered_push          (gpointer msg);
    void                mail_msg_slow_ordered_push          (gpointer msg);
    gboolean            mail_in_main_thread                 (void);
    enum                mail_call_t;
    gpointer            (*MailMainFunc)                     ();
    gpointer            mail_call_main                      (mail_call_t type,
                                                             MailMainFunc func,
                                                             ...);
    void                vfolder_load_storage                (EMailSession *session);
    void                mail_vfolder_shutdown               (void);

## Description

## Details

### mail_config_init ()

    void                mail_config_init                    (EMailSession *session);

### mail_config_get_address_count ()

    gint                mail_config_get_address_count       (void);

### mail_config_folder_to_cachename ()

    gchar *             mail_config_folder_to_cachename     (CamelFolder *folder,
                                                             const gchar *prefix);

### mail_config_get_sync_timeout ()

    gint                mail_config_get_sync_timeout        (void);

### mail_config_reload_junk_headers ()

    void                mail_config_reload_junk_headers     (EMailSession *session);

### mail_config_get_lookup_book ()

    gboolean            mail_config_get_lookup_book         (void);

### mail_config_get_lookup_book_local_only ()

    gboolean            mail_config_get_lookup_book_local_only
                                                            (void);

### mail_transfer_messages ()

    void                mail_transfer_messages              (EMailSession *session,
                                                             CamelFolder *source,
                                                             GPtrArray *uids,
                                                             gboolean delete_from_source,
                                                             const gchar *dest_uri,
                                                             guint32 dest_flags,
                                                             void (*done) (gboolean ok, gpointer data),
                                                             gpointer data);

### mail_sync_folder ()

    void                mail_sync_folder                    (CamelFolder *folder,
                                                             gboolean test_for_expunge,
                                                             void (*done) (CamelFolder *folder, gpointer data),
                                                             gpointer data);

### mail_sync_store ()

    void                mail_sync_store                     (CamelStore *store,
                                                             gint expunge,
                                                             void (*done) (CamelStore *store, gpointer data),
                                                             gpointer data);

### mail_empty_trash ()

    void                mail_empty_trash                    (CamelStore *store);

### mail_send_queue ()

    void                mail_send_queue                     (EMailSession *session,
                                                             CamelFolder *queue,
                                                             CamelTransport *transport,
                                                             const gchar *type,
                                                             GCancellable *cancellable,
                                                             CamelFilterGetFolderFunc get_folder,
                                                             gpointer get_data,
                                                             CamelFilterStatusFunc *status,
                                                             gpointer status_data,
                                                             void (*done) (gpointer data),
                                                             gpointer data);

### MailProviderFetchLockFunc ()

    void                (*MailProviderFetchLockFunc)        (const gchar *source);

### MailProviderFetchUnlockFunc ()

    void                (*MailProviderFetchUnlockFunc)      (const gchar *source);

### MailProviderFetchInboxFunc ()

    CamelFolder         (*MailProviderFetchInboxFunc)       (const gchar *source,
                                                             GCancellable *cancellable,
                                                             GError **error);

### mail_fetch_mail ()

    void                mail_fetch_mail                     (CamelStore *store,
                                                             const gchar *type,
                                                             MailProviderFetchLockFunc lock_func,
                                                             MailProviderFetchUnlockFunc unlock_func,
                                                             MailProviderFetchInboxFunc fetch_inbox_func,
                                                             GCancellable *cancellable,
                                                             CamelFilterGetFolderFunc get_folder,
                                                             gpointer get_data,
                                                             CamelFilterStatusFunc *status,
                                                             gpointer status_data,
                                                             void (*done) (gpointer data),
                                                             gpointer data);

### mail_filter_folder ()

    void                mail_filter_folder                  (EMailSession *session,
                                                             CamelFolder *source_folder,
                                                             GPtrArray *uids,
                                                             const gchar *type,
                                                             gboolean notify);

### mail_execute_shell_command ()

    void                mail_execute_shell_command          (CamelFilterDriver *driver,
                                                             gint argc,
                                                             gchar **argv,
                                                             gpointer data);

### mail_tool_do_movemail ()

    gchar *             mail_tool_do_movemail               (CamelStore *store,
                                                             GError **error);

### mail_tool_remove_xevolution_headers ()

    struct _camel_header_raw * mail_tool_remove_xevolution_headers
                                                            (CamelMimeMessage *message);

### mail_tool_restore_xevolution_headers ()

    void                mail_tool_restore_xevolution_headers
                                                            (CamelMimeMessage *message,
                                                             struct _camel_header_raw *Param2);

### mail_tool_generate_forward_subject ()

    gchar *             mail_tool_generate_forward_subject  (CamelMimeMessage *msg);

### mail_tool_make_message_attachment ()

    CamelMimePart *     mail_tool_make_message_attachment   (CamelMimeMessage *message);

### struct MailMsg

    struct MailMsg {
    	MailMsgInfo *info;
    	volatile gint ref_count;
    	guint seq;			/* seq number for synchronisation */
    	gint priority;			/* priority (default = 0) */
    	GCancellable *cancellable;
    	GError *error;			/* up to the caller to use this */
    };

### struct MailMsgInfo

    struct MailMsgInfo {
    	gsize size;
    	MailMsgDescFunc desc;
    	MailMsgExecFunc exec;
    	MailMsgDoneFunc done;
    	MailMsgFreeFunc free;
    };

### MailMsgDescFunc ()

    gchar *             (*MailMsgDescFunc)                  (MailMsg *msg);

### MailMsgExecFunc ()

    void                (*MailMsgExecFunc)                  (MailMsg *msg,
                                                             GCancellable *cancellable,
                                                             GError **error);

### MailMsgDoneFunc ()

    void                (*MailMsgDoneFunc)                  (MailMsg *msg);

### MailMsgFreeFunc ()

    void                (*MailMsgFreeFunc)                  (MailMsg *msg);

### MailMsgDispatchFunc ()

    void                (*MailMsgDispatchFunc)              (gpointer msg);

### MailMsgCreateActivityFunc ()

    void                (*MailMsgCreateActivityFunc)        (GCancellable *cancellable);

### MailMsgSubmitActivityFunc ()

    void                (*MailMsgSubmitActivityFunc)        (GCancellable *cancellable);

### MailMsgFreeActivityFunc ()

    void                (*MailMsgFreeActivityFunc)          (GCancellable *cancellable);

### MailMsgCompleteActivityFunc ()

    void                (*MailMsgCompleteActivityFunc)      (GCancellable *cancellable);

### MailMsgCancelActivityFunc ()

    void                (*MailMsgCancelActivityFunc)        (GCancellable *cancellable);

### MailMsgAlertErrorFunc ()

    void                (*MailMsgAlertErrorFunc)            (GCancellable *cancellable,
                                                             const gchar *what,
                                                             const gchar *message);

### MailMsgGetAlertSinkFunc ()

    EAlertSink          (*MailMsgGetAlertSinkFunc)          (void);

### mail_msg_init ()

    void                mail_msg_init                       (void);

### mail_msg_register_activities ()

    void                mail_msg_register_activities        (MailMsgCreateActivityFunc Param1,
                                                             MailMsgSubmitActivityFunc Param2,
                                                             MailMsgFreeActivityFunc Param3,
                                                             MailMsgCompleteActivityFunc Param4,
                                                             MailMsgCancelActivityFunc Param5,
                                                             MailMsgAlertErrorFunc Param6,
                                                             MailMsgGetAlertSinkFunc Param7);

### mail_msg_get_alert_sink ()

    EAlertSink *        mail_msg_get_alert_sink             (void);

### mail_msg_new ()

    gpointer            mail_msg_new                        (MailMsgInfo *info);

### mail_msg_ref ()

    gpointer            mail_msg_ref                        (gpointer msg);

### mail_msg_unref ()

    void                mail_msg_unref                      (gpointer msg);

### mail_msg_check_error ()

    void                mail_msg_check_error                (gpointer msg);

### mail_msg_cancel ()

    void                mail_msg_cancel                     (guint msgid);

### mail_msg_active ()

    gboolean            mail_msg_active                     (void);

### mail_msg_main_loop_push ()

    void                mail_msg_main_loop_push             (gpointer msg);

### mail_msg_unordered_push ()

    void                mail_msg_unordered_push             (gpointer msg);

### mail_msg_fast_ordered_push ()

    void                mail_msg_fast_ordered_push          (gpointer msg);

### mail_msg_slow_ordered_push ()

    void                mail_msg_slow_ordered_push          (gpointer msg);

### mail_in_main_thread ()

    gboolean            mail_in_main_thread                 (void);

### enum mail_call_t

    typedef enum {
    	MAIL_CALL_p_p,
    	MAIL_CALL_p_pp,
    	MAIL_CALL_p_ppp,
    	MAIL_CALL_p_pppp,
    	MAIL_CALL_p_ppppp,
    	MAIL_CALL_p_ppippp
    } mail_call_t;

`MAIL_CALL_p_p` |
`MAIL_CALL_p_pp` |
`MAIL_CALL_p_ppp` |
`MAIL_CALL_p_pppp` |
`MAIL_CALL_p_ppppp` |
`MAIL_CALL_p_ppippp` |

### MailMainFunc ()

    gpointer            (*MailMainFunc)                     ();

### mail_call_main ()

    gpointer            mail_call_main                      (mail_call_t type,
                                                             MailMainFunc func,
                                                             ...);

### vfolder_load_storage ()

    void                vfolder_load_storage                (EMailSession *session);

### mail_vfolder_shutdown ()

    void                mail_vfolder_shutdown               (void);