Split driver.h into multiple parts
With the large number of APIs in libvirt the driver.h file, it is easy to get lost looking for things. Split each driver into a separate header file based on the functional driver groups. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
931dff992e
commit
d21d35e335
1396
src/driver-hypervisor.h
Normal file
1396
src/driver-hypervisor.h
Normal file
File diff suppressed because it is too large
Load Diff
131
src/driver-interface.h
Normal file
131
src/driver-interface.h
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
/*
|
||||||
|
* driver-interface.h: entry points for interface drivers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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 __VIR_DRIVER_INTERFACE_H__
|
||||||
|
# define __VIR_DRIVER_INTERFACE_H__
|
||||||
|
|
||||||
|
# ifndef __VIR_DRIVER_H_INCLUDES___
|
||||||
|
# error "Don't include this file directly, only use driver.h"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
typedef virDrvConnectOpen virDrvInterfaceOpen;
|
||||||
|
typedef virDrvConnectClose virDrvInterfaceClose;
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNumOfInterfaces)(virConnectPtr conn);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListInterfaces)(virConnectPtr conn,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNumOfDefinedInterfaces)(virConnectPtr conn);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListDefinedInterfaces)(virConnectPtr conn,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListAllInterfaces)(virConnectPtr conn,
|
||||||
|
virInterfacePtr **ifaces,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef virInterfacePtr
|
||||||
|
(*virDrvInterfaceLookupByName)(virConnectPtr conn,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
typedef virInterfacePtr
|
||||||
|
(*virDrvInterfaceLookupByMACString)(virConnectPtr conn,
|
||||||
|
const char *mac);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvInterfaceGetXMLDesc)(virInterfacePtr iface,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef virInterfacePtr
|
||||||
|
(*virDrvInterfaceDefineXML)(virConnectPtr conn,
|
||||||
|
const char *xmlDesc,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvInterfaceUndefine)(virInterfacePtr iface);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvInterfaceCreate)(virInterfacePtr iface,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvInterfaceDestroy)(virInterfacePtr iface,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvInterfaceIsActive)(virInterfacePtr iface);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvInterfaceChangeBegin)(virConnectPtr conn,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvInterfaceChangeCommit)(virConnectPtr conn,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvInterfaceChangeRollback)(virConnectPtr conn,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef struct _virInterfaceDriver virInterfaceDriver;
|
||||||
|
typedef virInterfaceDriver *virInterfaceDriverPtr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _virInterfaceDriver:
|
||||||
|
*
|
||||||
|
* Structure associated to a network interface driver, defining the various
|
||||||
|
* entry points for it.
|
||||||
|
*
|
||||||
|
* All drivers must support the following fields/methods:
|
||||||
|
* - open
|
||||||
|
* - close
|
||||||
|
*/
|
||||||
|
struct _virInterfaceDriver {
|
||||||
|
const char *name; /* the name of the driver */
|
||||||
|
virDrvInterfaceOpen interfaceOpen;
|
||||||
|
virDrvInterfaceClose interfaceClose;
|
||||||
|
virDrvConnectNumOfInterfaces connectNumOfInterfaces;
|
||||||
|
virDrvConnectListInterfaces connectListInterfaces;
|
||||||
|
virDrvConnectNumOfDefinedInterfaces connectNumOfDefinedInterfaces;
|
||||||
|
virDrvConnectListDefinedInterfaces connectListDefinedInterfaces;
|
||||||
|
virDrvConnectListAllInterfaces connectListAllInterfaces;
|
||||||
|
virDrvInterfaceLookupByName interfaceLookupByName;
|
||||||
|
virDrvInterfaceLookupByMACString interfaceLookupByMACString;
|
||||||
|
virDrvInterfaceGetXMLDesc interfaceGetXMLDesc;
|
||||||
|
virDrvInterfaceDefineXML interfaceDefineXML;
|
||||||
|
virDrvInterfaceUndefine interfaceUndefine;
|
||||||
|
virDrvInterfaceCreate interfaceCreate;
|
||||||
|
virDrvInterfaceDestroy interfaceDestroy;
|
||||||
|
virDrvInterfaceIsActive interfaceIsActive;
|
||||||
|
virDrvInterfaceChangeBegin interfaceChangeBegin;
|
||||||
|
virDrvInterfaceChangeCommit interfaceChangeCommit;
|
||||||
|
virDrvInterfaceChangeRollback interfaceChangeRollback;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __VIR_DRIVER_INTERFACE_H__ */
|
166
src/driver-network.h
Normal file
166
src/driver-network.h
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
/*
|
||||||
|
* driver-network.h: entry points for network drivers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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 __VIR_DRIVER_NETWORK_H__
|
||||||
|
# define __VIR_DRIVER_NETWORK_H__
|
||||||
|
|
||||||
|
# ifndef __VIR_DRIVER_H_INCLUDES___
|
||||||
|
# error "Don't include this file directly, only use driver.h"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
typedef virDrvConnectOpen virDrvNetworkOpen;
|
||||||
|
typedef virDrvConnectClose virDrvNetworkClose;
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNumOfNetworks)(virConnectPtr conn);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListNetworks)(virConnectPtr conn,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNumOfDefinedNetworks)(virConnectPtr conn);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListDefinedNetworks)(virConnectPtr conn,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListAllNetworks)(virConnectPtr conn,
|
||||||
|
virNetworkPtr **nets,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNetworkEventRegisterAny)(virConnectPtr conn,
|
||||||
|
virNetworkPtr dom,
|
||||||
|
int eventID,
|
||||||
|
virConnectNetworkEventGenericCallback cb,
|
||||||
|
void *opaque,
|
||||||
|
virFreeCallback freecb);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNetworkEventDeregisterAny)(virConnectPtr conn,
|
||||||
|
int callbackID);
|
||||||
|
|
||||||
|
typedef virNetworkPtr
|
||||||
|
(*virDrvNetworkLookupByUUID)(virConnectPtr conn,
|
||||||
|
const unsigned char *uuid);
|
||||||
|
|
||||||
|
typedef virNetworkPtr
|
||||||
|
(*virDrvNetworkLookupByName)(virConnectPtr conn,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
typedef virNetworkPtr
|
||||||
|
(*virDrvNetworkCreateXML)(virConnectPtr conn,
|
||||||
|
const char *xmlDesc);
|
||||||
|
|
||||||
|
typedef virNetworkPtr
|
||||||
|
(*virDrvNetworkDefineXML)(virConnectPtr conn,
|
||||||
|
const char *xml);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkUndefine)(virNetworkPtr network);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkUpdate)(virNetworkPtr network,
|
||||||
|
unsigned int command, /* virNetworkUpdateCommand */
|
||||||
|
unsigned int section, /* virNetworkUpdateSection */
|
||||||
|
int parentIndex,
|
||||||
|
const char *xml,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkCreate)(virNetworkPtr network);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkDestroy)(virNetworkPtr network);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvNetworkGetXMLDesc)(virNetworkPtr network,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvNetworkGetBridgeName)(virNetworkPtr network);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkGetAutostart)(virNetworkPtr network,
|
||||||
|
int *autostart);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkSetAutostart)(virNetworkPtr network,
|
||||||
|
int autostart);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkIsActive)(virNetworkPtr net);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkIsPersistent)(virNetworkPtr net);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNetworkGetDHCPLeases)(virNetworkPtr network,
|
||||||
|
const char *mac,
|
||||||
|
virNetworkDHCPLeasePtr **leases,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef struct _virNetworkDriver virNetworkDriver;
|
||||||
|
typedef virNetworkDriver *virNetworkDriverPtr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _virNetworkDriver:
|
||||||
|
*
|
||||||
|
* Structure associated to a network virtualization driver, defining the various
|
||||||
|
* entry points for it.
|
||||||
|
*
|
||||||
|
* All drivers must support the following fields/methods:
|
||||||
|
* - open
|
||||||
|
* - close
|
||||||
|
*/
|
||||||
|
struct _virNetworkDriver {
|
||||||
|
const char * name; /* the name of the driver */
|
||||||
|
virDrvNetworkOpen networkOpen;
|
||||||
|
virDrvNetworkClose networkClose;
|
||||||
|
virDrvConnectNumOfNetworks connectNumOfNetworks;
|
||||||
|
virDrvConnectListNetworks connectListNetworks;
|
||||||
|
virDrvConnectNumOfDefinedNetworks connectNumOfDefinedNetworks;
|
||||||
|
virDrvConnectListDefinedNetworks connectListDefinedNetworks;
|
||||||
|
virDrvConnectListAllNetworks connectListAllNetworks;
|
||||||
|
virDrvConnectNetworkEventRegisterAny connectNetworkEventRegisterAny;
|
||||||
|
virDrvConnectNetworkEventDeregisterAny connectNetworkEventDeregisterAny;
|
||||||
|
virDrvNetworkLookupByUUID networkLookupByUUID;
|
||||||
|
virDrvNetworkLookupByName networkLookupByName;
|
||||||
|
virDrvNetworkCreateXML networkCreateXML;
|
||||||
|
virDrvNetworkDefineXML networkDefineXML;
|
||||||
|
virDrvNetworkUndefine networkUndefine;
|
||||||
|
virDrvNetworkUpdate networkUpdate;
|
||||||
|
virDrvNetworkCreate networkCreate;
|
||||||
|
virDrvNetworkDestroy networkDestroy;
|
||||||
|
virDrvNetworkGetXMLDesc networkGetXMLDesc;
|
||||||
|
virDrvNetworkGetBridgeName networkGetBridgeName;
|
||||||
|
virDrvNetworkGetAutostart networkGetAutostart;
|
||||||
|
virDrvNetworkSetAutostart networkSetAutostart;
|
||||||
|
virDrvNetworkIsActive networkIsActive;
|
||||||
|
virDrvNetworkIsPersistent networkIsPersistent;
|
||||||
|
virDrvNetworkGetDHCPLeases networkGetDHCPLeases;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __VIR_DRIVER_NETWORK_H__ */
|
112
src/driver-nodedev.h
Normal file
112
src/driver-nodedev.h
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* driver-nodedev.h: entry points for nodedev drivers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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 __VIR_DRIVER_NODEDEV_H__
|
||||||
|
# define __VIR_DRIVER_NODEDEV_H__
|
||||||
|
|
||||||
|
# ifndef __VIR_DRIVER_H_INCLUDES___
|
||||||
|
# error "Don't include this file directly, only use driver.h"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
typedef virDrvConnectOpen virDrvNodeDeviceOpen;
|
||||||
|
typedef virDrvConnectClose virDrvNodeDeviceClose;
|
||||||
|
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNodeNumOfDevices)(virConnectPtr conn,
|
||||||
|
const char *cap,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNodeListDevices)(virConnectPtr conn,
|
||||||
|
const char *cap,
|
||||||
|
char **const names,
|
||||||
|
int maxnames,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListAllNodeDevices)(virConnectPtr conn,
|
||||||
|
virNodeDevicePtr **devices,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef virNodeDevicePtr
|
||||||
|
(*virDrvNodeDeviceLookupByName)(virConnectPtr conn,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
typedef virNodeDevicePtr
|
||||||
|
(*virDrvNodeDeviceLookupSCSIHostByWWN)(virConnectPtr conn,
|
||||||
|
const char *wwnn,
|
||||||
|
const char *wwpn,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvNodeDeviceGetXMLDesc)(virNodeDevicePtr dev,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvNodeDeviceGetParent)(virNodeDevicePtr dev);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNodeDeviceNumOfCaps)(virNodeDevicePtr dev);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNodeDeviceListCaps)(virNodeDevicePtr dev,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef virNodeDevicePtr
|
||||||
|
(*virDrvNodeDeviceCreateXML)(virConnectPtr conn,
|
||||||
|
const char *xmlDesc,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNodeDeviceDestroy)(virNodeDevicePtr dev);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _virNodeDeviceDriver virNodeDeviceDriver;
|
||||||
|
typedef virNodeDeviceDriver *virNodeDeviceDriverPtr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _virNodeDeviceDriver:
|
||||||
|
*
|
||||||
|
* Structure associated with monitoring the devices
|
||||||
|
* on a virtualized node.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
struct _virNodeDeviceDriver {
|
||||||
|
const char * name; /* the name of the driver */
|
||||||
|
virDrvNodeDeviceOpen nodeDeviceOpen;
|
||||||
|
virDrvNodeDeviceClose nodeDeviceClose;
|
||||||
|
virDrvNodeNumOfDevices nodeNumOfDevices;
|
||||||
|
virDrvNodeListDevices nodeListDevices;
|
||||||
|
virDrvConnectListAllNodeDevices connectListAllNodeDevices;
|
||||||
|
virDrvNodeDeviceLookupByName nodeDeviceLookupByName;
|
||||||
|
virDrvNodeDeviceLookupSCSIHostByWWN nodeDeviceLookupSCSIHostByWWN;
|
||||||
|
virDrvNodeDeviceGetXMLDesc nodeDeviceGetXMLDesc;
|
||||||
|
virDrvNodeDeviceGetParent nodeDeviceGetParent;
|
||||||
|
virDrvNodeDeviceNumOfCaps nodeDeviceNumOfCaps;
|
||||||
|
virDrvNodeDeviceListCaps nodeDeviceListCaps;
|
||||||
|
virDrvNodeDeviceCreateXML nodeDeviceCreateXML;
|
||||||
|
virDrvNodeDeviceDestroy nodeDeviceDestroy;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __VIR_DRIVER_NODEDEV_H__ */
|
94
src/driver-nwfilter.h
Normal file
94
src/driver-nwfilter.h
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* driver-nwfilter.h: entry points for nwfilter drivers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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 __VIR_DRIVER_NWFILTER_H__
|
||||||
|
# define __VIR_DRIVER_NWFILTER_H__
|
||||||
|
|
||||||
|
# ifndef __VIR_DRIVER_H_INCLUDES___
|
||||||
|
# error "Don't include this file directly, only use driver.h"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef virDrvConnectOpen virDrvNWFilterOpen;
|
||||||
|
typedef virDrvConnectClose virDrvNWFilterClose;
|
||||||
|
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNumOfNWFilters)(virConnectPtr conn);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListNWFilters)(virConnectPtr conn,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListAllNWFilters)(virConnectPtr conn,
|
||||||
|
virNWFilterPtr **filters,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef virNWFilterPtr
|
||||||
|
(*virDrvNWFilterLookupByName)(virConnectPtr conn,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
typedef virNWFilterPtr
|
||||||
|
(*virDrvNWFilterLookupByUUID)(virConnectPtr conn,
|
||||||
|
const unsigned char *uuid);
|
||||||
|
|
||||||
|
typedef virNWFilterPtr
|
||||||
|
(*virDrvNWFilterDefineXML)(virConnectPtr conn,
|
||||||
|
const char *xmlDesc);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvNWFilterUndefine)(virNWFilterPtr nwfilter);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvNWFilterGetXMLDesc)(virNWFilterPtr nwfilter,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _virNWFilterDriver virNWFilterDriver;
|
||||||
|
typedef virNWFilterDriver *virNWFilterDriverPtr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _virNWFilterDriver:
|
||||||
|
*
|
||||||
|
* Structure associated to a network filter driver, defining the various
|
||||||
|
* entry points for it.
|
||||||
|
*
|
||||||
|
* All drivers must support the following fields/methods:
|
||||||
|
* - open
|
||||||
|
* - close
|
||||||
|
*/
|
||||||
|
struct _virNWFilterDriver {
|
||||||
|
const char * name; /* the name of the driver */
|
||||||
|
virDrvNWFilterOpen nwfilterOpen;
|
||||||
|
virDrvNWFilterClose nwfilterClose;
|
||||||
|
virDrvConnectNumOfNWFilters connectNumOfNWFilters;
|
||||||
|
virDrvConnectListNWFilters connectListNWFilters;
|
||||||
|
virDrvConnectListAllNWFilters connectListAllNWFilters;
|
||||||
|
virDrvNWFilterLookupByName nwfilterLookupByName;
|
||||||
|
virDrvNWFilterLookupByUUID nwfilterLookupByUUID;
|
||||||
|
virDrvNWFilterDefineXML nwfilterDefineXML;
|
||||||
|
virDrvNWFilterUndefine nwfilterUndefine;
|
||||||
|
virDrvNWFilterGetXMLDesc nwfilterGetXMLDesc;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __VIR_DRIVER_NWFILTER_H__ */
|
114
src/driver-secret.h
Normal file
114
src/driver-secret.h
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
/*
|
||||||
|
* driver-secret.h: entry points for secret drivers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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 __VIR_DRIVER_SECRET_H__
|
||||||
|
# define __VIR_DRIVER_SECRET_H__
|
||||||
|
|
||||||
|
# ifndef __VIR_DRIVER_H_INCLUDES___
|
||||||
|
# error "Don't include this file directly, only use driver.h"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
enum {
|
||||||
|
/* This getValue call is inside libvirt, override the "private" flag.
|
||||||
|
This flag cannot be set by outside callers. */
|
||||||
|
VIR_SECRET_GET_VALUE_INTERNAL_CALL = 1 << 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef virDrvConnectOpen virDrvSecretOpen;
|
||||||
|
typedef virDrvConnectClose virDrvSecretClose;
|
||||||
|
|
||||||
|
|
||||||
|
typedef virSecretPtr
|
||||||
|
(*virDrvSecretLookupByUUID)(virConnectPtr conn,
|
||||||
|
const unsigned char *uuid);
|
||||||
|
|
||||||
|
typedef virSecretPtr
|
||||||
|
(*virDrvSecretLookupByUsage)(virConnectPtr conn,
|
||||||
|
int usageType,
|
||||||
|
const char *usageID);
|
||||||
|
|
||||||
|
typedef virSecretPtr
|
||||||
|
(*virDrvSecretDefineXML)(virConnectPtr conn,
|
||||||
|
const char *xml,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvSecretGetXMLDesc)(virSecretPtr secret,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvSecretSetValue)(virSecretPtr secret,
|
||||||
|
const unsigned char *value,
|
||||||
|
size_t value_size,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef unsigned char *
|
||||||
|
(*virDrvSecretGetValue)(virSecretPtr secret,
|
||||||
|
size_t *value_size,
|
||||||
|
unsigned int flags,
|
||||||
|
unsigned int internalFlags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvSecretUndefine)(virSecretPtr secret);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNumOfSecrets)(virConnectPtr conn);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListSecrets)(virConnectPtr conn,
|
||||||
|
char **uuids,
|
||||||
|
int maxuuids);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListAllSecrets)(virConnectPtr conn,
|
||||||
|
virSecretPtr **secrets,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef struct _virSecretDriver virSecretDriver;
|
||||||
|
typedef virSecretDriver *virSecretDriverPtr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _virSecretDriver:
|
||||||
|
*
|
||||||
|
* Structure associated to a driver for storing secrets, defining the various
|
||||||
|
* entry points for it.
|
||||||
|
*
|
||||||
|
* All drivers must support the following fields/methods:
|
||||||
|
* - open
|
||||||
|
* - close
|
||||||
|
*/
|
||||||
|
struct _virSecretDriver {
|
||||||
|
const char *name;
|
||||||
|
virDrvSecretOpen secretOpen;
|
||||||
|
virDrvSecretClose secretClose;
|
||||||
|
virDrvConnectNumOfSecrets connectNumOfSecrets;
|
||||||
|
virDrvConnectListSecrets connectListSecrets;
|
||||||
|
virDrvConnectListAllSecrets connectListAllSecrets;
|
||||||
|
virDrvSecretLookupByUUID secretLookupByUUID;
|
||||||
|
virDrvSecretLookupByUsage secretLookupByUsage;
|
||||||
|
virDrvSecretDefineXML secretDefineXML;
|
||||||
|
virDrvSecretGetXMLDesc secretGetXMLDesc;
|
||||||
|
virDrvSecretSetValue secretSetValue;
|
||||||
|
virDrvSecretGetValue secretGetValue;
|
||||||
|
virDrvSecretUndefine secretUndefine;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __VIR_DRIVER_SECRET_H__ */
|
58
src/driver-state.h
Normal file
58
src/driver-state.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* driver-state.h: entry points for state drivers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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 __VIR_DRIVER_STATE_H__
|
||||||
|
# define __VIR_DRIVER_STATE_H__
|
||||||
|
|
||||||
|
# ifndef __VIR_DRIVER_H_INCLUDES___
|
||||||
|
# error "Don't include this file directly, only use driver.h"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStateInitialize)(bool privileged,
|
||||||
|
virStateInhibitCallback callback,
|
||||||
|
void *opaque);
|
||||||
|
|
||||||
|
typedef void
|
||||||
|
(*virDrvStateAutoStart)(void);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStateCleanup)(void);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStateReload)(void);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStateStop)(void);
|
||||||
|
|
||||||
|
typedef struct _virStateDriver virStateDriver;
|
||||||
|
typedef virStateDriver *virStateDriverPtr;
|
||||||
|
|
||||||
|
struct _virStateDriver {
|
||||||
|
const char *name;
|
||||||
|
virDrvStateInitialize stateInitialize;
|
||||||
|
virDrvStateAutoStart stateAutoStart;
|
||||||
|
virDrvStateCleanup stateCleanup;
|
||||||
|
virDrvStateReload stateReload;
|
||||||
|
virDrvStateStop stateStop;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __VIR_DRIVER_STATE_H__ */
|
265
src/driver-storage.h
Normal file
265
src/driver-storage.h
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
/*
|
||||||
|
* driver-storage.h: entry points for storage drivers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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 __VIR_DRIVER_STORAGE_H__
|
||||||
|
# define __VIR_DRIVER_STORAGE_H__
|
||||||
|
|
||||||
|
# ifndef __VIR_DRIVER_H_INCLUDES___
|
||||||
|
# error "Don't include this file directly, only use driver.h"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
typedef virDrvConnectOpen virDrvStorageOpen;
|
||||||
|
typedef virDrvConnectClose virDrvStorageClose;
|
||||||
|
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNumOfStoragePools)(virConnectPtr conn);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListStoragePools)(virConnectPtr conn,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectNumOfDefinedStoragePools)(virConnectPtr conn);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListDefinedStoragePools)(virConnectPtr conn,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvConnectListAllStoragePools)(virConnectPtr conn,
|
||||||
|
virStoragePoolPtr **pools,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvConnectFindStoragePoolSources)(virConnectPtr conn,
|
||||||
|
const char *type,
|
||||||
|
const char *srcSpec,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef virStoragePoolPtr
|
||||||
|
(*virDrvStoragePoolLookupByName)(virConnectPtr conn,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
typedef virStoragePoolPtr
|
||||||
|
(*virDrvStoragePoolLookupByUUID)(virConnectPtr conn,
|
||||||
|
const unsigned char *uuid);
|
||||||
|
|
||||||
|
typedef virStoragePoolPtr
|
||||||
|
(*virDrvStoragePoolLookupByVolume)(virStorageVolPtr vol);
|
||||||
|
|
||||||
|
typedef virStoragePoolPtr
|
||||||
|
(*virDrvStoragePoolCreateXML)(virConnectPtr conn,
|
||||||
|
const char *xmlDesc,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef virStoragePoolPtr
|
||||||
|
(*virDrvStoragePoolDefineXML)(virConnectPtr conn,
|
||||||
|
const char *xmlDesc,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolUndefine)(virStoragePoolPtr pool);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolBuild)(virStoragePoolPtr pool,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolCreate)(virStoragePoolPtr pool,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolDestroy)(virStoragePoolPtr pool);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolDelete)(virStoragePoolPtr pool,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolRefresh)(virStoragePoolPtr pool,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolGetInfo)(virStoragePoolPtr vol,
|
||||||
|
virStoragePoolInfoPtr info);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvStoragePoolGetXMLDesc)(virStoragePoolPtr pool,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolGetAutostart)(virStoragePoolPtr pool,
|
||||||
|
int *autostart);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolSetAutostart)(virStoragePoolPtr pool,
|
||||||
|
int autostart);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolNumOfVolumes)(virStoragePoolPtr pool);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolListVolumes)(virStoragePoolPtr pool,
|
||||||
|
char **const names,
|
||||||
|
int maxnames);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolListAllVolumes)(virStoragePoolPtr pool,
|
||||||
|
virStorageVolPtr **vols,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef virStorageVolPtr
|
||||||
|
(*virDrvStorageVolLookupByName)(virStoragePoolPtr pool,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
typedef virStorageVolPtr
|
||||||
|
(*virDrvStorageVolLookupByKey)(virConnectPtr pool,
|
||||||
|
const char *key);
|
||||||
|
|
||||||
|
typedef virStorageVolPtr
|
||||||
|
(*virDrvStorageVolLookupByPath)(virConnectPtr pool,
|
||||||
|
const char *path);
|
||||||
|
|
||||||
|
typedef virStorageVolPtr
|
||||||
|
(*virDrvStorageVolCreateXML)(virStoragePoolPtr pool,
|
||||||
|
const char *xmldesc,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStorageVolDelete)(virStorageVolPtr vol,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStorageVolWipe)(virStorageVolPtr vol,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStorageVolWipePattern)(virStorageVolPtr vol,
|
||||||
|
unsigned int algorithm,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStorageVolGetInfo)(virStorageVolPtr vol,
|
||||||
|
virStorageVolInfoPtr info);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvStorageVolGetXMLDesc)(virStorageVolPtr pool,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef char *
|
||||||
|
(*virDrvStorageVolGetPath)(virStorageVolPtr vol);
|
||||||
|
|
||||||
|
typedef virStorageVolPtr
|
||||||
|
(*virDrvStorageVolCreateXMLFrom)(virStoragePoolPtr pool,
|
||||||
|
const char *xmldesc,
|
||||||
|
virStorageVolPtr clonevol,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStorageVolDownload)(virStorageVolPtr vol,
|
||||||
|
virStreamPtr stream,
|
||||||
|
unsigned long long offset,
|
||||||
|
unsigned long long length,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStorageVolUpload)(virStorageVolPtr vol,
|
||||||
|
virStreamPtr stream,
|
||||||
|
unsigned long long offset,
|
||||||
|
unsigned long long length,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStorageVolResize)(virStorageVolPtr vol,
|
||||||
|
unsigned long long capacity,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolIsActive)(virStoragePoolPtr pool);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStoragePoolIsPersistent)(virStoragePoolPtr pool);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _virStorageDriver virStorageDriver;
|
||||||
|
typedef virStorageDriver *virStorageDriverPtr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _virStorageDriver:
|
||||||
|
*
|
||||||
|
* Structure associated to a storage driver, defining the various
|
||||||
|
* entry points for it.
|
||||||
|
*
|
||||||
|
* All drivers must support the following fields/methods:
|
||||||
|
* - open
|
||||||
|
* - close
|
||||||
|
*/
|
||||||
|
struct _virStorageDriver {
|
||||||
|
const char * name; /* the name of the driver */
|
||||||
|
virDrvStorageOpen storageOpen;
|
||||||
|
virDrvStorageClose storageClose;
|
||||||
|
virDrvConnectNumOfStoragePools connectNumOfStoragePools;
|
||||||
|
virDrvConnectListStoragePools connectListStoragePools;
|
||||||
|
virDrvConnectNumOfDefinedStoragePools connectNumOfDefinedStoragePools;
|
||||||
|
virDrvConnectListDefinedStoragePools connectListDefinedStoragePools;
|
||||||
|
virDrvConnectListAllStoragePools connectListAllStoragePools;
|
||||||
|
virDrvConnectFindStoragePoolSources connectFindStoragePoolSources;
|
||||||
|
virDrvStoragePoolLookupByName storagePoolLookupByName;
|
||||||
|
virDrvStoragePoolLookupByUUID storagePoolLookupByUUID;
|
||||||
|
virDrvStoragePoolLookupByVolume storagePoolLookupByVolume;
|
||||||
|
virDrvStoragePoolCreateXML storagePoolCreateXML;
|
||||||
|
virDrvStoragePoolDefineXML storagePoolDefineXML;
|
||||||
|
virDrvStoragePoolBuild storagePoolBuild;
|
||||||
|
virDrvStoragePoolUndefine storagePoolUndefine;
|
||||||
|
virDrvStoragePoolCreate storagePoolCreate;
|
||||||
|
virDrvStoragePoolDestroy storagePoolDestroy;
|
||||||
|
virDrvStoragePoolDelete storagePoolDelete;
|
||||||
|
virDrvStoragePoolRefresh storagePoolRefresh;
|
||||||
|
virDrvStoragePoolGetInfo storagePoolGetInfo;
|
||||||
|
virDrvStoragePoolGetXMLDesc storagePoolGetXMLDesc;
|
||||||
|
virDrvStoragePoolGetAutostart storagePoolGetAutostart;
|
||||||
|
virDrvStoragePoolSetAutostart storagePoolSetAutostart;
|
||||||
|
virDrvStoragePoolNumOfVolumes storagePoolNumOfVolumes;
|
||||||
|
virDrvStoragePoolListVolumes storagePoolListVolumes;
|
||||||
|
virDrvStoragePoolListAllVolumes storagePoolListAllVolumes;
|
||||||
|
virDrvStorageVolLookupByName storageVolLookupByName;
|
||||||
|
virDrvStorageVolLookupByKey storageVolLookupByKey;
|
||||||
|
virDrvStorageVolLookupByPath storageVolLookupByPath;
|
||||||
|
virDrvStorageVolCreateXML storageVolCreateXML;
|
||||||
|
virDrvStorageVolCreateXMLFrom storageVolCreateXMLFrom;
|
||||||
|
virDrvStorageVolDownload storageVolDownload;
|
||||||
|
virDrvStorageVolUpload storageVolUpload;
|
||||||
|
virDrvStorageVolDelete storageVolDelete;
|
||||||
|
virDrvStorageVolWipe storageVolWipe;
|
||||||
|
virDrvStorageVolWipePattern storageVolWipePattern;
|
||||||
|
virDrvStorageVolGetInfo storageVolGetInfo;
|
||||||
|
virDrvStorageVolGetXMLDesc storageVolGetXMLDesc;
|
||||||
|
virDrvStorageVolGetPath storageVolGetPath;
|
||||||
|
virDrvStorageVolResize storageVolResize;
|
||||||
|
virDrvStoragePoolIsActive storagePoolIsActive;
|
||||||
|
virDrvStoragePoolIsPersistent storagePoolIsPersistent;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __VIR_DRIVER_STORAGE_H__ */
|
72
src/driver-stream.h
Normal file
72
src/driver-stream.h
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
* driver-stream.h: entry points for stream drivers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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 __VIR_DRIVER_STREAM_H__
|
||||||
|
# define __VIR_DRIVER_STREAM_H__
|
||||||
|
|
||||||
|
# ifndef __VIR_DRIVER_H_INCLUDES___
|
||||||
|
# error "Don't include this file directly, only use driver.h"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStreamSend)(virStreamPtr st,
|
||||||
|
const char *data,
|
||||||
|
size_t nbytes);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStreamRecv)(virStreamPtr st,
|
||||||
|
char *data,
|
||||||
|
size_t nbytes);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStreamEventAddCallback)(virStreamPtr stream,
|
||||||
|
int events,
|
||||||
|
virStreamEventCallback cb,
|
||||||
|
void *opaque,
|
||||||
|
virFreeCallback ff);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStreamEventUpdateCallback)(virStreamPtr stream,
|
||||||
|
int events);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStreamEventRemoveCallback)(virStreamPtr stream);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStreamFinish)(virStreamPtr st);
|
||||||
|
|
||||||
|
typedef int
|
||||||
|
(*virDrvStreamAbort)(virStreamPtr st);
|
||||||
|
|
||||||
|
typedef struct _virStreamDriver virStreamDriver;
|
||||||
|
typedef virStreamDriver *virStreamDriverPtr;
|
||||||
|
|
||||||
|
struct _virStreamDriver {
|
||||||
|
virDrvStreamSend streamSend;
|
||||||
|
virDrvStreamRecv streamRecv;
|
||||||
|
virDrvStreamEventAddCallback streamEventAddCallback;
|
||||||
|
virDrvStreamEventUpdateCallback streamEventUpdateCallback;
|
||||||
|
virDrvStreamEventRemoveCallback streamEventRemoveCallback;
|
||||||
|
virDrvStreamFinish streamFinish;
|
||||||
|
virDrvStreamAbort streamAbort;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __VIR_DRIVER_STREAM_H__ */
|
2170
src/driver.h
2170
src/driver.h
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user