summaryrefslogtreecommitdiff
path: root/src/rdp/rdp_clipboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rdp/rdp_clipboard.h')
-rw-r--r--src/rdp/rdp_clipboard.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/rdp/rdp_clipboard.h b/src/rdp/rdp_clipboard.h
new file mode 100644
index 0000000..1536a2c
--- /dev/null
+++ b/src/rdp/rdp_clipboard.h
@@ -0,0 +1,52 @@
+/* BSD-2-Clause license
+ *
+ * Copyright (c) 2018-2023 NST <www.newinfosec.ru>, sss <sss at dark-alexandr dot net>.
+ *
+ */
+
+#pragma once
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#include "webrdp_core_api.h"
+#include "webrdp_module_api.h"
+#include "rdp_backend_api.h"
+#include "rdp_impl.h"
+
+typedef struct
+{
+ CLIPRDR_FORMAT rdp_fmt;
+ wrdp_enum_clip_format my_fmt;
+} my_clip_format;
+
+typedef struct
+{
+ uint32_t file_id;
+ uint64_t file_size;
+} file_list_cache_entry;
+
+struct my_rdp_clipboard_s
+{
+ wClipboard *clipboard;
+ CliprdrClientContext *clip_context;
+ my_rdp_context *my_rdp_context;
+ wClipboardDelegate *delegate;
+ bool streams_supported;
+ uint8_t *data_raw;
+ /* we need to cache server side format list to know dynamic format id */
+ my_clip_format *srv_fmts, cli_req_fmt_id, srv_req_fmt_id;
+ uint8_t srv_fmts_count;
+ file_list_cache_entry *client_filelist_cache;
+
+ rdp_internals *my_internals;
+};
+
+my_rdp_clipboard *rdp_clipboard_new(my_rdp_context *context);
+
+void rdp_cliprdr_init(my_rdp_context *ctx, CliprdrClientContext *cliprdr);
+
+void rdp_cliprdr_uninit(my_rdp_context *ctx, CliprdrClientContext *cliprdr);
+
+void register_clipboard(wrdp_backend_module *backend);