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

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



On Wed, Feb 29, 2012 at 02:02:08PM +0100, Christophe Fergeau wrote:
> On Tue, Feb 28, 2012 at 08:25:04PM +0200, Zeeshan Ali (Khattak) wrote:
> > From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
> > 
> > Getter for the associated domain of a domain device.
> 
> NB: it already exists as a gobject property
> 
> > ---
> >  libvirt-gobject/libvirt-gobject-domain-device.c |   10 ++++++++++
> >  libvirt-gobject/libvirt-gobject-domain-device.h |    3 +++
> >  libvirt-gobject/libvirt-gobject.sym             |    1 +
> >  3 files changed, 14 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libvirt-gobject/libvirt-gobject-domain-device.c b/libvirt-gobject/libvirt-gobject-domain-device.c
> > index 528b513..6282d8b 100644
> > --- a/libvirt-gobject/libvirt-gobject-domain-device.c
> > +++ b/libvirt-gobject/libvirt-gobject-domain-device.c
> > @@ -134,3 +134,13 @@ virDomainPtr gvir_domain_device_get_domain_handle(GVirDomainDevice *self)
> >  
> >      return handle;
> >  }
> > +
> > +/**
> > + * gvir_domain_device_get_domain:
> > + * @device: the domain device
> > + *
> > + * Returns: (transfer full): the associate domain
> 
> associated
> 
> ACK

Oh, one more nit below
> > + */
> > +GVirDomain *gvir_domain_device_get_domain(GVirDomainDevice *device) {

opening brace on a new line

> > +    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 redhat com
> > https://www.redhat.com/mailman/listinfo/libvir-list



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

Attachment: pgpahrNcbdFgo.pgp
Description: PGP signature


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