Re: [Spice-devel] [spice-gtk Win32 v3 08/12] Windows mingw: usb: Dynamically install a libusb driver for USB devices

2012-06-28 Thread Arnon Gilboa
on a brief review, it seems ok, but won't a worker thread simplify the code and cut it by half? few minor comments below. Uri Lublin wrote: - Added win-usb-driver-install.[ch] - Added win-usb-clerk.h Operation (on Windows, spice-gtk point of view): - After some sanity checks, just before redir

Re: [Spice-devel] [spice-gtk Win32 v3 12/12] Win32/mingw: win-usb-dev: skip hubs

2012-06-28 Thread Arnon Gilboa
ack Uri Lublin wrote: also skip devices with bad (0) device-address. --- gtk/win-usb-dev.c | 26 -- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gtk/win-usb-dev.c b/gtk/win-usb-dev.c index b07d28b..dfdb20d 100644 --- a/gtk/win-usb-dev.c +++ b/gtk/win

Re: [Spice-devel] [spice-gtk Win32 v3 11/12] Win32/mingw: usb-device-manager: uninstall win usb driver upon device disconnect

2012-06-28 Thread Arnon Gilboa
ack, but see note below. Uri Lublin wrote: --- gtk/usb-device-manager.c | 37 ++--- 1 files changed, 34 insertions(+), 3 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index d4740cf..e4a098c 100644 --- a/gtk/usb-device-manager.c

Re: [Spice-devel] SPICY with usb redirection webcam

2012-06-28 Thread Hans de Goede
Hi, On 06/28/2012 01:54 AM, Jackson wrote: I use spicy to connect to a VM supporting usb redirection, but there are some problems with usb webcam. Plug in the webcam with usb redirection and then, I open the webcam application (ex: skype or amcap); however, the VM only shows the first view and

Re: [Spice-devel] [spice-gtk Win32 v3 07/12] Windows mingw: usb: implement GUdevDevice & GUdevClient for windows

2012-06-28 Thread Uri Lublin
On 06/28/2012 04:36 PM, Arnon Gilboa wrote: reviewed most of it before;) but added some comments for your changes below. Uri Lublin wrote: From: Arnon Gilboa +struct _GUdevDevicePrivate +{ +/* FixMe: move above fields to this structure and access them directly */ it will cleanup some

Re: [Spice-devel] [spice-gtk Win32 v3 10/12] win-usb-driver-install: add capability to remove (uninstall) a win usb driver

2012-06-28 Thread Arnon Gilboa
ack. I know this one;) Uri Lublin wrote: --- gtk/win-usb-driver-install.c | 69 +- gtk/win-usb-driver-install.h |6 2 files changed, 54 insertions(+), 21 deletions(-) diff --git a/gtk/win-usb-driver-install.c b/gtk/win-usb-driver-install.c ind

Re: [Spice-devel] SPICY with usb redirection webcam

2012-06-28 Thread Dominique Rodrigues
I have done also some tests with redirection of an usb webcam. It worked fine using a centos guest (my host is under debian) but not for a windows guest. In the latter, it even crashed my computer. Regards Dominique Le 28/06/2012 01:54, Jackson a é

[Spice-devel] SPICY with usb redirection webcam

2012-06-28 Thread Jackson
I use spicy to connect to a VM supporting usb redirection, but there are some problems with usb webcam. Plug in the webcam with usb redirection and then, I open the webcam application (ex: skype or amcap); however, the VM only shows the first view and stop running. The client and the VM are alm

Re: [Spice-devel] [spice-gtk Win32 v3 07/12] Windows mingw: usb: implement GUdevDevice & GUdevClient for windows

2012-06-28 Thread Arnon Gilboa
reviewed most of it before;) but added some comments for your changes below. Uri Lublin wrote: From: Arnon Gilboa - Added win-usb-dev.[ch] - Added GUdevDevice and GUdevClient like classes - Added uevent signal based on WM_DEVICECHANGE With this patch usb-device-manager can work with little ch

