
On Fri, Oct 07, 2011 at 11:40:46AM +0200, Christophe Fergeau wrote:
These helper functions will be useful later on. --- examples/Makefile.am | 1 + libvirt-gconfig/Makefile.am | 3 + libvirt-gconfig/libvirt-gconfig-helpers.c | 179 +++++++++++++++++++++++++++++ libvirt-gconfig/libvirt-gconfig-helpers.h | 48 ++++++++ libvirt-gconfig/libvirt-gconfig-object.c | 52 --------- libvirt-gconfig/libvirt-gconfig.h | 2 + libvirt-gconfig/libvirt-gconfig.sym | 1 + libvirt-gobject/Makefile.am | 2 + 8 files changed, 236 insertions(+), 52 deletions(-) create mode 100644 libvirt-gconfig/libvirt-gconfig-helpers.c create mode 100644 libvirt-gconfig/libvirt-gconfig-helpers.h
diff --git a/libvirt-gconfig/libvirt-gconfig-helpers.h b/libvirt-gconfig/libvirt-gconfig-helpers.h new file mode 100644 index 0000000..1bdf2d0 --- /dev/null +++ b/libvirt-gconfig/libvirt-gconfig-helpers.h @@ -0,0 +1,48 @@
+ +GQuark gvir_config_object_error_quark(void); +#define GVIR_CONFIG_OBJECT_ERROR gvir_config_object_error_quark() + +GError *gvir_xml_error_new(GQuark domain, gint code, + const gchar *format, ...); +xmlNodePtr gvir_config_xml_parse(const char *xml, + const char *root_node, + GError **err); +xmlNode * gvir_config_xml_get_element (xmlNode *node, ...); +xmlChar * gvir_config_xml_get_child_element_content (xmlNode *node, + const char *child_name); +char *gvir_config_xml_get_child_element_content_glib (xmlNode *node, + const char *child_name);
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym index 2d09c37..24407c3 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -22,6 +22,7 @@ LIBVIRT_GOBJECT_0.0.1 { gvir_config_node_device_new;
gvir_config_object_get_type; + gvir_config_object_error_quark;
Don't we want to also export the rest of those new APIs in gconfig-helpers.h ? ACK, if you tell me why they're not required, or if you add them before pushing the patch. Daniel -- |: 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 :|