libvirt/src/locking/lock_manager.h
Daniel P. Berrangé 568a417224 Enforce a standard header file guard symbol name
Require that all headers are guarded by a symbol named

  LIBVIRT_$FILENAME

where $FILENAME is the uppercased filename, with all characters
outside a-z changed into '_'.

Note we do not use a leading __ because that is technically a
namespace reserved for the toolchain.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-14 10:47:13 +00:00

71 lines
2.8 KiB
C

/*
* lock_manager.h: Defines the internal lock manager API
*
* 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
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
#ifndef LIBVIRT_LOCK_MANAGER_H
# define LIBVIRT_LOCK_MANAGER_H
# include "internal.h"
# include "lock_driver.h"
typedef struct _virLockManagerPlugin virLockManagerPlugin;
typedef virLockManagerPlugin *virLockManagerPluginPtr;
virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
const char *driverName,
const char *configDir,
unsigned int flags);
void virLockManagerPluginRef(virLockManagerPluginPtr plugin);
void virLockManagerPluginUnref(virLockManagerPluginPtr plugin);
const char *virLockManagerPluginGetName(virLockManagerPluginPtr plugin);
bool virLockManagerPluginUsesState(virLockManagerPluginPtr plugin);
virLockDriverPtr virLockManagerPluginGetDriver(virLockManagerPluginPtr plugin);
virLockManagerPtr virLockManagerNew(virLockDriverPtr driver,
unsigned int type,
size_t nparams,
virLockManagerParamPtr params,
unsigned int flags);
int virLockManagerAddResource(virLockManagerPtr manager,
unsigned int type,
const char *name,
size_t nparams,
virLockManagerParamPtr params,
unsigned int flags);
int virLockManagerAcquire(virLockManagerPtr manager,
const char *state,
unsigned int flags,
virDomainLockFailureAction action,
int *fd);
int virLockManagerRelease(virLockManagerPtr manager,
char **state,
unsigned int flags);
int virLockManagerInquire(virLockManagerPtr manager,
char **state,
unsigned int flags);
int virLockManagerFree(virLockManagerPtr manager);
#endif /* LIBVIRT_LOCK_MANAGER_H */