72 amxc_var_t* access = GET_ARG(args,
"access");
73 uint32_t iaccess = amxc_var_dyncast(uint32_t, access);
74 const char* invalid_args[] = {
79 for(
int i = 0; invalid_args[i] != NULL; i++) {
80 amxc_var_t* arg = GET_ARG(args, invalid_args[i]);
81 amxc_var_delete(&arg);
94 const char* rel_path = GET_CHAR(args,
"rel_path");
97 if((rel_path != NULL) && (*rel_path != 0)) {
118 amxc_var_t* var_rel_path = GET_ARG(args,
"rel_path");
119 const char* rel_path = GET_CHAR(var_rel_path, NULL);
120 amxc_var_t* exists = GET_ARG(args,
"exists");
123 amxc_var_take_it(var_rel_path);
124 if((rel_path != NULL) && (*rel_path != 0)) {
128 if((exists != NULL) && amxc_var_dyncast(
bool, exists)) {
130 amxc_var_set(
bool, ret,
object != NULL);
144 amxc_var_delete(&var_rel_path);
153 amxc_var_t* var_rel_path = GET_ARG(args,
"rel_path");
154 const char* rel_path = GET_CHAR(var_rel_path, NULL);
155 const char* method = GET_CHAR(args,
"method");
156 amxc_var_t* method_args = GET_ARG(args,
"args");
160 amxc_var_take_it(var_rel_path);
161 if((rel_path != NULL) && (*rel_path != 0)) {
167 if(amxc_var_is_null(method_args) ||
168 amxc_htable_is_empty(amxc_var_constcast(amxc_htable_t, method_args))) {
169 amxc_var_delete(&method_args);
175 amxc_var_delete(&var_rel_path);
Ambiorix Data Model API header file.
amxd_status_t amxd_dm_invoke_action(amxd_object_t *object, amxd_param_t *param, amxd_action_t reason, const amxc_var_t *const args, amxc_var_t *const retval)
amxd_status_t amxd_object_func_list(amxd_object_t *object, UNUSED amxd_function_t *func, amxc_var_t *args, amxc_var_t *ret)
void amxd_def_funcs_remove_args(amxc_var_t *args)
amxd_status_t amxd_object_func_describe(amxd_object_t *object, UNUSED amxd_function_t *func, amxc_var_t *args, amxc_var_t *ret)
amxd_status_t amxd_object_func_exec(amxd_object_t *object, UNUSED amxd_function_t *func, amxc_var_t *args, amxc_var_t *ret)
Ambiorix Data Model API header file.
Ambiorix path API header file.
Ambiorix Data Model API header file.
enum _amxd_status amxd_status_t
@ amxd_status_object_not_found
@ amxd_status_unknown_error
@ amxd_dm_access_protected
amxd_object_t * amxd_object_findf(amxd_object_t *object, const char *rel_path,...) __attribute__((format(printf
Find an object in the data model tree, starting from an object.
amxd_status_t amxd_object_invoke_function(amxd_object_t *const object, const char *func_name, amxc_var_t *const args, amxc_var_t *const ret)
Calls an object RPC method.