int imap_mailbox_create(const char *path)
{
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
char name[LONG_STRING];
short n;
int imap_mailbox_rename(const char *path)
{
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
char buf[PATH_MAX];
char newname[PATH_MAX];
struct ImapAccountData *m_adata = imap_adata_get(np->m);
if (imap_account_match(&adata->conn_account, &m_adata->conn_account))
{
- struct ImapMailboxData *mdata = imap_mdata_get(np->m);
+ struct ImapMboxData *mdata = imap_mdata_get(np->m);
if (mdata && imap_mxcmp(mailbox, mdata->name) == 0)
{
mutt_debug(3, "Found %s in mailbox list (OV: %u ON: %u U: %d)\n",
if (!m || !m->account)
return -1;
- struct ImapMailboxData *mdata;
+ struct ImapMboxData *mdata;
struct ImapAccountData *adata = m->account->adata;
mutt_account_hook(m->realpath);
int imap_access(const char *path)
{
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
int rc;
if (imap_adata_find(path, &adata, &mdata) < 0)
int imap_mailbox_check(struct Mailbox *m, bool check_stats)
{
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
char command[LONG_STRING * 2];
if (imap_prepare_mailbox(m))
static int queued = 0;
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
char buf[LONG_STRING * 2];
struct ImapStatus *status = NULL;
int imap_subscribe(char *path, bool subscribe)
{
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
char buf[LONG_STRING * 2];
char mbox[LONG_STRING];
char errstr[STRING];
int imap_complete(char *buf, size_t buflen, char *path)
{
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
char tmp[LONG_STRING * 2];
struct ImapList listresp;
char completion[LONG_STRING];
struct ImapAccountData *adata = imap_adata_get(m);
struct ImapAccountData *dest_adata = NULL;
- struct ImapMailboxData *dest_mdata = NULL;
+ struct ImapMboxData *dest_mdata = NULL;
if (imap_adata_find(dest, &dest_adata, &dest_mdata) < 0)
return -1;
return -1;
struct ImapAccountData *adata = m->account->adata;
- struct ImapMailboxData *mdata = m->mdata;
+ struct ImapMboxData *mdata = m->mdata;
FREE(&(adata->mbox_name));
adata->mbox_name = mutt_str_strdup(mdata->name);
return -1;
struct ImapAccountData *adata = m->account->adata;
- struct ImapMailboxData *mdata = m->mdata;
+ struct ImapMboxData *mdata = m->mdata;
rc = imap_access2(adata, mdata->name);
if (rc == 0)
};
/**
- * struct ImapMailboxData - IMAP-specific Mailbox data
+ * struct ImapMboxData - IMAP-specific Mailbox data
*
* This data is specific to a Mailbox of an IMAP server
*/
-struct ImapMailboxData
+struct ImapMboxData
{
char *name;
char *munge_name;
void imap_logout(struct ImapAccountData **adata);
int imap_sync_message_for_copy(struct ImapAccountData *adata, struct Email *e, struct Buffer *cmd, int *err_continue);
bool imap_has_flag(struct ListHead *flag_list, const char *flag);
-int imap_adata_find(const char *path, struct ImapAccountData **adata, struct ImapMailboxData **mdata);
+int imap_adata_find(const char *path, struct ImapAccountData **adata, struct ImapMboxData **mdata);
/* auth.c */
int imap_authenticate(struct ImapAccountData *adata);
/* util.c */
struct ImapAccountData *imap_adata_get(struct Mailbox *m);
-struct ImapMailboxData *imap_mdata_get(struct Mailbox *m);
+struct ImapMboxData *imap_mdata_get(struct Mailbox *m);
#ifdef USE_HCACHE
header_cache_t *imap_hcache_open(struct ImapAccountData *adata, const char *path);
void imap_hcache_close(struct ImapAccountData *adata);
void imap_error(const char *where, const char *msg);
struct ImapAccountData *imap_adata_new(void);
void imap_adata_free(void **ptr);
-struct ImapMailboxData *imap_mdata_new(struct ImapAccountData *adata, const char* name);
+struct ImapMboxData *imap_mdata_new(struct ImapAccountData *adata, const char* name);
void imap_mdata_free(void **ptr);
char *imap_fix_path(struct ImapAccountData *adata, const char *mailbox, char *path, size_t plen);
void imap_cachepath(struct ImapAccountData *adata, const char *mailbox, char *dest, size_t dlen);
int rc;
struct ImapAccountData *adata = imap_adata_get(m);
- struct ImapMailboxData *mdata = imap_mdata_get(m);
+ struct ImapMboxData *mdata = imap_mdata_get(m);
fp = fopen(msg->path, "r");
if (!fp)
* imap_adata_find - Find the Account data for this path
*/
int imap_adata_find(const char *path, struct ImapAccountData **adata,
- struct ImapMailboxData **mdata)
+ struct ImapMboxData **mdata)
{
struct ConnAccount conn_account;
struct ImapAccountData *tmp_adata;
}
/**
- * imap_mdata_new - Allocate and initialise a new ImapMailboxData structure
- * @retval ptr New ImapMailboxData
+ * imap_mdata_new - Allocate and initialise a new ImapMboxData structure
+ * @retval ptr New ImapMboxData
*/
-struct ImapMailboxData *imap_mdata_new(struct ImapAccountData *adata, const char *name)
+struct ImapMboxData *imap_mdata_new(struct ImapAccountData *adata, const char *name)
{
char buf[LONG_STRING];
- struct ImapMailboxData *mdata = mutt_mem_calloc(1, sizeof(struct ImapMailboxData));
+ struct ImapMboxData *mdata = mutt_mem_calloc(1, sizeof(struct ImapMboxData));
mdata->real_name = mutt_str_strdup(name);
}
/**
- * imap_mdata_free - Release and clear storage in an ImapMailboxData structure
+ * imap_mdata_free - Release and clear storage in an ImapMboxData structure
* @param ptr Imap Mailbox data
*/
void imap_mdata_free(void **ptr)
if (!ptr || !*ptr)
return;
- struct ImapMailboxData *mdata = *ptr;
+ struct ImapMboxData *mdata = *ptr;
FREE(&mdata->name);
FREE(&mdata->real_name);
/**
* imap_mdata_get - Get the Mailbox data for this mailbox
*/
-struct ImapMailboxData *imap_mdata_get(struct Mailbox *m)
+struct ImapMboxData *imap_mdata_get(struct Mailbox *m)
{
if (!m || (m->magic != MUTT_IMAP) || !m->mdata)
return NULL;
void imap_get_parent_path(const char *path, char *buf, size_t buflen)
{
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
char mbox[LONG_STRING];
if (imap_adata_find(path, &adata, &mdata) < 0)
void imap_clean_path(char *path, size_t plen)
{
struct ImapAccountData *adata = NULL;
- struct ImapMailboxData *mdata = NULL;
+ struct ImapMboxData *mdata = NULL;
if (imap_adata_find(path, &adata, &mdata) < 0)
return;
imap_cachepath(adata, path, mbox, sizeof(mbox));
else if (adata->mailbox)
{
- struct ImapMailboxData *mdata = imap_mdata_get(adata->mailbox);
+ struct ImapMboxData *mdata = imap_mdata_get(adata->mailbox);
imap_cachepath(adata, mdata->name, mbox, sizeof(mbox));
}
else