summaryrefslogtreecommitdiff
path: root/src/core/include/webrdp_api_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/include/webrdp_api_utils.h')
-rw-r--r--src/core/include/webrdp_api_utils.h43
1 files changed, 43 insertions, 0 deletions
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;