Rocco Rutte:
[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 typedef enum url_scheme {
14   U_FILE,
15   U_POP,
16   U_POPS,
17   U_IMAP,
18   U_IMAPS,
19   U_NNTP,
20   U_NNTPS,
21   U_MAILTO,
22   U_UNKNOWN
23 } url_scheme_t;
24
25 #define U_DECODE_PASSWD (1)
26
27 typedef struct ciss_url {
28   url_scheme_t scheme;
29   char *user;
30   char *pass;
31   char *host;
32   unsigned short port;
33   char *path;
34 } ciss_url_t;
35
36 url_scheme_t url_check_scheme (const char *s);
37 int url_parse_file (char *d, const char *src, size_t dl);
38 int url_parse_ciss (ciss_url_t * ciss, char *src);
39 int url_ciss_tostring (ciss_url_t * ciss, char *dest, size_t len, int flags);
40 int url_parse_mailto (ENVELOPE * e, char **body, const char *src);
41
42 #endif