X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-mail-operation.h;h=f6c5fcaac83c69ba6fe38e99e51ba5ea8fc638dc;hb=03fb7e33ee162afdb96cb51debc135a1f1721318;hp=8b78c2df354e89a065c2b02c646b3f22b3a4c9a7;hpb=47ec97dc5b74de88b9a5f29c6d167244db03242a;p=modest diff --git a/src/modest-mail-operation.h b/src/modest-mail-operation.h index 8b78c2d..f6c5fca 100644 --- a/src/modest-mail-operation.h +++ b/src/modest-mail-operation.h @@ -171,7 +171,6 @@ typedef void (*UpdateAccountCallback) (ModestMailOperation *self, TnyList *new_headers, gpointer user_data); - /** * SaveToDraftsCallback: * @@ -187,6 +186,26 @@ typedef void (*SaveToDraftstCallback) (ModestMailOperation *self, gpointer user_data); +typedef gboolean (*RetrieveAllCallback) (GObject *source, + guint num_msgs, + guint limit); + +/** + * CreateFolderUserCallback: + * + * @mail_op: the current #ModestMailOperation. + * @folder: a #TnyFolder summary item. + * @user_data: generic data passed to user defined function. + * + * This function will be called after get_msg_cb private function, which is + * used as tinymail operation callback. The private function fills private + * fields of mail operation and calls user defined callback if it exists. + */ +typedef void (*CreateFolderUserCallback) (ModestMailOperation *mail_op, + TnyFolderStore *parent_folder, + TnyFolder *new_folder, + gpointer user_data); + /* This struct represents the internal state of a mail operation in a given time */ typedef struct { @@ -382,6 +401,7 @@ void modest_mail_operation_save_to_drafts (ModestMailOperation *self, * modest_mail_operation_update_account: * @self: a #ModestMailOperation * @account_name: the id of a Modest account + * @poke_all: if TRUE it will also do a poke_status over all folders of the account * * Asynchronously refreshes the root folders of the given store * account. The caller should add the #ModestMailOperation to a @@ -402,10 +422,11 @@ void modest_mail_operation_save_to_drafts (ModestMailOperation *self, * Note that the account_name *MUST* be a modest account name, not a * tinymail store account name * - * Returns: TRUE if the mail operation could be started, or FALSE otherwise **/ -gboolean modest_mail_operation_update_account (ModestMailOperation *self, +void modest_mail_operation_update_account (ModestMailOperation *self, const gchar *account_name, + gboolean poke_all, + RetrieveAllCallback retrieve_all_cb, UpdateAccountCallback callback, gpointer user_data); @@ -425,9 +446,11 @@ gboolean modest_mail_operation_update_account (ModestMailOperation *self, * * Returns: a newly created #TnyFolder or NULL in case of error. **/ -TnyFolder* modest_mail_operation_create_folder (ModestMailOperation *self, - TnyFolderStore *parent, - const gchar *name); +void modest_mail_operation_create_folder (ModestMailOperation *self, + TnyFolderStore *parent, + const gchar *name, + CreateFolderUserCallback callback, + gpointer user_data); /** * modest_mail_operation_remove_folder: