[Spice-devel] [spice-gtk] controller: handle USB redirection messages

Hans de Goede hdegoede at redhat.com
Tue Apr 3 12:25:00 PDT 2012


ACK.

On 04/03/2012 03:14 PM, Christophe Fergeau wrote:
> ---
>   data/spice-protocol.vapi       |    4 ++++
>   gtk/controller/controller.vala |   12 ++++++++++++
>   spice-common                   |    2 +-
>   3 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/data/spice-protocol.vapi b/data/spice-protocol.vapi
> index 4b88175..66f1373 100644
> --- a/data/spice-protocol.vapi
> +++ b/data/spice-protocol.vapi
> @@ -62,6 +62,10 @@ namespace SpiceProtocol {
>
>   			ENABLE_SMARTCARD,
>
> +			ENABLE_USB,
> +			ENABLE_USB_AUTOSHARE,
> +			USB_FILTER,
> +
>   			//spice client ->  external app
>   			MENU_ITEM_CLICK,
>
> diff --git a/gtk/controller/controller.vala b/gtk/controller/controller.vala
> index 5970aaf..185f5e0 100644
> --- a/gtk/controller/controller.vala
> +++ b/gtk/controller/controller.vala
> @@ -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;
> diff --git a/spice-common b/spice-common
> index 2ab866f..220fc1d 160000
> --- a/spice-common
> +++ b/spice-common
> @@ -1 +1 @@
> -Subproject commit 2ab866f522d8f730a93288fd82a596f00f193909
> +Subproject commit 220fc1d73718e3aa9648261eab966cb364345db3


More information about the Spice-devel mailing list