else
{
char msg[SHORT_STRING];
- IMAP_MBOX mx;
+ struct ImapMbox mx;
int nentry = menu->current;
imap_parse_path(state.entry[nentry].name, &mx);
{
char tmp[LONG_STRING];
char relpath[LONG_STRING];
- IMAP_MBOX mx;
+ struct ImapMbox mx;
struct Buffy *b = NULL;
if (imap_parse_path(state->folder, &mx))
struct browser_state *state, short isparent)
{
struct ImapList list;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
int rc;
if (imap_parse_path(state->folder, &mx))
char ctmp;
short showparents = 0;
int save_lsub;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
if (imap_parse_path(path, &mx))
{
int imap_mailbox_create(const char *folder)
{
struct ImapData *idata = NULL;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
char buf[LONG_STRING];
short n;
int imap_mailbox_rename(const char *mailbox)
{
struct ImapData *idata = NULL;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
char buf[LONG_STRING];
char newname[SHORT_STRING];
char *mailbox = NULL;
char *value = NULL;
struct Buffy *inc = NULL;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
int count;
IMAP_STATUS *status = NULL;
unsigned int olduv, oldun;
int imap_access(const char *path, int flags)
{
struct ImapData *idata = NULL;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
char buf[LONG_STRING];
char mailbox[LONG_STRING];
char mbox[LONG_STRING];
return 0;
}
-int imap_rename_mailbox(struct ImapData *idata, IMAP_MBOX *mx, const char *newname)
+int imap_rename_mailbox(struct ImapData *idata, struct ImapMbox *mx, const char *newname)
{
char oldmbox[LONG_STRING];
char newmbox[LONG_STRING];
return 0;
}
-int imap_delete_mailbox(struct Context *ctx, IMAP_MBOX *mx)
+int imap_delete_mailbox(struct Context *ctx, struct ImapMbox *mx)
{
char buf[LONG_STRING], mbox[LONG_STRING];
struct ImapData *idata = NULL;
char buf[LONG_STRING];
char bufout[LONG_STRING];
int count = 0;
- IMAP_MBOX mx, pmx;
+ struct ImapMbox mx, pmx;
int rc;
if (imap_parse_path(ctx->path, &mx))
struct ImapData *idata = NULL;
char buf[LONG_STRING];
char mailbox[LONG_STRING];
- IMAP_MBOX mx;
+ struct ImapMbox mx;
int rc;
if (imap_parse_path(ctx->path, &mx))
/* split path into (idata,mailbox name) */
static int imap_get_mailbox(const char *path, struct ImapData **hidata, char *buf, size_t blen)
{
- IMAP_MBOX mx;
+ struct ImapMbox mx;
if (imap_parse_path(path, &mx))
{
char mbox[LONG_STRING];
char errstr[STRING];
struct Buffer err, token;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
if (!mx_is_imap(path) || imap_parse_path(path, &mx) || !mx.mbox)
{
char completion[LONG_STRING];
int clen, matchlen = 0;
int completions = 0;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
int rc;
if (imap_parse_path(path, &mx))
char mmbox[LONG_STRING];
char prompt[LONG_STRING];
int rc;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
int triedcreate = 0;
idata = ctx->data;
#include "mailbox.h"
/* -- data structures -- */
-typedef struct
+struct ImapMbox
{
struct Account account;
char *mbox;
-} IMAP_MBOX;
+};
/* imap.c */
int imap_access(const char *, int);
int imap_check_mailbox(struct Context *ctx, int force);
-int imap_delete_mailbox(struct Context *ctx, IMAP_MBOX *mx);
+int imap_delete_mailbox(struct Context *ctx, struct ImapMbox *mx);
int imap_sync_mailbox(struct Context *ctx, int expunge);
int imap_close_mailbox(struct Context *ctx);
int imap_buffy_check(int force, int check_stats);
/* util.c */
int imap_expand_path(char *path, size_t len);
-int imap_parse_path(const char *path, IMAP_MBOX *mx);
+int imap_parse_path(const char *path, struct ImapMbox *mx);
void imap_pretty_mailbox(char *path);
int imap_wait_keepalive(pid_t pid);
/* imap.c */
int imap_check(struct ImapData *idata, int force);
int imap_create_mailbox(struct ImapData *idata, char *mailbox);
-int imap_rename_mailbox(struct ImapData *idata, IMAP_MBOX *mx, const char *newname);
+int imap_rename_mailbox(struct ImapData *idata, struct ImapMbox *mx, const char *newname);
IMAP_STATUS *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create);
void imap_mboxcache_free(struct ImapData *idata);
int imap_exec_msgset(struct ImapData *idata, const char *pre, const char *post,
char *imap_next_word(char *s);
time_t imap_parse_date(char *s);
void imap_make_date(char *buf, time_t timestamp);
-void imap_qualify_path(char *dest, size_t len, IMAP_MBOX *mx, char *path);
+void imap_qualify_path(char *dest, size_t len, struct ImapMbox *mx, char *path);
void imap_quote_string(char *dest, size_t slen, const char *src);
void imap_unquote_string(char *s);
void imap_munge_mbox_name(struct ImapData *idata, char *dest, size_t dlen, const char *src);
struct Progress progressbar;
size_t sent;
int c, last;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
int rc;
idata = ctx->data;
char prompt[LONG_STRING];
int rc;
int n;
- IMAP_MBOX mx;
+ struct ImapMbox mx;
int err_continue = MUTT_NO;
int triedcreate = 0;
* fails, which it might if there isn't enough room in the buffer. */
int imap_expand_path(char *path, size_t len)
{
- IMAP_MBOX mx;
+ struct ImapMbox mx;
struct ImapData *idata = NULL;
struct CissUrl url;
char fixedpath[LONG_STRING];
*/
void imap_get_parent_path(char *output, const char *path, size_t olen)
{
- IMAP_MBOX mx;
+ struct ImapMbox mx;
struct ImapData *idata = NULL;
char mbox[LONG_STRING] = "";
*/
void imap_clean_path(char *path, size_t plen)
{
- IMAP_MBOX mx;
+ struct ImapMbox mx;
struct ImapData *idata = NULL;
char mbox[LONG_STRING] = "";
header_cache_t *imap_hcache_open(struct ImapData *idata, const char *path)
{
- IMAP_MBOX mx;
+ struct ImapMbox mx;
struct CissUrl url;
char cachepath[LONG_STRING];
char mbox[LONG_STRING];
/* imap_parse_path: given an IMAP mailbox name, return host, port
* and a path IMAP servers will recognize.
* mx.mbox is malloc'd, caller must free it */
-int imap_parse_path(const char *path, IMAP_MBOX *mx)
+int imap_parse_path(const char *path, struct ImapMbox *mx)
{
static unsigned short ImapPort = 0;
static unsigned short ImapsPort = 0;
* look nice. */
void imap_pretty_mailbox(char *path)
{
- IMAP_MBOX home, target;
+ struct ImapMbox home, target;
struct CissUrl url;
char *delim = NULL;
int tlen;
tm->tm_min, tm->tm_sec, (int) tz / 60, (int) abs((int) tz) % 60);
}
-/* imap_qualify_path: make an absolute IMAP folder target, given IMAP_MBOX
+/* imap_qualify_path: make an absolute IMAP folder target, given ImapMbox
* and relative path. */
-void imap_qualify_path(char *dest, size_t len, IMAP_MBOX *mx, char *path)
+void imap_qualify_path(char *dest, size_t len, struct ImapMbox *mx, char *path)
{
struct CissUrl url;