FreeRDP
|
#include <freerdp/config.h>
#include <stdlib.h>
#include <winpr/crt.h>
#include <winpr/image.h>
#include <winpr/stream.h>
#include <winpr/clipboard.h>
#include <freerdp/log.h>
#include <freerdp/client/cliprdr.h>
#include <freerdp/channels/channels.h>
#include <freerdp/channels/cliprdr.h>
#include <freerdp/client/client_cliprdr_file.h>
#include "wlf_cliprdr.h"
Macros | |
#define | TAG CLIENT_TAG("wayland.cliprdr") |
#define | MAX_CLIPBOARD_FORMATS 255 |
#define | mime_text_plain "text/plain" |
#define | mime_text_utf8 mime_text_plain ";charset=utf-8" |
#define | BMP_MIME_LIST "image/bmp", "image/x-bmp", "image/x-MS-bmp", "image/x-win-bitmap" |
Functions | |
static void | wlf_request_free (void *rq) |
static wlf_request * | wlf_request_new (void) |
static void * | wlf_request_clone (const void *oth) |
static BOOL | wlf_mime_is_file (const char *mime) |
static BOOL | wlf_mime_is_text (const char *mime) |
static BOOL | wlf_mime_is_image (const char *mime) |
static BOOL | wlf_mime_is_html (const char *mime) |
static void | wlf_cliprdr_free_server_formats (wfClipboard *clipboard) |
static void | wlf_cliprdr_free_client_formats (wfClipboard *clipboard) |
static UINT | wlf_cliprdr_send_client_format_list (wfClipboard *clipboard) |
static void | wfl_cliprdr_add_client_format_id (wfClipboard *clipboard, UINT32 formatId) |
static BOOL | wlf_cliprdr_add_client_format (wfClipboard *clipboard, const char *mime) |
static UINT | wlf_cliprdr_send_data_request (wfClipboard *clipboard, const wlf_const_request *rq) |
static UINT | wlf_cliprdr_send_data_response (wfClipboard *clipboard, const BYTE *data, size_t size) |
BOOL | wlf_cliprdr_handle_event (wfClipboard *clipboard, const UwacClipboardEvent *event) |
static UINT | wlf_cliprdr_send_client_capabilities (wfClipboard *clipboard) |
static UINT | wlf_cliprdr_send_client_format_list_response (wfClipboard *clipboard, BOOL status) |
static UINT | wlf_cliprdr_monitor_ready (CliprdrClientContext *context, const CLIPRDR_MONITOR_READY *monitorReady) |
static UINT | wlf_cliprdr_server_capabilities (CliprdrClientContext *context, const CLIPRDR_CAPABILITIES *capabilities) |
static UINT32 | wlf_get_server_format_id (const wfClipboard *clipboard, const char *name) |
static const char * | wlf_get_server_format_name (const wfClipboard *clipboard, UINT32 formatId) |
static void | wlf_cliprdr_transfer_data (UwacSeat *seat, void *context, const char *mime, int fd) |
static void | wlf_cliprdr_cancel_data (UwacSeat *seat, void *context) |
static UINT | wlf_cliprdr_server_format_list (CliprdrClientContext *context, const CLIPRDR_FORMAT_LIST *formatList) |
static UINT | wlf_cliprdr_server_format_list_response (CliprdrClientContext *context, const CLIPRDR_FORMAT_LIST_RESPONSE *formatListResponse) |
static UINT | wlf_cliprdr_server_format_data_request (CliprdrClientContext *context, const CLIPRDR_FORMAT_DATA_REQUEST *formatDataRequest) |
static UINT | wlf_cliprdr_server_format_data_response (CliprdrClientContext *context, const CLIPRDR_FORMAT_DATA_RESPONSE *formatDataResponse) |
wfClipboard * | wlf_clipboard_new (wlfContext *wfc) |
void | wlf_clipboard_free (wfClipboard *clipboard) |
BOOL | wlf_cliprdr_init (wfClipboard *clipboard, CliprdrClientContext *cliprdr) |
BOOL | wlf_cliprdr_uninit (wfClipboard *clipboard, CliprdrClientContext *cliprdr) |
Variables | |
static const char * | mime_text [] |
static const char | mime_png [] = "image/png" |
static const char | mime_webp [] = "image/webp" |
static const char | mime_jpg [] = "image/jpeg" |
static const char | mime_tiff [] = "image/tiff" |
static const char | mime_uri_list [] = "text/uri-list" |
static const char | mime_html [] = "text/html" |
static const char * | mime_bitmap [] = { BMP_MIME_LIST } |
static const char * | mime_image [] = { mime_png, mime_webp, mime_jpg, mime_tiff, BMP_MIME_LIST } |
static const char | mime_gnome_copied_files [] = "x-special/gnome-copied-files" |
static const char | mime_mate_copied_files [] = "x-special/mate-copied-files" |
static const char | type_FileGroupDescriptorW [] = "FileGroupDescriptorW" |
static const char | type_HtmlFormat [] = "HTML Format" |
#define MAX_CLIPBOARD_FORMATS 255 |
#define mime_text_plain "text/plain" |
#define mime_text_utf8 mime_text_plain ";charset=utf-8" |
#define TAG CLIENT_TAG("wayland.cliprdr") |
FreeRDP: A Remote Desktop Protocol Implementation Wayland Clipboard Redirection
Copyright 2018 Armin Novak armin Copyright 2018 Thincast Technologies GmbH .nov ak@th inca st.co m
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.
|
static |
void wlf_clipboard_free | ( | wfClipboard * | clipboard | ) |
wfClipboard* wlf_clipboard_new | ( | wlfContext * | wfc | ) |
FreeRDP: A Remote Desktop Protocol Implementation Wayland Clipboard Redirection
Copyright 2018 Armin Novak armin Copyright 2018 Thincast Technologies GmbH .nov ak@th inca st.co m
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.
|
static |
|
static |
|
static |
|
static |
BOOL wlf_cliprdr_handle_event | ( | wfClipboard * | clipboard, |
const UwacClipboardEvent * | event | ||
) |
BOOL wlf_cliprdr_init | ( | wfClipboard * | clipboard, |
CliprdrClientContext * | cliprdr | ||
) |
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Function description
|
static |
Called when the clipboard changes server side.
Clear the local clipboard offer and replace it with a new one that announces the formats we get listed here.
|
static |
Function description
|
static |
BOOL wlf_cliprdr_uninit | ( | wfClipboard * | clipboard, |
CliprdrClientContext * | cliprdr | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |