summaryrefslogtreecommitdiffstats
path: root/init/init.h
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan <badhri@google.com>2014-10-10 23:19:06 -0700
committerBadhri Jagan Sridharan <badhri@google.com>2014-10-20 13:05:56 -0700
commit162f7d797c67019a7a3f08c3b0f0ffc91d548ddc (patch)
tree85cd88612c2dfa6f5434ca92e27f06af0d61bb5f /init/init.h
parent6d463a5f418af07bf484d356e5a3360b2632938d (diff)
downloadsystem_core-162f7d797c67019a7a3f08c3b0f0ffc91d548ddc.zip
system_core-162f7d797c67019a7a3f08c3b0f0ffc91d548ddc.tar.gz
system_core-162f7d797c67019a7a3f08c3b0f0ffc91d548ddc.tar.bz2
init: Add support "&&" operator in property triggers
"&&" operator can now be used to test the validity of two of more properties. For example: on property:test.a=1 && property:test.b=1 setprop test.c 1 The above stub sets the test.c to 1 only when both test.a=1 and test.b=1 Change-Id: I72c19f7aa92231372a416193618ee6c7fd368141 Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Diffstat (limited to 'init/init.h')
-rw-r--r--init/init.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/init/init.h b/init/init.h
index a7615a3..e03bd53 100644
--- a/init/init.h
+++ b/init/init.h
@@ -37,6 +37,11 @@ struct command
char *args[1];
};
+struct trigger {
+ struct listnode nlist;
+ const char *name;
+};
+
struct action {
/* node in list of all actions */
struct listnode alist;
@@ -46,12 +51,15 @@ struct action {
struct listnode tlist;
unsigned hash;
- const char *name;
+ /* list of actions which triggers the commands*/
+ struct listnode triggers;
struct listnode commands;
struct command *current;
};
+void build_triggers_string(char *name_str, int length, struct action *cur_action);
+
struct socketinfo {
struct socketinfo *next;
const char *name;