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

Christophe Fergeau cfergeau at redhat.com
Wed Nov 19 11:00:18 UTC 2014


On Wed, Nov 19, 2014 at 01:19:31AM +0000, Zeeshan Ali (Khattak) wrote:
> Add binding for virDomainOpenGraphicsFD.
> ---
>  libvirt-gobject/libvirt-gobject-domain.c | 36 ++++++++++++++++++++++++++++++++
>  libvirt-gobject/libvirt-gobject-domain.h |  4 ++++
>  libvirt-gobject/libvirt-gobject.sym      |  5 +++++
>  3 files changed, 45 insertions(+)
> 
> diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
> index 8df30d7..9c1aa6e 100644
> --- a/libvirt-gobject/libvirt-gobject-domain.c
> +++ b/libvirt-gobject/libvirt-gobject-domain.c
> @@ -1222,6 +1222,42 @@ cleanup:
>  }
>  
>  /**
> + * gvir_domain_open_graphics_fd:
> + * @dom: the domain
> + * @idx: the graphics index
> + * @flags: extra flags, currently unused
> + *
> + * This will create a socket pair connected to the graphics backend of @dom. One
> + * end of the socket will be returned on success, and the other end is handed to
> + * the hypervisor. If @dom has multiple graphics backends configured, then @idx
> + * will determine which one is opened, starting from @idx 0.
> + *
> + * Returns: An fd on success, -1 on failure.
> + */
> +int gvir_domain_open_graphics_fd(GVirDomain *dom,
> +                                 guint idx,

Could/should this take a GVirConfigDomainGraphics * instead and infer
the index from it?
I know gvir_domain-open_graphics() uses 'idx', but maybe we should offer
the 2 variants?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141119/718e436c/attachment-0001.sig>


More information about the libvir-list mailing list