Add config functions.

A bunch of configuration functions where never ported forward from
rhel-6 to upstream.  Add them so we can add qemu config options for
these settings.
This commit is contained in:
Gerd Hoffmann 2010-08-27 15:35:06 +02:00
parent 94028c1348
commit 9681ebb671
2 changed files with 38 additions and 0 deletions

View File

@ -3933,6 +3933,33 @@ __visible__ int spice_server_kbd_leds(SpiceKbdInstance *sin, int leds)
return 0;
}
__visible__ int spice_server_set_streaming_video(SpiceServer *s, int value)
{
ASSERT(reds == s);
if (value != SPICE_STREAM_VIDEO_OFF &&
value != SPICE_STREAM_VIDEO_ALL &&
value != SPICE_STREAM_VIDEO_FILTER)
return -1;
streaming_video = value;
red_dispatcher_on_sv_change();
return 0;
}
__visible__ int spice_server_set_playback_compression(SpiceServer *s, int enable)
{
ASSERT(reds == s);
snd_set_playback_compression(enable);
return 0;
}
__visible__ int spice_server_set_agent_mouse(SpiceServer *s, int enable)
{
ASSERT(reds == s);
agent_mouse = enable;
reds_update_mouse_mode();
return 0;
}
__visible__ int spice_server_migrate_info(SpiceServer *s, const char* dest,
int port, int secure_port,
const char* cert_subject)

View File

@ -360,6 +360,17 @@ int spice_server_set_channel_security(SpiceServer *s, const char *channel, int s
int spice_server_add_renderer(SpiceServer *s, const char *name);
enum {
SPICE_STREAM_VIDEO_INVALID,
SPICE_STREAM_VIDEO_OFF,
SPICE_STREAM_VIDEO_ALL,
SPICE_STREAM_VIDEO_FILTER
};
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_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);