Ignore:
Timestamp:
Oct 4, 2012 6:11:58 AM (12 years ago)
Author:
bennylp
Message:

Close #1590: APIs to facilitate pending processing of pjsip_rx_data

File:
1 edited

Legend:

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

    r4218 r4275  
    427427 */ 
    428428PJ_DECL(char*) pjsip_rx_data_get_info(pjsip_rx_data *rdata); 
     429 
     430/** 
     431 * Clone pjsip_rx_data. This will duplicate the contents of 
     432 * pjsip_rx_data and add reference count to the transport. 
     433 * Once application has finished using the cloned pjsip_rx_data, 
     434 * it must release it by calling  #pjsip_rx_data_free_cloned(). 
     435 * 
     436 * By default (if flags is set to zero), this function copies the 
     437 * transport pointer in \a tp_info, duplicates the \a pkt_info, 
     438 * perform deep clone of the \a msg_info parts of the rdata, and 
     439 * fills the \a endpt_info (i.e. the \a mod_data) with zeros. 
     440 * 
     441 * @param src       The source to be cloned. 
     442 * @param flags     Optional flags. Must be zero for now. 
     443 * @param p_rdata   Pointer to receive the cloned rdata. 
     444 * 
     445 * @return          PJ_SUCCESS on success or the appropriate error. 
     446 */ 
     447PJ_DECL(pj_status_t) pjsip_rx_data_clone(const pjsip_rx_data *src, 
     448                                         unsigned flags, 
     449                                         pjsip_rx_data **p_rdata); 
     450 
     451/** 
     452 * Free cloned pjsip_rx_data. This function must be and must only 
     453 * be called for a cloned pjsip_rx_data. Specifically, it must NOT 
     454 * be called for the original pjsip_rx_data that is returned by 
     455 * transports. 
     456 * 
     457 * This function will free the memory used by the pjsip_rx_data and 
     458 * decrement the transport reference counter. 
     459 * 
     460 * @param rdata     The receive data buffer. 
     461 * 
     462 * @return          PJ_SUCCESS on success or the appropriate error. 
     463 */ 
     464PJ_DECL(pj_status_t) pjsip_rx_data_free_cloned(pjsip_rx_data *rdata); 
    429465 
    430466 
Note: See TracChangeset for help on using the changeset viewer.