From cc3f33db7a8d3c4ad373e646b199808e01bc5d9b Mon Sep 17 00:00:00 2001 From: sss Date: Tue, 17 Jan 2023 00:38:19 +0300 Subject: added webrdp public code --- src/core/include/webrdp_api_utils.h | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/core/include/webrdp_api_utils.h (limited to 'src/core/include/webrdp_api_utils.h') diff --git a/src/core/include/webrdp_api_utils.h b/src/core/include/webrdp_api_utils.h new file mode 100644 index 0000000..170ca2b --- /dev/null +++ b/src/core/include/webrdp_api_utils.h @@ -0,0 +1,43 @@ +#pragma once + +typedef enum +{ + wrdp_log_level_error, + wrdp_log_level_warning, + wrdp_log_level_info, + wrdp_log_level_debug, + wrdp_log_level_trace +} wrdp_log_level_e; + +static const uint16_t wrdp_log_flag_binary = 0x0001; + +typedef struct _log_msg_info +{ + /* message buffer: + * containing message which will be displayed + * + * mandatory parameter */ + const uint8_t *buf; + + /* message size: + * size of message in buiffer which must be displayed + * + * optional in case of null terminated string, mandatory otherwise */ + size_t buf_size; + + /* log level for this message + * + * optional, default is 'wrdp_log_level_error' */ + wrdp_log_level_e level; + + /* message flags: + * currently supported flags is: + * 'wrdp_log_flag_binary': print message as hex data + * optional, default is plain text */ + uint16_t flags; + + /* pointers to various data structures which may be usefule + * during debugging + * optional */ + void *task_info, *wrdp_thpool_task, *ws_session; +} log_msg_info; -- cgit v1.2.3