NeoMutt  2020-11-20
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
89 #ifndef MUTT_AUTOCRYPT_LIB_H
90 #define MUTT_AUTOCRYPT_LIB_H
91 
92 #include <stdbool.h>
93 #include <sqlite3.h>
94 #include <stdio.h>
95 
96 struct ConfigSet;
97 struct Email;
98 struct Envelope;
99 
104 {
105  char *email_addr;
106  char *keyid;
107  char *keydata;
109  bool enabled;
110 };
111 
116 {
117  char *email_addr;
118  sqlite3_int64 last_seen;
119  sqlite3_int64 autocrypt_timestamp;
120  char *keyid;
121  char *keydata;
123  sqlite3_int64 gossip_timestamp;
126 };
127 
132 {
134  char *email_msgid;
135  sqlite3_int64 timestamp;
136  char *keydata;
137 };
138 
143 {
146  char *email_msgid;
147  sqlite3_int64 timestamp;
149 };
150 
155 {
161 };
162 
163 extern char *AutocryptSignAs;
164 extern char *AutocryptDefaultKey;
165 extern bool C_Autocrypt;
166 extern bool C_AutocryptReply;
167 extern char *C_AutocryptAcctFormat;
168 extern char *C_AutocryptDir;
169 
170 void dlg_select_autocrypt_account (void);
171 void mutt_autocrypt_cleanup (void);
173 int mutt_autocrypt_init (bool can_create);
174 int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env);
175 int mutt_autocrypt_process_gossip_header (struct Email *e, struct Envelope *prot_headers);
177 enum AutocryptRec mutt_autocrypt_ui_recommendation (struct Email *e, char **keylist);
178 int mutt_autocrypt_write_autocrypt_header (struct Envelope *env, FILE *fp);
179 int mutt_autocrypt_write_gossip_headers (struct Envelope *env, FILE *fp);
180 
181 #endif /* MUTT_AUTOCRYPT_LIB_H */
AutocryptRec
Recommendation.
Definition: lib.h:154
Container for lots of config items.
Definition: set.h:228
The envelope/body of an email.
Definition: email.h:37
Autocrypt should be used.
Definition: lib.h:160
char * peer_email_addr
Definition: lib.h:144
char * email_msgid
Definition: lib.h:134
char * keydata
Definition: lib.h:121
sqlite3_int64 timestamp
Definition: lib.h:135
No recommendations.
Definition: lib.h:156
char * email_addr
Definition: lib.h:105
int mutt_autocrypt_init(bool can_create)
Initialise Autocrypt.
Definition: autocrypt.c:93
int mutt_autocrypt_generate_gossip_list(struct Email *e)
Create the gossip list headers.
Definition: autocrypt.c:808
char * keyid
Definition: lib.h:106
char * gossip_keydata
Definition: lib.h:125
bool C_AutocryptReply
Config: Replying to an autocrypt email automatically enables autocrypt in the reply.
Definition: config.c:38
Do no use Autocrypt.
Definition: lib.h:157
bool C_Autocrypt
Config: Enables the Autocrypt feature.
Definition: config.c:37
sqlite3_int64 gossip_timestamp
Definition: lib.h:123
sqlite3_int64 autocrypt_timestamp
Definition: lib.h:119
char * sender_email_addr
Definition: lib.h:145
bool enabled
Definition: lib.h:109
Autocrypt peer.
Definition: lib.h:115
char * email_msgid
Definition: lib.h:146
char * AutocryptSignAs
Autocrypt Key id to sign as.
Definition: config.c:42
char * email_addr
Definition: lib.h:117
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:108
Autocrypt gossip history.
Definition: lib.h:142
int mutt_autocrypt_write_autocrypt_header(struct Envelope *env, FILE *fp)
Write the Autocrypt header to a file.
Definition: autocrypt.c:750
sqlite3_int64 last_seen
Definition: lib.h:118
char * gossip_keyid
Definition: lib.h:124
enum AutocryptRec mutt_autocrypt_ui_recommendation(struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition: autocrypt.c:551
Prefer not to use Autocrypt.
Definition: lib.h:158
char * C_AutocryptDir
Config: Location of autocrypt files, including the GPG keyring and SQLite database.
Definition: config.c:40
Autocrypt peer history.
Definition: lib.h:131
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:122
char * keydata
Definition: lib.h:136
Autocrypt account.
Definition: lib.h:103
int mutt_autocrypt_write_gossip_headers(struct Envelope *env, FILE *fp)
Write the Autocrypt gossip headers to a file.
Definition: autocrypt.c:787
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition: autocrypt.c:685
void dlg_select_autocrypt_account(void)
Display the Autocrypt account Menu.
Definition: dlgautocrypt.c:256
char * keydata
Definition: lib.h:107
int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env)
Parse an Autocrypt email header.
Definition: autocrypt.c:250
Autocrypt is available.
Definition: lib.h:159
char * C_AutocryptAcctFormat
Config: Format of the autocrypt account menu.
Definition: config.c:39
char * gossip_keydata
Definition: lib.h:148
char * AutocryptDefaultKey
Autocrypt default key id (used for postponing messages)
Definition: config.c:43
char * keyid
Definition: lib.h:120
void mutt_autocrypt_cleanup(void)
Shutdown Autocrypt.
Definition: autocrypt.c:133
sqlite3_int64 timestamp
Definition: lib.h:147
char * peer_email_addr
Definition: lib.h:133
int mutt_autocrypt_process_gossip_header(struct Email *e, struct Envelope *prot_headers)
Parse an Autocrypt email gossip header.
Definition: autocrypt.c:398
The header of an Email.
Definition: envelope.h:54