guacamole-spice-protocol/src/protocols/rdp/rdp_cliprdr.h

121 lines
3.7 KiB
C
Raw Normal View History

/*
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.
*/
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
2013-07-18 18:54:22 +00:00
#ifdef ENABLE_WINPR
2013-07-19 04:52:40 +00:00
#include <winpr/stream.h>
2013-07-18 18:54:22 +00:00
#else
2013-07-19 04:52:40 +00:00
#include "compat/winpr-stream.h"
2013-07-18 18:54:22 +00:00
#endif
2014-01-01 22:44:28 +00:00
#ifdef HAVE_FREERDP_CLIENT_CLIPRDR_H
#include <freerdp/client/cliprdr.h>
#else
#include "compat/client-cliprdr.h"
#endif
2012-03-30 18:26:52 +00:00
/**
* Clipboard format for text encoded in Windows CP1252.
*/
#define GUAC_RDP_CLIPBOARD_FORMAT_CP1252 1
/**
* Clipboard format for text encoded in UTF-16.
*/
#define GUAC_RDP_CLIPBOARD_FORMAT_UTF16 2
/**
* 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.
*
* @param client
* The guac_client associated with the current RDP session.
*
* @param event
* The received CLIPRDR message.
*/
2013-07-18 18:54:22 +00:00
void guac_rdp_process_cliprdr_event(guac_client* client, wMessage* event);
/**
* 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.
*
* @param client
* The guac_client associated with the current RDP session.
*
* @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
/**
* 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.
*
* @param client
* The guac_client associated with the current RDP session.
*
* @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);
/**
* 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.
*
* @param client
* The guac_client associated with the current RDP session.
*
* @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);
/**
* 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.
*
* @param client
* The guac_client associated with the current RDP session.
*
* @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