chansrv: work on clipboard
This commit is contained in:
parent
5e271a02ac
commit
c1dfea1613
@ -68,7 +68,7 @@ int g_exec_pid = 0;
|
||||
|
||||
/* each time we create a DVC we need a unique DVC channel id */
|
||||
/* this variable gets bumped up once per DVC we create */
|
||||
uint32_t g_dvc_chan_id = 100;
|
||||
tui32 g_dvc_chan_id = 100;
|
||||
|
||||
/*****************************************************************************/
|
||||
/* add data to chan_item, on its way to the client */
|
||||
@ -1282,7 +1282,7 @@ find_empty_slot_in_dvc_channels()
|
||||
* @return xrdp_api_data struct containing dvc_chan_id or NULL on failure
|
||||
******************************************************************************/
|
||||
struct xrdp_api_data *APP_CC
|
||||
struct_from_dvc_chan_id(uint32_t dvc_chan_id)
|
||||
struct_from_dvc_chan_id(tui32 dvc_chan_id)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1298,7 +1298,7 @@ struct_from_dvc_chan_id(uint32_t dvc_chan_id)
|
||||
}
|
||||
|
||||
int
|
||||
remove_struct_with_chan_id(uint32_t dvc_chan_id)
|
||||
remove_struct_with_chan_id(tui32 dvc_chan_id)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
#if !defined(CHANSRV_H)
|
||||
#define CHANSRV_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "arch.h"
|
||||
#include "parse.h"
|
||||
#include "log.h"
|
||||
@ -51,15 +50,15 @@ struct xrdp_api_data
|
||||
|
||||
/* for dynamic virtual channels */
|
||||
struct trans *transp;
|
||||
uint32_t dvc_chan_id;
|
||||
tui32 dvc_chan_id;
|
||||
int is_connected;
|
||||
};
|
||||
|
||||
int APP_CC send_channel_data(int chan_id, char *data, int size);
|
||||
int APP_CC main_cleanup(void);
|
||||
int APP_CC find_empty_slot_in_dvc_channels();
|
||||
struct xrdp_api_data *APP_CC struct_from_dvc_chan_id(uint32_t dvc_chan_id);
|
||||
int remove_struct_with_chan_id(uint32_t dvc_chan_id);
|
||||
struct xrdp_api_data *APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id);
|
||||
int remove_struct_with_chan_id(tui32 dvc_chan_id);
|
||||
|
||||
#define LOG_LEVEL 5
|
||||
|
||||
|
@ -495,6 +495,7 @@ clipboard_send_format_announce(tui32 format_id, char *format_name)
|
||||
{
|
||||
if (format_id == CB_FORMAT_FILE)
|
||||
{
|
||||
/* canned response for "file" */
|
||||
out_uint32_le(s, 0x0000c0bc);
|
||||
clipboard_out_unicode(s, "FileGroupDescriptorW", 21);
|
||||
out_uint32_le(s, 0x0000c0ba);
|
||||
@ -504,6 +505,7 @@ clipboard_send_format_announce(tui32 format_id, char *format_name)
|
||||
}
|
||||
else if (format_id == CB_FORMAT_DIB)
|
||||
{
|
||||
/* canned response for "bitmap" */
|
||||
out_uint32_le(s, 0x0000c004);
|
||||
clipboard_out_unicode(s, "Native", 7);
|
||||
out_uint32_le(s, 0x00000003);
|
||||
@ -873,7 +875,8 @@ clipboard_process_data_response(struct stream *s, int clip_msg_status,
|
||||
if (g_want_image_data)
|
||||
{
|
||||
g_want_image_data = 0;
|
||||
clipboard_process_data_response_for_image(s, clip_msg_status, clip_msg_len);
|
||||
clipboard_process_data_response_for_image(s, clip_msg_status,
|
||||
clip_msg_len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -942,8 +945,9 @@ clipboard_process_data_response(struct stream *s, int clip_msg_status,
|
||||
lxev = &(g_selection_request_event[index]);
|
||||
clipboard_provide_selection(lxev, lxev->target, 8, g_data_in,
|
||||
data_in_len);
|
||||
LOGM((LOG_LEVEL_DEBUG, "clipboard_process_data_response: requestor %d "
|
||||
"data_in_len %d", lxev->requestor, data_in_len));
|
||||
LOGM((LOG_LEVEL_DEBUG, "clipboard_process_data_response: "
|
||||
"requestor %d data_in_len %d",
|
||||
lxev->requestor, data_in_len));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,11 @@
|
||||
#define CB_FORMAT_GIF 0xD013
|
||||
#define CB_FORMAT_FILE 0xC0BC
|
||||
|
||||
/* these are the supported general types */
|
||||
#define XRDP_CB_TEXT 1
|
||||
#define XRDP_CB_BITMAP 2
|
||||
#define XRDP_CB_FILE 3
|
||||
|
||||
int APP_CC
|
||||
clipboard_init(void);
|
||||
int APP_CC
|
||||
|
Loading…
Reference in New Issue
Block a user