~ubuntu-branches/debian/squeeze/mutt/squeeze

1.1.2 by Martin Pitt
Import upstream version 1.5.11+cvs20060403
1
/*
1.1.5 by Christoph Berg
Import upstream version 1.5.15+20070412
2
 * Copyright (C) 2000-7 Brendan Cully <brendan@kublai.com>
1.1.2 by Martin Pitt
Import upstream version 1.5.11+cvs20060403
3
 * 
4
 *     This program is free software; you can redistribute it and/or modify
5
 *     it under the terms of the GNU General Public License as published by
6
 *     the Free Software Foundation; either version 2 of the License, or
7
 *     (at your option) any later version.
8
 * 
9
 *     This program is distributed in the hope that it will be useful,
10
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 *     GNU General Public License for more details.
13
 * 
14
 *     You should have received a copy of the GNU General Public License
15
 *     along with this program; if not, write to the Free Software
16
 *     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17
 */ 
18
19
/* remote host account manipulation (POP/IMAP) */
20
21
#ifndef _MUTT_ACCOUNT_H_
22
#define _MUTT_ACCOUNT_H_ 1
23
24
#include "url.h"
25
26
/* account types */
27
enum
28
{
29
  M_ACCT_TYPE_NONE = 0,
30
  M_ACCT_TYPE_IMAP,
1.1.5 by Christoph Berg
Import upstream version 1.5.15+20070412
31
  M_ACCT_TYPE_POP,
32
  M_ACCT_TYPE_SMTP
1.1.2 by Martin Pitt
Import upstream version 1.5.11+cvs20060403
33
};
34
35
/* account flags */
36
#define M_ACCT_PORT  (1<<0)
37
#define M_ACCT_USER  (1<<1)
38
#define M_ACCT_LOGIN (1<<2)
39
#define M_ACCT_PASS  (1<<3)
40
#define M_ACCT_SSL   (1<<4)
41
42
typedef struct
43
{
44
  char user[64];
45
  char login[64];
46
  char pass[64];
47
  char host[128];
48
  unsigned short port;
49
  unsigned char type;
50
  unsigned char flags;
51
} ACCOUNT;
52
53
int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* m2);
54
int mutt_account_fromurl (ACCOUNT* account, ciss_url_t* url);
55
void mutt_account_tourl (ACCOUNT* account, ciss_url_t* url);
56
int mutt_account_getuser (ACCOUNT* account);
57
int mutt_account_getlogin (ACCOUNT* account);
58
int mutt_account_getpass (ACCOUNT* account);
59
void mutt_account_unsetpass (ACCOUNT* account);
60
61
#endif /* _MUTT_ACCOUNT_H_ */