41 #include <sofia-sip/url.h>
208 char const *content_type,
228 char *b, isize_t xtra);
234 #define MSG_MULTIPART_VERSION_CURRENT msg_mime_version_1_0
239 #define MSG_MULTIPART_PROTOCOL_TAG ((void *)0x4d494d45)
241 #define MSG_MULTIPART_PROTOCOL_TAG ((void *)(UINT_PTR)0x4d494d45)
msg_accept_any_t msg_accept_charset_t
The structure msg_accept_encoding_t contains representation of Accept-Charset header.
Definition: msg_mime.h:57
msg_accept_any_t msg_accept_encoding_t
The structure msg_accept_encoding_t contains representation of Accept-Encoding header.
Definition: msg_mime.h:58
msg_accept_any_t msg_accept_language_t
The structure msg_accept_language_t contains representation of Accept-Language header.
Definition: msg_mime.h:59
msg_list_t msg_content_encoding_t
The structure msg_content_encoding_t contains representation of an Content-Encoding header.
Definition: msg_mime.h:63
msg_generic_t msg_content_id_t
Content-ID Header Structure.
Definition: msg_mime.h:64
msg_list_t msg_content_language_t
The structure msg_content_language_t contains representation of Content-Language header.
Definition: msg_mime.h:67
msg_content_length_t * msg_content_length_create(su_home_t *home, uint32_t n)
Create a Content-Length header object.
Definition: msg_mime.c:1706
msg_generic_t msg_content_location_t
The structure msg_content_location_t contains representation of an Content-Location header.
Definition: msg_mime.h:66
msg_generic_t msg_content_md5_t
The structure msg_content_md5_t contains representation of an Content-MD5 header.
Definition: msg_mime.h:68
msg_generic_t msg_content_transfer_encoding_t
The structure msg_content_transfer_encoding_t contains representation of an Content-Transfer-Encoding...
Definition: msg_mime.h:69
msg_generic_t msg_mime_version_t
The structure msg_mime_version_t contains representation of an MIME-Version header.
Definition: msg_mime.h:71
msg_multipart_t * msg_multipart_parse(su_home_t *home, msg_content_type_t const *c, msg_payload_t *pl)
Parse a MIME multipart.
Definition: msg_mime.c:372
msg_header_t * msg_multipart_serialize(msg_header_t **head0, msg_multipart_t *mp)
Serialize a multipart message.
Definition: msg_mime.c:686
char const msg_mime_version_1_0[]
Protocol version of MIME.
Definition: msg_mime.c:64
issize_t msg_multipart_prepare(msg_t *msg, msg_multipart_t *mp, int flags)
Encode a multipart.
Definition: msg_mime.c:816
int msg_multipart_complete(su_home_t *home, msg_content_type_t *c, msg_multipart_t *mp)
Add all missing parts to the multipart.
Definition: msg_mime.c:574
msg_multipart_t * msg_multipart_create(su_home_t *home, char const *content_type, void const *data, isize_t dlen)
Create a part for MIME multipart entity.
Definition: msg_mime.c:239
Types for messages and common headers.
MSG_HDR_T msg_header_t
Any protocol-specific header object.
Definition: msg_types.h:87
Structure for Accept-Charset, Accept-Encoding and Accept-Language headers.
Definition: msg_mime.h:95
char const * aa_q
Value of q parameter.
Definition: msg_mime.h:100
char const * aa_value
Token.
Definition: msg_mime.h:98
msg_common_t aa_common[1]
Common fragment info.
Definition: msg_mime.h:96
msg_param_t const * aa_params
List of parameters.
Definition: msg_mime.h:99
msg_accept_any_t * aa_next
Pointer to next Accept-* header.
Definition: msg_mime.h:97
char * msg_accept_any_dup_one(msg_header_t *dst, msg_header_t const *src, char *b, isize_t xtra)
Duplicate one msg_accept_any_t object.
Definition: msg_mime.c:1226
isize_t msg_accept_any_dup_xtra(msg_header_t const *h, isize_t offset)
Calculate extra memory used by accept-* headers.
Definition: msg_mime.c:1214
Structure for Accept header.
Definition: msg_mime.h:81
char const * ac_type
Pointer to type/subtype.
Definition: msg_mime.h:84
char const * ac_q
Value of q parameter.
Definition: msg_mime.h:87
msg_param_t const * ac_params
List of parameters.
Definition: msg_mime.h:86
char const * ac_subtype
Points after first slash in type.
Definition: msg_mime.h:85
msg_accept_t * ac_next
Pointer to next Accept header.
Definition: msg_mime.h:83
msg_common_t ac_common[1]
Common fragment info.
Definition: msg_mime.h:82
Common part of the header objects (or message fragments).
Definition: msg_types.h:111
Structure for Content-Disposition header.
Definition: msg_mime.h:107
msg_common_t cd_common[1]
Common fragment info.
Definition: msg_mime.h:108
unsigned cd_optional
True if handling=optional.
Definition: msg_mime.h:114
msg_error_t * cd_next
Link to next (dummy)
Definition: msg_mime.h:109
char const * cd_type
Disposition type.
Definition: msg_mime.h:110
unsigned cd_required
True if handling=required.
Definition: msg_mime.h:113
char const * cd_handling
Value of handling parameter.
Definition: msg_mime.h:112
msg_param_t const * cd_params
List of parameters.
Definition: msg_mime.h:111
Structure for Content-Length header.
Definition: msg_mime.h:122
msg_error_t * l_next
Link to next (dummy)
Definition: msg_mime.h:124
unsigned long l_length
Digits.
Definition: msg_mime.h:125
msg_common_t l_common[1]
Common fragment info.
Definition: msg_mime.h:123
Structure for Content-Type header.
Definition: msg_mime.h:133
msg_param_t const * c_params
List of parameters.
Definition: msg_mime.h:138
msg_error_t * c_next
Dummy link to next.
Definition: msg_mime.h:135
msg_common_t c_common[1]
Common fragment info.
Definition: msg_mime.h:134
char const * c_type
Pointer to type/subtype.
Definition: msg_mime.h:136
char const * c_subtype
Points after first slash in type.
Definition: msg_mime.h:137
Erroneus header.
Definition: msg_types.h:199
Generic header.
Definition: msg_types.h:151
List header.
Definition: msg_types.h:161
Structure for a part in MIME multipart message.
Definition: msg_mime.h:161
msg_payload_t * mp_payload
Body part.
Definition: msg_mime.h:199
unsigned mp_len
Length of boundary (mp_data).
Definition: msg_mime.h:166
msg_multipart_t * mp_multipart
Recursive multipart.
Definition: msg_mime.h:201
msg_payload_t * mp_close_delim
Closing delimiter.
Definition: msg_mime.h:203
char * mp_data
Boundary string.
Definition: msg_mime.h:165
msg_multipart_t * mp_next
Next part in multipart body.
Definition: msg_mime.h:163
msg_content_type_t * mp_content_type
Content-Type (c)
Definition: msg_mime.h:171
msg_separator_t * mp_separator
Separator.
Definition: msg_mime.h:198
msg_content_transfer_encoding_t * mp_content_transfer_encoding
Content-Transfer-Encoding.
Definition: msg_mime.h:178
msg_content_disposition_t * mp_content_disposition
Content-Disposition.
Definition: msg_mime.h:172
msg_content_language_t * mp_content_language
Content-Language.
Definition: msg_mime.h:176
msg_content_location_t * mp_content_location
Content-Location.
Definition: msg_mime.h:174
msg_content_encoding_t * mp_content_encoding
Content-Encoding (e)
Definition: msg_mime.h:177
msg_common_t mp_common[1]
Common fragment information.
Definition: msg_mime.h:162
msg_unknown_t * mp_unknown
Unknown and extra headers.
Definition: msg_mime.h:196
msg_content_id_t * mp_content_id
Content-ID.
Definition: msg_mime.h:175
Message payload.
Definition: msg_types.h:214
Message object.
Definition: msg_internal.h:59
Separator.
Definition: msg_types.h:207
Unknown header.
Definition: msg_types.h:191
Structure for Warning header.
Definition: msg_mime.h:146
msg_common_t w_common[1]
Common fragment info.
Definition: msg_mime.h:147
char const * w_text
Warning text.
Definition: msg_mime.h:152
char const * w_port
Port number.
Definition: msg_mime.h:151
char const * w_host
Hostname or pseudonym.
Definition: msg_mime.h:150
unsigned w_code
Warning code.
Definition: msg_mime.h:149
msg_warning_t * w_next
Link to next Warning header.
Definition: msg_mime.h:148