NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
connaccount.h
Go to the documentation of this file.
1
23#ifndef MUTT_CONN_CONNACCOUNT_H
24#define MUTT_CONN_CONNACCOUNT_H
25
26#include <stdbool.h>
27#include <stdint.h>
28
33{
39};
40
41typedef uint8_t MuttAccountFlags;
42#define MUTT_ACCT_NO_FLAGS 0
43#define MUTT_ACCT_PORT (1 << 0)
44#define MUTT_ACCT_USER (1 << 1)
45#define MUTT_ACCT_LOGIN (1 << 2)
46#define MUTT_ACCT_PASS (1 << 3)
47#define MUTT_ACCT_SSL (1 << 4)
48
53{
54 char host[128];
55 char login[128];
56 char user[128];
57 char pass[256];
58 unsigned short port;
59 unsigned char type;
61 const char *service;
62
70 const char *(*get_field)(enum ConnAccountField field, void *gf_data);
71
72 void *gf_data;
73};
74
81{
88};
89
90int mutt_account_getlogin (struct ConnAccount *account);
91char *mutt_account_getoauthbearer(struct ConnAccount *account, bool xoauth2);
92int mutt_account_getpass (struct ConnAccount *account);
93int mutt_account_getuser (struct ConnAccount *account);
94void mutt_account_unsetpass (struct ConnAccount *account);
95
96#endif /* MUTT_CONN_CONNACCOUNT_H */
int mutt_account_getuser(struct ConnAccount *account)
Retrieve username into ConnAccount, if necessary.
Definition: connaccount.c:51
uint8_t MuttAccountFlags
Flags, Which ConnAccount fields are initialised, e.g. MUTT_ACCT_PORT.
Definition: connaccount.h:41
ConnAccountField
Login credentials.
Definition: connaccount.h:33
@ MUTT_CA_OAUTH_CMD
OAuth refresh command.
Definition: connaccount.h:38
@ MUTT_CA_USER
User name.
Definition: connaccount.h:36
@ MUTT_CA_LOGIN
Login name.
Definition: connaccount.h:35
@ MUTT_CA_HOST
Server name.
Definition: connaccount.h:34
@ MUTT_CA_PASS
Password.
Definition: connaccount.h:37
void mutt_account_unsetpass(struct ConnAccount *account)
Unset ConnAccount's password.
Definition: connaccount.c:177
ExpandoDataNntp
Expando UIDs for NNTP.
Definition: connaccount.h:81
@ ED_NTP_SCHEMA
ConnAccount.account.
Definition: connaccount.h:85
@ ED_NTP_USERNAME
ConnAccount.user.
Definition: connaccount.h:87
@ ED_NTP_PORT_IF
ConnAccount.port.
Definition: connaccount.h:84
@ ED_NTP_SERVER
ConnAccount.account.
Definition: connaccount.h:86
@ ED_NTP_ACCOUNT
ConnAccount.account.
Definition: connaccount.h:82
@ ED_NTP_PORT
ConnAccount.port.
Definition: connaccount.h:83
int mutt_account_getpass(struct ConnAccount *account)
Fetch password into ConnAccount, if necessary.
Definition: connaccount.c:130
char * mutt_account_getoauthbearer(struct ConnAccount *account, bool xoauth2)
Get an OAUTHBEARER/XOAUTH2 token.
Definition: connaccount.c:195
int mutt_account_getlogin(struct ConnAccount *account)
Retrieve login info into ConnAccount, if necessary.
Definition: connaccount.c:100
Login details for a remote server.
Definition: connaccount.h:53
char login[128]
Login name.
Definition: connaccount.h:55
char user[128]
Username.
Definition: connaccount.h:56
char pass[256]
Password.
Definition: connaccount.h:57
const char * service
Name of the service, e.g. "imap".
Definition: connaccount.h:61
char host[128]
Server to login to.
Definition: connaccount.h:54
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
Definition: connaccount.h:59
MuttAccountFlags flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:60
void * gf_data
Private data to pass to get_field()
Definition: connaccount.h:72
unsigned short port
Port to connect to.
Definition: connaccount.h:58