NeoMutt  2022-04-29-323-g5fcc6c
Teaching an old dog new tricks
DOXYGEN
wdata.c
Go to the documentation of this file.
1
29#include "config.h"
30#include "mutt/lib.h"
31#include "wdata.h"
32#ifdef USE_AUTOCRYPT
33#include "autocrypt/lib.h"
34#endif
35
39void env_wdata_free(struct MuttWindow *win, void **ptr)
40{
41 struct EnvelopeWindowData *wdata = *ptr;
42
43 // Don't free email, env, fcc, sub -- we don't own them
44 mutt_list_free(&wdata->to_list);
45 mutt_list_free(&wdata->cc_list);
46 mutt_list_free(&wdata->bcc_list);
47
48 FREE(ptr);
49}
50
56{
57 struct EnvelopeWindowData *wdata = mutt_mem_calloc(1, sizeof(struct EnvelopeWindowData));
58
59 STAILQ_INIT(&wdata->to_list);
60 STAILQ_INIT(&wdata->cc_list);
61 STAILQ_INIT(&wdata->bcc_list);
62
63#ifdef USE_AUTOCRYPT
65#endif
66
67 return wdata;
68}
Autocrypt end-to-end encryption.
@ AUTOCRYPT_REC_OFF
No recommendations.
Definition: lib.h:158
struct EnvelopeWindowData * env_wdata_new(void)
Create new Envelope Data.
Definition: wdata.c:55
void env_wdata_free(struct MuttWindow *win, void **ptr)
Free the Envelope Data - Implements MuttWindow::wdata_free() -.
Definition: wdata.c:39
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:122
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
#define FREE(x)
Definition: memory.h:43
Convenience wrapper for the library headers.
Progress Bar Window Data.
#define STAILQ_INIT(head)
Definition: queue.h:372
Data to fill the Envelope Window.
Definition: wdata.h:39
struct ListHead cc_list
'Cc:' list of addresses
Definition: wdata.h:45
struct ListHead bcc_list
'Bcc:' list of addresses
Definition: wdata.h:46
enum AutocryptRec autocrypt_rec
Autocrypt recommendation.
Definition: wdata.h:57
struct ListHead to_list
'To:' list of addresses
Definition: wdata.h:44