From 85a2dd3b4a8aff9faf95415c8e8384ee2999cd04 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 17 Jul 2008 14:19:10 +0000 Subject: Ticket #192: Add callback to notify application about incoming SUBSCRIBE request, and add subscription state and termination reason in buddy info git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2150 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsua-lib/pjsua_internal.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'pjsip/include/pjsua-lib/pjsua_internal.h') diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index 3660540f..7245469c 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -85,12 +85,15 @@ typedef struct pjsua_call /** * Server presence subscription list head. */ -typedef struct pjsua_srv_pres +struct pjsua_srv_pres { PJ_DECL_LIST_MEMBER(struct pjsua_srv_pres); - pjsip_evsub *sub; - char *remote; -} pjsua_srv_pres; + pjsip_evsub *sub; /**< The evsub. */ + char *remote; /**< Remote URI. */ + int acc_id; /**< Account ID. */ + pjsip_dialog *dlg; /**< Dialog. */ + int expires; /**< "expires" value in the request. */ +}; /** @@ -151,6 +154,9 @@ typedef struct pjsua_transport_data } pjsua_transport_data; +/** Maximum length of subscription termination reason. */ +#define PJSUA_BUDDY_SUB_TERM_REASON_LEN 32 + /** * Buddy data. */ @@ -167,6 +173,7 @@ typedef struct pjsua_buddy pj_bool_t monitor; /**< Should we monitor? */ pjsip_dialog *dlg; /**< The underlying dialog. */ pjsip_evsub *sub; /**< Buddy presence subscription */ + pj_str_t term_reason;/**< Subscription termination reason */ pjsip_pres_status status; /**< Buddy presence status. */ } pjsua_buddy; -- cgit v1.2.3