| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
#include "asterisk/channel.h"#include "asterisk/config.h"#include "asterisk/sorcery.h"#include "asterisk/xml.h"#include "asterisk/optional_api.h"

Go to the source code of this file.
| Data Structures | |
| struct | ast_geoloc_eprofile | 
| struct | ast_geoloc_location | 
| struct | ast_geoloc_profile | 
| Macros | |
| #define | AST_GEOLOC_INVALID_VALUE -1 | 
| #define | CONFIG_STR_TO_ENUM_DECL(_stem) int ast_geoloc_ ## _stem ## _str_to_enum(const char *str); | 
| #define | GEOLOC_ENUM_TO_NAME_DECL(_stem) const char * ast_geoloc_ ## _stem ## _to_name(int ix); | 
| Functions | |
| int | ast_geoloc_civicaddr_is_code_valid (const char *code) | 
| Given a civicAddress code, check whether it's valid. | |
| enum ast_geoloc_validate_result | ast_geoloc_civicaddr_validate_varlist (const struct ast_variable *varlist, const char **result) | 
| Validate that the names of the variables in the list are valid codes or synonyms. | |
| struct ast_geoloc_location *AST_OPTIONAL_API_NAME() | ast_geoloc_get_location (const char *id) | 
| Retrieve a geolocation location object by id. | |
| struct ast_geoloc_profile *AST_OPTIONAL_API_NAME() | ast_geoloc_get_profile (const char *id) | 
| Retrieve a geolocation profile by id. | |
| enum ast_geoloc_validate_result | ast_geoloc_gml_validate_varlist (const struct ast_variable *varlist, const char **result) | 
| Validate that the variables in the list represent a valid GML shape. | |
| int AST_OPTIONAL_API_NAME() | ast_geoloc_is_loaded (void) | 
| Check if res_geolocation is available. | |
| const char * | ast_geoloc_validate_result_to_str (enum ast_geoloc_validate_result result) | 
| CONFIG_STR_TO_ENUM_DECL (format) | |
| CONFIG_STR_TO_ENUM_DECL (precedence) | |
| GEOLOC_ENUM_TO_NAME_DECL (format) | |
| GEOLOC_ENUM_TO_NAME_DECL (precedence) | |
| int | ast_geoloc_datastore_add_eprofile (struct ast_datastore *ds, struct ast_geoloc_eprofile *eprofile) | 
| Add an eprofile to a datastore. | |
| struct ast_datastore * | ast_geoloc_datastore_create (const char *id) | 
| Create an empty geoloc datastore. | |
| struct ast_datastore * | ast_geoloc_datastore_create_from_eprofile (struct ast_geoloc_eprofile *eprofile) | 
| Create a geoloc datastore from an effective profile. | |
| struct ast_datastore * | ast_geoloc_datastore_create_from_profile_name (const char *profile_name) | 
| Geolocation datastore Functions. | |
| int | ast_geoloc_datastore_delete_eprofile (struct ast_datastore *ds, int ix) | 
| Delete a specific eprofile from a datastore by index. | |
| struct ast_datastore * | ast_geoloc_datastore_find (struct ast_channel *chan) | 
| Retrieves the geoloc datastore from a channel, if any. | |
| struct ast_geoloc_eprofile * | ast_geoloc_datastore_get_eprofile (struct ast_datastore *ds, int ix) | 
| Retrieve a specific eprofile from a datastore by index. | |
| const char * | ast_geoloc_datastore_get_id (struct ast_datastore *ds) | 
| Retrieve a geoloc datastore's id. | |
| int | ast_geoloc_datastore_insert_eprofile (struct ast_datastore *ds, struct ast_geoloc_eprofile *eprofile, int index) | 
| Insert an eprofile to a datastore at the specified position. | |
| int | ast_geoloc_datastore_set_inheritance (struct ast_datastore *ds, int inherit) | 
| Sets the inheritance flag on the datastore. | |
| int | ast_geoloc_datastore_size (struct ast_datastore *ds) | 
| Retrieves the number of eprofiles in the datastore. | |
| struct ast_geoloc_eprofile * | ast_geoloc_eprofile_alloc (const char *name) | 
| Geolocation Effective Profile Functions. | |
| struct ast_geoloc_eprofile * | ast_geoloc_eprofile_create_from_pidf (struct ast_xml_doc *pidf_xmldoc, const char *geoloc_uri, const char *reference_string) | 
| Allocate a new effective profile from an XML PIDF-LO document. | |
| struct ast_geoloc_eprofile * | ast_geoloc_eprofile_create_from_profile (struct ast_geoloc_profile *profile) | 
| Allocate a new effective profile from an existing profile. | |
| struct ast_geoloc_eprofile * | ast_geoloc_eprofile_create_from_uri (const char *uri, const char *reference_string) | 
| Allocate a new effective profile from a URI. | |
| struct ast_geoloc_eprofile * | ast_geoloc_eprofile_dup (struct ast_geoloc_eprofile *src) | 
| Duplicate an effective profile. | |
| int | ast_geoloc_eprofile_refresh_location (struct ast_geoloc_eprofile *eprofile) | 
| Refresh the effective profile with any changed info. | |
| const char * | ast_geoloc_eprofile_to_pidf (struct ast_geoloc_eprofile *eprofile, struct ast_channel *chan, struct ast_str **buf, const char *ref_string) | 
| Convert a single eprofile to a PIDF-LO document. | |
| const char * | ast_geoloc_eprofile_to_uri (struct ast_geoloc_eprofile *eprofile, struct ast_channel *chan, struct ast_str **buf, const char *ref_string) | 
| Convert a URI eprofile to a URI string. | |
| const char * | ast_geoloc_eprofiles_to_pidf (struct ast_datastore *ds, struct ast_channel *chan, struct ast_str **buf, const char *ref_string) | 
| Convert a datastore containing eprofiles to a PIDF-LO document. | |
| #define AST_GEOLOC_INVALID_VALUE -1 | 
Definition at line 28 of file res_geolocation.h.
| #define CONFIG_STR_TO_ENUM_DECL | ( | _stem | ) | int ast_geoloc_ ## _stem ## _str_to_enum(const char *str); | 
Definition at line 53 of file res_geolocation.h.
| #define GEOLOC_ENUM_TO_NAME_DECL | ( | _stem | ) | const char * ast_geoloc_ ## _stem ## _to_name(int ix); | 
Definition at line 57 of file res_geolocation.h.
| enum ast_geoloc_format | 
| Enumerator | |
|---|---|
| AST_GEOLOC_FORMAT_NONE | |
| AST_GEOLOC_FORMAT_CIVIC_ADDRESS | |
| AST_GEOLOC_FORMAT_GML | |
| AST_GEOLOC_FORMAT_URI | |
| AST_GEOLOC_FORMAT_LAST | |
Definition at line 38 of file res_geolocation.h.
| Enumerator | |
|---|---|
| AST_PIDF_ELEMENT_NONE | |
| AST_PIDF_ELEMENT_DEVICE | |
| AST_PIDF_ELEMENT_TUPLE | |
| AST_PIDF_ELEMENT_PERSON | |
| AST_PIDF_ELEMENT_LAST | |
Definition at line 30 of file res_geolocation.h.
| Enumerator | |
|---|---|
| AST_GEOLOC_PRECED_PREFER_INCOMING | |
| AST_GEOLOC_PRECED_PREFER_CONFIG | |
| AST_GEOLOC_PRECED_DISCARD_INCOMING | |
| AST_GEOLOC_PRECED_DISCARD_CONFIG | |
Definition at line 46 of file res_geolocation.h.
Definition at line 152 of file res_geolocation.h.
| int ast_geoloc_civicaddr_is_code_valid | ( | const char * | code | ) | 
Given a civicAddress code, check whether it's valid.
| code | Pointer to the code to check | 
Definition at line 68 of file geoloc_civicaddr.c.
References addr_code_name_entries, ARRAY_LEN, compare_civicaddr_codes(), and NULL.
Referenced by ast_geoloc_civicaddr_validate_varlist().
| enum ast_geoloc_validate_result ast_geoloc_civicaddr_validate_varlist | ( | const struct ast_variable * | varlist, | 
| const char ** | result | ||
| ) | 
Validate that the names of the variables in the list are valid codes or synonyms.
| varlist | Variable list to check. | |
| [out] | result | Pointer to char * to receive failing item. | 
Definition at line 75 of file geoloc_civicaddr.c.
References ast_geoloc_civicaddr_is_code_valid(), AST_GEOLOC_VALIDATE_INVALID_VARNAME, AST_GEOLOC_VALIDATE_SUCCESS, result, and var.
Referenced by validate_location_info().
| int ast_geoloc_datastore_add_eprofile | ( | struct ast_datastore * | ds, | 
| struct ast_geoloc_eprofile * | eprofile | ||
| ) | 
Add an eprofile to a datastore.
| ds | The datastore | 
| eprofile | The eprofile to add. | 
Definition at line 135 of file geoloc_datastore.c.
References ao2_bump, ao2_ref, ast_log, AST_VECTOR_APPEND, AST_VECTOR_SIZE, ast_datastore::data, eprofiles_datastore::eprofiles, ast_geoloc_eprofile::id, eprofiles_datastore::id, IS_GEOLOC_DS, LOG_ERROR, and NULL.
Referenced by add_eprofile_to_channel(), ast_geoloc_datastore_create_from_eprofile(), ast_geoloc_datastore_create_from_profile_name(), and geoloc_profile_write().
| struct ast_datastore * ast_geoloc_datastore_create | ( | const char * | id | ) | 
Create an empty geoloc datastore.
| id | An id to use for the datastore. | 
Definition at line 99 of file geoloc_datastore.c.
References ast_calloc, ast_datastore_alloc, ast_datastore_free(), ast_log, ast_strlen_zero(), AST_VECTOR_INIT, ast_datastore::data, eprofiles_datastore::eprofiles, geoloc_datastore_info, LOG_ERROR, and NULL.
Referenced by add_eprofile_to_channel(), ast_geoloc_datastore_create_from_eprofile(), ast_geoloc_datastore_create_from_profile_name(), and geoloc_profile_write().
| struct ast_datastore * ast_geoloc_datastore_create_from_eprofile | ( | struct ast_geoloc_eprofile * | eprofile | ) | 
Create a geoloc datastore from an effective profile.
| eprofile | The effective profile to use. | 
Definition at line 242 of file geoloc_datastore.c.
References ast_datastore_free(), ast_geoloc_datastore_add_eprofile(), ast_geoloc_datastore_create(), ast_geoloc_eprofile::id, and NULL.
| struct ast_datastore * ast_geoloc_datastore_create_from_profile_name | ( | const char * | profile_name | ) | 
Geolocation datastore Functions.
Create a geoloc datastore from a profile name
| profile_name | The name of the profile to use. | 
Definition at line 266 of file geoloc_datastore.c.
References ao2_ref, ast_datastore_free(), ast_geoloc_datastore_add_eprofile(), ast_geoloc_datastore_create(), ast_geoloc_eprofile_create_from_profile(), ast_log, ast_sorcery_retrieve_by_id(), ast_strlen_zero(), geoloc_sorcery, LOG_ERROR, and NULL.
| int ast_geoloc_datastore_delete_eprofile | ( | struct ast_datastore * | ds, | 
| int | ix | ||
| ) | 
Delete a specific eprofile from a datastore by index.
| ds | The datastore | 
| ix | The index | 
Definition at line 224 of file geoloc_datastore.c.
References ao2_ref, AST_VECTOR_REMOVE, AST_VECTOR_SIZE, ast_datastore::data, eprofiles_datastore::eprofiles, IS_GEOLOC_DS, and NULL.
| struct ast_datastore * ast_geoloc_datastore_find | ( | struct ast_channel * | chan | ) | 
Retrieves the geoloc datastore from a channel, if any.
| chan | Channel | 
Definition at line 219 of file geoloc_datastore.c.
References ast_channel_datastore_find(), geoloc_datastore_info, and NULL.
Referenced by geoloc_profile_read(), geoloc_profile_write(), and handle_outgoing_request().
| struct ast_geoloc_eprofile * ast_geoloc_datastore_get_eprofile | ( | struct ast_datastore * | ds, | 
| int | ix | ||
| ) | 
Retrieve a specific eprofile from a datastore by index.
| ds | The datastore | 
| ix | The index | 
Definition at line 200 of file geoloc_datastore.c.
References ao2_bump, AST_VECTOR_GET, AST_VECTOR_SIZE, ast_datastore::data, eprofiles_datastore::eprofiles, IS_GEOLOC_DS, and NULL.
Referenced by ast_geoloc_eprofiles_to_pidf(), geoloc_profile_read(), geoloc_profile_write(), and handle_outgoing_request().
| const char * ast_geoloc_datastore_get_id | ( | struct ast_datastore * | ds | ) | 
Retrieve a geoloc datastore's id.
| ds | The datastore | 
Definition at line 86 of file geoloc_datastore.c.
References ast_datastore::data, eprofiles_datastore::id, IS_GEOLOC_DS, and NULL.
| int ast_geoloc_datastore_insert_eprofile | ( | struct ast_datastore * | ds, | 
| struct ast_geoloc_eprofile * | eprofile, | ||
| int | index | ||
| ) | 
Insert an eprofile to a datastore at the specified position.
| ds | The datastore | 
| eprofile | The eprofile to add. | 
| index | The position to insert at. Existing eprofiles will be moved up to make room. | 
Definition at line 156 of file geoloc_datastore.c.
References ao2_bump, ao2_ref, ast_log, AST_VECTOR_INSERT_AT, AST_VECTOR_SIZE, ast_datastore::data, eprofiles_datastore::eprofiles, ast_geoloc_eprofile::id, eprofiles_datastore::id, IS_GEOLOC_DS, LOG_ERROR, and NULL.
| int ast_geoloc_datastore_set_inheritance | ( | struct ast_datastore * | ds, | 
| int | inherit | ||
| ) | 
Sets the inheritance flag on the datastore.
| ds | The datastore | 
| inherit | 1 to allow the datastore to be inherited by other channels 0 to prevent the datastore to be inherited by other channels | 
Definition at line 191 of file geoloc_datastore.c.
References DATASTORE_INHERIT_FOREVER, ast_datastore::inheritance, and IS_GEOLOC_DS.
Referenced by add_eprofile_to_channel(), and geoloc_profile_write().
| int ast_geoloc_datastore_size | ( | struct ast_datastore * | ds | ) | 
Retrieves the number of eprofiles in the datastore.
| ds | The datastore | 
Definition at line 178 of file geoloc_datastore.c.
References AST_VECTOR_SIZE, ast_datastore::data, eprofiles_datastore::eprofiles, IS_GEOLOC_DS, and NULL.
Referenced by ast_geoloc_eprofiles_to_pidf(), and handle_outgoing_request().
| struct ast_geoloc_eprofile * ast_geoloc_eprofile_alloc | ( | const char * | name | ) | 
Geolocation Effective Profile Functions.
Allocate a new, empty effective profile.
| name | The profile's name | 
Definition at line 69 of file geoloc_eprofile.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ast_string_field_init, ast_string_field_set, geoloc_eprofile_destructor(), and name.
Referenced by ast_geoloc_eprofile_create_from_profile(), ast_geoloc_eprofile_create_from_uri(), ast_geoloc_eprofile_dup(), geoloc_eprofile_create_from_xslt_result(), and geoloc_profile_write().
| struct ast_geoloc_eprofile * ast_geoloc_eprofile_create_from_pidf | ( | struct ast_xml_doc * | pidf_xmldoc, | 
| const char * | geoloc_uri, | ||
| const char * | reference_string | ||
| ) | 
Allocate a new effective profile from an XML PIDF-LO document.
| pidf_xmldoc | The ast_xml_doc to use. | 
| geoloc_uri | The URI that referenced this document. | 
| reference_string | An identifying string to use in error messages. | 
Definition at line 756 of file geoloc_eprofile.c.
References ast_trace, ast_xml_close(), ast_xml_doc_dump_memory(), ast_xml_free_text(), geoloc_eprofile_create_from_xslt_result(), is_pidf_lo(), NULL, pidf_to_eprofile_xslt, SCOPE_ENTER, SCOPE_EXIT_RTN_VALUE, set_loc_src(), and TRACE_ATLEAST.
Referenced by handle_incoming_request().
| struct ast_geoloc_eprofile * ast_geoloc_eprofile_create_from_profile | ( | struct ast_geoloc_profile * | profile | ) | 
Allocate a new effective profile from an existing profile.
| profile | The profile to use. | 
Definition at line 220 of file geoloc_eprofile.c.
References ast_geoloc_profile::allow_routing_use, ast_geoloc_eprofile::allow_routing_use, ao2_lock, ao2_ref, ao2_unlock, ast_geoloc_eprofile_alloc(), ast_geoloc_eprofile_refresh_location(), ast_sorcery_object_get_id(), ast_string_field_set, ast_geoloc_profile::confidence, ast_geoloc_eprofile::confidence, DUP_VARS, ast_geoloc_profile::format, ast_geoloc_eprofile::format, ast_geoloc_profile::location_info, ast_geoloc_eprofile::location_info, ast_geoloc_profile::location_reference, ast_geoloc_eprofile::location_reference, ast_geoloc_profile::location_refinement, ast_geoloc_eprofile::location_refinement, ast_geoloc_profile::location_source, ast_geoloc_eprofile::location_source, ast_geoloc_profile::location_variables, ast_geoloc_eprofile::location_variables, ast_geoloc_profile::method, method, ast_geoloc_profile::notes, notes, NULL, ast_geoloc_profile::pidf_element, ast_geoloc_eprofile::pidf_element, ast_geoloc_profile::precedence, ast_geoloc_eprofile::precedence, ast_geoloc_profile::suppress_empty_ca_elements, ast_geoloc_eprofile::suppress_empty_ca_elements, ast_geoloc_profile::usage_rules, and ast_geoloc_eprofile::usage_rules.
Referenced by ast_geoloc_datastore_create_from_profile_name(), geoloc_config_show_profiles(), handle_incoming_request(), and handle_outgoing_request().
| struct ast_geoloc_eprofile * ast_geoloc_eprofile_create_from_uri | ( | const char * | uri, | 
| const char * | reference_string | ||
| ) | 
Allocate a new effective profile from a URI.
| uri | The URI to use. | 
| reference_string | An identifying string to use in error messages. | 
Definition at line 316 of file geoloc_eprofile.c.
References ast_geoloc_eprofile_alloc(), AST_GEOLOC_FORMAT_URI, ast_strdupa, ast_strip(), ast_strlen_zero(), ast_variable_new, ast_geoloc_eprofile::format, ast_geoloc_eprofile::location_info, NULL, and set_loc_src().
Referenced by handle_incoming_request().
| struct ast_geoloc_eprofile * ast_geoloc_eprofile_dup | ( | struct ast_geoloc_eprofile * | src | ) | 
Duplicate an effective profile.
| src | The eprofile to duplicate. | 
Definition at line 159 of file geoloc_eprofile.c.
References ast_geoloc_eprofile::allow_routing_use, ao2_ref, ast_geoloc_eprofile_alloc(), ast_strdupa, ast_string_field_set, ast_geoloc_eprofile::confidence, DUP_VARS, ast_geoloc_eprofile::effective_location, ast_geoloc_eprofile::format, ast_geoloc_eprofile::id, ast_geoloc_eprofile::location_info, ast_geoloc_eprofile::location_reference, ast_geoloc_eprofile::location_refinement, ast_geoloc_eprofile::location_source, ast_geoloc_eprofile::location_variables, ast_geoloc_eprofile::method, method, ast_geoloc_eprofile::notes, notes, NULL, ast_geoloc_eprofile::pidf_element, ast_geoloc_eprofile::precedence, ast_geoloc_eprofile::suppress_empty_ca_elements, and ast_geoloc_eprofile::usage_rules.
Referenced by geoloc_profile_read().
| int ast_geoloc_eprofile_refresh_location | ( | struct ast_geoloc_eprofile * | eprofile | ) | 
Refresh the effective profile with any changed info.
| eprofile | The eprofile to refresh. | 
Definition at line 80 of file geoloc_eprofile.c.
References ao2_ref, ast_log, ast_sorcery_retrieve_by_id(), ast_string_field_set, ast_strlen_zero(), ast_variable_list_append, ast_variable_list_replace(), ast_variable_new, ast_variables_destroy(), ast_geoloc_location::confidence, ast_geoloc_eprofile::confidence, DUP_VARS, ast_geoloc_eprofile::effective_location, ast_geoloc_location::format, ast_geoloc_eprofile::format, geoloc_sorcery, ast_geoloc_eprofile::id, ast_geoloc_location::location_info, ast_geoloc_eprofile::location_info, ast_geoloc_eprofile::location_reference, ast_geoloc_eprofile::location_refinement, ast_geoloc_location::location_source, ast_geoloc_eprofile::location_source, LOG_ERROR, ast_geoloc_location::method, ast_geoloc_eprofile::method, method, NULL, RAII_VAR, and var.
Referenced by ast_geoloc_eprofile_create_from_profile(), geoloc_profile_read(), geoloc_profile_write(), and handle_outgoing_request().
| const char * ast_geoloc_eprofile_to_pidf | ( | struct ast_geoloc_eprofile * | eprofile, | 
| struct ast_channel * | chan, | ||
| struct ast_str ** | buf, | ||
| const char * | ref_string | ||
| ) | 
Convert a single eprofile to a PIDF-LO document.
| eprofile | Effective profile to convert | 
| chan | Channel to use to resolve variables | 
| buf | Pointer to ast_str pointer to use for work | 
| ref_string | An identifying string to use in error messages. | 
Definition at line 1061 of file geoloc_eprofile.c.
References AST_GEOLOC_FORMAT_URI, ast_str_buffer(), ast_str_set(), ast_strlen_zero(), ast_trace, ast_xml_add_child(), ast_xml_close(), ast_xml_doc_dump_memory(), ast_xml_free_attr(), ast_xml_free_text(), ast_xml_get_attribute(), ast_xml_new(), ast_xml_new_node(), ast_xml_set_attribute(), ast_xml_set_root(), buf, eprofile_to_pidf_xslt, ast_geoloc_eprofile::format, geoloc_eprofile_to_intermediate(), ast_geoloc_eprofile::id, LOG_ERROR, NULL, ast_geoloc_eprofile::pidf_element, RAII_VAR, SCOPE_ENTER, SCOPE_EXIT_LOG_RTN_VALUE, SCOPE_EXIT_RTN_VALUE, ast_geoloc_eprofile::suppress_empty_ca_elements, and TRACE_ATLEAST.
Referenced by add_eprofile_to_tdata().
| const char * ast_geoloc_eprofile_to_uri | ( | struct ast_geoloc_eprofile * | eprofile, | 
| struct ast_channel * | chan, | ||
| struct ast_str ** | buf, | ||
| const char * | ref_string | ||
| ) | 
Convert a URI eprofile to a URI string.
| eprofile | Effective profile to convert | 
| chan | Channel to use to resolve variables | 
| buf | Pointer to ast_str pointer to use for work | 
| ref_string | An identifying string to use in error messages. | 
Definition at line 400 of file geoloc_eprofile.c.
References ast_free, AST_GEOLOC_FORMAT_URI, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_strdupa, ast_strlen_zero(), ast_variable_find_in_list(), ast_variables_destroy(), buf, ast_geoloc_eprofile::effective_location, ast_geoloc_eprofile::format, geoloc_eprofile_resolve_varlist(), ast_geoloc_eprofile::id, ast_geoloc_eprofile::location_variables, LOG_ERROR, NULL, and result.
Referenced by handle_outgoing_request().
| const char * ast_geoloc_eprofiles_to_pidf | ( | struct ast_datastore * | ds, | 
| struct ast_channel * | chan, | ||
| struct ast_str ** | buf, | ||
| const char * | ref_string | ||
| ) | 
Convert a datastore containing eprofiles to a PIDF-LO document.
| ds | Datastore containing effective profiles to convert | 
| chan | Channel to use to resolve variables | 
| buf | Pointer to ast_str pointer to use for work | 
| ref_string | An identifying string to use in error messages. | 
Definition at line 954 of file geoloc_eprofile.c.
References ast_geoloc_datastore_get_eprofile(), ast_geoloc_datastore_size(), AST_GEOLOC_FORMAT_URI, AST_PIDF_ELEMENT_LAST, ast_str_buffer(), ast_str_set(), ast_strlen_zero(), ast_trace, ast_xml_add_child(), ast_xml_add_child_list(), ast_xml_close(), ast_xml_copy_node_list(), ast_xml_doc_dump_memory(), ast_xml_find_child_element, ast_xml_free_attr(), ast_xml_free_node(), ast_xml_free_text(), ast_xml_get_attribute(), ast_xml_new(), ast_xml_new_node(), ast_xml_node_get_children(), ast_xml_set_attribute(), ast_xml_set_root(), buf, eprofile_to_pidf_xslt, ast_geoloc_eprofile::format, geoloc_eprofile_to_intermediate(), ast_geoloc_eprofile::id, LOG_ERROR, NULL, ast_geoloc_eprofile::pidf_element, RAII_VAR, SCOPE_ENTER, SCOPE_EXIT_LOG_RTN_VALUE, SCOPE_EXIT_RTN_VALUE, and TRACE_ATLEAST.
| struct ast_geoloc_location *AST_OPTIONAL_API_NAME() ast_geoloc_get_location | ( | const char * | id | ) | 
Retrieve a geolocation location object by id.
| id | Location object id. | 
Definition at line 580 of file geoloc_config.c.
References ast_sorcery_retrieve_by_id(), ast_strlen_zero(), geoloc_sorcery, and NULL.
Referenced by geoloc_profile_write().
| struct ast_geoloc_profile *AST_OPTIONAL_API_NAME() ast_geoloc_get_profile | ( | const char * | id | ) | 
Retrieve a geolocation profile by id.
| id | profile id. | 
Definition at line 589 of file geoloc_config.c.
References ast_sorcery_retrieve_by_id(), ast_strlen_zero(), geoloc_sorcery, and NULL.
Referenced by handle_incoming_request(), handle_outgoing_request(), and sip_endpoint_apply_handler().
| enum ast_geoloc_validate_result ast_geoloc_gml_validate_varlist | ( | const struct ast_variable * | varlist, | 
| const char ** | result | ||
| ) | 
Validate that the variables in the list represent a valid GML shape.
| varlist | Variable list to check. | |
| [out] | result | Pointer to char * to receive failing item. | 
Definition at line 124 of file geoloc_gml.c.
References ARRAY_LEN, AST_GEOLOC_VALIDATE_INVALID_SHAPE, AST_GEOLOC_VALIDATE_INVALID_VALUE, AST_GEOLOC_VALIDATE_INVALID_VARNAME, AST_GEOLOC_VALIDATE_MISSING_SHAPE, AST_GEOLOC_VALIDATE_NOT_ENOUGH_VARNAMES, AST_GEOLOC_VALIDATE_SUCCESS, AST_GEOLOC_VALIDATE_TOO_MANY_VARNAMES, ast_strings_equal(), ast_variable_find_in_list(), geoloc_gml_attr::attribute, gml_shape_defs, ast_variable::next, NULL, geoloc_gml_shape_def::required_attributes, result, and var.
Referenced by validate_location_info().
| int AST_OPTIONAL_API_NAME() ast_geoloc_is_loaded | ( | void | ) | 
Check if res_geolocation is available.
Definition at line 763 of file geoloc_config.c.
Referenced by sip_endpoint_apply_handler().
| const char * ast_geoloc_validate_result_to_str | ( | enum ast_geoloc_validate_result | result | ) | 
Definition at line 32 of file geoloc_common.c.
References result, and result_names.
Referenced by validate_location_info().
| CONFIG_STR_TO_ENUM_DECL | ( | format | ) | 
| CONFIG_STR_TO_ENUM_DECL | ( | precedence | ) | 
| GEOLOC_ENUM_TO_NAME_DECL | ( | format | ) | 
| GEOLOC_ENUM_TO_NAME_DECL | ( | precedence | ) |