ESMTP is utterly broken, and pulls OpenSSL.
[apps/madmutt.git] / account.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 2000-5 Brendan Cully <brendan@kublai.com>
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 /* remote host account manipulation (POP/IMAP) */
11
12 #ifndef _MUTT_ACCOUNT_H_
13 #define _MUTT_ACCOUNT_H_ 1
14
15 #include <lib-lib/lib-lib.h>
16
17 enum {
18     M_ACCT_TYPE_NONE = 0,
19     M_ACCT_TYPE_IMAP,
20     M_ACCT_TYPE_NNTP,
21     M_ACCT_TYPE_POP
22 };
23
24 typedef struct {
25     union {
26         struct {
27             unsigned has_port  : 1;
28             unsigned has_user  : 1;
29             unsigned has_login : 1;
30             unsigned has_pass  : 1;
31             unsigned has_ssl   : 1;
32         };
33         char flags;
34     };
35
36     char type;
37     int  port;
38
39     char user[64];
40     char login[64];
41     char pass[64];
42     char host[128];
43 } ACCOUNT;
44
45 int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * m2);
46 int mutt_account_fromurl (ACCOUNT * account, ciss_url_t * url);
47 void mutt_account_tourl (ACCOUNT * account, ciss_url_t * url);
48 int mutt_account_getuser (ACCOUNT * account);
49 int mutt_account_getlogin (ACCOUNT * account);
50 int mutt_account_getpass (ACCOUNT * account);
51
52 #endif /* _MUTT_ACCOUNT_H_ */