replace the pathetic mutt_parse_rfc822_line function with a really better
[apps/madmutt.git] / url.h
1 /*
2  * Copyright notice from original mutt:
3  * [none]
4  *
5  * This file is part of mutt-ng, see http://www.muttng.org/.
6  * It's licensed under the GNU General Public License,
7  * please see the file GPL in the top level source directory.
8  */
9
10 #ifndef _URL_H
11 # define _URL_H
12
13 #include <lib-mime/mime.h>
14
15 typedef enum url_scheme {
16   U_FILE,
17   U_POP,
18   U_POPS,
19   U_IMAP,
20   U_IMAPS,
21   U_NNTP,
22   U_NNTPS,
23   U_MAILTO,
24   U_UNKNOWN
25 } url_scheme_t;
26
27 #define U_DECODE_PASSWD (1)
28
29 typedef struct ciss_url {
30   url_scheme_t scheme;
31   char *user;
32   char *pass;
33   char *host;
34   unsigned short port;
35   char *path;
36 } ciss_url_t;
37
38 url_scheme_t url_check_scheme (const char *s);
39 int url_parse_file (char *d, const char *src, size_t dl);
40 int url_parse_ciss (ciss_url_t * ciss, char *src);
41 int url_ciss_tostring (ciss_url_t * ciss, char *dest, size_t len, int flags);
42 int url_parse_mailto (ENVELOPE * e, char **body, const char *src);
43
44 #endif