account.h 1.74 KB
Newer Older
1
/*
2
 * Copyright (C) 2000-5 Brendan Cully <brendan@kublai.com>
3 4 5 6 7 8 9 10 11 12 13 14 15
 * 
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 * 
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 * 
 *     You should have received a copy of the GNU General Public License
 *     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 20 21 22 23
 */ 

/* remote host account manipulation (POP/IMAP) */

#ifndef _MUTT_ACCOUNT_H_
#define _MUTT_ACCOUNT_H_ 1

24 25
#include "url.h"

26 27 28 29 30 31 32 33 34
/* account types */
enum
{
  M_ACCT_TYPE_NONE = 0,
  M_ACCT_TYPE_IMAP,
  M_ACCT_TYPE_POP
};

/* account flags */
35 36 37 38 39
#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)
40 41 42 43

typedef struct
{
  char user[64];
44
  char login[64];
45
  char pass[64];
46 47 48 49 50 51 52
  char host[128];
  unsigned short port;
  unsigned char type;
  unsigned char flags;
} ACCOUNT;

int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* m2);
53
int mutt_account_fromurl (ACCOUNT* account, ciss_url_t* url);
Thomas Roessler's avatar
Thomas Roessler committed
54
void mutt_account_tourl (ACCOUNT* account, ciss_url_t* url);
55
int mutt_account_getuser (ACCOUNT* account);
56
int mutt_account_getlogin (ACCOUNT* account);
57
int mutt_account_getpass (ACCOUNT* account);
58
void mutt_account_unsetpass (ACCOUNT* account);
59 60

#endif /* _MUTT_ACCOUNT_H_ */