/src/neomutt/envelope/wdata.c
Line | Count | Source (jump to first uncovered line) |
1 | | /** |
2 | | * @file |
3 | | * Envelope Window Data |
4 | | * |
5 | | * @authors |
6 | | * Copyright (C) 2021 Richard Russon <rich@flatcap.org> |
7 | | * |
8 | | * @copyright |
9 | | * This program is free software: you can redistribute it and/or modify it under |
10 | | * the terms of the GNU General Public License as published by the Free Software |
11 | | * Foundation, either version 2 of the License, or (at your option) any later |
12 | | * version. |
13 | | * |
14 | | * This program is distributed in the hope that it will be useful, but WITHOUT |
15 | | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
16 | | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
17 | | * details. |
18 | | * |
19 | | * You should have received a copy of the GNU General Public License along with |
20 | | * this program. If not, see <http://www.gnu.org/licenses/>. |
21 | | */ |
22 | | |
23 | | /** |
24 | | * @page envelope_wdata Envelope Window Data |
25 | | * |
26 | | * Envelope Window Data |
27 | | */ |
28 | | |
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 | | |
36 | | /** |
37 | | * env_wdata_free - Free the Envelope Data - Implements MuttWindow::wdata_free() - @ingroup window_wdata_free |
38 | | */ |
39 | | void env_wdata_free(struct MuttWindow *win, void **ptr) |
40 | 0 | { |
41 | 0 | FREE(ptr); |
42 | 0 | } |
43 | | |
44 | | /** |
45 | | * env_wdata_new - Create new Envelope Data |
46 | | * @retval ptr New Envelope Data |
47 | | */ |
48 | | struct EnvelopeWindowData *env_wdata_new(void) |
49 | 0 | { |
50 | 0 | struct EnvelopeWindowData *wdata = mutt_mem_calloc(1, sizeof(struct EnvelopeWindowData)); |
51 | |
|
52 | | #ifdef USE_AUTOCRYPT |
53 | | wdata->autocrypt_rec = AUTOCRYPT_REC_OFF; |
54 | | #endif |
55 | |
|
56 | 0 | return wdata; |
57 | 0 | } |