FreeRDP
server/cliprdr_main.c File Reference
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <freerdp/channels/log.h>
#include "cliprdr_main.h"

Functions

wStream * cliprdr_server_packet_new (UINT16 msgType, UINT16 msgFlags, UINT32 dataLen)
 
UINT cliprdr_server_packet_send (CliprdrServerPrivate *cliprdr, wStream *s)
 
static UINT cliprdr_server_capabilities (CliprdrServerContext *context, CLIPRDR_CAPABILITIES *capabilities)
 
static UINT cliprdr_server_monitor_ready (CliprdrServerContext *context, CLIPRDR_MONITOR_READY *monitorReady)
 
static UINT cliprdr_server_format_list (CliprdrServerContext *context, CLIPRDR_FORMAT_LIST *formatList)
 
static UINT cliprdr_server_format_list_response (CliprdrServerContext *context, CLIPRDR_FORMAT_LIST_RESPONSE *formatListResponse)
 
static UINT cliprdr_server_lock_clipboard_data (CliprdrServerContext *context, CLIPRDR_LOCK_CLIPBOARD_DATA *lockClipboardData)
 
static UINT cliprdr_server_unlock_clipboard_data (CliprdrServerContext *context, CLIPRDR_UNLOCK_CLIPBOARD_DATA *unlockClipboardData)
 
static UINT cliprdr_server_format_data_request (CliprdrServerContext *context, CLIPRDR_FORMAT_DATA_REQUEST *formatDataRequest)
 
static UINT cliprdr_server_format_data_response (CliprdrServerContext *context, CLIPRDR_FORMAT_DATA_RESPONSE *formatDataResponse)
 
static UINT cliprdr_server_file_contents_request (CliprdrServerContext *context, CLIPRDR_FILE_CONTENTS_REQUEST *fileContentsRequest)
 
static UINT cliprdr_server_file_contents_response (CliprdrServerContext *context, CLIPRDR_FILE_CONTENTS_RESPONSE *fileContentsResponse)
 
static UINT cliprdr_server_receive_general_capability (CliprdrServerContext *context, wStream *s)
 
