diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-01-31 17:18:10 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-01-31 17:18:10 +0100 |
commit | 1555e4610fe2f82419821a34d471dda874a8c885 (patch) | |
tree | 5a543f518fff59b655b2c55f4c57baf4dea00e63 /libubus.h | |
parent | 2e92ac29c178d00ab9235bc8151c29c632ee72ff (diff) | |
download | ubus-1555e4610fe2f82419821a34d471dda874a8c885.tar.gz |
add support for data replies
Diffstat (limited to 'libubus.h')
-rw-r--r-- | libubus.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -6,12 +6,13 @@ #include "ubusmsg.h" #include "ubus_common.h" +struct ubus_context; struct ubus_msg_src; struct ubus_object; struct ubus_request; struct ubus_request_data; -typedef int (*ubus_handler_t)(struct ubus_object *obj, +typedef int (*ubus_handler_t)(struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req, const char *method, struct blob_attr *msg); typedef void (*ubus_data_handler_t)(struct ubus_request *req, @@ -105,6 +106,7 @@ struct ubus_request { uint32_t peer; uint32_t seq; + ubus_data_handler_t raw_data_cb; ubus_data_handler_t data_cb; ubus_complete_handler_t complete_cb; @@ -152,4 +154,6 @@ void ubus_invoke_async(struct ubus_context *ctx, uint32_t obj, const char *metho /* make an object visible to remote connections */ int ubus_publish(struct ubus_context *ctx, struct ubus_object *obj); - +/* send a reply to an incoming object method call */ +int ubus_send_reply(struct ubus_context *ctx, struct ubus_request_data *req, + struct blob_attr *msg); |