Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
connect.go | 2 +-
connect_wrapper.go | 2 +-
connect_wrapper.h | 169 +++++++++++---------
domain_events_wrapper.h | 258 +++++++++++++++++++-----------
domain_snapshot.go | 3 +-
domain_wrapper.h | 290 ++++++++++++++++++++--------------
events_wrapper.h | 39 ++++-
interface.go | 3 +-
lxc_wrapper.h | 5 +-
network_events_wrapper.h | 32 ++--
network_wrapper.h | 12 +-
node_device.go | 4 +-
node_device_events_wrapper.h | 29 ++--
nwfilter.go | 3 +-
nwfilter_binding_wrapper.h | 25 ++-
qemu_wrapper.h | 26 ++-
secret.go | 4 +-
secret_events_wrapper.h | 26 ++-
storage_pool.go | 4 +-
storage_pool_events_wrapper.h | 29 ++--
storage_volume_wrapper.h | 7 +-
stream_wrapper.h | 57 ++++---
22 files changed, 638 insertions(+), 391 deletions(-)
diff --git a/connect.go b/connect.go
index 639225b..5ea8c48 100644
--- a/connect.go
+++ b/connect.go
@@ -395,7 +395,7 @@ func NewConnectWithAuth(uri string, auth *ConnectAuth, flags
ConnectFlags) (*Con
callbackID := registerCallbackId(auth.Callback)
- ptr := C.virConnectOpenAuthWrap(cUri, &ccredtype[0], C.uint(len(auth.CredType)),
C.int(callbackID), C.uint(flags))
+ ptr := C.virConnectOpenAuthWrapper(cUri, &ccredtype[0], C.uint(len(auth.CredType)),
C.int(callbackID), C.uint(flags))
freeCallbackId(callbackID)
if ptr == nil {
return nil, GetLastError()
diff --git a/connect_wrapper.go b/connect_wrapper.go
index 82f0ba7..d714fb9 100644
--- a/connect_wrapper.go
+++ b/connect_wrapper.go
@@ -54,7 +54,7 @@ int connectAuthCallbackHelper(virConnectCredentialPtr cred, unsigned int
ncred,
return connectAuthCallback(cred, ncred, *callbackID);
}
-virConnectPtr virConnectOpenAuthWrap(const char *name, int *credtype, uint ncredtype, int
callbackID, unsigned int flags)
+virConnectPtr virConnectOpenAuthWrapper(const char *name, int *credtype, uint ncredtype,
int callbackID, unsigned int flags)
{
virConnectAuth auth = {
.credtype = credtype,
diff --git a/connect_wrapper.h b/connect_wrapper.h
index 0fdde02..726d29c 100644
--- a/connect_wrapper.h
+++ b/connect_wrapper.h
@@ -31,84 +31,111 @@
#include <libvirt/virterror.h>
#include "connect_compat.h"
-void closeCallbackHelper(virConnectPtr conn, int reason, void *opaque);
-int virConnectRegisterCloseCallbackHelper(virConnectPtr c, virConnectCloseFunc cb, long
goCallbackId);
-
-virConnectPtr virConnectOpenAuthWrap(const char *name, int *credtype, uint ncredtype, int
callbackID, unsigned int flags);
-
-int virNodeGetFreePagesWrapper(virConnectPtr conn,
- unsigned int npages,
- unsigned int *pages,
- int startcell,
- unsigned int cellcount,
- unsigned long long *counts,
- unsigned int flags);
-
-char * virConnectGetDomainCapabilitiesWrapper(virConnectPtr conn,
- const char *emulatorbin,
- const char *arch,
- const char *machine,
- const char *virttype,
- unsigned int flags);
-
-int virConnectGetAllDomainStatsWrapper(virConnectPtr conn,
- unsigned int stats,
- virDomainStatsRecordPtr **retStats,
+void
+closeCallbackHelper(virConnectPtr conn,
+ int reason,
+ void *opaque);
+
+int
+virConnectRegisterCloseCallbackHelper(virConnectPtr c,
+ virConnectCloseFunc cb,
+ long goCallbackId);
+
+virConnectPtr
+virConnectOpenAuthWrapper(const char *name,
+ int *credtype,
+ uint ncredtype,
+ int callbackID,
+ unsigned int flags);
+
+int
+virNodeGetFreePagesWrapper(virConnectPtr conn,
+ unsigned int npages,
+ unsigned int *pages,
+ int startcell,
+ unsigned int cellcount,
+ unsigned long long *counts,
+ unsigned int flags);
+
+char *
+virConnectGetDomainCapabilitiesWrapper(virConnectPtr conn,
+ const char *emulatorbin,
+ const char *arch,
+ const char *machine,
+ const char *virttype,
unsigned int flags);
-int virDomainListGetStatsWrapper(virDomainPtr *doms,
- unsigned int stats,
- virDomainStatsRecordPtr **retStats,
- unsigned int flags);
+int
+virConnectGetAllDomainStatsWrapper(virConnectPtr conn,
+ unsigned int stats,
+ virDomainStatsRecordPtr **retStats,
+ unsigned int flags);
-void virDomainStatsRecordListFreeWrapper(virDomainStatsRecordPtr *stats);
+int
-int virNodeAllocPagesWrapper(virConnectPtr conn,
- unsigned int npages,
- unsigned int *pageSizes,
- unsigned long long *pageCounts,
- int startCell,
- unsigned int cellCount,
+virDomainListGetStatsWrapper(virDomainPtr *doms,
+ unsigned int stats,
+ virDomainStatsRecordPtr **retStats,
unsigned int flags);
-virDomainPtr virDomainDefineXMLFlagsWrapper(virConnectPtr conn,
- const char *xml,
- unsigned int flags);
-
-virStoragePoolPtr virStoragePoolLookupByTargetPathWrapper(virConnectPtr conn,
- const char *path);
-
-char *virConnectBaselineHypervisorCPUWrapper(virConnectPtr conn,
- const char *emulator,
- const char *arch,
- const char *machine,
- const char *virttype,
- const char **xmlCPUs,
- unsigned int ncpus,
- unsigned int flags);
-
-int virConnectCompareHypervisorCPUWrapper(virConnectPtr conn,
- const char *emulator,
- const char *arch,
- const char *machine,
- const char *virttype,
- const char *xmlCPU,
- unsigned int flags);
-
-int virNodeGetSEVInfoWrapper(virConnectPtr conn,
- virTypedParameterPtr *params,
- int *nparams,
- unsigned int flags);
-
-int virConnectListAllNWFilterBindingsWrapper(virConnectPtr conn,
- virNWFilterBindingPtr **bindings,
- unsigned int flags);
+void
+virDomainStatsRecordListFreeWrapper(virDomainStatsRecordPtr *stats);
+
+int
+virNodeAllocPagesWrapper(virConnectPtr conn,
+ unsigned int npages,
+ unsigned int *pageSizes,
+ unsigned long long *pageCounts,
+ int startCell,
+ unsigned int cellCount,
+ unsigned int flags);
+
+virDomainPtr
+virDomainDefineXMLFlagsWrapper(virConnectPtr conn,
+ const char *xml,
+ unsigned int flags);
-virNWFilterBindingPtr virNWFilterBindingCreateXMLWrapper(virConnectPtr conn,
- const char *xml,
- unsigned int flags);
+virStoragePoolPtr
+virStoragePoolLookupByTargetPathWrapper(virConnectPtr conn,
+ const char *path);
+
+char *
+virConnectBaselineHypervisorCPUWrapper(virConnectPtr conn,
+ const char *emulator,
+ const char *arch,
+ const char *machine,
+ const char *virttype,
+ const char **xmlCPUs,
+ unsigned int ncpus,
+ unsigned int flags);
-virNWFilterBindingPtr virNWFilterBindingLookupByPortDevWrapper(virConnectPtr conn,
- const char *portdev);
+int
+virConnectCompareHypervisorCPUWrapper(virConnectPtr conn,
+ const char *emulator,
+ const char *arch,
+ const char *machine,
+ const char *virttype,
+ const char *xmlCPU,
+ unsigned int flags);
+
+int
+virNodeGetSEVInfoWrapper(virConnectPtr conn,
+ virTypedParameterPtr *params,
+ int *nparams,
+ unsigned int flags);
+
+int
+virConnectListAllNWFilterBindingsWrapper(virConnectPtr conn,
+ virNWFilterBindingPtr **bindings,
+ unsigned int flags);
+
+virNWFilterBindingPtr
+virNWFilterBindingCreateXMLWrapper(virConnectPtr conn,
+ const char *xml,
+ unsigned int flags);
+
+virNWFilterBindingPtr
+virNWFilterBindingLookupByPortDevWrapper(virConnectPtr conn,
+ const char *portdev);
#endif /* LIBVIRT_GO_CONNECT_WRAPPER_H__ */
diff --git a/domain_events_wrapper.h b/domain_events_wrapper.h
index a9c98c1..4016497 100644
--- a/domain_events_wrapper.h
+++ b/domain_events_wrapper.h
@@ -31,98 +31,172 @@
#include <libvirt/virterror.h>
#include "domain_compat.h"
-void domainEventLifecycleCallbackHelper(virConnectPtr c, virDomainPtr d,
- int event, int detail, void* data);
-
-void domainEventGenericCallbackHelper(virConnectPtr c, virDomainPtr d, void* data);
-
-void domainEventRTCChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
- long long utcoffset, void* data);
-
-void domainEventWatchdogCallbackHelper(virConnectPtr c, virDomainPtr d,
- int action, void* data);
-
-void domainEventIOErrorCallbackHelper(virConnectPtr c, virDomainPtr d,
- const char *srcPath, const char *devAlias,
- int action, void* data);
-
-void domainEventGraphicsCallbackHelper(virConnectPtr c, virDomainPtr d,
- int phase, const virDomainEventGraphicsAddress
*local,
- const virDomainEventGraphicsAddress *remote,
- const char *authScheme,
- const virDomainEventGraphicsSubject *subject, void*
data);
-
-void domainEventIOErrorReasonCallbackHelper(virConnectPtr c, virDomainPtr d,
- const char *srcPath, const char *devAlias,
- int action, const char *reason, void* data);
-
-void domainEventBlockJobCallbackHelper(virConnectPtr c, virDomainPtr d,
- const char *disk, int type, int status, void* data);
-
-void domainEventDiskChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
- const char *oldSrcPath, const char *newSrcPath,
- const char *devAlias, int reason, void* data);
-
-void domainEventTrayChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
- const char *devAlias, int reason, void* data);
-
-void domainEventPMSuspendCallbackHelper(virConnectPtr c, virDomainPtr d,
- int reason, void* data);
-
-void domainEventPMWakeupCallbackHelper(virConnectPtr c, virDomainPtr d,
- int reason, void* data);
-
-void domainEventPMSuspendDiskCallbackHelper(virConnectPtr c, virDomainPtr d,
- int reason, void* data);
-
-void domainEventBalloonChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
- unsigned long long actual, void* data);
-
-void domainEventDeviceRemovedCallbackHelper(virConnectPtr c, virDomainPtr d,
- const char *devAlias, void* data);
-void domainEventTunableCallbackHelper(virConnectPtr conn,
- virDomainPtr dom,
- virTypedParameterPtr params,
- int nparams,
- void *opaque);
-void domainEventAgentLifecycleCallbackHelper(virConnectPtr conn,
- virDomainPtr dom,
- int state,
- int reason,
- void *opaque);
-void domainEventDeviceAddedCallbackHelper(virConnectPtr conn,
- virDomainPtr dom,
- const char *devAlias,
- void *opaque);
-void domainEventMigrationIterationCallbackHelper(virConnectPtr conn,
- virDomainPtr dom,
- int iteration,
- void *opaque);
-void domainEventJobCompletedCallbackHelper(virConnectPtr conn,
- virDomainPtr dom,
- virTypedParameterPtr params,
- int nparams,
- void *opaque);
-void domainEventDeviceRemovalFailedCallbackHelper(virConnectPtr conn,
- virDomainPtr dom,
- const char *devAlias,
- void *opaque);
-void domainEventMetadataChangeCallbackHelper(virConnectPtr conn,
- virDomainPtr dom,
- int type,
- const char *nsuri,
- void *opaque);
-void domainEventBlockThresholdCallbackHelper(virConnectPtr conn,
- virDomainPtr dom,
- const char *dev,
- const char *path,
- unsigned long long threshold,
- unsigned long long excess,
- void *opaque);
-
-int virConnectDomainEventRegisterAnyWrapper(virConnectPtr c, virDomainPtr d,
- int eventID,
virConnectDomainEventGenericCallback cb,
- long goCallbackId);
+void
+domainEventLifecycleCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ int event,
+ int detail,
+ void *data);
+
+void
+domainEventGenericCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ void *data);
+
+void
+domainEventRTCChangeCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ long long utcoffset,
+ void *data);
+
+void
+domainEventWatchdogCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ int action,
+ void *data);
+
+void
+domainEventIOErrorCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ const char *srcPath,
+ const char *devAlias,
+ int action,
+ void *data);
+
+void
+domainEventGraphicsCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ int phase,
+ const virDomainEventGraphicsAddress *local,
+ const virDomainEventGraphicsAddress *remote,
+ const char *authScheme,
+ const virDomainEventGraphicsSubject *subject,
+ void *data);
+
+void
+domainEventIOErrorReasonCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ const char *srcPath,
+ const char *devAlias,
+ int action,
+ const char *reason,
+ void *data);
+
+void
+domainEventBlockJobCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ const char *disk,
+ int type,
+ int status,
+ void *data);
+
+void
+domainEventDiskChangeCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ const char *oldSrcPath,
+ const char *newSrcPath,
+ const char *devAlias,
+ int reason,
+ void *data);
+
+void
+domainEventTrayChangeCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ const char *devAlias,
+ int reason,
+ void *data);
+
+void
+domainEventPMSuspendCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ int reason,
+ void *data);
+
+void
+domainEventPMWakeupCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ int reason,
+ void *data);
+
+void
+domainEventPMSuspendDiskCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ int reason,
+ void *data);
+
+void
+domainEventBalloonChangeCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ unsigned long long actual,
+ void *data);
+
+void
+domainEventDeviceRemovedCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ const char *devAlias,
+ void *data);
+
+void
+domainEventTunableCallbackHelper(virConnectPtr conn,
+ virDomainPtr dom,
+ virTypedParameterPtr params,
+ int nparams,
+ void *opaque);
+
+void
+domainEventAgentLifecycleCallbackHelper(virConnectPtr conn,
+ virDomainPtr dom,
+ int state,
+ int reason,
+ void *opaque);
+
+void
+domainEventDeviceAddedCallbackHelper(virConnectPtr conn,
+ virDomainPtr dom,
+ const char *devAlias,
+ void *opaque);
+
+void
+domainEventMigrationIterationCallbackHelper(virConnectPtr conn,
+ virDomainPtr dom,
+ int iteration,
+ void *opaque);
+
+void
+domainEventJobCompletedCallbackHelper(virConnectPtr conn,
+ virDomainPtr dom,
+ virTypedParameterPtr params,
+ int nparams,
+ void *opaque);
+
+void
+domainEventDeviceRemovalFailedCallbackHelper(virConnectPtr conn,
+ virDomainPtr dom,
+ const char *devAlias,
+ void *opaque);
+
+void
+domainEventMetadataChangeCallbackHelper(virConnectPtr conn,
+ virDomainPtr dom,
+ int type,
+ const char *nsuri,
+ void *opaque);
+
+void
+domainEventBlockThresholdCallbackHelper(virConnectPtr conn,
+ virDomainPtr dom,
+ const char *dev,
+ const char *path,
+ unsigned long long threshold,
+ unsigned long long excess,
+ void *opaque);
+
+int
+virConnectDomainEventRegisterAnyWrapper(virConnectPtr c,
+ virDomainPtr d,
+ int eventID,
+ virConnectDomainEventGenericCallback cb,
+ long goCallbackId);
#endif /* LIBVIRT_GO_DOMAIN_EVENTS_WRAPPER_H__ */
diff --git a/domain_snapshot.go b/domain_snapshot.go
index a133d5f..706c1a9 100644
--- a/domain_snapshot.go
+++ b/domain_snapshot.go
@@ -28,9 +28,8 @@ package libvirt
/*
#cgo pkg-config: libvirt
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
#include <stdlib.h>
+#include "domain_snapshot_wrapper.h"
*/
import "C"
diff --git a/domain_wrapper.h b/domain_wrapper.h
index 7f857d7..c344565 100644
--- a/domain_wrapper.h
+++ b/domain_wrapper.h
@@ -31,130 +31,174 @@
#include <libvirt/virterror.h>
#include "domain_compat.h"
-int virDomainCoreDumpWithFormatWrapper(virDomainPtr domain,
- const char *to,
- unsigned int dumpformat,
- unsigned int flags);
-
-
-int virDomainGetTimeWrapper(virDomainPtr dom,
- long long *seconds,
- unsigned int *nseconds,
- unsigned int flags);
-
-int virDomainSetTimeWrapper(virDomainPtr dom,
- long long seconds,
- unsigned int nseconds,
- unsigned int flags);
-
-int virDomainFSFreezeWrapper(virDomainPtr dom,
- const char **mountpoints,
- unsigned int nmountpoints,
- unsigned int flags);
-
-int virDomainFSThawWrapper(virDomainPtr dom,
- const char **mountpoints,
- unsigned int nmountpoints,
- unsigned int flags);
-
-
-int virDomainBlockCopyWrapper(virDomainPtr dom, const char *disk,
- const char *destxml,
- virTypedParameterPtr params,
- int nparams,
- unsigned int flags);
-
-int virDomainOpenGraphicsFDWrapper(virDomainPtr dom,
- unsigned int idx,
- unsigned int flags);
-
-
-void virDomainFSInfoFreeWrapper(virDomainFSInfoPtr info);
-
-int virDomainGetFSInfoWrapper(virDomainPtr dom,
- virDomainFSInfoPtr **info,
- unsigned int flags);
-
-
-int virDomainInterfaceAddressesWrapper(virDomainPtr dom,
- virDomainInterfacePtr **ifaces,
- unsigned int source,
- unsigned int flags);
-
-void virDomainInterfaceFreeWrapper(virDomainInterfacePtr iface);
-
-void virDomainIOThreadInfoFreeWrapper(virDomainIOThreadInfoPtr info);
-
-int virDomainGetIOThreadInfoWrapper(virDomainPtr domain,
- virDomainIOThreadInfoPtr **info,
- unsigned int flags);
-int virDomainPinIOThreadWrapper(virDomainPtr domain,
- unsigned int iothread_id,
- unsigned char *cpumap,
- int maplen,
- unsigned int flags);
-
-int virDomainAddIOThreadWrapper(virDomainPtr domain,
- unsigned int iothread_id,
- unsigned int flags);
-int virDomainDelIOThreadWrapper(virDomainPtr domain,
- unsigned int iothread_id,
- unsigned int flags);
-
-int virDomainSetUserPasswordWrapper(virDomainPtr dom,
- const char *user,
- const char *password,
- unsigned int flags);
-
-int virDomainRenameWrapper(virDomainPtr dom,
- const char *new_name,
- unsigned int flags);
-int virDomainGetPerfEventsWrapper(virDomainPtr dom,
- virTypedParameterPtr *params,
- int *nparams,
- unsigned int flags);
-int virDomainSetPerfEventsWrapper(virDomainPtr dom,
- virTypedParameterPtr params,
- int nparams,
- unsigned int flags);
-int virDomainMigrateStartPostCopyWrapper(virDomainPtr domain,
- unsigned int flags);
-int virDomainGetGuestVcpusWrapper(virDomainPtr domain,
- virTypedParameterPtr *params,
- unsigned int *nparams,
- unsigned int flags);
-
-int virDomainSetGuestVcpusWrapper(virDomainPtr domain,
- const char *cpumap,
- int state,
- unsigned int flags);
-int virDomainSetVcpuWrapper(virDomainPtr domain,
- const char *cpumap,
- int state,
- unsigned int flags);
-int virDomainSetBlockThresholdWrapper(virDomainPtr domain,
- const char *dev,
- unsigned long long threshold,
+int
+virDomainCoreDumpWithFormatWrapper(virDomainPtr domain,
+ const char *to,
+ unsigned int dumpformat,
+ unsigned int flags);
+
+
+int
+virDomainGetTimeWrapper(virDomainPtr dom,
+ long long *seconds,
+ unsigned int *nseconds,
+ unsigned int flags);
+
+int
+virDomainSetTimeWrapper(virDomainPtr dom,
+ long long seconds,
+ unsigned int nseconds,
+ unsigned int flags);
+
+int
+virDomainFSFreezeWrapper(virDomainPtr dom,
+ const char **mountpoints,
+ unsigned int nmountpoints,
+ unsigned int flags);
+
+int
+virDomainFSThawWrapper(virDomainPtr dom,
+ const char **mountpoints,
+ unsigned int nmountpoints,
+ unsigned int flags);
+
+
+int
+virDomainBlockCopyWrapper(virDomainPtr dom,
+ const char *disk,
+ const char *destxml,
+ virTypedParameterPtr params,
+ int nparams,
+ unsigned int flags);
+
+int
+virDomainOpenGraphicsFDWrapper(virDomainPtr dom,
+ unsigned int idx,
+ unsigned int flags);
+
+
+void
+virDomainFSInfoFreeWrapper(virDomainFSInfoPtr info);
+
+int
+virDomainGetFSInfoWrapper(virDomainPtr dom,
+ virDomainFSInfoPtr **info,
+ unsigned int flags);
+
+
+int
+virDomainInterfaceAddressesWrapper(virDomainPtr dom,
+ virDomainInterfacePtr **ifaces,
+ unsigned int source,
+ unsigned int flags);
+
+void
+virDomainInterfaceFreeWrapper(virDomainInterfacePtr iface);
+
+void
+virDomainIOThreadInfoFreeWrapper(virDomainIOThreadInfoPtr info);
+
+int
+virDomainGetIOThreadInfoWrapper(virDomainPtr domain,
+ virDomainIOThreadInfoPtr **info,
+ unsigned int flags);
+int
+virDomainPinIOThreadWrapper(virDomainPtr domain,
+ unsigned int iothread_id,
+ unsigned char *cpumap,
+ int maplen,
+ unsigned int flags);
+
+int
+virDomainAddIOThreadWrapper(virDomainPtr domain,
+ unsigned int iothread_id,
+ unsigned int flags);
+
+int
+virDomainDelIOThreadWrapper(virDomainPtr domain,
+ unsigned int iothread_id,
+ unsigned int flags);
+
+int
+virDomainSetUserPasswordWrapper(virDomainPtr dom,
+ const char *user,
+ const char *password,
+ unsigned int flags);
+
+int
+virDomainRenameWrapper(virDomainPtr dom,
+ const char *new_name,
+ unsigned int flags);
+
+int
+virDomainGetPerfEventsWrapper(virDomainPtr dom,
+ virTypedParameterPtr *params,
+ int *nparams,
+ unsigned int flags);
+
+int
+virDomainSetPerfEventsWrapper(virDomainPtr dom,
+ virTypedParameterPtr params,
+ int nparams,
+ unsigned int flags);
+
+int
+virDomainMigrateStartPostCopyWrapper(virDomainPtr domain,
unsigned int flags);
-int virDomainMigrateGetMaxDowntimeWrapper(virDomainPtr domain,
- unsigned long long *downtime,
- unsigned int flags);
-
-char *virDomainManagedSaveGetXMLDescWrapper(virDomainPtr domain,
- unsigned int flags);
-int virDomainManagedSaveDefineXMLWrapper(virDomainPtr domain,
- const char *dxml,
- unsigned int flags);
-int virDomainSetLifecycleActionWrapper(virDomainPtr domain,
- unsigned int type,
- unsigned int action,
+
+int
+virDomainGetGuestVcpusWrapper(virDomainPtr domain,
+ virTypedParameterPtr *params,
+ unsigned int *nparams,
+ unsigned int flags);
+
+int
+virDomainSetGuestVcpusWrapper(virDomainPtr domain,
+ const char *cpumap,
+ int state,
+ unsigned int flags);
+
+int
+virDomainSetVcpuWrapper(virDomainPtr domain,
+ const char *cpumap,
+ int state,
+ unsigned int flags);
+
+int
+virDomainSetBlockThresholdWrapper(virDomainPtr domain,
+ const char *dev,
+ unsigned long long threshold,
+ unsigned int flags);
+
+int
+virDomainMigrateGetMaxDowntimeWrapper(virDomainPtr domain,
+ unsigned long long *downtime,
+ unsigned int flags);
+
+char *
+virDomainManagedSaveGetXMLDescWrapper(virDomainPtr domain,
+ unsigned int flags);
+
+int
+virDomainManagedSaveDefineXMLWrapper(virDomainPtr domain,
+ const char *dxml,
+ unsigned int flags);
+
+int
+virDomainSetLifecycleActionWrapper(virDomainPtr domain,
+ unsigned int type,
+ unsigned int action,
+ unsigned int flags);
+
+int
+virDomainDetachDeviceAliasWrapper(virDomainPtr domain,
+ const char *alias,
+ unsigned int flags);
+
+int
+virDomainGetLaunchSecurityInfoWrapper(virDomainPtr domain,
+ virTypedParameterPtr *params,
+ int *nparams,
unsigned int flags);
-int virDomainDetachDeviceAliasWrapper(virDomainPtr domain,
- const char *alias,
- unsigned int flags);
-int virDomainGetLaunchSecurityInfoWrapper(virDomainPtr domain,
- virTypedParameterPtr *params,
- int *nparams,
- unsigned int flags);
#endif /* LIBVIRT_GO_DOMAIN_WRAPPER_H__ */
diff --git a/events_wrapper.h b/events_wrapper.h
index 67b3624..9e9607c 100644
--- a/events_wrapper.h
+++ b/events_wrapper.h
@@ -30,13 +30,36 @@
#include <libvirt/libvirt.h>
#include <libvirt/virterror.h>
-int virEventAddHandleWrapper(int fd, int events, int callbackID);
-int virEventAddTimeoutWrapper(int freq, int callbackID);
-void virEventRegisterImplWrapper(void);
-
-void eventHandleCallbackInvoke(int watch, int fd, int events, uintptr_t callback,
uintptr_t opaque);
-void eventTimeoutCallbackInvoke(int timer, uintptr_t callback, uintptr_t opaque);
-void eventHandleCallbackFree(uintptr_t callback, uintptr_t opaque);
-void eventTimeoutCallbackFree(uintptr_t callback, uintptr_t opaque);
+int
+virEventAddHandleWrapper(int fd,
+ int events,
+ int callbackID);
+
+int
+virEventAddTimeoutWrapper(int freq,
+ int callbackID);
+
+void
+virEventRegisterImplWrapper(void);
+
+void
+eventHandleCallbackInvoke(int watch,
+ int fd,
+ int events,
+ uintptr_t callback,
+ uintptr_t opaque);
+
+void
+eventTimeoutCallbackInvoke(int timer,
+ uintptr_t callback,
+ uintptr_t opaque);
+
+void
+eventHandleCallbackFree(uintptr_t callback,
+ uintptr_t opaque);
+
+void
+eventTimeoutCallbackFree(uintptr_t callback,
+ uintptr_t opaque);
#endif /* LIBVIRT_GO_EVENTS_WRAPPER_H__ */
diff --git a/interface.go b/interface.go
index 8a0c7e2..bd39ed0 100644
--- a/interface.go
+++ b/interface.go
@@ -28,9 +28,8 @@ package libvirt
/*
#cgo pkg-config: libvirt
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
#include <stdlib.h>
+#include "interface_wrapper.h"
*/
import "C"
diff --git a/lxc_wrapper.h b/lxc_wrapper.h
index 4edef2a..22f2d55 100644
--- a/lxc_wrapper.h
+++ b/lxc_wrapper.h
@@ -31,8 +31,9 @@
#include <libvirt/libvirt-lxc.h>
#include <libvirt/virterror.h>
-int virDomainLxcEnterCGroupWrapper(virDomainPtr domain,
- unsigned int flags);
+int
+virDomainLxcEnterCGroupWrapper(virDomainPtr domain,
+ unsigned int flags);
#endif /* LIBVIRT_GO_LXC_COMPAT_H__ */
diff --git a/network_events_wrapper.h b/network_events_wrapper.h
index 8b08d00..201be64 100644
--- a/network_events_wrapper.h
+++ b/network_events_wrapper.h
@@ -31,20 +31,30 @@
#include <libvirt/virterror.h>
#include "network_compat.h"
-void networkEventLifecycleCallbackHelper(virConnectPtr c, virNetworkPtr d,
- int event, int detail, void* data);
+void
+networkEventLifecycleCallbackHelper(virConnectPtr c,
+ virNetworkPtr d,
+ int event,
+ int detail,
+ void* data);
-int virConnectNetworkEventRegisterAnyWrapper(virConnectPtr c, virNetworkPtr d,
- int eventID,
virConnectNetworkEventGenericCallback cb,
+int
+virConnectNetworkEventRegisterAnyWrapper(virConnectPtr c,
+ virNetworkPtr d,
+ int eventID,
+ virConnectNetworkEventGenericCallback cb,
long goCallbackId);
-int virConnectNetworkEventRegisterAnyWrapper(virConnectPtr c,
- virNetworkPtr d,
- int eventID,
- virConnectNetworkEventGenericCallback cb,
- long goCallbackId);
-int virConnectNetworkEventDeregisterAnyWrapper(virConnectPtr conn,
- int callbackID);
+int
+virConnectNetworkEventRegisterAnyWrapper(virConnectPtr c,
+ virNetworkPtr d,
+ int eventID,
+ virConnectNetworkEventGenericCallback cb,
+ long goCallbackId);
+
+int
+virConnectNetworkEventDeregisterAnyWrapper(virConnectPtr conn,
+ int callbackID);
#endif /* LIBVIRT_GO_NETWORK_EVENTS_WRAPPER_H__ */
diff --git a/network_wrapper.h b/network_wrapper.h
index 66fb730..8a36d13 100644
--- a/network_wrapper.h
+++ b/network_wrapper.h
@@ -31,11 +31,13 @@
#include <libvirt/virterror.h>
#include "network_compat.h"
-void virNetworkDHCPLeaseFreeWrapper(virNetworkDHCPLeasePtr lease);
+void
+virNetworkDHCPLeaseFreeWrapper(virNetworkDHCPLeasePtr lease);
-int virNetworkGetDHCPLeasesWrapper(virNetworkPtr network,
- const char *mac,
- virNetworkDHCPLeasePtr **leases,
- unsigned int flags);
+int
+virNetworkGetDHCPLeasesWrapper(virNetworkPtr network,
+ const char *mac,
+ virNetworkDHCPLeasePtr **leases,
+ unsigned int flags);
#endif /* LIBVIRT_GO_NETWORK_WRAPPER_H__ */
diff --git a/node_device.go b/node_device.go
index 01be1e4..0caf98b 100644
--- a/node_device.go
+++ b/node_device.go
@@ -28,10 +28,8 @@ package libvirt
/*
#cgo pkg-config: libvirt
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
#include <stdlib.h>
-#include "node_device_compat.h"
+#include "node_device_wrapper.h"
*/
import "C"
diff --git a/node_device_events_wrapper.h b/node_device_events_wrapper.h
index 04cb71b..a3d014d 100644
--- a/node_device_events_wrapper.h
+++ b/node_device_events_wrapper.h
@@ -31,17 +31,28 @@
#include <libvirt/virterror.h>
#include "node_device_compat.h"
-void nodeDeviceEventLifecycleCallbackHelper(virConnectPtr c, virNodeDevicePtr d,
- int event, int detail, void* data);
-
-void nodeDeviceEventGenericCallbackHelper(virConnectPtr c, virNodeDevicePtr d, void*
data);
-
-int virConnectNodeDeviceEventRegisterAnyWrapper(virConnectPtr c, virNodeDevicePtr d,
- int eventID,
virConnectNodeDeviceEventGenericCallback cb,
+void
+nodeDeviceEventLifecycleCallbackHelper(virConnectPtr c,
+ virNodeDevicePtr d,
+ int event,
+ int detail,
+ void* data);
+
+void
+nodeDeviceEventGenericCallbackHelper(virConnectPtr c,
+ virNodeDevicePtr d,
+ void* data);
+
+int
+virConnectNodeDeviceEventRegisterAnyWrapper(virConnectPtr c,
+ virNodeDevicePtr d,
+ int eventID,
+ virConnectNodeDeviceEventGenericCallback cb,
long goCallbackId);
-int virConnectNodeDeviceEventDeregisterAnyWrapper(virConnectPtr conn,
- int callbackID);
+int
+virConnectNodeDeviceEventDeregisterAnyWrapper(virConnectPtr conn,
+ int callbackID);
#endif /* LIBVIRT_GO_NODE_DEVICE_EVENTS_WRAPPER_H__ */
diff --git a/nwfilter.go b/nwfilter.go
index 6d0c052..441fcca 100644
--- a/nwfilter.go
+++ b/nwfilter.go
@@ -28,9 +28,8 @@ package libvirt
/*
#cgo pkg-config: libvirt
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
#include <stdlib.h>
+#include "nwfilter_wrapper.h"
*/
import "C"
diff --git a/nwfilter_binding_wrapper.h b/nwfilter_binding_wrapper.h
index 895075f..63942be 100644
--- a/nwfilter_binding_wrapper.h
+++ b/nwfilter_binding_wrapper.h
@@ -30,13 +30,24 @@
#include <libvirt/virterror.h>
#include "nwfilter_binding_compat.h"
-const char *virNWFilterBindingGetPortDevWrapper(virNWFilterBindingPtr binding);
-const char *virNWFilterBindingGetFilterNameWrapper(virNWFilterBindingPtr binding);
-char *virNWFilterBindingGetXMLDescWrapper(virNWFilterBindingPtr binding,
- unsigned int flags);
-int virNWFilterBindingDeleteWrapper(virNWFilterBindingPtr binding);
-int virNWFilterBindingRefWrapper(virNWFilterBindingPtr binding);
-int virNWFilterBindingFreeWrapper(virNWFilterBindingPtr binding);
+const char *
+virNWFilterBindingGetPortDevWrapper(virNWFilterBindingPtr binding);
+
+const char *
+virNWFilterBindingGetFilterNameWrapper(virNWFilterBindingPtr binding);
+
+char *
+virNWFilterBindingGetXMLDescWrapper(virNWFilterBindingPtr binding,
+ unsigned int flags);
+
+int
+virNWFilterBindingDeleteWrapper(virNWFilterBindingPtr binding);
+
+int
+virNWFilterBindingRefWrapper(virNWFilterBindingPtr binding);
+
+int
+virNWFilterBindingFreeWrapper(virNWFilterBindingPtr binding);
#endif /* LIBVIRT_GO_NWFILTER_BINDING_WRAPPER_H__ */
diff --git a/qemu_wrapper.h b/qemu_wrapper.h
index 228e444..e365fbd 100644
--- a/qemu_wrapper.h
+++ b/qemu_wrapper.h
@@ -32,16 +32,26 @@
#include <libvirt/virterror.h>
#include "qemu_compat.h"
-void domainQemuMonitorEventCallbackHelper(virConnectPtr c, virDomainPtr d,
- const char *event, long long secs,
- unsigned int micros, const char *details, void *data);
+void
+domainQemuMonitorEventCallbackHelper(virConnectPtr c,
+ virDomainPtr d,
+ const char *event,
+ long long secs,
+ unsigned int micros,
+ const char *details,
+ void *data);
-int virConnectDomainQemuMonitorEventRegisterWrapper(virConnectPtr c, virDomainPtr d,
- const char *event, virConnectDomainQemuMonitorEventCallback cb,
- long goCallbackId, unsigned int flags);
+int
+virConnectDomainQemuMonitorEventRegisterWrapper(virConnectPtr c,
+ virDomainPtr d,
+ const char *event,
+ virConnectDomainQemuMonitorEventCallback
cb,
+ long goCallbackId,
+ unsigned int flags);
-int virConnectDomainQemuMonitorEventDeregisterWrapper(virConnectPtr conn,
- int callbackID);
+int
+virConnectDomainQemuMonitorEventDeregisterWrapper(virConnectPtr conn,
+ int callbackID);
#endif /* LIBVIRT_GO_DOMAIN_EVENTS_WRAPPER_H__ */
diff --git a/secret.go b/secret.go
index 4507e1e..9bd8b36 100644
--- a/secret.go
+++ b/secret.go
@@ -28,10 +28,8 @@ package libvirt
/*
#cgo pkg-config: libvirt
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
#include <stdlib.h>
-#include "secret_compat.h"
+#include "secret_wrapper.h"
*/
import "C"
diff --git a/secret_events_wrapper.h b/secret_events_wrapper.h
index 6758b54..bf1c571 100644
--- a/secret_events_wrapper.h
+++ b/secret_events_wrapper.h
@@ -31,16 +31,26 @@
#include <libvirt/virterror.h>
#include "secret_compat.h"
-void secretEventLifecycleCallbackHelper(virConnectPtr c, virSecretPtr d,
- int event, int detail, void* data);
-void secretEventGenericCallbackHelper(virConnectPtr c, virSecretPtr d,
+void
+secretEventLifecycleCallbackHelper(virConnectPtr c,
+ virSecretPtr d,
+ int event,
+ int detail,
void* data);
-int virConnectSecretEventRegisterAnyWrapper(virConnectPtr c, virSecretPtr d,
- int eventID,
virConnectSecretEventGenericCallback cb,
- long goCallbackId);
+void secretEventGenericCallbackHelper(virConnectPtr c,
+ virSecretPtr d,
+ void* data);
-int virConnectSecretEventDeregisterAnyWrapper(virConnectPtr conn,
- int callbackID);
+int
+virConnectSecretEventRegisterAnyWrapper(virConnectPtr c,
+ virSecretPtr d,
+ int eventID,
+ virConnectSecretEventGenericCallback cb,
+ long goCallbackId);
+
+int
+virConnectSecretEventDeregisterAnyWrapper(virConnectPtr conn,
+ int callbackID);
#endif /* LIBVIRT_GO_SECRET_EVENTS_WRAPPER_H__ */
diff --git a/storage_pool.go b/storage_pool.go
index 87d17d4..a2d1462 100644
--- a/storage_pool.go
+++ b/storage_pool.go
@@ -28,10 +28,8 @@ package libvirt
/*
#cgo pkg-config: libvirt
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
#include <stdlib.h>
-#include "storage_pool_compat.h"
+#include "storage_pool_wrapper.h"
*/
import "C"
diff --git a/storage_pool_events_wrapper.h b/storage_pool_events_wrapper.h
index f178951..84dcc8f 100644
--- a/storage_pool_events_wrapper.h
+++ b/storage_pool_events_wrapper.h
@@ -31,16 +31,27 @@
#include <libvirt/virterror.h>
#include "storage_pool_compat.h"
-void storagePoolEventLifecycleCallbackHelper(virConnectPtr c, virStoragePoolPtr d,
- int event, int detail, void* data);
-void storagePoolEventGenericCallbackHelper(virConnectPtr c, virStoragePoolPtr d,
- void* data);
+void
+storagePoolEventLifecycleCallbackHelper(virConnectPtr c,
+ virStoragePoolPtr d,
+ int event,
+ int detail,
+ void* data);
-int virConnectStoragePoolEventRegisterAnyWrapper(virConnectPtr c, virStoragePoolPtr d,
- int eventID, virConnectStoragePoolEventGenericCallback cb,
- long goCallbackId);
+void
+storagePoolEventGenericCallbackHelper(virConnectPtr c,
+ virStoragePoolPtr d,
+ void* data);
-int virConnectStoragePoolEventDeregisterAnyWrapper(virConnectPtr conn,
- int callbackID);
+int
+virConnectStoragePoolEventRegisterAnyWrapper(virConnectPtr c,
+ virStoragePoolPtr d,
+ int eventID,
+ virConnectStoragePoolEventGenericCallback
cb,
+ long goCallbackId);
+
+int
+virConnectStoragePoolEventDeregisterAnyWrapper(virConnectPtr conn,
+ int callbackID);
#endif /* LIBVIRT_GO_STORAGE_POOL_EVENTS_WRAPPER_H__ */
diff --git a/storage_volume_wrapper.h b/storage_volume_wrapper.h
index 77d75e0..6fd8974 100644
--- a/storage_volume_wrapper.h
+++ b/storage_volume_wrapper.h
@@ -31,8 +31,9 @@
#include <libvirt/virterror.h>
#include "storage_volume_compat.h"
-int virStorageVolGetInfoFlagsWrapper(virStorageVolPtr vol,
- virStorageVolInfoPtr info,
- unsigned int flags);
+int
+virStorageVolGetInfoFlagsWrapper(virStorageVolPtr vol,
+ virStorageVolInfoPtr info,
+ unsigned int flags);
#endif /* LIBVIRT_GO_STORAGE_VOLUME_WRAPPER_H__ */
diff --git a/stream_wrapper.h b/stream_wrapper.h
index b8417d3..5484441 100644
--- a/stream_wrapper.h
+++ b/stream_wrapper.h
@@ -31,23 +31,44 @@
#include <libvirt/virterror.h>
#include "stream_compat.h"
-int virStreamSendAllWrapper(virStreamPtr st, int callbackID);
-int virStreamRecvAllWrapper(virStreamPtr st, int callbackID);
-int virStreamSparseSendAllWrapper(virStreamPtr st, int callbackID, int holeCallbackID,
int skipCallbackID);
-int virStreamSparseRecvAllWrapper(virStreamPtr st, int callbackID, int holeCallbackID);
-
-int virStreamEventAddCallbackWrapper(virStreamPtr st, int events, int callbackID);
-int virStreamRecvFlagsWrapper(virStreamPtr st,
- char *data,
- size_t nbytes,
- unsigned int flags);
-
-int virStreamSendHoleWrapper(virStreamPtr st,
- long long length,
- unsigned int flags);
-
-int virStreamRecvHoleWrapper(virStreamPtr,
- long long *length,
- unsigned int flags);
+int
+virStreamSendAllWrapper(virStreamPtr st,
+ int callbackID);
+
+int
+virStreamRecvAllWrapper(virStreamPtr st,
+ int callbackID);
+
+int
+virStreamSparseSendAllWrapper(virStreamPtr st,
+ int callbackID,
+ int holeCallbackID,
+ int skipCallbackID);
+
+int
+virStreamSparseRecvAllWrapper(virStreamPtr st,
+ int callbackID,
+ int holeCallbackID);
+
+int
+virStreamEventAddCallbackWrapper(virStreamPtr st,
+ int events,
+ int callbackID);
+
+int
+virStreamRecvFlagsWrapper(virStreamPtr st,
+ char *data,
+ size_t nbytes,
+ unsigned int flags);
+
+int
+virStreamSendHoleWrapper(virStreamPtr st,
+ long long length,
+ unsigned int flags);
+
+int
+virStreamRecvHoleWrapper(virStreamPtr,
+ long long *length,
+ unsigned int flags);
#endif /* LIBVIRT_GO_STREAM_WRAPPER_H__ */
--
2.17.1