summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsip-ua
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-01-18 23:34:15 +0000
committerBenny Prijono <bennylp@teluu.com>2006-01-18 23:34:15 +0000
commit3a125b4c3b0d5aedb30d5ca8088f6f5b4b33caf5 (patch)
treedd519ac8366416811627ad3ddb9d0ab4e9004594 /pjsip/include/pjsip-ua
parentd192c694c8bf65798b042853a23932d08dc806a1 (diff)
Complete tsx layer selftest, implemented authentication framework
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@123 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip-ua')
-rw-r--r--pjsip/include/pjsip-ua/sip_ua.h58
1 files changed, 20 insertions, 38 deletions
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 <pjsip_mod_ua/sip_dialog.h>
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__ */