[libvirt] [libvirt-glib] Add gvir_domain_open_graphics_fd()

Daniel P. Berrange berrange at redhat.com
Wed Nov 19 11:44:21 UTC 2014

On Wed, Nov 19, 2014 at 11:38:48AM +0000, Zeeshan Ali (Khattak) wrote:
> On Wed, Nov 19, 2014 at 10:01 AM, Marc-André Lureau
> <marcandre.lureau at gmail.com> wrote:
> > This API was added recently, in libvirt v1.2.8. You should either
> > change libvirt-glib dependency or add a fallback using
> > virDomainOpenGraphics, dating back from v0.9.7.
> Thanks for pointing out. I would just bump the dep since libvirt-glib
> and libvirt are so related but I'll need Daniel's approval for that.

Bumping to 1.2.8 is probably a bit too new since we don't have that
version in Fedora 20, nor in RHEL-7.

It isn't unreasonable to #ifdef #else it to use the old API as an
alternative impl here. The only difference is with the old API you
had to call 'socketpair' to create the socket you pass in, instead
of getting it straight back. We can hide that difference in the
gvir_domain_open_graphics_fd method impl without trouble though.

For that matter, I'd suggest dropping the '_fd' suffix of the
method name. That's only there in libvirt because the desired
name was already taken by the old method, so we don't need to
carry over that naming.

|: 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 libvir-list mailing list