7
struct ip_addr host_ip;
12
const char *auth_type;
16
uint32_t uidvalidity; /* 0 if not set */
21
uoff_t partial_offset;
22
uoff_t partial_size; /* 0 if not set */
24
/* message list (uid == 0) */
25
const char *search_program;
28
const char *uauth_rumpurl;
29
const char *uauth_access_application;
30
const char *uauth_access_user;
31
const char *uauth_mechanism;
32
const unsigned char *uauth_token;
33
size_t uauth_token_size;
34
time_t uauth_expire; /* (time_t)-1 if not set */
36
unsigned int have_host_ip:1; /* url uses IP address */
37
unsigned int have_port:1;
38
unsigned int have_partial:1;
45
enum imap_url_parse_flags {
46
/* Scheme part 'imap:' is already parsed externally. This implies that
47
this is an absolute IMAP URL. */
48
IMAP_URL_PARSE_SCHEME_EXTERNAL = 0x01,
49
/* Require relative URL (omitting _both_ scheme and authority), e.g.
50
/MAILBOX/;UID=uid or even ;UID=uid. This flag means that an absolute
51
URL makes no sense in this context. Relative URLs are allowed once a
52
base URL is provided to the parser. */
53
IMAP_URL_PARSE_REQUIRE_RELATIVE = 0x02,
54
/* Allow URLAUTH URL */
55
IMAP_URL_PARSE_ALLOW_URLAUTH = 0x04
58
/* Parses full IMAP URL. The returned URL is allocated from data stack. */
59
int imap_url_parse(const char *url, struct imap_url *base,
60
enum imap_url_parse_flags flags,
61
struct imap_url **url_r, const char **error_r);
64
* IMAP URL construction
67
const char *imap_url_create(const struct imap_url *url);
69
const char *imap_url_add_urlauth(const char *rumpurl, const char *mechanism,
70
const unsigned char *token, size_t token_len);