We'll need several helper classes to implement configuration of
storage pools and volumes. This commit introduces all of these
in one go. It's just the GObject boilerplate, the actual code will
come in other commits. GVirConfigStoragePermissions is namespaced this
way because it will be used by both GVirConfigStoragePoolTarget and
GVirConfigStorageVolTarget.
---
libvirt-gconfig/Makefile.am | 12 +++-
.../libvirt-gconfig-storage-permissions.c | 70 +++++++++++++++++++
.../libvirt-gconfig-storage-permissions.h | 68 ++++++++++++++++++
.../libvirt-gconfig-storage-pool-source.c | 72 ++++++++++++++++++++
.../libvirt-gconfig-storage-pool-source.h | 68 ++++++++++++++++++
.../libvirt-gconfig-storage-pool-target.c | 72 ++++++++++++++++++++
.../libvirt-gconfig-storage-pool-target.h | 68 ++++++++++++++++++
.../libvirt-gconfig-storage-vol-backing-store.c | 72 ++++++++++++++++++++
.../libvirt-gconfig-storage-vol-backing-store.h | 68 ++++++++++++++++++
.../libvirt-gconfig-storage-vol-target.c | 72 ++++++++++++++++++++
.../libvirt-gconfig-storage-vol-target.h | 68 ++++++++++++++++++
libvirt-gconfig/libvirt-gconfig.h | 5 ++
libvirt-gconfig/libvirt-gconfig.sym | 20 ++++++
13 files changed, 734 insertions(+), 1 deletions(-)
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-permissions.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-permissions.h
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-pool-source.h
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-pool-target.h
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-storage-vol-target.h
diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am
index d9f3096..6363f88 100644
--- a/libvirt-gconfig/Makefile.am
+++ b/libvirt-gconfig/Makefile.am
@@ -40,8 +40,13 @@ GCONFIG_HEADER_FILES = \
libvirt-gconfig-network-filter.h \
libvirt-gconfig-node-device.h \
libvirt-gconfig-secret.h \
+ libvirt-gconfig-storage-permissions.h \
libvirt-gconfig-storage-pool.h \
- libvirt-gconfig-storage-vol.h
+ libvirt-gconfig-storage-pool-source.h \
+ libvirt-gconfig-storage-pool-target.h \
+ libvirt-gconfig-storage-vol.h \
+ libvirt-gconfig-storage-vol-backing-store.h \
+ libvirt-gconfig-storage-vol-target.h
noinst_HEADERS = \
libvirt-gconfig-helpers-private.h \
libvirt-gconfig-object-private.h \
@@ -78,8 +83,13 @@ GCONFIG_SOURCE_FILES = \
libvirt-gconfig-network-filter.c \
libvirt-gconfig-node-device.c \
libvirt-gconfig-secret.c \
+ libvirt-gconfig-storage-permissions.c \
libvirt-gconfig-storage-pool.c \
+ libvirt-gconfig-storage-pool-source.c \
+ libvirt-gconfig-storage-pool-target.c \
libvirt-gconfig-storage-vol.c \
+ libvirt-gconfig-storage-vol-backing-store.c \
+ libvirt-gconfig-storage-vol-target.c \
libvirt-gconfig-xml-doc.c
libvirt_gconfig_1_0_ladir = $(includedir)/libvirt-gconfig-1.0/libvirt-gconfig
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
b/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
new file mode 100644
index 0000000..30854c7
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-permissions.c
@@ -0,0 +1,70 @@
+/*
+ * libvirt-gconfig-storage-permissions.c: libvirt storage permissions 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#include <config.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+
+#define GVIR_CONFIG_STORAGE_PERMISSIONS_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS,
GVirConfigStoragePermissionsPrivate))
+
+struct _GVirConfigStoragePermissionsPrivate
+{
+ gboolean unused;
+};
+
+G_DEFINE_TYPE(GVirConfigStoragePermissions, gvir_config_storage_permissions,
GVIR_TYPE_CONFIG_OBJECT);
+
+
+static void gvir_config_storage_permissions_class_init(GVirConfigStoragePermissionsClass
*klass)
+{
+ g_type_class_add_private(klass, sizeof(GVirConfigStoragePermissionsPrivate));
+}
+
+
+static void gvir_config_storage_permissions_init(GVirConfigStoragePermissions *perms)
+{
+ g_debug("Init GVirConfigStoragePermissions=%p", perms);
+
+ perms->priv = GVIR_CONFIG_STORAGE_PERMISSIONS_GET_PRIVATE(perms);
+}
+
+
+GVirConfigStoragePermissions *gvir_config_storage_permissions_new(void)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new(GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS,
+ "permissions", NULL);
+ return GVIR_CONFIG_STORAGE_PERMISSIONS(object);
+}
+
+GVirConfigStoragePermissions *gvir_config_storage_permissions_new_from_xml(const gchar
*xml,
+ GError
**error)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new_from_xml(GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS,
+ "permissions", NULL,
+ xml, error);
+ return GVIR_CONFIG_STORAGE_PERMISSIONS(object);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-permissions.h
b/libvirt-gconfig/libvirt-gconfig-storage-permissions.h
new file mode 100644
index 0000000..4b3d09c
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-permissions.h
@@ -0,0 +1,68 @@
+/*
+ * libvirt-gconfig-storage-permissions.h: libvirt storage permissions 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included
directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_STORAGE_PERMISSIONS_H__
+#define __LIBVIRT_GCONFIG_STORAGE_PERMISSIONS_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS
(gvir_config_storage_permissions_get_type ())
+#define GVIR_CONFIG_STORAGE_PERMISSIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST
((obj), GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS, GVirConfigStoragePermissions))
+#define GVIR_CONFIG_STORAGE_PERMISSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST
((klass), GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS, GVirConfigStoragePermissionsClass))
+#define GVIR_IS_CONFIG_STORAGE_PERMISSIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE
((obj), GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS))
+#define GVIR_IS_CONFIG_STORAGE_PERMISSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE
((klass), GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS))
+#define GVIR_CONFIG_STORAGE_PERMISSIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS
((obj), GVIR_TYPE_CONFIG_STORAGE_PERMISSIONS, GVirConfigStoragePermissionsClass))
+
+typedef struct _GVirConfigStoragePermissions GVirConfigStoragePermissions;
+typedef struct _GVirConfigStoragePermissionsPrivate GVirConfigStoragePermissionsPrivate;
+typedef struct _GVirConfigStoragePermissionsClass GVirConfigStoragePermissionsClass;
+
+struct _GVirConfigStoragePermissions
+{
+ GVirConfigObject parent;
+
+ GVirConfigStoragePermissionsPrivate *priv;
+
+ /* Do not add fields to this struct */
+};
+
+struct _GVirConfigStoragePermissionsClass
+{
+ GVirConfigObjectClass parent_class;
+
+ gpointer padding[20];
+};
+
+
+GType gvir_config_storage_permissions_get_type(void);
+
+GVirConfigStoragePermissions *gvir_config_storage_permissions_new(void);
+GVirConfigStoragePermissions *gvir_config_storage_permissions_new_from_xml(const gchar
*xml,
+ GError
**error);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_STORAGE_PERMISSIONS_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
b/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
new file mode 100644
index 0000000..5e8635b
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-source.c
@@ -0,0 +1,72 @@
+/*
+ * libvirt-gconfig-storage-pool-source.c: libvirt storage pool source 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#include <config.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-object-private.h"
+
+
+#define GVIR_CONFIG_STORAGE_POOL_SOURCE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE,
GVirConfigStoragePoolSourcePrivate))
+
+struct _GVirConfigStoragePoolSourcePrivate
+{
+ gboolean unused;
+};
+
+G_DEFINE_TYPE(GVirConfigStoragePoolSource, gvir_config_storage_pool_source,
GVIR_TYPE_CONFIG_OBJECT);
+
+
+static void gvir_config_storage_pool_source_class_init(GVirConfigStoragePoolSourceClass
*klass)
+{
+ g_type_class_add_private(klass, sizeof(GVirConfigStoragePoolSourcePrivate));
+}
+
+
+static void gvir_config_storage_pool_source_init(GVirConfigStoragePoolSource *source)
+{
+ g_debug("Init GVirConfigStoragePoolSource=%p", source);
+
+ source->priv = GVIR_CONFIG_STORAGE_POOL_SOURCE_GET_PRIVATE(source);
+}
+
+
+GVirConfigStoragePoolSource *gvir_config_storage_pool_source_new(void)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new(GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE,
+ "source", NULL);
+ return GVIR_CONFIG_STORAGE_POOL_SOURCE(object);
+}
+
+GVirConfigStoragePoolSource *gvir_config_storage_pool_source_new_from_xml(const gchar
*xml,
+ GError **error)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new_from_xml(GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE,
+ "source", NULL,
+ xml, error);
+ return GVIR_CONFIG_STORAGE_POOL_SOURCE(object);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-source.h
b/libvirt-gconfig/libvirt-gconfig-storage-pool-source.h
new file mode 100644
index 0000000..cd84f9c
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-source.h
@@ -0,0 +1,68 @@
+/*
+ * libvirt-gconfig-storage-pool-target.c: libvirt storage pool target configuration
+ *
+ * Copyright (C) 2010-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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included
directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_STORAGE_POOL_SOURCE_H__
+#define __LIBVIRT_GCONFIG_STORAGE_POOL_SOURCE_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE
(gvir_config_storage_pool_source_get_type ())
+#define GVIR_CONFIG_STORAGE_POOL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST
((obj), GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE, GVirConfigStoragePoolSource))
+#define GVIR_CONFIG_STORAGE_POOL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST
((klass), GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE, GVirConfigStoragePoolSourceClass))
+#define GVIR_IS_CONFIG_STORAGE_POOL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE
((obj), GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE))
+#define GVIR_IS_CONFIG_STORAGE_POOL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE
((klass), GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE))
+#define GVIR_CONFIG_STORAGE_POOL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS
((obj), GVIR_TYPE_CONFIG_STORAGE_POOL_SOURCE, GVirConfigStoragePoolSourceClass))
+
+typedef struct _GVirConfigStoragePoolSource GVirConfigStoragePoolSource;
+typedef struct _GVirConfigStoragePoolSourcePrivate GVirConfigStoragePoolSourcePrivate;
+typedef struct _GVirConfigStoragePoolSourceClass GVirConfigStoragePoolSourceClass;
+
+struct _GVirConfigStoragePoolSource
+{
+ GVirConfigObject parent;
+
+ GVirConfigStoragePoolSourcePrivate *priv;
+
+ /* Do not add fields to this struct */
+};
+
+struct _GVirConfigStoragePoolSourceClass
+{
+ GVirConfigObjectClass parent_class;
+
+ gpointer padding[20];
+};
+
+
+GType gvir_config_storage_pool_source_get_type(void);
+
+GVirConfigStoragePoolSource *gvir_config_storage_pool_source_new(void);
+GVirConfigStoragePoolSource *gvir_config_storage_pool_source_new_from_xml(const gchar
*xml,
+ GError
**error);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_STORAGE_POOL_SOURCE_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
new file mode 100644
index 0000000..3d9d99c
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c
@@ -0,0 +1,72 @@
+/*
+ * libvirt-gconfig-storage-pool-target.c: libvirt storage pool target 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#include <config.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-object-private.h"
+
+
+#define GVIR_CONFIG_STORAGE_POOL_TARGET_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET,
GVirConfigStoragePoolTargetPrivate))
+
+struct _GVirConfigStoragePoolTargetPrivate
+{
+ gboolean unused;
+};
+
+G_DEFINE_TYPE(GVirConfigStoragePoolTarget, gvir_config_storage_pool_target,
GVIR_TYPE_CONFIG_OBJECT);
+
+
+static void gvir_config_storage_pool_target_class_init(GVirConfigStoragePoolTargetClass
*klass)
+{
+ g_type_class_add_private(klass, sizeof(GVirConfigStoragePoolTargetPrivate));
+}
+
+
+static void gvir_config_storage_pool_target_init(GVirConfigStoragePoolTarget *target)
+{
+ g_debug("Init GVirConfigStoragePoolTarget=%p", target);
+
+ target->priv = GVIR_CONFIG_STORAGE_POOL_TARGET_GET_PRIVATE(target);
+}
+
+
+GVirConfigStoragePoolTarget *gvir_config_storage_pool_target_new(void)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new(GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET,
+ "target", NULL);
+ return GVIR_CONFIG_STORAGE_POOL_TARGET(object);
+}
+
+GVirConfigStoragePoolTarget *gvir_config_storage_pool_target_new_from_xml(const gchar
*xml,
+ GError
**error)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new_from_xml(GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET,
+ "target", NULL,
+ xml, error);
+ return GVIR_CONFIG_STORAGE_POOL_TARGET(object);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.h
b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.h
new file mode 100644
index 0000000..fd68ace
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.h
@@ -0,0 +1,68 @@
+/*
+ * libvirt-gconfig-storage-pool-target.h: libvirt storage pool target 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included
directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_STORAGE_POOL_TARGET_H__
+#define __LIBVIRT_GCONFIG_STORAGE_POOL_TARGET_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET
(gvir_config_storage_pool_target_get_type ())
+#define GVIR_CONFIG_STORAGE_POOL_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST
((obj), GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET, GVirConfigStoragePoolTarget))
+#define GVIR_CONFIG_STORAGE_POOL_TARGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST
((klass), GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET, GVirConfigStoragePoolTargetClass))
+#define GVIR_IS_CONFIG_STORAGE_POOL_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE
((obj), GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET))
+#define GVIR_IS_CONFIG_STORAGE_POOL_TARGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE
((klass), GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET))
+#define GVIR_CONFIG_STORAGE_POOL_TARGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS
((obj), GVIR_TYPE_CONFIG_STORAGE_POOL_TARGET, GVirConfigStoragePoolTargetClass))
+
+typedef struct _GVirConfigStoragePoolTarget GVirConfigStoragePoolTarget;
+typedef struct _GVirConfigStoragePoolTargetPrivate GVirConfigStoragePoolTargetPrivate;
+typedef struct _GVirConfigStoragePoolTargetClass GVirConfigStoragePoolTargetClass;
+
+struct _GVirConfigStoragePoolTarget
+{
+ GVirConfigObject parent;
+
+ GVirConfigStoragePoolTargetPrivate *priv;
+
+ /* Do not add fields to this struct */
+};
+
+struct _GVirConfigStoragePoolTargetClass
+{
+ GVirConfigObjectClass parent_class;
+
+ gpointer padding[20];
+};
+
+
+GType gvir_config_storage_pool_target_get_type(void);
+
+GVirConfigStoragePoolTarget *gvir_config_storage_pool_target_new(void);
+GVirConfigStoragePoolTarget *gvir_config_storage_pool_target_new_from_xml(const gchar
*xml,
+ GError
**error);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_STORAGE_POOL_TARGET_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
new file mode 100644
index 0000000..899d4b5
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
@@ -0,0 +1,72 @@
+/*
+ * libvirt-gconfig-storage-vol-backing-store.c: libvirt storage vol backing store
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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+* Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#include <config.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-object-private.h"
+
+
+#define GVIR_CONFIG_STORAGE_VOL_BACKING_STORE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE,
GVirConfigStorageVolBackingStorePrivate))
+
+struct _GVirConfigStorageVolBackingStorePrivate
+{
+ gboolean unused;
+};
+
+G_DEFINE_TYPE(GVirConfigStorageVolBackingStore, gvir_config_storage_vol_backing_store,
GVIR_TYPE_CONFIG_OBJECT);
+
+
+static void
gvir_config_storage_vol_backing_store_class_init(GVirConfigStorageVolBackingStoreClass
*klass)
+{
+ g_type_class_add_private(klass, sizeof(GVirConfigStorageVolBackingStorePrivate));
+}
+
+
+static void gvir_config_storage_vol_backing_store_init(GVirConfigStorageVolBackingStore
*backing_store)
+{
+ g_debug("Init GVirConfigStorageVolBackingStore=%p", backing_store);
+
+ backing_store->priv =
GVIR_CONFIG_STORAGE_VOL_BACKING_STORE_GET_PRIVATE(backing_store);
+}
+
+
+GVirConfigStorageVolBackingStore *gvir_config_storage_vol_backing_store_new(void)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new(GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE,
+ "backingStore", NULL);
+ return GVIR_CONFIG_STORAGE_VOL_BACKING_STORE(object);
+}
+
+GVirConfigStorageVolBackingStore
*gvir_config_storage_vol_backing_store_new_from_xml(const gchar *xml,
+ GError **error)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new_from_xml(GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE,
+ "backingStore", NULL,
+ xml, error);
+ return GVIR_CONFIG_STORAGE_VOL_BACKING_STORE(object);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h
b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h
new file mode 100644
index 0000000..8829c66
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h
@@ -0,0 +1,68 @@
+/*
+ * libvirt-gconfig-storage-vol-backing-store.c: libvirt storage volume backing store
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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included
directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_STORAGE_VOL_BACKING_STORE_H__
+#define __LIBVIRT_GCONFIG_STORAGE_VOL_BACKING_STORE_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE
(gvir_config_storage_vol_backing_store_get_type ())
+#define GVIR_CONFIG_STORAGE_VOL_BACKING_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST
((obj), GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE, GVirConfigStorageVolBackingStore))
+#define GVIR_CONFIG_STORAGE_VOL_BACKING_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST
((klass), GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE,
GVirConfigStorageVolBackingStoreClass))
+#define GVIR_IS_CONFIG_STORAGE_VOL_BACKING_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE
((obj), GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE))
+#define GVIR_IS_CONFIG_STORAGE_VOL_BACKING_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE
((klass), GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE))
+#define GVIR_CONFIG_STORAGE_VOL_BACKING_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS
((obj), GVIR_TYPE_CONFIG_STORAGE_VOL_BACKING_STORE,
GVirConfigStorageVolBackingStoreClass))
+
+typedef struct _GVirConfigStorageVolBackingStore GVirConfigStorageVolBackingStore;
+typedef struct _GVirConfigStorageVolBackingStorePrivate
GVirConfigStorageVolBackingStorePrivate;
+typedef struct _GVirConfigStorageVolBackingStoreClass
GVirConfigStorageVolBackingStoreClass;
+
+struct _GVirConfigStorageVolBackingStore
+{
+ GVirConfigObject parent;
+
+ GVirConfigStorageVolBackingStorePrivate *priv;
+
+ /* Do not add fields to this struct */
+};
+
+struct _GVirConfigStorageVolBackingStoreClass
+{
+ GVirConfigObjectClass parent_class;
+
+ gpointer padding[20];
+};
+
+
+GType gvir_config_storage_vol_backing_store_get_type(void);
+
+GVirConfigStorageVolBackingStore *gvir_config_storage_vol_backing_store_new(void);
+GVirConfigStorageVolBackingStore
*gvir_config_storage_vol_backing_store_new_from_xml(const gchar *xml,
+
GError **error);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_STORAGE_VOL_BACKING_STORE_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
new file mode 100644
index 0000000..516a4b9
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c
@@ -0,0 +1,72 @@
+/*
+ * libvirt-gconfig-storage-vol-target.c: libvirt storage vol target 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#include <config.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-object-private.h"
+
+
+#define GVIR_CONFIG_STORAGE_VOL_TARGET_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET,
GVirConfigStorageVolTargetPrivate))
+
+struct _GVirConfigStorageVolTargetPrivate
+{
+ gboolean unused;
+};
+
+G_DEFINE_TYPE(GVirConfigStorageVolTarget, gvir_config_storage_vol_target,
GVIR_TYPE_CONFIG_OBJECT);
+
+
+static void gvir_config_storage_vol_target_class_init(GVirConfigStorageVolTargetClass
*klass)
+{
+ g_type_class_add_private(klass, sizeof(GVirConfigStorageVolTargetPrivate));
+}
+
+
+static void gvir_config_storage_vol_target_init(GVirConfigStorageVolTarget *target)
+{
+ g_debug("Init GVirConfigStorageVolTarget=%p", target);
+
+ target->priv = GVIR_CONFIG_STORAGE_VOL_TARGET_GET_PRIVATE(target);
+}
+
+
+GVirConfigStorageVolTarget *gvir_config_storage_vol_target_new(void)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new(GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET,
+ "target", NULL);
+ return GVIR_CONFIG_STORAGE_VOL_TARGET(object);
+}
+
+GVirConfigStorageVolTarget *gvir_config_storage_vol_target_new_from_xml(const gchar
*xml,
+ GError **error)
+{
+ GVirConfigObject *object;
+
+ object = gvir_config_object_new_from_xml(GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET,
+ "target", NULL,
+ xml, error);
+ return GVIR_CONFIG_STORAGE_VOL_TARGET(object);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.h
b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.h
new file mode 100644
index 0000000..9c14681
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.h
@@ -0,0 +1,68 @@
+/*
+ * libvirt-gconfig-storage-vol-target.c: libvirt storage volume target configuration
+ *
+ * Copyright (C) 2010-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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Christophe Fergeau <cfergeau(a)redhat.com>
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included
directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_STORAGE_VOL_TARGET_H__
+#define __LIBVIRT_GCONFIG_STORAGE_VOL_TARGET_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET
(gvir_config_storage_vol_target_get_type ())
+#define GVIR_CONFIG_STORAGE_VOL_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST
((obj), GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET, GVirConfigStorageVolTarget))
+#define GVIR_CONFIG_STORAGE_VOL_TARGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET, GVirConfigStorageVolTargetClass))
+#define GVIR_IS_CONFIG_STORAGE_VOL_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE
((obj), GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET))
+#define GVIR_IS_CONFIG_STORAGE_VOL_TARGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET))
+#define GVIR_CONFIG_STORAGE_VOL_TARGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GVIR_TYPE_CONFIG_STORAGE_VOL_TARGET, GVirConfigStorageVolTargetClass))
+
+typedef struct _GVirConfigStorageVolTarget GVirConfigStorageVolTarget;
+typedef struct _GVirConfigStorageVolTargetPrivate GVirConfigStorageVolTargetPrivate;
+typedef struct _GVirConfigStorageVolTargetClass GVirConfigStorageVolTargetClass;
+
+struct _GVirConfigStorageVolTarget
+{
+ GVirConfigObject parent;
+
+ GVirConfigStorageVolTargetPrivate *priv;
+
+ /* Do not add fields to this struct */
+};
+
+struct _GVirConfigStorageVolTargetClass
+{
+ GVirConfigObjectClass parent_class;
+
+ gpointer padding[20];
+};
+
+
+GType gvir_config_storage_vol_target_get_type(void);
+
+GVirConfigStorageVolTarget *gvir_config_storage_vol_target_new(void);
+GVirConfigStorageVolTarget *gvir_config_storage_vol_target_new_from_xml(const gchar
*xml,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_STORAGE_VOL_TARGET_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig.h b/libvirt-gconfig/libvirt-gconfig.h
index c60e221..252f51c 100644
--- a/libvirt-gconfig/libvirt-gconfig.h
+++ b/libvirt-gconfig/libvirt-gconfig.h
@@ -58,7 +58,12 @@
#include <libvirt-gconfig/libvirt-gconfig-network-filter.h>
#include <libvirt-gconfig/libvirt-gconfig-node-device.h>
#include <libvirt-gconfig/libvirt-gconfig-secret.h>
+#include <libvirt-gconfig/libvirt-gconfig-storage-permissions.h>
#include <libvirt-gconfig/libvirt-gconfig-storage-pool.h>
+#include <libvirt-gconfig/libvirt-gconfig-storage-pool-source.h>
+#include <libvirt-gconfig/libvirt-gconfig-storage-pool-target.h>
#include <libvirt-gconfig/libvirt-gconfig-storage-vol.h>
+#include <libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h>
+#include <libvirt-gconfig/libvirt-gconfig-storage-vol-target.h>
#endif /* __LIBVIRT_GCONFIG_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 60026af..34c3d6b 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -197,6 +197,10 @@ LIBVIRT_GCONFIG_0.0.1 {
gvir_config_secret_new;
gvir_config_secret_new_from_xml;
+ gvir_config_storage_permissions_get_type;
+ gvir_config_storage_permissions_new;
+ gvir_config_storage_permissions_new_from_xml;
+
gvir_config_storage_pool_get_type;
gvir_config_storage_pool_new;
gvir_config_storage_pool_new_from_xml;
@@ -206,6 +210,14 @@ LIBVIRT_GCONFIG_0.0.1 {
gvir_config_storage_pool_set_name;
gvir_config_storage_pool_set_uuid;
+ gvir_config_storage_pool_source_get_type;
+ gvir_config_storage_pool_source_new;
+ gvir_config_storage_pool_source_new_from_xml;
+
+ gvir_config_storage_pool_target_get_type;
+ gvir_config_storage_pool_target_new;
+ gvir_config_storage_pool_target_new_from_xml;
+
gvir_config_storage_vol_get_type;
gvir_config_storage_vol_new;
gvir_config_storage_vol_new_from_xml;
@@ -213,6 +225,14 @@ LIBVIRT_GCONFIG_0.0.1 {
gvir_config_storage_vol_set_capacity;
gvir_config_storage_vol_set_name;
+ gvir_config_storage_vol_backing_store_get_type;
+ gvir_config_storage_vol_backing_store_new;
+ gvir_config_storage_vol_backing_store_new_from_xml;
+
+ gvir_config_storage_vol_target_get_type;
+ gvir_config_storage_vol_target_new;
+ gvir_config_storage_vol_target_new_from_xml;
+
local:
*;
};
--
1.7.7.3