NeoMutt  2025-12-11-769-g906513
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
23
95
96#ifndef MUTT_AUTOCRYPT_LIB_H
97#define MUTT_AUTOCRYPT_LIB_H
98
99#include "config.h"
100#include <sqlite3.h>
101#include <stdbool.h>
102#include <stdio.h>
103#include "mutt/lib.h"
104#include "module_data.h"
105
106struct Email;
107struct Envelope;
108struct SubMenu;
109
114{
116 char *keyid;
117 char *keydata;
119 bool enabled;
120};
121ARRAY_HEAD(AutocryptAccountArray, struct AutocryptAccount *);
122
127{
129 sqlite3_int64 last_seen;
130 sqlite3_int64 autocrypt_timestamp;
131 char *keyid;
132 char *keydata;
134 sqlite3_int64 gossip_timestamp;
137};
138
143{
146 sqlite3_int64 timestamp;
147 char *keydata;
148};
149
161
173
174struct NeoMutt;
175
176void autocrypt_init_keys(struct NeoMutt *n, struct SubMenu *sm_generic);
177
178void dlg_autocrypt (void);
179void mutt_autocrypt_cleanup (void);
181int mutt_autocrypt_init (bool can_create);
183int mutt_autocrypt_process_gossip_header (struct Email *e, struct Envelope *prot_headers);
185enum AutocryptRec mutt_autocrypt_ui_recommendation (const struct Email *e, char **keylist);
187int mutt_autocrypt_write_gossip_headers (struct Envelope *env, FILE *fp);
188
189#endif /* MUTT_AUTOCRYPT_LIB_H */
#define ARRAY_HEAD(name, T)
Define a named struct for arrays of elements of a certain type.
Definition array.h:47
int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env)
Parse an Autocrypt email header.
Definition autocrypt.c:262
int mutt_autocrypt_generate_gossip_list(struct Email *e)
Create the gossip list headers.
Definition autocrypt.c:843
void autocrypt_init_keys(struct NeoMutt *n, struct SubMenu *sm_generic)
Initialise the Autocrypt Keybindings - Implements ::init_keys_api.
Definition functions.c:75
void mutt_autocrypt_cleanup(void)
Shutdown Autocrypt.
Definition autocrypt.c:135
int mutt_autocrypt_write_gossip_headers(struct Envelope *env, FILE *fp)
Write the Autocrypt gossip headers to a file.
Definition autocrypt.c:821
enum AutocryptRec mutt_autocrypt_ui_recommendation(const struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition autocrypt.c:577
int mutt_autocrypt_init(bool can_create)
Initialise Autocrypt.
Definition autocrypt.c:104
int mutt_autocrypt_write_autocrypt_header(struct Envelope *env, FILE *fp)
Write the Autocrypt header to a file.
Definition autocrypt.c:783
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition autocrypt.c:716
AutocryptRec
Recommendation.
Definition lib.h:166
@ AUTOCRYPT_REC_DISCOURAGE
Prefer not to use Autocrypt.
Definition lib.h:169
@ AUTOCRYPT_REC_NO
Do no use Autocrypt.
Definition lib.h:168
@ AUTOCRYPT_REC_OFF
No recommendations.
Definition lib.h:167
@ AUTOCRYPT_REC_AVAILABLE
Autocrypt is available.
Definition lib.h:170
@ AUTOCRYPT_REC_YES
Autocrypt should be used.
Definition lib.h:171
int mutt_autocrypt_process_gossip_header(struct Email *e, struct Envelope *prot_headers)
Parse an Autocrypt email gossip header.
Definition autocrypt.c:410
Autocrypt private Module data.
void dlg_autocrypt(void)
Display the Autocrypt account Menu -.
Convenience wrapper for the library headers.
Autocrypt account.
Definition lib.h:114
char * email_addr
Email address.
Definition lib.h:115
char * keydata
PGP Key data.
Definition lib.h:117
char * keyid
PGP Key id.
Definition lib.h:116
bool enabled
Is this account enabled.
Definition lib.h:119
bool prefer_encrypt
false = nopref, true = mutual
Definition lib.h:118
Autocrypt gossip history.
Definition lib.h:154
char * peer_email_addr
Email addressof the peer.
Definition lib.h:155
char * email_msgid
Sender's email's message id.
Definition lib.h:157
char * sender_email_addr
Sender's email address.
Definition lib.h:156
char * gossip_keydata
Gossip Key data.
Definition lib.h:159
sqlite3_int64 timestamp
Timestamp of sender's email.
Definition lib.h:158
Autocrypt peer history.
Definition lib.h:143
char * peer_email_addr
Email address of the peer.
Definition lib.h:144
char * email_msgid
Message id of the email.
Definition lib.h:145
char * keydata
PGP Key data.
Definition lib.h:147
sqlite3_int64 timestamp
Timestamp of email.
Definition lib.h:146
Autocrypt peer.
Definition lib.h:127
sqlite3_int64 autocrypt_timestamp
When the email was sent.
Definition lib.h:130
char * gossip_keydata
Gossip Key data.
Definition lib.h:136
char * keyid
PGP Key id.
Definition lib.h:131
char * gossip_keyid
Gossip Key id.
Definition lib.h:135
char * keydata
PGP Key data.
Definition lib.h:132
char * email_addr
Email address.
Definition lib.h:128
sqlite3_int64 last_seen
When was the peer last seen.
Definition lib.h:129
bool prefer_encrypt
false = nopref, true = mutual
Definition lib.h:133
sqlite3_int64 gossip_timestamp
Timestamp of Gossip header.
Definition lib.h:134
The envelope/body of an email.
Definition email.h:39
The header of an Email.
Definition envelope.h:57
Container for Accounts, Notifications.
Definition neomutt.h:41
char ** env
Private copy of the environment variables.
Definition neomutt.h:57
Collection of related functions.
Definition menu.h:68