fa37c8c4beb7b7024b15428e86bf4cd768bd53df
[asterisk/asterisk.git] / res / res_pjsip / include / res_pjsip_private.h
1 /*
2  * res_pjsip.h
3  *
4  *  Created on: Jan 25, 2013
5  *      Author: mjordan
6  */
7
8 #ifndef RES_PJSIP_PRIVATE_H_
9 #define RES_PJSIP_PRIVATE_H_
10
11 #include "asterisk/module.h"
12 #include "asterisk/compat.h"
13
14 struct ao2_container;
15 struct ast_threadpool_options;
16
17 /*!
18  * \brief Initialize the configuration for res_pjsip
19  */
20 int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_module_info);
21
22 /*!
23  * \brief Annihilate the configuration objects
24  */
25 void ast_res_pjsip_destroy_configuration(void);
26
27 /*!
28  * \brief Reload the configuration
29  */
30 int ast_res_pjsip_reload_configuration(void);
31
32 /*!
33  * \brief Initialize OPTIONS request handling.
34  *
35  * XXX This currently includes qualifying peers. It shouldn't.
36  * That should go into a registrar. When that occurs, we won't
37  * need the reload stuff.
38  *
39  * \param reload Reload options handling
40  *
41  * \retval 0 on success
42  * \retval other on failure
43  */
44 int ast_res_pjsip_init_options_handling(int reload);
45
46 /*!
47  * \brief Initialize transport storage for contacts.
48  *
49  * \retval 0 on success
50  * \retval other on failure
51  */
52 int ast_res_pjsip_init_contact_transports(void);
53
54 /*!
55  * \brief Initialize outbound authentication support
56  *
57  * \retval 0 Success
58  * \retval non-zero Failure
59  */
60 int ast_sip_initialize_outbound_authentication(void);
61
62 /*!
63  * \brief Initialize system configuration
64  *
65  * \retval 0 Success
66  * \retval non-zero Failure
67  */
68 int ast_sip_initialize_system(void);
69
70 /*!
71  * \brief Destroy system configuration
72  */
73 void ast_sip_destroy_system(void);
74
75 /*!
76  * \brief Initialize nameserver configuration
77  */
78 void ast_sip_initialize_dns(void);
79
80 /*!
81  * \brief Initialize global configuration
82  *
83  * \retval 0 Success
84  * \retval non-zero Failure
85  */
86 int ast_sip_initialize_global(void);
87
88 /*!
89  * \brief Clean up res_pjsip options handling
90  */
91 void ast_res_pjsip_cleanup_options_handling(void);
92
93 /*!
94  * \brief Get threadpool options
95  */
96 void sip_get_threadpool_options(struct ast_threadpool_options *threadpool_options);
97
98 /*!
99  * \brief Retrieve the name of the default outbound endpoint.
100  *
101  * \note This returns a memory allocated copy of the name that
102  *       needs to be freed by the caller.
103  *
104  * \retval The name of the default outbound endpoint.
105  * \retval NULL if configuration not found.
106  */
107 char *ast_sip_global_default_outbound_endpoint(void);
108
109 /*!
110  * \brief Functions for initializing and destroying the CLI.
111  */
112 int ast_sip_initialize_cli(void);
113 void ast_sip_destroy_cli(void);
114
115 #endif /* RES_PJSIP_PRIVATE_H_ */