Media/MIME type declaration and manipulations.
More...
|
void | pjsip_media_type_init (pjsip_media_type *mt, pj_str_t *type, pj_str_t *subtype) |
|
void | pjsip_media_type_init2 (pjsip_media_type *mt, char *type, char *subtype) |
|
int | pjsip_media_type_cmp (const pjsip_media_type *mt1, const pjsip_media_type *mt2, int cmp_param) |
|
void | pjsip_media_type_cp (pj_pool_t *pool, pjsip_media_type *dst, const pjsip_media_type *src) |
|
int | pjsip_media_type_print (char *buf, unsigned len, const pjsip_media_type *mt) |
|
◆ pjsip_media_type_init()
Initialize the media type with the specified type and subtype string.
- Parameters
-
mt | The media type. |
type | Optionally specify the media type. |
subtype | Optionally specify the media subtype. |
◆ pjsip_media_type_init2()
void pjsip_media_type_init2 |
( |
pjsip_media_type * |
mt, |
|
|
char * |
type, |
|
|
char * |
subtype |
|
) |
| |
Initialize the media type with the specified type and subtype string.
- Parameters
-
mt | The media type. |
type | Optionally specify the media type. |
subtype | Optionally specify the media subtype. |
◆ pjsip_media_type_cmp()
Compare two media types.
- Parameters
-
mt1 | The first media type. |
mt2 | The second media type. |
cmp_param | Specify how to compare the media type parameters:
- 0: do not compare parameters
- 1: compare parameters but ignore parameters that only appear in one of the media type.
- 2: compare the parameters.
|
- Returns
- Zero if both media types are equal, -1 if mt1 < mt2, 1 if mt1 > mt2.
◆ pjsip_media_type_cp()
Copy SIP media type to another.
- Parameters
-
pool | Pool to duplicate strings. |
dst | Destination structure. |
src | Source structure. |
◆ pjsip_media_type_print()
int pjsip_media_type_print |
( |
char * |
buf, |
|
|
unsigned |
len, |
|
|
const pjsip_media_type * |
mt |
|
) |
| |
Print media type to the specified buffer.
- Parameters
-
buf | Destination buffer. |
len | Length of the buffer. |
mt | The media type to be printed. |
- Returns
- The number of characters printed to the buffer, or -1 if there's not enough space in the buffer.