mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 11:28:31 +00:00
server: Make copy paste support configurable
Also bump SPICE_SERVER_VERSION to 0x000801 as 0.8.1 will be the first version with the new API for this, and we need to be able to detect the presence of this API in qemu.
This commit is contained in:
parent
0417117417
commit
302ab69f5b
@ -103,6 +103,7 @@ spice_wan_compression_t zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO;
|
||||
void *red_tunnel = NULL;
|
||||
#endif
|
||||
int agent_mouse = TRUE;
|
||||
int agent_copypaste = TRUE;
|
||||
|
||||
static void openssl_init();
|
||||
|
||||
@ -3745,8 +3746,8 @@ static void init_vd_agent_resources()
|
||||
ring_init(&state->internal_bufs);
|
||||
ring_init(&state->write_queue);
|
||||
ring_init(&state->read_bufs);
|
||||
agent_msg_filter_init(&state->write_filter, TRUE);
|
||||
agent_msg_filter_init(&state->read_filter, TRUE);
|
||||
agent_msg_filter_init(&state->write_filter, agent_copypaste);
|
||||
agent_msg_filter_init(&state->read_filter, agent_copypaste);
|
||||
|
||||
state->read_state = VDI_PORT_READ_STATE_READ_HADER;
|
||||
state->recive_pos = (uint8_t *)&state->vdi_chunk_header;
|
||||
@ -4154,6 +4155,15 @@ __visible__ int spice_server_set_agent_mouse(SpiceServer *s, int enable)
|
||||
return 0;
|
||||
}
|
||||
|
||||
__visible__ int spice_server_set_agent_copypaste(SpiceServer *s, int enable)
|
||||
{
|
||||
ASSERT(reds == s);
|
||||
agent_copypaste = enable;
|
||||
reds->agent_state.write_filter.copy_paste_enabled = agent_copypaste;
|
||||
reds->agent_state.read_filter.copy_paste_enabled = agent_copypaste;
|
||||
return 0;
|
||||
}
|
||||
|
||||
__visible__ int spice_server_migrate_info(SpiceServer *s, const char* dest,
|
||||
int port, int secure_port,
|
||||
const char* cert_subject)
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#define SPICE_SERVER_VERSION 0x000800 /* release 0.8.0 */
|
||||
#define SPICE_SERVER_VERSION 0x000801 /* release 0.8.1 */
|
||||
|
||||
/* interface base type */
|
||||
|
||||
@ -426,6 +426,7 @@ enum {
|
||||
int spice_server_set_streaming_video(SpiceServer *s, int value);
|
||||
int spice_server_set_playback_compression(SpiceServer *s, int enable);
|
||||
int spice_server_set_agent_mouse(SpiceServer *s, int enable);
|
||||
int spice_server_set_agent_copypaste(SpiceServer *s, int enable);
|
||||
|
||||
int spice_server_get_sock_info(SpiceServer *s, struct sockaddr *sa, socklen_t *salen);
|
||||
int spice_server_get_peer_info(SpiceServer *s, struct sockaddr *sa, socklen_t *salen);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user