[RFC PATCH 01/10] api: add API to create backup

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

 



---
 include/libvirt/libvirt-domain-backup.h | 59 +++++++++++++++++++++++++++++++++
 include/libvirt/libvirt.h               |  1 +
 2 files changed, 60 insertions(+)
 create mode 100644 include/libvirt/libvirt-domain-backup.h

diff --git a/include/libvirt/libvirt-domain-backup.h b/include/libvirt/libvirt-domain-backup.h
new file mode 100644
index 0000000..e2761cb
--- /dev/null
+++ b/include/libvirt/libvirt-domain-backup.h
@@ -0,0 +1,59 @@
+/*
+ * libvirt-domain-backup.h
+ * Summary: APIs for management of domain backups
+ * Description: Provides APIs for the management of domain backups
+ * Author: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
+ *
+ * Copyright (C) 2016 Virtuozzo
+ *
+ * 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/>.
+ */
+
+#ifndef __VIR_LIBVIRT_DOMAIN_BACKUP_H__
+# define __VIR_LIBVIRT_DOMAIN_BACKUP_H__
+
+# ifndef __VIR_LIBVIRT_H_INCLUDES__
+#  error "Don't include this file directly, only use libvirt/libvirt.h"
+# endif
+
+/**
+ * virDomainBackup:
+ *
+ * a virDomainBackup is a private structure representing a backup of
+ * a domain.
+ */
+typedef struct _virDomainBackup virDomainBackup;
+
+/**
+ * virDomainBackupPtr:
+ *
+ * a virDomainBackupPtr is pointer to a virDomainBackup private structure,
+ * and is the type used to reference a domain backup in the API.
+ */
+typedef virDomainBackup *virDomainBackupPtr;
+
+const char *virDomainBackupGetName(virDomainBackupPtr backup);
+virDomainPtr virDomainBackupGetDomain(virDomainBackupPtr backup);
+virConnectPtr virDomainBackupGetConnect(virDomainBackupPtr backup);
+
+/* Take a backup of the current VM state */
+virDomainBackupPtr virDomainBackupCreateXML(virDomainPtr domain,
+                                            const char *xmlDesc,
+                                            unsigned int flags);
+
+int virDomainBackupRef(virDomainBackupPtr backup);
+int virDomainBackupFree(virDomainBackupPtr backup);
+
+#endif /* __VIR_LIBVIRT_DOMAIN_BACKUP_H__ */
diff --git a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h
index 36f6d60..be0d570 100644
--- a/include/libvirt/libvirt.h
+++ b/include/libvirt/libvirt.h
@@ -37,6 +37,7 @@ extern "C" {
 # include <libvirt/libvirt-host.h>
 # include <libvirt/libvirt-domain.h>
 # include <libvirt/libvirt-domain-snapshot.h>
+# include <libvirt/libvirt-domain-backup.h>
 # include <libvirt/libvirt-event.h>
 # include <libvirt/libvirt-interface.h>
 # include <libvirt/libvirt-network.h>
-- 
1.8.3.1

--
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]