[virt-tools-list] [PATCH 02/12] Add virt_viewer_session_open_uri

Daniel P. Berrange berrange at redhat.com
Thu Jan 26 15:55:22 UTC 2012


On Tue, Dec 13, 2011 at 08:35:00PM +0100, Marc-André Lureau wrote:
> diff --git a/src/virt-viewer-session.h b/src/virt-viewer-session.h
> index 48c8de3..28c2c26 100644
> --- a/src/virt-viewer-session.h
> +++ b/src/virt-viewer-session.h
> @@ -68,6 +68,7 @@ struct _VirtViewerSessionClass {
>  	void (* close) (VirtViewerSession* session);
>  	gboolean (* open_fd) (VirtViewerSession* session, int fd);
>  	gboolean (* open_host) (VirtViewerSession* session, char *host, char *port);
> +	gboolean (* open_uri) (VirtViewerSession* session, char *uri);

Having both 'open_host' and 'open_uri' feels somewhat wrong to me.
Either the caller should parse the URI and just use  open_host, or
we should make existing users of open_host create a URI.

I'm more in favour of the former, so that we have direct access
to the various parts of the URI internally whenever we need them.



Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list