[Spice-devel] [PATCH spice-gtk 1/6] usbredir: Add device rejected errors

Hans de Goede hdegoede at redhat.com
Wed Feb 22 06:47:30 PST 2012


Hi,

Thanks for all the reviews!

On 02/22/2012 01:50 PM, Marc-André Lureau wrote:
> On Tue, Feb 21, 2012 at 3:12 PM, Hans de Goede<hdegoede at redhat.com>  wrote:
>> diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c
>> +    /**
>> +     * SpiceUsbredirChannel::device-error:
>> +     * @channel: #SpiceUsbredirChannel that emitted the signal
>> +     * @device:  #SpiceUsbDevice boxed object corresponding to the device which has an error
>> +     * @error:   #GError describing the error
>> +     *
>> +     * The #SpiceUsbredirChannel::device-error signal is emitted whenever an
>> +     * error happens which causes a device to no longer be available to the
>> +     * guest.
>> +     **/
>> +    signals[DEVICE_ERROR] =
>> +        g_signal_new("device-error",
>> +                     G_OBJECT_CLASS_TYPE(gobject_class),
>> +                     G_SIGNAL_RUN_FIRST,
>> +                     G_STRUCT_OFFSET(SpiceUsbredirChannelClass, device_error),
>> +                     NULL, NULL,
>> +                     g_cclosure_user_marshal_VOID__BOXED_BOXED,
>> +                     G_TYPE_NONE,
>> +                     2,
>> +                     SPICE_TYPE_USB_DEVICE,
>> +                     G_TYPE_ERROR);
>
> I am a bit puzzled with those 2 device-error signals on the channel
> and the manager. It sounds confusing. Since the manager is the primary
> interface, and we are not really concern about which channel is used
> when redirection failed, shouldn't the channel just call a manager
> private method or it can directly emit the manager signal? That would
> avoid having to add 2 similar and thus confusing public API, and would
> also simplify a bit the code, not having to proxy signals.

I agree that using a private manager method for this is better, fixed locally
I'll resend the entire set when I'm done with processing all your comments :)

Regards,

Hans


More information about the Spice-devel mailing list