static UINT cliprdr_server_receive_capabilities (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_temporary_directory (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_format_list (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_format_list_response (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_lock_clipdata (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_unlock_clipdata (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_format_data_request (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_format_data_response (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_filecontents_request (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_filecontents_response (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_receive_pdu (CliprdrServerContext *context, wStream *s, CLIPRDR_HEADER *header)
 
static UINT cliprdr_server_init (CliprdrServerContext *context)
 
UINT cliprdr_server_read (CliprdrServerContext *context)
 
static DWORD WINAPI cliprdr_server_thread (LPVOID arg)
 
static UINT cliprdr_server_open (CliprdrServerContext *context)
 
static UINT cliprdr_server_close (CliprdrServerContext *context)
 
static UINT cliprdr_server_start (CliprdrServerContext *context)
 
static UINT cliprdr_server_stop (CliprdrServerContext *context)
 
static HANDLE cliprdr_server_get_event_handle (CliprdrServerContext *context)
 
static UINT cliprdr_server_check_event_handle (CliprdrServerContext *context)
 
CliprdrServerContext * cliprdr_server_context_new (HANDLE vcm)
 
void cliprdr_server_context_free (CliprdrServerContext *context)
 

Function Documentation

static UINT cliprdr_server_capabilities ( CliprdrServerContext *  context,
CLIPRDR_CAPABILITIES *  capabilities 
)
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:

static UINT cliprdr_server_check_event_handle ( CliprdrServerContext *  context)
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:

static UINT cliprdr_server_close ( CliprdrServerContext *  context)
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:

void cliprdr_server_context_free ( CliprdrServerContext *  context)

Here is the call graph for this function:

Here is the caller graph for this function:

CliprdrServerContext* cliprdr_server_context_new ( HANDLE  vcm)

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT cliprdr_server_file_contents_request ( CliprdrServerContext *  context,
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:

static UINT cliprdr_server_file_contents_response ( CliprdrServerContext *  context,
CLIPRDR_FILE_CONTENTS_RESPONSE *  fileContentsResponse 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

requestedFileContentsData: FILECONTENTS_SIZE: file size as UINT64 FILECONTENTS_RANGE: file data from requested range

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT cliprdr_server_format_data_request ( CliprdrServerContext *  context,
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:

static UINT cliprdr_server_format_data_response ( CliprdrServerContext *  context,
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:

static UINT cliprdr_server_format_list ( CliprdrServerContext *  context,
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:

static UINT cliprdr_server_format_list_response ( CliprdrServerContext *  context,
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:

static HANDLE cliprdr_server_get_event_handle ( CliprdrServerContext *  context)
static

Here is the caller graph for this function:

static UINT cliprdr_server_init ( CliprdrServerContext *  context)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT cliprdr_server_lock_clipboard_data ( CliprdrServerContext *  context,
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:

static UINT cliprdr_server_monitor_ready ( CliprdrServerContext *  context,
CLIPRDR_MONITOR_READY *  monitorReady 
)
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:

static UINT cliprdr_server_open ( CliprdrServerContext *  context)
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:

wStream* cliprdr_server_packet_new ( UINT16  msgType,
UINT16  msgFlags,
UINT32  dataLen 
)

FreeRDP: A Remote Desktop Protocol Implementation Clipboard Virtual Channel Extension

Copyright 2013 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com 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. Initialization Sequence
Client Server
| |
|<----------------——Server Clipboard Capabilities PDU-----------——|
|<-----------------------——Monitor Ready PDU--------------------——|
|-----------------——Client Clipboard Capabilities PDU----------——>|
|---------------------——Temporary Directory PDU----------------——>|
|-------------------------——Format List PDU--------------------——>|
|<--------------------——Format List Response PDU----------------——|
Data Transfer Sequences
Shared Local
Clipboard Owner Clipboard Owner
| |
|----------------------------------------------------------------------—|
_ |----------------------------—Format List PDU-----------------------—>|
| |<-----------------------—Format List Response PDU-------------------—|
_| Copy Sequence |<------------------—Lock Clipboard Data PDU (Optional)--------------—|
|----------------------------------------------------------------------—|
|----------------------------------------------------------------------—|
_ |<-----------------------—Format Data Request PDU--------------------—|
| Paste Sequence Palette, |------------------------—Format Data Response PDU------------------—>|
_| Metafile, File List Data |----------------------------------------------------------------------—|
|----------------------------------------------------------------------—|
_ |<---------------------—Format Contents Request PDU------------------—|
| Paste Sequence |----------------------—Format Contents Response PDU----------------—>|
_| File Stream Data |<------------------—Lock Clipboard Data PDU (Optional)--------------—|
|----------------------------------------------------------------------—|

Here is the call graph for this function:

Here is the caller graph for this function:

UINT cliprdr_server_packet_send ( CliprdrServerPrivate *  cliprdr,
wStream *  s 
)

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:

UINT cliprdr_server_read ( CliprdrServerContext *  context)

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:

static UINT cliprdr_server_receive_capabilities ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_filecontents_request ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_filecontents_response ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_format_data_request ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_format_data_response ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_format_list ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_format_list_response ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT cliprdr_server_receive_general_capability ( CliprdrServerContext *  context,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT cliprdr_server_receive_lock_clipdata ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_pdu ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_temporary_directory ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_receive_unlock_clipdata ( CliprdrServerContext *  context,
wStream *  s,
CLIPRDR_HEADER *  header 
)
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:

static UINT cliprdr_server_start ( CliprdrServerContext *  context)
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:

static UINT cliprdr_server_stop ( CliprdrServerContext *  context)
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:

static DWORD WINAPI cliprdr_server_thread ( LPVOID  arg)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT cliprdr_server_unlock_clipboard_data ( CliprdrServerContext *  context,
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: