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

2012-06-27 Thread Uri Lublin
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-usb-dev.c @@ -94,6 +94,8

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

2012-06-27 Thread Uri Lublin
--- 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 +++ b/gtk/usb-device-manager.c @@ -697,6 +697,

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

2012-06-27 Thread Uri Lublin
--- 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 index 9f4fdfc..7388923 100644 --- a/gtk/win-usb

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

2012-06-27 Thread Uri Lublin
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/gtk/usb-device-manager.c

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

2012-06-27 Thread Uri Lublin
- 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'ing a USB device a libusb driver needs to be installed (before libusb can open the device) - A connection (NamedPipe) is established with usb

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

2012-06-27 Thread Uri Lublin
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 changes on windows too. --- gtk/Makefile.am | 13 ++ gtk/usb-device-manager.c |8 +

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

2012-06-27 Thread Uri Lublin
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 files changed, 16 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 09129b7..d928f

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

2012-06-27 Thread Uri Lublin
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-usbredir.c| 46 +- gtk/map-file

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

2012-06-27 Thread Uri Lublin
--- gtk/spice-usb-device-priv.h | 38 + gtk/spice-usb-device.c | 124 +++ gtk/spice-usb-device.h | 57 3 files changed, 219 insertions(+), 0 deletions(-) create mode 100644 gtk/spice-usb-device-priv.h create

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

2012-06-27 Thread Uri Lublin
--- 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 +++ b/gtk/spicy.c @@ -460,7 +460,7 @@ static void menu_cb_select_usb_devices(GtkAction *action, void *data) area = gtk_dialog_ge

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

2012-06-27 Thread Uri Lublin
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.c |2 +- 4 files chan

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

2012-06-27 Thread Uri Lublin
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/namedpipe.c b/gtk/contro

[Spice-devel] [spice-gtk Win32 v3 00/12] usbredir support for Windows (mingw)

2012-06-27 Thread Uri Lublin
This patchset enables usb-redir support in spice-gtk running on Windows. New in V3: - A new gobject class implementing SpiceUsbDevice (was holding libusb_device). - Does not hold references to non-opened libusb devices - Using gobject NamedPipe from controller/ - Using gio when talking to usbc

[Spice-devel] [PATCH spice-server 14/14] char_device: move SpiceCharDeviceState from the header

2012-06-27 Thread Yonit Halperin
In addition, I also removed the no longer used wakeup callback --- server/char_device.c | 21 + server/char_device.h | 26 -- server/reds.c|8 3 files changed, 25 insertions(+), 30 deletions(-) diff --git a/server/char_device.c

[Spice-devel] [PATCH spice-server 13/14] smartcard: use SpiceCharDeviceState for writing to the guest device

2012-06-27 Thread Yonit Halperin
With SpiceCharDeviceState, the smartcard code now supports partial writes, and storing data that is received from the client after the device is stopped, instead of attempting to write it to the guest. --- server/smartcard.c | 115 ++-- 1 files chan

[Spice-devel] [PATCH spice-server 12/14] smartcard: creating SmartCardChannelClient type

2012-06-27 Thread Yonit Halperin
The lifetime of the channel is not necessarily correlated to the life time of the device. In the next patch, we need to keep a reference to SpiceCharDeviceWriteBuffer, which might be in use even if the SpiceCharDeviceState is destroyed, but the channel is still connected. The next patch keeps this

[Spice-devel] [PATCH spice-server 11/14] smartcard: use SpiceCharDeviceState for managing reading from the device

2012-06-27 Thread Yonit Halperin
This patch and the following one do not introduce tokening to the smartcard channel. But this can be done easily later, by setting the appropriate variables in SpiceCharDeviceState (after adding the appropriate protocol messages, and implementing this in the client side). --- server/reds.c |

[Spice-devel] [PATCH spice-server 10/14] spicevmc: use SpiceCharDeviceState for writing to the guest device

2012-06-27 Thread Yonit Halperin
With SpiceCharDeviceState, spicevmc now supports partial writes, and storing data that is received from the client after the device is stopped, instead of attempting to write it to the guest. --- server/spicevmc.c | 49 - 1 files changed, 24 insert

