summaryrefslogtreecommitdiffstats
path: root/include/freerdp/client
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:24:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:24:41 +0000
commita9bcc81f821d7c66f623779fa5147e728eb3c388 (patch)
tree98676963bcdd537ae5908a067a8eb110b93486a6 /include/freerdp/client
parentInitial commit. (diff)
downloadfreerdp3-a9bcc81f821d7c66f623779fa5147e728eb3c388.tar.xz
freerdp3-a9bcc81f821d7c66f623779fa5147e728eb3c388.zip
Adding upstream version 3.3.0+dfsg1.upstream/3.3.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/freerdp/client')
-rw-r--r--include/freerdp/client/ainput.h48
-rw-r--r--include/freerdp/client/audin.h73
-rw-r--r--include/freerdp/client/channels.h94
-rw-r--r--include/freerdp/client/client_cliprdr_file.h105
-rw-r--r--include/freerdp/client/cliprdr.h201
-rw-r--r--include/freerdp/client/cmdline.h103
-rw-r--r--include/freerdp/client/disp.h52
-rw-r--r--include/freerdp/client/drdynvc.h62
-rw-r--r--include/freerdp/client/encomsp.h88
-rw-r--r--include/freerdp/client/file.h82
-rw-r--r--include/freerdp/client/geometry.h76
-rw-r--r--include/freerdp/client/printer.h89
-rw-r--r--include/freerdp/client/rail.h143
-rw-r--r--include/freerdp/client/rdpei.h110
-rw-r--r--include/freerdp/client/rdpgfx.h189
-rw-r--r--include/freerdp/client/rdpsnd.h90
-rw-r--r--include/freerdp/client/remdesk.h44
-rw-r--r--include/freerdp/client/sshagent.h95
-rw-r--r--include/freerdp/client/tsmf.h79
-rw-r--r--include/freerdp/client/utils/smartcard_cli.h37
-rw-r--r--include/freerdp/client/video.h74
21 files changed, 1934 insertions, 0 deletions
diff --git a/include/freerdp/client/ainput.h b/include/freerdp/client/ainput.h
new file mode 100644
index 0000000..c432677
--- /dev/null
+++ b/include/freerdp/client/ainput.h
@@ -0,0 +1,48 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Display Update Virtual Channel Extension
+ *
+ * Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_AINPUT_CLIENT_AINPUT_H
+#define FREERDP_CHANNEL_AINPUT_CLIENT_AINPUT_H
+
+#include <winpr/assert.h>
+#include <freerdp/channels/ainput.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef UINT (*pcAInputSendInputEvent)(AInputClientContext* context, UINT64 flags, INT32 x,
+ INT32 y);
+
+ struct ainput_client_context
+ {
+ void* handle;
+ void* custom;
+
+ pcAInputSendInputEvent AInputSendInputEvent;
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_AINPUT_CLIENT_AINPUT_H */
diff --git a/include/freerdp/client/audin.h b/include/freerdp/client/audin.h
new file mode 100644
index 0000000..604b60e
--- /dev/null
+++ b/include/freerdp/client/audin.h
@@ -0,0 +1,73 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Audio Input Redirection Virtual Channel
+ *
+ * Copyright 2010-2011 Vic Lee
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H
+#define FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H
+
+#include <freerdp/api.h>
+#include <freerdp/types.h>
+
+#include <freerdp/channels/audin.h>
+#include <freerdp/codec/audio.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Subsystem Interface
+ */
+
+ typedef UINT (*AudinReceive)(const AUDIO_FORMAT* format, const BYTE* data, size_t size,
+ void* userData);
+
+ typedef struct s_IAudinDevice IAudinDevice;
+ struct s_IAudinDevice
+ {
+ UINT (*Open)(IAudinDevice* devplugin, AudinReceive receive, void* userData);
+ BOOL (*FormatSupported)(IAudinDevice* devplugin, const AUDIO_FORMAT* format);
+ UINT(*SetFormat)
+ (IAudinDevice* devplugin, const AUDIO_FORMAT* format, UINT32 FramesPerPacket);
+ UINT (*Close)(IAudinDevice* devplugin);
+ UINT (*Free)(IAudinDevice* devplugin);
+ };
+
+#define AUDIN_DEVICE_EXPORT_FUNC_NAME "freerdp_audin_client_subsystem_entry"
+
+typedef UINT (*PREGISTERAUDINDEVICE)(IWTSPlugin* plugin, IAudinDevice* device);
+
+typedef struct
+{
+ IWTSPlugin* plugin;
+ PREGISTERAUDINDEVICE pRegisterAudinDevice;
+ const ADDIN_ARGV* args;
+ rdpContext* rdpcontext;
+} FREERDP_AUDIN_DEVICE_ENTRY_POINTS;
+typedef FREERDP_AUDIN_DEVICE_ENTRY_POINTS* PFREERDP_AUDIN_DEVICE_ENTRY_POINTS;
+
+typedef UINT (*PFREERDP_AUDIN_DEVICE_ENTRY)(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H */
diff --git a/include/freerdp/client/channels.h b/include/freerdp/client/channels.h
new file mode 100644
index 0000000..cfdc866
--- /dev/null
+++ b/include/freerdp/client/channels.h
@@ -0,0 +1,94 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Client Channels
+ *
+ * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNELS_CLIENT_H
+#define FREERDP_CHANNELS_CLIENT_H
+
+#include <freerdp/api.h>
+#include <freerdp/dvc.h>
+#include <freerdp/config.h>
+#include <freerdp/addin.h>
+#include <freerdp/channels/channels.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct
+ {
+ IWTSVirtualChannelCallback iface;
+ IWTSPlugin* plugin;
+ IWTSVirtualChannelManager* channel_mgr;
+ IWTSVirtualChannel* channel;
+ } GENERIC_CHANNEL_CALLBACK;
+
+ typedef struct
+ {
+ IWTSListenerCallback iface;
+ IWTSPlugin* plugin;
+ IWTSVirtualChannelManager* channel_mgr;
+ IWTSVirtualChannel* channel;
+ GENERIC_CHANNEL_CALLBACK* channel_callback;
+ } GENERIC_LISTENER_CALLBACK;
+
+ typedef struct GENERIC_DYNVC_PLUGIN GENERIC_DYNVC_PLUGIN;
+ typedef UINT (*DYNVC_PLUGIN_INIT_FN)(GENERIC_DYNVC_PLUGIN* plugin, rdpContext* context,
+ rdpSettings* settings);
+ typedef void (*DYNVC_PLUGIN_TERMINATE_FN)(GENERIC_DYNVC_PLUGIN* plugin);
+
+ struct GENERIC_DYNVC_PLUGIN
+ {
+ IWTSPlugin iface;
+ GENERIC_LISTENER_CALLBACK* listener_callback;
+ IWTSListener* listener;
+ BOOL attached;
+ BOOL initialized;
+ wLog* log;
+ char* dynvc_name;
+ size_t channelCallbackSize;
+ const IWTSVirtualChannelCallback* channel_callbacks;
+ DYNVC_PLUGIN_TERMINATE_FN terminatePluginFn;
+ };
+
+#if defined(WITH_CHANNELS)
+ FREERDP_API void* freerdp_channels_client_find_static_entry(const char* name,
+ const char* identifier);
+ FREERDP_API PVIRTUALCHANNELENTRY freerdp_channels_load_static_addin_entry(LPCSTR pszName,
+ LPCSTR pszSubsystem,
+ LPCSTR pszType,
+ DWORD dwFlags);
+
+ FREERDP_API FREERDP_ADDIN** freerdp_channels_list_addins(LPCSTR lpName, LPCSTR lpSubsystem,
+ LPCSTR lpType, DWORD dwFlags);
+ FREERDP_API void freerdp_channels_addin_list_free(FREERDP_ADDIN** ppAddins);
+
+ FREERDP_API BOOL freerdp_initialize_generic_dynvc_plugin(GENERIC_DYNVC_PLUGIN* plugin);
+ FREERDP_API UINT freerdp_generic_DVCPluginEntry(
+ IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* logTag, const char* name,
+ size_t pluginSize, size_t channelCallbackSize,
+ const IWTSVirtualChannelCallback* channel_callbacks, DYNVC_PLUGIN_INIT_FN initPluginFn,
+ DYNVC_PLUGIN_TERMINATE_FN terminatePluginFn);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNELS_CLIENT_H */
diff --git a/include/freerdp/client/client_cliprdr_file.h b/include/freerdp/client/client_cliprdr_file.h
new file mode 100644
index 0000000..6dca587
--- /dev/null
+++ b/include/freerdp/client/client_cliprdr_file.h
@@ -0,0 +1,105 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * X11 Clipboard Redirection
+ *
+ * Copyright 2010-2011 Vic Lee
+ * Copyright 2023 Armin Novak <armin.novak@thincst.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CLIENT_X11_CLIPRDR_FILE_H
+#define FREERDP_CLIENT_X11_CLIPRDR_FILE_H
+
+#include <winpr/clipboard.h>
+
+#include <freerdp/client/cliprdr.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct cliprdr_file_context CliprdrFileContext;
+
+ FREERDP_API void cliprdr_file_context_free(CliprdrFileContext* file);
+
+ WINPR_ATTR_MALLOC(cliprdr_file_context_free, 1)
+ FREERDP_API CliprdrFileContext* cliprdr_file_context_new(void* context);
+
+ /**! \brief returns if the implementation supports pasting files in a client file browser.
+ *
+ * \param file the file context to query
+ *
+ * \return \b TRUE if files can be pasted locally, \b FALSE if not (e.g. no FUSE, ...)
+ */
+ FREERDP_API BOOL cliprdr_file_context_has_local_support(CliprdrFileContext* file);
+
+ /**! \brief sets state of local file paste support
+ *
+ * \param file the file context to update
+ * \param available \b TRUE if the client supports pasting files to local file browsers, \b
+ * FALSE otherwise
+ *
+ * \return \b TRUE for success, \b FALSE otherwise
+ */
+ FREERDP_API BOOL cliprdr_file_context_set_locally_available(CliprdrFileContext* file,
+ BOOL available);
+ FREERDP_API BOOL cliprdr_file_context_remote_set_flags(CliprdrFileContext* file, UINT32 flags);
+ FREERDP_API UINT32 cliprdr_file_context_remote_get_flags(CliprdrFileContext* file);
+
+ FREERDP_API UINT32 cliprdr_file_context_current_flags(CliprdrFileContext* file);
+
+ FREERDP_API void* cliprdr_file_context_get_context(CliprdrFileContext* file);
+
+ FREERDP_API BOOL cliprdr_file_context_init(CliprdrFileContext* file,
+ CliprdrClientContext* cliprdr);
+ FREERDP_API BOOL cliprdr_file_context_uninit(CliprdrFileContext* file,
+ CliprdrClientContext* cliprdr);
+
+ FREERDP_API BOOL cliprdr_file_context_clear(CliprdrFileContext* file);
+
+ FREERDP_API UINT
+ cliprdr_file_context_notify_new_server_format_list(CliprdrFileContext* file_context);
+
+ FREERDP_API UINT
+ cliprdr_file_context_notify_new_client_format_list(CliprdrFileContext* file_context);
+
+ /** \brief updates the files the client announces to the server
+ *
+ * \param file the file context to update
+ * \param data the file list
+ * \param count the length of the file list
+ *
+ * \return \b TRUE for success, \b FALSE otherwise
+ */
+ FREERDP_API BOOL cliprdr_file_context_update_client_data(CliprdrFileContext* file,
+ const char* data, size_t count);
+ /** \brief updates the files the server announces to the client
+ *
+ * \param file the file context to update
+ * \param clip the clipboard instance to use
+ * \param data the file list [MS-RDPECLIP] 2.2.5.2.3 Packed File List (CLIPRDR_FILELIST)
+ * \param size the length of the file list
+ *
+ * \return \b TRUE for success, \b FALSE otherwise
+ */
+ FREERDP_API BOOL cliprdr_file_context_update_server_data(CliprdrFileContext* file,
+ wClipboard* clip, const void* data,
+ size_t size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CLIENT_X11_CLIPRDR_FILE_H */
diff --git a/include/freerdp/client/cliprdr.h b/include/freerdp/client/cliprdr.h
new file mode 100644
index 0000000..5d1073b
--- /dev/null
+++ b/include/freerdp/client/cliprdr.h
@@ -0,0 +1,201 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Clipboard Virtual Channel Extension
+ *
+ * Copyright 2011 Vic Lee
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_CLIPRDR_CLIENT_CLIPRDR_H
+#define FREERDP_CHANNEL_CLIPRDR_CLIENT_CLIPRDR_H
+
+#include <freerdp/api.h>
+#include <freerdp/types.h>
+
+#include <freerdp/message.h>
+#include <freerdp/channels/cliprdr.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Client Interface
+ */
+
+ typedef struct s_cliprdr_client_context CliprdrClientContext;
+
+ typedef UINT (*pcCliprdrServerCapabilities)(CliprdrClientContext* context,
+ const CLIPRDR_CAPABILITIES* capabilities);
+ typedef UINT (*pcCliprdrClientCapabilities)(CliprdrClientContext* context,
+ const CLIPRDR_CAPABILITIES* capabilities);
+ typedef UINT (*pcCliprdrMonitorReady)(CliprdrClientContext* context,
+ const CLIPRDR_MONITOR_READY* monitorReady);
+ typedef UINT (*pcCliprdrTempDirectory)(CliprdrClientContext* context,
+ const CLIPRDR_TEMP_DIRECTORY* tempDirectory);
+ typedef UINT (*pcCliprdrClientFormatList)(CliprdrClientContext* context,
+ const CLIPRDR_FORMAT_LIST* formatList);
+ typedef UINT (*pcCliprdrServerFormatList)(CliprdrClientContext* context,
+ const CLIPRDR_FORMAT_LIST* formatList);
+ typedef UINT (*pcCliprdrClientFormatListResponse)(
+ CliprdrClientContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
+ typedef UINT (*pcCliprdrServerFormatListResponse)(
+ CliprdrClientContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
+ typedef UINT (*pcCliprdrClientLockClipboardData)(
+ CliprdrClientContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
+ typedef UINT (*pcCliprdrServerLockClipboardData)(
+ CliprdrClientContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
+ typedef UINT (*pcCliprdrClientUnlockClipboardData)(
+ CliprdrClientContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
+ typedef UINT (*pcCliprdrServerUnlockClipboardData)(
+ CliprdrClientContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
+ typedef UINT (*pcCliprdrClientFormatDataRequest)(
+ CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
+ typedef UINT (*pcCliprdrServerFormatDataRequest)(
+ CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
+ typedef UINT (*pcCliprdrClientFormatDataResponse)(
+ CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
+ typedef UINT (*pcCliprdrServerFormatDataResponse)(
+ CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
+ typedef UINT (*pcCliprdrClientFileContentsRequest)(
+ CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
+ typedef UINT (*pcCliprdrServerFileContentsRequest)(
+ CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
+ typedef UINT (*pcCliprdrClientFileContentsResponse)(
+ CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
+ typedef UINT (*pcCliprdrServerFileContentsResponse)(
+ CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
+
+ struct s_cliprdr_client_context
+ {
+ void* handle;
+ void* custom;
+
+ pcCliprdrServerCapabilities ServerCapabilities;
+ pcCliprdrClientCapabilities ClientCapabilities;
+ pcCliprdrMonitorReady MonitorReady;
+ pcCliprdrTempDirectory TempDirectory;
+ pcCliprdrClientFormatList ClientFormatList;
+ pcCliprdrServerFormatList ServerFormatList;
+ pcCliprdrClientFormatListResponse ClientFormatListResponse;
+ pcCliprdrServerFormatListResponse ServerFormatListResponse;
+ pcCliprdrClientLockClipboardData ClientLockClipboardData;
+ pcCliprdrServerLockClipboardData ServerLockClipboardData;
+ pcCliprdrClientUnlockClipboardData ClientUnlockClipboardData;
+ pcCliprdrServerUnlockClipboardData ServerUnlockClipboardData;
+ pcCliprdrClientFormatDataRequest ClientFormatDataRequest;
+ pcCliprdrServerFormatDataRequest ServerFormatDataRequest;
+ pcCliprdrClientFormatDataResponse ClientFormatDataResponse;
+ pcCliprdrServerFormatDataResponse ServerFormatDataResponse;
+ pcCliprdrClientFileContentsRequest ClientFileContentsRequest;
+ pcCliprdrServerFileContentsRequest ServerFileContentsRequest;
+ pcCliprdrClientFileContentsResponse ClientFileContentsResponse;
+ pcCliprdrServerFileContentsResponse ServerFileContentsResponse;
+
+ UINT32 lastRequestedFormatId;
+ rdpContext* rdpcontext;
+ };
+
+ typedef struct
+ {
+ UINT32 id;
+ char* name;
+ int length;
+ } CLIPRDR_FORMAT_NAME;
+
+ /**
+ * Clipboard Events
+ */
+
+ typedef struct
+ {
+ wMessage event;
+ UINT32 capabilities;
+ } RDP_CB_CLIP_CAPS;
+
+ typedef struct
+ {
+ wMessage event;
+ UINT32 capabilities;
+ } RDP_CB_MONITOR_READY_EVENT;
+
+ typedef struct
+ {
+ wMessage event;
+ UINT32* formats;
+ UINT16 num_formats;
+ BYTE* raw_format_data;
+ UINT32 raw_format_data_size;
+ BOOL raw_format_unicode;
+ } RDP_CB_FORMAT_LIST_EVENT;
+
+ typedef struct
+ {
+ wMessage event;
+ UINT32 format;
+ } RDP_CB_DATA_REQUEST_EVENT;
+
+ typedef struct
+ {
+ wMessage event;
+ BYTE* data;
+ UINT32 size;
+ } RDP_CB_DATA_RESPONSE_EVENT;
+
+ typedef struct
+ {
+ wMessage event;
+ UINT32 streamId;
+ UINT32 lindex;
+ UINT32 dwFlags;
+ UINT32 nPositionLow;
+ UINT32 nPositionHigh;
+ UINT32 cbRequested;
+ UINT32 clipDataId;
+ } RDP_CB_FILECONTENTS_REQUEST_EVENT;
+
+ typedef struct
+ {
+ wMessage event;
+ BYTE* data;
+ UINT32 size;
+ UINT32 streamId;
+ } RDP_CB_FILECONTENTS_RESPONSE_EVENT;
+
+ typedef struct
+ {
+ wMessage event;
+ UINT32 clipDataId;
+ } RDP_CB_LOCK_CLIPDATA_EVENT;
+
+ typedef struct
+ {
+ wMessage event;
+ UINT32 clipDataId;
+ } RDP_CB_UNLOCK_CLIPDATA_EVENT;
+
+ typedef struct
+ {
+ wMessage event;
+ char dirname[520];
+ } RDP_CB_TEMPDIR_EVENT;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_CLIPRDR_CLIENT_CLIPRDR_H */
diff --git a/include/freerdp/client/cmdline.h b/include/freerdp/client/cmdline.h
new file mode 100644
index 0000000..36c8499
--- /dev/null
+++ b/include/freerdp/client/cmdline.h
@@ -0,0 +1,103 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * FreeRDP Client Command-Line Interface
+ *
+ * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CLIENT_CMDLINE_H
+#define FREERDP_CLIENT_CMDLINE_H
+
+#include <winpr/cmdline.h>
+
+#include <freerdp/api.h>
+#include <freerdp/types.h>
+#include <freerdp/settings.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /** \brief parses command line arguments to appropriate settings values.
+ *
+ * \param settings The settings instance to store the parsed values to
+ * \param argc the number of argv values
+ * \param argv an array of strings (char pointer)
+ * \param allowUnknown Allow unknown command line arguments or \b FALSE if not.
+ *
+ * \return \b 0 in case of success, a negative number in case of failure.
+ */
+ FREERDP_API int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
+ int argc, char** argv,
+ BOOL allowUnknown);
+
+ /** \brief parses command line arguments to appropriate settings values. Additionally allows
+ * supplying custom command line arguments and a handler function.
+ *
+ * \param settings The settings instance to store the parsed values to
+ * \param argc the number of argv values
+ * \param argv an array of strings (char pointer)
+ * \param allowUnknown Allow unknown command line arguments or \b FALSE if not.
+ * \param args Pointer to the custom arguments
+ * \param count The number of custom arguments
+ * \param handle_option the handler function for custom arguments.
+ * \param handle_userdata custom data supplied to \b handle_option as context
+ *
+ * \return \b 0 in case of success, a negative number in case of failure.
+ */
+ FREERDP_API int freerdp_client_settings_parse_command_line_arguments_ex(
+ rdpSettings* settings, int argc, char** argv, BOOL allowUnknown,
+ COMMAND_LINE_ARGUMENT_A* args, size_t count,
+ int (*handle_option)(const COMMAND_LINE_ARGUMENT* arg, void* custom),
+ void* handle_userdata);
+
+ FREERDP_API int freerdp_client_settings_command_line_status_print(rdpSettings* settings,
+ int status, int argc,
+ char** argv);
+ FREERDP_API int
+ freerdp_client_settings_command_line_status_print_ex(rdpSettings* settings, int status,
+ int argc, char** argv,
+ const COMMAND_LINE_ARGUMENT_A* custom);
+ FREERDP_API BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings);
+
+ FREERDP_API void freerdp_client_warn_unmaintained(int argc, char* argv[]);
+ FREERDP_API void freerdp_client_warn_experimental(int argc, char* argv[]);
+ FREERDP_API void freerdp_client_warn_deprecated(int argc, char* argv[]);
+
+ FREERDP_API BOOL freerdp_client_print_version(void);
+ FREERDP_API BOOL freerdp_client_print_buildconfig(void);
+ FREERDP_API BOOL freerdp_client_print_command_line_help(int argc, char** argv);
+ FREERDP_API BOOL freerdp_client_print_command_line_help_ex(
+ int argc, char** argv, const COMMAND_LINE_ARGUMENT_A* custom);
+
+ FREERDP_API BOOL freerdp_parse_username(const char* username, char** user, char** domain);
+ FREERDP_API BOOL freerdp_parse_hostname(const char* hostname, char** host, int* port);
+ FREERDP_API BOOL freerdp_set_connection_type(rdpSettings* settings, UINT32 type);
+
+ FREERDP_API BOOL freerdp_client_add_device_channel(rdpSettings* settings, size_t count,
+ const char** params);
+ FREERDP_API BOOL freerdp_client_add_static_channel(rdpSettings* settings, size_t count,
+ const char** params);
+ FREERDP_API BOOL freerdp_client_del_static_channel(rdpSettings* settings, const char* name);
+ FREERDP_API BOOL freerdp_client_add_dynamic_channel(rdpSettings* settings, size_t count,
+ const char** params);
+ FREERDP_API BOOL freerdp_client_del_dynamic_channel(rdpSettings* settings, const char* name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CLIENT_CMDLINE_H */
diff --git a/include/freerdp/client/disp.h b/include/freerdp/client/disp.h
new file mode 100644
index 0000000..26eff27
--- /dev/null
+++ b/include/freerdp/client/disp.h
@@ -0,0 +1,52 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Display Update Virtual Channel Extension
+ *
+ * Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_DISP_CLIENT_DISP_H
+#define FREERDP_CHANNEL_DISP_CLIENT_DISP_H
+
+#include <freerdp/channels/disp.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct s_disp_client_context DispClientContext;
+
+ typedef UINT (*pcDispCaps)(DispClientContext* context, UINT32 MaxNumMonitors,
+ UINT32 MaxMonitorAreaFactorA, UINT32 MaxMonitorAreaFactorB);
+ typedef UINT (*pcDispSendMonitorLayout)(DispClientContext* context, UINT32 NumMonitors,
+ DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors);
+
+ struct s_disp_client_context
+ {
+ void* handle;
+ void* custom;
+
+ pcDispCaps DisplayControlCaps;
+ pcDispSendMonitorLayout SendMonitorLayout;
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_DISP_CLIENT_DISP_H */
diff --git a/include/freerdp/client/drdynvc.h b/include/freerdp/client/drdynvc.h
new file mode 100644
index 0000000..897f9dd
--- /dev/null
+++ b/include/freerdp/client/drdynvc.h
@@ -0,0 +1,62 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Dynamic Virtual Channel Extension
+ *
+ * Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H
+#define FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Client Interface
+ */
+
+ typedef struct s_drdynvc_client_context DrdynvcClientContext;
+
+ typedef int (*pcDrdynvcGetVersion)(DrdynvcClientContext* context);
+ typedef UINT (*pcDrdynvcOnChannelConnected)(DrdynvcClientContext* context, const char* name,
+ void* pInterface);
+ typedef UINT (*pcDrdynvcOnChannelDisconnected)(DrdynvcClientContext* context, const char* name,
+ void* pInterface);
+ typedef UINT (*pcDrdynvcOnChannelAttached)(DrdynvcClientContext* context, const char* name,
+ void* pInterface);
+ typedef UINT (*pcDrdynvcOnChannelDetached)(DrdynvcClientContext* context, const char* name,
+ void* pInterface);
+
+ struct s_drdynvc_client_context
+ {
+ void* handle;
+ void* custom;
+
+ pcDrdynvcGetVersion GetVersion;
+ pcDrdynvcOnChannelConnected OnChannelConnected;
+ pcDrdynvcOnChannelDisconnected OnChannelDisconnected;
+ pcDrdynvcOnChannelAttached OnChannelAttached;
+ pcDrdynvcOnChannelDetached OnChannelDetached;
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H */
diff --git a/include/freerdp/client/encomsp.h b/include/freerdp/client/encomsp.h
new file mode 100644
index 0000000..005c8b3
--- /dev/null
+++ b/include/freerdp/client/encomsp.h
@@ -0,0 +1,88 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Multiparty Virtual Channel
+ *
+ * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_ENCOMSP_CLIENT_ENCOMSP_H
+#define FREERDP_CHANNEL_ENCOMSP_CLIENT_ENCOMSP_H
+
+#include <freerdp/channels/encomsp.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Client Interface
+ */
+
+ typedef struct s_encomsp_client_context EncomspClientContext;
+
+ typedef UINT (*pcEncomspFilterUpdated)(EncomspClientContext* context,
+ const ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
+ typedef UINT (*pcEncomspApplicationCreated)(
+ EncomspClientContext* context, const ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
+ typedef UINT (*pcEncomspApplicationRemoved)(
+ EncomspClientContext* context, const ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
+ typedef UINT (*pcEncomspWindowCreated)(EncomspClientContext* context,
+ const ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
+ typedef UINT (*pcEncomspWindowRemoved)(EncomspClientContext* context,
+ const ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
+ typedef UINT (*pcEncomspShowWindow)(EncomspClientContext* context,
+ const ENCOMSP_SHOW_WINDOW_PDU* showWindow);
+ typedef UINT (*pcEncomspParticipantCreated)(
+ EncomspClientContext* context, const ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
+ typedef UINT (*pcEncomspParticipantRemoved)(
+ EncomspClientContext* context, const ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
+ typedef UINT (*pcEncomspChangeParticipantControlLevel)(
+ EncomspClientContext* context,
+ const ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
+ typedef UINT (*pcEncomspGraphicsStreamPaused)(
+ EncomspClientContext* context,
+ const ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
+ typedef UINT (*pcEncomspGraphicsStreamResumed)(
+ EncomspClientContext* context,
+ const ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
+
+ struct s_encomsp_client_context
+ {
+ void* handle;
+ void* custom;
+
+ pcEncomspFilterUpdated FilterUpdated;
+ pcEncomspApplicationCreated ApplicationCreated;
+ pcEncomspApplicationRemoved ApplicationRemoved;
+ pcEncomspWindowCreated WindowCreated;
+ pcEncomspWindowRemoved WindowRemoved;
+ pcEncomspShowWindow ShowWindow;
+ pcEncomspParticipantCreated ParticipantCreated;
+ pcEncomspParticipantRemoved ParticipantRemoved;
+ pcEncomspChangeParticipantControlLevel ChangeParticipantControlLevel;
+ pcEncomspGraphicsStreamPaused GraphicsStreamPaused;
+ pcEncomspGraphicsStreamResumed GraphicsStreamResumed;
+
+ UINT32 participantId;
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_ENCOMSP_CLIENT_ENCOMSP_H */
diff --git a/include/freerdp/client/file.h b/include/freerdp/client/file.h
new file mode 100644
index 0000000..30c6543
--- /dev/null
+++ b/include/freerdp/client/file.h
@@ -0,0 +1,82 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * .rdp file
+ *
+ * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CLIENT_RDP_FILE_H
+#define FREERDP_CLIENT_RDP_FILE_H
+
+#include <freerdp/api.h>
+#include <freerdp/types.h>
+#include <freerdp/settings.h>
+
+/* Ignore invalid integer values */
+#define RDP_FILE_FLAG_PARSE_INT_RELAXED 1
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct rdp_file rdpFile;
+ typedef BOOL (*rdp_file_fkt_parse)(void* context, const char* key, char type,
+ const char* value);
+
+ /* When using freerdp_client_parse_rdp_file_ex or freerdp_client_parse_rdp_file_buffer_ex
+ * set the context for the callback with this function. */
+ FREERDP_API void freerdp_client_rdp_file_set_callback_context(rdpFile* file, void* context);
+
+ FREERDP_API BOOL freerdp_client_parse_rdp_file(rdpFile* file, const char* name);
+ FREERDP_API BOOL freerdp_client_parse_rdp_file_ex(rdpFile* file, const char* name,
+ rdp_file_fkt_parse parse);
+ FREERDP_API BOOL freerdp_client_parse_rdp_file_buffer(rdpFile* file, const BYTE* buffer,
+ size_t size);
+ FREERDP_API BOOL freerdp_client_parse_rdp_file_buffer_ex(rdpFile* file, const BYTE* buffer,
+ size_t size, rdp_file_fkt_parse parse);
+ FREERDP_API BOOL freerdp_client_populate_settings_from_rdp_file(const rdpFile* file,
+ rdpSettings* settings);
+
+ FREERDP_API BOOL freerdp_client_populate_rdp_file_from_settings(rdpFile* file,
+ const rdpSettings* settings);
+ FREERDP_API BOOL freerdp_client_write_rdp_file(const rdpFile* file, const char* name,
+ BOOL unicode);
+ FREERDP_API size_t freerdp_client_write_rdp_file_buffer(const rdpFile* file, char* buffer,
+ size_t size);
+
+ FREERDP_API int freerdp_client_rdp_file_set_string_option(rdpFile* file, const char* name,
+ const char* value);
+ FREERDP_API const char* freerdp_client_rdp_file_get_string_option(const rdpFile* file,
+ const char* name);
+
+ FREERDP_API int freerdp_client_rdp_file_set_integer_option(rdpFile* file, const char* name,
+ int value);
+ FREERDP_API int freerdp_client_rdp_file_get_integer_option(const rdpFile* file,
+ const char* name);
+
+ FREERDP_API void freerdp_client_rdp_file_free(rdpFile* file);
+
+ WINPR_ATTR_MALLOC(freerdp_client_rdp_file_free, 1)
+ FREERDP_API rdpFile* freerdp_client_rdp_file_new(void);
+
+ WINPR_ATTR_MALLOC(freerdp_client_rdp_file_free, 1)
+ FREERDP_API rdpFile* freerdp_client_rdp_file_new_ex(DWORD flags);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CLIENT_RDP_FILE_H */
diff --git a/include/freerdp/client/geometry.h b/include/freerdp/client/geometry.h
new file mode 100644
index 0000000..f1c4e7b
--- /dev/null
+++ b/include/freerdp/client/geometry.h
@@ -0,0 +1,76 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Geometry tracking Virtual Channel Extension
+ *
+ * Copyright 2017 David Fort <contact@hardening-consulting.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNELS_CLIENT_GEOMETRY_H
+#define FREERDP_CHANNELS_CLIENT_GEOMETRY_H
+
+#include <winpr/collections.h>
+#include <freerdp/api.h>
+#include <freerdp/channels/geometry.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Client Interface
+ */
+ typedef struct s_geometry_client_context GeometryClientContext;
+
+ typedef struct S_MAPPED_GEOMETRY MAPPED_GEOMETRY;
+ typedef BOOL (*pcMappedGeometryAdded)(GeometryClientContext* context,
+ MAPPED_GEOMETRY* geometry);
+ typedef BOOL (*pcMappedGeometryUpdate)(MAPPED_GEOMETRY* geometry);
+ typedef BOOL (*pcMappedGeometryClear)(MAPPED_GEOMETRY* geometry);
+
+ /** @brief a geometry record tracked by the geometry channel */
+ struct S_MAPPED_GEOMETRY
+ {
+ volatile LONG refCounter;
+ UINT64 mappingId;
+ UINT64 topLevelId;
+ INT32 left, top, right, bottom;
+ INT32 topLevelLeft, topLevelTop, topLevelRight, topLevelBottom;
+ FREERDP_RGNDATA geometry;
+
+ void* custom;
+ pcMappedGeometryUpdate MappedGeometryUpdate;
+ pcMappedGeometryClear MappedGeometryClear;
+ };
+
+ /** @brief the geometry context for client channel */
+ struct s_geometry_client_context
+ {
+ wHashTable* geometries;
+ void* handle;
+ void* custom;
+
+ pcMappedGeometryAdded MappedGeometryAdded;
+ UINT32 remoteVersion;
+ };
+
+ FREERDP_API void mappedGeometryRef(MAPPED_GEOMETRY* g);
+ FREERDP_API void mappedGeometryUnref(MAPPED_GEOMETRY* g);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNELS_CLIENT_GEOMETRY_H */
diff --git a/include/freerdp/client/printer.h b/include/freerdp/client/printer.h
new file mode 100644
index 0000000..fd44345
--- /dev/null
+++ b/include/freerdp/client/printer.h
@@ -0,0 +1,89 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Print Virtual Channel
+ *
+ * Copyright 2010-2011 Vic Lee
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ * Copyright 2016 Armin Novak <armin.novak@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_PRINTER_CLIENT_PRINTER_H
+#define FREERDP_CHANNEL_PRINTER_CLIENT_PRINTER_H
+
+#include <freerdp/channels/rdpdr.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct rdp_printer_driver rdpPrinterDriver;
+ typedef struct rdp_printer rdpPrinter;
+ typedef struct rdp_print_job rdpPrintJob;
+
+ typedef void (*pcReferencePrinterDriver)(rdpPrinterDriver* driver);
+ typedef rdpPrinter** (*pcEnumPrinters)(rdpPrinterDriver* driver);
+ typedef void (*pcReleaseEnumPrinters)(rdpPrinter** printers);
+
+ typedef rdpPrinter* (*pcGetPrinter)(rdpPrinterDriver* driver, const char* name,
+ const char* driverName, BOOL isDefault);
+ typedef void (*pcReferencePrinter)(rdpPrinter* printer);
+
+ struct rdp_printer_driver
+ {
+ pcEnumPrinters EnumPrinters;
+ pcReleaseEnumPrinters ReleaseEnumPrinters;
+ pcGetPrinter GetPrinter;
+
+ pcReferencePrinterDriver AddRef;
+ pcReferencePrinterDriver ReleaseRef;
+ };
+
+ typedef rdpPrintJob* (*pcCreatePrintJob)(rdpPrinter* printer, UINT32 id);
+ typedef rdpPrintJob* (*pcFindPrintJob)(rdpPrinter* printer, UINT32 id);
+
+ struct rdp_printer
+ {
+ size_t id;
+ char* name;
+ char* driver;
+ BOOL is_default;
+
+ size_t references;
+ rdpPrinterDriver* backend;
+ pcCreatePrintJob CreatePrintJob;
+ pcFindPrintJob FindPrintJob;
+ pcReferencePrinter AddRef;
+ pcReferencePrinter ReleaseRef;
+ };
+
+ typedef UINT (*pcWritePrintJob)(rdpPrintJob* printjob, const BYTE* data, size_t size);
+ typedef void (*pcClosePrintJob)(rdpPrintJob* printjob);
+
+ struct rdp_print_job
+ {
+ UINT32 id;
+ rdpPrinter* printer;
+
+ pcWritePrintJob Write;
+ pcClosePrintJob Close;
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_PRINTER_CLIENT_PRINTER_H */
diff --git a/include/freerdp/client/rail.h b/include/freerdp/client/rail.h
new file mode 100644
index 0000000..18582b9
--- /dev/null
+++ b/include/freerdp/client/rail.h
@@ -0,0 +1,143 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Remote Applications Integrated Locally (RAIL)
+ *
+ * Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_RAIL_CLIENT_RAIL_H
+#define FREERDP_CHANNEL_RAIL_CLIENT_RAIL_H
+
+#include <freerdp/api.h>
+#include <freerdp/types.h>
+
+#include <freerdp/rail.h>
+#include <freerdp/message.h>
+#include <freerdp/channels/rail.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Client Interface
+ */
+
+ typedef struct s_rail_client_context RailClientContext;
+
+ typedef UINT (*pcRailOnOpen)(RailClientContext* context, BOOL* sendHandshake);
+
+ typedef UINT (*pcRailClientExecute)(RailClientContext* context, const RAIL_EXEC_ORDER* exec);
+ typedef UINT (*pcRailClientActivate)(RailClientContext* context,
+ const RAIL_ACTIVATE_ORDER* activate);
+ typedef UINT (*pcRailClientSystemParam)(RailClientContext* context,
+ const RAIL_SYSPARAM_ORDER* sysparam);
+ typedef UINT (*pcRailServerSystemParam)(RailClientContext* context,
+ const RAIL_SYSPARAM_ORDER* sysparam);
+ typedef UINT (*pcRailClientSystemCommand)(RailClientContext* context,
+ const RAIL_SYSCOMMAND_ORDER* syscommand);
+ typedef UINT (*pcRailClientHandshake)(RailClientContext* context,
+ const RAIL_HANDSHAKE_ORDER* handshake);
+ typedef UINT (*pcRailServerHandshake)(RailClientContext* context,
+ const RAIL_HANDSHAKE_ORDER* handshake);
+ typedef UINT (*pcRailServerHandshakeEx)(RailClientContext* context,
+ const RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
+ typedef UINT (*pcRailClientNotifyEvent)(RailClientContext* context,
+ const RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
+ typedef UINT (*pcRailClientWindowMove)(RailClientContext* context,
+ const RAIL_WINDOW_MOVE_ORDER* windowMove);
+ typedef UINT (*pcRailServerLocalMoveSize)(RailClientContext* context,
+ const RAIL_LOCALMOVESIZE_ORDER* localMoveSize);
+ typedef UINT (*pcRailServerMinMaxInfo)(RailClientContext* context,
+ const RAIL_MINMAXINFO_ORDER* minMaxInfo);
+ typedef UINT (*pcRailClientInformation)(RailClientContext* context,
+ const RAIL_CLIENT_STATUS_ORDER* clientStatus);
+ typedef UINT (*pcRailClientSystemMenu)(RailClientContext* context,
+ const RAIL_SYSMENU_ORDER* sysmenu);
+ typedef UINT (*pcRailServerTaskBarInfo)(RailClientContext* context,
+ const RAIL_TASKBAR_INFO_ORDER* taskBarInfo);
+ typedef UINT (*pcRailClientLanguageBarInfo)(RailClientContext* context,
+ const RAIL_LANGBAR_INFO_ORDER* langBarInfo);
+ typedef UINT (*pcRailServerLanguageBarInfo)(RailClientContext* context,
+ const RAIL_LANGBAR_INFO_ORDER* langBarInfo);
+ typedef UINT (*pcRailClientLanguageIMEInfo)(RailClientContext* context,
+ const RAIL_LANGUAGEIME_INFO_ORDER* langImeInfo);
+ typedef UINT (*pcRailServerExecuteResult)(RailClientContext* context,
+ const RAIL_EXEC_RESULT_ORDER* execResult);
+ typedef UINT (*pcRailClientGetAppIdRequest)(RailClientContext* context,
+ const RAIL_GET_APPID_REQ_ORDER* getAppIdReq);
+ typedef UINT (*pcRailServerGetAppIdResponse)(RailClientContext* context,
+ const RAIL_GET_APPID_RESP_ORDER* getAppIdResp);
+ typedef UINT (*pcRailServerZOrderSync)(RailClientContext* context,
+ const RAIL_ZORDER_SYNC* zorder);
+ typedef UINT (*pcRailServerCloak)(RailClientContext* context, const RAIL_CLOAK* cloak);
+ typedef UINT (*pcRailClientCloak)(RailClientContext* context, const RAIL_CLOAK* cloak);
+ typedef UINT (*pcRailServerPowerDisplayRequest)(RailClientContext* context,
+ const RAIL_POWER_DISPLAY_REQUEST* power);
+ typedef UINT (*pcRailClientSnapArrange)(RailClientContext* context,
+ const RAIL_SNAP_ARRANGE* snap);
+ typedef UINT (*pcRailServerGetAppidResponseExtended)(RailClientContext* context,
+ const RAIL_GET_APPID_RESP_EX* id);
+ typedef UINT (*pcRailClientCompartmentInfo)(RailClientContext* context,
+ const RAIL_COMPARTMENT_INFO_ORDER* compartmentInfo);
+ typedef UINT (*pcRailClientTextScale)(RailClientContext* context, UINT32 TextScale);
+ typedef UINT (*pcRailClientCaretBlinkRate)(RailClientContext* context, UINT32 CaretBlinkRate);
+
+ struct s_rail_client_context
+ {
+ void* handle;
+ void* custom;
+
+ pcRailClientExecute ClientExecute;
+ pcRailClientActivate ClientActivate;
+ pcRailClientSystemParam ClientSystemParam;
+ pcRailServerSystemParam ServerSystemParam;
+ pcRailClientSystemCommand ClientSystemCommand;
+ pcRailClientHandshake ClientHandshake;
+ pcRailServerHandshake ServerHandshake;
+ pcRailServerHandshakeEx ServerHandshakeEx;
+ pcRailClientNotifyEvent ClientNotifyEvent;
+ pcRailClientWindowMove ClientWindowMove;
+ pcRailServerLocalMoveSize ServerLocalMoveSize;
+ pcRailServerMinMaxInfo ServerMinMaxInfo;
+ pcRailClientInformation ClientInformation;
+ pcRailClientSystemMenu ClientSystemMenu;
+ pcRailServerTaskBarInfo ServerTaskBarInfo;
+ pcRailClientLanguageBarInfo ClientLanguageBarInfo;
+ pcRailServerLanguageBarInfo ServerLanguageBarInfo;
+ pcRailClientLanguageIMEInfo ClientLanguageIMEInfo;
+ pcRailServerExecuteResult ServerExecuteResult;
+ pcRailClientGetAppIdRequest ClientGetAppIdRequest;
+ pcRailServerGetAppIdResponse ServerGetAppIdResponse;
+ pcRailServerZOrderSync ServerZOrderSync;
+ pcRailClientCloak ClientCloak;
+ pcRailServerCloak ServerCloak;
+ pcRailServerPowerDisplayRequest ServerPowerDisplayRequest;
+ pcRailClientSnapArrange ClientSnapArrange;
+ pcRailServerGetAppidResponseExtended ServerGetAppidResponseExtended;
+ pcRailClientCompartmentInfo ClientCompartmentInfo;
+ pcRailOnOpen OnOpen;
+ pcRailClientTextScale ClientTextScale;
+ pcRailClientCaretBlinkRate ClientCaretBlinkRate;
+ };
+
+ FREERDP_API UINT client_rail_server_start_cmd(RailClientContext* context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_RAIL_CLIENT_RAIL_H */
diff --git a/include/freerdp/client/rdpei.h b/include/freerdp/client/rdpei.h
new file mode 100644
index 0000000..50624f4
--- /dev/null
+++ b/include/freerdp/client/rdpei.h
@@ -0,0 +1,110 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Dynamic Virtual Channel Extension
+ *
+ * Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_RDPEI_CLIENT_RDPEI_H
+#define FREERDP_CHANNEL_RDPEI_CLIENT_RDPEI_H
+
+#include <freerdp/channels/rdpei.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Client Interface
+ */
+
+ typedef struct s_rdpei_client_context RdpeiClientContext;
+
+ typedef UINT32 (*pcRdpeiGetVersion)(RdpeiClientContext* context);
+ typedef UINT32 (*pcRdpeiGetFeatures)(RdpeiClientContext* context);
+
+ typedef UINT (*pcRdpeiAddContact)(RdpeiClientContext* context,
+ const RDPINPUT_CONTACT_DATA* contact);
+
+ typedef UINT (*pcRdpeiTouchEvent)(RdpeiClientContext* context, INT32 externalId, INT32 x,
+ INT32 y, INT32* contactId);
+ typedef UINT (*pcRdpeiTouchRawEvent)(RdpeiClientContext* context, INT32 externalId, INT32 x,
+ INT32 y, INT32* contactId, UINT32 contactFlags,
+ UINT32 fieldFlags, ...);
+ typedef UINT (*pcRdpeiTouchRawEventVA)(RdpeiClientContext* context, INT32 externalId, INT32 x,
+ INT32 y, INT32* contactId, UINT32 contactFlags,
+ UINT32 fieldFlags, va_list args);
+
+ typedef UINT (*pcRdpeiAddPen)(RdpeiClientContext* context, INT32 externalId,
+ const RDPINPUT_PEN_CONTACT* contact);
+
+ typedef UINT (*pcRdpeiPen)(RdpeiClientContext* context, INT32 externalId, UINT32 fieldFlags,
+ INT32 x, INT32 y, ...);
+
+ typedef UINT (*pcRdpeiPenRawEvent)(RdpeiClientContext* context, INT32 externalId,
+ UINT32 contactFlags, UINT32 fieldFlags, INT32 x, INT32 y,
+ ...);
+ typedef UINT (*pcRdpeiPenRawEventVA)(RdpeiClientContext* context, INT32 externalId,
+ UINT32 contactFlags, UINT32 fieldFlags, INT32 x, INT32 y,
+ va_list args);
+
+ typedef UINT (*pcRdpeiSuspendTouch)(RdpeiClientContext* context);
+ typedef UINT (*pcRdpeiResumeTouch)(RdpeiClientContext* context);
+
+ struct s_rdpei_client_context
+ {
+ void* handle;
+ void* custom;
+
+ pcRdpeiGetVersion GetVersion;
+ pcRdpeiGetFeatures GetFeatures;
+
+ pcRdpeiAddContact AddContact;
+
+ pcRdpeiTouchEvent TouchBegin;
+ pcRdpeiTouchEvent TouchUpdate;
+ pcRdpeiTouchEvent TouchEnd;
+
+ pcRdpeiAddPen AddPen;
+
+ pcRdpeiPen PenBegin;
+ pcRdpeiPen PenUpdate;
+ pcRdpeiPen PenEnd;
+ pcRdpeiPen PenHoverBegin;
+ pcRdpeiPen PenHoverUpdate;
+ pcRdpeiPen PenHoverCancel;
+
+ pcRdpeiSuspendTouch SuspendTouch;
+ pcRdpeiResumeTouch ResumeTouch;
+
+ pcRdpeiTouchEvent TouchCancel;
+ pcRdpeiTouchRawEvent TouchRawEvent;
+ pcRdpeiTouchRawEventVA TouchRawEventVA;
+
+ pcRdpeiPen PenCancel;
+ pcRdpeiPenRawEvent PenRawEvent;
+ pcRdpeiPenRawEventVA PenRawEventVA;
+
+ UINT32 clientFeaturesMask;
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_RDPEI_CLIENT_RDPEI_H */
diff --git a/include/freerdp/client/rdpgfx.h b/include/freerdp/client/rdpgfx.h
new file mode 100644
index 0000000..df9e2a7
--- /dev/null
+++ b/include/freerdp/client/rdpgfx.h
@@ -0,0 +1,189 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Graphics Pipeline Extension
+ *
+ * Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ * Copyright 2015 Thincast Technologies GmbH
+ * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H
+#define FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H
+
+#include <freerdp/api.h>
+#include <freerdp/types.h>
+
+#include <freerdp/codecs.h>
+
+#include <freerdp/channels/rdpgfx.h>
+#include <freerdp/utils/profiler.h>
+
+#include <freerdp/cache/persistent.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Client Interface
+ */
+ typedef struct gdi_gfx_surface gdiGfxSurface;
+ typedef struct s_rdpgfx_client_context RdpgfxClientContext;
+
+ typedef UINT (*pcRdpgfxResetGraphics)(RdpgfxClientContext* context,
+ const RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
+ typedef UINT (*pcRdpgfxStartFrame)(RdpgfxClientContext* context,
+ const RDPGFX_START_FRAME_PDU* startFrame);
+ typedef UINT (*pcRdpgfxEndFrame)(RdpgfxClientContext* context,
+ const RDPGFX_END_FRAME_PDU* endFrame);
+ typedef UINT (*pcRdpgfxSurfaceCommand)(RdpgfxClientContext* context,
+ const RDPGFX_SURFACE_COMMAND* cmd);
+ typedef UINT (*pcRdpgfxDeleteEncodingContext)(
+ RdpgfxClientContext* context,
+ const RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
+ typedef UINT (*pcRdpgfxCreateSurface)(RdpgfxClientContext* context,
+ const RDPGFX_CREATE_SURFACE_PDU* createSurface);
+ typedef UINT (*pcRdpgfxDeleteSurface)(RdpgfxClientContext* context,
+ const RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
+ typedef UINT (*pcRdpgfxSolidFill)(RdpgfxClientContext* context,
+ const RDPGFX_SOLID_FILL_PDU* solidFill);
+ typedef UINT (*pcRdpgfxSurfaceToSurface)(RdpgfxClientContext* context,
+ const RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
+ typedef UINT (*pcRdpgfxSurfaceToCache)(RdpgfxClientContext* context,
+ const RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
+ typedef UINT (*pcRdpgfxCacheToSurface)(RdpgfxClientContext* context,
+ const RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
+ typedef UINT (*pcRdpgfxCacheImportOffer)(RdpgfxClientContext* context,
+ const RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
+ typedef UINT (*pcRdpgfxCacheImportReply)(RdpgfxClientContext* context,
+ const RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
+ typedef UINT (*pcRdpgfxEvictCacheEntry)(RdpgfxClientContext* context,
+ const RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
+ typedef UINT (*pcRdpgfxImportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
+ const PERSISTENT_CACHE_ENTRY* importCacheEntry);
+ typedef UINT (*pcRdpgfxExportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
+ PERSISTENT_CACHE_ENTRY* importCacheEntry);
+ typedef UINT (*pcRdpgfxMapSurfaceToOutput)(
+ RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
+ typedef UINT (*pcRdpgfxMapSurfaceToScaledOutput)(
+ RdpgfxClientContext* context,
+ const RDPGFX_MAP_SURFACE_TO_SCALED_OUTPUT_PDU* surfaceToOutput);
+ typedef UINT (*pcRdpgfxMapSurfaceToWindow)(
+ RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
+ typedef UINT (*pcRdpgfxMapSurfaceToScaledWindow)(
+ RdpgfxClientContext* context,
+ const RDPGFX_MAP_SURFACE_TO_SCALED_WINDOW_PDU* surfaceToWindow);
+ typedef UINT (*pcRdpgfxSetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId,
+ void* pData);
+ typedef void* (*pcRdpgfxGetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId);
+ typedef UINT (*pcRdpgfxGetSurfaceIds)(RdpgfxClientContext* context, UINT16** ppSurfaceIds,
+ UINT16* count);
+ typedef UINT (*pcRdpgfxSetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot,
+ void* pData);
+ typedef void* (*pcRdpgfxGetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot);
+
+ typedef UINT (*pcRdpgfxUpdateSurfaces)(RdpgfxClientContext* context);
+
+ typedef UINT (*pcRdpgfxUpdateWindowFromSurface)(RdpgfxClientContext* context,
+ gdiGfxSurface* surface);
+
+ typedef UINT (*pcRdpgfxUpdateSurfaceArea)(RdpgfxClientContext* context, UINT16 surfaceId,
+ UINT32 nrRects, const RECTANGLE_16* rects);
+
+ typedef UINT (*pcRdpgfxOnOpen)(RdpgfxClientContext* context, BOOL* do_caps_advertise,
+ BOOL* do_frame_acks);
+ typedef UINT (*pcRdpgfxOnClose)(RdpgfxClientContext* context);
+ typedef UINT (*pcRdpgfxCapsAdvertise)(RdpgfxClientContext* context,
+ const RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise);
+ typedef UINT (*pcRdpgfxCapsConfirm)(RdpgfxClientContext* context,
+ const RDPGFX_CAPS_CONFIRM_PDU* capsConfirm);
+ typedef UINT (*pcRdpgfxFrameAcknowledge)(RdpgfxClientContext* context,
+ const RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
+ typedef UINT (*pcRdpgfxQoeFrameAcknowledge)(
+ RdpgfxClientContext* context, const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge);
+
+ typedef UINT (*pcRdpgfxMapWindowForSurface)(RdpgfxClientContext* context, UINT16 surfaceID,
+ UINT64 windowID);
+ typedef UINT (*pcRdpgfxUnmapWindowForSurface)(RdpgfxClientContext* context, UINT64 windowID);
+
+ struct s_rdpgfx_client_context
+ {
+ void* handle;
+ void* custom;
+
+ /* Implementations require locking */
+ pcRdpgfxResetGraphics ResetGraphics;
+ pcRdpgfxStartFrame StartFrame;
+ pcRdpgfxEndFrame EndFrame;
+ pcRdpgfxSurfaceCommand SurfaceCommand;
+ pcRdpgfxDeleteEncodingContext DeleteEncodingContext;
+ pcRdpgfxCreateSurface CreateSurface;
+ pcRdpgfxDeleteSurface DeleteSurface;
+ pcRdpgfxSolidFill SolidFill;
+ pcRdpgfxSurfaceToSurface SurfaceToSurface;
+ pcRdpgfxSurfaceToCache SurfaceToCache;
+ pcRdpgfxCacheToSurface CacheToSurface;
+ pcRdpgfxCacheImportOffer CacheImportOffer;
+ pcRdpgfxCacheImportReply CacheImportReply;
+ pcRdpgfxImportCacheEntry ImportCacheEntry;
+ pcRdpgfxExportCacheEntry ExportCacheEntry;
+ pcRdpgfxEvictCacheEntry EvictCacheEntry;
+ pcRdpgfxMapSurfaceToOutput MapSurfaceToOutput;
+ pcRdpgfxMapSurfaceToScaledOutput MapSurfaceToScaledOutput;
+ pcRdpgfxMapSurfaceToWindow MapSurfaceToWindow;
+ pcRdpgfxMapSurfaceToScaledWindow MapSurfaceToScaledWindow;
+
+ pcRdpgfxGetSurfaceIds GetSurfaceIds;
+ pcRdpgfxSetSurfaceData SetSurfaceData;
+ pcRdpgfxGetSurfaceData GetSurfaceData;
+ pcRdpgfxSetCacheSlotData SetCacheSlotData;
+ pcRdpgfxGetCacheSlotData GetCacheSlotData;
+
+ /* Proxy callbacks */
+ pcRdpgfxOnOpen OnOpen;
+ pcRdpgfxOnClose OnClose;
+ pcRdpgfxCapsAdvertise CapsAdvertise;
+ pcRdpgfxCapsConfirm CapsConfirm;
+ pcRdpgfxFrameAcknowledge FrameAcknowledge;
+ pcRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
+
+ /* No locking required */
+ pcRdpgfxUpdateSurfaces UpdateSurfaces;
+ pcRdpgfxUpdateSurfaceArea UpdateSurfaceArea;
+ pcRdpgfxUpdateWindowFromSurface UpdateWindowFromSurface;
+
+ /* These callbacks allow creating/destroying a window directly
+ * mapped to a surface.
+ * NOTE: The surface is already locked.
+ */
+ pcRdpgfxMapWindowForSurface MapWindowForSurface;
+ pcRdpgfxUnmapWindowForSurface UnmapWindowForSurface;
+
+ CRITICAL_SECTION mux;
+ rdpCodecs* codecs;
+ PROFILER_DEFINE(SurfaceProfiler)
+ };
+
+ FREERDP_API void rdpgfx_client_context_free(RdpgfxClientContext* context);
+
+ WINPR_ATTR_MALLOC(rdpgfx_client_context_free, 1)
+ FREERDP_API RdpgfxClientContext* rdpgfx_client_context_new(rdpContext* context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H */
diff --git a/include/freerdp/client/rdpsnd.h b/include/freerdp/client/rdpsnd.h
new file mode 100644
index 0000000..7a77a2c
--- /dev/null
+++ b/include/freerdp/client/rdpsnd.h
@@ -0,0 +1,90 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Audio Output Virtual Channel
+ *
+ * Copyright 2010-2011 Vic Lee
+ * Copyright 2012-2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H
+#define FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H
+
+#include <freerdp/channels/rdpsnd.h>
+#include <freerdp/settings.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Subsystem Interface
+ */
+ typedef struct rdpsnd_plugin rdpsndPlugin;
+
+ typedef struct rdpsnd_device_plugin rdpsndDevicePlugin;
+
+ typedef BOOL (*pcFormatSupported)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format);
+ typedef BOOL (*pcOpen)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format, UINT32 latency);
+ typedef UINT32 (*pcGetVolume)(rdpsndDevicePlugin* device);
+ typedef BOOL (*pcSetVolume)(rdpsndDevicePlugin* device, UINT32 value);
+ typedef UINT (*pcPlay)(rdpsndDevicePlugin* device, const BYTE* data, size_t size);
+ typedef UINT (*pcPlayEx)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format,
+ const BYTE* data, size_t size);
+ typedef void (*pcStart)(rdpsndDevicePlugin* device);
+ typedef void (*pcClose)(rdpsndDevicePlugin* device);
+ typedef void (*pcFree)(rdpsndDevicePlugin* device);
+ typedef BOOL (*pcDefaultFormat)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* desired,
+ AUDIO_FORMAT* defaultFormat);
+ typedef UINT (*pcServerFormatAnnounce)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* formats,
+ size_t count);
+
+ struct rdpsnd_device_plugin
+ {
+ rdpsndPlugin* rdpsnd;
+
+ pcFormatSupported FormatSupported;
+ pcOpen Open;
+ pcGetVolume GetVolume;
+ pcSetVolume SetVolume;
+ pcPlay Play;
+ pcStart Start; /* Deprecated, unused. */
+ pcClose Close;
+ pcFree Free;
+ pcDefaultFormat DefaultFormat;
+ pcServerFormatAnnounce ServerFormatAnnounce;
+ pcPlayEx PlayEx;
+ };
+
+#define RDPSND_DEVICE_EXPORT_FUNC_NAME "freerdp_rdpsnd_client_subsystem_entry"
+
+typedef void (*PREGISTERRDPSNDDEVICE)(rdpsndPlugin* rdpsnd, rdpsndDevicePlugin* device);
+
+typedef struct
+{
+ rdpsndPlugin* rdpsnd;
+ PREGISTERRDPSNDDEVICE pRegisterRdpsndDevice;
+ const ADDIN_ARGV* args;
+} FREERDP_RDPSND_DEVICE_ENTRY_POINTS;
+typedef FREERDP_RDPSND_DEVICE_ENTRY_POINTS* PFREERDP_RDPSND_DEVICE_ENTRY_POINTS;
+
+typedef UINT (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints);
+
+FREERDP_API rdpContext* freerdp_rdpsnd_get_context(rdpsndPlugin* plugin);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H */
diff --git a/include/freerdp/client/remdesk.h b/include/freerdp/client/remdesk.h
new file mode 100644
index 0000000..cc9799d
--- /dev/null
+++ b/include/freerdp/client/remdesk.h
@@ -0,0 +1,44 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Remote Assistance Virtual Channel
+ *
+ * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_REMDESK_CLIENT_REMDESK_H
+#define FREERDP_CHANNEL_REMDESK_CLIENT_REMDESK_H
+
+#include <freerdp/channels/remdesk.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * Client Interface
+ */
+
+ typedef struct
+ {
+ void* handle;
+ void* custom;
+ } RemdeskClientContext;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_REMDESK_CLIENT_REMDESK_H */
diff --git a/include/freerdp/client/sshagent.h b/include/freerdp/client/sshagent.h
new file mode 100644
index 0000000..c3404d1
--- /dev/null
+++ b/include/freerdp/client/sshagent.h
@@ -0,0 +1,95 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * SSH Agent Virtual Channel Extension
+ *
+ * Copyright 2017 Ben Cohen
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNEL_CLIENT_SSHAGENT_H
+#define FREERDP_CHANNEL_CLIENT_SSHAGENT_H
+
+#include <freerdp/api.h>
+#include <freerdp/types.h>
+
+#include <freerdp/message.h>
+#include <freerdp/channels/cliprdr.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct
+ {
+ int ProtocolVersion;
+ int MaxConnections;
+ } SSHAgentClientContext;
+
+ /*
+ * The channel is defined by the sshagent channel in xrdp as follows.
+ *
+ * Server to client commands
+ * -------------------------
+ *
+ * Capabilities (at start of channel stream):
+ *
+ * INT32 SA_TAG_CAPABILITY
+ * INT32 SSHAGENT_CHAN_PROT_VERSION := 1
+ * INT32 SSHAGENT_MAX_CONNECTIONS
+ *
+ * Open connection:
+ *
+ * INT32 SA_TAG_OPEN
+ * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
+ *
+ * Send data:
+ *
+ * INT32 SA_TAG_WRITE
+ * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
+ * INT32 Data length
+ * DATA ...
+ *
+ * Close connection:
+ *
+ * INT32 SA_TAG_CLOSE
+ * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
+ *
+ * Client to server commands
+ * -------------------------
+ *
+ * Capabilities (in reply to server capabilities):
+ *
+ * INT32 SA_TAG_CAPABILITY
+ * INT32 SSHAGENT_CHAN_PROT_VERSION := 1
+ * INT32 SSHAGENT_MAX_CONNECTIONS
+ *
+ * Send data:
+ *
+ * INT32 SA_TAG_WRITE
+ * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
+ * INT32 Data length
+ * DATA ...
+ *
+ * Close connection (abnormal):
+ *
+ * INT32 SA_TAG_CLOSE
+ * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_CLIENT_SSHAGENT_H */
diff --git a/include/freerdp/client/tsmf.h b/include/freerdp/client/tsmf.h
new file mode 100644
index 0000000..e9cff3c
--- /dev/null
+++ b/include/freerdp/client/tsmf.h
@@ -0,0 +1,79 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Multimedia Redirection Virtual Channel Types
+ *
+ * Copyright 2011 Vic Lee
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* DEPRECATION WARNING:
+ *
+ * This channel is unmaintained and not used since windows 7.
+ * Only compile and use it if absolutely necessary, otherwise
+ * deactivate it or use the newer [MS-RDPEVOR] video redirection.
+ */
+
+#ifndef FREERDP_CHANNEL_TSMF_CLIENT_TSMF_H
+#define FREERDP_CHANNEL_TSMF_CLIENT_TSMF_H
+
+#include <freerdp/codec/region.h>
+
+#include <freerdp/channels/tsmf.h>
+
+/* RDP_VIDEO_FRAME_EVENT.frame_pixfmt */
+/* http://www.fourcc.org/yuv.php */
+#define RDP_PIXFMT_I420 0x30323449
+#define RDP_PIXFMT_YV12 0x32315659
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct
+ {
+ BYTE* frameData;
+ UINT32 frameSize;
+ UINT32 framePixFmt;
+ INT16 frameWidth;
+ INT16 frameHeight;
+ INT16 x;
+ INT16 y;
+ INT16 width;
+ INT16 height;
+ UINT16 numVisibleRects;
+ RECTANGLE_16* visibleRects;
+ } TSMF_VIDEO_FRAME_EVENT;
+
+ /**
+ * Client Interface
+ */
+
+ typedef struct s_tsmf_client_context TsmfClientContext;
+
+ typedef int (*pcTsmfFrameEvent)(TsmfClientContext* context, TSMF_VIDEO_FRAME_EVENT* event);
+
+ struct s_tsmf_client_context
+ {
+ void* handle;
+ void* custom;
+
+ pcTsmfFrameEvent FrameEvent;
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNEL_TSMF_CLIENT_TSMF_H */
diff --git a/include/freerdp/client/utils/smartcard_cli.h b/include/freerdp/client/utils/smartcard_cli.h
new file mode 100644
index 0000000..4aec92b
--- /dev/null
+++ b/include/freerdp/client/utils/smartcard_cli.h
@@ -0,0 +1,37 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Smartcard client functions
+ *
+ * Copyright 2021 David Fort <contact@hardening-consulting.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UTILS_SMARTCARD_CLI_H__
+#define UTILS_SMARTCARD_CLI_H__
+
+#include <freerdp/api.h>
+#include <freerdp/settings.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+ FREERDP_API BOOL freerdp_smartcard_list(const rdpSettings* settings);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* UTILS_SMARTCARD_CLI_H__ */
diff --git a/include/freerdp/client/video.h b/include/freerdp/client/video.h
new file mode 100644
index 0000000..e520e98
--- /dev/null
+++ b/include/freerdp/client/video.h
@@ -0,0 +1,74 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Video Optimized Remoting Virtual Channel Extension
+ *
+ * Copyright 2017 David Fort <contact@hardening-consulting.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FREERDP_CHANNELS_CLIENT_VIDEO_H
+#define FREERDP_CHANNELS_CLIENT_VIDEO_H
+
+#include <freerdp/client/geometry.h>
+#include <freerdp/channels/video.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct s_VideoClientContext VideoClientContext;
+ typedef struct s_VideoClientContextPriv VideoClientContextPriv;
+
+ /** @brief an implementation of surface used by the video channel */
+ typedef struct
+ {
+ UINT32 x, y, w, h;
+ UINT32 alignedWidth, alignedHeight;
+ BYTE* data;
+ DWORD format;
+ UINT32 scanline;
+ } VideoSurface;
+
+ typedef void (*pcVideoTimer)(VideoClientContext* video, UINT64 now);
+ typedef void (*pcVideoSetGeometry)(VideoClientContext* video, GeometryClientContext* geometry);
+ typedef VideoSurface* (*pcVideoCreateSurface)(VideoClientContext* video, UINT32 x, UINT32 y,
+ UINT32 width, UINT32 height);
+ typedef BOOL (*pcVideoShowSurface)(VideoClientContext* video, const VideoSurface* surface,
+ UINT32 destinationWidth, UINT32 destinationHeight);
+ typedef BOOL (*pcVideoDeleteSurface)(VideoClientContext* video, VideoSurface* surface);
+
+ /** @brief context for the video (MS-RDPEVOR) channel */
+ struct s_VideoClientContext
+ {
+ void* handle;
+ void* custom;
+ VideoClientContextPriv* priv;
+
+ pcVideoSetGeometry setGeometry;
+ pcVideoTimer timer;
+ pcVideoCreateSurface createSurface;
+ pcVideoShowSurface showSurface;
+ pcVideoDeleteSurface deleteSurface;
+ };
+
+ FREERDP_API VideoSurface* VideoClient_CreateCommonContext(size_t size, UINT32 x, UINT32 y,
+ UINT32 w, UINT32 h);
+ FREERDP_API void VideoClient_DestroyCommonContext(VideoSurface* surface);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CHANNELS_CLIENT_VIDEO_H */