Attachment Content-ID header functions. More...
#include "config.h"#include <stdbool.h>#include <stddef.h>#include <stdio.h>#include <string.h>#include "email/lib.h"#include "core/lib.h"#include "cid.h"#include "attach.h"#include "mailcap.h"#include "mutt_attach.h"
Include dependency graph for cid.c:Go to the source code of this file.
Functions | |
| void | cid_map_free (struct CidMap **ptr) |
| Free a CidMap. | |
| struct CidMap * | cid_map_new (const char *cid, const char *filename) |
| Initialise a new CidMap. | |
| void | cid_map_list_clear (struct CidMapList *cid_map_list) |
| Empty a CidMapList. | |
| static void | cid_save_attachment (struct Body *b, struct CidMapList *cid_map_list) |
| Save attachment if it has a Content-ID. | |
| void | cid_save_attachments (struct Body *body, struct CidMapList *cid_map_list) |
| Save all attachments in a "multipart/related" group with a Content-ID. | |
| void | cid_to_filename (struct Buffer *filename, const struct CidMapList *cid_map_list) |
| Replace Content-IDs with filenames. | |
Attachment Content-ID header functions.
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 cid.c.
| void cid_map_free | ( | struct CidMap ** | ptr | ) |
| struct CidMap * cid_map_new | ( | const char * | cid, |
| const char * | filename | ||
| ) |
Initialise a new CidMap.
| cid | Content-ID to replace including "cid:" prefix |
| filename | Path to file to replace Content-ID with |
| ptr | Newly allocated CidMap |
Definition at line 65 of file cid.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void cid_map_list_clear | ( | struct CidMapList * | cid_map_list | ) |
Empty a CidMapList.
| cid_map_list | List of Content-ID to filename mappings |
Definition at line 82 of file cid.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Save attachment if it has a Content-ID.
| [in] | b | Body to check and save |
| [out] | cid_map_list | List of Content-ID to filename mappings |
If body has a Content-ID, it is saved to disk and a new Content-ID to filename mapping is added to cid_map_list.
Definition at line 103 of file cid.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void cid_save_attachments | ( | struct Body * | body, |
| struct CidMapList * | cid_map_list | ||
| ) |
Save all attachments in a "multipart/related" group with a Content-ID.
| [in] | body | First body in "multipart/related" group |
| [out] | cid_map_list | List of Content-ID to filename mappings |
Definition at line 151 of file cid.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void cid_to_filename | ( | struct Buffer * | filename, |
| const struct CidMapList * | cid_map_list | ||
| ) |
Replace Content-IDs with filenames.
| filename | Path to file to replace Content-IDs with filenames |
| cid_map_list | List of Content-ID to filename mappings |
Definition at line 170 of file cid.c.
Here is the call graph for this function:
Here is the caller graph for this function: