On Mon, Jul 06, 2015 at 08:59:01PM +0300, Kirill Moizik wrote: > add redirecting property to UsbDeviceManager and expose get/set API > > Signed-off-by: Kirill Moizik <kirill@xxxxxxxxxx> > --- > src/usb-device-manager.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c > index 5b8151f..1b334d3 100644 > --- a/src/usb-device-manager.c > +++ b/src/usb-device-manager.c > @@ -93,6 +93,7 @@ enum { > PROP_AUTO_CONNECT, > PROP_AUTO_CONNECT_FILTER, > PROP_REDIRECT_ON_CONNECT, > + PROP_REDIRECTING, > }; > > enum > @@ -130,6 +131,7 @@ struct _SpiceUsbDeviceManagerPrivate { > SpiceWinUsbDriver *installer; > #endif > gboolean use_usbclerk; > + gboolean redirecting; > #endif > GPtrArray *devices; > GPtrArray *channels; > @@ -241,6 +243,7 @@ static void spice_usb_device_manager_init(SpiceUsbDeviceManager *self) > #ifdef USE_USBREDIR > priv->devices = g_ptr_array_new_with_free_func((GDestroyNotify) > spice_usb_device_unref); > + priv->redirecting = FALSE; > #endif > } > > @@ -421,6 +424,11 @@ static void spice_usb_device_manager_get_property(GObject *gobject, > case PROP_REDIRECT_ON_CONNECT: > g_value_set_string(value, priv->redirect_on_connect); > break; > + case PROP_REDIRECTING: > +#ifdef USE_USBREDIR > + g_value_set_boolean(value, priv->redirecting); > +#endif > + break; Do we want to wrap the whole case PROP_REDIRECTING: in #ifdef so that we get a warning if we try to use this property in a !USBREDIR binary? Looks good to me either way. Christophe
Attachment:
pgpa3NFPud0fa.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel