imapc-storage.h revision 3ec969c5cee55a7b08ab5c5bf7afae310176e2bd
#ifndef IMAPC_STORAGE_H
#define IMAPC_STORAGE_H
#include "index-storage.h"
#include "imapc-settings.h"
#define IMAPC_STORAGE_NAME "imapc"
#define IMAPC_LIST_ESCAPE_CHAR '%'
#define IMAPC_LIST_BROKEN_CHAR '~'
struct imap_arg;
struct imapc_untagged_reply;
struct imapc_command_reply;
struct imapc_mailbox;
struct imapc_storage;
struct imapc_storage *storage);
struct imapc_mailbox *mbox);
struct imapc_storage_event_callback {
const char *name;
};
struct imapc_mailbox_event_callback {
const char *name;
};
struct imapc_namespace {
const char *prefix;
char separator;
enum mail_namespace_type type;
};
struct imapc_storage {
struct mail_storage storage;
const struct imapc_settings *set;
struct ioloop *root_ioloop;
struct imapc_mailbox_list *list;
struct imapc_client *client;
char root_sep;
struct imapc_mailbox *cur_status_box;
struct mailbox_status *cur_status;
unsigned int reopen_count;
unsigned int namespaces_requested:1;
unsigned int root_sep_pending:1;
};
struct imapc_mail_cache {
/* either fd != -1 or buf != NULL */
int fd;
};
struct imapc_mailbox {
struct imapc_storage *storage;
struct imapc_client_mailbox *client_box;
struct mail_index_transaction *delayed_sync_trans;
enum mail_flags permanent_flags;
/* keep the previous fetched message body cached,
mainly for partial IMAP fetches */
struct imapc_mail_cache prev_mail_cache;
struct imapc_sync_context *sync_ctx;
const char *guid_fetch_field_name;
unsigned int selecting:1;
unsigned int syncing:1;
unsigned int initial_sync_done:1;
unsigned int selected:1;
unsigned int exists_received:1;
};
struct imapc_simple_context {
struct imapc_storage *storage;
int ret;
};
struct mail_save_context *
struct mail_index_transaction_commit_result *result);
enum mail_error default_error,
const struct imapc_command_reply *reply);
struct imapc_storage *storage);
void *context);
bool *changes_r);
const char *name,
const char *name,
const char *key,
#endif