[Spice-devel] [PATCH] Expose spice_uuid_to_string() as public API
Marc-André Lureau
mlureau at redhat.com
Tue Oct 29 19:31:25 CET 2013
ack
----- Original Message -----
> SpiceSeession has a 'uuid' property that is a byte array, but clients often
> need
> the uuid in string format (for writing to disk, etc). Rather than having
> each
> client re-implement this, expose the utility function as public API in
> spice-gtk.
> ---
> gtk/spice-util-priv.h | 1 -
> gtk/spice-util.c | 1 -
> gtk/spice-util.h | 1 +
> 3 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gtk/spice-util-priv.h b/gtk/spice-util-priv.h
> index cc559dc..c476886 100644
> --- a/gtk/spice-util-priv.h
> +++ b/gtk/spice-util-priv.h
> @@ -26,7 +26,6 @@ G_BEGIN_DECLS
> #define UUID_FMT
> "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
>
> gboolean spice_strv_contains(const GStrv strv, const gchar *str);
> -gchar* spice_uuid_to_string(const guint8 uuid[16]);
> const gchar* spice_yes_no(gboolean value);
> guint16 spice_make_scancode(guint scancode, gboolean release);
> gchar* spice_unix2dos(const gchar *str, gssize len, GError **error);
> diff --git a/gtk/spice-util.c b/gtk/spice-util.c
> index 4372f28..f6a7007 100644
> --- a/gtk/spice-util.c
> +++ b/gtk/spice-util.c
> @@ -101,7 +101,6 @@ gboolean spice_strv_contains(const GStrv strv, const
> gchar *str)
> return FALSE;
> }
>
> -G_GNUC_INTERNAL
> gchar* spice_uuid_to_string(const guint8 uuid[16])
> {
> return g_strdup_printf(UUID_FMT, uuid[0], uuid[1],
> diff --git a/gtk/spice-util.h b/gtk/spice-util.h
> index 6996e55..3f429a0 100644
> --- a/gtk/spice-util.h
> +++ b/gtk/spice-util.h
> @@ -30,6 +30,7 @@ gulong spice_g_signal_connect_object(gpointer instance,
> GCallback c_handler,
> gpointer gobject,
> GConnectFlags connect_flags);
> +gchar* spice_uuid_to_string(const guint8 uuid[16]);
>
> #define SPICE_DEBUG(fmt, ...) \
> do { \
> --
> 1.8.3.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list