#ifndef MESSAGE_PART_DATA_H
#define MESSAGE_PART_DATA_H
#include "message-part.h"
struct message_header_line;
struct message_part_param {
const char *name;
const char *value;
};
struct message_part_envelope {
};
struct message_part_data {
unsigned int content_type_params_count;
const char *content_transfer_encoding;
const char *content_id;
const char *content_description;
const char *content_disposition;
unsigned int content_disposition_params_count;
const char *content_md5;
const char *const *content_language;
const char *content_location;
};
struct message_part_attachment_settings {
/* By default, all attachments with content-disposition=attachment
or content-disposition=inline;filename=... are consired as an
attachment.
If content_type_filter is set to an array of masks, then
anything starting with ! is excluded, and anything without
Setting exclude_inlined, will exclude **any** inlined attachment
regardless of what content_type_filter is.
*/
const char *const *content_type_filter;
bool exclude_inlined;
};
extern const char *message_part_envelope_headers[];
/*
*
*/
charset "us-ascii" and content-transfer-encoding "7bit" */
/* Returns TRUE if this message part has a filename. The filename is
returned in filename_r. */
const char **filename_r);
/* See message_part_attachment_settings */
/* Returns TRUE if message part has given parameter, and has non-empty
value if has_value is TRUE. */
bool has_value);
/* Check if part is attachment according to given settings */
const struct message_part_attachment_settings *set);
/*
* Header parsing
*/
/* Update envelope data based from given header field */
struct message_part_envelope **_data,
struct message_header_line *hdr);
/* Parse a single header. Note that this modifies part->context. */
struct message_part *part,
struct message_header_line *hdr);
#endif