Re: [Spice-devel] [spice-gtk Win32 v3 07/12] Windows mingw: usb: implement GUdevDevice & GUdevClient for windows

2012-06-28 Thread Uri Lublin
On 06/28/2012 04:46 AM, Uri Lublin wrote: +#define INT_RETURN_IF_DIFFERENT(x, y) \ +do { gint c,d; c=(x); d=(y); if(c-d) return (c-d); } while(0) + +static gint gudev_device_compare(GUdevDevice *a, GUdevDevice *b) +{ +GUdevDeviceInfo *ai, *bi; + +g_return_val_if_fail(G_UDEV_DEVICE(a),

Re: [Spice-devel] [spice-gtk Win32 v3 06/12] Windows mingw: usb: configure.ac: do not require GUDEV for USBREDIR

2012-06-28 Thread Uri Lublin
On 06/28/2012 09:53 AM, Arnon Gilboa wrote: ack, seems ok to me but can u pls remind me why needed to add $(GUDEV_CFLAGS/LIBS) ? Before the CFLAGS and LIBS of GUDEV where included in the CFLAGS and LIBS of USBREDIR Now they are not, so I added them separately in Makefile.am Uri Lublin wrot

Re: [Spice-devel] [spice-gtk Win32 v3 05/12] Make SpiceUsbDevice a gobject, instead of a box for libusb_device

