diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-08-15 20:26:34 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-08-15 20:26:34 +0000 |
commit | 540278de72f88da8853d86dc3b655fe9bb3013b5 (patch) | |
tree | da69840039428b7daa2f1806d9d72eae13d51157 /pjsip/include/pjsip-simple/presence.h | |
parent | ab77e4d8b4ddc20d6018d67c739e3317e4746c49 (diff) |
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.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@685 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip-simple/presence.h')
-rw-r--r-- | pjsip/include/pjsip-simple/presence.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/pjsip/include/pjsip-simple/presence.h b/pjsip/include/pjsip-simple/presence.h index ee2805f4..668b723c 100644 --- a/pjsip/include/pjsip-simple/presence.h +++ b/pjsip/include/pjsip-simple/presence.h @@ -103,6 +103,8 @@ typedef struct pjsip_pres_status pjsip_pres_status; * @param dlg The underlying dialog to use. * @param user_cb Pointer to callbacks to receive presence subscription * events. + * @param options Option flags. Currently only PJSIP_EVSUB_NO_EVENT_ID + * is recognized. * @param p_evsub Pointer to receive the presence subscription * session. * @@ -110,6 +112,7 @@ typedef struct pjsip_pres_status pjsip_pres_status; */ PJ_DECL(pj_status_t) pjsip_pres_create_uac( pjsip_dialog *dlg, const pjsip_evsub_user *user_cb, + unsigned options, pjsip_evsub **p_evsub ); @@ -265,6 +268,77 @@ PJ_DECL(pj_status_t) pjsip_pres_set_status( pjsip_evsub *sub, /** + * This is a utility function to create PIDF message body from PJSIP + * presence status (pjsip_pres_status). + * + * @param pool The pool to allocate memory for the message body. + * @param status Presence status to be converted into PIDF message + * body. + * @param entity The entity ID, which normally is equal to the + * presentity ID publishing this presence info. + * @param p_body Pointer to receive the SIP message body. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_pres_create_pidf( pj_pool_t *pool, + const pjsip_pres_status *status, + const pj_str_t *entity, + pjsip_msg_body **p_body ); + + +/** + * This is a utility function to create X-PIDF message body from PJSIP + * presence status (pjsip_pres_status). + * + * @param pool The pool to allocate memory for the message body. + * @param status Presence status to be converted into X-PIDF message + * body. + * @param entity The entity ID, which normally is equal to the + * presentity ID publishing this presence info. + * @param p_body Pointer to receive the SIP message body. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_pres_create_xpidf(pj_pool_t *pool, + const pjsip_pres_status *status, + const pj_str_t *entity, + pjsip_msg_body **p_body ); + + + +/** + * This is a utility function to parse PIDF body into PJSIP presence status. + * + * @param rdata The incoming SIP message containing the PIDF body. + * @param pool Pool to allocate memory to copy the strings into + * the presence status structure. + * @param status The presence status to be initialized. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_pres_parse_pidf(pjsip_rx_data *rdata, + pj_pool_t *pool, + pjsip_pres_status *status); + + + +/** + * This is a utility function to parse X-PIDF body into PJSIP presence status. + * + * @param rdata The incoming SIP message containing the X-PIDF body. + * @param pool Pool to allocate memory to copy the strings into + * the presence status structure. + * @param status The presence status to be initialized. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_pres_parse_xpidf(pjsip_rx_data *rdata, + pj_pool_t *pool, + pjsip_pres_status *status); + + + +/** * @} */ |