diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-02-11 07:39:14 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-02-11 07:39:14 +0000 |
commit | 4477551db5dbf220762db3e1dc8afa2a4d75e46f (patch) | |
tree | fa80697f341d7c4f7a2e8c6c857eb80a73edf99c /pjsip/include | |
parent | 6f8cdb0b445e9f94dc3a0bb35586b0b69c756b99 (diff) |
Re #1161: Support for adding custom presence subscription headers.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3412 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip-simple/evsub.h | 13 | ||||
-rw-r--r-- | pjsip/include/pjsip-simple/presence.h | 12 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 6 |
3 files changed, 31 insertions, 0 deletions
diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h index 1c350c99..d6e1decb 100644 --- a/pjsip/include/pjsip-simple/evsub.h +++ b/pjsip/include/pjsip-simple/evsub.h @@ -380,6 +380,19 @@ PJ_DECL(pj_status_t) pjsip_evsub_initiate( pjsip_evsub *sub, /** + * Add a list of headers to the subscription instance. The list of headers + * will be added to outgoing presence subscription requests. + * + * @param sub Subscription instance. + * @param hdr_list List of headers to be added. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_evsub_add_header( pjsip_evsub *sub, + const pjsip_hdr *hdr_list ); + + +/** * Accept the incoming subscription request by sending 2xx response to * incoming SUBSCRIBE request. * diff --git a/pjsip/include/pjsip-simple/presence.h b/pjsip/include/pjsip-simple/presence.h index eaf8ba86..d80736d5 100644 --- a/pjsip/include/pjsip-simple/presence.h +++ b/pjsip/include/pjsip-simple/presence.h @@ -181,6 +181,18 @@ PJ_DECL(pj_status_t) pjsip_pres_initiate( pjsip_evsub *sub, pjsip_tx_data **p_tdata); +/** + * Add a list of headers to the subscription instance. The list of headers + * will be added to outgoing presence subscription requests. + * + * @param sub Subscription instance. + * @param hdr_list List of headers to be added. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_pres_add_header( pjsip_evsub *sub, + const pjsip_hdr *hdr_list ); + /** * Accept the incoming subscription request by sending 2xx response to diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 0a6cbdd8..d8243067 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -2138,6 +2138,12 @@ typedef struct pjsua_acc_config */ pjsip_hdr reg_hdr_list; + /** + * The optional custom SIP headers to be put in the presence + * subscription request. + */ + pjsip_hdr sub_hdr_list; + /** * Subscribe to message waiting indication events (RFC 3842). * |