aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/maweb.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-09-18 23:44:36 +0200
committercbdev <cb@cbcdn.com>2019-09-18 23:44:36 +0200
commit079baff220a963c365ab8448c421e22e896caaf1 (patch)
tree62a1df5c72ee07fcfe9abec380bbc402be95efb7 /backends/maweb.h
parent82f6b03929315d65693155d3274a79d4a6285896 (diff)
downloadmidimonster-079baff220a963c365ab8448c421e22e896caaf1.tar.gz
midimonster-079baff220a963c365ab8448c421e22e896caaf1.tar.bz2
midimonster-079baff220a963c365ab8448c421e22e896caaf1.zip
Fix maweb command key handling
Diffstat (limited to 'backends/maweb.h')
-rw-r--r--backends/maweb.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/backends/maweb.h b/backends/maweb.h
index 3738367..b9de68f 100644
--- a/backends/maweb.h
+++ b/backends/maweb.h
@@ -25,8 +25,7 @@ typedef enum /*_maweb_channel_type*/ {
exec_button = 2, //gma: 0 dot: 0
exec_lower = 3, //gma: 1 dot: 1
exec_upper = 4, //gma: 2 dot: 0
- cmdline,
- cmdline_local
+ cmdline
} maweb_channel_type;
typedef enum /*_maweb_peer_type*/ {
@@ -43,6 +42,12 @@ typedef enum /*_ws_conn_state*/ {
ws_closed
} maweb_state;
+typedef enum /*_maweb_cmdline_mode*/ {
+ cmd_remote = 0,
+ cmd_console,
+ cmd_downgrade
+} maweb_cmdline_mode;
+
typedef enum /*_ws_frame_op*/ {
ws_text = 1,
ws_binary = 2,
@@ -50,6 +55,14 @@ typedef enum /*_ws_frame_op*/ {
ws_pong = 10
} maweb_operation;
+typedef struct {
+ char* name;
+ unsigned lua;
+ uint8_t press;
+ uint8_t release;
+ uint8_t auto_submit;
+} maweb_command_key;
+
typedef struct /*_maweb_channel*/ {
maweb_channel_type type;
uint16_t page;
@@ -73,6 +86,7 @@ typedef struct /*_maweb_instance_data*/ {
size_t channels;
maweb_channel_data* channel;
+ maweb_cmdline_mode cmdline;
int fd;
maweb_state state;