aboutsummaryrefslogtreecommitdiff
path: root/client-protocol.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-06-23 12:22:18 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-23 13:12:08 +0000
commit136d60606a1e01eb68ed984de63b7a55f8966075 (patch)
treed0fa63928b6be3defeecb32afdb0c96e5dfdfc79 /client-protocol.h
parentserver: use config_clone() + config_override_apply() (diff)
client: send overrides for everything that is publicly visible in the conf
Send a generic “overrides” list to the server, containing options in text, on the format “section.key=value”. This reduces the size of the base client/server protocol packet, as well as opens up for a generic -o,--override command line option (not yet implemented).
Diffstat (limited to 'client-protocol.h')
-rw-r--r--client-protocol.h29
1 files changed, 10 insertions, 19 deletions
diff --git a/client-protocol.h b/client-protocol.h
index 663199c9..c1291f28 100644
--- a/client-protocol.h
+++ b/client-protocol.h
@@ -4,32 +4,23 @@
#include <stdbool.h>
#include <stddef.h>
-struct client_argv {
+struct client_string {
uint16_t len;
- /* char arg[static len]; */
+ /* char str[static len]; */
};
struct client_data {
- unsigned width;
- unsigned height;
- uint8_t size_type:1; // Values correspond to enum conf_size_type
- uint8_t maximized:1;
- uint8_t fullscreen:1;
- uint8_t hold:1;
- uint8_t login_shell:1;
- uint8_t no_wait:1;
+ bool hold:1;
+ bool no_wait:1;
+ uint8_t reserved:6;
uint16_t cwd_len;
- uint16_t term_len;
- uint16_t title_len;
- uint16_t app_id_len;
-
+ uint16_t override_count;
uint16_t argc;
/* char cwd[static cwd_len]; */
- /* char term[static term_len]; */
- /* char title[static title_len]; */
- /* char app_id[static app_id_len]; */
+ /* struct client_string overrides[static override_count]; */
+ /* struct client_string argv[static argc]; */
+} __attribute__((packed));
- /* struct client_argv argv[static argc]; */
-};
+_Static_assert(sizeof(struct client_data) == 7, "protocol struct size error");