From f44d17658e64639499d53b2c524718546bb2bd5e Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 15 Jun 2009 16:03:40 +0000 Subject: Ticket #873: Include the parsed XML tuple in the pjsip_pres_status, and include it in the pjsua_buddy_info in PJSUA-LIB, in case the PIDF document contains other info that is needed by application (thanks Johan Lantz for the suggestion) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2762 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsip-simple/presence.h | 8 ++++++++ pjsip/include/pjsip/sip_config.h | 11 +++++++++++ pjsip/include/pjsua-lib/pjsua.h | 5 +++++ 3 files changed, 24 insertions(+) (limited to 'pjsip/include') diff --git a/pjsip/include/pjsip-simple/presence.h b/pjsip/include/pjsip-simple/presence.h index efebeb2c..7c996123 100644 --- a/pjsip/include/pjsip-simple/presence.h +++ b/pjsip/include/pjsip-simple/presence.h @@ -90,6 +90,14 @@ struct pjsip_pres_status pj_str_t id; /**< Tuple id. */ pj_str_t contact; /**< Optional contact address. */ + pj_xml_node *tuple_node; /**< Pointer to tuple XML node of + parsed PIDF body received from + remote agent. Only valid for + client subscription. If the + last received NOTIFY request + does not contain any PIDF body, + this valud will be set to NULL */ + } info[PJSIP_PRES_STATUS_MAX_INFO]; /**< Array of info. */ pj_bool_t _is_valid; /**< Internal flag. */ diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h index fe4fbe24..293c3c14 100644 --- a/pjsip/include/pjsip/sip_config.h +++ b/pjsip/include/pjsip/sip_config.h @@ -872,6 +872,17 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void) #endif +/** + * Add "timestamp" information in generated PIDF document for both server + * subscription and presence publication. + * + * Default: 1 (yes) + */ +#ifndef PJSIP_PRES_PIDF_ADD_TIMESTAMP +# define PJSIP_PRES_PIDF_ADD_TIMESTAMP 1 +#endif + + PJ_END_DECL /** diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 44980caa..8744e9a8 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -2906,6 +2906,11 @@ typedef struct pjsua_buddy_info */ pjrpid_element rpid; + /** + * Extended presence info. + */ + pjsip_pres_status pres_status; + /** * Internal buffer. */ -- cgit v1.2.3