Instead of using "_cgo" for multiple scenarios, use "Wrapper" as
suffix
where a libvirt API is being wrapped, and "Helper" as a suffix where we
are implementing a helper function (eg an event callback).
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
api_test.go | 2 +-
callbacks.go | 4 +-
callbacks_wrapper.go | 2 +-
callbacks_wrapper.h | 2 +-
connect.go | 6 +-
connect_wrapper.go | 10 ++--
connect_wrapper.h | 4 +-
domain_events.go | 100 ++++++++++++++++-----------------
domain_events_wrapper.go | 50 ++++++++---------
domain_events_wrapper.h | 48 ++++++++--------
events.go | 6 +-
events_wrapper.go | 6 +-
events_wrapper.h | 6 +-
network_events.go | 4 +-
network_events_wrapper.go | 6 +-
network_events_wrapper.h | 4 +-
node_device_events.go | 8 +--
node_device_events_wrapper.go | 8 +--
node_device_events_wrapper.h | 6 +-
qemu.go | 4 +-
qemu_wrapper.go | 6 +-
qemu_wrapper.h | 4 +-
secret_events.go | 8 +--
secret_events_wrapper.go | 8 +--
secret_events_wrapper.h | 6 +-
storage_pool_events.go | 8 +--
storage_pool_events_wrapper.go | 8 +--
storage_pool_events_wrapper.h | 6 +-
stream.go | 10 ++--
stream_wrapper.go | 10 ++--
stream_wrapper.h | 10 ++--
31 files changed, 185 insertions(+), 185 deletions(-)
diff --git a/api_test.go b/api_test.go
index 06938a6..ad94335 100644
--- a/api_test.go
+++ b/api_test.go
@@ -394,7 +394,7 @@ func ProcessFile(path string) []string {
defer file.Close()
- re, err :=
regexp.Compile("C\\.((vir|VIR|LIBVIR)[a-zA-Z0-9_]+?)(Compat|_cgo)?\\b")
+ re, err :=
regexp.Compile("C\\.((vir|VIR|LIBVIR)[a-zA-Z0-9_]+?)(Compat|Wrapper)?\\b")
if err != nil {
panic(err)
}
diff --git a/callbacks.go b/callbacks.go
index 05a755b..7b2d11b 100644
--- a/callbacks.go
+++ b/callbacks.go
@@ -40,13 +40,13 @@ package libvirt
//
// - Create a CGO function similar to the above function but with the
// appropriate signature to be registered as a callback in C code
-// (connErrCallback_cgo). Notably, it will have a void* argument
+// (connErrCallbackHelper). Notably, it will have a void* argument
// that should be cast to long to retrieve the callback ID. It
// should be just a thin wrapper to transform the opaque argument to
// a callback ID.
//
// - Create a CGO function which will be a wrapper around the C
-// function to register the callback (virConnSetErrorFunc_cgo). Its
+// function to register the callback (virConnSetErrorFuncWrapper). Its
// only role is to transform a callback ID (long) to an opaque (void*)
// and call the C function.
//
diff --git a/callbacks_wrapper.go b/callbacks_wrapper.go
index 967aaab..64caf69 100644
--- a/callbacks_wrapper.go
+++ b/callbacks_wrapper.go
@@ -33,7 +33,7 @@ package libvirt
#include "callbacks_wrapper.h"
extern void freeCallbackId(long);
-void freeGoCallback_cgo(void* goCallbackId) {
+void freeGoCallbackHelper(void* goCallbackId) {
freeCallbackId((long)goCallbackId);
}
diff --git a/callbacks_wrapper.h b/callbacks_wrapper.h
index f37aba4..4b91f7a 100644
--- a/callbacks_wrapper.h
+++ b/callbacks_wrapper.h
@@ -27,6 +27,6 @@
#ifndef LIBVIRT_GO_CALLBACKS_WRAPPER_H__
#define LIBVIRT_GO_CALLBACKS_WRAPPER_H__
-void freeGoCallback_cgo(void* goCallbackId);
+void freeGoCallbackHelper(void* goCallbackId);
#endif /* LIBVIRT_GO_CALLBACKS_WRAPPER_H__ */
diff --git a/connect.go b/connect.go
index 5c6d6ff..793e3c4 100644
--- a/connect.go
+++ b/connect.go
@@ -452,8 +452,8 @@ type CloseCallback func(conn *Connect, reason ConnectCloseReason)
func (c *Connect) RegisterCloseCallback(callback CloseCallback) error {
c.UnregisterCloseCallback()
goCallbackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.closeCallback_cgo)
- res := C.virConnectRegisterCloseCallback_cgo(c.ptr, C.virConnectCloseFunc(callbackPtr),
C.long(goCallbackId))
+ callbackPtr := unsafe.Pointer(C.closeCallbackHelper)
+ res := C.virConnectRegisterCloseCallbackHelper(c.ptr,
C.virConnectCloseFunc(callbackPtr), C.long(goCallbackId))
if res != 0 {
freeCallbackId(goCallbackId)
return GetLastError()
@@ -469,7 +469,7 @@ func (c *Connect) UnregisterCloseCallback() error {
if connData.closeCallbackId == nil {
return nil
}
- callbackPtr := unsafe.Pointer(C.closeCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.closeCallbackHelper)
res := C.virConnectUnregisterCloseCallback(c.ptr, C.virConnectCloseFunc(callbackPtr))
if res != 0 {
return GetLastError()
diff --git a/connect_wrapper.go b/connect_wrapper.go
index a686e29..ec2da69 100644
--- a/connect_wrapper.go
+++ b/connect_wrapper.go
@@ -34,21 +34,21 @@ package libvirt
#include "callbacks_wrapper.h"
extern void closeCallback(virConnectPtr, int, long);
-void closeCallback_cgo(virConnectPtr conn, int reason, void *opaque)
+void closeCallbackHelper(virConnectPtr conn, int reason, void *opaque)
{
closeCallback(conn, reason, (long)opaque);
}
-int virConnectRegisterCloseCallback_cgo(virConnectPtr c, virConnectCloseFunc cb, long
goCallbackId)
+int virConnectRegisterCloseCallbackHelper(virConnectPtr c, virConnectCloseFunc cb, long
goCallbackId)
{
void *id = (void*)goCallbackId;
- return virConnectRegisterCloseCallback(c, cb, id, freeGoCallback_cgo);
+ return virConnectRegisterCloseCallback(c, cb, id, freeGoCallbackHelper);
}
#include <stdio.h>
extern int connectAuthCallback(virConnectCredentialPtr, unsigned int, int);
-int connectAuthCallback_cgo(virConnectCredentialPtr cred, unsigned int ncred, void
*cbdata)
+int connectAuthCallbackHelper(virConnectCredentialPtr cred, unsigned int ncred, void
*cbdata)
{
int *callbackID = cbdata;
@@ -60,7 +60,7 @@ virConnectPtr virConnectOpenAuthWrap(const char *name, int *credtype,
uint ncred
virConnectAuth auth = {
.credtype = credtype,
.ncredtype = ncredtype,
- .cb = connectAuthCallback_cgo,
+ .cb = connectAuthCallbackHelper,
.cbdata = &callbackID,
};
diff --git a/connect_wrapper.h b/connect_wrapper.h
index 5c59320..60374c7 100644
--- a/connect_wrapper.h
+++ b/connect_wrapper.h
@@ -26,8 +26,8 @@
#ifndef LIBVIRT_GO_CONNECT_WRAPPER_H__
#define LIBVIRT_GO_CONNECT_WRAPPER_H__
-void closeCallback_cgo(virConnectPtr conn, int reason, void *opaque);
-int virConnectRegisterCloseCallback_cgo(virConnectPtr c, virConnectCloseFunc cb, long
goCallbackId);
+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);
diff --git a/domain_events.go b/domain_events.go
index 6d4ff24..5d21b01 100644
--- a/domain_events.go
+++ b/domain_events.go
@@ -963,12 +963,12 @@ func domainEventBlockThresholdCallback(c C.virConnectPtr, d
C.virDomainPtr, dev
func (c *Connect) DomainEventLifecycleRegister(dom *Domain, callback
DomainEventLifecycleCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventLifecycleCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventLifecycleCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_LIFECYCLE,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -982,12 +982,12 @@ func (c *Connect) DomainEventLifecycleRegister(dom *Domain, callback
DomainEvent
func (c *Connect) DomainEventRebootRegister(dom *Domain, callback
DomainEventGenericCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventGenericCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventGenericCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_REBOOT,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1001,12 +1001,12 @@ func (c *Connect) DomainEventRebootRegister(dom *Domain, callback
DomainEventGen
func (c *Connect) DomainEventRTCChangeRegister(dom *Domain, callback
DomainEventRTCChangeCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventRTCChangeCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventRTCChangeCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_RTC_CHANGE,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1020,12 +1020,12 @@ func (c *Connect) DomainEventRTCChangeRegister(dom *Domain,
callback DomainEvent
func (c *Connect) DomainEventWatchdogRegister(dom *Domain, callback
DomainEventWatchdogCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventWatchdogCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventWatchdogCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_WATCHDOG,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1039,12 +1039,12 @@ func (c *Connect) DomainEventWatchdogRegister(dom *Domain,
callback DomainEventW
func (c *Connect) DomainEventIOErrorRegister(dom *Domain, callback
DomainEventIOErrorCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventIOErrorCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventIOErrorCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_IO_ERROR,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1058,12 +1058,12 @@ func (c *Connect) DomainEventIOErrorRegister(dom *Domain, callback
DomainEventIO
func (c *Connect) DomainEventGraphicsRegister(dom *Domain, callback
DomainEventGraphicsCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventGraphicsCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventGraphicsCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_GRAPHICS,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1077,12 +1077,12 @@ func (c *Connect) DomainEventGraphicsRegister(dom *Domain,
callback DomainEventG
func (c *Connect) DomainEventIOErrorReasonRegister(dom *Domain, callback
DomainEventIOErrorReasonCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventIOErrorReasonCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventIOErrorReasonCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1096,12 +1096,12 @@ func (c *Connect) DomainEventIOErrorReasonRegister(dom *Domain,
callback DomainE
func (c *Connect) DomainEventControlErrorRegister(dom *Domain, callback
DomainEventGenericCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventGenericCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventGenericCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_CONTROL_ERROR,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1115,12 +1115,12 @@ func (c *Connect) DomainEventControlErrorRegister(dom *Domain,
callback DomainEv
func (c *Connect) DomainEventBlockJobRegister(dom *Domain, callback
DomainEventBlockJobCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventBlockJobCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventBlockJobCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_BLOCK_JOB,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1134,12 +1134,12 @@ func (c *Connect) DomainEventBlockJobRegister(dom *Domain,
callback DomainEventB
func (c *Connect) DomainEventDiskChangeRegister(dom *Domain, callback
DomainEventDiskChangeCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventDiskChangeCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventDiskChangeCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_DISK_CHANGE,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1153,12 +1153,12 @@ func (c *Connect) DomainEventDiskChangeRegister(dom *Domain,
callback DomainEven
func (c *Connect) DomainEventTrayChangeRegister(dom *Domain, callback
DomainEventTrayChangeCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventTrayChangeCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventTrayChangeCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_TRAY_CHANGE,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1172,12 +1172,12 @@ func (c *Connect) DomainEventTrayChangeRegister(dom *Domain,
callback DomainEven
func (c *Connect) DomainEventPMWakeupRegister(dom *Domain, callback
DomainEventPMWakeupCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventPMWakeupCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventPMWakeupCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_PMWAKEUP,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1191,12 +1191,12 @@ func (c *Connect) DomainEventPMWakeupRegister(dom *Domain,
callback DomainEventP
func (c *Connect) DomainEventPMSuspendRegister(dom *Domain, callback
DomainEventPMSuspendCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventPMSuspendCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventPMSuspendCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_PMSUSPEND,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1210,12 +1210,12 @@ func (c *Connect) DomainEventPMSuspendRegister(dom *Domain,
callback DomainEvent
func (c *Connect) DomainEventBalloonChangeRegister(dom *Domain, callback
DomainEventBalloonChangeCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventBalloonChangeCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventBalloonChangeCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1229,12 +1229,12 @@ func (c *Connect) DomainEventBalloonChangeRegister(dom *Domain,
callback DomainE
func (c *Connect) DomainEventPMSuspendDiskRegister(dom *Domain, callback
DomainEventPMSuspendDiskCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventPMSuspendDiskCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventPMSuspendDiskCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1248,12 +1248,12 @@ func (c *Connect) DomainEventPMSuspendDiskRegister(dom *Domain,
callback DomainE
func (c *Connect) DomainEventDeviceRemovedRegister(dom *Domain, callback
DomainEventDeviceRemovedCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventDeviceRemovedCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventDeviceRemovedCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1267,12 +1267,12 @@ func (c *Connect) DomainEventDeviceRemovedRegister(dom *Domain,
callback DomainE
func (c *Connect) DomainEventBlockJob2Register(dom *Domain, callback
DomainEventBlockJobCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventBlockJobCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventBlockJobCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1286,12 +1286,12 @@ func (c *Connect) DomainEventBlockJob2Register(dom *Domain,
callback DomainEvent
func (c *Connect) DomainEventTunableRegister(dom *Domain, callback
DomainEventTunableCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventTunableCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventTunableCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_TUNABLE,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1305,12 +1305,12 @@ func (c *Connect) DomainEventTunableRegister(dom *Domain, callback
DomainEventTu
func (c *Connect) DomainEventAgentLifecycleRegister(dom *Domain, callback
DomainEventAgentLifecycleCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventAgentLifecycleCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventAgentLifecycleCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1324,12 +1324,12 @@ func (c *Connect) DomainEventAgentLifecycleRegister(dom *Domain,
callback Domain
func (c *Connect) DomainEventDeviceAddedRegister(dom *Domain, callback
DomainEventDeviceAddedCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventDeviceAddedCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventDeviceAddedCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_DEVICE_ADDED,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1343,12 +1343,12 @@ func (c *Connect) DomainEventDeviceAddedRegister(dom *Domain,
callback DomainEve
func (c *Connect) DomainEventMigrationIterationRegister(dom *Domain, callback
DomainEventMigrationIterationCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventMigrationIterationCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventMigrationIterationCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1362,12 +1362,12 @@ func (c *Connect) DomainEventMigrationIterationRegister(dom
*Domain, callback Do
func (c *Connect) DomainEventJobCompletedRegister(dom *Domain, callback
DomainEventJobCompletedCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventJobCompletedCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventJobCompletedCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_JOB_COMPLETED,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1381,12 +1381,12 @@ func (c *Connect) DomainEventJobCompletedRegister(dom *Domain,
callback DomainEv
func (c *Connect) DomainEventDeviceRemovalFailedRegister(dom *Domain, callback
DomainEventDeviceRemovalFailedCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventDeviceRemovalFailedCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventDeviceRemovalFailedCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1400,12 +1400,12 @@ func (c *Connect) DomainEventDeviceRemovalFailedRegister(dom
*Domain, callback D
func (c *Connect) DomainEventMetadataChangeRegister(dom *Domain, callback
DomainEventMetadataChangeCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventMetadataChangeCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventMetadataChangeCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_METADATA_CHANGE,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -1419,12 +1419,12 @@ func (c *Connect) DomainEventMetadataChangeRegister(dom *Domain,
callback Domain
func (c *Connect) DomainEventBlockThresholdRegister(dom *Domain, callback
DomainEventBlockThresholdCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainEventBlockThresholdCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainEventBlockThresholdCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainEventRegisterAny_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainEventRegisterAnyWrapper(c.ptr, cdom,
C.VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD,
C.virConnectDomainEventGenericCallback(callbackPtr),
C.long(goCallBackId))
diff --git a/domain_events_wrapper.go b/domain_events_wrapper.go
index ad0f803..799945b 100644
--- a/domain_events_wrapper.go
+++ b/domain_events_wrapper.go
@@ -35,34 +35,34 @@ package libvirt
#include <stdint.h>
extern void domainEventLifecycleCallback(virConnectPtr, virDomainPtr, int, int, int);
-void domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventLifecycleCallbackHelper(virConnectPtr c, virDomainPtr d,
int event, int detail, void *data)
{
domainEventLifecycleCallback(c, d, event, detail, (int)(intptr_t)data);
}
extern void domainEventGenericCallback(virConnectPtr, virDomainPtr, int);
-void domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void *data)
+void domainEventGenericCallbackHelper(virConnectPtr c, virDomainPtr d, void *data)
{
domainEventGenericCallback(c, d, (int)(intptr_t)data);
}
extern void domainEventRTCChangeCallback(virConnectPtr, virDomainPtr, long long, int);
-void domainEventRTCChangeCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventRTCChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
long long utcoffset, void *data)
{
domainEventRTCChangeCallback(c, d, utcoffset, (int)(intptr_t)data);
}
extern void domainEventWatchdogCallback(virConnectPtr, virDomainPtr, int, int);
-void domainEventWatchdogCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventWatchdogCallbackHelper(virConnectPtr c, virDomainPtr d,
int action, void *data)
{
domainEventWatchdogCallback(c, d, action, (int)(intptr_t)data);
}
extern void domainEventIOErrorCallback(virConnectPtr, virDomainPtr, const char *, const
char *, int, int);
-void domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventIOErrorCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *srcPath, const char *devAlias,
int action, void *data)
{
@@ -72,7 +72,7 @@ void domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d,
extern void domainEventGraphicsCallback(virConnectPtr, virDomainPtr, int, const
virDomainEventGraphicsAddress *,
const virDomainEventGraphicsAddress *, const char
*,
const virDomainEventGraphicsSubject *, int);
-void domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventGraphicsCallbackHelper(virConnectPtr c, virDomainPtr d,
int phase, const virDomainEventGraphicsAddress
*local,
const virDomainEventGraphicsAddress *remote,
const char *authScheme,
@@ -83,7 +83,7 @@ void domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d,
extern void domainEventIOErrorReasonCallback(virConnectPtr, virDomainPtr, const char *,
const char *,
int, const char *, int);
-void domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventIOErrorReasonCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *srcPath, const char *devAlias,
int action, const char *reason, void *data)
{
@@ -91,7 +91,7 @@ void domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr
d,
}
extern void domainEventBlockJobCallback(virConnectPtr, virDomainPtr, const char *, int,
int, int);
-void domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventBlockJobCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *disk, int type, int status, void *data)
{
domainEventBlockJobCallback(c, d, disk, type, status, (int)(intptr_t)data);
@@ -99,7 +99,7 @@ void domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d,
extern void domainEventDiskChangeCallback(virConnectPtr, virDomainPtr, const char *,
const char *,
const char *, int, int);
-void domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventDiskChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *oldSrcPath, const char *newSrcPath,
const char *devAlias, int reason, void *data)
{
@@ -107,49 +107,49 @@ void domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr
d,
}
extern void domainEventTrayChangeCallback(virConnectPtr, virDomainPtr, const char *, int,
int);
-void domainEventTrayChangeCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventTrayChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *devAlias, int reason, void *data)
{
domainEventTrayChangeCallback(c, d, devAlias, reason, (int)(intptr_t)data);
}
extern void domainEventPMSuspendCallback(virConnectPtr, virDomainPtr, int, int);
-void domainEventPMSuspendCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventPMSuspendCallbackHelper(virConnectPtr c, virDomainPtr d,
int reason, void *data)
{
domainEventPMSuspendCallback(c, d, reason, (int)(intptr_t)data);
}
extern void domainEventPMWakeupCallback(virConnectPtr, virDomainPtr, int, int);
-void domainEventPMWakeupCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventPMWakeupCallbackHelper(virConnectPtr c, virDomainPtr d,
int reason, void *data)
{
domainEventPMWakeupCallback(c, d, reason, (int)(intptr_t)data);
}
extern void domainEventPMSuspendDiskCallback(virConnectPtr, virDomainPtr, int, int);
-void domainEventPMSuspendDiskCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventPMSuspendDiskCallbackHelper(virConnectPtr c, virDomainPtr d,
int reason, void *data)
{
domainEventPMSuspendDiskCallback(c, d, reason, (int)(intptr_t)data);
}
extern void domainEventBalloonChangeCallback(virConnectPtr, virDomainPtr, unsigned long
long, int);
-void domainEventBalloonChangeCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventBalloonChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
unsigned long long actual, void *data)
{
domainEventBalloonChangeCallback(c, d, actual, (int)(intptr_t)data);
}
extern void domainEventDeviceRemovedCallback(virConnectPtr, virDomainPtr, const char *,
int);
-void domainEventDeviceRemovedCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventDeviceRemovedCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *devAlias, void *data)
{
domainEventDeviceRemovedCallback(c, d, devAlias, (int)(intptr_t)data);
}
extern void domainEventTunableCallback(virConnectPtr, virDomainPtr, virTypedParameterPtr,
int, int);
-void domainEventTunableCallback_cgo(virConnectPtr conn,
+void domainEventTunableCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
@@ -159,7 +159,7 @@ void domainEventTunableCallback_cgo(virConnectPtr conn,
}
extern void domainEventAgentLifecycleCallback(virConnectPtr, virDomainPtr, int, int,
int);
-void domainEventAgentLifecycleCallback_cgo(virConnectPtr conn,
+void domainEventAgentLifecycleCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
int state,
int reason,
@@ -169,7 +169,7 @@ void domainEventAgentLifecycleCallback_cgo(virConnectPtr conn,
}
extern void domainEventDeviceAddedCallback(virConnectPtr, virDomainPtr, const char *,
int);
-void domainEventDeviceAddedCallback_cgo(virConnectPtr conn,
+void domainEventDeviceAddedCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
const char *devAlias,
void *opaque)
@@ -178,7 +178,7 @@ void domainEventDeviceAddedCallback_cgo(virConnectPtr conn,
}
extern void domainEventMigrationIterationCallback(virConnectPtr, virDomainPtr, int,
int);
-void domainEventMigrationIterationCallback_cgo(virConnectPtr conn,
+void domainEventMigrationIterationCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
int iteration,
void *opaque)
@@ -187,7 +187,7 @@ void domainEventMigrationIterationCallback_cgo(virConnectPtr conn,
}
extern void domainEventJobCompletedCallback(virConnectPtr, virDomainPtr,
virTypedParameterPtr, int, int);
-void domainEventJobCompletedCallback_cgo(virConnectPtr conn,
+void domainEventJobCompletedCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
@@ -197,7 +197,7 @@ void domainEventJobCompletedCallback_cgo(virConnectPtr conn,
}
extern void domainEventDeviceRemovalFailedCallback(virConnectPtr, virDomainPtr, const
char *, int);
-void domainEventDeviceRemovalFailedCallback_cgo(virConnectPtr conn,
+void domainEventDeviceRemovalFailedCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
const char *devAlias,
void *opaque)
@@ -206,7 +206,7 @@ void domainEventDeviceRemovalFailedCallback_cgo(virConnectPtr conn,
}
extern void domainEventMetadataChangeCallback(virConnectPtr, virDomainPtr, int, const
char *, int);
-void domainEventMetadataChangeCallback_cgo(virConnectPtr conn,
+void domainEventMetadataChangeCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
int type,
const char *nsuri,
@@ -216,7 +216,7 @@ void domainEventMetadataChangeCallback_cgo(virConnectPtr conn,
}
extern void domainEventBlockThresholdCallback(virConnectPtr, virDomainPtr, const char *,
const char *, unsigned long long, unsigned long long, int);
-void domainEventBlockThresholdCallback_cgo(virConnectPtr conn,
+void domainEventBlockThresholdCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
const char *dev,
const char *path,
@@ -227,11 +227,11 @@ void domainEventBlockThresholdCallback_cgo(virConnectPtr conn,
domainEventBlockThresholdCallback(conn, dom, dev, path, threshold, excess,
(int)(intptr_t)opaque);
}
-int virConnectDomainEventRegisterAny_cgo(virConnectPtr c, virDomainPtr d,
+int virConnectDomainEventRegisterAnyWrapper(virConnectPtr c, virDomainPtr d,
int eventID,
virConnectDomainEventGenericCallback cb,
long goCallbackId) {
void* id = (void*)goCallbackId;
- return virConnectDomainEventRegisterAny(c, d, eventID, cb, id, freeGoCallback_cgo);
+ return virConnectDomainEventRegisterAny(c, d, eventID, cb, id,
freeGoCallbackHelper);
}
*/
diff --git a/domain_events_wrapper.h b/domain_events_wrapper.h
index a0e494e..55cf48e 100644
--- a/domain_events_wrapper.h
+++ b/domain_events_wrapper.h
@@ -27,88 +27,88 @@
#ifndef LIBVIRT_GO_DOMAIN_EVENTS_WRAPPER_H__
#define LIBVIRT_GO_DOMAIN_EVENTS_WRAPPER_H__
-void domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventLifecycleCallbackHelper(virConnectPtr c, virDomainPtr d,
int event, int detail, void* data);
-void domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void* data);
+void domainEventGenericCallbackHelper(virConnectPtr c, virDomainPtr d, void* data);
-void domainEventRTCChangeCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventRTCChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
long long utcoffset, void* data);
-void domainEventWatchdogCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventWatchdogCallbackHelper(virConnectPtr c, virDomainPtr d,
int action, void* data);
-void domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventIOErrorCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *srcPath, const char *devAlias,
int action, void* data);
-void domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventGraphicsCallbackHelper(virConnectPtr c, virDomainPtr d,
int phase, const virDomainEventGraphicsAddress
*local,
const virDomainEventGraphicsAddress *remote,
const char *authScheme,
const virDomainEventGraphicsSubject *subject, void*
data);
-void domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventIOErrorReasonCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *srcPath, const char *devAlias,
int action, const char *reason, void* data);
-void domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventBlockJobCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *disk, int type, int status, void* data);
-void domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventDiskChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *oldSrcPath, const char *newSrcPath,
const char *devAlias, int reason, void* data);
-void domainEventTrayChangeCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventTrayChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *devAlias, int reason, void* data);
-void domainEventPMSuspendCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventPMSuspendCallbackHelper(virConnectPtr c, virDomainPtr d,
int reason, void* data);
-void domainEventPMWakeupCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventPMWakeupCallbackHelper(virConnectPtr c, virDomainPtr d,
int reason, void* data);
-void domainEventPMSuspendDiskCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventPMSuspendDiskCallbackHelper(virConnectPtr c, virDomainPtr d,
int reason, void* data);
-void domainEventBalloonChangeCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventBalloonChangeCallbackHelper(virConnectPtr c, virDomainPtr d,
unsigned long long actual, void* data);
-void domainEventDeviceRemovedCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainEventDeviceRemovedCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *devAlias, void* data);
-void domainEventTunableCallback_cgo(virConnectPtr conn,
+void domainEventTunableCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
void *opaque);
-void domainEventAgentLifecycleCallback_cgo(virConnectPtr conn,
+void domainEventAgentLifecycleCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
int state,
int reason,
void *opaque);
-void domainEventDeviceAddedCallback_cgo(virConnectPtr conn,
+void domainEventDeviceAddedCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
const char *devAlias,
void *opaque);
-void domainEventMigrationIterationCallback_cgo(virConnectPtr conn,
+void domainEventMigrationIterationCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
int iteration,
void *opaque);
-void domainEventJobCompletedCallback_cgo(virConnectPtr conn,
+void domainEventJobCompletedCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
void *opaque);
-void domainEventDeviceRemovalFailedCallback_cgo(virConnectPtr conn,
+void domainEventDeviceRemovalFailedCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
const char *devAlias,
void *opaque);
-void domainEventMetadataChangeCallback_cgo(virConnectPtr conn,
+void domainEventMetadataChangeCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
int type,
const char *nsuri,
void *opaque);
-void domainEventBlockThresholdCallback_cgo(virConnectPtr conn,
+void domainEventBlockThresholdCallbackHelper(virConnectPtr conn,
virDomainPtr dom,
const char *dev,
const char *path,
@@ -116,7 +116,7 @@ void domainEventBlockThresholdCallback_cgo(virConnectPtr conn,
unsigned long long excess,
void *opaque);
-int virConnectDomainEventRegisterAny_cgo(virConnectPtr c, virDomainPtr d,
+int virConnectDomainEventRegisterAnyWrapper(virConnectPtr c, virDomainPtr d,
int eventID,
virConnectDomainEventGenericCallback cb,
long goCallbackId);
diff --git a/events.go b/events.go
index 74d480a..3f8d3a9 100644
--- a/events.go
+++ b/events.go
@@ -77,7 +77,7 @@ func eventHandleCallback(watch int, fd int, events int, callbackID int)
{
func EventAddHandle(fd int, events EventHandleType, callback EventHandleCallback) (int,
error) {
callbackID := registerCallbackId(callback)
- ret := C.virEventAddHandle_cgo((C.int)(fd), (C.int)(events), (C.int)(callbackID))
+ ret := C.virEventAddHandleWrapper((C.int)(fd), (C.int)(events), (C.int)(callbackID))
if ret == -1 {
return 0, GetLastError()
}
@@ -113,7 +113,7 @@ func eventTimeoutCallback(timer int, callbackID int) {
func EventAddTimeout(freq int, callback EventTimeoutCallback) (int, error) {
callbackID := registerCallbackId(callback)
- ret := C.virEventAddTimeout_cgo((C.int)(freq), (C.int)(callbackID))
+ ret := C.virEventAddTimeoutWrapper((C.int)(freq), (C.int)(callbackID))
if ret == -1 {
return 0, GetLastError()
}
@@ -173,7 +173,7 @@ var eventLoopImpl EventLoop
// See also
https://libvirt.org/html/libvirt-libvirt-event.html#virEventRegisterImpl
func EventRegisterImpl(impl EventLoop) {
eventLoopImpl = impl
- C.virEventRegisterImpl_cgo()
+ C.virEventRegisterImplWrapper()
}
//export eventAddHandleFunc
diff --git a/events_wrapper.go b/events_wrapper.go
index d17b054..6e3416f 100644
--- a/events_wrapper.go
+++ b/events_wrapper.go
@@ -41,7 +41,7 @@ static void eventAddHandleHelper(int watch, int fd, int events, void
*opaque)
eventHandleCallback(watch, fd, events, (int)(intptr_t)opaque);
}
-int virEventAddHandle_cgo(int fd, int events, int callbackID)
+int virEventAddHandleWrapper(int fd, int events, int callbackID)
{
return virEventAddHandle(fd, events, eventAddHandleHelper, (void
*)(intptr_t)callbackID, NULL);
}
@@ -53,7 +53,7 @@ static void eventAddTimeoutHelper(int timer, void *opaque)
eventTimeoutCallback(timer, (int)(intptr_t)opaque);
}
-int virEventAddTimeout_cgo(int freq, int callbackID)
+int virEventAddTimeoutWrapper(int freq, int callbackID)
{
return virEventAddTimeout(freq, eventAddTimeoutHelper, (void *)(intptr_t)callbackID,
NULL);
}
@@ -96,7 +96,7 @@ int eventRemoveTimeoutFuncHelper(int timer)
}
-void virEventRegisterImpl_cgo(void)
+void virEventRegisterImplWrapper(void)
{
virEventRegisterImpl(eventAddHandleFuncHelper,
eventUpdateHandleFuncHelper,
diff --git a/events_wrapper.h b/events_wrapper.h
index d3e78d8..8420909 100644
--- a/events_wrapper.h
+++ b/events_wrapper.h
@@ -27,9 +27,9 @@
#ifndef LIBVIRT_GO_EVENTS_WRAPPER_H__
#define LIBVIRT_GO_EVENTS_WRAPPER_H__
-int virEventAddHandle_cgo(int fd, int events, int callbackID);
-int virEventAddTimeout_cgo(int freq, int callbackID);
-void virEventRegisterImpl_cgo(void);
+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);
diff --git a/network_events.go b/network_events.go
index 15b2f55..39cc62b 100644
--- a/network_events.go
+++ b/network_events.go
@@ -74,12 +74,12 @@ func (c *Connect) NetworkEventLifecycleRegister(net *Network, callback
NetworkEv
return 0, GetNotImplementedError("virConnectNetworkEventRegisterAny")
}
- callbackPtr := unsafe.Pointer(C.networkEventLifecycleCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.networkEventLifecycleCallbackHelper)
var cnet C.virNetworkPtr
if net != nil {
cnet = net.ptr
}
- ret := C.virConnectNetworkEventRegisterAny_cgo(c.ptr, cnet,
+ ret := C.virConnectNetworkEventRegisterAnyWrapper(c.ptr, cnet,
C.VIR_NETWORK_EVENT_ID_LIFECYCLE,
C.virConnectNetworkEventGenericCallback(callbackPtr),
C.long(goCallBackId))
diff --git a/network_events_wrapper.go b/network_events_wrapper.go
index 613e32b..ea892cf 100644
--- a/network_events_wrapper.go
+++ b/network_events_wrapper.go
@@ -37,20 +37,20 @@ package libvirt
#include <stdint.h>
extern void networkEventLifecycleCallback(virConnectPtr, virNetworkPtr, int, int, int);
-void networkEventLifecycleCallback_cgo(virConnectPtr c, virNetworkPtr d,
+void networkEventLifecycleCallbackHelper(virConnectPtr c, virNetworkPtr d,
int event, int detail, void *data)
{
networkEventLifecycleCallback(c, d, event, detail, (int)(intptr_t)data);
}
-int virConnectNetworkEventRegisterAny_cgo(virConnectPtr c, virNetworkPtr d,
+int virConnectNetworkEventRegisterAnyWrapper(virConnectPtr c, virNetworkPtr d,
int eventID,
virConnectNetworkEventGenericCallback cb,
long goCallbackId) {
void* id = (void*)goCallbackId;
#if LIBVIR_VERSION_NUMBER < 1002001
assert(0); // Caller should have checked version
#else
- return virConnectNetworkEventRegisterAny(c, d, eventID, cb, id, freeGoCallback_cgo);
+ return virConnectNetworkEventRegisterAny(c, d, eventID, cb, id,
freeGoCallbackHelper);
#endif
}
diff --git a/network_events_wrapper.h b/network_events_wrapper.h
index 13ffce1..1b73369 100644
--- a/network_events_wrapper.h
+++ b/network_events_wrapper.h
@@ -27,10 +27,10 @@
#ifndef LIBVIRT_GO_NETWORK_EVENTS_WRAPPER_H__
#define LIBVIRT_GO_NETWORK_EVENTS_WRAPPER_H__
-void networkEventLifecycleCallback_cgo(virConnectPtr c, virNetworkPtr d,
+void networkEventLifecycleCallbackHelper(virConnectPtr c, virNetworkPtr d,
int event, int detail, void* data);
-int virConnectNetworkEventRegisterAny_cgo(virConnectPtr c, virNetworkPtr d,
+int virConnectNetworkEventRegisterAnyWrapper(virConnectPtr c, virNetworkPtr d,
int eventID,
virConnectNetworkEventGenericCallback cb,
long goCallbackId);
diff --git a/node_device_events.go b/node_device_events.go
index 01c2245..1be2c73 100644
--- a/node_device_events.go
+++ b/node_device_events.go
@@ -91,12 +91,12 @@ func (c *Connect) NodeDeviceEventLifecycleRegister(device *NodeDevice,
callback
}
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.nodeDeviceEventLifecycleCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.nodeDeviceEventLifecycleCallbackHelper)
var cdevice C.virNodeDevicePtr
if device != nil {
cdevice = device.ptr
}
- ret := C.virConnectNodeDeviceEventRegisterAny_cgo(c.ptr, cdevice,
+ ret := C.virConnectNodeDeviceEventRegisterAnyWrapper(c.ptr, cdevice,
C.VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE,
C.virConnectNodeDeviceEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -110,12 +110,12 @@ func (c *Connect) NodeDeviceEventLifecycleRegister(device
*NodeDevice, callback
func (c *Connect) NodeDeviceEventUpdateRegister(device *NodeDevice, callback
NodeDeviceEventGenericCallback) (int, error) {
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.nodeDeviceEventGenericCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.nodeDeviceEventGenericCallbackHelper)
var cdevice C.virNodeDevicePtr
if device != nil {
cdevice = device.ptr
}
- ret := C.virConnectNodeDeviceEventRegisterAny_cgo(c.ptr, cdevice,
+ ret := C.virConnectNodeDeviceEventRegisterAnyWrapper(c.ptr, cdevice,
C.VIR_NODE_DEVICE_EVENT_ID_UPDATE,
C.virConnectNodeDeviceEventGenericCallback(callbackPtr),
C.long(goCallBackId))
diff --git a/node_device_events_wrapper.go b/node_device_events_wrapper.go
index a34fa6f..ff7b6e4 100644
--- a/node_device_events_wrapper.go
+++ b/node_device_events_wrapper.go
@@ -37,26 +37,26 @@ package libvirt
#include <stdint.h>
extern void nodeDeviceEventLifecycleCallback(virConnectPtr, virNodeDevicePtr, int, int,
int);
-void nodeDeviceEventLifecycleCallback_cgo(virConnectPtr c, virNodeDevicePtr d,
+void nodeDeviceEventLifecycleCallbackHelper(virConnectPtr c, virNodeDevicePtr d,
int event, int detail, void *data)
{
nodeDeviceEventLifecycleCallback(c, d, event, detail, (int)(intptr_t)data);
}
extern void nodeDeviceEventGenericCallback(virConnectPtr, virNodeDevicePtr, int);
-void nodeDeviceEventGenericCallback_cgo(virConnectPtr c, virNodeDevicePtr d, void *data)
+void nodeDeviceEventGenericCallbackHelper(virConnectPtr c, virNodeDevicePtr d, void
*data)
{
nodeDeviceEventGenericCallback(c, d, (int)(intptr_t)data);
}
-int virConnectNodeDeviceEventRegisterAny_cgo(virConnectPtr c, virNodeDevicePtr d,
+int virConnectNodeDeviceEventRegisterAnyWrapper(virConnectPtr c, virNodeDevicePtr d,
int eventID,
virConnectNodeDeviceEventGenericCallback cb,
long goCallbackId) {
void* id = (void*)goCallbackId;
#if LIBVIR_VERSION_NUMBER < 2002000
assert(0); // Caller should have checked version
#else
- return virConnectNodeDeviceEventRegisterAny(c, d, eventID, cb, id,
freeGoCallback_cgo);
+ return virConnectNodeDeviceEventRegisterAny(c, d, eventID, cb, id,
freeGoCallbackHelper);
#endif
}
diff --git a/node_device_events_wrapper.h b/node_device_events_wrapper.h
index 38b1036..ae76b3e 100644
--- a/node_device_events_wrapper.h
+++ b/node_device_events_wrapper.h
@@ -27,12 +27,12 @@
#ifndef LIBVIRT_GO_NODE_DEVICE_EVENTS_WRAPPER_H__
#define LIBVIRT_GO_NODE_DEVICE_EVENTS_WRAPPER_H__
-void nodeDeviceEventLifecycleCallback_cgo(virConnectPtr c, virNodeDevicePtr d,
+void nodeDeviceEventLifecycleCallbackHelper(virConnectPtr c, virNodeDevicePtr d,
int event, int detail, void* data);
-void nodeDeviceEventGenericCallback_cgo(virConnectPtr c, virNodeDevicePtr d, void*
data);
+void nodeDeviceEventGenericCallbackHelper(virConnectPtr c, virNodeDevicePtr d, void*
data);
-int virConnectNodeDeviceEventRegisterAny_cgo(virConnectPtr c, virNodeDevicePtr d,
+int virConnectNodeDeviceEventRegisterAnyWrapper(virConnectPtr c, virNodeDevicePtr d,
int eventID, virConnectNodeDeviceEventGenericCallback cb,
long goCallbackId);
diff --git a/qemu.go b/qemu.go
index dd30a7d..b8679dc 100644
--- a/qemu.go
+++ b/qemu.go
@@ -160,12 +160,12 @@ func (c *Connect) DomainQemuMonitorEventRegister(dom *Domain, event
string, call
defer C.free(unsafe.Pointer(cEvent))
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.domainQemuMonitorEventCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.domainQemuMonitorEventCallbackHelper)
var cdom C.virDomainPtr
if dom != nil {
cdom = dom.ptr
}
- ret := C.virConnectDomainQemuMonitorEventRegister_cgo(c.ptr, cdom,
+ ret := C.virConnectDomainQemuMonitorEventRegisterWrapper(c.ptr, cdom,
cEvent,
C.virConnectDomainQemuMonitorEventCallback(callbackPtr),
C.long(goCallBackId),
diff --git a/qemu_wrapper.go b/qemu_wrapper.go
index 41fe0cf..bbd95cc 100644
--- a/qemu_wrapper.go
+++ b/qemu_wrapper.go
@@ -42,21 +42,21 @@ package libvirt
extern void domainQemuMonitorEventCallback(virConnectPtr, virDomainPtr, const char *,
long long, unsigned int, const char *, int);
-void domainQemuMonitorEventCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainQemuMonitorEventCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *event, long long secs,
unsigned int micros, const char *details, void *data)
{
domainQemuMonitorEventCallback(c, d, event, secs, micros, details,
(int)(intptr_t)data);
}
-int virConnectDomainQemuMonitorEventRegister_cgo(virConnectPtr c, virDomainPtr d,
+int virConnectDomainQemuMonitorEventRegisterWrapper(virConnectPtr c, virDomainPtr d,
const char *event,
virConnectDomainQemuMonitorEventCallback cb,
long goCallbackId, unsigned int
flags) {
#if LIBVIR_VERSION_NUMBER < 1002003
assert(0); // Caller should have checked version
#else
void* id = (void*)goCallbackId;
- return virConnectDomainQemuMonitorEventRegister(c, d, event, cb, id,
freeGoCallback_cgo, flags);
+ return virConnectDomainQemuMonitorEventRegister(c, d, event, cb, id,
freeGoCallbackHelper, flags);
#endif
}
diff --git a/qemu_wrapper.h b/qemu_wrapper.h
index 4495cc4..9284256 100644
--- a/qemu_wrapper.h
+++ b/qemu_wrapper.h
@@ -27,11 +27,11 @@
#ifndef LIBVIRT_GO_DOMAIN_EVENTS_WRAPPER_H__
#define LIBVIRT_GO_DOMAIN_EVENTS_WRAPPER_H__
-void domainQemuMonitorEventCallback_cgo(virConnectPtr c, virDomainPtr d,
+void domainQemuMonitorEventCallbackHelper(virConnectPtr c, virDomainPtr d,
const char *event, long long secs,
unsigned int micros, const char *details, void *data);
-int virConnectDomainQemuMonitorEventRegister_cgo(virConnectPtr c, virDomainPtr d,
+int virConnectDomainQemuMonitorEventRegisterWrapper(virConnectPtr c, virDomainPtr d,
const char *event, virConnectDomainQemuMonitorEventCallback cb,
long goCallbackId, unsigned int flags);
diff --git a/secret_events.go b/secret_events.go
index 92c86a2..0dd2708 100644
--- a/secret_events.go
+++ b/secret_events.go
@@ -91,12 +91,12 @@ func (c *Connect) SecretEventLifecycleRegister(secret *Secret,
callback SecretEv
return 0, GetNotImplementedError("virConnectSecretEventRegisterAny")
}
- callbackPtr := unsafe.Pointer(C.secretEventLifecycleCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.secretEventLifecycleCallbackHelper)
var csecret C.virSecretPtr
if secret != nil {
csecret = secret.ptr
}
- ret := C.virConnectSecretEventRegisterAny_cgo(c.ptr, csecret,
+ ret := C.virConnectSecretEventRegisterAnyWrapper(c.ptr, csecret,
C.VIR_SECRET_EVENT_ID_LIFECYCLE,
C.virConnectSecretEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -113,12 +113,12 @@ func (c *Connect) SecretEventValueChangedRegister(secret *Secret,
callback Secre
return 0, GetNotImplementedError("virConnectSecretEventRegisterAny")
}
- callbackPtr := unsafe.Pointer(C.secretEventGenericCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.secretEventGenericCallbackHelper)
var csecret C.virSecretPtr
if secret != nil {
csecret = secret.ptr
}
- ret := C.virConnectSecretEventRegisterAny_cgo(c.ptr, csecret,
+ ret := C.virConnectSecretEventRegisterAnyWrapper(c.ptr, csecret,
C.VIR_SECRET_EVENT_ID_VALUE_CHANGED,
C.virConnectSecretEventGenericCallback(callbackPtr),
C.long(goCallBackId))
diff --git a/secret_events_wrapper.go b/secret_events_wrapper.go
index 55d3394..3366065 100644
--- a/secret_events_wrapper.go
+++ b/secret_events_wrapper.go
@@ -37,27 +37,27 @@ package libvirt
#include <stdint.h>
extern void secretEventLifecycleCallback(virConnectPtr, virSecretPtr, int, int, int);
-void secretEventLifecycleCallback_cgo(virConnectPtr c, virSecretPtr d,
+void secretEventLifecycleCallbackHelper(virConnectPtr c, virSecretPtr d,
int event, int detail, void *data)
{
secretEventLifecycleCallback(c, d, event, detail, (int)(intptr_t)data);
}
extern void secretEventGenericCallback(virConnectPtr, virSecretPtr, int);
-void secretEventGenericCallback_cgo(virConnectPtr c, virSecretPtr d,
+void secretEventGenericCallbackHelper(virConnectPtr c, virSecretPtr d,
void *data)
{
secretEventGenericCallback(c, d, (int)(intptr_t)data);
}
-int virConnectSecretEventRegisterAny_cgo(virConnectPtr c, virSecretPtr d,
+int virConnectSecretEventRegisterAnyWrapper(virConnectPtr c, virSecretPtr d,
int eventID,
virConnectSecretEventGenericCallback cb,
long goCallbackId) {
void* id = (void*)goCallbackId;
#if LIBVIR_VERSION_NUMBER < 3000000
assert(0); // Caller should have checked version
#else
- return virConnectSecretEventRegisterAny(c, d, eventID, cb, id, freeGoCallback_cgo);
+ return virConnectSecretEventRegisterAny(c, d, eventID, cb, id,
freeGoCallbackHelper);
#endif
}
diff --git a/secret_events_wrapper.h b/secret_events_wrapper.h
index 4ad299c..1b5b527 100644
--- a/secret_events_wrapper.h
+++ b/secret_events_wrapper.h
@@ -27,12 +27,12 @@
#ifndef LIBVIRT_GO_SECRET_EVENTS_WRAPPER_H__
#define LIBVIRT_GO_SECRET_EVENTS_WRAPPER_H__
-void secretEventLifecycleCallback_cgo(virConnectPtr c, virSecretPtr d,
+void secretEventLifecycleCallbackHelper(virConnectPtr c, virSecretPtr d,
int event, int detail, void* data);
-void secretEventGenericCallback_cgo(virConnectPtr c, virSecretPtr d,
+void secretEventGenericCallbackHelper(virConnectPtr c, virSecretPtr d,
void* data);
-int virConnectSecretEventRegisterAny_cgo(virConnectPtr c, virSecretPtr d,
+int virConnectSecretEventRegisterAnyWrapper(virConnectPtr c, virSecretPtr d,
int eventID,
virConnectSecretEventGenericCallback cb,
long goCallbackId);
diff --git a/storage_pool_events.go b/storage_pool_events.go
index 5be9191..cf98616 100644
--- a/storage_pool_events.go
+++ b/storage_pool_events.go
@@ -92,12 +92,12 @@ func (c *Connect) StoragePoolEventLifecycleRegister(pool *StoragePool,
callback
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.storagePoolEventLifecycleCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.storagePoolEventLifecycleCallbackHelper)
var cpool C.virStoragePoolPtr
if pool != nil {
cpool = pool.ptr
}
- ret := C.virConnectStoragePoolEventRegisterAny_cgo(c.ptr, cpool,
+ ret := C.virConnectStoragePoolEventRegisterAnyWrapper(c.ptr, cpool,
C.VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE,
C.virConnectStoragePoolEventGenericCallback(callbackPtr),
C.long(goCallBackId))
@@ -115,12 +115,12 @@ func (c *Connect) StoragePoolEventRefreshRegister(pool *StoragePool,
callback St
goCallBackId := registerCallbackId(callback)
- callbackPtr := unsafe.Pointer(C.storagePoolEventGenericCallback_cgo)
+ callbackPtr := unsafe.Pointer(C.storagePoolEventGenericCallbackHelper)
var cpool C.virStoragePoolPtr
if pool != nil {
cpool = pool.ptr
}
- ret := C.virConnectStoragePoolEventRegisterAny_cgo(c.ptr, cpool,
+ ret := C.virConnectStoragePoolEventRegisterAnyWrapper(c.ptr, cpool,
C.VIR_STORAGE_POOL_EVENT_ID_REFRESH,
C.virConnectStoragePoolEventGenericCallback(callbackPtr),
C.long(goCallBackId))
diff --git a/storage_pool_events_wrapper.go b/storage_pool_events_wrapper.go
index 0d99909..9670440 100644
--- a/storage_pool_events_wrapper.go
+++ b/storage_pool_events_wrapper.go
@@ -37,27 +37,27 @@ package libvirt
#include <stdint.h>
extern void storagePoolEventLifecycleCallback(virConnectPtr, virStoragePoolPtr, int, int,
int);
-void storagePoolEventLifecycleCallback_cgo(virConnectPtr c, virStoragePoolPtr d,
+void storagePoolEventLifecycleCallbackHelper(virConnectPtr c, virStoragePoolPtr d,
int event, int detail, void *data)
{
storagePoolEventLifecycleCallback(c, d, event, detail, (int)(intptr_t)data);
}
extern void storagePoolEventGenericCallback(virConnectPtr, virStoragePoolPtr, int);
-void storagePoolEventGenericCallback_cgo(virConnectPtr c, virStoragePoolPtr d,
+void storagePoolEventGenericCallbackHelper(virConnectPtr c, virStoragePoolPtr d,
void *data)
{
storagePoolEventGenericCallback(c, d, (int)(intptr_t)data);
}
-int virConnectStoragePoolEventRegisterAny_cgo(virConnectPtr c, virStoragePoolPtr d,
+int virConnectStoragePoolEventRegisterAnyWrapper(virConnectPtr c, virStoragePoolPtr d,
int eventID,
virConnectStoragePoolEventGenericCallback cb,
long goCallbackId) {
#if LIBVIR_VERSION_NUMBER < 2000000
assert(0); // Caller should have checked version
#else
void* id = (void*)goCallbackId;
- return virConnectStoragePoolEventRegisterAny(c, d, eventID, cb, id,
freeGoCallback_cgo);
+ return virConnectStoragePoolEventRegisterAny(c, d, eventID, cb, id,
freeGoCallbackHelper);
#endif
}
diff --git a/storage_pool_events_wrapper.h b/storage_pool_events_wrapper.h
index c8a10c9..c82abb2 100644
--- a/storage_pool_events_wrapper.h
+++ b/storage_pool_events_wrapper.h
@@ -27,12 +27,12 @@
#ifndef LIBVIRT_GO_STORAGE_POOL_EVENTS_WRAPPER_H__
#define LIBVIRT_GO_STORAGE_POOL_EVENTS_WRAPPER_H__
-void storagePoolEventLifecycleCallback_cgo(virConnectPtr c, virStoragePoolPtr d,
+void storagePoolEventLifecycleCallbackHelper(virConnectPtr c, virStoragePoolPtr d,
int event, int detail, void* data);
-void storagePoolEventGenericCallback_cgo(virConnectPtr c, virStoragePoolPtr d,
+void storagePoolEventGenericCallbackHelper(virConnectPtr c, virStoragePoolPtr d,
void* data);
-int virConnectStoragePoolEventRegisterAny_cgo(virConnectPtr c, virStoragePoolPtr d,
+int virConnectStoragePoolEventRegisterAnyWrapper(virConnectPtr c, virStoragePoolPtr d,
int eventID, virConnectStoragePoolEventGenericCallback cb,
long goCallbackId);
diff --git a/stream.go b/stream.go
index b26e8e9..1282aef 100644
--- a/stream.go
+++ b/stream.go
@@ -223,7 +223,7 @@ func (v *Stream) RecvAll(handler StreamSinkFunc) error {
callbackID := registerCallbackId(handler)
- ret := C.virStreamRecvAll_cgo(v.ptr, (C.int)(callbackID))
+ ret := C.virStreamRecvAllWrapper(v.ptr, (C.int)(callbackID))
freeCallbackId(callbackID)
if ret == -1 {
return GetLastError()
@@ -241,7 +241,7 @@ func (v *Stream) SparseRecvAll(handler StreamSinkFunc, holeHandler
StreamSinkHol
callbackID := registerCallbackId(handler)
holeCallbackID := registerCallbackId(holeHandler)
- ret := C.virStreamSparseRecvAll_cgo(v.ptr, (C.int)(callbackID),
(C.int)(holeCallbackID))
+ ret := C.virStreamSparseRecvAllWrapper(v.ptr, (C.int)(callbackID),
(C.int)(holeCallbackID))
freeCallbackId(callbackID)
freeCallbackId(holeCallbackID)
if ret == -1 {
@@ -328,7 +328,7 @@ func (v *Stream) SendAll(handler StreamSourceFunc) error {
callbackID := registerCallbackId(handler)
- ret := C.virStreamSendAll_cgo(v.ptr, (C.int)(callbackID))
+ ret := C.virStreamSendAllWrapper(v.ptr, (C.int)(callbackID))
freeCallbackId(callbackID)
if ret == -1 {
return GetLastError()
@@ -347,7 +347,7 @@ func (v *Stream) SparseSendAll(handler StreamSourceFunc, holeHandler
StreamSourc
holeCallbackID := registerCallbackId(holeHandler)
skipCallbackID := registerCallbackId(skipHandler)
- ret := C.virStreamSparseSendAll_cgo(v.ptr, (C.int)(callbackID), (C.int)(holeCallbackID),
(C.int)(skipCallbackID))
+ ret := C.virStreamSparseSendAllWrapper(v.ptr, (C.int)(callbackID),
(C.int)(holeCallbackID), (C.int)(skipCallbackID))
freeCallbackId(callbackID)
freeCallbackId(holeCallbackID)
freeCallbackId(skipCallbackID)
@@ -364,7 +364,7 @@ type StreamEventCallback func(*Stream, StreamEventType)
func (v *Stream) EventAddCallback(events StreamEventType, callback StreamEventCallback)
error {
callbackID := registerCallbackId(callback)
- ret := C.virStreamEventAddCallback_cgo(v.ptr, (C.int)(events), (C.int)(callbackID))
+ ret := C.virStreamEventAddCallbackWrapper(v.ptr, (C.int)(events), (C.int)(callbackID))
if ret == -1 {
return GetLastError()
}
diff --git a/stream_wrapper.go b/stream_wrapper.go
index ea2e0cb..4e1c2c9 100644
--- a/stream_wrapper.go
+++ b/stream_wrapper.go
@@ -83,13 +83,13 @@ static int streamSinkHoleCallbackHelper(virStreamPtr st, long long
length, void
return streamSinkHoleCallback(st, length, cbdata->holeCallbackID);
}
-int virStreamSendAll_cgo(virStreamPtr st, int callbackID)
+int virStreamSendAllWrapper(virStreamPtr st, int callbackID)
{
struct CallbackData cbdata = { .callbackID = callbackID };
return virStreamSendAll(st, streamSourceCallbackHelper, &cbdata);
}
-int virStreamSparseSendAll_cgo(virStreamPtr st, int callbackID, int holeCallbackID, int
skipCallbackID)
+int virStreamSparseSendAllWrapper(virStreamPtr st, int callbackID, int holeCallbackID,
int skipCallbackID)
{
struct CallbackData cbdata = { .callbackID = callbackID, .holeCallbackID =
holeCallbackID, .skipCallbackID = skipCallbackID };
#if LIBVIR_VERSION_NUMBER < 3004000
@@ -100,13 +100,13 @@ int virStreamSparseSendAll_cgo(virStreamPtr st, int callbackID, int
holeCallback
}
-int virStreamRecvAll_cgo(virStreamPtr st, int callbackID)
+int virStreamRecvAllWrapper(virStreamPtr st, int callbackID)
{
struct CallbackData cbdata = { .callbackID = callbackID };
return virStreamRecvAll(st, streamSinkCallbackHelper, &cbdata);
}
-int virStreamSparseRecvAll_cgo(virStreamPtr st, int callbackID, int holeCallbackID)
+int virStreamSparseRecvAllWrapper(virStreamPtr st, int callbackID, int holeCallbackID)
{
struct CallbackData cbdata = { .callbackID = callbackID, .holeCallbackID =
holeCallbackID };
#if LIBVIR_VERSION_NUMBER < 3004000
@@ -123,7 +123,7 @@ static void streamEventCallbackHelper(virStreamPtr st, int events,
void *opaque)
streamEventCallback(st, events, (int)(intptr_t)opaque);
}
-int virStreamEventAddCallback_cgo(virStreamPtr st, int events, int callbackID)
+int virStreamEventAddCallbackWrapper(virStreamPtr st, int events, int callbackID)
{
return virStreamEventAddCallback(st, events, streamEventCallbackHelper, (void
*)(intptr_t)callbackID, NULL);
}
diff --git a/stream_wrapper.h b/stream_wrapper.h
index 778e457..c064423 100644
--- a/stream_wrapper.h
+++ b/stream_wrapper.h
@@ -27,11 +27,11 @@
#ifndef LIBVIRT_GO_STREAM_WRAPPER_H__
#define LIBVIRT_GO_STREAM_WRAPPER_H__
-int virStreamSendAll_cgo(virStreamPtr st, int callbackID);
-int virStreamRecvAll_cgo(virStreamPtr st, int callbackID);
-int virStreamSparseSendAll_cgo(virStreamPtr st, int callbackID, int holeCallbackID, int
skipCallbackID);
-int virStreamSparseRecvAll_cgo(virStreamPtr st, int callbackID, int holeCallbackID);
+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 virStreamEventAddCallback_cgo(virStreamPtr st, int events, int callbackID);
+int virStreamEventAddCallbackWrapper(virStreamPtr st, int events, int callbackID);
#endif /* LIBVIRT_GO_STREAM_WRAPPER_H__ */
--
2.17.1