add blobmsg_list_move
[project/procd.git] / instance.h
1 #ifndef __PROCD_INSTANCE_H
2 #define __PROCD_INSTANCE_H
3
4 #include <libubox/vlist.h>
5 #include <libubox/uloop.h>
6
7 struct service_instance {
8 struct vlist_node node;
9 const char *name;
10
11 bool restart;
12 struct blob_attr *config;
13 struct uloop_process proc;
14 struct uloop_timeout timeout;
15 };
16
17 void instance_start(struct service_instance *in);
18 void instance_stop(struct service_instance *in, bool restart);
19 bool instance_update(struct service_instance *in, struct service_instance *in_new);
20 void instance_init(struct service_instance *in, struct blob_attr *config);
21 void instance_free(struct service_instance *in);
22
23 #endif