Blame libvirt-gconfig/libvirt-gconfig-helpers-private.h

Packit a07778
/*
Packit a07778
 * libvirt-gconfig-helpers-private.h: libvirt configuration helpers
Packit a07778
 *
Packit a07778
 * Copyright (C) 2010, 2011 Red Hat, Inc.
Packit a07778
 *
Packit a07778
 * This library is free software; you can redistribute it and/or
Packit a07778
 * modify it under the terms of the GNU Lesser General Public
Packit a07778
 * License as published by the Free Software Foundation; either
Packit a07778
 * version 2.1 of the License, or (at your option) any later version.
Packit a07778
 *
Packit a07778
 * This library is distributed in the hope that it will be useful,
Packit a07778
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a07778
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a07778
 * Lesser General Public License for more details.
Packit a07778
 *
Packit a07778
 * You should have received a copy of the GNU Lesser General Public
Packit a07778
 * License along with this library. If not, see
Packit a07778
 * <http://www.gnu.org/licenses/>.
Packit a07778
 *
Packit a07778
 * Authors: Daniel P. Berrange <berrange@redhat.com>
Packit a07778
 *          Christophe Fergeau <cfergeau@gmail.com>
Packit a07778
 */
Packit a07778
Packit a07778
#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
Packit a07778
#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included directly."
Packit a07778
#endif
Packit a07778
Packit a07778
#ifndef __LIBVIRT_GCONFIG_HELPERS_PRIVATE_H__
Packit a07778
#define __LIBVIRT_GCONFIG_HELPERS_PRIVATE_H__
Packit a07778
Packit a07778
G_BEGIN_DECLS
Packit a07778
Packit a07778
GError *gvir_config_error_new(GQuark domain, gint code,
Packit a07778
                              const gchar *format, ...)
Packit a07778
    G_GNUC_PRINTF(3, 4);
Packit a07778
void gvir_config_set_error(GError **err,
Packit a07778
                           GQuark domain, gint code,
Packit a07778
                           const gchar *format, ...)
Packit a07778
    G_GNUC_PRINTF(4, 5);
Packit a07778
void gvir_config_set_error_literal(GError **err,
Packit a07778
                                   GQuark domain, gint code,
Packit a07778
                                   const gchar *message);
Packit a07778
void gvir_config_set_error_valist(GError **err,
Packit a07778
                                  GQuark domain, gint code,
Packit a07778
                                  const gchar *format,
Packit a07778
                                  va_list args)
Packit a07778
    G_GNUC_PRINTF(4, 0);
Packit a07778
xmlNodePtr gvir_config_xml_parse(const char *xml,
Packit a07778
                                 const char *root_node,
Packit a07778
                                 GError **err);
Packit a07778
typedef gboolean (*GVirConfigXmlNodeIterator)(xmlNodePtr node, gpointer opaque);
Packit a07778
void gvir_config_xml_foreach_child(xmlNodePtr node,
Packit a07778
                                   GVirConfigXmlNodeIterator iter_func,
Packit a07778
                                   gpointer opaque);
Packit a07778
xmlNode * gvir_config_xml_get_element (xmlNode *node, ...)
Packit a07778
    G_GNUC_NULL_TERMINATED;
Packit a07778
const char * gvir_config_xml_get_child_element_content (xmlNode *node,
Packit a07778
                                                        const char *child_name);
Packit a07778
const char *gvir_config_xml_get_attribute_content(xmlNodePtr node,
Packit a07778
                                                  const char *attr_name);
Packit a07778
char *gvir_config_xml_node_to_string(xmlNodePtr node);
Packit a07778
const char *gvir_config_genum_get_nick (GType enum_type, gint value);
Packit a07778
int gvir_config_genum_get_value (GType enum_type, const char *nick, gint default_value);
Packit a07778
G_END_DECLS
Packit a07778
Packit a07778
#endif /* __LIBVIRT_GCONFIG_HELPERS_PRIVATE_H__ */