6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch /* mailbox */
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch /* message part */
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch /* message list (uid == 0) */
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch /* urlauth */
4d955db590c3d76a631dfc5d37bcdf578a43e55aStephan Bosch time_t uauth_expire; /* (time_t)-1 if not set */
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch * IMAP URL parsing
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch /* Scheme part 'imap:' is already parsed externally. This implies that
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch this is an absolute IMAP URL. */
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch /* Require relative URL (omitting _both_ scheme and authority), e.g.
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch /MAILBOX/;UID=uid or even ;UID=uid. This flag means that an absolute
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch URL makes no sense in this context. Relative URLs are allowed once a
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch base URL is provided to the parser. */
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch /* Allow URLAUTH URL */
639bb36b12b9f9bb54c8bb1be50eac623622f8a0Timo Sirainen/* Parses full IMAP URL. The returned URL is allocated from data stack. */
dc78180b54a05d5736d0e0e444cba0332265eb62Phil Carmodyint imap_url_parse(const char *url, const struct imap_url *base,
639bb36b12b9f9bb54c8bb1be50eac623622f8a0Timo Sirainen struct imap_url **url_r, const char **error_r);
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch * IMAP URL construction
4d955db590c3d76a631dfc5d37bcdf578a43e55aStephan Boschconst char *imap_url_create(const struct imap_url *url);
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Boschconst char *imap_url_add_urlauth(const char *rumpurl, const char *mechanism,
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch const unsigned char *token, size_t token_len);