From 956dfe0b552043fbd5ce2181219feeb59b7f459f Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 28 Sep 2010 04:57:01 +0000 Subject: Close #1138: - Added new pjsua registration status callback on_reg_state2(), it includes the whole info from the lower layer registration callback pjsip_regc_cb(). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3322 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsua-lib/pjsua.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'pjsip/include/pjsua-lib/pjsua.h') diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 44f73451..3aa03b93 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -410,6 +410,16 @@ typedef struct pjsua_mwi_info } pjsua_mwi_info; +/** + * Structure to be passed on registration callback. + */ +typedef struct pjsua_reg_info +{ + struct pjsip_regc_cbparam *cbparam; /**< Parameters returned by + registration callback. */ +} pjsua_reg_info; + + /** * This structure describes application callback to receive various event * notification from PJSUA-API. All of these callbacks are OPTIONAL, @@ -582,10 +592,20 @@ typedef struct pjsua_callback * Application may then query the account info to get the * registration details. * - * @param acc_id Account ID. + * @param acc_id The account ID. */ void (*on_reg_state)(pjsua_acc_id acc_id); + /** + * Notify application when registration status has changed. + * Application may inspect the registration info to get the + * registration status details. + * + * @param acc_id The account ID. + * @param info The registration info. + */ + void (*on_reg_state2)(pjsua_acc_id acc_id, pjsua_reg_info *info); + /** * Notification when incoming SUBSCRIBE request is received. Application * may use this callback to authorize the incoming subscribe request -- cgit v1.2.3