From 3a125b4c3b0d5aedb30d5ca8088f6f5b4b33caf5 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 18 Jan 2006 23:34:15 +0000 Subject: Complete tsx layer selftest, implemented authentication framework git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@123 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsip-ua/sip_ua.h | 58 ++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 38 deletions(-) (limited to 'pjsip/include/pjsip-ua') diff --git a/pjsip/include/pjsip-ua/sip_ua.h b/pjsip/include/pjsip-ua/sip_ua.h index 92bf0db1..a1d7c423 100644 --- a/pjsip/include/pjsip-ua/sip_ua.h +++ b/pjsip/include/pjsip-ua/sip_ua.h @@ -20,11 +20,10 @@ #define __PJSIP_SIP_UA_H__ /** - * @file ua.h - * @brief SIP User Agent Library + * @file sip_ua.h + * @brief SIP User Agent Module */ -#include PJ_BEGIN_DECL @@ -40,58 +39,41 @@ PJ_BEGIN_DECL * User Agent manages the interactions between application and SIP dialogs. */ -typedef struct pjsip_dlg_callback pjsip_dlg_callback; +/** User agent type. */ +typedef pjsip_module pjsip_user_agent; -/** - * \brief This structure describes a User Agent instance. - */ -struct pjsip_user_agent -{ - pjsip_endpoint *endpt; - pj_pool_t *pool; - pj_mutex_t *mutex; - pj_uint32_t mod_id; - pj_hash_table_t *dlg_table; - pjsip_dlg_callback *dlg_cb; - pj_list dlg_list; -}; /** - * Create a new dialog. + * Initialize user agent layer and register it to the specified endpoint. + * + * @param endpt The endpoint where the user agent will be + * registered. + * + * @return PJ_SUCCESS on success. */ -PJ_DECL(pjsip_dlg*) pjsip_ua_create_dialog( pjsip_user_agent *ua, - pjsip_role_e role ); - +PJ_DECL(pj_status_t) pjsip_ua_init(pjsip_endpoint *endpt); /** - * Destroy dialog. - */ -PJ_DECL(void) pjsip_ua_destroy_dialog( pjsip_dlg *dlg ); - - -/** - * Register callback to receive dialog notifications. + * Get the instance of the user agent. + * + * @return The user agent module instance. */ -PJ_DECL(void) pjsip_ua_set_dialog_callback( pjsip_user_agent *ua, - pjsip_dlg_callback *cb ); - +PJ_DECL(pjsip_user_agent*) pjsip_ua_instance(void); /** - * Get the module interface for the UA module. + * Destroy the user agent layer. + * + * @return PJ_SUCCESS on success. */ -PJ_DECL(pjsip_module*) pjsip_ua_get_module(void); +PJ_DECL(pj_status_t) pjsip_ua_destroy(void); -/** - * Dump user agent state to log file. - */ -PJ_DECL(void) pjsip_ua_dump( pjsip_user_agent *ua ); - /** * @} */ PJ_END_DECL + #endif /* __PJSIP_UA_H__ */ -- cgit v1.2.3