X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=account.h;h=0c44f6eba871d3f812ef99feb39cdec84bbcbabd;hp=d9b5a550aa6ee651e4ee6eb58c7b9641bd2fb85d;hb=981e10e224fde4de5d40adcee1deda89df2715ca;hpb=230399f9632c37b66c1c117a17e8327eae6b3235;ds=sidebyside diff --git a/account.h b/account.h index d9b5a55..0c44f6e 100644 --- a/account.h +++ b/account.h @@ -14,29 +14,31 @@ #include -/* account types */ enum { - M_ACCT_TYPE_NONE = 0, - M_ACCT_TYPE_IMAP, - M_ACCT_TYPE_NNTP, - M_ACCT_TYPE_POP + M_ACCT_TYPE_NONE = 0, + M_ACCT_TYPE_IMAP, + M_ACCT_TYPE_POP }; -/* account flags */ -#define M_ACCT_PORT (1<<0) -#define M_ACCT_USER (1<<1) -#define M_ACCT_LOGIN (1<<2) -#define M_ACCT_PASS (1<<3) -#define M_ACCT_SSL (1<<4) - typedef struct { - char user[64]; - char login[64]; - char pass[64]; - char host[128]; - unsigned short port; - unsigned char type; - unsigned char flags; + union { + struct { + unsigned has_port : 1; + unsigned has_user : 1; + unsigned has_login : 1; + unsigned has_pass : 1; + unsigned has_ssl : 1; + }; + char flags; + }; + + char type; + int port; + + char user[64]; + char login[64]; + char pass[64]; + char host[128]; } ACCOUNT; int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * m2); @@ -45,6 +47,5 @@ void mutt_account_tourl (ACCOUNT * account, ciss_url_t * url); int mutt_account_getuser (ACCOUNT * account); int mutt_account_getlogin (ACCOUNT * account); int mutt_account_getpass (ACCOUNT * account); -void mutt_account_unsetpass (ACCOUNT * account); #endif /* _MUTT_ACCOUNT_H_ */