Ignore:
Timestamp:
Aug 15, 2006 8:26:34 PM (18 years ago)
Author:
bennylp
Message:

Support for PUBLISH (RFC 3903):

  • API BREAK: pjsua_pres_create_uac() API CHANGED!! Added options in the function, to allow creating SUBSCRIBE without ";id=" parameter in the Event header.
  • the generic event publication in pjsip-simple/publish.[hc]
  • split PIDF and X-PIDF body generation and parsing into pjsip-simple/presence_body.c.
  • allow NULL in module parameter in pjsip_endpt_add_capability()
  • added "--publish" option in PJSUA.
  • by default, PJSUA-LIB will not add ";id=" parameter in Event header in the SUBSCRIBE request since lots of server and user agents don't support this correctly.
  • Set version to 0.5.7.6.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip-simple/presence.h

    r515 r685  
    104104 * @param user_cb       Pointer to callbacks to receive presence subscription 
    105105 *                      events. 
     106 * @param options       Option flags. Currently only PJSIP_EVSUB_NO_EVENT_ID 
     107 *                      is recognized. 
    106108 * @param p_evsub       Pointer to receive the presence subscription 
    107109 *                      session. 
     
    111113PJ_DECL(pj_status_t) pjsip_pres_create_uac( pjsip_dialog *dlg, 
    112114                                            const pjsip_evsub_user *user_cb, 
     115                                            unsigned options, 
    113116                                            pjsip_evsub **p_evsub ); 
    114117 
     
    266269 
    267270/** 
     271 * This is a utility function to create PIDF message body from PJSIP 
     272 * presence status (pjsip_pres_status). 
     273 * 
     274 * @param pool          The pool to allocate memory for the message body. 
     275 * @param status        Presence status to be converted into PIDF message 
     276 *                      body. 
     277 * @param entity        The entity ID, which normally is equal to the  
     278 *                      presentity ID publishing this presence info. 
     279 * @param p_body        Pointer to receive the SIP message body. 
     280 * 
     281 * @return              PJ_SUCCESS on success. 
     282 */ 
     283PJ_DECL(pj_status_t) pjsip_pres_create_pidf( pj_pool_t *pool, 
     284                                             const pjsip_pres_status *status, 
     285                                             const pj_str_t *entity, 
     286                                             pjsip_msg_body **p_body ); 
     287 
     288 
     289/** 
     290 * This is a utility function to create X-PIDF message body from PJSIP 
     291 * presence status (pjsip_pres_status). 
     292 * 
     293 * @param pool          The pool to allocate memory for the message body. 
     294 * @param status        Presence status to be converted into X-PIDF message 
     295 *                      body. 
     296 * @param entity        The entity ID, which normally is equal to the  
     297 *                      presentity ID publishing this presence info. 
     298 * @param p_body        Pointer to receive the SIP message body. 
     299 * 
     300 * @return              PJ_SUCCESS on success. 
     301 */ 
     302PJ_DECL(pj_status_t) pjsip_pres_create_xpidf(pj_pool_t *pool, 
     303                                             const pjsip_pres_status *status, 
     304                                             const pj_str_t *entity, 
     305                                             pjsip_msg_body **p_body ); 
     306 
     307 
     308 
     309/** 
     310 * This is a utility function to parse PIDF body into PJSIP presence status. 
     311 * 
     312 * @param rdata         The incoming SIP message containing the PIDF body. 
     313 * @param pool          Pool to allocate memory to copy the strings into 
     314 *                      the presence status structure. 
     315 * @param status        The presence status to be initialized. 
     316 * 
     317 * @return              PJ_SUCCESS on success. 
     318 */ 
     319PJ_DECL(pj_status_t) pjsip_pres_parse_pidf(pjsip_rx_data *rdata, 
     320                                           pj_pool_t *pool, 
     321                                           pjsip_pres_status *status); 
     322 
     323 
     324 
     325/** 
     326 * This is a utility function to parse X-PIDF body into PJSIP presence status. 
     327 * 
     328 * @param rdata         The incoming SIP message containing the X-PIDF body. 
     329 * @param pool          Pool to allocate memory to copy the strings into 
     330 *                      the presence status structure. 
     331 * @param status        The presence status to be initialized. 
     332 * 
     333 * @return              PJ_SUCCESS on success. 
     334 */ 
     335PJ_DECL(pj_status_t) pjsip_pres_parse_xpidf(pjsip_rx_data *rdata, 
     336                                           pj_pool_t *pool, 
     337                                           pjsip_pres_status *status); 
     338 
     339 
     340 
     341/** 
    268342 * @} 
    269343 */ 
Note: See TracChangeset for help on using the changeset viewer.