[libvirt-glib 05/10] Add GVirConfigStorageVolBackingStore setters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 .../libvirt-gconfig-storage-vol-backing-store.c    |   22 ++++++++++++++++++++
 .../libvirt-gconfig-storage-vol-backing-store.h    |    4 +++
 libvirt-gconfig/libvirt-gconfig.sym                |    2 +
 3 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
index 899d4b5..2530ed3 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.c
@@ -70,3 +70,25 @@ GVirConfigStorageVolBackingStore *gvir_config_storage_vol_backing_store_new_from
                                              xml, error);
     return GVIR_CONFIG_STORAGE_VOL_BACKING_STORE(object);
 }
+
+void gvir_config_storage_vol_backing_store_set_format(GVirConfigStorageVolBackingStore *backing_store,
+                                                      const char *format)
+{
+    GVirConfigObject *node;
+
+    g_return_if_fail(GVIR_IS_CONFIG_STORAGE_VOL_BACKING_STORE(backing_store));
+
+    node = gvir_config_object_replace_child(GVIR_CONFIG_OBJECT(backing_store), "format");
+    g_return_if_fail(GVIR_IS_CONFIG_OBJECT(node));
+    gvir_config_object_set_attribute(node, "type", format, NULL);
+    g_object_unref(G_OBJECT(node));
+}
+
+void gvir_config_storage_vol_backing_store_set_path(GVirConfigStorageVolBackingStore *backing_store,
+                                                    const char *path)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_STORAGE_VOL_BACKING_STORE(backing_store));
+
+    gvir_config_object_set_node_content(GVIR_CONFIG_OBJECT(backing_store),
+                                        "path", path);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h
index 8829c66..9b709ed 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h
@@ -62,6 +62,10 @@ 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);
+void gvir_config_storage_vol_backing_store_set_format(GVirConfigStorageVolBackingStore *backing_store,
+                                                      const char *format);
+void gvir_config_storage_vol_backing_store_set_path(GVirConfigStorageVolBackingStore *backing_store,
+                                                    const char *path);
 
 G_END_DECLS
 
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 3ad0e0b..e870108 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -228,6 +228,8 @@ LIBVIRT_GCONFIG_0.0.1 {
 	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_backing_store_set_format;
+	gvir_config_storage_vol_backing_store_set_path;
 
 	gvir_config_storage_vol_target_get_type;
 	gvir_config_storage_vol_target_new;
-- 
1.7.7.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]