File: libvirt-gconfig-object-private.h

package info (click to toggle)
libvirt-glib 0.1.9-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,048 kB
  • ctags: 5,059
  • sloc: ansic: 19,912; sh: 11,803; makefile: 739; xml: 222; python: 134; perl: 104
file content (123 lines) | stat: -rw-r--r-- 7,325 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
 * libvirt-gconfig-object-private.h: base object for XML configuration
 *
 * Copyright (C) 2011 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see
 * <http://www.gnu.org/licenses/>.
 *
 * Author: Christophe Fergeau <cfergeau@redhat.com>
 */
#ifndef __LIBVIRT_GCONFIG_OBJECT_PRIVATE_H__
#define __LIBVIRT_GCONFIG_OBJECT_PRIVATE_H__

G_BEGIN_DECLS

#include <libvirt-gconfig/libvirt-gconfig-xml-doc.h>

GVirConfigObject *gvir_config_object_new_from_tree(GType type,
                                                   GVirConfigXmlDoc *doc,
                                                   const char *schema,
                                                   xmlNodePtr tree);

GVirConfigXmlDoc *gvir_config_object_get_xml_doc(GVirConfigObject *config);
xmlNodePtr gvir_config_object_get_xml_node(GVirConfigObject *config);
const char *gvir_config_object_get_node_content(GVirConfigObject *object,
                                                const char *node_name);
guint64 gvir_config_object_get_node_content_uint64(GVirConfigObject *object,
                                                   const char *node_name);
gint gvir_config_object_get_node_content_genum(GVirConfigObject *object,
                                               const char *node_name,
                                               GType enum_type,
                                               gint default_value);
const char *gvir_config_object_get_attribute(GVirConfigObject *object,
                                             const char *node_name,
                                             const char *attr_name);
guint64 gvir_config_object_get_attribute_uint64(GVirConfigObject *object,
                                                const char *node_name,
                                                const char *attr_name,
                                                guint64 default_value);
gint gvir_config_object_get_attribute_genum(GVirConfigObject *object,
                                            const char *node_name,
                                            const char *attr_name,
                                            GType enum_type,
                                            gint default_value);
gboolean gvir_config_object_get_attribute_boolean(GVirConfigObject *object,
                                                  const char *node_name,
                                                  const char *attr_name,
                                                  gboolean default_value);
void gvir_config_object_set_node_content(GVirConfigObject *object,
                                         const char *node_name,
                                         const char *value);
void gvir_config_object_set_node_content_uint64(GVirConfigObject *object,
                                                const char *node_name,
                                                guint64 value);
GVirConfigObject *gvir_config_object_add_child(GVirConfigObject *object,
                                               const char *child_name);
void gvir_config_object_add_child_with_attribute(GVirConfigObject *object,
                                                 const char *child_name,
                                                 const char *attr_name,
                                                 const char *attr_value);
void gvir_config_object_add_child_with_attribute_enum(GVirConfigObject *object,
                                                      const char *child_name,
                                                      const char *attr_name,
                                                      GType attr_type,
                                                      unsigned int attr_value);
GVirConfigObject *gvir_config_object_replace_child(GVirConfigObject *object,
                                                   const char *child_name);
void gvir_config_object_replace_child_with_attribute(GVirConfigObject *object,
                                                     const char *child_name,
                                                     const char *attr_name,
                                                     const char *attr_value);
void gvir_config_object_replace_child_with_attribute_enum(GVirConfigObject *object,
                                                         const char *child_name,
                                                         const char *attr_name,
                                                         GType attr_type,
                                                         unsigned int attr_value);
void gvir_config_object_delete_child(GVirConfigObject *object,
                                     const char *child_name,
                                     const char *ns_href);
void gvir_config_object_delete_children(GVirConfigObject *object,
                                        const char *child_name,
                                        const char *ns_href);
void gvir_config_object_set_child(GVirConfigObject *object,
                                  xmlNodePtr child);

void gvir_config_object_attach_add(GVirConfigObject *parent,
                                   GVirConfigObject *child);
void gvir_config_object_attach_replace(GVirConfigObject *parent,
                                       const char *child_name,
                                       GVirConfigObject *child);
void gvir_config_object_set_attribute(GVirConfigObject *object,
                                      ...) G_GNUC_NULL_TERMINATED;
void gvir_config_object_set_attribute_with_type(GVirConfigObject *object,
                                                ...) G_GNUC_NULL_TERMINATED;
void gvir_config_object_remove_attribute(GVirConfigObject *object,
                                         const char *attr_name);
void gvir_config_object_foreach_child(GVirConfigObject *object,
                                      const char *parent_name,
                                      GVirConfigXmlNodeIterator iter_func,
                                      gpointer opaque);
gboolean gvir_config_object_set_namespace(GVirConfigObject *object,
                                          const char *ns,
                                          const char *ns_uri);
GVirConfigObject *gvir_config_object_get_child(GVirConfigObject *object,
                                               const gchar *child_name);
GVirConfigObject *gvir_config_object_get_child_with_type(GVirConfigObject *object,
                                                         const gchar *child_name,
                                                         GType child_type);

G_END_DECLS

#endif /* __LIBVIRT_GCONFIG_OBJECT_H__ */