NeoMutt  2020-06-26-30-g76c339
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
88 #ifndef MUTT_AUTOCRYPT_LIB_H
89 #define MUTT_AUTOCRYPT_LIB_H
90 
91 #include <sqlite3.h>
92 #include <stdbool.h>
93 #include <stdio.h>
94 
95 struct Email;
96 struct Envelope;
97 
102 {
103  char *email_addr;
104  char *keyid;
105  char *keydata;
107  bool enabled;
108 };
109 
114 {
115  char *email_addr;
116  sqlite3_int64 last_seen;
117  sqlite3_int64 autocrypt_timestamp;
118  char *keyid;
119  char *keydata;
121  sqlite3_int64 gossip_timestamp;
124 };
125 
130 {
132  char *email_msgid;
133  sqlite3_int64 timestamp;
134  char *keydata;
135 };
136 
141 {
144  char *email_msgid;
145  sqlite3_int64 timestamp;
147 };
148 
153 {
159 };
160 
161 void mutt_autocrypt_account_menu (void);
162 void mutt_autocrypt_cleanup (void);
164 int mutt_autocrypt_init (bool can_create);
165 int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env);
166 int mutt_autocrypt_process_gossip_header (struct Email *e, struct Envelope *prot_headers);
168 enum AutocryptRec mutt_autocrypt_ui_recommendation (struct Email *e, char **keylist);
169 int mutt_autocrypt_write_autocrypt_header (struct Envelope *env, FILE *fp);
170 int mutt_autocrypt_write_gossip_headers (struct Envelope *env, FILE *fp);
171 
172 #endif /* MUTT_AUTOCRYPT_LIB_H */
AutocryptRec
Recommendation.
Definition: lib.h:152
The envelope/body of an email.
Definition: email.h:37
Autocrypt should be used.
Definition: lib.h:158
char * peer_email_addr
Definition: lib.h:142
char * email_msgid
Definition: lib.h:132
char * keydata
Definition: lib.h:119
sqlite3_int64 timestamp
Definition: lib.h:133
No recommendations.
Definition: lib.h:154
char * email_addr
Definition: lib.h:103
int mutt_autocrypt_init(bool can_create)
Initialise Autocrypt.
Definition: autocrypt.c:92
int mutt_autocrypt_generate_gossip_list(struct Email *e)
Create the gossip list headers.
Definition: autocrypt.c:783
char * keyid
Definition: lib.h:104
char * gossip_keydata
Definition: lib.h:123
Do no use Autocrypt.
Definition: lib.h:155
sqlite3_int64 gossip_timestamp
Definition: lib.h:121
sqlite3_int64 autocrypt_timestamp
Definition: lib.h:117
char * sender_email_addr
Definition: lib.h:143
bool enabled
Definition: lib.h:107
Autocrypt peer.
Definition: lib.h:113
char * email_msgid
Definition: lib.h:144
void mutt_autocrypt_account_menu(void)
Display the Autocrypt account Menu.
Definition: acct_menu.c:260
char * email_addr
Definition: lib.h:115
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:106
Autocrypt gossip history.
Definition: lib.h:140
int mutt_autocrypt_write_autocrypt_header(struct Envelope *env, FILE *fp)
Write the Autocrypt header to a file.
Definition: autocrypt.c:725
sqlite3_int64 last_seen
Definition: lib.h:116
char * gossip_keyid
Definition: lib.h:122
enum AutocryptRec mutt_autocrypt_ui_recommendation(struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition: autocrypt.c:549
Prefer not to use Autocrypt.
Definition: lib.h:156
Autocrypt peer history.
Definition: lib.h:129
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:120
char * keydata
Definition: lib.h:134
Autocrypt account.
Definition: lib.h:101
int mutt_autocrypt_write_gossip_headers(struct Envelope *env, FILE *fp)
Write the Autocrypt gossip headers to a file.
Definition: autocrypt.c:762
int mutt_autocrypt_set_sign_as_default_key(struct Email *e)
Set the Autocrypt default key for signing.
Definition: autocrypt.c:660
char * keydata
Definition: lib.h:105
int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *env)
Parse an Autocrypt email header.
Definition: autocrypt.c:249
Autocrypt is available.
Definition: lib.h:157
char * gossip_keydata
Definition: lib.h:146
char * keyid
Definition: lib.h:118
void mutt_autocrypt_cleanup(void)
Shutdown Autocrypt.
Definition: autocrypt.c:132
sqlite3_int64 timestamp
Definition: lib.h:145
char * peer_email_addr
Definition: lib.h:131
int mutt_autocrypt_process_gossip_header(struct Email *e, struct Envelope *prot_headers)
Parse an Autocrypt email gossip header.
Definition: autocrypt.c:396
The header of an Email.
Definition: envelope.h:54