FreeRDP
client/cliprdr_main.c File Reference
#include <freerdp/config.h>
#include <winpr/wtypes.h>
#include <winpr/assert.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <freerdp/types.h>
#include <freerdp/constants.h>
#include <freerdp/freerdp.h>
#include <freerdp/client/cliprdr.h>
#include "../../../channels/client/addin.h"
#include "cliprdr_main.h"
#include "cliprdr_format.h"
#include "../cliprdr_common.h"

Macros

#define VirtualChannelEntryEx   cliprdr_VirtualChannelEntryEx
 

Functions

static const char * CB_MSG_TYPE_STRINGS (UINT32 type)
 
CliprdrClientContext * cliprdr_get_client_interface (cliprdrPlugin *cliprdr)
 
static UINT cliprdr_packet_send (cliprdrPlugin *cliprdr, wStream *s)
 
UINT cliprdr_send_error_response (cliprdrPlugin *cliprdr, UINT16 type)
 
static void cliprdr_print_general_capability_flags (UINT32 flags)
 
static UINT cliprdr_process_general_capability (cliprdrPlugin *cliprdr, wStream *s)
 
static UINT cliprdr_process_clip_caps (cliprdrPlugin *cliprdr, wStream *s, UINT32 length, UINT16 flags)
 
static UINT cliprdr_process_monitor_ready (cliprdrPlugin *cliprdr, wStream *s, UINT32 length, UINT16 flags)
 
static UINT cliprdr_process_filecontents_request (cliprdrPlugin *cliprdr, wStream *s, UINT32 length, UINT16 flags)
 
static UINT cliprdr_process_filecontents_response (cliprdrPlugin *cliprdr, wStream *s, UINT32 length, UINT16 flags)
 
static UINT cliprdr_process_lock_clipdata (cliprdrPlugin *cliprdr, wStream *s, UINT32 length, UINT16 flags)
 
static UINT cliprdr_process_unlock_clipdata (cliprdrPlugin *cliprdr, wStream *s, UINT32 length, UINT16 flags)
 
static UINT cliprdr_order_recv (LPVOID userdata, wStream *s)
 
static UINT cliprdr_client_capabilities (CliprdrClientContext *context, const CLIPRDR_CAPABILITIES *capabilities)
 
static UINT cliprdr_temp_directory (CliprdrClientContext *context, const CLIPRDR_TEMP_DIRECTORY *tempDirectory)
 
static UINT cliprdr_client_format_list (CliprdrClientContext *context, const CLIPRDR_FORMAT_LIST *formatList)
 
static UINT cliprdr_client_format_list_response (CliprdrClientContext *context, const CLIPRDR_FORMAT_LIST_RESPONSE *formatListResponse)
 
static UINT cliprdr_client_lock_clipboard_data (CliprdrClientContext *context, const CLIPRDR_LOCK_CLIPBOARD_DATA *lockClipboardData)
 
static UINT cliprdr_client_unlock_clipboard_data (CliprdrClientContext *context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA *unlockClipboardData)
 
static UINT cliprdr_client_format_data_request (CliprdrClientContext *context, const CLIPRDR_FORMAT_DATA_REQUEST *formatDataRequest)
 
static UINT cliprdr_client_format_data_response (CliprdrClientContext *context, const CLIPRDR_FORMAT_DATA_RESPONSE *formatDataResponse)
 
static UINT cliprdr_client_file_contents_request (CliprdrClientContext *context, const CLIPRDR_FILE_CONTENTS_REQUEST *fileContentsRequest)
 
static UINT cliprdr_client_file_contents_response (CliprdrClientContext *context, const CLIPRDR_FILE_CONTENTS_RESPONSE *fileContentsResponse)
 
