summaryrefslogtreecommitdiff
path: root/src/core/include/webrdp_api_utils.h
blob: 170ca2be7eeaafe8dca8b127c6a110e8ae1b1949 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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;