Amxb_Ubus
3.3.1
Ambiorix Ubus API
|
#include <libubus.h>
#include <libubox/blob.h>
#include <libubox/uloop.h>
#include <libubox/usock.h>
#include <libubox/list.h>
#include <amxc/amxc_macros.h>
#include <amxc/amxc.h>
#include <amxp/amxp.h>
#include <amxd/amxd_dm.h>
#include <amxd/amxd_object.h>
#include <amxd/amxd_function.h>
#include <amxd/amxd_path.h>
#include <amxb/amxb.h>
#include <amxb/amxb_be_intf.h>
Go to the source code of this file.
Data Structures | |
struct | _amxb_ubus_sub |
struct | _amxb_ubus |
struct | _amxb_ubus_object |
struct | _amxb_ubus_request |
Typedefs | |
typedef struct _amxb_ubus_sub | amxb_ubus_sub_t |
typedef struct _amxb_ubus | amxb_ubus_t |
typedef struct _amxb_ubus_object | amxb_ubus_object_t |
typedef struct _amxb_ubus_request | amxb_ubus_request_t |
Functions | |
amxb_be_info_t * | amxb_be_info (void) |
int PRIVATE | amxb_ubus_parse_blob (amxc_var_t *var, struct blob_attr *attr, bool table) |
int PRIVATE | amxb_ubus_parse_blob_table (amxc_var_t *var, struct blob_attr *attr, int len) |
int PRIVATE | amxb_ubus_parse_blob_array (amxc_var_t *var, struct blob_attr *attr, int len) |
int PRIVATE | amxb_ubus_format_blob (amxc_var_t *data, const char *key, struct blob_buf *b) |
int PRIVATE | amxb_ubus_format_blob_table (const amxc_htable_t *table, struct blob_buf *b) |
int PRIVATE | amxb_ubus_format_blob_array (const amxc_llist_t *list, struct blob_buf *b) |
int PRIVATE | amxb_ubus_get_longest_path (amxb_ubus_t *amxb_ubus_ctx, amxd_path_t *path, amxc_string_t *rel_path) |
void PRIVATE | amxb_ubus_result_data (struct ubus_request *req, int type, struct blob_attr *msg) |
int PRIVATE | amxb_ubus_invoke_base (amxb_ubus_t *amxb_ubus_ctx, const char *object, amxc_var_t *args, amxb_request_t *request, uint32_t *id) |
void *PRIVATE | amxb_ubus_connect (const char *host, const char *port, const char *path, amxp_signal_mngr_t *sigmngr) |
int PRIVATE | amxb_ubus_disconnect (void *ctx) |
int PRIVATE | amxb_ubus_get_fd (void *ctx) |
int PRIVATE | amxb_ubus_read (void *ctx) |
void PRIVATE | amxb_ubus_free (void *ctx) |
int PRIVATE | amxb_ubus_invoke (void *const ctx, amxb_invoke_t *invoke_ctx, amxc_var_t *args, amxb_request_t *request, int timeout) |
int PRIVATE | amxb_ubus_async_invoke (void *const ctx, amxb_invoke_t *invoke_ctx, amxc_var_t *args, amxb_request_t *request) |
int PRIVATE | amxb_ubus_wait_request (void *const ctx, amxb_request_t *request, int timeout) |
int PRIVATE | amxb_ubus_close_request (void *const ctx, amxb_request_t *request) |
int PRIVATE | amxb_ubus_subscribe (void *const ctx, const char *object) |
int PRIVATE | amxb_ubus_unsubscribe (void *const ctx, const char *object) |
int PRIVATE | amxb_ubus_register (void *const ctx, amxd_dm_t *const dm) |
void PRIVATE | amxb_ubus_cancel_requests (amxb_ubus_t *amxb_ubus_ctx) |
void PRIVATE | amxb_ubus_obj_it_free (amxc_llist_it_t *it) |
int PRIVATE | amxb_ubus_list (void *const bus_ctx, const char *object, uint32_t flags, uint32_t access, amxb_request_t *request) |
const amxc_var_t * | amxb_ubus_get_config_option (const char *name) |
typedef struct _amxb_ubus_object amxb_ubus_object_t |
typedef struct _amxb_ubus_request amxb_ubus_request_t |
typedef struct _amxb_ubus_sub amxb_ubus_sub_t |
typedef struct _amxb_ubus amxb_ubus_t |
amxb_be_info_t* amxb_be_info | ( | void | ) |
int PRIVATE amxb_ubus_async_invoke | ( | void *const | ctx, |
amxb_invoke_t * | invoke_ctx, | ||
amxc_var_t * | args, | ||
amxb_request_t * | request | ||
) |
Definition at line 405 of file amxb_ubus_invoke.c.
void PRIVATE amxb_ubus_cancel_requests | ( | amxb_ubus_t * | amxb_ubus_ctx | ) |
Definition at line 592 of file amxb_ubus_register.c.
int PRIVATE amxb_ubus_close_request | ( | void *const | ctx, |
amxb_request_t * | request | ||
) |
Definition at line 475 of file amxb_ubus_invoke.c.
void* PRIVATE amxb_ubus_connect | ( | const char * | host, |
const char * | port, | ||
const char * | path, | ||
amxp_signal_mngr_t * | sigmngr | ||
) |
Definition at line 222 of file amxb_ubus.c.
int PRIVATE amxb_ubus_disconnect | ( | void * | ctx | ) |
Definition at line 262 of file amxb_ubus.c.
int PRIVATE amxb_ubus_format_blob | ( | amxc_var_t * | data, |
const char * | key, | ||
struct blob_buf * | b | ||
) |
Definition at line 166 of file amxb_ubus_blob.c.
int PRIVATE amxb_ubus_format_blob_array | ( | const amxc_llist_t * | list, |
struct blob_buf * | b | ||
) |
Definition at line 265 of file amxb_ubus_blob.c.
int PRIVATE amxb_ubus_format_blob_table | ( | const amxc_htable_t * | table, |
struct blob_buf * | b | ||
) |
Definition at line 249 of file amxb_ubus_blob.c.
void PRIVATE amxb_ubus_free | ( | void * | ctx | ) |
Definition at line 316 of file amxb_ubus.c.
const amxc_var_t* amxb_ubus_get_config_option | ( | const char * | name | ) |
Definition at line 218 of file amxb_ubus.c.
int PRIVATE amxb_ubus_get_fd | ( | void * | ctx | ) |
int PRIVATE amxb_ubus_get_longest_path | ( | amxb_ubus_t * | amxb_ubus_ctx, |
amxd_path_t * | path, | ||
amxc_string_t * | rel_path | ||
) |
int PRIVATE amxb_ubus_invoke | ( | void *const | ctx, |
amxb_invoke_t * | invoke_ctx, | ||
amxc_var_t * | args, | ||
amxb_request_t * | request, | ||
int | timeout | ||
) |
Definition at line 331 of file amxb_ubus_invoke.c.
int PRIVATE amxb_ubus_invoke_base | ( | amxb_ubus_t * | amxb_ubus_ctx, |
const char * | object, | ||
amxc_var_t * | args, | ||
amxb_request_t * | request, | ||
uint32_t * | id | ||
) |
Definition at line 303 of file amxb_ubus_invoke.c.
int PRIVATE amxb_ubus_list | ( | void *const | bus_ctx, |
const char * | object, | ||
uint32_t | flags, | ||
uint32_t | access, | ||
amxb_request_t * | request | ||
) |
Definition at line 332 of file amxb_ubus_list.c.
void PRIVATE amxb_ubus_obj_it_free | ( | amxc_llist_it_t * | it | ) |
Definition at line 614 of file amxb_ubus_register.c.
int PRIVATE amxb_ubus_parse_blob | ( | amxc_var_t * | var, |
struct blob_attr * | attr, | ||
bool | table | ||
) |
Definition at line 111 of file amxb_ubus_blob.c.
int PRIVATE amxb_ubus_parse_blob_array | ( | amxc_var_t * | var, |
struct blob_attr * | attr, | ||
int | len | ||
) |
Definition at line 152 of file amxb_ubus_blob.c.
int PRIVATE amxb_ubus_parse_blob_table | ( | amxc_var_t * | var, |
struct blob_attr * | attr, | ||
int | len | ||
) |
Definition at line 138 of file amxb_ubus_blob.c.
int PRIVATE amxb_ubus_read | ( | void * | ctx | ) |
Definition at line 295 of file amxb_ubus.c.
int PRIVATE amxb_ubus_register | ( | void *const | ctx, |
amxd_dm_t *const | dm | ||
) |
Definition at line 639 of file amxb_ubus_register.c.
void PRIVATE amxb_ubus_result_data | ( | struct ubus_request * | req, |
int | type, | ||
struct blob_attr * | msg | ||
) |
int PRIVATE amxb_ubus_subscribe | ( | void *const | ctx, |
const char * | object | ||
) |
Definition at line 95 of file amxb_ubus_subscribe.c.
int PRIVATE amxb_ubus_unsubscribe | ( | void *const | ctx, |
const char * | object | ||
) |
int PRIVATE amxb_ubus_wait_request | ( | void *const | ctx, |
amxb_request_t * | request, | ||
int | timeout | ||
) |