[Spice-devel] [PATCH spice-server 09/14] spicevmc: employ SpiceCharDeviceState for managing reading from the guest device

2012-06-27 Thread Yonit Halperin
This patch and the following one do not introduce tokening to the spicevmc channel. But this can be done easily later, by setting the appropriate variables in SpiceCharDeviceState (after adding the appropriate protocol messages, and implementing this in the client side). --- server/char_device.h |

[Spice-devel] [PATCH spice-server 08/14] agent: employ SpiceCharDeviceState for writing to the device

2012-06-27 Thread Yonit Halperin
--- server/reds.c | 255 ++--- 1 files changed, 44 insertions(+), 211 deletions(-) diff --git a/server/reds.c b/server/reds.c index 5d78d58..58ca354 100644 --- a/server/reds.c +++ b/server/reds.c @@ -167,11 +167,6 @@ typedef struct VDIPortState

[Spice-devel] [PATCH spice-server 07/14] agent: use SpiceCharDeviceWriteBuffer for agent data from the client

2012-06-27 Thread Yonit Halperin
This is an intermediate patch. The next patch will actually push the buffer to the device, instead of copying it. --- server/main_channel.c | 10 +- server/reds.c | 33 + server/reds.h |2 ++ 3 files changed, 44 insertions(+), 1 delet

[Spice-devel] [PATCH spice-server 06/14] agent: employ SpiceCharDeviceState for managing reading from the device

2012-06-27 Thread Yonit Halperin
--- server/main_channel.c | 52 +++--- server/main_channel.h |4 +- server/reds.c | 296 +++-- 3 files changed, 228 insertions(+), 124 deletions(-) diff --git a/server/main_channel.c b/server/main_channel.c index ce467f8..f9492b0 1006

[Spice-devel] [PATCH spice-server 05/14] agent: remove save/restore migration data code

2012-06-27 Thread Yonit Halperin
This code is never called, it was relevant for seamless migration. Most of the data that needs to be migrated was moved to SpiceCharDeviceState. When we implement seamless migration, we will have routines in char_device.c for migrating the relevant data. --- server/reds.c | 252 +-

[Spice-devel] [PATCH spice-server 04/14] agent: Fix tokens handling in main_channel

2012-06-27 Thread Yonit Halperin
- Allow sending tokens to a specific client. - Do not ignore tokens that are sent from the client to the server. The tokens support for multiple clients and for server side tokens is still broken in reds. It will be fixed in following patches, when the server-side agent code will use the SpiceChar

[Spice-devel] [PATCH spice-server 03/14] char_device: Introducing shared flow control code for char devices.

2012-06-27 Thread Yonit Halperin
SpiceCharDeviceState manages the (1) write-to-device queue (2) wakeup and reading from the device (3) client tokens (4) sending messages from the device to the client/s, considering the available tokens. SpiceCharDeviceState can be also stopped and started. When the device is stopped, no reading or

[Spice-devel] [PATCH spice-server 02/14] smartcard: fix an error message

2012-06-27 Thread Yonit Halperin
--- server/smartcard.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/smartcard.c b/server/smartcard.c index cb6b40b..fcf210f 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -535,7 +535,7 @@ static void smartcard_init(void)

[Spice-devel] [PATCH spice-server 01/14] smartcard: fix calc of remaining data size when reading more than one msg from the device

2012-06-27 Thread Yonit Halperin
--- server/smartcard.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/smartcard.c b/server/smartcard.c index 8ded142..cb6b40b 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -107,7 +107,7 @@ void smartcard_char_device_wakeup(SpiceCharDeviceInstance *s

[Spice-devel] [PATCH spice-server 00/14] char device flow control

2012-06-27 Thread Yonit Halperin
Hi, This patch series extends SpiceCharDeviceState to manage the character devices flow control: wakeup and reading from the device; writing to the device; start/stop the device; server/client tokens management, including partial support for multiple clients. The agent, spicevmc, and smartcard,

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

2012-06-27 Thread Marc-André Lureau
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 to be as > > simplistic, as > > possible. There is a hug

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

2012-06-27 Thread Peter Hatina
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 to be as simplistic, as possible. There is a huge context free grammar described at mozilla dev pages, but for our purposes, it exceeds the needs (also I've found, that ther