90 int retval = amxd_status_unknown_error;
93 when_true(amxc_var_type_of(values) != AMXC_VAR_ID_HTABLE &&
94 !amxc_var_is_null(values), exit);
95 when_true(amxc_var_type_of(ovalues) != AMXC_VAR_ID_HTABLE &&
96 !amxc_var_is_null(ovalues), exit);
98 amxc_var_set_type(&args, AMXC_VAR_ID_HTABLE);
99 if((rel_path != NULL) && (*rel_path != 0)) {
100 amxc_var_add_key(cstring_t, &args,
"rel_path", rel_path);
102 amxc_var_add_key(uint32_t, &args,
"access",
bus_ctx->
access);
104 params = amxc_var_add_key(amxc_htable_t, &args,
"parameters", NULL);
105 amxc_var_move(params, values);
107 if(ovalues != NULL) {
108 params = amxc_var_add_key(amxc_htable_t, &args,
"oparameters", NULL);
109 amxc_var_move(params, ovalues);
113 amxc_var_add_key(
bool, &args,
"allow_partial",
true);
117 when_failed(retval, exit);
118 retval =
amxb_invoke(invoke_ctx, &args, ret, NULL, NULL, timeout);
119 when_failed(retval, exit);
123 amxc_var_clean(&args);
#define AMXB_FLAG_PARTIAL
int amxb_new_invoke(amxb_invoke_t **invoke_ctx, amxb_bus_ctx_t *const ctx, const char *object, const char *interface, const char *method)
Prepares a remote function invocation.
void amxb_free_invoke(amxb_invoke_t **invoke_ctx)
Deletes a function invoke context, and frees allocated memory.
int amxb_invoke(amxb_invoke_t *invoke_ctx, amxc_var_t *args, amxc_var_t *ret, amxb_be_cb_fn_t fn, void *priv, int timeout)
Invokes a remote function, as defined by the function invoke context.
static amxb_bus_ctx_t * bus_ctx