projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lua: add a prototype for luaopen_ubus so that -Wmissing-declarations can be enabled
[project/ubus.git]
/
ubusd_obj.h
diff --git
a/ubusd_obj.h
b/ubusd_obj.h
index
83bc366
..
d0573f0
100644
(file)
--- a/
ubusd_obj.h
+++ b/
ubusd_obj.h
@@
-35,12
+35,20
@@
struct ubus_method {
struct blob_attr data[];
};
struct blob_attr data[];
};
+struct ubus_watch {
+ struct list_head watcher_list, watched_list;
+ struct ubus_object *watcher, *watched;
+ char method[];
+};
+
struct ubus_object {
struct ubus_id id;
struct list_head list;
struct list_head events;
struct ubus_object {
struct ubus_id id;
struct list_head list;
struct list_head events;
+ struct list_head watchers, watched;
+
struct ubus_object_type *type;
struct avl_node path;
struct ubus_object_type *type;
struct avl_node path;
@@
-48,6
+56,7
@@
struct ubus_object {
int (*recv_msg)(struct ubus_client *client, const char *method, struct blob_attr *msg);
int event_seen;
int (*recv_msg)(struct ubus_client *client, const char *method, struct blob_attr *msg);
int event_seen;
+ unsigned int invoke_seq;
};
struct ubus_object *ubusd_create_object(struct ubus_client *cl, struct blob_attr **attr);
};
struct ubus_object *ubusd_create_object(struct ubus_client *cl, struct blob_attr **attr);
@@
-67,4
+76,8
@@
static inline struct ubus_object *ubusd_find_object(uint32_t objid)
return obj;
}
return obj;
}
+void ubus_watch_new(struct ubus_object *obj, struct ubus_object *target, const char *method);
+void ubus_watch_free(struct ubus_watch *w);
+void ubus_proto_notify_watch(struct ubus_watch *w);
+
#endif
#endif