<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 11:06 AM, Marc-André Lureau <span dir="ltr"><<a href="mailto:marcandre.lureau@gmail.com" target="_blank">marcandre.lureau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Oct 6, 2014 at 4:23 PM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ACK<br>
<div><div><br>
On Mon, Oct 06, 2014 at 01:52:43PM +0200, Fabiano Fidêncio wrote:<br>
> SpiceChannelError, for now, will be used to set more detailed errors<br>
> with respect to the main channel event SPICE_CHANNEL_ERROR_AUTH.<br>
> ---<br>
> Changes since v1:<br>
> - Change the SpiceChannelAuthError comments to match with the enum values<br>
> - Add more details related to SPICE_CHANNEL_ERROR_AUTH<br>
> ---<br>
>  doc/reference/spice-gtk-sections.txt |  3 +++<br>
>  gtk/map-file                         |  2 ++<br>
>  gtk/spice-channel.c                  | 11 +++++++++++<br>
>  gtk/spice-channel.h                  | 25 +++++++++++++++++++++++++<br>
>  gtk/spice-glib-sym-file              |  2 ++<br>
>  5 files changed, 43 insertions(+)<br>
><br>
> diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt<br>
> index caaa92c..5c411f8 100644<br>
> --- a/doc/reference/spice-gtk-sections.txt<br>
> +++ b/doc/reference/spice-gtk-sections.txt<br>
> @@ -73,6 +73,9 @@ spice_main_clipboard_release<br>
>  spice_main_clipboard_notify<br>
>  spice_main_clipboard_request<br>
>  <SUBSECTION Standard><br>
> +SPICE_CHANNEL_ERROR<br>
> +spice_channel_error_get_type<br>
> +spice_channel_error_quark<br>
>  SPICE_MAIN_CHANNEL<br>
>  SPICE_IS_MAIN_CHANNEL<br>
>  SPICE_TYPE_MAIN_CHANNEL<br>
> diff --git a/gtk/map-file b/gtk/map-file<br>
> index 90f14f1..c1d9e71 100644<br>
> --- a/gtk/map-file<br>
> +++ b/gtk/map-file<br>
> @@ -6,6 +6,8 @@ spice_audio_new;<br>
>  spice_channel_connect;<br>
>  spice_channel_destroy;<br>
>  spice_channel_disconnect;<br>
> +spice_channel_error_get_type;<br>
> +spice_channel_error_quark;<br>
>  spice_channel_event_get_type;<br>
>  spice_channel_get_error;<br>
>  spice_channel_get_type;<br>
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c<br>
> index 5d1a86e..a8b4e35 100644<br>
> --- a/gtk/spice-channel.c<br>
> +++ b/gtk/spice-channel.c<br>
> @@ -76,6 +76,17 @@ static void spice_channel_send_migration_handshake(SpiceChannel *channel);<br>
><br>
>  G_DEFINE_TYPE(SpiceChannel, spice_channel, G_TYPE_OBJECT);<br>
><br>
> +/**<br>
> + * SpiceChannelError:<br>
> + *<br>
> + * The error domain for the spice channel.<br>
> + **/<br>
> +GQuark<br>
> +spice_channel_error_quark(void)<br>
> +{<br>
> +  return g_quark_from_static_string ("spice-channel-error");<br>
> +}<br>
> +<br>
>  /* Properties */<br>
>  enum {<br>
>      PROP_0,<br>
> diff --git a/gtk/spice-channel.h b/gtk/spice-channel.h<br>
> index 1c303b4..adbe8f5 100644<br>
> --- a/gtk/spice-channel.h<br>
> +++ b/gtk/spice-channel.h<br>
> @@ -32,6 +32,17 @@ G_BEGIN_DECLS<br>
>  #define SPICE_IS_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPICE_TYPE_CHANNEL))<br>
>  #define SPICE_CHANNEL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SPICE_TYPE_CHANNEL, SpiceChannelClass))<br>
><br>
> +/**<br>
> + * SPICE_CHANNEL_ERROR:<br>
> + *<br>
> + * Error domain for #SpiceChannel operations. Error in this domain will be<br>
> + * from the SpiceChannelError enumeration. See #GError for more<br>
> + * information on error domains.<br>
> + **/<br>
> +#define SPICE_CHANNEL_ERROR           spice_channel_error_quark ()<br>
> +<br></div></div></blockquote><div><br></div></div></div><div>SPICE_CHANNEL_ERROR_* is unfortunately already used in SpiceChannelEvent enum.<br></div></div></div></div></blockquote><div><br></div><div>Yeah, and I'd love to get rid of them at some point, moving them to SPICE_CHANNEL_ERROR.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br>Why not add error values to SpiceClientError instead? This is the generic error domain for all spice-gtk I am not sure we need other domains.<br></div></div></div></div></blockquote><div><br></div><div>Does not look easier to read/understand than the way it's now, but if you prefer, we can do in this way.</div><div> </div></div><div>Best Regards,</div>-- <br><div>Fabiano Fidêncio</div>
</div></div>