Ignore:
Timestamp:
Aug 1, 2010 9:24:58 AM (14 years ago)
Author:
bennylp
Message:

Re #1070 (support for multipart bodies): modified the param field of pjsip_media_type from a simple string to pjsip_param, to support a more complex use of this field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_msg.h

    r3233 r3241  
    516516    pj_str_t type;          /**< Media type. */ 
    517517    pj_str_t subtype;       /**< Media subtype. */ 
    518     pj_str_t param;         /**< Media type parameters (concatenated). */ 
     518    pjsip_param param;      /**< Media type parameters */ 
    519519} pjsip_media_type; 
    520520 
     521 
     522/** 
     523 * Initialize the media type with the specified type and subtype string. 
     524 * 
     525 * @param mt            The media type. 
     526 * @param type          Optionally specify the media type. 
     527 * @param subtype       Optionally specify the media subtype. 
     528 */ 
     529PJ_DECL(void) pjsip_media_type_init(pjsip_media_type *mt, 
     530                                    pj_str_t *type, 
     531                                    pj_str_t *subtype); 
     532 
     533/** 
     534 * Initialize the media type with the specified type and subtype string. 
     535 * 
     536 * @param mt            The media type. 
     537 * @param type          Optionally specify the media type. 
     538 * @param subtype       Optionally specify the media subtype. 
     539 */ 
     540PJ_DECL(void) pjsip_media_type_init2(pjsip_media_type *mt, 
     541                                     char *type, 
     542                                     char *subtype); 
     543 
     544/** 
     545 * Compare two media types. 
     546 * 
     547 * @param mt1           The first media type. 
     548 * @param mt2           The second media type. 
     549 * 
     550 * @return              Zero if both media types are equal, -1 if mt1 < mt2, 
     551 *                      1 if mt1 > mt2. 
     552 */ 
     553PJ_DECL(int) pjsip_media_type_cmp(const pjsip_media_type *mt1, 
     554                                  const pjsip_media_type *mt2); 
    521555 
    522556/** 
     
    530564                                  pjsip_media_type *dst, 
    531565                                  const pjsip_media_type *src); 
     566 
     567/** 
     568 * Print media type to the specified buffer. 
     569 * 
     570 * @param buf           Destination buffer. 
     571 * @param len           Length of the buffer. 
     572 * @param mt            The media type to be printed. 
     573 * 
     574 * @return              The number of characters printed to the buffer, or -1 
     575 *                      if there's not enough space in the buffer. 
     576 */ 
     577PJ_DECL(int) pjsip_media_type_print(char *buf, unsigned len, 
     578                                    const pjsip_media_type *mt); 
    532579 
    533580/** 
Note: See TracChangeset for help on using the changeset viewer.