static VOID VCAPITYPE cliprdr_virtual_channel_open_event_ex (LPVOID lpUserParam, DWORD openHandle, UINT event, LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
 
static UINT cliprdr_virtual_channel_event_connected (cliprdrPlugin *cliprdr, LPVOID pData, UINT32 dataLength)
 
static UINT cliprdr_virtual_channel_event_disconnected (cliprdrPlugin *cliprdr)
 
static UINT cliprdr_virtual_channel_event_terminated (cliprdrPlugin *cliprdr)
 
static VOID VCAPITYPE cliprdr_virtual_channel_init_event_ex (LPVOID lpUserParam, LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
 
 FREERDP_ENTRY_POINT (BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID pInitHandle))
 

Variables

const char * type_FileGroupDescriptorW = "FileGroupDescriptorW"
 
const char * type_FileContents = "FileContents"
 

Macro Definition Documentation

◆ VirtualChannelEntryEx

#define VirtualChannelEntryEx   cliprdr_VirtualChannelEntryEx

Function Documentation

◆ CB_MSG_TYPE_STRINGS()

static const char* CB_MSG_TYPE_STRINGS ( UINT32  type)
static
Here is the caller graph for this function:

◆ cliprdr_client_capabilities()

static UINT cliprdr_client_capabilities ( CliprdrClientContext *  context,
const CLIPRDR_CAPABILITIES capabilities 
)
static

Callback Interface Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_client_file_contents_request()

static UINT cliprdr_client_file_contents_request ( CliprdrClientContext *  context,
const CLIPRDR_FILE_CONTENTS_REQUEST fileContentsRequest 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_client_file_contents_response()

static UINT cliprdr_client_file_contents_response ( CliprdrClientContext *  context,
const CLIPRDR_FILE_CONTENTS_RESPONSE fileContentsResponse 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_client_format_data_request()

static UINT cliprdr_client_format_data_request ( CliprdrClientContext *  context,
const CLIPRDR_FORMAT_DATA_REQUEST formatDataRequest 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_client_format_data_response()

static UINT cliprdr_client_format_data_response ( CliprdrClientContext *  context,
const CLIPRDR_FORMAT_DATA_RESPONSE formatDataResponse 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_client_format_list()

static UINT cliprdr_client_format_list ( CliprdrClientContext *  context,
const CLIPRDR_FORMAT_LIST formatList 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_client_format_list_response()

static UINT cliprdr_client_format_list_response ( CliprdrClientContext *  context,
const CLIPRDR_FORMAT_LIST_RESPONSE formatListResponse 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_client_lock_clipboard_data()

static UINT cliprdr_client_lock_clipboard_data ( CliprdrClientContext *  context,
const CLIPRDR_LOCK_CLIPBOARD_DATA lockClipboardData 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_client_unlock_clipboard_data()

static UINT cliprdr_client_unlock_clipboard_data ( CliprdrClientContext *  context,
const CLIPRDR_UNLOCK_CLIPBOARD_DATA unlockClipboardData 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_get_client_interface()

CliprdrClientContext* cliprdr_get_client_interface ( cliprdrPlugin cliprdr)
Here is the caller graph for this function:

◆ cliprdr_order_recv()

static UINT cliprdr_order_recv ( LPVOID  userdata,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_packet_send()

static UINT cliprdr_packet_send ( cliprdrPlugin cliprdr,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_print_general_capability_flags()

static void cliprdr_print_general_capability_flags ( UINT32  flags)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_process_clip_caps()

static UINT cliprdr_process_clip_caps ( cliprdrPlugin cliprdr,
wStream s,
UINT32  length,
UINT16  flags 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_process_filecontents_request()

static UINT cliprdr_process_filecontents_request ( cliprdrPlugin cliprdr,
wStream s,
UINT32  length,
UINT16  flags 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_process_filecontents_response()

static UINT cliprdr_process_filecontents_response ( cliprdrPlugin cliprdr,
wStream s,
UINT32  length,
UINT16  flags 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_process_general_capability()

static UINT cliprdr_process_general_capability ( cliprdrPlugin cliprdr,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_process_lock_clipdata()

static UINT cliprdr_process_lock_clipdata ( cliprdrPlugin cliprdr,
wStream s,
UINT32  length,
UINT16  flags 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_process_monitor_ready()

static UINT cliprdr_process_monitor_ready ( cliprdrPlugin cliprdr,
wStream s,
UINT32  length,
UINT16  flags 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

The clipboard capabilities pdu from server to client is optional, but a server using it must send it before sending the monitor ready pdu. When the server capabilities pdu is not used, default capabilities corresponding to a generalFlags field set to zero are assumed.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_process_unlock_clipdata()

static UINT cliprdr_process_unlock_clipdata ( cliprdrPlugin cliprdr,
wStream s,
UINT32  length,
UINT16  flags 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_send_error_response()

UINT cliprdr_send_error_response ( cliprdrPlugin cliprdr,
UINT16  type 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_temp_directory()

static UINT cliprdr_temp_directory ( CliprdrClientContext *  context,
const CLIPRDR_TEMP_DIRECTORY tempDirectory 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_virtual_channel_event_connected()

static UINT cliprdr_virtual_channel_event_connected ( cliprdrPlugin cliprdr,
LPVOID  pData,
UINT32  dataLength 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_virtual_channel_event_disconnected()

static UINT cliprdr_virtual_channel_event_disconnected ( cliprdrPlugin cliprdr)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_virtual_channel_event_terminated()

static UINT cliprdr_virtual_channel_event_terminated ( cliprdrPlugin cliprdr)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_virtual_channel_init_event_ex()

static VOID VCAPITYPE cliprdr_virtual_channel_init_event_ex ( LPVOID  lpUserParam,
LPVOID  pInitHandle,
UINT  event,
LPVOID  pData,
UINT  dataLength 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cliprdr_virtual_channel_open_event_ex()

static VOID VCAPITYPE cliprdr_virtual_channel_open_event_ex ( LPVOID  lpUserParam,
DWORD  openHandle,
UINT  event,
LPVOID  pData,
UINT32  dataLength,
UINT32  totalLength,
UINT32  dataFlags 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FREERDP_ENTRY_POINT()

FREERDP_ENTRY_POINT ( BOOL VCAPITYPE   VirtualChannelEntryExPCHANNEL_ENTRY_POINTS pEntryPoints, PVOID pInitHandle)
Here is the call graph for this function:

Variable Documentation

◆ type_FileContents

const char* type_FileContents = "FileContents"

◆ type_FileGroupDescriptorW

const char* type_FileGroupDescriptorW = "FileGroupDescriptorW"

FreeRDP: A Remote Desktop Protocol Implementation Clipboard Virtual Channel

Copyright 2009-2011 Jay Sorg Copyright 2010-2011 Vic Lee Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.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.