#include <unistd.h>
#include "libubus.h"
#include "libubus-internal.h"
Go to the source code of this file.
|
static void | ubus_process_unsubscribe (struct ubus_context *ctx, struct ubus_msghdr *hdr, struct ubus_object *obj, struct blob_attr **attrbuf, int fd) |
|
static void | ubus_process_notify (struct ubus_context *ctx, struct ubus_msghdr *hdr, struct ubus_object *obj, struct blob_attr **attrbuf, int fd) |
|
static void | ubus_process_invoke (struct ubus_context *ctx, struct ubus_msghdr *hdr, struct ubus_object *obj, struct blob_attr **attrbuf, int fd) |
|
void __hidden | ubus_process_obj_msg (struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd) |
|
static void | ubus_add_object_cb (struct ubus_request *req, int type, struct blob_attr *msg) |
|
static void | ubus_push_method_data (const struct ubus_method *m) |
|
static bool | ubus_push_object_type (const struct ubus_object_type *type) |
|
int | ubus_add_object (struct ubus_context *ctx, struct ubus_object *obj) |
|
static void | ubus_remove_object_cb (struct ubus_request *req, int type, struct blob_attr *msg) |
|
int | ubus_remove_object (struct ubus_context *ctx, struct ubus_object *obj) |
|
◆ ubus_add_object()
Definition at line 209 of file libubus-obj.c.
214 blob_buf_init(&
b, 0);
static struct ubus_context * ctx
int __hidden ubus_start_request(struct ubus_context *ctx, struct ubus_request *req, struct blob_attr *msg, int cmd, uint32_t peer)
static void ubus_add_object_cb(struct ubus_request *req, int type, struct blob_attr *msg)
static bool ubus_push_object_type(const struct ubus_object_type *type)
int ubus_complete_request(struct ubus_context *ctx, struct ubus_request *req, int req_timeout)
struct ubus_object_type * type
@ UBUS_STATUS_INVALID_ARGUMENT
◆ ubus_add_object_cb()
static void ubus_add_object_cb |
( |
struct ubus_request * |
req, |
|
|
int |
type, |
|
|
struct blob_attr * |
msg |
|
) |
| |
|
static |
Definition at line 160 of file libubus-obj.c.
173 obj->
avl.key = &obj->
id;
struct blob_attr ** ubus_parse_msg(struct blob_attr *msg, size_t len)
static struct blob_attr * attrbuf[UBUS_ATTR_MAX]
struct ubus_context * ctx
◆ ubus_process_invoke()
Definition at line 53 of file libubus-obj.c.
63 bool no_reply =
false;
86 for (method = 0; method < obj->
n_methods; method++)
void ubus_complete_deferred_request(struct ubus_context *ctx, struct ubus_request_data *req, int ret)
const struct ubus_method * methods
@ UBUS_STATUS_METHOD_NOT_FOUND
◆ ubus_process_notify()
Definition at line 39 of file libubus-obj.c.
ubus_state_handler_t subscribe_cb
◆ ubus_process_obj_msg()
Definition at line 115 of file libubus-obj.c.
118 struct ubus_object *,
struct blob_attr **,
int fd);
123 void *prev_data = NULL;
146 prev_data = buf->
data;
156 buf->
data = prev_data;
int(* cb)(struct ubus_context *ctx, int argc, char **argv)
static void ubus_process_notify(struct ubus_context *ctx, struct ubus_msghdr *hdr, struct ubus_object *obj, struct blob_attr **attrbuf, int fd)
static void ubus_process_invoke(struct ubus_context *ctx, struct ubus_msghdr *hdr, struct ubus_object *obj, struct blob_attr **attrbuf, int fd)
static void ubus_process_unsubscribe(struct ubus_context *ctx, struct ubus_msghdr *hdr, struct ubus_object *obj, struct blob_attr **attrbuf, int fd)
struct ubus_msghdr_buf msgbuf
◆ ubus_process_unsubscribe()
Definition at line 19 of file libubus-obj.c.
const struct ubus_method watch_method
ubus_remove_handler_t remove_cb
◆ ubus_push_method_data()
static void ubus_push_method_data |
( |
const struct ubus_method * |
m | ) |
|
|
static |
Definition at line 177 of file libubus-obj.c.
182 mtbl = blobmsg_open_table(&
b, m->
name);
185 if (m->
mask && !(m->
mask & (1 << i)))
191 blobmsg_close_table(&
b, mtbl);
const struct blobmsg_policy * policy
◆ ubus_push_object_type()
Definition at line 194 of file libubus-obj.c.
201 for (i = 0; i <
type->n_methods; i++)
204 blob_nest_end(&
b, s);
static void ubus_push_method_data(const struct ubus_method *m)
◆ ubus_remove_object()
Definition at line 256 of file libubus-obj.c.
261 blob_buf_init(&
b, 0);
static void ubus_remove_object_cb(struct ubus_request *req, int type, struct blob_attr *msg)
◆ ubus_remove_object_cb()
static void ubus_remove_object_cb |
( |
struct ubus_request * |
req, |
|
|
int |
type, |
|
|
struct blob_attr * |
msg |
|
) |
| |
|
static |