Asterisk - The Open Source Telephony Project
18.5.0
|
Vector container support. More...
#include "asterisk/lock.h"
Go to the source code of this file.
Macros | |
#define | __make_room(idx, vec) |
#define | AST_VECTOR(name, type) |
Define a vector structure. More... | |
#define | AST_VECTOR_ADD_SORTED(vec, elem, cmp) |
Add an element into a sorted vector. More... | |
#define | AST_VECTOR_APPEND(vec, elem) |
Append an element to a vector, growing the vector if needed. More... | |
#define | AST_VECTOR_CALLBACK(vec, callback, default_value, ...) |
Execute a callback on every element in a vector returning the first matched. More... | |
#define | AST_VECTOR_CALLBACK_MULTIPLE(vec, callback, ...) |
Execute a callback on every element in a vector returning the matching elements in a new vector. More... | |
#define | AST_VECTOR_CALLBACK_VOID(vec, callback, ...) |
Execute a callback on every element in a vector disregarding callback return. More... | |
#define | AST_VECTOR_COMPACT(vec) |
Resize a vector so that its capacity is the same as its size. More... | |
#define | AST_VECTOR_DEFAULT(vec, size, value) |
Default a vector up to size with the given value. More... | |
#define | AST_VECTOR_ELEM_CLEANUP_NOOP(elem) |
Vector element cleanup that does nothing. More... | |
#define | AST_VECTOR_ELEM_DEFAULT_CMP(elem, value) ((elem) == (value)) |
Default comparator for AST_VECTOR_REMOVE_ELEM_UNORDERED() More... | |
#define | AST_VECTOR_FREE(vec) |
Deallocates this vector. More... | |
#define | AST_VECTOR_GET(vec, idx) |
Get an element from a vector. More... | |
#define | AST_VECTOR_GET_ADDR(vec, idx) |
Get an address of element in a vector. More... | |
#define | AST_VECTOR_GET_CMP(vec, value, cmp) |
Get an element from a vector that matches the given comparison. More... | |
#define | AST_VECTOR_GET_INDEX(vec, value, cmp) AST_VECTOR_GET_INDEX_NTH(vec, 1, value, cmp) |
Get the 1st index from a vector that matches the given comparison. More... | |
#define | AST_VECTOR_GET_INDEX_NTH(vec, nth, value, cmp) |
Get the nth index from a vector that matches the given comparison. More... | |
#define | AST_VECTOR_INIT(vec, size) |
Initialize a vector. More... | |
#define | AST_VECTOR_INSERT_AT(vec, idx, elem) |
Insert an element at a specific position in a vector, growing the vector if needed. More... | |
#define | AST_VECTOR_MATCH_ALL(element) (CMP_MATCH) |
Default callback for AST_VECTOR_CALLBACK() More... | |
#define | AST_VECTOR_MAX_SIZE(vec) (vec)->max |
Get the maximum number of elements the vector can currently hold. More... | |
#define | AST_VECTOR_PTR_FREE(vec) |
Deallocates this vector pointer. More... | |
#define | AST_VECTOR_REMOVE(vec, idx, preserve_ordered) |
Remove an element from a vector by index. More... | |
#define | AST_VECTOR_REMOVE_ALL_CMP_ORDERED(vec, value, cmp, cleanup) |
Remove all elements from a vector that matches the given comparison while maintaining order. More... | |
#define | AST_VECTOR_REMOVE_ALL_CMP_UNORDERED(vec, value, cmp, cleanup) |
Remove all elements from a vector that matches the given comparison. More... | |
#define | AST_VECTOR_REMOVE_CMP_ORDERED(vec, value, cmp, cleanup) |
Remove an element from a vector that matches the given comparison while maintaining order. More... | |
#define | AST_VECTOR_REMOVE_CMP_UNORDERED(vec, value, cmp, cleanup) |
Remove an element from a vector that matches the given comparison. More... | |
#define | AST_VECTOR_REMOVE_ELEM_ORDERED(vec, elem, cleanup) |
Remove an element from a vector while maintaining order. More... | |
#define | AST_VECTOR_REMOVE_ELEM_UNORDERED(vec, elem, cleanup) |
Remove an element from a vector. More... | |
#define | AST_VECTOR_REMOVE_ORDERED(vec, idx) AST_VECTOR_REMOVE(vec, idx, 1) |
Remove an element from a vector by index while maintaining order. More... | |
#define | AST_VECTOR_REMOVE_UNORDERED(vec, idx) AST_VECTOR_REMOVE(vec, idx, 0) |
Remove an element from an unordered vector by index. More... | |
#define | AST_VECTOR_REPLACE(vec, idx, elem) |
Replace an element at a specific position in a vector, growing the vector if needed. More... | |
#define | AST_VECTOR_RESET(vec, cleanup) |
Reset vector. More... | |
#define | AST_VECTOR_RW(name, type) |
Define a vector structure with a read/write lock. More... | |
#define | AST_VECTOR_RW_FREE(vec) |
Deallocates this locked vector. More... | |
#define | AST_VECTOR_RW_INIT(vec, size) |
Initialize a vector with a read/write lock. More... | |
#define | AST_VECTOR_RW_PTR_FREE(vec) |
Deallocates this locked vector pointer. More... | |
#define | AST_VECTOR_RW_RDLOCK(vec) ast_rwlock_rdlock(&(vec)->lock) |
Obtain read lock on vector. More... | |
#define | AST_VECTOR_RW_RDLOCK_TIMED(vec, timespec) ast_rwlock_timedrdlock(&(vec)->lock, timespec) |
Try to obtain read lock on vector failing after timeout if unable. More... | |
#define | AST_VECTOR_RW_RDLOCK_TRY(vec) ast_rwlock_tryrdlock(&(vec)->lock) |
Try to obtain read lock on vector failing immediately if unable. More... | |
#define | AST_VECTOR_RW_UNLOCK(vec) ast_rwlock_unlock(&(vec)->lock) |
Unlock vector. More... | |
#define | AST_VECTOR_RW_WRLOCK(vec) ast_rwlock_wrlock(&(vec)->lock) |
Obtain write lock on vector. More... | |
#define | AST_VECTOR_RW_WRLOCK_TIMED(vec, timespec) ast_rwlock_timedwrlock(&(vec)->lock, timespec) |
Try to obtain write lock on vector failing after timeout if unable. More... | |
#define | AST_VECTOR_RW_WRLOCK_TRY(vec) ast_rwlock_trywrlock(&(vec)->lock) |
Try to obtain write lock on vector failing immediately if unable. More... | |
#define | AST_VECTOR_SIZE(vec) (vec)->current |
Get the number of elements in a vector. More... | |
#define | AST_VECTOR_SORT(vec, cmp) |
Sort a vector in-place. More... | |
#define | AST_VECTOR_STEAL_ELEMENTS(vec) |
Steal the elements from a vector and reinitialize. More... | |
Enumerations | |
enum | ast_vector_string_split_flags { AST_VECTOR_STRING_SPLIT_NO_TRIM = 0x01, AST_VECTOR_STRING_SPLIT_ALLOW_EMPTY = 0x02 } |
Functions | |
AST_VECTOR (ast_vector_int, int) | |
Integer vector definition. More... | |
AST_VECTOR (ast_vector_string, char *) | |
String vector definitions. More... | |
AST_VECTOR (ast_vector_const_string, const char *) | |
int | ast_vector_string_split (struct ast_vector_string *dest, const char *input, const char *delim, int flags, int(*excludes_cmp)(const char *s1, const char *s2)) |
Append a string vector by splitting a string. More... | |
Vector container support.
A vector is a variable length array, with properties that can be useful when order doesn't matter.
Definition in file vector.h.
Define a vector structure.
name | Optional vector struct name. |
type | Vector element type. |
Definition at line 44 of file vector.h.
Referenced by AST_TEST_DEFINE(), and set_outbound_authentication_credentials().
#define AST_VECTOR_ADD_SORTED | ( | vec, | |
elem, | |||
cmp | |||
) |
Add an element into a sorted vector.
vec | Sorted vector to add to. |
elem | Element to insert. Must not be an array type. |
cmp | A strcmp compatible compare function. |
Definition at line 371 of file vector.h.
Referenced by alpha_module_list_create(), ast_rtp_read(), AST_TEST_DEFINE(), capture_buildopts_cb(), cli_completion_vector_add(), load_resource(), module_deps_missing_recursive(), rtp_instance_parse_transport_wide_cc(), subsystem_copy(), and vec_contact_add().
#define AST_VECTOR_APPEND | ( | vec, | |
elem | |||
) |
Append an element to a vector, growing the vector if needed.
vec | Vector to append to. |
elem | Element to append. |
Definition at line 256 of file vector.h.
Referenced by __ast_bt_destroy(), __ast_bt_get_symbols(), __ast_calloc_with_stringfields(), __ast_string_field_init(), acf_curl_helper(), add_hintdevice(), app_control_move(), ast_cli_allow_at_shutdown(), ast_cli_completion_matches(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_dns_query_set_add(), ast_dns_txt_get_strings(), ast_el_strtoarr(), ast_msg_handler_register(), ast_msg_tech_register(), ast_multi_object_blob_add(), ast_optional_api_use(), ast_rtp_bundle(), ast_rtp_instance_extmap_enable(), ast_serializer_pool_create(), ast_sip_auth_vector_init(), ast_sip_retrieve_auths_vector(), ast_sip_session_media_add_read_callback(), ast_sip_session_media_stats_save(), ast_sip_transport_monitor_register_replace(), ast_stream_topology_append_stream(), ast_stream_topology_clone(), ast_stream_topology_map(), ast_stream_topology_set_stream(), AST_TEST_DEFINE(), ast_vector_string_split(), build_body_part(), build_expression_queue(), build_node_children(), cache_entry_create(), cache_udpate(), category_register(), create_artificial_endpoint(), create_virtual_subscriptions(), device_state_cb(), evaluate_history_entry(), exten_state_publisher_state_cb(), filter_history(), format_cap_framed_init(), get_or_create_subscription(), history_on_rx_msg(), history_on_tx_msg(), ident_handler(), list_item_handler(), map_source_to_destinations(), messaging_app_subscribe_endpoint(), module_deps_process_reqlist(), module_load_error(), module_reffed_deps_add(), moh_parse_options(), on_moh_file(), optional_api_create(), populate_list(), prometheus_callback_register(), prometheus_metric_register(), prometheus_metrics_provider_register(), publishers_create(), registry_message_cb(), resource_list_recursive_decline(), route_table_add(), rtp_instance_parse_transport_wide_cc(), save_response_fields_to_transport(), set_outbound_authentication_credentials(), sip_options_endpoint_compositor_add_task(), sip_outbound_registration_perform(), sip_resolve_add(), softmix_bridge_stream_topology_changed(), sorcery_memory_cache_thrash_create(), stasis_app_control_play_uri(), stasis_app_message_handler(), stasis_forward_all(), stasis_state_add_observer(), state_find_or_add_eid(), subscriptions_create(), subsystem_alert_increment(), test_files_create(), topic_add_subscription(), tree_node_alloc(), wizard_apply_handler(), and wizard_mapped_observer().
#define AST_VECTOR_CALLBACK | ( | vec, | |
callback, | |||
default_value, | |||
... | |||
) |
Execute a callback on every element in a vector returning the first matched.
vec | Vector to operate on. |
callback | A callback that takes at least 1 argument (the element) plus number of optional arguments |
default_value | A default value to return if no elements matched |
Definition at line 768 of file vector.h.
Referenced by ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), AST_TEST_DEFINE(), and sorcery_object_load().
#define AST_VECTOR_CALLBACK_MULTIPLE | ( | vec, | |
callback, | |||
... | |||
) |
Execute a callback on every element in a vector returning the matching elements in a new vector.
This macro basically provides a filtered clone.
vec | Vector to operate on. |
callback | A callback that takes at least 1 argument (the element) plus number of optional arguments |
The following will resut in "error: assignment from incompatible pointer type" because these declare 2 different structures.
This will work because you're using the type of the first to declare the second:
This will also work because you're declaring both vector_1 and vector_2 from the same definition.
Definition at line 832 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_CALLBACK_VOID | ( | vec, | |
callback, | |||
... | |||
) |
Execute a callback on every element in a vector disregarding callback return.
vec | Vector to operate on. |
callback | A callback that takes at least 1 argument (the element) plus number of optional arguments |
Definition at line 865 of file vector.h.
Referenced by __ast_bt_free_symbols(), __ast_internal_context_destroy(), __ast_string_field_free_memory(), ast_cli_completion_matches(), ast_cli_completion_vector(), ast_dns_txt_free_strings(), ast_el_strtoarr(), ast_sip_service_route_vector_destroy(), AST_TEST_DEFINE(), category_set_sublevels(), cli_complete(), cli_completion_vector_add(), cli_subsystem_alert_report(), exten_state_pub_data_destroy(), module_destroy(), optional_api_destroy(), optional_api_set_impl(), publishers_destroy(), remote_send_hold_refresh(), resource_list_recursive_decline(), sorcery_object_type_destructor(), start_resource_list(), stream_topology_destroy(), subscriptions_destroy(), test_files_destroy(), tps_shutdown(), and unload_module().
#define AST_VECTOR_COMPACT | ( | vec | ) |
Resize a vector so that its capacity is the same as its size.
vec | Vector to compact. |
Definition at line 640 of file vector.h.
Referenced by moh_parse_options(), and moh_scan_files().
#define AST_VECTOR_DEFAULT | ( | vec, | |
size, | |||
value | |||
) |
Default a vector up to size with the given value.
vec | Vector to default. |
size | The number of elements to default |
value | The default value to set each element to |
Definition at line 309 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_ELEM_CLEANUP_NOOP | ( | elem | ) |
Vector element cleanup that does nothing.
elem | Element to cleanup |
Definition at line 573 of file vector.h.
Referenced by ast_channel_internal_fd_clear_all(), ast_msg_handler_unregister(), ast_msg_tech_unregister(), ast_rtp_bundle(), ast_rtp_destroy(), ast_rtp_read(), ast_sip_session_media_state_reset(), event_session_update_websocket(), ident_handler(), messaging_app_unsubscribe_endpoint(), optional_api_destroy(), remove_shutdown_command(), resource_list_recursive_decline(), rtp_instance_parse_transport_wide_cc(), rtp_transport_wide_cc_feedback_produce(), softmix_bridge_stream_topology_changed(), start_resource_list(), stasis_forward_cancel(), stasis_state_remove_observer(), and topic_remove_subscription().
Default comparator for AST_VECTOR_REMOVE_ELEM_UNORDERED()
elem | Element to compare against |
value | Value to compare with the vector element. |
Definition at line 564 of file vector.h.
Referenced by ast_stream_topology_map(), AST_TEST_DEFINE(), module_deps_missing_recursive(), module_reffed_deps_add(), optional_api_destroy(), resource_list_recursive_decline(), softmix_bridge_stream_topology_changed(), and start_resource_list().
#define AST_VECTOR_FREE | ( | vec | ) |
Deallocates this vector.
If any code to free the elements of this vector needs to be run, that should be done prior to this call.
vec | Vector to deallocate. |
Definition at line 174 of file vector.h.
Referenced by __ast_internal_context_destroy(), __ast_string_field_free_memory(), __ast_string_field_init(), acf_curl_helper(), ast_channel_internal_cleanup(), ast_rtp_codecs_payloads_destroy(), ast_rtp_codecs_payloads_initialize(), ast_rtp_destroy(), ast_rtp_prop_set(), ast_sip_auth_vector_destroy(), ast_sip_session_media_state_free(), ast_stream_topology_map(), AST_TEST_DEFINE(), ast_update_module_list(), ast_update_module_list_condition(), ast_update_module_list_data(), bridge_channel_destroy(), build_expression_queue(), build_resource_tree(), cache_entry_dtor(), cli_completion_vector_add(), cli_subsystem_alert_report(), destroy_bridge(), destroy_hint(), destroy_subscription(), digest_create_request_with_auth(), dns_query_set_destroy(), endpoint_destructor(), evaluate_history_entry(), event_session_shutdown(), exten_state_pub_data_destroy(), filter_history(), format_cap_destroy(), free_body_parts(), instance_destructor(), internal_sip_session_media_state_alloc(), load_module(), load_modules(), load_resource_list(), message_shutdown(), message_subscription_dtor(), messaging_cleanup(), messaging_init(), module_deps_missing_recursive(), module_destroy(), moh_file_vector_destructor(), multi_object_blob_dtor(), optional_api_destroy(), playback_dtor(), publishers_destroy(), remove_excess_contacts(), resource_list_destructor(), resource_list_recursive_decline(), route_table_dtor(), safe_vector_cleanup(), session_destructor(), set_outbound_authentication_credentials(), sip_options_aor_dtor(), sip_resolve_callback(), sip_resolve_destroy(), softmix_bridge_data_destroy(), softmix_bridge_leave(), softmix_bridge_stream_topology_changed(), sorcery_memory_cache_thrash_destroy(), start_resource(), start_resource_list(), stasis_cleanup(), state_dtor(), stream_topology_destroy(), subscription_dtor(), subscriptions_destroy(), test_files_destroy(), topic_dtor(), transport_monitor_dtor(), tree_node_destroy(), unload_module(), and wizard_apply_handler().
#define AST_VECTOR_GET | ( | vec, | |
idx | |||
) |
Get an element from a vector.
vec | Vector to query. |
idx | Index of the element to get. |
Definition at line 682 of file vector.h.
Referenced by __ast_context_destroy(), __ast_format_cap_get_names(), __ast_sorcery_object_type_remove_wizard(), __ast_string_fields_cmp(), __ast_string_fields_copy(), acf_curl_helper(), add_bundle_groups(), add_msid_to_stream(), allowed_on_shutdown(), append_backtrace_information(), ast_bridge_channel_queue_frame(), ast_channel_fd(), ast_cli_completion_vector(), ast_cli_display_match_list(), ast_context_ignorepats_get(), ast_context_includes_get(), ast_context_remove_ignorepat2(), ast_context_remove_include2(), ast_context_remove_switch2(), ast_context_switches_get(), ast_format_cap_append_from_cap(), ast_format_cap_empty(), ast_format_cap_get_best_by_type(), ast_format_cap_get_compatible(), ast_format_cap_get_format(), ast_format_cap_has_type(), ast_format_cap_iscompatible(), ast_format_cap_replace_from_cap(), ast_log_backtrace(), ast_moh_files_next(), ast_msg_has_destination(), ast_pjproject_get_buildopt(), ast_rtp_codecs_find_payload_code(), ast_rtp_codecs_get_payload(), ast_rtp_codecs_get_payload_format(), ast_rtp_codecs_get_stream_type(), ast_rtp_codecs_payload_code(), ast_rtp_codecs_payload_code_tx(), ast_rtp_codecs_payload_formats(), ast_rtp_codecs_payload_replace_format(), ast_rtp_codecs_payloads_copy(), ast_rtp_codecs_payloads_destroy(), ast_rtp_codecs_payloads_set_m_type(), ast_rtp_codecs_payloads_set_rtpmap_type_rate(), ast_rtp_codecs_payloads_unset(), ast_rtp_codecs_payloads_xover(), ast_rtp_instance_extmap_get_id(), ast_rtp_instance_extmap_negotiate(), ast_serializer_pool_get(), ast_serializer_pool_set_alerts(), ast_sip_for_each_auth(), ast_sip_message_apply_transport(), ast_sip_retrieve_auths(), ast_sip_retrieve_auths_vector(), ast_sip_session_media_get_transport(), ast_sip_session_media_state_add(), ast_sip_session_media_state_clone(), ast_sip_session_media_stats_save(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_get_wizard_mapping(), ast_sorcery_is_stale(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_prefix(), ast_sorcery_retrieve_by_regex(), ast_sorcery_update(), ast_stream_topology_clone(), ast_stream_topology_create_resolved(), ast_stream_topology_del_stream(), ast_stream_topology_get_active_count(), ast_stream_topology_get_first_stream_by_type(), ast_stream_topology_get_formats_by_type(), ast_stream_topology_get_stream(), ast_stream_topology_set_stream(), ast_stream_topology_to_str(), ast_taskprocessor_get_subsystem_alert(), AST_TEST_DEFINE(), ast_update_module_list(), ast_update_module_list_condition(), ast_update_module_list_data(), ast_walk_context_includes(), bridge_channel_handle_write(), bridge_channel_write_frame(), build_expression_queue(), build_node_children(), build_rlmi_body(), cache_entry_by_eid(), cache_entry_dtor(), cache_entry_dump(), cache_remove(), cache_udpate(), can_reuse_publish(), category_complete(), category_is_allowed(), chan_pjsip_indicate(), chan_pjsip_write_stream(), check_node(), cli_complete(), cli_print_body(), cli_subsystem_alert_report(), create_outgoing_sdp_stream(), create_virtual_subscriptions(), destroy_hint(), destroy_subscriptions(), dispatch_message(), display_entry_list(), enable_rtp_extension(), evaluate_history_entry(), event_session_shutdown(), event_session_update_websocket(), explicit_publish_cb(), exten_state_publisher_cb(), filter_history(), find_registrar_aor(), find_unused_payload_in_range(), find_wizard(), format_cap_destroy(), format_cap_replace(), format_in_format_cap(), free_body_parts(), generate_initial_notify(), generate_list_body(), get_subscription(), get_wrapper(), handle_aor(), handle_cli_moh_show_files(), handle_export_primitives(), handle_identify(), handle_msg_cb(), handle_negotiated_sdp(), handle_pjproject_show_buildopts(), handle_registrations(), has_destination_cb(), have_visited(), ident_to_str(), is_app_subscribed(), is_media_state_valid(), item_in_vector(), list_item_to_str(), load_dlopen_missing(), load_endpoint(), load_modules(), message_subscription_dtor(), module_deps_missing_recursive(), module_deps_process_reqlist(), msg_find_by_tech_name(), msg_handler_find_by_tech_name(), msg_q_cb(), multi_object_blob_dtor(), multi_object_blob_to_ami(), multi_user_event_to_json(), outbound_auths_to_var_list(), payload_mapping_rx_clear_primary(), payload_mapping_tx_is_present(), pjsip_show_history(), play_on_channel(), playback_dtor(), prometheus_callback_unregister(), prometheus_metric_register(), prometheus_metric_unregister(), publish_msg(), registration_deleted_observer(), registration_loaded_observer(), reload_module(), remb_collect_report(), remb_send_report(), remove_excess_contacts(), remove_hintdevice(), resolve_refresh_media_states(), resource_list_destructor(), resource_list_recursive_decline(), rtp_codecs_assign_payload_code_rx(), rtp_codecs_find_non_primary_dynamic_rx(), rtp_codecs_payload_replace_rx(), rtp_codecs_payloads_copy_rx(), rtp_codecs_payloads_copy_tx(), scrape_metrics(), set_channel_on_rtp_instance(), set_outbound_authentication_credentials(), set_remote_mslabel_and_stream_group(), set_state_terminated(), shutdown_subscriptions(), sip_options_endpoint_compositor_remove_task(), sip_options_notify_endpoint_state_compositors(), sip_options_publish_contact_state(), sip_options_qualify_contact(), sip_options_synchronize_aor_task(), sip_outbound_registration_perform(), sip_session_refresh(), softmix_bridge_stream_topology_changed(), sorcery_memory_cache_thrash_destroy(), sorcery_memory_cache_thrash_start(), sorcery_memory_cache_thrash_stop(), start_resource(), start_resource_list(), stasis_app_control_play_uri(), stasis_app_playback_to_json(), stasis_cache_entry_get_remote(), stasis_forward_all(), stasis_forward_cancel(), stasis_show_topic(), stasis_state_add_subscriber(), stasis_subscription_is_subscribed(), subscriber_dtor(), subscription_invoke(), subsystem_alert_decrement(), subsystem_alert_increment(), t38_reinvite_response_cb(), test_files_get_one(), test_is_media_state_equal(), topic_add_subscription(), topic_remove_subscription(), tree_node_destroy(), unload_module(), verify_bad_headers(), and verify_user_event_fields().
#define AST_VECTOR_GET_ADDR | ( | vec, | |
idx | |||
) |
Get an address of element in a vector.
vec | Vector to query. |
idx | Index of the element to get address of. |
Definition at line 670 of file vector.h.
Referenced by __rtp_find_instance_by_ssrc(), ast_dns_query_set_get(), ast_dns_query_set_resolve_async(), ast_dns_query_set_resolve_cancel(), ast_format_cap_get_compatible_format(), ast_format_cap_get_format_framing(), ast_format_cap_iscompatible_format(), ast_format_cap_remove(), ast_format_cap_remove_by_type(), ast_rtp_instance_extmap_get_direction(), ast_rtp_instance_extmap_get_extension(), ast_rtp_remote_address_set(), ast_rtp_set_remote_ssrc(), ast_sip_session_media_state_clone(), chan_pjsip_read_stream(), dns_query_set_destroy(), format_cap_destroy(), format_cap_framed_init(), handle_negotiated_sdp(), publish_msg(), route_table_dtor(), route_table_find(), rtcp_debug_test_addr(), rtp_find_rtcp_fd_position(), rtp_transport_wide_cc_feedback_produce(), sip_resolve_callback(), state_find_and_remove_eid(), state_find_or_add_eid(), statistics_show_messages(), test_is_media_state_equal(), transport_monitor_dtor(), transport_monitor_unregister_cb(), and transport_state_do_reg_callbacks().
#define AST_VECTOR_GET_CMP | ( | vec, | |
value, | |||
cmp | |||
) |
Get an element from a vector that matches the given comparison.
vec | Vector to get from. |
value | Value to pass into comparator. |
cmp | Comparator function/macros (called as cmp(elem, value) ) |
Definition at line 733 of file vector.h.
Referenced by __ast_sorcery_object_type_insert_wizard(), ast_rtcp_generate_nack(), ast_rtp_read(), AST_TEST_DEFINE(), ast_vector_string_split(), category_set_sublevel(), get_api(), module_deps_missing_recursive(), module_reffed_deps_add(), module_reffed_deps_add_dep_enhancers(), on_moh_file(), and resource_list_recursive_decline().
#define AST_VECTOR_GET_INDEX | ( | vec, | |
value, | |||
cmp | |||
) | AST_VECTOR_GET_INDEX_NTH(vec, 1, value, cmp) |
Get the 1st index from a vector that matches the given comparison.
vec | Vector to get from. |
value | Value to pass into comparator. |
cmp | Comparator function/macros (called as cmp(elem, value) ) |
Definition at line 721 of file vector.h.
Referenced by ast_taskprocessor_get_subsystem_alert(), AST_TEST_DEFINE(), category_register(), subsystem_alert_decrement(), and subsystem_alert_increment().
#define AST_VECTOR_GET_INDEX_NTH | ( | vec, | |
nth, | |||
value, | |||
cmp | |||
) |
Get the nth index from a vector that matches the given comparison.
vec | Vector to get from. |
nth | The nth index to find |
value | Value to pass into comparator. |
cmp | Comparator function/macros (called as cmp(elem, value) ) |
Definition at line 698 of file vector.h.
Referenced by ast_stream_topology_map(), AST_TEST_DEFINE(), and softmix_bridge_stream_topology_changed().
#define AST_VECTOR_INIT | ( | vec, | |
size | |||
) |
Initialize a vector.
If size is 0, then no space will be allocated until the vector is appended to.
vec | Vector to initialize. |
size | Initial size of the vector. |
Definition at line 113 of file vector.h.
Referenced by __ast_bt_destroy(), __ast_bt_get_symbols(), __ast_calloc_with_stringfields(), __ast_channel_internal_alloc(), __ast_string_field_init(), acf_curl_helper(), alpha_module_list_create(), ast_add_hint(), ast_builtins_init(), ast_context_find_or_create(), ast_dns_query_set_create(), ast_dns_txt_get_strings(), ast_module_register(), ast_msg_init(), ast_multi_object_blob_create(), ast_rtp_codecs_payloads_initialize(), ast_rtp_instance_new(), ast_rtp_new(), ast_rtp_prop_set(), ast_sip_auth_vector_init(), ast_sip_endpoint_alloc(), ast_sip_service_route_vector_alloc(), ast_sip_session_alloc(), ast_stream_topology_alloc(), ast_stream_topology_map(), AST_TEST_DEFINE(), bridge_alloc(), build_expression_queue(), build_resource_tree(), cache_entry_create(), cli_subsystem_alert_report(), control_create(), create_artificial_endpoint(), create_virtual_subscriptions(), digest_create_request_with_auth(), evaluate_history_entry(), event_session_alloc(), exten_state_pub_data_alloc(), filter_history(), format_cap_init(), generate_list_body(), internal_sip_session_media_state_alloc(), internal_stasis_subscribe(), load_module(), load_modules(), load_resource_list(), messaging_init(), module_deps_missing_recursive(), moh_file_vector_alloc(), playback_create(), publishers_create(), remove_excess_contacts(), resource_list_alloc(), resource_list_recursive_decline(), set_outbound_authentication_credentials(), sip_options_aor_alloc(), sip_outbound_registration_perform(), sip_resolve(), sip_resolve_callback(), softmix_bridge_create(), softmix_bridge_stream_topology_changed(), sorcery_memory_cache_thrash_create(), start_resource(), start_resource_list(), stasis_init(), stasis_message_router_create_internal(), stasis_topic_create_with_detail(), state_alloc(), subscriptions_create(), test_files_create(), test_init_cb(), transport_state_callback(), tree_node_alloc(), and wizard_apply_handler().
#define AST_VECTOR_INSERT_AT | ( | vec, | |
idx, | |||
elem | |||
) |
Insert an element at a specific position in a vector, growing the vector if needed.
vec | Vector to insert into. |
idx | Position to insert at. |
elem | Element to insert. |
Definition at line 338 of file vector.h.
Referenced by __ast_sorcery_object_type_insert_wizard(), ast_cli_completion_vector(), AST_TEST_DEFINE(), and prometheus_metric_unregister().
#define AST_VECTOR_MATCH_ALL | ( | element | ) | (CMP_MATCH) |
Default callback for AST_VECTOR_CALLBACK()
elem | Element to compare against |
value | Value to compare with the vector element. |
Definition at line 754 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_MAX_SIZE | ( | vec | ) | (vec)->max |
Get the maximum number of elements the vector can currently hold.
vec | Vector to query. |
Definition at line 619 of file vector.h.
Referenced by vec_contact_add().
#define AST_VECTOR_PTR_FREE | ( | vec | ) |
Deallocates this vector pointer.
If any code to free the elements of this vector need to be run, that should be done prior to this call.
vec | Pointer to a malloc'd vector structure. |
Definition at line 189 of file vector.h.
Referenced by __ast_bt_free_symbols(), ast_cli_completion_matches(), ast_cli_completion_vector(), ast_dns_txt_free_strings(), ast_el_strtoarr(), AST_TEST_DEFINE(), cli_complete(), and filter_history().
#define AST_VECTOR_REMOVE | ( | vec, | |
idx, | |||
preserve_ordered | |||
) |
Remove an element from a vector by index.
Note that elements in the vector may be reordered, so that the remove can happen in constant time.
vec | Vector to remove from. |
idx | Index of the element to remove. |
preserve_order | Preserve the vector order. |
Definition at line 412 of file vector.h.
Referenced by ast_cli_completion_vector(), build_expression_queue(), evaluate_history_entry(), module_deps_missing_recursive(), prometheus_callback_unregister(), prometheus_metric_unregister(), registration_deleted_observer(), registration_loaded_observer(), sip_options_endpoint_compositor_remove_task(), sip_session_refresh(), start_resource_list(), and subsystem_alert_decrement().
Remove all elements from a vector that matches the given comparison while maintaining order.
vec | Vector to remove from. |
value | Value to pass into comparator. |
cmp | Comparator function/macros (called as cmp(elem, value) ) |
cleanup | How to cleanup a removed element macro/function. |
Remove all elements from a vector that matches the given comparison.
vec | Vector to remove from. |
value | Value to pass into comparator. |
cmp | Comparator function/macros (called as cmp(elem, value) ) |
cleanup | How to cleanup a removed element macro/function. |
Definition at line 461 of file vector.h.
Referenced by unload_module(), and wizard_apply_handler().
Remove an element from a vector that matches the given comparison while maintaining order.
vec | Vector to remove from. |
value | Value to pass into comparator. |
cmp | Comparator function/macros (called as cmp(elem, value) ) |
cleanup | How to cleanup a removed element macro/function. |
Definition at line 540 of file vector.h.
Referenced by __ast_sorcery_remove_wizard_mapping(), ast_format_cap_remove(), ast_format_cap_remove_by_type(), ast_rtp_read(), AST_TEST_DEFINE(), and start_resource_list().
Remove an element from a vector that matches the given comparison.
vec | Vector to remove from. |
value | Value to pass into comparator. |
cmp | Comparator function/macros (called as cmp(elem, value) ) |
cleanup | How to cleanup a removed element macro/function. |
Definition at line 488 of file vector.h.
Referenced by ast_msg_handler_unregister(), ast_msg_tech_unregister(), ast_optional_api_unuse(), ast_rtp_bundle(), ast_rtp_destroy(), ast_sip_session_media_stats_save(), category_unregister(), messaging_app_unsubscribe_endpoint(), optional_api_destroy(), and route_table_remove().
#define AST_VECTOR_REMOVE_ELEM_ORDERED | ( | vec, | |
elem, | |||
cleanup | |||
) |
Remove an element from a vector while maintaining order.
vec | Vector to remove from. |
elem | Element to remove |
cleanup | How to cleanup a removed element macro/function. |
Definition at line 600 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_REMOVE_ELEM_UNORDERED | ( | vec, | |
elem, | |||
cleanup | |||
) |
Remove an element from a vector.
vec | Vector to remove from. |
elem | Element to remove |
cleanup | How to cleanup a removed element macro/function. |
Definition at line 585 of file vector.h.
Referenced by remove_shutdown_command(), stasis_forward_cancel(), stasis_state_remove_observer(), and topic_remove_subscription().
#define AST_VECTOR_REMOVE_ORDERED | ( | vec, | |
idx | |||
) | AST_VECTOR_REMOVE(vec, idx, 1) |
Remove an element from a vector by index while maintaining order.
vec | Vector to remove from. |
idx | Index of the element to remove. |
Definition at line 448 of file vector.h.
Referenced by __ast_context_destroy(), __ast_sorcery_object_type_remove_wizard(), ast_context_remove_ignorepat2(), ast_context_remove_include2(), ast_context_remove_switch2(), ast_stream_topology_del_stream(), and AST_TEST_DEFINE().
#define AST_VECTOR_REMOVE_UNORDERED | ( | vec, | |
idx | |||
) | AST_VECTOR_REMOVE(vec, idx, 0) |
Remove an element from an unordered vector by index.
Note that elements in the vector may be reordered, so that the remove can happen in constant time.
vec | Vector to remove from. |
idx | Index of the element to remove. |
Definition at line 438 of file vector.h.
Referenced by ast_sip_auth_vector_destroy(), AST_TEST_DEFINE(), cache_remove(), cache_udpate(), clear_result_states(), remove_hintdevice(), state_find_and_remove_eid(), and transport_monitor_unregister_cb().
#define AST_VECTOR_REPLACE | ( | vec, | |
idx, | |||
elem | |||
) |
Replace an element at a specific position in a vector, growing the vector if needed.
vec | Vector to replace into. |
idx | Position to replace. |
elem | Element to replace. |
Definition at line 284 of file vector.h.
Referenced by ast_channel_fd_add(), ast_channel_internal_fd_clear(), ast_channel_internal_fd_set(), ast_rtp_codecs_payload_replace_format(), ast_rtp_codecs_payloads_copy(), ast_rtp_codecs_payloads_set_m_type(), ast_rtp_codecs_payloads_set_rtpmap_type_rate(), ast_rtp_codecs_payloads_unset(), ast_rtp_instance_extmap_clear(), ast_rtp_instance_extmap_enable(), ast_rtp_instance_extmap_negotiate(), ast_sip_session_media_state_add(), ast_sip_session_media_state_clone(), ast_stream_topology_map(), ast_stream_topology_set_stream(), AST_TEST_DEFINE(), format_cap_framed_init(), map_source_to_destinations(), payload_mapping_rx_clear_primary(), publish_msg(), remb_enable_collection(), resolve_refresh_media_states(), rtp_codecs_payload_replace_rx(), rtp_codecs_payloads_copy_tx(), softmix_bridge_stream_topology_changed(), stasis_subscription_accept_message_type(), stasis_subscription_decline_message_type(), test_media_add(), and verify_user_event_fields().
#define AST_VECTOR_RESET | ( | vec, | |
cleanup | |||
) |
Reset vector.
vec | Vector to reset. |
callback | A cleanup callback or AST_VECTOR_ELEM_CLEANUP_NOOP. |
Definition at line 627 of file vector.h.
Referenced by ast_channel_internal_fd_clear_all(), ast_rtp_read(), ast_serializer_pool_destroy(), ast_sip_session_media_state_reset(), AST_TEST_DEFINE(), clear_history_entries(), control_move_cleanup(), event_session_update_websocket(), filter_history(), ident_handler(), moh_file_vector_destructor(), resource_list_recursive_decline(), rtp_instance_parse_transport_wide_cc(), rtp_transport_wide_cc_feedback_produce(), safe_vector_cleanup(), session_destructor(), sip_options_cleanup_aor_task(), sip_options_notify_endpoint_state_compositors(), sip_options_synchronize_aor_task(), softmix_bridge_data_destroy(), softmix_bridge_stream_topology_changed(), and start_resource_list().
Define a vector structure with a read/write lock.
name | Optional vector struct name. |
type | Vector element type. |
Definition at line 93 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_RW_FREE | ( | vec | ) |
Deallocates this locked vector.
If any code to free the elements of this vector need to be run, that should be done prior to this call.
vec | Vector to deallocate. |
Definition at line 202 of file vector.h.
Referenced by ast_logger_category_unload(), ast_serializer_pool_destroy(), AST_TEST_DEFINE(), sorcery_object_type_destructor(), state_manager_dtor(), tps_shutdown(), and unload_module().
#define AST_VECTOR_RW_INIT | ( | vec, | |
size | |||
) |
Initialize a vector with a read/write lock.
If size is 0, then no space will be allocated until the vector is appended to.
vec | Vector to initialize. |
size | Initial size of the vector. |
Definition at line 158 of file vector.h.
Referenced by ast_logger_category_load(), ast_serializer_pool_create(), AST_TEST_DEFINE(), ast_tps_init(), load_module(), sorcery_object_type_alloc(), and stasis_state_manager_create().
#define AST_VECTOR_RW_PTR_FREE | ( | vec | ) |
Deallocates this locked vector pointer.
If any code to free the elements of this vector need to be run, that should be done prior to this call.
vec | Pointer to a malloc'd vector structure. |
#define AST_VECTOR_RW_RDLOCK | ( | vec | ) | ast_rwlock_rdlock(&(vec)->lock) |
Obtain read lock on vector.
vec | Vector to operate on. |
Definition at line 880 of file vector.h.
Referenced by ast_serializer_pool_get(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_is_stale(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_prefix(), ast_sorcery_retrieve_by_regex(), ast_sorcery_update(), ast_taskprocessor_get_subsystem_alert(), AST_TEST_DEFINE(), category_complete(), category_is_allowed(), cli_subsystem_alert_report(), find_wizard(), handle_export_primitives(), sorcery_object_load(), stasis_state_add_subscriber(), and subscriber_dtor().
#define AST_VECTOR_RW_RDLOCK_TIMED | ( | vec, | |
timespec | |||
) | ast_rwlock_timedrdlock(&(vec)->lock, timespec) |
Try to obtain read lock on vector failing after timeout if unable.
vec | Vector to operate on. |
Definition at line 930 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_RW_RDLOCK_TRY | ( | vec | ) | ast_rwlock_tryrdlock(&(vec)->lock) |
Try to obtain read lock on vector failing immediately if unable.
vec | Vector to operate on. |
Definition at line 910 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_RW_UNLOCK | ( | vec | ) | ast_rwlock_unlock(&(vec)->lock) |
Unlock vector.
vec | Vector to operate on. |
Definition at line 900 of file vector.h.
Referenced by __ast_sorcery_object_type_insert_wizard(), __ast_sorcery_object_type_remove_wizard(), __ast_sorcery_remove_wizard_mapping(), ast_serializer_pool_destroy(), ast_serializer_pool_get(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_is_stale(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_prefix(), ast_sorcery_retrieve_by_regex(), ast_sorcery_update(), ast_taskprocessor_get_subsystem_alert(), AST_TEST_DEFINE(), category_complete(), category_is_allowed(), category_register(), category_set_sublevel(), category_set_sublevels(), category_unregister(), cli_subsystem_alert_report(), find_wizard(), handle_export_primitives(), sorcery_object_load(), sorcery_object_type_destructor(), stasis_state_add_observer(), stasis_state_add_subscriber(), stasis_state_remove_observer(), subscriber_dtor(), subsystem_alert_decrement(), subsystem_alert_increment(), and wizard_mapped_observer().
#define AST_VECTOR_RW_WRLOCK | ( | vec | ) | ast_rwlock_wrlock(&(vec)->lock) |
Obtain write lock on vector.
vec | Vector to operate on. |
Definition at line 890 of file vector.h.
Referenced by __ast_sorcery_object_type_insert_wizard(), __ast_sorcery_object_type_remove_wizard(), __ast_sorcery_remove_wizard_mapping(), ast_serializer_pool_destroy(), AST_TEST_DEFINE(), category_register(), category_set_sublevel(), category_set_sublevels(), category_unregister(), sorcery_object_type_destructor(), stasis_state_add_observer(), stasis_state_remove_observer(), subsystem_alert_decrement(), subsystem_alert_increment(), and wizard_mapped_observer().
#define AST_VECTOR_RW_WRLOCK_TIMED | ( | vec, | |
timespec | |||
) | ast_rwlock_timedwrlock(&(vec)->lock, timespec) |
Try to obtain write lock on vector failing after timeout if unable.
vec | Vector to operate on. |
Definition at line 940 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_RW_WRLOCK_TRY | ( | vec | ) | ast_rwlock_trywrlock(&(vec)->lock) |
Try to obtain write lock on vector failing immediately if unable.
vec | Vector to operate on. |
Definition at line 920 of file vector.h.
Referenced by AST_TEST_DEFINE().
#define AST_VECTOR_SIZE | ( | vec | ) | (vec)->current |
Get the number of elements in a vector.
vec | Vector to query. |
Definition at line 611 of file vector.h.
Referenced by __ast_format_cap_get_names(), __ast_sorcery_object_type_insert_wizard(), __ast_sorcery_object_type_remove_wizard(), __ast_string_fields_cmp(), __ast_string_fields_copy(), __rtp_find_instance_by_ssrc(), _moh_register(), acf_curl_helper(), add_bundle_groups(), allowed_on_shutdown(), append_backtrace_information(), ast_bridge_channel_queue_frame(), ast_channel_fd(), ast_channel_fd_count(), ast_channel_internal_fd_clear(), ast_channel_internal_fd_set(), ast_cli_completion_vector(), ast_cli_display_match_list(), ast_context_ignorepats_count(), ast_context_includes_count(), ast_context_switches_count(), ast_dns_query_set_get(), ast_dns_query_set_num_queries(), ast_dns_query_set_resolve_async(), ast_dns_query_set_resolve_cancel(), ast_el_strtoarr(), ast_format_cap_append_from_cap(), ast_format_cap_count(), ast_format_cap_get_best_by_type(), ast_format_cap_get_compatible(), ast_format_cap_get_compatible_format(), ast_format_cap_get_format(), ast_format_cap_get_format_framing(), ast_format_cap_has_type(), ast_format_cap_identical(), ast_format_cap_iscompatible(), ast_format_cap_iscompatible_format(), ast_format_cap_remove(), ast_format_cap_remove_by_type(), ast_format_cap_replace_from_cap(), ast_log_backtrace(), ast_moh_files_next(), ast_msg_has_destination(), ast_optional_api_unuse(), ast_pjproject_get_buildopt(), ast_rtcp_generate_nack(), ast_rtp_codecs_find_payload_code(), ast_rtp_codecs_get_payload(), ast_rtp_codecs_get_payload_format(), ast_rtp_codecs_get_stream_type(), ast_rtp_codecs_payload_code(), ast_rtp_codecs_payload_code_tx(), ast_rtp_codecs_payload_formats(), ast_rtp_codecs_payload_replace_format(), ast_rtp_codecs_payloads_copy(), ast_rtp_codecs_payloads_destroy(), ast_rtp_codecs_payloads_set_m_type(), ast_rtp_codecs_payloads_set_rtpmap_type_rate(), ast_rtp_codecs_payloads_unset(), ast_rtp_codecs_payloads_xover(), ast_rtp_instance_extmap_clear(), ast_rtp_instance_extmap_count(), ast_rtp_instance_extmap_enable(), ast_rtp_instance_extmap_get_direction(), ast_rtp_instance_extmap_get_extension(), ast_rtp_instance_extmap_get_id(), ast_rtp_instance_extmap_negotiate(), ast_rtp_read(), ast_rtp_remote_address_set(), ast_rtp_set_remote_ssrc(), ast_serializer_pool_get(), ast_serializer_pool_set_alerts(), ast_sip_auth_vector_destroy(), ast_sip_auth_vector_init(), ast_sip_auths_to_str(), ast_sip_for_each_auth(), ast_sip_message_apply_transport(), ast_sip_retrieve_auths(), ast_sip_retrieve_auths_vector(), ast_sip_session_media_get_transport(), ast_sip_session_media_state_add(), ast_sip_session_media_state_clone(), ast_sip_session_media_stats_save(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_get_wizard_mapping(), ast_sorcery_get_wizard_mapping_count(), ast_sorcery_is_stale(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_prefix(), ast_sorcery_retrieve_by_regex(), ast_sorcery_update(), ast_stream_topology_append_stream(), ast_stream_topology_clone(), ast_stream_topology_create_resolved(), ast_stream_topology_del_stream(), ast_stream_topology_get_active_count(), ast_stream_topology_get_count(), ast_stream_topology_get_first_stream_by_type(), ast_stream_topology_get_formats_by_type(), ast_stream_topology_map(), ast_stream_topology_set_stream(), ast_stream_topology_to_str(), AST_TEST_DEFINE(), ast_update_module_list(), ast_update_module_list_condition(), ast_update_module_list_data(), bridge_channel_handle_write(), bridge_channel_write_frame(), build_expression_queue(), build_node_children(), build_resource_tree(), build_rlmi_body(), cache_entry_by_eid(), cache_entry_dtor(), cache_entry_dump(), cache_remove(), cache_udpate(), can_reuse_publish(), category_complete(), category_is_allowed(), chan_pjsip_indicate(), chan_pjsip_read_stream(), chan_pjsip_write_stream(), check_node(), clear_result_states(), cli_complete(), cli_print_body(), cli_subsystem_alert_report(), control_next_app_args_size(), create_subscription_tree(), create_virtual_subscriptions(), destroy_hint(), destroy_subscriptions(), digest_check_auth(), digest_create_request_with_auth(), digest_requires_authentication(), dispatch_message(), display_entry_list(), dns_query_set_callback(), dns_query_set_destroy(), enable_rtp_extension(), evaluate_history_entry(), event_session_dtor(), event_session_shutdown(), event_session_update_websocket(), explicit_publish_cb(), exten_state_publisher_cb(), filter_history(), find_registrar_aor(), find_unused_payload_in_range(), find_wizard(), format_cap_destroy(), format_cap_framed_init(), format_cap_replace(), format_in_format_cap(), free_body_parts(), generate_initial_notify(), generate_list_body(), generate_notify_body(), get_subscription(), get_wrapper(), handle_aor(), handle_cli_moh_show_files(), handle_export_primitives(), handle_identify(), handle_msg_cb(), handle_negotiated_sdp(), handle_pjproject_show_buildopts(), handle_registrations(), has_destination_cb(), have_visited(), ident_handler(), ident_to_str(), internal_format_cap_identical(), is_app_subscribed(), is_media_state_valid(), item_in_vector(), list_item_to_str(), load_dlopen_missing(), load_endpoint(), load_module(), load_modules(), local_ast_moh_start(), message_subscription_dtor(), messaging_app_unsubscribe_endpoint(), module_deps_missing_recursive(), module_deps_process_reqlist(), moh_files_alloc(), moh_scan_files(), msg_find_by_tech_name(), msg_handler_find_by_tech_name(), msg_q_cb(), multi_object_blob_dtor(), multi_object_blob_to_ami(), multi_user_event_to_json(), optional_api_set_impl(), outbound_auths_to_var_list(), payload_mapping_rx_clear_primary(), payload_mapping_tx_is_present(), pjsip_show_history(), play_on_channel(), playback_dtor(), playback_final_update(), prometheus_callback_unregister(), prometheus_metric_register(), prometheus_metric_registered_count(), prometheus_metric_unregister(), publish_msg(), registration_deleted_observer(), registration_loaded_observer(), reload_module(), remb_collect_report(), remb_send_report(), remove_excess_contacts(), remove_hintdevice(), resolve_refresh_media_states(), resource_list_apply_handler(), resource_list_destructor(), resource_list_recursive_decline(), route_table_dtor(), route_table_find(), rtcp_debug_test_addr(), rtp_codecs_assign_payload_code_rx(), rtp_codecs_find_non_primary_dynamic_rx(), rtp_codecs_payload_replace_rx(), rtp_codecs_payloads_copy_rx(), rtp_codecs_payloads_copy_tx(), rtp_find_rtcp_fd_position(), rtp_instance_parse_transport_wide_cc(), rtp_transport_wide_cc_feedback_produce(), scrape_metrics(), set_channel_on_rtp_instance(), set_outbound_authentication_credentials(), set_outbound_initial_authentication_credentials(), set_remote_mslabel_and_stream_group(), set_state_terminated(), shutdown_subscriptions(), sip_options_aor_dtor(), sip_options_endpoint_compositor_remove_task(), sip_options_notify_endpoint_state_compositors(), sip_options_publish_contact_state(), sip_options_qualify_contact(), sip_options_synchronize_aor_task(), sip_outbound_registration_perform(), sip_session_refresh(), softmix_bridge_stream_topology_changed(), sorcery_memory_cache_thrash_create(), sorcery_memory_cache_thrash_destroy(), sorcery_memory_cache_thrash_start(), sorcery_memory_cache_thrash_stop(), start_resource(), start_resource_list(), stasis_app_playback_to_json(), stasis_cache_entry_get_remote(), stasis_forward_all(), stasis_forward_cancel(), stasis_show_topic(), stasis_state_add_subscriber(), stasis_subscription_decline_message_type(), stasis_subscription_is_subscribed(), stasis_topic_subscribers(), state_dtor(), state_find_and_remove_eid(), state_find_or_add_eid(), statistics_show_messages(), subscriber_dtor(), subscription_invoke(), t38_reinvite_response_cb(), test_is_media_state_equal(), topic_add_subscription(), topic_dtor(), topic_remove_subscription(), transport_monitor_dtor(), transport_monitor_unregister_cb(), transport_state_do_reg_callbacks(), tree_node_destroy(), unload_module(), vec_contact_add(), verify_bad_headers(), verify_user_event_fields(), and wait_for_device_state_updates().
#define AST_VECTOR_SORT | ( | vec, | |
cmp | |||
) |
Sort a vector in-place.
vec | Vector to sort |
cmp | A memcmp compatible compare function |
Definition at line 396 of file vector.h.
Referenced by moh_scan_files().
#define AST_VECTOR_STEAL_ELEMENTS | ( | vec | ) |
Steal the elements from a vector and reinitialize.
vec | Vector to operate on. |
This allows you to use vector.h to construct a list and use the data as a bare array.
Definition at line 140 of file vector.h.
Referenced by ast_cli_completion_matches(), control_next_app_args(), and set_outbound_authentication_credentials().
Options to override default processing of ast_vector_string_split.
Enumerator | |
---|---|
AST_VECTOR_STRING_SPLIT_NO_TRIM | Do not trim whitespace from values. |
AST_VECTOR_STRING_SPLIT_ALLOW_EMPTY | Append empty strings to the vector. |
Definition at line 59 of file vector.h.
AST_VECTOR | ( | ast_vector_int | , |
int | |||
) |
Integer vector definition.
AST_VECTOR | ( | ast_vector_string | , |
char * | |||
) |
String vector definitions.
AST_VECTOR | ( | ast_vector_const_string | , |
const char * | |||
) |
int ast_vector_string_split | ( | struct ast_vector_string * | dest, |
const char * | input, | ||
const char * | delim, | ||
int | flags, | ||
int(*)(const char *s1, const char *s2) | excludes_cmp | ||
) |
Append a string vector by splitting a string.
dest | Pointer to an initialized vector. |
input | String buffer to split. |
delim | String delimeter passed to strsep. |
flags | Processing options defined by enum ast_vector_string_split_flags. |
excludes_cmp | NULL or a function like strcmp to exclude duplicate strings. |
0 | Success |
-1 | Failure |
Definition at line 393 of file strings.c.
References ast_assert, ast_free, ast_strdup, ast_strdupa, ast_strip(), ast_strlen_zero, AST_VECTOR_APPEND, AST_VECTOR_GET_CMP, AST_VECTOR_STRING_SPLIT_ALLOW_EMPTY, AST_VECTOR_STRING_SPLIT_NO_TRIM, buf, NULL, and strsep().
Referenced by module_post_register().