diff options
author | Kevin McCarthy <kevin@8t8.us> | 2017-08-10 18:18:21 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2017-08-10 18:18:21 -0700 |
commit | 2fd6f99bea1337e1b490a9056033fe0151f22ddc (patch) | |
tree | 58ed4ac34b12270b6c495d8f20ef805b9d376481 /attach.h | |
parent | 7a002ec117886669ba9e1f19bed506847b730c9d (diff) |
Change recvattach to allow nested encryption. (see #3728)
* Add a FP and BODY array to the actx. These are used to allow proper
cleanup.
* Add HEADER and root_fp entries, to allow for index regeneration.
* Separate out the compose and recvattach index generation functions.
* Change the recvattach index generator to decrypt as encrypted parts
are found.
Diffstat (limited to 'attach.h')
-rw-r--r-- | attach.h | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -26,21 +26,34 @@ typedef struct attachptr { BODY *content; + FILE *fp; /* used in the recvattach menu. */ int parent_type; char *tree; int level; int num; unsigned int unowned : 1; /* don't unlink on detach */ + unsigned int decrypted : 1; /* not part of message as stored in the hdr->content. */ } ATTACHPTR; typedef struct attach_ctx { + HEADER *hdr; /* used by recvattach for updating */ + FILE *root_fp; /* used by recvattach for updating */ + ATTACHPTR **idx; short idxlen; short idxmax; + + FILE **fp_idx; /* Extra FILE* used for decryption */ + short fp_len; + short fp_max; + + BODY **body_idx; /* Extra BODY* used for decryption */ + short body_len; + short body_max; } ATTACH_CONTEXT; -void mutt_gen_attach_list (ATTACH_CONTEXT *, BODY *, int, int, int); +void mutt_attach_init (ATTACH_CONTEXT *); void mutt_update_tree (ATTACH_CONTEXT *); int mutt_view_attachment (FILE*, BODY *, int, HEADER *, ATTACH_CONTEXT *); @@ -60,6 +73,8 @@ void mutt_attach_forward (FILE *, HEADER *, ATTACH_CONTEXT *, BODY *); void mutt_attach_reply (FILE *, HEADER *, ATTACH_CONTEXT *, BODY *, int); void mutt_actx_add_attach (ATTACH_CONTEXT *actx, ATTACHPTR *attach, MUTTMENU *menu); +void mutt_actx_add_fp (ATTACH_CONTEXT *actx, FILE *new_fp); +void mutt_actx_add_body (ATTACH_CONTEXT *actx, BODY *new_body); void mutt_actx_free_entries (ATTACH_CONTEXT *actx); void mutt_free_attach_context (ATTACH_CONTEXT **pactx); |