ubus/lua: pass notification name to callback
[project/ubus.git] / ubusd.h
diff --git a/ubusd.h b/ubusd.h
index 32fe852..4d87920 100644 (file)
--- a/ubusd.h
+++ b/ubusd.h
@@ -39,6 +39,7 @@ struct ubus_msg_buf {
 struct ubus_client {
        struct ubus_id id;
        struct uloop_fd sock;
 struct ubus_client {
        struct ubus_id id;
        struct uloop_fd sock;
+       struct blob_buf b;
 
        uid_t uid;
        gid_t gid;
 
        uid_t uid;
        gid_t gid;
@@ -51,6 +52,7 @@ struct ubus_client {
        unsigned int txq_cur, txq_tail, txq_ofs;
 
        struct ubus_msg_buf *pending_msg;
        unsigned int txq_cur, txq_tail, txq_ofs;
 
        struct ubus_msg_buf *pending_msg;
+       struct ubus_msg_buf *retmsg;
        int pending_msg_offset;
        int pending_msg_fd;
        struct {
        int pending_msg_offset;
        int pending_msg_fd;
        struct {
@@ -64,8 +66,10 @@ struct ubus_path {
        const char name[];
 };
 
        const char name[];
 };
 
+extern const char *ubusd_acl_dir;
+
 struct ubus_msg_buf *ubus_msg_new(void *data, int len, bool shared);
 struct ubus_msg_buf *ubus_msg_new(void *data, int len, bool shared);
-void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub, bool free);
+void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub);
 void ubus_msg_free(struct ubus_msg_buf *ub);
 struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
 
 void ubus_msg_free(struct ubus_msg_buf *ub);
 struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
 
@@ -84,4 +88,8 @@ int ubusd_send_event(struct ubus_client *cl, const char *id,
 
 void ubusd_acl_init(void);
 
 
 void ubusd_acl_init(void);
 
+void ubusd_monitor_init(void);
+void ubusd_monitor_message(struct ubus_client *cl, struct ubus_msg_buf *ub, bool send);
+void ubusd_monitor_disconnect(struct ubus_client *cl);
+
 #endif
 #endif