X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=libubus.h;h=19a421779c560eff922b036f957d741dbb8b7e7a;hp=17c49527095dc09084daf6b2e458a496e22f87b7;hb=a69f062cbd4041229f8d29ef9647bf783df414c1;hpb=d366a6de839087d8a17e5855c14ae55e95b13c65 diff --git a/libubus.h b/libubus.h index 17c4952..19a4217 100644 --- a/libubus.h +++ b/libubus.h @@ -37,6 +37,7 @@ typedef void (*ubus_lookup_handler_t)(struct ubus_context *ctx, 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_state_handler_t)(struct ubus_context *ctx, struct ubus_object *obj); typedef void (*ubus_remove_handler_t)(struct ubus_context *ctx, struct ubus_subscriber *obj, uint32_t id); typedef void (*ubus_event_handler_t)(struct ubus_context *ctx, struct ubus_event_handler *ev, @@ -86,6 +87,9 @@ struct ubus_object { const char *path; struct ubus_object_type *type; + ubus_state_handler_t subscribe_cb; + bool has_subscribers; + const struct ubus_method *methods; int n_methods; }; @@ -134,6 +138,7 @@ struct ubus_request_data { uint32_t peer; uint32_t seq; bool deferred; + bool notify; }; struct ubus_request {