controller: handle USB redirection messages

This commit is contained in:
Christophe Fergeau
2012-04-04 10:22:00 +02:00
parent 79436bcd0d
commit 2eaa3cf7ad
3 changed files with 17 additions and 1 deletions
+4
View File
@@ -62,6 +62,10 @@ namespace SpiceProtocol {
ENABLE_SMARTCARD,
ENABLE_USB,
ENABLE_USB_AUTOSHARE,
USB_FILTER,
//spice client -> external app
MENU_ITEM_CLICK,
+12
View File
@@ -43,6 +43,9 @@ public class Controller: Object {
public bool send_cad { private set; get; }
public string[] disable_effects {private set; get; }
public uint32 color_depth {private set; get; }
public bool enable_usbredir { private set; get; }
public bool enable_usb_autoshare { private set; get; }
public string usb_filter { private set; get; }
public signal void do_connect ();
public signal void show ();
@@ -160,6 +163,15 @@ public class Controller: Object {
case SpiceProtocol.Controller.MsgId.HIDE:
hide ();
break;
case SpiceProtocol.Controller.MsgId.ENABLE_USB:
enable_usbredir = (bool)v.value;
break;
case SpiceProtocol.Controller.MsgId.ENABLE_USB_AUTOSHARE:
enable_usb_autoshare = (bool)v.value;
break;
case SpiceProtocol.Controller.MsgId.USB_FILTER:
usb_filter = str;
break;
default:
warn_if_reached ();
return false;