Asterisk - The Open Source Telephony Project GIT-master-abe0018
res_geolocation.c
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2022, Sangoma Technologies Corporation
5 *
6 * George Joseph <gjoseph@sangoma.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*** MODULEINFO
20 <depend>libxml2</depend>
21 <depend>libxslt</depend>
22 <support_level>core</support_level>
23 ***/
24
25
26#include "asterisk.h"
27#define AST_API_MODULE
30
31static int reload_module(void)
32{
33 int res = 0;
34
36 if (res) {
38 }
39 res = geoloc_gml_reload();
40 if (res) {
42 }
44 if (res) {
46 }
48 if (res) {
50 }
52 if (res) {
54 }
56 if (res) {
58 }
59
61}
62
63static int unload_module(void)
64{
65 int res = 0;
66
67 res += geoloc_channel_unload();
70 res += geoloc_config_unload();
71 res += geoloc_gml_unload();
73
74 return (res != 0);
75}
76
77static int load_module(void)
78{
79 int res = 0;
80
82 if (res) {
85 }
86
87 res = geoloc_gml_load();
88 if (res) {
90 }
91
92 res = geoloc_config_load();
93 if (res) {
96 }
97
99 if (res) {
102 }
103
104 res = geoloc_dialplan_load();
105 if (res) {
108 }
109
110 res = geoloc_channel_load();
111 if (res) {
114 }
115
117}
118
120 .support_level = AST_MODULE_SUPPORT_CORE,
121 .load = load_module,
122 .unload = unload_module,
124 .load_pri = AST_MODPRI_CHANNEL_DEPEND - 10,
Asterisk main include file. File version handling, generic pbx functions.
int geoloc_civicaddr_reload(void)
int geoloc_civicaddr_load(void)
int geoloc_civicaddr_unload(void)
int geoloc_config_reload(void)
int geoloc_config_unload(void)
int geoloc_config_load(void)
int geoloc_channel_reload(void)
int geoloc_channel_load(void)
int geoloc_channel_unload(void)
int geoloc_dialplan_reload(void)
int geoloc_dialplan_unload(void)
int geoloc_dialplan_load(void)
int geoloc_eprofile_reload(void)
int geoloc_eprofile_unload(void)
int geoloc_eprofile_load(void)
int geoloc_gml_reload(void)
Definition: geoloc_gml.c:364
int geoloc_gml_unload(void)
Definition: geoloc_gml.c:350
int geoloc_gml_load(void)
Definition: geoloc_gml.c:357
@ AST_MODFLAG_LOAD_ORDER
Definition: module.h:331
@ AST_MODFLAG_GLOBAL_SYMBOLS
Definition: module.h:330
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
Definition: module.h:557
@ AST_MODPRI_CHANNEL_DEPEND
Definition: module.h:340
@ AST_MODULE_SUPPORT_CORE
Definition: module.h:121
#define ASTERISK_GPL_KEY
The text the key() function should return.
Definition: module.h:46
@ AST_MODULE_LOAD_SUCCESS
Definition: module.h:70
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Definition: module.h:78
static int reload(void)
static int reload_module(void)
static int load_module(void)
static int unload_module(void)