1 /* 2 * qemu_backup.h: Implementation and handling of the backup jobs 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library. If not, see 16 * <http://www.gnu.org/licenses/>. 17 */ 18 19 #pragma once 20 21 int 22 qemuBackupBegin(virDomainObj *vm, 23 const char *backupXML, 24 const char *checkpointXML, 25 unsigned int flags); 26 27 char * 28 qemuBackupGetXMLDesc(virDomainObj *vm, 29 unsigned int flags); 30 31 void 32 qemuBackupJobCancelBlockjobs(virDomainObj *vm, 33 virDomainBackupDef *backup, 34 bool terminatebackup, 35 int asyncJob); 36 37 void 38 qemuBackupNotifyBlockjobEnd(virDomainObj *vm, 39 virDomainDiskDef *disk, 40 qemuBlockjobState state, 41 const char *errmsg, 42 unsigned long long cur, 43 unsigned long long end, 44 int asyncJob); 45 46 void 47 qemuBackupJobTerminate(virDomainObj *vm, 48 qemuDomainJobStatus jobstatus); 49 50 int 51 qemuBackupGetJobInfoStats(virQEMUDriver *driver, 52 virDomainObj *vm, 53 qemuDomainJobInfo *jobInfo); 54 55 /* exported for testing */ 56 int 57 qemuBackupDiskPrepareOneBitmapsChain(virStorageSource *backingChain, 58 virStorageSource *targetsrc, 59 const char *targetbitmap, 60 const char *incremental, 61 virJSONValue *actions, 62 GHashTable *blockNamedNodeData); 63