summaryrefslogtreecommitdiffstats
path: root/door_lock/cmd.h
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2024-11-06 13:02:18 +0800
committerSadeep Madurange <sadeep@asciimx.com>2024-11-06 13:02:18 +0800
commit7327d5e93e0386914dbe712f8f82e2d015ad7029 (patch)
tree72b9cb669a43ed4ee8ff3b8924c7c3f32b65ccd5 /door_lock/cmd.h
parentbe35226d9ebbe3679c38c118a3c7bff34e04c10b (diff)
downloadsmart-home-7327d5e93e0386914dbe712f8f82e2d015ad7029.tar.gz
USe enum for commands.
Diffstat (limited to 'door_lock/cmd.h')
-rw-r--r--door_lock/cmd.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/door_lock/cmd.h b/door_lock/cmd.h
index de9d4b0..c31f197 100644
--- a/door_lock/cmd.h
+++ b/door_lock/cmd.h
@@ -1,8 +1,13 @@
#ifndef SA_CMD_H
#define SA_CMD_H
-int is_ulock_cmd(const char *s);
+enum command {
+ DOOR_LOCK,
+ DOOR_UNLOCK
+};
-char * get_encrypted_ulock_cmd(void);
+int is_valid_cmd(const char *s, enum command c);
+
+char * get_cmd_hash(enum command c);
#endif /* SA_CMD_H */