[Spice-devel] [spice-gtk 11/13] Make SpiceURI a public API

Christophe Fergeau cfergeau at redhat.com
Wed Feb 12 04:06:25 PST 2014


On Mon, Feb 03, 2014 at 07:02:42PM +0100, Marc-André Lureau wrote:
> From: Marc-André Lureau <marcandre.lureau at redhat.com>
> +/**
> + * spice_uri_to_string:
> + * @uri: a #SpiceURI
> + *
> + * Returns a string representing @uri.
> + *
> + * Returns: a string representing @uri, which the caller must free.
> + * Since: 0.23
> + **/
> +gchar* spice_uri_to_string(SpiceURI* self)
> +{
> +    SpiceURIPrivate *p;
> +
> +    g_return_val_if_fail(SPICE_IS_URI(self), NULL);
> +    p = self->priv;
> +
> +    if (p->scheme == NULL || p->hostname == NULL)
> +        return NULL;
> +
> +    if (p->user || p->password) {
> +        return g_strdup_printf("%s://%s:%s@%s:%u",
> +                               p->scheme,
> +                               p->user ?: "", p->password ?: "",
> +                               p->hostname, p->port);

Actually this block is silently added in this rename, it belongs to the commit
adding user/password

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140212/26836264/attachment.pgp>


More information about the Spice-devel mailing list