Ignore:
Timestamp:
May 11, 2007 3:14:34 PM (17 years ago)
Author:
bennylp
Message:

HUGE changeset to make the rest of the libraries compile with C++ mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_im.c

    r1242 r1266  
    113113     * "text/plain". 
    114114     */ 
    115     ctype = pjsip_msg_find_hdr(msg, PJSIP_H_CONTENT_TYPE, NULL); 
     115    ctype = (pjsip_ctype_hdr*) 
     116            pjsip_msg_find_hdr(msg, PJSIP_H_CONTENT_TYPE, NULL); 
    116117    if (msg->body == NULL || ctype == NULL ||  
    117118        !acceptable_message(&ctype->media))  
     
    143144 
    144145    /* Build remote contact */ 
    145     contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
     146    contact_hdr = (pjsip_contact_hdr*) 
     147                  pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
    146148                                     NULL); 
    147149    if (contact_hdr) { 
    148         contact.ptr = pj_pool_alloc(rdata->tp_info.pool,  
    149                                     PJSIP_MAX_URL_SIZE); 
     150        contact.ptr = (char*) pj_pool_alloc(rdata->tp_info.pool,  
     151                                            PJSIP_MAX_URL_SIZE); 
    150152        contact.slen = pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR, 
    151153                                       contact_hdr->uri, contact.ptr, 
     
    163165         
    164166        /* Save text body */ 
    165         text_body.ptr = rdata->msg_info.msg->body->data; 
     167        text_body.ptr = (char*) rdata->msg_info.msg->body->data; 
    166168        text_body.slen = rdata->msg_info.msg->body->len; 
    167169 
     
    176178        pj_bool_t is_typing; 
    177179 
    178         status = pjsip_iscomposing_parse( rdata->tp_info.pool, body->data, 
    179                                           body->len, &is_typing, NULL, NULL, 
    180                                           NULL ); 
     180        status = pjsip_iscomposing_parse(rdata->tp_info.pool, (char*)body->data, 
     181                                         body->len, &is_typing, NULL, NULL, 
     182                                         NULL ); 
    181183        if (status != PJ_SUCCESS) { 
    182184            pjsua_perror(THIS_FILE, "Invalid MESSAGE body", status); 
     
    241243     * not available, then use From header. 
    242244     */ 
    243     from.ptr = pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE); 
    244     contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, 
     245    from.ptr = (char*) pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE); 
     246    contact_hdr = (pjsip_contact_hdr*) 
     247                  pjsip_msg_find_hdr(rdata->msg_info.msg, 
    245248                                     PJSIP_H_CONTACT, NULL); 
    246249    if (contact_hdr) { 
     
    258261 
    259262    /* Build the To text. */ 
    260     to.ptr = pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE); 
     263    to.ptr = (char*) pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE); 
    261264    to.slen = pjsip_uri_print( PJSIP_URI_IN_FROMTO_HDR,  
    262265                               rdata->msg_info.to->uri, 
     
    276279static void im_callback(void *token, pjsip_event *e) 
    277280{ 
    278     pjsua_im_data *im_data = token; 
     281    pjsua_im_data *im_data = (pjsua_im_data*) token; 
    279282 
    280283    if (e->type == PJSIP_EVENT_TSX_STATE) { 
     
    353356static void typing_callback(void *token, pjsip_event *e) 
    354357{ 
    355     pjsua_im_data *im_data = token; 
     358    pjsua_im_data *im_data = (pjsua_im_data*) token; 
    356359 
    357360    if (e->type == PJSIP_EVENT_TSX_STATE) { 
     
    464467     * application on the callback 
    465468     */ 
    466     im_data = pj_pool_zalloc(tdata->pool, sizeof(*im_data)); 
     469    im_data = PJ_POOL_ZALLOC_T(tdata->pool, pjsua_im_data); 
    467470    im_data->acc_id = acc_id; 
    468471    im_data->call_id = PJSUA_INVALID_ID; 
     
    571574 
    572575    /* Create data to reauthenticate */ 
    573     im_data = pj_pool_zalloc(tdata->pool, sizeof(*im_data)); 
     576    im_data = PJ_POOL_ZALLOC_T(tdata->pool, pjsua_im_data); 
    574577    im_data->acc_id = acc_id; 
    575578 
Note: See TracChangeset for help on using the changeset viewer.