NeoMutt  2022-04-29-323-g5fcc6c
Teaching an old dog new tricks
DOXYGEN
functions.h File Reference

Envelope functions. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EnvelopeFunction
 A NeoMutt Envelope function. More...
 

Typedefs

typedef int(* envelope_function_t) (struct EnvelopeWindowData *wdata, int op)
 

Functions

int env_function_dispatcher (struct MuttWindow *win, int op)
 Perform an Envelope function - Implements function_dispatcher_t -. More...
 
void update_crypt_info (struct EnvelopeWindowData *wdata)
 Update the crypto info. More...
 

Variables

struct EnvelopeFunction EnvelopeFunctions []
 All the NeoMutt functions that the Envelope supports. More...
 

Detailed Description

Envelope functions.

Authors
  • Richard Russon

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, see http://www.gnu.org/licenses/.

Definition in file functions.h.

Typedef Documentation

◆ envelope_function_t

typedef int(* envelope_function_t) (struct EnvelopeWindowData *wdata, int op)

Definition at line 39 of file functions.h.

Function Documentation

◆ update_crypt_info()

void update_crypt_info ( struct EnvelopeWindowData wdata)

Update the crypto info.

Parameters
wdataEnvelope Window data

Definition at line 146 of file functions.c.

147{
148 struct Email *e = wdata->email;
149
150 const bool c_crypt_opportunistic_encrypt = cs_subset_bool(wdata->sub, "crypt_opportunistic_encrypt");
151 if (c_crypt_opportunistic_encrypt)
153
154#ifdef USE_AUTOCRYPT
155 const bool c_autocrypt = cs_subset_bool(wdata->sub, "autocrypt");
156 if (c_autocrypt)
157 {
159
160 /* Anything that enables SEC_ENCRYPT or SEC_SIGN, or turns on SMIME
161 * overrides autocrypt, be it oppenc or the user having turned on
162 * those flags manually. */
164 {
166 }
167 else
168 {
170 {
171 if (wdata->autocrypt_rec == AUTOCRYPT_REC_YES)
172 {
175 }
176 else
177 e->security &= ~SEC_AUTOCRYPT;
178 }
179 }
180 }
181#endif
182}
@ AUTOCRYPT_REC_YES
Autocrypt should be used.
Definition: lib.h:162
enum AutocryptRec mutt_autocrypt_ui_recommendation(const struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition: autocrypt.c:567
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:73
void crypt_opportunistic_encrypt(struct Email *e)
Can all recipients be determined.
Definition: crypt.c:1023
#define SEC_INLINE
Email has an inline signature.
Definition: lib.h:85
#define SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition: lib.h:87
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:90
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:91
#define SEC_ENCRYPT
Email is encrypted.
Definition: lib.h:78
#define SEC_AUTOCRYPT_OVERRIDE
(Autocrypt) Indicates manual set/unset of encryption
Definition: lib.h:88
#define SEC_SIGN
Email is signed.
Definition: lib.h:79
The envelope/body of an email.
Definition: email.h:37
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition: email.h:41
struct Email * email
Email being composed.
Definition: wdata.h:41
struct ConfigSubset * sub
Inherited config items.
Definition: wdata.h:40
enum AutocryptRec autocrypt_rec
Autocrypt recommendation.
Definition: wdata.h:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ EnvelopeFunctions

struct EnvelopeFunction EnvelopeFunctions[]
extern

All the NeoMutt functions that the Envelope supports.

Definition at line 526 of file functions.c.