diff options
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip_simple.h | 1 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 37 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua_internal.h | 3 |
3 files changed, 39 insertions, 2 deletions
diff --git a/pjsip/include/pjsip_simple.h b/pjsip/include/pjsip_simple.h index ba368341..8fda8152 100644 --- a/pjsip/include/pjsip_simple.h +++ b/pjsip/include/pjsip_simple.h @@ -35,6 +35,7 @@ #define __PJSIP_SIMPLE_H__ #include <pjsip-simple/evsub.h> +#include <pjsip-simple/evsub_msg.h> #include <pjsip-simple/iscomposing.h> #include <pjsip-simple/presence.h> #include <pjsip-simple/pidf.h> diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index c0eb8b25..93167785 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -1397,6 +1397,32 @@ PJ_DECL(pj_status_t) pjsua_verify_sip_url(const char *url); /** + * Schedule a timer entry. Note that the timer callback may be executed + * by different thread, depending on whether worker thread is enabled or + * not. + * + * @param entry Timer heap entry. + * @param delay The interval to expire. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + * + * @see pjsip_endpt_schedule_timer() + */ +PJ_DECL(pj_status_t) pjsua_schedule_timer(pj_timer_entry *entry, + const pj_time_val *delay); + + +/** + * Cancel the previously scheduled timer. + * + * @param entry Timer heap entry. + * + * @see pjsip_endpt_cancel_timer() + */ +PJ_DECL(void) pjsua_cancel_timer(pj_timer_entry *entry); + + +/** * This is a utility function to display error message for the specified * error code. The error message will be sent to the log. * @@ -3128,7 +3154,16 @@ typedef struct pjsua_buddy_info const char *sub_state_name; /** - * Specifies the last presence subscription terminatino reason. If + * Specifies the last presence subscription termination code. This would + * return the last status of the SUBSCRIBE request. If the subscription + * is terminated with NOTIFY by the server, this value will be set to + * 200, and subscription termination reason will be given in the + * \a sub_term_reason field. + */ + unsigned sub_term_code; + + /** + * Specifies the last presence subscription termination reason. If * presence subscription is currently active, the value will be empty. */ pj_str_t sub_term_reason; diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index e4691868..0f777967 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -185,9 +185,10 @@ typedef struct pjsua_buddy pj_bool_t monitor; /**< Should we monitor? */ pjsip_dialog *dlg; /**< The underlying dialog. */ pjsip_evsub *sub; /**< Buddy presence subscription */ + unsigned term_code; /**< Subscription termination code */ pj_str_t term_reason;/**< Subscription termination reason */ pjsip_pres_status status; /**< Buddy presence status. */ - + pj_timer_entry timer; /**< Resubscription timer */ } pjsua_buddy; |