2011-01-24 12:16:30 +00:00
|
|
|
/*
|
|
|
|
* domain_lock.c: Locking for domain lifecycle operations
|
|
|
|
*
|
|
|
|
* 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
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2011-01-24 12:16:30 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_DOMAIN_LOCK_H__
|
|
|
|
# define __VIR_DOMAIN_LOCK_H__
|
|
|
|
|
|
|
|
# include "internal.h"
|
|
|
|
# include "domain_conf.h"
|
|
|
|
# include "lock_manager.h"
|
|
|
|
|
|
|
|
int virDomainLockProcessStart(virLockManagerPluginPtr plugin,
|
2012-09-17 13:36:47 +00:00
|
|
|
const char *uri,
|
2011-01-24 12:16:30 +00:00
|
|
|
virDomainObjPtr dom,
|
2011-06-24 14:14:41 +00:00
|
|
|
bool paused,
|
|
|
|
int *fd);
|
2011-01-24 12:16:30 +00:00
|
|
|
int virDomainLockProcessPause(virLockManagerPluginPtr plugin,
|
|
|
|
virDomainObjPtr dom,
|
|
|
|
char **state);
|
|
|
|
int virDomainLockProcessResume(virLockManagerPluginPtr plugin,
|
2012-09-17 13:36:47 +00:00
|
|
|
const char *uri,
|
2011-01-24 12:16:30 +00:00
|
|
|
virDomainObjPtr dom,
|
|
|
|
const char *state);
|
|
|
|
int virDomainLockProcessInquire(virLockManagerPluginPtr plugin,
|
|
|
|
virDomainObjPtr dom,
|
|
|
|
char **state);
|
|
|
|
|
|
|
|
int virDomainLockDiskAttach(virLockManagerPluginPtr plugin,
|
2012-09-17 13:36:47 +00:00
|
|
|
const char *uri,
|
2011-01-24 12:16:30 +00:00
|
|
|
virDomainObjPtr dom,
|
|
|
|
virDomainDiskDefPtr disk);
|
|
|
|
int virDomainLockDiskDetach(virLockManagerPluginPtr plugin,
|
|
|
|
virDomainObjPtr dom,
|
|
|
|
virDomainDiskDefPtr disk);
|
|
|
|
|
|
|
|
int virDomainLockLeaseAttach(virLockManagerPluginPtr plugin,
|
2012-09-17 13:36:47 +00:00
|
|
|
const char *uri,
|
2011-01-24 12:16:30 +00:00
|
|
|
virDomainObjPtr dom,
|
|
|
|
virDomainLeaseDefPtr lease);
|
|
|
|
int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin,
|
|
|
|
virDomainObjPtr dom,
|
|
|
|
virDomainLeaseDefPtr lease);
|
|
|
|
|
|
|
|
#endif /* __VIR_DOMAIN_LOCK_H__ */
|