[virt-tools-list] [libosinfo 01/11] Add datamap classes

Christophe Fergeau cfergeau at redhat.com
Tue Dec 11 09:46:47 UTC 2012

On Mon, Dec 10, 2012 at 11:46:47PM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Dec 10, 2012 at 6:45 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> > +void osinfo_datamap_insert(OsinfoDatamap *map,
> > +                           const gchar *inval,
> > +                           const gchar *outval);
> > +
> > +const gchar *osinfo_datamap_lookup(OsinfoDatamap *map,
> > +                                   const gchar *inval);
> The parent Entity class already provides API that does the same thing
> as the two methods above + some utility API on top.

If you look at how this is implemented, not really, OsinfoDatamap has its
own GHashTable. Imo OsinfoEntity stores attributes with well-known names
and meaning in the XML file, while in this case we will be storing a list
of 'anonymous' key/value pairs. Storing these as entity parameters would
prevent us from remapping 'id', which could be an issue. So I think
have to go with the separate hash table/API.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20121211/95860468/attachment.sig>

More information about the virt-tools-list mailing list