ACK ----- Original Message ----- > From: "Marc-André Lureau" <marcandre.lureau@xxxxxxxxx> > To: spice-devel@xxxxxxxxxxxxxxx > Sent: Wednesday, April 23, 2014 1:09:15 PM > Subject: [PATCH spice-gtk 10/14] usb: use SPICE_CLIENT_ERROR_ prefix > > To be consistent with GLib idioms, the code should use a common prefix for > errors. > --- > gtk/channel-usbredir.c | 4 ++-- > gtk/spice-client.h | 11 +++++++++-- > 2 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c > index 239fe12..64487b3 100644 > --- a/gtk/channel-usbredir.c > +++ b/gtk/channel-usbredir.c > @@ -654,12 +654,12 @@ static void usbredir_handle_msg(SpiceChannel *c, > SpiceMsgIn *in) > break; > case usbredirhost_read_device_rejected: > err = g_error_new(SPICE_CLIENT_ERROR, > - SPICE_CLIENT_USB_DEVICE_REJECTED, > + SPICE_CLIENT_ERROR_USB_DEVICE_REJECTED, > _("%s rejected by host"), desc); > break; > case usbredirhost_read_device_lost: > err = g_error_new(SPICE_CLIENT_ERROR, > - SPICE_CLIENT_USB_DEVICE_LOST, > + SPICE_CLIENT_ERROR_USB_DEVICE_LOST, > _("%s disconnected (fatal IO error)"), desc); > break; > default: > diff --git a/gtk/spice-client.h b/gtk/spice-client.h > index 0e1e49d..e734cca 100644 > --- a/gtk/spice-client.h > +++ b/gtk/spice-client.h > @@ -56,16 +56,23 @@ G_BEGIN_DECLS > /** > * SpiceClientError: > * @SPICE_CLIENT_ERROR_FAILED: generic error code > + * @SPICE_CLIENT_ERROR_USB_DEVICE_REJECTED: device redirection rejected by > host > + * @SPICE_CLIENT_ERROR_USB_DEVICE_LOST: device disconnected (fatal IO error) > * > * Error codes returned by spice-client API. > */ > typedef enum > { > SPICE_CLIENT_ERROR_FAILED, > - SPICE_CLIENT_USB_DEVICE_REJECTED, > - SPICE_CLIENT_USB_DEVICE_LOST, > + SPICE_CLIENT_ERROR_USB_DEVICE_REJECTED, > + SPICE_CLIENT_ERROR_USB_DEVICE_LOST, > } SpiceClientError; > > +#ifndef SPICE_DISABLE_DEPRECATED > +#define SPICE_CLIENT_USB_DEVICE_REJECTED > SPICE_CLIENT_ERROR_USB_DEVICE_REJECTED > +#define SPICE_CLIENT_USB_DEVICE_LOST SPICE_CLIENT_ERROR_USB_DEVICE_LOST > +#endif > + > GQuark spice_client_error_quark(void); > > G_END_DECLS > -- > 1.8.5.3 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/spice-devel > _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel