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

124 lines
4.0 KiB
C
Raw Normal View History

/*
* Copyright (C) 2013 Glyptodon LLC
2012-03-30 18:26:52 +00:00
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
2012-03-30 18:26:52 +00:00
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
2012-03-30 18:26:52 +00:00
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
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