diff options
author | Mattias Andrée <maandree@kth.se> | 2020-06-20 20:57:49 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-06-20 20:57:49 +0200 |
commit | f9d0ddbf9024aa434898bb90a640cc45ce35a95f (patch) | |
tree | fa1945d8facbda91db1ec87915ba26ee7e6a1e2a /libaxl.h | |
parent | Misc. (diff) | |
download | libaxl-f9d0ddbf9024aa434898bb90a640cc45ce35a95f.tar.gz libaxl-f9d0ddbf9024aa434898bb90a640cc45ce35a95f.tar.bz2 libaxl-f9d0ddbf9024aa434898bb90a640cc45ce35a95f.tar.xz |
Add LIBAXL_SYNTHETIC_EVENT_BIT
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libaxl.h')
-rw-r--r-- | libaxl.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -50,14 +50,22 @@ typedef struct libaxl_context LIBAXL_CONTEXT; /* TODO man */ #define LIBAXL_ERROR_INVALID_HANDSHAKE_RESPONSE -12 #define LIBAXL_ERROR_OUT_OF_RESOURCE_IDS -13 #define LIBAXL_ERROR_PROTOCOL_NOT_SUPPORTED -14 +#define LIBAXL_ERROR_USER_DOES_NOT_EXIST -15 +#define LIBAXL_ERROR_USER_DOES_NOT_HAVE_A_HOME -16 -union libaxl_input { /* TODO doc, man */ +union libaxl_input { /* TODO doc, man (also LIBAXL_SYNTHETIC_EVENT_BIT) */ uint8_t type; union libaxl_error error; /* if .type = LIBAXL_ERROR */ union libaxl_reply reply; /* if .type = LIBAXL_REPLY */ union libaxl_event event; /* otherwise (.type = event type) */ }; +/** + * Bit that is set in `.type` of `union libaxl_input` if the + * event a synthetic event. + */ +#define LIBAXL_SYNTHETIC_EVENT_BIT 0x80U + _LIBAXL_GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__))) LIBAXL_CONNECTION *libaxl_connect(const char *restrict, char **restrict); /* TODO man doc */ |