1 /* 2 * domain_lock.h: Locking for domain lifecycle operations 3 * 4 * Copyright (C) 2010-2011 Red Hat, Inc. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library. If not, see 18 * <http://www.gnu.org/licenses/>. 19 * 20 */ 21 22 #pragma once 23 24 #include "internal.h" 25 #include "domain_conf.h" 26 #include "lock_manager.h" 27 28 int virDomainLockProcessStart(virLockManagerPlugin *plugin, 29 const char *uri, 30 virDomainObj *dom, 31 bool paused, 32 int *fd); 33 int virDomainLockProcessPause(virLockManagerPlugin *plugin, 34 virDomainObj *dom, 35 char **state); 36 int virDomainLockProcessResume(virLockManagerPlugin *plugin, 37 const char *uri, 38 virDomainObj *dom, 39 const char *state); 40 int virDomainLockProcessInquire(virLockManagerPlugin *plugin, 41 virDomainObj *dom, 42 char **state); 43 44 int virDomainLockImageAttach(virLockManagerPlugin *plugin, 45 const char *uri, 46 virDomainObj *dom, 47 virStorageSource *src); 48 int virDomainLockImageDetach(virLockManagerPlugin *plugin, 49 virDomainObj *dom, 50 virStorageSource *src); 51 52 int virDomainLockLeaseAttach(virLockManagerPlugin *plugin, 53 const char *uri, 54 virDomainObj *dom, 55 virDomainLeaseDef *lease); 56 int virDomainLockLeaseDetach(virLockManagerPlugin *plugin, 57 virDomainObj *dom, 58 virDomainLeaseDef *lease); 59