From 4b65d7d166b1318f34e35b0db62b7533a36c6c80 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 19 Oct 2011 12:45:05 +0000 Subject: Fixed #1216: New pjsua_destroy2() API to allow shutting down the library without sending any outgoing messages git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3829 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsua-lib/pjsua.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (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 40c4e27d..433f23a6 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -1293,6 +1293,18 @@ typedef struct pjsua_config } pjsua_config; +/** + * Flags to be given to pjsua_destroy2() + */ +typedef enum pjsua_destroy_flag +{ + /** + * Do not invoke any networking functions. + */ + PJSUA_DESTROY_NO_NETWORK = 1 + +} pjsua_destroy_flag; + /** * Use this function to initialize pjsua config. * @@ -1429,11 +1441,23 @@ PJ_DECL(pj_status_t) pjsua_start(void); * Application.may safely call this function more than once if it doesn't * keep track of it's state. * + * @see pjsua_destroy2() + * * @return PJ_SUCCESS on success, or the appropriate error code. */ PJ_DECL(pj_status_t) pjsua_destroy(void); +/** + * Variant of destroy with additional flags. + * + * @param flags Combination of pjsua_destroy_flag enumeration. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + */ +PJ_DECL(pj_status_t) pjsua_destroy2(unsigned flags); + + /** * Poll pjsua for events, and if necessary block the caller thread for * the specified maximum interval (in miliseconds). -- cgit v1.2.3