Google
  Web www.spinics.net

Re: [libvirt-glib 2/6] Add gvir_domain_device_get_domain()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


ACK

On Thu, Mar 01, 2012 at 12:15:38AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>
> 
> Getter for the associated domain of a domain device.
> ---
>  libvirt-gobject/libvirt-gobject-domain-device.c |   11 +++++++++++
>  libvirt-gobject/libvirt-gobject-domain-device.h |    3 +++
>  libvirt-gobject/libvirt-gobject.sym             |    1 +
>  3 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/libvirt-gobject/libvirt-gobject-domain-device.c b/libvirt-gobject/libvirt-gobject-domain-device.c
> index 528b513..750c8d9 100644
> --- a/libvirt-gobject/libvirt-gobject-domain-device.c
> +++ b/libvirt-gobject/libvirt-gobject-domain-device.c
> @@ -134,3 +134,14 @@ virDomainPtr gvir_domain_device_get_domain_handle(GVirDomainDevice *self)
>  
>      return handle;
>  }
> +
> +/**
> + * gvir_domain_device_get_domain:
> + * @device: the domain device
> + *
> + * Returns: (transfer full): the associated domain
> + */
> +GVirDomain *gvir_domain_device_get_domain(GVirDomainDevice *device)
> +{
> +    return g_object_ref (device->priv->domain);
> +}
> diff --git a/libvirt-gobject/libvirt-gobject-domain-device.h b/libvirt-gobject/libvirt-gobject-domain-device.h
> index 96c0433..98acc2d 100644
> --- a/libvirt-gobject/libvirt-gobject-domain-device.h
> +++ b/libvirt-gobject/libvirt-gobject-domain-device.h
> @@ -27,6 +27,8 @@
>  #ifndef __LIBVIRT_GOBJECT_DOMAIN_DEVICE_H__
>  #define __LIBVIRT_GOBJECT_DOMAIN_DEVICE_H__
>  
> +#include <libvirt-gobject/libvirt-gobject-domain.h>
> +
>  G_BEGIN_DECLS
>  
>  #define GVIR_TYPE_DOMAIN_DEVICE            (gvir_domain_device_get_type ())
> @@ -58,6 +60,7 @@ struct _GVirDomainDeviceClass
>  
>  
>  GType gvir_domain_device_get_type(void);
> +GVirDomain *gvir_domain_device_get_domain(GVirDomainDevice *device);
>  
>  G_END_DECLS
>  
> diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym
> index 5081f41..0097692 100644
> --- a/libvirt-gobject/libvirt-gobject.sym
> +++ b/libvirt-gobject/libvirt-gobject.sym
> @@ -33,6 +33,7 @@ LIBVIRT_GOBJECT_0.0.4 {
>  	gvir_connection_get_node_info;
>  
>  	gvir_domain_device_get_type;
> +	gvir_domain_device_get_domain;
>  
>  	gvir_domain_disk_get_type;
>  	gvir_domain_disk_stats_get_type;
> -- 
> 1.7.7.6
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: pgp5fmOTHuEfH.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net