33 |
static cliprdr_dataformat *server_formats = NULL; |
static cliprdr_dataformat *server_formats = NULL; |
34 |
static uint16 num_server_formats = 0; |
static uint16 num_server_formats = 0; |
35 |
static XSelectionEvent selection_event; |
static XSelectionEvent selection_event; |
36 |
|
static uint16 clipboard_channelno; |
37 |
|
|
38 |
static void |
static void |
39 |
cliprdr_print_server_formats(void) |
cliprdr_print_server_formats(void) |
96 |
out_uint32_le(s, 0); |
out_uint32_le(s, 0); |
97 |
|
|
98 |
s_mark_end(s); |
s_mark_end(s); |
99 |
sec_send_to_channel(s, encryption ? SEC_ENCRYPT : 0, 1005); // FIXME: Don't hardcode channel! |
sec_send_to_channel(s, encryption ? SEC_ENCRYPT : 0, |
100 |
|
clipboard_channelno); |
101 |
} |
} |
102 |
|
|
103 |
|
|
116 |
out_uint32_le(out, 0); |
out_uint32_le(out, 0); |
117 |
s_mark_end(out); |
s_mark_end(out); |
118 |
|
|
119 |
sec_send_to_channel(out, encryption ? SEC_ENCRYPT : 0, 1005); // FIXME: Don't hardcode channel! |
sec_send_to_channel(out, encryption ? SEC_ENCRYPT : 0, |
120 |
|
clipboard_channelno); |
121 |
} |
} |
122 |
|
|
123 |
|
|
212 |
out_uint32_le(out, 0); |
out_uint32_le(out, 0); |
213 |
s_mark_end(out); |
s_mark_end(out); |
214 |
|
|
215 |
sec_send_to_channel(out, encryption ? SEC_ENCRYPT : 0, 1005); // FIXME: Don't hardcode channel! |
sec_send_to_channel(out, encryption ? SEC_ENCRYPT : 0, |
216 |
|
clipboard_channelno); |
217 |
|
|
218 |
cliprdr_send_format_announce(); |
cliprdr_send_format_announce(); |
219 |
|
|
245 |
|
|
246 |
s_mark_end(s); |
s_mark_end(s); |
247 |
|
|
248 |
sec_send_to_channel(s, encryption ? SEC_ENCRYPT : 0, 1005); // FIXME: Don't hardcode channel! |
sec_send_to_channel(s, encryption ? SEC_ENCRYPT : 0, |
249 |
|
clipboard_channelno); |
250 |
} |
} |
251 |
|
|
252 |
|
|
346 |
|
|
347 |
s_mark_end(s); |
s_mark_end(s); |
348 |
|
|
349 |
sec_send_to_channel(s, encryption ? SEC_ENCRYPT : 0, 1005); // FIXME: Don't hardcode channel! |
sec_send_to_channel(s, encryption ? SEC_ENCRYPT : 0, |
350 |
|
clipboard_channelno); |
351 |
} |
} |
352 |
|
|
353 |
|
|
492 |
} |
} |
493 |
|
|
494 |
|
|
495 |
void cliprdr_callback(STREAM s) |
void cliprdr_callback(STREAM s, uint16 channelno) |
496 |
{ |
{ |
497 |
static int failed_clipboard_acks = 0; |
static int failed_clipboard_acks = 0; |
498 |
struct timeval timeval; |
struct timeval timeval; |
499 |
uint32 length, flags; |
uint32 length, flags; |
500 |
uint16 ptype0, ptype1; |
uint16 ptype0, ptype1; |
501 |
DEBUG_CLIPBOARD(("cliprdr_callback called, clipboard data:\n")); |
clipboard_channelno = channelno; |
502 |
|
DEBUG_CLIPBOARD(("cliprdr_callback called with channelno %d, clipboard data:\n", channelno)); |
503 |
#ifdef WITH_DEBUG_CLIPBOARD |
#ifdef WITH_DEBUG_CLIPBOARD |
504 |
hexdump(s->p, s->end - s->p); |
hexdump(s->p, s->end - s->p); |
505 |
#endif |
#endif |