2012-06-28 Thread Christophe Fergeau
On Thu, Jun 28, 2012 at 03:42:28PM +0300, Uri Lublin wrote: > On 06/28/2012 01:09 PM, Christophe Fergeau wrote: > >On Thu, Jun 28, 2012 at 04:46:34AM +0300, Uri Lublin wrote: > >>+if ((vid> 0)&& (pid> 0)) { > >>+descriptor = g_strdup_printf("[%04x:%04x]", vid, pid); > >I don't think

Re: [Spice-devel] [spice-gtk Win32 v3 05/12] Make SpiceUsbDevice a gobject, instead of a box for libusb_device

2012-06-28 Thread Uri Lublin
On 06/28/2012 01:09 PM, Christophe Fergeau wrote: On Thu, Jun 28, 2012 at 04:46:34AM +0300, Uri Lublin wrote: Note that this change may affect performance a bit, as we now need to look for the libusb_device if we need it. Likely it's negligible. --- gtk/Makefile.am |4 + gtk

Re: [Spice-devel] [spice-gtk Win32 v3 04/12] Add implementation of SpiceUsbDevice as a gobject (new files spice-usb-device*)

2012-06-28 Thread Uri Lublin
On 06/28/2012 12:49 PM, Christophe Fergeau wrote: On Thu, Jun 28, 2012 at 04:46:33AM +0300, Uri Lublin wrote: diff --git a/gtk/spice-usb-device.c b/gtk/spice-usb-device.c +void spice_usb_device_set_info(SpiceUsbDevice *self, libusb_device *libdev) When USE_USBREDIR is not defined, there still i

Re: [Spice-devel] [spice-gtk Win32 v3 02/12] NamedPipe: spice_named_pipe_new: add param to distinguish Server or Client

2012-06-28 Thread Marc-André Lureau
El jue, 28-06-2012 a las 14:27 +0300, Uri Lublin escribió: > > Are you sure you need namedpipe object for that? > > > > I think you could have used regular GWin32InputStream GWin32OutputStream.. > > > > (that was my initial design, iirc) > > I'm not sure I really need a namedpipe object. > It's on

Re: [Spice-devel] [spice-gtk Win32 v3 04/12] Add implementation of SpiceUsbDevice as a gobject (new files spice-usb-device*)

2012-06-28 Thread Uri Lublin
On 06/28/2012 01:38 PM, Marc-André Lureau wrote: On Thu, Jun 28, 2012 at 11:18 AM, Uri Lublin wrote: IIUC, the-priv.h file is only included in code inside the library, while.h can be included in code outside of the library too. Good rule, it's followed more or less in spice-gtk (because everyt

Re: [Spice-devel] [spice-gtk Win32 v3 02/12] NamedPipe: spice_named_pipe_new: add param to distinguish Server or Client

2012-06-28 Thread Uri Lublin
On 06/28/2012 01:31 PM, Marc-André Lureau wrote: Currently both users are servers. --- gtk/controller/namedpipe.c | 24 +--- gtk/controller/namedpipe.h |4 +++- gtk/controller/spice-controller-listener.c |2 +- gtk/controlle

Re: [Spice-devel] [spice-gtk Win32 v3 05/12] Make SpiceUsbDevice a gobject, instead of a box for libusb_device

2012-06-28 Thread Arnon Gilboa
Seems great to me, but few comments below. Uri Lublin wrote: Note that this change may affect performance a bit, as we now need to look for the libusb_device if we need it. Likely it's negligible. --- gtk/Makefile.am |4 + gtk/channel-usbredir-priv.h |4 +- gtk/channel-u

Re: [Spice-devel] [spice-gtk Win32 v3 05/12] Make SpiceUsbDevice a gobject, instead of a box for libusb_device

2012-06-28 Thread Marc-André Lureau
On Thu, Jun 28, 2012 at 3:46 AM, Uri Lublin wrote: > -#define SPICE_TYPE_USB_DEVICE                     > (spice_usb_device_get_type()) > + > >  typedef struct _SpiceUsbDeviceManager SpiceUsbDeviceManager; >  typedef struct _SpiceUsbDeviceManagerClass SpiceUsbDeviceManagerClass; >  typedef struct

Re: [Spice-devel] [spice-gtk Win32 v3 04/12] Add implementation of SpiceUsbDevice as a gobject (new files spice-usb-device*)

2012-06-28 Thread Marc-André Lureau
On Thu, Jun 28, 2012 at 11:18 AM, Uri Lublin wrote: > IIUC, the -priv.h file is only included in code inside the > library, > while .h can be included in code outside of the library too. Good rule, it's followed more or less in spice-gtk (because everything is not gobject and some stuffs are lega

Re: [Spice-devel] [spice-gtk Win32 v3 02/12] NamedPipe: spice_named_pipe_new: add param to distinguish Server or Client

2012-06-28 Thread Marc-André Lureau
Hi > Uri Lublin wrote: >> >> Currently both users are servers. >> --- >>  gtk/controller/namedpipe.c                   |   24 >> +--- >>  gtk/controller/namedpipe.h                   |    4 +++- >>  gtk/controller/spice-controller-listener.c   |    2 +- >>  gtk/controller/spice

Re: [Spice-devel] [spice-gtk Win32 v3 05/12] Make SpiceUsbDevice a gobject, instead of a box for libusb_device

2012-06-28 Thread Christophe Fergeau
On Thu, Jun 28, 2012 at 04:46:34AM +0300, Uri Lublin wrote: > Note that this change may affect performance a bit, as we now need to look > for the libusb_device if we need it. Likely it's negligible. > --- > gtk/Makefile.am |4 + > gtk/channel-usbredir-priv.h |4 +- > gtk/c

Re: [Spice-devel] [spice-gtk Win32 v3 04/12] Add implementation of SpiceUsbDevice as a gobject (new files spice-usb-device*)

2012-06-28 Thread Christophe Fergeau
On Thu, Jun 28, 2012 at 04:46:33AM +0300, Uri Lublin wrote: > --- > gtk/spice-usb-device-priv.h | 38 + > gtk/spice-usb-device.c | 124 > +++ > gtk/spice-usb-device.h | 57 > 3 files changed, 219 insertions(+)

Re: [Spice-devel] [spice-gtk Win32 v3 04/12] Add implementation of SpiceUsbDevice as a gobject (new files spice-usb-device*)

2012-06-28 Thread Uri Lublin
Hi Arnon, Thanks for reviewing. On 06/28/2012 09:45 AM, Arnon Gilboa wrote: See notes below. I guess you defined it only for ref counting, otherwise you would have used simply a struct (similar to _SpiceUsbDevicePrivate) ? btw, why define Private and getters and not putting it all public? Is

Re: [Spice-devel] [PATCH] spice-xpi test page generator

2012-06-28 Thread Peter Hatina
On 06/27/2012 04:40 PM, Marc-André Lureau wrote: > Hi > > - Mensaje original - >> On Wed, Jun 27, 2012 at 02:00:48PM +0200, Peter Hatina wrote: >>> Hi, >>> >>> David Jasa gave me an input to create some tool for automatic >>> generation >>> of spice-xpi test page. So here we are. I tried t

Re: [Spice-devel] [PATCH spice-gtk] agent: fix mishandling of SPICE_MSG_MAIN_AGENT_TOKEN

2012-06-28 Thread Hans de Goede
Good one, ack. Regards, Hans On 06/28/2012 10:06 AM, Yonit Halperin wrote: Add the given tokens instead of overriding the existing ones. --- gtk/channel-main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gtk/channel-main.c b/gtk/channel-main.c index fc6c97e..7

[Spice-devel] [PATCH spice-gtk] agent: fix mishandling of SPICE_MSG_MAIN_AGENT_TOKEN

2012-06-28 Thread Yonit Halperin
Add the given tokens instead of overriding the existing ones. --- gtk/channel-main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gtk/channel-main.c b/gtk/channel-main.c index fc6c97e..70861e6 100644 --- a/gtk/channel-main.c +++ b/gtk/channel-main.c @@ -1464,7 +1464,7

Re: [Spice-devel] [spice-gtk Win32 v3 09/12] usb-device-manager: warn if a device to remove was not found

2012-06-28 Thread Arnon Gilboa
ack Uri Lublin wrote: Also changed a bit the warning text on device-add to differentiate the two. --- gtk/usb-device-manager.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index 8340335..d4740cf 100644 --- a/

Re: [Spice-devel] [spice-gtk Win32 v3 06/12] Windows mingw: usb: configure.ac: do not require GUDEV for USBREDIR

2012-06-28 Thread Arnon Gilboa
ack, seems ok to me but can u pls remind me why needed to add $(GUDEV_CFLAGS/LIBS) ? Uri Lublin wrote: For windows GUDEV is not required For Linux GUDEV is checked as a part of USBREDIR block, but as a separate check. --- configure.ac| 15 ++- gtk/Makefile.am |2 ++ 2 fil

Re: [Spice-devel] [spice-gtk Win32 v3 04/12] Add implementation of SpiceUsbDevice as a gobject (new files spice-usb-device*)

2012-06-28 Thread Arnon Gilboa
See notes below. I guess you defined it only for ref counting, otherwise you would have used simply a struct (similar to _SpiceUsbDevicePrivate) ? btw, why define Private and getters and not putting it all public? Is it the the right gobject-way? no shorter way to do it? (see spice_msg_in_ref(S

Re: [Spice-devel] [spice-gtk Win32 v3 03/12] spicy: more informative presentation of usb devices in menu

2012-06-28 Thread Arnon Gilboa
ack, but a short comment on the detailed default format of spice_usb_device_get_description() will be nice. Uri Lublin wrote: --- gtk/spicy.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gtk/spicy.c b/gtk/spicy.c index 98a44d5..ba0aa4b 100644 --- a/gtk/spicy.c +++

Re: [Spice-devel] [spice-gtk Win32 v3 02/12] NamedPipe: spice_named_pipe_new: add param to distinguish Server or Client

2012-06-28 Thread Arnon Gilboa
ack Uri Lublin wrote: Currently both users are servers. --- gtk/controller/namedpipe.c | 24 +--- gtk/controller/namedpipe.h |4 +++- gtk/controller/spice-controller-listener.c |2 +- gtk/controller/spice-foreign-menu-listener.

Re: [Spice-devel] [spice-gtk Win32 v3 01/12] namedpipe: add is_server property

2012-06-28 Thread Arnon Gilboa
ack Uri Lublin wrote: Currently only NamePipe server is available. We want to support also NamedPipe Client. This property is to be used in a following patch. --- gtk/controller/namedpipe.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/gtk/controller