36 static int retrieve_parked_user_targeted(
void *obj,
void *arg,
int flags)
47 static int parking_lot_search_context_extension_inuse(
void *obj,
void *arg,
int flags)
87 exten = strsep(&context,
"@");
89 if (ast_strlen_zero(context) || ast_strlen_zero(exten)) {
93 search.context = context;
94 if (sscanf(exten,
"%d", &search.exten) != 1) {
98 ast_debug(4,
"Checking state of exten %d in context %s\n", search.exten, context);
100 lot =
ao2_callback(global_lots, 0, parking_lot_search_context_extension_inuse, &data);
110 ast_debug(4,
"Notification of state change to metermaids %d@%s\n to state '%s'\n",
const char * ast_devstate2str(enum ast_device_state devstate) attribute_pure
Convert device state to text string for output.
ast_device_state
Device States.
Asterisk main include file. File version handling, generic pbx functions.
void parking_notify_metermaids(int exten, const char *context, enum ast_device_state state)
Notify metermaids that we've changed an extension.
struct ao2_container * parked_users
#define ao2_callback(c, flags, cb_fn, arg)
ao2_callback() is a generic function that applies cb_fn() to all objects in a container, as described below.
int ast_devstate_prov_del(const char *label)
Remove device state provider.
int ast_devstate_prov_add(const char *label, ast_devstate_prov_cb_type callback)
Add device state provider.
struct ao2_container * get_parking_lot_container(void)
Get a pointer to the parking lot container for purposes such as iteration.
void unload_parking_devstate(void)
Unregister Parking devstate handler.
int ast_devstate_changed(enum ast_device_state state, enum ast_devstate_cache cachable, const char *fmt,...)
Tells Asterisk the State for Device is changed.
const ast_string_field parking_con
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ast_debug(level,...)
Log a DEBUG message.
enum park_call_resolution resolution
Support for logging to various files, console and syslog Configuration in file logger.conf.
structure to hold users read from users.conf
int load_parking_devstate(void)
Register Parking devstate handler.
Call Parking Resource Internal API.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
struct parking_lot_cfg * cfg