#include <stdlib.h>
#include <string.h>
#include <amxc/amxc.h>
#include <amxp/amxp.h>
#include <amxd/amxd_dm.h>
#include <amxd/amxd_object.h>
#include <amxd/amxd_object_function.h>
#include <amxb/amxb_be.h>
#include <amxo/amxo.h>
#include "dummy_be.h"
#include <amxc/amxc_macros.h>
Go to the source code of this file.
◆ amxb_dummy_capabilities()
static uint32_t amxb_dummy_capabilities |
( |
UNUSED void *const |
ctx | ) |
|
|
static |
◆ amxb_dummy_connect()
static void* amxb_dummy_connect |
( |
UNUSED const char * |
host, |
|
|
UNUSED const char * |
port, |
|
|
UNUSED const char * |
path, |
|
|
UNUSED amxp_signal_mngr_t * |
sigmngr |
|
) |
| |
|
static |
Definition at line 72 of file dummy_be.c.
static amxd_dm_t remote_dm
static amxo_parser_t parser
◆ amxb_dummy_disconnect()
static int amxb_dummy_disconnect |
( |
UNUSED void * |
ctx | ) |
|
|
static |
◆ amxb_dummy_free()
static void amxb_dummy_free |
( |
UNUSED void * |
ctx | ) |
|
|
static |
◆ amxb_dummy_has()
static bool amxb_dummy_has |
( |
UNUSED void *const |
ctx, |
|
|
const char * |
object |
|
) |
| |
|
static |
◆ amxb_dummy_invoke()
static int amxb_dummy_invoke |
( |
UNUSED void *const |
ctx, |
|
|
amxb_invoke_t * |
invoke_ctx, |
|
|
amxc_var_t * |
args, |
|
|
amxb_request_t * |
request, |
|
|
UNUSED int |
timeout |
|
) |
| |
|
static |
Definition at line 86 of file dummy_be.c.
92 amxc_var_t empty_args;
93 amxc_var_t* return_value = NULL;
94 amxd_object_t* obj = NULL;
97 amxc_var_init(&empty_args);
98 amxc_var_set_type(&empty_args, AMXC_VAR_ID_HTABLE);
99 amxc_var_set_type(request->
result, AMXC_VAR_ID_LIST);
105 return_value = amxc_var_add_new(request->
result);
109 rv = amxd_object_invoke_function(obj, invoke_ctx->
method, args, return_value);
112 amxc_var_clean(&empty_args);
#define AMXB_ERROR_BUS_NOT_FOUND
◆ amxb_dummy_register()
static int amxb_dummy_register |
( |
UNUSED void *const |
ctx, |
|
|
UNUSED amxd_dm_t *const |
dm |
|
) |
| |
|
static |
◆ test_load_dummy_remote()
int test_load_dummy_remote |
( |
const char * |
odl | ) |
|
Definition at line 191 of file dummy_be.c.
192 amxd_object_t* root_obj = amxd_dm_get_root(&
remote_dm);
194 return amxo_parser_parse_file(&
parser, odl, root_obj);
◆ test_register_dummy_be()
int test_register_dummy_be |
( |
void |
| ) |
|
Definition at line 183 of file dummy_be.c.
static amxb_be_funcs_t amxb_dummy_impl
int amxb_be_register(amxb_be_funcs_t *const funcs)
Registers backend interface.
◆ test_set_dummy_caps()
void test_set_dummy_caps |
( |
uint32_t |
dummy_caps | ) |
|
◆ test_unregister_dummy_be()
int test_unregister_dummy_be |
( |
void |
| ) |
|
Definition at line 187 of file dummy_be.c.
int amxb_be_unregister(amxb_be_funcs_t *const funcs)
Unregisters a backend interface.
◆ amxb_dummy_be_info
Initial value:= {
.name = "dummy",
.description = "AMXB Dummy Backend for testing",
}
static amxb_version_t dummy_be_version
static amxb_version_t sup_max_lib_version
static amxb_version_t sup_min_lib_version
Definition at line 174 of file dummy_be.c.
◆ amxb_dummy_impl
Initial value:= {
.get_fd = NULL,
.read = NULL,
.async_invoke = NULL,
.wait_request = NULL,
.close_request = NULL,
.subscribe = NULL,
.unsubscribe = NULL,
.name = "dummy",
}
struct _amxb_be_funcs amxb_be_funcs_t
static void amxb_dummy_free(UNUSED void *ctx)
static int amxb_dummy_disconnect(UNUSED void *ctx)
static uint32_t amxb_dummy_capabilities(UNUSED void *const ctx)
static int amxb_dummy_register(UNUSED void *const ctx, UNUSED amxd_dm_t *const dm)
static bool amxb_dummy_has(UNUSED void *const ctx, const char *object)
static int amxb_dummy_invoke(UNUSED void *const ctx, amxb_invoke_t *invoke_ctx, amxc_var_t *args, amxb_request_t *request, UNUSED int timeout)
static void * amxb_dummy_connect(UNUSED const char *host, UNUSED const char *port, UNUSED const char *path, UNUSED amxp_signal_mngr_t *sigmngr)
Definition at line 137 of file dummy_be.c.
◆ caps
◆ dummy_be_version
Initial value:= {
.major = 0,
.minor = 0,
.build = 0,
}
Definition at line 168 of file dummy_be.c.
◆ parser
◆ remote_dm
◆ sup_max_lib_version
Initial value:= {
.major = 2,
.minor = -1,
.build = -1
}
Definition at line 162 of file dummy_be.c.
◆ sup_min_lib_version
Initial value:= {
.major = 2,
.minor = 0,
.build = -1
}
Definition at line 156 of file dummy_be.c.