2013-12-29 04:53:12 +00:00
|
|
|
/*
|
2016-03-25 19:59:40 +00:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
* or more contributor license agreements. See the NOTICE file
|
|
|
|
* distributed with this work for additional information
|
|
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
|
|
* to you 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
|
2012-03-30 18:26:52 +00:00
|
|
|
*
|
2016-03-25 19:59:40 +00:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2012-03-30 18:26:52 +00:00
|
|
|
*
|
2016-03-25 19:59:40 +00:00
|
|
|
* 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.
|
2013-12-29 04:53:12 +00:00
|
|
|
*/
|
|
|
|
|
2012-03-30 18:26:52 +00:00
|
|
|
|
|
|
|
#ifndef __GUAC_RDP_RDP_CLIPRDR_H
|
|
|
|
#define __GUAC_RDP_RDP_CLIPRDR_H
|
|
|
|
|
2014-01-01 22:44:28 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2014-06-11 01:45:14 +00:00
|
|
|
#include <guacamole/client.h>
|
2014-01-01 22:44:28 +00:00
|
|
|
#include <freerdp/client/cliprdr.h>
|
2019-09-21 19:25:06 +00:00
|
|
|
#include <winpr/stream.h>
|
2012-03-30 18:26:52 +00:00
|
|
|
|
2014-03-31 22:46:49 +00:00
|
|
|
/**
|
2014-04-02 21:22:22 +00:00
|
|
|
* Clipboard format for text encoded in Windows CP1252.
|
2014-03-31 22:46:49 +00:00
|
|
|
*/
|
2014-04-02 21:22:22 +00:00
|
|
|
#define GUAC_RDP_CLIPBOARD_FORMAT_CP1252 1
|
2014-03-31 22:46:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Clipboard format for text encoded in UTF-16.
|
|
|
|
*/
|
|
|
|
#define GUAC_RDP_CLIPBOARD_FORMAT_UTF16 2
|
|
|
|
|
2016-03-01 05:50:00 +00:00
|
|
|
/**
|
|
|
|
* Called within the main RDP connection thread whenever a CLIPRDR message is
|
|
|
|
* received. This function will dispatch that message to an appropriate
|
|
|
|
* function, specific to that message type.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param client
|
|
|
|
* The guac_client associated with the current RDP session.
|
|
|
|
*
|
|
|
|
* @param event
|
|
|
|
* The received CLIPRDR message.
|
2016-03-01 05:50:00 +00:00
|
|
|
*/
|
2013-07-18 18:54:22 +00:00
|
|
|
void guac_rdp_process_cliprdr_event(guac_client* client, wMessage* event);
|
2016-03-01 05:50:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles the given CLIPRDR event, which MUST be a Monitor Ready event. It
|
|
|
|
* is the responsibility of this function to respond to the Monitor Ready
|
|
|
|
* event with a list of supported clipboard formats.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param client
|
|
|
|
* The guac_client associated with the current RDP session.
|
2016-03-01 05:50:00 +00:00
|
|
|
*
|
|
|
|
* @param event
|
|
|
|
* The received CLIPRDR message, which must be a Monitor Ready event.
|
|
|
|
*/
|
2013-07-18 18:54:22 +00:00
|
|
|
void guac_rdp_process_cb_monitor_ready(guac_client* client, wMessage* event);
|
2012-04-30 06:09:00 +00:00
|
|
|
|
2016-03-01 05:50:00 +00:00
|
|
|
/**
|
|
|
|
* Handles the given CLIPRDR event, which MUST be a Format List event. It
|
|
|
|
* is the responsibility of this function to respond to the Format List
|
|
|
|
* event with a request for clipboard data in one of the enumerated formats.
|
|
|
|
* This event is fired whenever remote clipboard data is available.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param client
|
|
|
|
* The guac_client associated with the current RDP session.
|
2016-03-01 05:50:00 +00:00
|
|
|
*
|
|
|
|
* @param event
|
|
|
|
* The received CLIPRDR message, which must be a Format List event.
|
|
|
|
*/
|
2012-04-30 06:09:00 +00:00
|
|
|
void guac_rdp_process_cb_format_list(guac_client* client,
|
|
|
|
RDP_CB_FORMAT_LIST_EVENT* event);
|
|
|
|
|
2016-03-01 05:50:00 +00:00
|
|
|
/**
|
|
|
|
* Handles the given CLIPRDR event, which MUST be a Data Request event. It
|
|
|
|
* is the responsibility of this function to respond to the Data Request
|
|
|
|
* event with a data response containing the current clipoard contents.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param client
|
|
|
|
* The guac_client associated with the current RDP session.
|
2016-03-01 05:50:00 +00:00
|
|
|
*
|
|
|
|
* @param event
|
|
|
|
* The received CLIPRDR message, which must be a Data Request event.
|
|
|
|
*/
|
2012-04-30 06:28:29 +00:00
|
|
|
void guac_rdp_process_cb_data_request(guac_client* client,
|
|
|
|
RDP_CB_DATA_REQUEST_EVENT* event);
|
|
|
|
|
2016-03-01 05:50:00 +00:00
|
|
|
/**
|
|
|
|
* Handles the given CLIPRDR event, which MUST be a Data Response event. It
|
|
|
|
* is the responsibility of this function to read and forward the received
|
|
|
|
* clipboard data to connected clients.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param client
|
|
|
|
* The guac_client associated with the current RDP session.
|
2016-03-01 05:50:00 +00:00
|
|
|
*
|
|
|
|
* @param event
|
|
|
|
* The received CLIPRDR message, which must be a Data Response event.
|
|
|
|
*/
|
2012-04-30 06:09:00 +00:00
|
|
|
void guac_rdp_process_cb_data_response(guac_client* client,
|
|
|
|
RDP_CB_DATA_RESPONSE_EVENT* event);
|
2012-03-30 18:26:52 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|