<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 8 Feb 2016, at 19:24 PM, Jonathon Jongsma <<a href="mailto:jjongsma@redhat.com" class="">jjongsma@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Thu, 2015-10-29 at 17:27 +0200, Dmitry Fleytman wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">From: Kirill Moizik <<a href="mailto:kmoizik@redhat.com" class="">kmoizik@redhat.com</a>><br class=""><br class="">This commit introduces redirecting property of GUdevClient<br class=""><br class="">This property indicates when a redirection operation<br class="">is in progress on a device. It's set back to FALSE<br class="">once the device is fully redirected to the guest.<br class=""><br class="">Signed-off-by: Kirill Moizik <<a href="mailto:kmoizik@redhat.com" class="">kmoizik@redhat.com</a>><br class="">Signed-off-by: Dmitry Fleytman <<a href="mailto:dfleytma@redhat.com" class="">dfleytma@redhat.com</a>><br class="">---<br class="">src/win-usb-dev.c | 61<br class="">+++++++++++++++++++++++++++++++++++++++++++++++++++++++<br class="">1 file changed, 61 insertions(+)<br class=""><br class="">diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c<br class="">index 1e4b2d6..60bc434 100644<br class="">--- a/src/win-usb-dev.c<br class="">+++ b/src/win-usb-dev.c<br class="">@@ -32,11 +32,17 @@<br class="">#define G_UDEV_CLIENT_GET_PRIVATE(obj) \<br class="">    (G_TYPE_INSTANCE_GET_PRIVATE((obj), G_UDEV_TYPE_CLIENT,<br class="">GUdevClientPrivate))<br class=""><br class="">+enum {<br class="">+    PROP_0,<br class="">+    PROP_REDIRECTING<br class="">+};<br class="">+<br class="">struct _GUdevClientPrivate {<br class="">    libusb_context *ctx;<br class="">    gssize udev_list_size;<br class="">    GList *udev_list;<br class="">    HWND hwnd;<br class="">+    gboolean redirecting;<br class="">};<br class=""><br class="">#define G_UDEV_CLIENT_WINCLASS_NAME  TEXT("G_UDEV_CLIENT")<br class="">@@ -272,11 +278,52 @@ static void g_udev_client_finalize(GObject *gobject)<br class="">        G_OBJECT_CLASS(g_udev_client_parent_class)->finalize(gobject);<br class="">}<br class=""><br class="">+static void g_udev_client_get_property(GObject     *gobject,<br class="">+                                       guint        prop_id,<br class="">+                                       GValue      *value,<br class="">+                                       GParamSpec  *pspec)<br class="">+{<br class="">+    GUdevClient *self = G_UDEV_CLIENT(gobject);<br class="">+    GUdevClientPrivate *priv = self->priv;<br class="">+<br class="">+    switch (prop_id) {<br class="">+    case PROP_REDIRECTING:<br class="">+        g_value_set_boolean(value, priv->redirecting);<br class="">+        break;<br class="">+    default:<br class="">+        G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);<br class="">+        break;<br class="">+    }<br class="">+}<br class="">+<br class="">+static void handle_dev_change(GUdevClient *self);<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">It seems this bit was accidentally included? I don't see it used anywhere within</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">this patch.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>Yes, this is needed later. Moving to to the proper patch...</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">+<br class="">+static void g_udev_client_set_property(GObject       *gobject,<br class="">+                                       guint          prop_id,<br class="">+                                       const GValue  *value,<br class="">+                                       GParamSpec    *pspec)<br class="">+{<br class="">+    GUdevClient *self = G_UDEV_CLIENT(gobject);<br class="">+    GUdevClientPrivate *priv = self->priv;<br class="">+<br class="">+    switch (prop_id) {<br class="">+    case PROP_REDIRECTING:<br class="">+        priv->redirecting = g_value_get_boolean(value);<br class="">+        break;<br class="">+    default:<br class="">+        G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);<br class="">+        break;<br class="">+    }<br class="">+}<br class="">+<br class="">static void g_udev_client_class_init(GUdevClientClass *klass)<br class="">{<br class="">    GObjectClass *gobject_class = G_OBJECT_CLASS(klass);<br class="">+    GParamSpec *pspec;<br class=""><br class="">    gobject_class->finalize = g_udev_client_finalize;<br class="">+    gobject_class->get_property = g_udev_client_get_property;<br class="">+    gobject_class->set_property = g_udev_client_set_property;<br class=""><br class="">    signals[UEVENT_SIGNAL] =<br class="">        g_signal_new("uevent",<br class="">@@ -290,6 +337,20 @@ static void g_udev_client_class_init(GUdevClientClass<br class="">*klass)<br class="">                     G_TYPE_STRING,<br class="">                     G_UDEV_TYPE_DEVICE);<br class=""><br class="">+    /**<br class="">+    * GUdevClient::redirecting:<br class="">+    *<br class="">+    * This property indicates when a redirection operation<br class="">+    * is in progress on a device. It's set back to FALSE<br class="">+    * once the device is fully redirected to the guest.<br class="">+    */<br class="">+    pspec = g_param_spec_boolean("redirecting", "Redirecting",<br class="">+                                 "USB redirection operation is in progress",<br class="">+                                 FALSE,<br class="">+                                 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);<br class="">+<br class="">+    g_object_class_install_property(gobject_class, PROP_REDIRECTING, pspec);<br class="">+<br class="">    g_type_class_add_private(klass, sizeof(GUdevClientPrivate));<br class="">}<br class=""><br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Aside from the extra declaration above, the code looks fine. I can't yet tell wh</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">ether this property makes sense until I get farther into the patchset and see</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">how it is used.</span></div></blockquote><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Reviewed-by: Jonathon Jongsma <</span><a href="mailto:jjongsma@redhat.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">jjongsma@redhat.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">></span></div></blockquote></div><br class=""></body></html>