41#include <sofia-sip/url.h>
206 char const *content_type,
227 char *b, isize_t xtra);
238#define MSG_MULTIPART_VERSION_CURRENT msg_mime_version_1_0
242#define MSG_MULTIPART_PROTOCOL_TAG ((void *)(uintptr_t)0x4d494d45)
msg_content_length_t * msg_content_length_create(su_home_t *, uint32_t n)
Create a Content-Length header object.
Definition msg_mime.c:1746
char const msg_mime_version_1_0[]
Protocol version of MIME.
Definition msg_mime.c:60
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:368
issize_t msg_multipart_prepare(msg_t *msg, msg_multipart_t *mp, int flags)
Encode a multipart.
Definition msg_mime.c:817
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:575
unsigned msg_q_value(char const *q)
Calculate Q value.
Definition msg_mime.c:943
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:1266
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:1254
msg_header_t * msg_multipart_serialize(msg_header_t **head0, msg_multipart_t *mp)
Serialize a multipart message.
Definition msg_mime.c:687
msg_accept_t * msg_accept_match(msg_accept_t const *, msg_content_type_t const *)
Check if the Content-Type is Acceptable.
Definition msg_mime.c:1174
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:235
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:94
char const * aa_q
Value of q parameter.
Definition msg_mime.h:99
char const * aa_value
Token.
Definition msg_mime.h:97
msg_common_t aa_common[1]
Common fragment info.
Definition msg_mime.h:95
msg_param_t const * aa_params
List of parameters.
Definition msg_mime.h:98
msg_accept_any_t * aa_next
Pointer to next Accept-* header.
Definition msg_mime.h:96
Structure for Accept header.
Definition msg_mime.h:80
char const * ac_type
Pointer to type/subtype.
Definition msg_mime.h:83
char const * ac_q
Value of q parameter.
Definition msg_mime.h:86
msg_param_t const * ac_params
List of parameters.
Definition msg_mime.h:85
char const * ac_subtype
Points after first slash in type.
Definition msg_mime.h:84
msg_accept_t * ac_next
Pointer to next Accept header.
Definition msg_mime.h:82
msg_common_t ac_common[1]
Common fragment info.
Definition msg_mime.h:81
Common part of the header objects (or message fragments).
Definition msg_types.h:111
Structure for Content-Disposition header.
Definition msg_mime.h:106
msg_common_t cd_common[1]
Common fragment info.
Definition msg_mime.h:107
unsigned cd_optional
True if handling=optional.
Definition msg_mime.h:113
msg_error_t * cd_next
Link to next (dummy)
Definition msg_mime.h:108
char const * cd_type
Disposition type.
Definition msg_mime.h:109
unsigned cd_required
True if handling=required.
Definition msg_mime.h:112
char const * cd_handling
Value of handling parameter.
Definition msg_mime.h:111
msg_param_t const * cd_params
List of parameters.
Definition msg_mime.h:110
Structure for Content-Length header.
Definition msg_mime.h:121
msg_error_t * l_next
Link to next (dummy)
Definition msg_mime.h:123
unsigned long l_length
Digits.
Definition msg_mime.h:124
msg_common_t l_common[1]
Common fragment info.
Definition msg_mime.h:122
Structure for Content-Type header.
Definition msg_mime.h:132
msg_param_t const * c_params
List of parameters.
Definition msg_mime.h:137
msg_error_t * c_next
Dummy link to next.
Definition msg_mime.h:134
msg_common_t c_common[1]
Common fragment info.
Definition msg_mime.h:133
char const * c_type
Pointer to type/subtype.
Definition msg_mime.h:135
char const * c_subtype
Points after first slash in type.
Definition msg_mime.h:136
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:160
msg_payload_t * mp_payload
Body part.
Definition msg_mime.h:198
unsigned mp_len
Length of boundary (mp_data).
Definition msg_mime.h:165
msg_multipart_t * mp_multipart
Recursive multipart.
Definition msg_mime.h:200
msg_payload_t * mp_close_delim
Closing delimiter.
Definition msg_mime.h:202
char * mp_data
Boundary string.
Definition msg_mime.h:164
msg_multipart_t * mp_next
Next part in multipart body.
Definition msg_mime.h:162
msg_content_type_t * mp_content_type
Content-Type (c)
Definition msg_mime.h:170
msg_separator_t * mp_separator
Separator.
Definition msg_mime.h:197
msg_content_transfer_encoding_t * mp_content_transfer_encoding
Content-Transfer-Encoding.
Definition msg_mime.h:177
msg_content_disposition_t * mp_content_disposition
Content-Disposition.
Definition msg_mime.h:171
msg_content_language_t * mp_content_language
Content-Language.
Definition msg_mime.h:175
msg_content_location_t * mp_content_location
Content-Location.
Definition msg_mime.h:173
msg_content_encoding_t * mp_content_encoding
Content-Encoding (e)
Definition msg_mime.h:176
msg_common_t mp_common[1]
Common fragment information.
Definition msg_mime.h:161
msg_unknown_t * mp_unknown
Unknown and extra headers.
Definition msg_mime.h:195
msg_content_id_t * mp_content_id
Content-ID.
Definition msg_mime.h:174
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:145
msg_common_t w_common[1]
Common fragment info.
Definition msg_mime.h:146
char const * w_text
Warning text.
Definition msg_mime.h:151
char const * w_port
Port number.
Definition msg_mime.h:150
char const * w_host
Hostname or pseudonym.
Definition msg_mime.h:149
unsigned w_code
Warning code.
Definition msg_mime.h:148
msg_warning_t * w_next
Link to next Warning header.
Definition msg_mime.h:147