Since those stucts are identical at the moment, this patch basically does s/vboxGlobalData \*data/vboxPrivate *data/ with type casts in vboxDriverLock/Unlock calls to keep the code working and take care of unavoidable diff noise to set the stage for further commits that actually address the issue for the patch series. --- src/vbox/vbox_common.c | 164 +++++++++++++++++++++--------------------- src/vbox/vbox_network.c | 24 +++---- src/vbox/vbox_storage.c | 20 +++--- src/vbox/vbox_tmpl.c | 146 ++++++++++++++++++------------------- src/vbox/vbox_uniformed_api.h | 54 +++++++------- 5 files changed, 204 insertions(+), 204 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 1472639..be6ff2d 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -57,7 +57,7 @@ VIR_LOG_INIT("vbox.vbox_common"); /* global vbox API, used for all common codes. */ static vboxUniformedAPI gVBoxAPI; -static int openSessionForMachine(vboxGlobalData *data, const unsigned char *dom_uuid, vboxIIDUnion *iid, +static int openSessionForMachine(vboxPrivate *data, const unsigned char *dom_uuid, vboxIIDUnion *iid, IMachine **machine, bool checkflag) { VBOX_IID_INITIALIZE(iid); @@ -286,7 +286,7 @@ vboxXMLConfInit(void) NULL, NULL); } -static int vboxInitialize(vboxGlobalData *data) +static int vboxInitialize(vboxPrivate *data) { if (gVBoxAPI.UPFN.Initialize(data) != 0) goto cleanup; @@ -348,7 +348,7 @@ static virCapsPtr vboxCapsInit(void) return NULL; } -static int vboxExtractVersion(vboxGlobalData *data) +static int vboxExtractVersion(vboxPrivate *data) { int ret = -1; PRUnichar *versionUtf16 = NULL; @@ -377,7 +377,7 @@ static int vboxExtractVersion(vboxGlobalData *data) return ret; } -static void vboxUninitialize(vboxGlobalData *data) +static void vboxUninitialize(vboxPrivate *data) { if (!data) return; @@ -397,7 +397,7 @@ vboxConnectOpen(virConnectPtr conn, virConfPtr conf ATTRIBUTE_UNUSED, unsigned int flags) { - vboxGlobalData *data = NULL; + vboxPrivate *data = NULL; uid_t uid = geteuid(); virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); @@ -466,7 +466,7 @@ vboxConnectOpen(virConnectPtr conn, static int vboxConnectClose(virConnectPtr conn) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; VIR_DEBUG("%s: in vboxClose", conn->driver->name); vboxUninitialize(data); @@ -478,7 +478,7 @@ static int vboxConnectClose(virConnectPtr conn) static int vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IConsole *console = NULL; vboxIIDUnion iid; IMachine *machine = NULL; @@ -530,19 +530,19 @@ vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) return ret; } -static void vboxDriverLock(vboxGlobalData *data) +static void vboxDriverLock(vboxPrivate *data) { virMutexLock(&data->lock); } -static void vboxDriverUnlock(vboxGlobalData *data) +static void vboxDriverUnlock(vboxPrivate *data) { virMutexUnlock(&data->lock); } static int vboxConnectGetVersion(virConnectPtr conn, unsigned long *version) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; VIR_DEBUG("%s: in vboxGetVersion", conn->driver->name); vboxDriverLock(data); @@ -577,7 +577,7 @@ static int vboxConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED) static int vboxConnectGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; PRUint32 maxCPUCount = 0; int ret = -1; @@ -604,7 +604,7 @@ vboxConnectGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED) static char *vboxConnectGetCapabilities(virConnectPtr conn) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; char *ret = NULL; if (!data->vboxObj) @@ -619,7 +619,7 @@ static char *vboxConnectGetCapabilities(virConnectPtr conn) static int vboxConnectListDomains(virConnectPtr conn, int *ids, int nids) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; PRUint32 state; nsresult rc; @@ -661,7 +661,7 @@ static int vboxConnectListDomains(virConnectPtr conn, int *ids, int nids) static int vboxConnectNumOfDomains(virConnectPtr conn) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; PRUint32 state; nsresult rc; @@ -700,7 +700,7 @@ static int vboxConnectNumOfDomains(virConnectPtr conn) static virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; IMachine *machine; PRBool isAccessible = PR_FALSE; @@ -778,7 +778,7 @@ static virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id) virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; vboxIIDUnion iid; char *machineNameUtf8 = NULL; @@ -855,7 +855,7 @@ virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn, static virDomainPtr vboxDomainLookupByName(virConnectPtr conn, const char *name) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; vboxIIDUnion iid; char *machineNameUtf8 = NULL; @@ -927,7 +927,7 @@ vboxDomainLookupByName(virConnectPtr conn, const char *name) } static void -vboxSetBootDeviceOrder(virDomainDefPtr def, vboxGlobalData *data, +vboxSetBootDeviceOrder(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { ISystemProperties *systemProperties = NULL; @@ -984,7 +984,7 @@ vboxSetBootDeviceOrder(virDomainDefPtr def, vboxGlobalData *data, } static void -vboxAttachDrivesNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxAttachDrivesNew(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { /* AttachDrives for 3.0 and later */ size_t i; @@ -1193,7 +1193,7 @@ vboxAttachDrivesNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine } static void -vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxAttachDrives(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { /* Here, About the vboxAttachDrives. In fact,there is * three different implementations. We name it as @@ -1264,7 +1264,7 @@ vboxAttachSound(virDomainDefPtr def, IMachine *machine) } static int -vboxAttachNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxAttachNetwork(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { ISystemProperties *systemProperties = NULL; PRUint32 chipsetType = ChipsetType_Null; @@ -1410,7 +1410,7 @@ vboxAttachNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) } static void -vboxAttachSerial(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxAttachSerial(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { ISystemProperties *systemProperties = NULL; PRUint32 serialPortCount = 0; @@ -1486,7 +1486,7 @@ vboxAttachSerial(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) } static void -vboxAttachParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxAttachParallel(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { ISystemProperties *systemProperties = NULL; PRUint32 parallelPortCount = 0; @@ -1575,7 +1575,7 @@ vboxAttachVideo(virDomainDefPtr def, IMachine *machine) } static void -vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxAttachDisplay(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { int vrdpPresent = 0; int sdlPresent = 0; @@ -1722,7 +1722,7 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) } static void -vboxAttachUSB(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxAttachUSB(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { IUSBCommon *USBCommon = NULL; size_t i = 0; @@ -1826,7 +1826,7 @@ vboxAttachUSB(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) } static void -vboxAttachSharedFolder(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxAttachSharedFolder(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { size_t i; PRUnichar *nameUtf16; @@ -1855,7 +1855,7 @@ vboxAttachSharedFolder(virDomainDefPtr def, vboxGlobalData *data, IMachine *mach static virDomainPtr vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; IMachine *machine = NULL; IBIOSSettings *bios = NULL; vboxIIDUnion mchiid; @@ -2003,7 +2003,7 @@ vboxDomainDefineXML(virConnectPtr conn, const char *xml) } static void -detachDevices_common(vboxGlobalData *data, vboxIIDUnion *iidu) +detachDevices_common(vboxPrivate *data, vboxIIDUnion *iidu) { /* Block for checking if HDD's are attched to VM. * considering just IDE bus for now. Also skipped @@ -2040,7 +2040,7 @@ detachDevices_common(vboxGlobalData *data, vboxIIDUnion *iidu) static int vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; nsresult rc; @@ -2083,7 +2083,7 @@ static int vboxDomainUndefine(virDomainPtr dom) static int vboxStartMachine(virDomainPtr dom, int maxDomID, IMachine *machine, vboxIIDUnion *iid) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; int vrdpPresent = 0; int sdlPresent = 0; int guiPresent = 0; @@ -2235,7 +2235,7 @@ vboxStartMachine(virDomainPtr dom, int maxDomID, IMachine *machine, vboxIIDUnion static int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; unsigned char uuid[VIR_UUID_BUFLEN] = {0}; nsresult rc; @@ -2340,7 +2340,7 @@ static virDomainPtr vboxDomainCreateXML(virConnectPtr conn, const char *xml, static int vboxDomainIsActive(virDomainPtr dom) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; vboxIIDUnion iid; char *machineNameUtf8 = NULL; @@ -2412,7 +2412,7 @@ static int vboxDomainIsPersistent(virDomainPtr dom) { /* All domains are persistent. However, we do want to check for * existence. */ - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; int ret = -1; @@ -2435,7 +2435,7 @@ static int vboxDomainIsUpdated(virDomainPtr dom) { /* VBox domains never have a persistent state that differs from * current state. However, we do want to check for existence. */ - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; int ret = -1; @@ -2456,7 +2456,7 @@ static int vboxDomainIsUpdated(virDomainPtr dom) static int vboxDomainSuspend(virDomainPtr dom) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; IConsole *console = NULL; @@ -2507,7 +2507,7 @@ static int vboxDomainSuspend(virDomainPtr dom) static int vboxDomainResume(virDomainPtr dom) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; IConsole *console = NULL; @@ -2558,7 +2558,7 @@ static int vboxDomainResume(virDomainPtr dom) static int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; IConsole *console = NULL; @@ -2615,7 +2615,7 @@ static int vboxDomainShutdown(virDomainPtr dom) static int vboxDomainReboot(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; IConsole *console = NULL; @@ -2663,7 +2663,7 @@ static int vboxDomainReboot(virDomainPtr dom, unsigned int flags) static int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; IConsole *console = NULL; @@ -2729,7 +2729,7 @@ static char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) { static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; PRUint32 state; @@ -2787,7 +2787,7 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; char *machineName = NULL; PRUnichar *machineNameUtf16 = NULL; @@ -2871,7 +2871,7 @@ static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info) static int vboxDomainGetState(virDomainPtr dom, int *state, int *reason, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion domiid; IMachine *machine = NULL; PRUint32 mstate; @@ -2902,7 +2902,7 @@ static int vboxDomainGetState(virDomainPtr dom, int *state, static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; PRUint32 CPUCount = nvcpus; @@ -2956,7 +2956,7 @@ static int vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) static int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; ISystemProperties *systemProperties = NULL; PRUint32 maxCPUCount = 0; int ret = -1; @@ -2993,7 +2993,7 @@ static int vboxDomainGetMaxVcpus(virDomainPtr dom) } static void -vboxHostDeviceGetXMLDesc(vboxGlobalData *data, virDomainDefPtr def, IMachine *machine) +vboxHostDeviceGetXMLDesc(vboxPrivate *data, virDomainDefPtr def, IMachine *machine) { IUSBCommon *USBCommon = NULL; PRBool enabled = PR_FALSE; @@ -3099,7 +3099,7 @@ vboxHostDeviceGetXMLDesc(vboxGlobalData *data, virDomainDefPtr def, IMachine *ma } static void -vboxDumpIDEHDDsNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxDumpIDEHDDsNew(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { /* dump IDE hdds if present */ vboxArray mediumAttachments = VBOX_ARRAY_INITIALIZER; @@ -3260,7 +3260,7 @@ vboxDumpIDEHDDsNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) } static int -vboxDumpVideo(virDomainDefPtr def, vboxGlobalData *data ATTRIBUTE_UNUSED, +vboxDumpVideo(virDomainDefPtr def, vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine) { /* dump video options vram/2d/3d/directx/etc. */ @@ -3298,7 +3298,7 @@ vboxDumpVideo(virDomainDefPtr def, vboxGlobalData *data ATTRIBUTE_UNUSED, } static int -vboxDumpDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxDumpDisplay(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { /* dump display options vrdp/gui/sdl */ PRUnichar *keyUtf16 = NULL; @@ -3418,7 +3418,7 @@ vboxDumpDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) } static void -vboxDumpSharedFolders(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +vboxDumpSharedFolders(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { /* shared folders */ vboxArray sharedFolders = VBOX_ARRAY_INITIALIZER; @@ -3479,7 +3479,7 @@ vboxDumpSharedFolders(virDomainDefPtr def, vboxGlobalData *data, IMachine *machi } static void -vboxDumpNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PRUint32 networkAdapterCount) +vboxDumpNetwork(virDomainDefPtr def, vboxPrivate *data, IMachine *machine, PRUint32 networkAdapterCount) { PRUint32 netAdpIncCnt = 0; size_t i = 0; @@ -3618,7 +3618,7 @@ vboxDumpNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PR } static void -vboxDumpAudio(virDomainDefPtr def, vboxGlobalData *data ATTRIBUTE_UNUSED, +vboxDumpAudio(virDomainDefPtr def, vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine) { /* dump sound card if active */ @@ -3658,7 +3658,7 @@ vboxDumpAudio(virDomainDefPtr def, vboxGlobalData *data ATTRIBUTE_UNUSED, } static void -vboxDumpSerial(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PRUint32 serialPortCount) +vboxDumpSerial(virDomainDefPtr def, vboxPrivate *data, IMachine *machine, PRUint32 serialPortCount) { PRUint32 serialPortIncCount = 0; size_t i = 0; @@ -3746,7 +3746,7 @@ vboxDumpSerial(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PRU } static void -vboxDumpParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PRUint32 parallelPortCount) +vboxDumpParallel(virDomainDefPtr def, vboxPrivate *data, IMachine *machine, PRUint32 parallelPortCount) { PRUint32 parallelPortIncCount = 0; size_t i = 0; @@ -3821,7 +3821,7 @@ vboxDumpParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, P static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; virDomainDefPtr def = NULL; IMachine *machine = NULL; vboxIIDUnion iid; @@ -3989,7 +3989,7 @@ static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) static int vboxConnectListDefinedDomains(virConnectPtr conn, char ** const names, int maxnames) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; char *machineName = NULL; PRUnichar *machineNameUtf16 = NULL; @@ -4051,7 +4051,7 @@ static int vboxConnectListDefinedDomains(virConnectPtr conn, static int vboxConnectNumOfDefinedDomains(virConnectPtr conn) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; PRUint32 state; nsresult rc; @@ -4096,7 +4096,7 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom, const char *xml, int mediaChangeOnly ATTRIBUTE_UNUSED) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; PRUint32 state; @@ -4227,7 +4227,7 @@ static int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml, static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IMachine *machine = NULL; vboxIIDUnion iid; PRUint32 state; @@ -4340,7 +4340,7 @@ static int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml, static int vboxCloseDisksRecursively(virDomainPtr dom, char *location) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; nsresult rc; size_t i = 0; PRUnichar *locationUtf = NULL; @@ -4441,7 +4441,7 @@ vboxSnapshotRedefine(virDomainPtr dom, * * Finally, we register the machine with the new virtualbox description file. */ - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion domiid; IMachine *machine = NULL; nsresult rc; @@ -5300,7 +5300,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom, const char *xmlDesc, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; virDomainSnapshotDefPtr def = NULL; vboxIIDUnion domiid; IMachine *machine = NULL; @@ -5501,7 +5501,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom, } static ISnapshot * -vboxDomainSnapshotGet(vboxGlobalData *data, +vboxDomainSnapshotGet(vboxPrivate *data, virDomainPtr dom, IMachine *machine, const char *name) @@ -5554,7 +5554,7 @@ static int vboxSnapshotGetReadWriteDisks(virDomainSnapshotDefPtr def, virDomainSnapshotPtr snapshot) { virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion domiid; IMachine *machine = NULL; ISnapshot *snap = NULL; @@ -5775,7 +5775,7 @@ int vboxSnapshotGetReadOnlyDisks(virDomainSnapshotPtr snapshot, virDomainSnapshotDefPtr def) { virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion domiid; ISnapshot *snap = NULL; IMachine *machine = NULL; @@ -5994,7 +5994,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, unsigned int flags) { virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion domiid; IMachine *machine = NULL; ISnapshot *snap = NULL; @@ -6139,7 +6139,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, static int vboxDomainSnapshotNum(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; nsresult rc; @@ -6184,7 +6184,7 @@ static int vboxDomainSnapshotNum(virDomainPtr dom, unsigned int flags) static int vboxDomainSnapshotListNames(virDomainPtr dom, char **names, int nameslen, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; nsresult rc; @@ -6265,7 +6265,7 @@ static virDomainSnapshotPtr vboxDomainSnapshotLookupByName(virDomainPtr dom, const char *name, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; ISnapshot *snapshot = NULL; @@ -6294,7 +6294,7 @@ vboxDomainSnapshotLookupByName(virDomainPtr dom, const char *name, static int vboxDomainHasCurrentSnapshot(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; ISnapshot *snapshot = NULL; @@ -6332,7 +6332,7 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags) { virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; ISnapshot *snap = NULL; @@ -6395,7 +6395,7 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, static virDomainSnapshotPtr vboxDomainSnapshotCurrent(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; ISnapshot *snapshot = NULL; @@ -6453,7 +6453,7 @@ static int vboxDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, unsigned int flags) { virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; ISnapshot *snap = NULL; @@ -6514,7 +6514,7 @@ static int vboxDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, unsigned int flags) { virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion iid; IMachine *machine = NULL; ISnapshot *snap = NULL; @@ -6545,7 +6545,7 @@ static int vboxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags) { virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion domiid; IMachine *machine = NULL; ISnapshot *newSnapshot = NULL; @@ -6615,7 +6615,7 @@ static int vboxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, } static int -vboxDomainSnapshotDeleteSingle(vboxGlobalData *data, +vboxDomainSnapshotDeleteSingle(vboxPrivate *data, IConsole *console, ISnapshot *snapshot) { @@ -6662,7 +6662,7 @@ vboxDomainSnapshotDeleteSingle(vboxGlobalData *data, } static int -vboxDomainSnapshotDeleteTree(vboxGlobalData *data, +vboxDomainSnapshotDeleteTree(vboxPrivate *data, IConsole *console, ISnapshot *snapshot) { @@ -6709,7 +6709,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot) */ virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; virDomainSnapshotDefPtr def = NULL; char *defXml = NULL; vboxIIDUnion domiid; @@ -7146,7 +7146,7 @@ static int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags) { virDomainPtr dom = snapshot->domain; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIIDUnion domiid; IMachine *machine = NULL; ISnapshot *snap = NULL; @@ -7232,7 +7232,7 @@ vboxDomainScreenshot(virDomainPtr dom, unsigned int screen, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IConsole *console = NULL; vboxIIDUnion iid; IMachine *machine = NULL; @@ -7373,7 +7373,7 @@ vboxConnectListAllDomains(virConnectPtr conn, virDomainPtr **domains, unsigned int flags) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; char *machineNameUtf8 = NULL; PRUnichar *machineNameUtf16 = NULL; @@ -7585,7 +7585,7 @@ vboxNodeAllocPages(virConnectPtr conn ATTRIBUTE_UNUSED, static int vboxDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxArray machines = VBOX_ARRAY_INITIALIZER; vboxIIDUnion iid; char *machineNameUtf8 = NULL; @@ -7661,7 +7661,7 @@ vboxDomainSendKey(virDomainPtr dom, unsigned int flags) { int ret = -1; - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; IConsole *console = NULL; vboxIIDUnion iid; IMachine *machine = NULL; diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c index 0b944b6..ec66fab 100644 --- a/src/vbox/vbox_network.c +++ b/src/vbox/vbox_network.c @@ -46,7 +46,7 @@ static vboxUniformedAPI gVBoxAPI; static int vboxConnectNumOfNetworks(virConnectPtr conn) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray networkInterfaces = VBOX_ARRAY_INITIALIZER; IHost *host = NULL; size_t i = 0; @@ -91,7 +91,7 @@ static int vboxConnectNumOfNetworks(virConnectPtr conn) static int vboxConnectListNetworks(virConnectPtr conn, char **const names, int nnames) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray networkInterfaces = VBOX_ARRAY_INITIALIZER; IHost *host = NULL; size_t i = 0; @@ -148,7 +148,7 @@ static int vboxConnectListNetworks(virConnectPtr conn, char **const names, int n static int vboxConnectNumOfDefinedNetworks(virConnectPtr conn) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray networkInterfaces = VBOX_ARRAY_INITIALIZER; IHost *host = NULL; size_t i = 0; @@ -193,7 +193,7 @@ static int vboxConnectNumOfDefinedNetworks(virConnectPtr conn) static int vboxConnectListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxArray networkInterfaces = VBOX_ARRAY_INITIALIZER; IHost *host = NULL; size_t i = 0; @@ -250,7 +250,7 @@ static int vboxConnectListDefinedNetworks(virConnectPtr conn, char **const names static virNetworkPtr vboxNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; PRUint32 interfaceType = 0; char *nameUtf8 = NULL; PRUnichar *nameUtf16 = NULL; @@ -302,7 +302,7 @@ static virNetworkPtr vboxNetworkLookupByUUID(virConnectPtr conn, const unsigned static virNetworkPtr vboxNetworkLookupByName(virConnectPtr conn, const char *name) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; PRUnichar *nameUtf16 = NULL; IHostNetworkInterface *networkInterface = NULL; PRUint32 interfaceType = 0; @@ -350,7 +350,7 @@ static virNetworkPtr vboxNetworkLookupByName(virConnectPtr conn, const char *nam } static PRUnichar * -vboxSocketFormatAddrUtf16(vboxGlobalData *data, virSocketAddrPtr addr) +vboxSocketFormatAddrUtf16(vboxPrivate *data, virSocketAddrPtr addr) { char *utf8 = NULL; PRUnichar *utf16 = NULL; @@ -369,7 +369,7 @@ vboxSocketFormatAddrUtf16(vboxGlobalData *data, virSocketAddrPtr addr) static virNetworkPtr vboxNetworkDefineCreateXML(virConnectPtr conn, const char *xml, bool start) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; PRUnichar *networkInterfaceNameUtf16 = NULL; char *networkInterfaceNameUtf8 = NULL; PRUnichar *networkNameUtf16 = NULL; @@ -563,7 +563,7 @@ static virNetworkPtr vboxNetworkDefineXML(virConnectPtr conn, const char *xml) static int vboxNetworkUndefineDestroy(virNetworkPtr network, bool removeinterface) { - vboxGlobalData *data = network->conn->privateData; + vboxPrivate *data = network->conn->privateData; char *networkNameUtf8 = NULL; PRUnichar *networkInterfaceNameUtf16 = NULL; IHostNetworkInterface *networkInterface = NULL; @@ -668,7 +668,7 @@ static int vboxNetworkDestroy(virNetworkPtr network) static int vboxNetworkCreate(virNetworkPtr network) { - vboxGlobalData *data = network->conn->privateData; + vboxPrivate *data = network->conn->privateData; char *networkNameUtf8 = NULL; PRUnichar *networkInterfaceNameUtf16 = NULL; IHostNetworkInterface *networkInterface = NULL; @@ -739,7 +739,7 @@ static int vboxNetworkCreate(virNetworkPtr network) } static int -vboxSocketParseAddrUtf16(vboxGlobalData *data, const PRUnichar *utf16, +vboxSocketParseAddrUtf16(vboxPrivate *data, const PRUnichar *utf16, virSocketAddrPtr addr) { int result = -1; @@ -760,7 +760,7 @@ vboxSocketParseAddrUtf16(vboxGlobalData *data, const PRUnichar *utf16, static char *vboxNetworkGetXMLDesc(virNetworkPtr network, unsigned int flags) { - vboxGlobalData *data = network->conn->privateData; + vboxPrivate *data = network->conn->privateData; virNetworkDefPtr def = NULL; virNetworkIPDefPtr ipdef = NULL; char *networkNameUtf8 = NULL; diff --git a/src/vbox/vbox_storage.c b/src/vbox/vbox_storage.c index c849505..0b5d544 100644 --- a/src/vbox/vbox_storage.c +++ b/src/vbox/vbox_storage.c @@ -86,7 +86,7 @@ vboxStoragePoolLookupByName(virConnectPtr conn, const char *name) static int vboxStoragePoolNumOfVolumes(virStoragePoolPtr pool) { - vboxGlobalData *data = pool->conn->privateData; + vboxPrivate *data = pool->conn->privateData; vboxArray hardDisks = VBOX_ARRAY_INITIALIZER; PRUint32 hardDiskAccessible = 0; nsresult rc; @@ -127,7 +127,7 @@ static int vboxStoragePoolNumOfVolumes(virStoragePoolPtr pool) static int vboxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names, int nnames) { - vboxGlobalData *data = pool->conn->privateData; + vboxPrivate *data = pool->conn->privateData; vboxArray hardDisks = VBOX_ARRAY_INITIALIZER; PRUint32 numActive = 0; nsresult rc; @@ -183,7 +183,7 @@ vboxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names, int nname static virStorageVolPtr vboxStorageVolLookupByName(virStoragePoolPtr pool, const char *name) { - vboxGlobalData *data = pool->conn->privateData; + vboxPrivate *data = pool->conn->privateData; vboxArray hardDisks = VBOX_ARRAY_INITIALIZER; nsresult rc; size_t i; @@ -256,7 +256,7 @@ vboxStorageVolLookupByName(virStoragePoolPtr pool, const char *name) static virStorageVolPtr vboxStorageVolLookupByKey(virConnectPtr conn, const char *key) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; vboxIIDUnion hddIID; unsigned char uuid[VIR_UUID_BUFLEN]; IHardDisk *hardDisk = NULL; @@ -323,7 +323,7 @@ vboxStorageVolLookupByKey(virConnectPtr conn, const char *key) static virStorageVolPtr vboxStorageVolLookupByPath(virConnectPtr conn, const char *path) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; PRUnichar *hddPathUtf16 = NULL; IHardDisk *hardDisk = NULL; PRUnichar *hddNameUtf16 = NULL; @@ -401,7 +401,7 @@ static virStorageVolPtr vboxStorageVolCreateXML(virStoragePoolPtr pool, const char *xml, unsigned int flags) { - vboxGlobalData *data = pool->conn->privateData; + vboxPrivate *data = pool->conn->privateData; virStorageVolDefPtr def = NULL; PRUnichar *hddFormatUtf16 = NULL; PRUnichar *hddNameUtf16 = NULL; @@ -508,7 +508,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool, static int vboxStorageVolDelete(virStorageVolPtr vol, unsigned int flags) { - vboxGlobalData *data = vol->conn->privateData; + vboxPrivate *data = vol->conn->privateData; unsigned char uuid[VIR_UUID_BUFLEN]; IHardDisk *hardDisk = NULL; int deregister = 0; @@ -663,7 +663,7 @@ static int vboxStorageVolDelete(virStorageVolPtr vol, unsigned int flags) static int vboxStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info) { - vboxGlobalData *data = vol->conn->privateData; + vboxPrivate *data = vol->conn->privateData; IHardDisk *hardDisk = NULL; unsigned char uuid[VIR_UUID_BUFLEN]; PRUint32 hddstate; @@ -718,7 +718,7 @@ static int vboxStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info static char *vboxStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags) { - vboxGlobalData *data = vol->conn->privateData; + vboxPrivate *data = vol->conn->privateData; IHardDisk *hardDisk = NULL; unsigned char uuid[VIR_UUID_BUFLEN]; PRUnichar *hddFormatUtf16 = NULL; @@ -810,7 +810,7 @@ static char *vboxStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags) static char *vboxStorageVolGetPath(virStorageVolPtr vol) { - vboxGlobalData *data = vol->conn->privateData; + vboxPrivate *data = vol->conn->privateData; IHardDisk *hardDisk = NULL; PRUnichar *hddLocationUtf16 = NULL; char *hddLocationUtf8 = NULL; diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 23f63f9..13869eb 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -206,12 +206,12 @@ static vboxGlobalData *g_pVBoxGlobalData; * vboxDriverLock and vboxDriverUnlock only be used in code for * 3.x release. */ -static void vboxDriverLock(vboxGlobalData *data) +static void vboxDriverLock(vboxPrivate *data) { virMutexLock(&data->lock); } -static void vboxDriverUnlock(vboxGlobalData *data) +static void vboxDriverUnlock(vboxPrivate *data) { virMutexUnlock(&data->lock); } @@ -309,14 +309,14 @@ typedef struct _vboxIID_v2_x_WIN32 vboxIID_v2_x_WIN32; # define IID_MEMBER(name) (iidu->vboxIID_v2_x_WIN32.name) static void -vboxIIDUnalloc_v2_x_WIN32(vboxGlobalData *data ATTRIBUTE_UNUSED, +vboxIIDUnalloc_v2_x_WIN32(vboxPrivate *data ATTRIBUTE_UNUSED, vboxIID_v2_x_WIN32 *iid ATTRIBUTE_UNUSED) { /* Nothing to free */ } static void -_vboxIIDUnalloc(vboxGlobalData *data ATTRIBUTE_UNUSED, +_vboxIIDUnalloc(vboxPrivate *data ATTRIBUTE_UNUSED, vboxIIDUnion *iid ATTRIBUTE_UNUSED) { /* Nothing to free */ @@ -329,13 +329,13 @@ vboxIIDToUUID_v2_x_WIN32(vboxIID_v2_x_WIN32 *iid, unsigned char *uuid) } static void -_vboxIIDToUUID(vboxGlobalData *data ATTRIBUTE_UNUSED, vboxIIDUnion *iidu, unsigned char *uuid) +_vboxIIDToUUID(vboxPrivate *data ATTRIBUTE_UNUSED, vboxIIDUnion *iidu, unsigned char *uuid) { vboxIIDToUUID_v2_x_WIN32(&iidu->vboxIID_v2_x_WIN32, uuid); } static void -vboxIIDFromUUID_v2_x_WIN32(vboxGlobalData *data, vboxIID_v2_x_WIN32 *iid, +vboxIIDFromUUID_v2_x_WIN32(vboxPrivate *data, vboxIID_v2_x_WIN32 *iid, const unsigned char *uuid) { vboxIIDUnalloc_v2_x_WIN32(data, iid); @@ -344,7 +344,7 @@ vboxIIDFromUUID_v2_x_WIN32(vboxGlobalData *data, vboxIID_v2_x_WIN32 *iid, } static void -_vboxIIDFromUUID(vboxGlobalData *data, vboxIIDUnion *iidu, +_vboxIIDFromUUID(vboxPrivate *data, vboxIIDUnion *iidu, const unsigned char *uuid) { vboxIIDFromUUID_v2_x_WIN32(data, &iidu->vboxIID_v2_x_WIN32, uuid); @@ -357,13 +357,13 @@ vboxIIDIsEqual_v2_x_WIN32(vboxIID_v2_x_WIN32 *iid1, vboxIID_v2_x_WIN32 *iid2) } static bool -_vboxIIDIsEqual(vboxGlobalData *data ATTRIBUTE_UNUSED, vboxIIDUnion *iidu1, vboxIIDUnion *iidu2) +_vboxIIDIsEqual(vboxPrivate *data ATTRIBUTE_UNUSED, vboxIIDUnion *iidu1, vboxIIDUnion *iidu2) { return vboxIIDIsEqual_v2_x_WIN32(&iidu1->vboxIID_v2_x_WIN32, &iidu2->vboxIID_v2_x_WIN32); } static void -vboxIIDFromArrayItem_v2_x_WIN32(vboxGlobalData *data, vboxIID_v2_x_WIN32 *iid, +vboxIIDFromArrayItem_v2_x_WIN32(vboxPrivate *data, vboxIID_v2_x_WIN32 *iid, vboxArray *array, int idx) { GUID *items = (GUID *)array->items; @@ -374,7 +374,7 @@ vboxIIDFromArrayItem_v2_x_WIN32(vboxGlobalData *data, vboxIID_v2_x_WIN32 *iid, } static void -_vboxIIDFromArrayItem(vboxGlobalData *data, vboxIIDUnion *iidu, +_vboxIIDFromArrayItem(vboxPrivate *data, vboxIIDUnion *iidu, vboxArray *array, int idx) { vboxIIDFromArrayItem_v2_x_WIN32(data, &iidu->vboxIID_v2_x_WIN32, array, idx); @@ -397,7 +397,7 @@ typedef struct _vboxIID_v2_x vboxIID_v2_x; # define IID_MEMBER(name) (iidu->vboxIID_v2_x.name) static void -vboxIIDUnalloc_v2_x(vboxGlobalData *data, vboxIID_v2_x *iid) +vboxIIDUnalloc_v2_x(vboxPrivate *data, vboxIID_v2_x *iid) { if (iid->value == NULL) return; @@ -409,7 +409,7 @@ vboxIIDUnalloc_v2_x(vboxGlobalData *data, vboxIID_v2_x *iid) } static void -_vboxIIDUnalloc(vboxGlobalData *data, vboxIIDUnion *iidu) +_vboxIIDUnalloc(vboxPrivate *data, vboxIIDUnion *iidu) { vboxIIDUnalloc_v2_x(data, &iidu->vboxIID_v2_x); } @@ -421,14 +421,14 @@ vboxIIDToUUID_v2_x(vboxIID_v2_x *iid, unsigned char *uuid) } static void -_vboxIIDToUUID(vboxGlobalData *data ATTRIBUTE_UNUSED, +_vboxIIDToUUID(vboxPrivate *data ATTRIBUTE_UNUSED, vboxIIDUnion *iidu, unsigned char *uuid) { vboxIIDToUUID_v2_x(&iidu->vboxIID_v2_x, uuid); } static void -vboxIIDFromUUID_v2_x(vboxGlobalData *data, vboxIID_v2_x *iid, +vboxIIDFromUUID_v2_x(vboxPrivate *data, vboxIID_v2_x *iid, const unsigned char *uuid) { vboxIIDUnalloc_v2_x(data, iid); @@ -440,7 +440,7 @@ vboxIIDFromUUID_v2_x(vboxGlobalData *data, vboxIID_v2_x *iid, } static void -_vboxIIDFromUUID(vboxGlobalData *data, vboxIIDUnion *iidu, +_vboxIIDFromUUID(vboxPrivate *data, vboxIIDUnion *iidu, const unsigned char *uuid) { vboxIIDFromUUID_v2_x(data, &iidu->vboxIID_v2_x, uuid); @@ -453,14 +453,14 @@ vboxIIDIsEqual_v2_x(vboxIID_v2_x *iid1, vboxIID_v2_x *iid2) } static bool -_vboxIIDIsEqual(vboxGlobalData *data ATTRIBUTE_UNUSED, +_vboxIIDIsEqual(vboxPrivate *data ATTRIBUTE_UNUSED, vboxIIDUnion *iidu1, vboxIIDUnion *iidu2) { return vboxIIDIsEqual_v2_x(&iidu1->vboxIID_v2_x, &iidu2->vboxIID_v2_x); } static void -vboxIIDFromArrayItem_v2_x(vboxGlobalData *data, vboxIID_v2_x *iid, +vboxIIDFromArrayItem_v2_x(vboxPrivate *data, vboxIID_v2_x *iid, vboxArray *array, int idx) { vboxIIDUnalloc_v2_x(data, iid); @@ -471,7 +471,7 @@ vboxIIDFromArrayItem_v2_x(vboxGlobalData *data, vboxIID_v2_x *iid, } static void -_vboxIIDFromArrayItem(vboxGlobalData *data, vboxIIDUnion *iidu, +_vboxIIDFromArrayItem(vboxPrivate *data, vboxIIDUnion *iidu, vboxArray *array, int idx) { vboxIIDFromArrayItem_v2_x(data, &iidu->vboxIID_v2_x, array, idx); @@ -496,7 +496,7 @@ typedef struct _vboxIID_v3_x vboxIID_v3_x; # define IID_MEMBER(name) (iidu->vboxIID_v3_x.name) static void -vboxIIDUnalloc_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid) +vboxIIDUnalloc_v3_x(vboxPrivate *data, vboxIID_v3_x *iid) { if (iid->value != NULL && iid->owner) data->pFuncs->pfnUtf16Free(iid->value); @@ -506,13 +506,13 @@ vboxIIDUnalloc_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid) } static void -_vboxIIDUnalloc(vboxGlobalData *data, vboxIIDUnion *iidu) +_vboxIIDUnalloc(vboxPrivate *data, vboxIIDUnion *iidu) { vboxIIDUnalloc_v3_x(data, &iidu->vboxIID_v3_x); } static void -vboxIIDToUUID_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid, +vboxIIDToUUID_v3_x(vboxPrivate *data, vboxIID_v3_x *iid, unsigned char *uuid) { char *utf8 = NULL; @@ -525,14 +525,14 @@ vboxIIDToUUID_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid, } static void -_vboxIIDToUUID(vboxGlobalData *data, vboxIIDUnion *iidu, +_vboxIIDToUUID(vboxPrivate *data, vboxIIDUnion *iidu, unsigned char *uuid) { vboxIIDToUUID_v3_x(data, &iidu->vboxIID_v3_x, uuid); } static void -vboxIIDFromUUID_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid, +vboxIIDFromUUID_v3_x(vboxPrivate *data, vboxIID_v3_x *iid, const unsigned char *uuid) { char utf8[VIR_UUID_STRING_BUFLEN]; @@ -545,14 +545,14 @@ vboxIIDFromUUID_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid, } static void -_vboxIIDFromUUID(vboxGlobalData *data, vboxIIDUnion *iidu, +_vboxIIDFromUUID(vboxPrivate *data, vboxIIDUnion *iidu, const unsigned char *uuid) { vboxIIDFromUUID_v3_x(data, &iidu->vboxIID_v3_x, uuid); } static bool -vboxIIDIsEqual_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid1, +vboxIIDIsEqual_v3_x(vboxPrivate *data, vboxIID_v3_x *iid1, vboxIID_v3_x *iid2) { unsigned char uuid1[VIR_UUID_BUFLEN]; @@ -570,14 +570,14 @@ vboxIIDIsEqual_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid1, } static bool -_vboxIIDIsEqual(vboxGlobalData *data, vboxIIDUnion *iidu1, +_vboxIIDIsEqual(vboxPrivate *data, vboxIIDUnion *iidu1, vboxIIDUnion *iidu2) { return vboxIIDIsEqual_v3_x(data, &iidu1->vboxIID_v3_x, &iidu2->vboxIID_v3_x); } static void -vboxIIDFromArrayItem_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid, +vboxIIDFromArrayItem_v3_x(vboxPrivate *data, vboxIID_v3_x *iid, vboxArray *array, int idx) { vboxIIDUnalloc_v3_x(data, iid); @@ -587,7 +587,7 @@ vboxIIDFromArrayItem_v3_x(vboxGlobalData *data, vboxIID_v3_x *iid, } static void -_vboxIIDFromArrayItem(vboxGlobalData *data, vboxIIDUnion *iidu, +_vboxIIDFromArrayItem(vboxPrivate *data, vboxIIDUnion *iidu, vboxArray *array, int idx) { vboxIIDFromArrayItem_v3_x(data, &iidu->vboxIID_v3_x, array, idx); @@ -791,7 +791,7 @@ static virDomainState _vboxConvertState(PRUint32 state) #if VBOX_API_VERSION < 3001000 static void -_vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +_vboxAttachDrivesOld(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { size_t i; nsresult rc; @@ -1037,7 +1037,7 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin #elif VBOX_API_VERSION < 4000000 static void -_vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) +_vboxAttachDrivesOld(virDomainDefPtr def, vboxPrivate *data, IMachine *machine) { size_t i; nsresult rc = 0; @@ -1264,7 +1264,7 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin static void _vboxAttachDrivesOld(virDomainDefPtr def ATTRIBUTE_UNUSED, - vboxGlobalData *data ATTRIBUTE_UNUSED, + vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine ATTRIBUTE_UNUSED) { vboxUnsupported(); @@ -1278,7 +1278,7 @@ _vboxDomainSnapshotRestore(virDomainPtr dom, IMachine *machine, ISnapshot *snapshot) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; vboxIID iid = VBOX_IID_INITIALIZER; nsresult rc; int ret = -1; @@ -1312,7 +1312,7 @@ _vboxDomainSnapshotRestore(virDomainPtr dom, IMachine *machine, ISnapshot *snapshot) { - vboxGlobalData *data = dom->conn->privateData; + vboxPrivate *data = dom->conn->privateData; # if VBOX_API_VERSION < 5000000 IConsole *console = NULL; # endif /*VBOX_API_VERSION < 5000000*/ @@ -1422,7 +1422,7 @@ vboxCallbackOnMachineStateChange(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED, int event = 0; int detail = 0; - vboxDriverLock(g_pVBoxGlobalData); + vboxDriverLock((vboxPrivate *) g_pVBoxGlobalData); VIR_DEBUG("IVirtualBoxCallback: %p, State: %d", pThis, state); DEBUGPRUnichar("machineId", machineId); @@ -1474,7 +1474,7 @@ vboxCallbackOnMachineStateChange(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED, } } - vboxDriverUnlock(g_pVBoxGlobalData); + vboxDriverUnlock((vboxPrivate *) g_pVBoxGlobalData); return NS_OK; } @@ -1541,7 +1541,7 @@ vboxCallbackOnMachineRegistered(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED, int event = 0; int detail = 0; - vboxDriverLock(g_pVBoxGlobalData); + vboxDriverLock((vboxPrivate *) g_pVBoxGlobalData); VIR_DEBUG("IVirtualBoxCallback: %p, registered: %s", pThis, registered ? "true" : "false"); DEBUGPRUnichar("machineId", machineId); @@ -1578,7 +1578,7 @@ vboxCallbackOnMachineRegistered(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED, } } - vboxDriverUnlock(g_pVBoxGlobalData); + vboxDriverUnlock((vboxPrivate *) g_pVBoxGlobalData); return NS_OK; } @@ -1762,7 +1762,7 @@ vboxConnectDomainEventRegister(virConnectPtr conn, void *opaque, virFreeCallback freecb) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; int vboxRet = -1; nsresult rc; int ret = -1; @@ -1827,7 +1827,7 @@ static int vboxConnectDomainEventDeregister(virConnectPtr conn, virConnectDomainEventCallback callback) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; int cnt; int ret = -1; @@ -1866,7 +1866,7 @@ static int vboxConnectDomainEventRegisterAny(virConnectPtr conn, void *opaque, virFreeCallback freecb) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; int vboxRet = -1; nsresult rc; int ret = -1; @@ -1933,7 +1933,7 @@ static int vboxConnectDomainEventDeregisterAny(virConnectPtr conn, int callbackID) { - vboxGlobalData *data = conn->privateData; + vboxPrivate *data = conn->privateData; int cnt; int ret = -1; @@ -1976,7 +1976,7 @@ _registerDomainEvent(virHypervisorDriverPtr driver) #endif /* !(VBOX_API_VERSION == 2002000 || VBOX_API_VERSION >= 4000000) */ -static int _pfnInitialize(vboxGlobalData *data) +static int _pfnInitialize(vboxPrivate *data) { data->pFuncs = g_pfnGetFunctions(VBOX_XPCOMC_VERSION); if (data->pFuncs == NULL) @@ -1990,7 +1990,7 @@ static int _pfnInitialize(vboxGlobalData *data) } static int -_initializeDomainEvent(vboxGlobalData *data ATTRIBUTE_UNUSED) +_initializeDomainEvent(vboxPrivate *data ATTRIBUTE_UNUSED) { #if VBOX_API_VERSION <= 2002000 || VBOX_API_VERSION >= 4000000 /* No event queue functionality in 2.2.* and 4.* as of now */ @@ -2009,12 +2009,12 @@ _initializeDomainEvent(vboxGlobalData *data ATTRIBUTE_UNUSED) } static -void _registerGlobalData(vboxGlobalData *data ATTRIBUTE_UNUSED) +void _registerGlobalData(vboxPrivate *data ATTRIBUTE_UNUSED) { #if VBOX_API_VERSION == 2002000 vboxUnsupported(); #else /* VBOX_API_VERSION != 2002000 */ - g_pVBoxGlobalData = data; + g_pVBoxGlobalData = (vboxGlobalData *) data; #endif /* VBOX_API_VERSION != 2002000 */ } @@ -2022,7 +2022,7 @@ void _registerGlobalData(vboxGlobalData *data ATTRIBUTE_UNUSED) # if VBOX_API_VERSION < 3001000 static void -_detachDevices(vboxGlobalData *data ATTRIBUTE_UNUSED, +_detachDevices(vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine, PRUnichar *hddcnameUtf16) { /* Disconnect all the drives if present */ @@ -2032,7 +2032,7 @@ _detachDevices(vboxGlobalData *data ATTRIBUTE_UNUSED, } # else /* VBOX_API_VERSION >= 3001000 */ static void -_detachDevices(vboxGlobalData *data, IMachine *machine, +_detachDevices(vboxPrivate *data, IMachine *machine, PRUnichar *hddcnameUtf16 ATTRIBUTE_UNUSED) { /* get all the controller first, then the attachments and @@ -2084,7 +2084,7 @@ _detachDevices(vboxGlobalData *data, IMachine *machine, # endif /* VBOX_API_VERSION >= 3001000 */ static nsresult -_unregisterMachine(vboxGlobalData *data, vboxIIDUnion *iidu, IMachine **machine) +_unregisterMachine(vboxPrivate *data, vboxIIDUnion *iidu, IMachine **machine) { return data->vboxObj->vtbl->UnregisterMachine(data->vboxObj, IID_MEMBER(value), machine); } @@ -2098,7 +2098,7 @@ _deleteConfig(IMachine *machine) #else /* VBOX_API_VERSION >= 4000000 */ static void -_detachDevices(vboxGlobalData *data ATTRIBUTE_UNUSED, +_detachDevices(vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine ATTRIBUTE_UNUSED, PRUnichar *hddcnameUtf16 ATTRIBUTE_UNUSED) { @@ -2106,7 +2106,7 @@ _detachDevices(vboxGlobalData *data ATTRIBUTE_UNUSED, } static nsresult -_unregisterMachine(vboxGlobalData *data, vboxIIDUnion *iidu, IMachine **machine) +_unregisterMachine(vboxPrivate *data, vboxIIDUnion *iidu, IMachine **machine) { nsresult rc; vboxArray media = VBOX_ARRAY_INITIALIZER; @@ -2170,7 +2170,7 @@ _deleteConfig(IMachine *machine) static void _dumpIDEHDDsOld(virDomainDefPtr def, - vboxGlobalData *data, + vboxPrivate *data, IMachine *machine) { PRInt32 hddNum = 0; @@ -2279,7 +2279,7 @@ _dumpIDEHDDsOld(virDomainDefPtr def, static void _dumpDVD(virDomainDefPtr def, - vboxGlobalData *data, + vboxPrivate *data, IMachine *machine) { IDVDDrive *dvdDrive = NULL; @@ -2334,7 +2334,7 @@ _dumpDVD(virDomainDefPtr def, } static int -_attachDVD(vboxGlobalData *data, IMachine *machine, const char *src) +_attachDVD(vboxPrivate *data, IMachine *machine, const char *src) { IDVDDrive *dvdDrive = NULL; IDVDImage *dvdImage = NULL; @@ -2418,7 +2418,7 @@ _detachDVD(IMachine *machine) static void _dumpFloppy(virDomainDefPtr def, - vboxGlobalData *data, + vboxPrivate *data, IMachine *machine) { IFloppyDrive *floppyDrive = NULL; @@ -2476,7 +2476,7 @@ _dumpFloppy(virDomainDefPtr def, } static int -_attachFloppy(vboxGlobalData *data, IMachine *machine, const char *src) +_attachFloppy(vboxPrivate *data, IMachine *machine, const char *src) { IFloppyDrive *floppyDrive; IFloppyImage *floppyImage = NULL; @@ -2573,7 +2573,7 @@ _detachFloppy(IMachine *machine) static void _dumpIDEHDDsOld(virDomainDefPtr def ATTRIBUTE_UNUSED, - vboxGlobalData *data ATTRIBUTE_UNUSED, + vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine ATTRIBUTE_UNUSED) { vboxUnsupported(); @@ -2581,14 +2581,14 @@ _dumpIDEHDDsOld(virDomainDefPtr def ATTRIBUTE_UNUSED, static void _dumpDVD(virDomainDefPtr def ATTRIBUTE_UNUSED, - vboxGlobalData *data ATTRIBUTE_UNUSED, + vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine ATTRIBUTE_UNUSED) { vboxUnsupported(); } static int -_attachDVD(vboxGlobalData *data ATTRIBUTE_UNUSED, +_attachDVD(vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine ATTRIBUTE_UNUSED, const char *src ATTRIBUTE_UNUSED) { @@ -2605,14 +2605,14 @@ _detachDVD(IMachine *machine ATTRIBUTE_UNUSED) static void _dumpFloppy(virDomainDefPtr def ATTRIBUTE_UNUSED, - vboxGlobalData *data ATTRIBUTE_UNUSED, + vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine ATTRIBUTE_UNUSED) { vboxUnsupported(); } static int -_attachFloppy(vboxGlobalData *data ATTRIBUTE_UNUSED, +_attachFloppy(vboxPrivate *data ATTRIBUTE_UNUSED, IMachine *machine ATTRIBUTE_UNUSED, const char *src ATTRIBUTE_UNUSED) { @@ -2629,7 +2629,7 @@ _detachFloppy(IMachine *machine ATTRIBUTE_UNUSED) #endif /* VBOX_API_VERSION >= 3001000 */ -static void _pfnUninitialize(vboxGlobalData *data) +static void _pfnUninitialize(vboxPrivate *data) { if (data->pFuncs) data->pFuncs->pfnComUninitialize(); @@ -2692,7 +2692,7 @@ static void _DEBUGIID(const char *msg, vboxIIDUnion *iidu) #endif /* VBOX_API_VERSION != 2002000 */ static void -_vboxIIDToUtf8(vboxGlobalData *data ATTRIBUTE_UNUSED, +_vboxIIDToUtf8(vboxPrivate *data ATTRIBUTE_UNUSED, vboxIIDUnion *iidu ATTRIBUTE_UNUSED, char **utf8 ATTRIBUTE_UNUSED) { @@ -2821,7 +2821,7 @@ _virtualboxGetHost(IVirtualBox *vboxObj, IHost **host) } static nsresult -_virtualboxCreateMachine(vboxGlobalData *data, virDomainDefPtr def, IMachine **machine, char *uuidstr ATTRIBUTE_UNUSED) +_virtualboxCreateMachine(vboxPrivate *data, virDomainDefPtr def, IMachine **machine, char *uuidstr ATTRIBUTE_UNUSED) { vboxIID iid = VBOX_IID_INITIALIZER; PRUnichar *machineNameUtf16 = NULL; @@ -3031,7 +3031,7 @@ _machineRemoveSharedFolder(IMachine *machine, PRUnichar *name) } static nsresult -_machineLaunchVMProcess(vboxGlobalData *data, +_machineLaunchVMProcess(vboxPrivate *data, IMachine *machine ATTRIBUTE_UNUSED, vboxIIDUnion *iidu ATTRIBUTE_UNUSED, PRUnichar *sessionType, PRUnichar *env, @@ -3329,13 +3329,13 @@ _machineSaveSettings(IMachine *machine) #if VBOX_API_VERSION < 4000000 static nsresult -_sessionOpen(vboxGlobalData *data, vboxIIDUnion *iidu, IMachine *machine ATTRIBUTE_UNUSED) +_sessionOpen(vboxPrivate *data, vboxIIDUnion *iidu, IMachine *machine ATTRIBUTE_UNUSED) { return data->vboxObj->vtbl->OpenSession(data->vboxObj, data->vboxSession, IID_MEMBER(value)); } static nsresult -_sessionOpenExisting(vboxGlobalData *data, vboxIIDUnion *iidu, IMachine *machine ATTRIBUTE_UNUSED) +_sessionOpenExisting(vboxPrivate *data, vboxIIDUnion *iidu, IMachine *machine ATTRIBUTE_UNUSED) { return data->vboxObj->vtbl->OpenExistingSession(data->vboxObj, data->vboxSession, IID_MEMBER(value)); } @@ -3349,13 +3349,13 @@ _sessionClose(ISession *session) #else /* VBOX_API_VERSION >= 4000000 */ static nsresult -_sessionOpen(vboxGlobalData *data, vboxIIDUnion *iidu ATTRIBUTE_UNUSED, IMachine *machine) +_sessionOpen(vboxPrivate *data, vboxIIDUnion *iidu ATTRIBUTE_UNUSED, IMachine *machine) { return machine->vtbl->LockMachine(machine, data->vboxSession, LockType_Write); } static nsresult -_sessionOpenExisting(vboxGlobalData *data, vboxIIDUnion *iidu ATTRIBUTE_UNUSED, IMachine *machine) +_sessionOpenExisting(vboxPrivate *data, vboxIIDUnion *iidu ATTRIBUTE_UNUSED, IMachine *machine) { return machine->vtbl->LockMachine(machine, data->vboxSession, LockType_Shared); } @@ -3930,7 +3930,7 @@ _vrdxServerSetEnabled(IVRDxServer *VRDxServer, PRBool enabled) } static nsresult -_vrdxServerGetPorts(vboxGlobalData *data ATTRIBUTE_UNUSED, +_vrdxServerGetPorts(vboxPrivate *data ATTRIBUTE_UNUSED, IVRDxServer *VRDxServer, virDomainGraphicsDefPtr graphics) { nsresult rc; @@ -3970,7 +3970,7 @@ _vrdxServerGetPorts(vboxGlobalData *data ATTRIBUTE_UNUSED, } static nsresult -_vrdxServerSetPorts(vboxGlobalData *data ATTRIBUTE_UNUSED, +_vrdxServerSetPorts(vboxPrivate *data ATTRIBUTE_UNUSED, IVRDxServer *VRDxServer, virDomainGraphicsDefPtr graphics) { nsresult rc = 0; @@ -4030,7 +4030,7 @@ _vrdxServerSetAllowMultiConnection(IVRDxServer *VRDxServer, PRBool enabled) } static nsresult -_vrdxServerGetNetAddress(vboxGlobalData *data ATTRIBUTE_UNUSED, +_vrdxServerGetNetAddress(vboxPrivate *data ATTRIBUTE_UNUSED, IVRDxServer *VRDxServer, PRUnichar **netAddress) { #if VBOX_API_VERSION >= 4000000 @@ -4046,7 +4046,7 @@ _vrdxServerGetNetAddress(vboxGlobalData *data ATTRIBUTE_UNUSED, } static nsresult -_vrdxServerSetNetAddress(vboxGlobalData *data ATTRIBUTE_UNUSED, +_vrdxServerSetNetAddress(vboxPrivate *data ATTRIBUTE_UNUSED, IVRDxServer *VRDxServer, PRUnichar *netAddress) { #if VBOX_API_VERSION < 4000000 @@ -4456,7 +4456,7 @@ _hostFindHostNetworkInterfaceByName(IHost *host, PRUnichar *name, } static nsresult -_hostCreateHostOnlyNetworkInterface(vboxGlobalData *data ATTRIBUTE_UNUSED, +_hostCreateHostOnlyNetworkInterface(vboxPrivate *data ATTRIBUTE_UNUSED, IHost *host, char *name ATTRIBUTE_UNUSED, IHostNetworkInterface **networkInterface) { diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index 6ec5245..50041c0 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -172,8 +172,8 @@ typedef struct { /* Functions for pFuncs */ typedef struct { - int (*Initialize)(vboxGlobalData *data); - void (*Uninitialize)(vboxGlobalData *data); + int (*Initialize)(vboxPrivate *data); + void (*Uninitialize)(vboxPrivate *data); void (*ComUnallocMem)(PCVBOXXPCOM pFuncs, void *pv); void (*Utf16Free)(PCVBOXXPCOM pFuncs, PRUnichar *pwszString); void (*Utf8Free)(PCVBOXXPCOM pFuncs, char *pszString); @@ -184,12 +184,12 @@ typedef struct { /* Functions for vboxIID */ typedef struct { void (*vboxIIDInitialize)(vboxIIDUnion *iidu); - void (*vboxIIDUnalloc)(vboxGlobalData *data, vboxIIDUnion *iidu); - void (*vboxIIDToUUID)(vboxGlobalData *data, vboxIIDUnion *iidu, unsigned char *uuid); - void (*vboxIIDFromUUID)(vboxGlobalData *data, vboxIIDUnion *iidu, const unsigned char *uuid); - bool (*vboxIIDIsEqual)(vboxGlobalData *data, vboxIIDUnion *iidu1, vboxIIDUnion *iidu2); - void (*vboxIIDFromArrayItem)(vboxGlobalData *data, vboxIIDUnion *iidu, vboxArray *array, int idx); - void (*vboxIIDToUtf8)(vboxGlobalData *data, vboxIIDUnion *iidu, char **utf8); + void (*vboxIIDUnalloc)(vboxPrivate *data, vboxIIDUnion *iidu); + void (*vboxIIDToUUID)(vboxPrivate *data, vboxIIDUnion *iidu, unsigned char *uuid); + void (*vboxIIDFromUUID)(vboxPrivate *data, vboxIIDUnion *iidu, const unsigned char *uuid); + bool (*vboxIIDIsEqual)(vboxPrivate *data, vboxIIDUnion *iidu1, vboxIIDUnion *iidu2); + void (*vboxIIDFromArrayItem)(vboxPrivate *data, vboxIIDUnion *iidu, vboxArray *array, int idx); + void (*vboxIIDToUtf8)(vboxPrivate *data, vboxIIDUnion *iidu, char **utf8); void (*DEBUGIID)(const char *msg, vboxIIDUnion *iidu); } vboxUniformedIID; @@ -225,7 +225,7 @@ typedef struct { nsresult (*OpenMachine)(IVirtualBox *vboxObj, PRUnichar *settingsFile, IMachine **machine); nsresult (*GetSystemProperties)(IVirtualBox *vboxObj, ISystemProperties **systemProperties); nsresult (*GetHost)(IVirtualBox *vboxObj, IHost **host); - nsresult (*CreateMachine)(vboxGlobalData *data, virDomainDefPtr def, IMachine **machine, char *uuidstr); + nsresult (*CreateMachine)(vboxPrivate *data, virDomainDefPtr def, IMachine **machine, char *uuidstr); nsresult (*CreateHardDisk)(IVirtualBox *vboxObj, PRUnichar *format, PRUnichar *location, IHardDisk **hardDisk); nsresult (*RegisterMachine)(IVirtualBox *vboxObj, IMachine *machine); nsresult (*FindHardDisk)(IVirtualBox *vboxObj, PRUnichar *location, PRUint32 deviceType, @@ -250,7 +250,7 @@ typedef struct { PRUnichar *hostPath, PRBool writable, PRBool automount); nsresult (*RemoveSharedFolder)(IMachine *machine, PRUnichar *name); - nsresult (*LaunchVMProcess)(vboxGlobalData *data, IMachine *machine, + nsresult (*LaunchVMProcess)(vboxPrivate *data, IMachine *machine, vboxIIDUnion *iidu, PRUnichar *sessionType, PRUnichar *env, IProgress **progress); @@ -297,8 +297,8 @@ typedef struct { /* Functions for ISession */ typedef struct { - nsresult (*Open)(vboxGlobalData *data, vboxIIDUnion *iidu, IMachine *machine); - nsresult (*OpenExisting)(vboxGlobalData *data, vboxIIDUnion *iidu, IMachine *machine); + nsresult (*Open)(vboxPrivate *data, vboxIIDUnion *iidu, IMachine *machine); + nsresult (*OpenExisting)(vboxPrivate *data, vboxIIDUnion *iidu, IMachine *machine); nsresult (*GetConsole)(ISession *session, IConsole **console); nsresult (*GetMachine)(ISession *session, IMachine **machine); nsresult (*Close)(ISession *session); @@ -408,17 +408,17 @@ typedef struct { typedef struct { nsresult (*GetEnabled)(IVRDxServer *VRDxServer, PRBool *enabled); nsresult (*SetEnabled)(IVRDxServer *VRDxServer, PRBool enabled); - nsresult (*GetPorts)(vboxGlobalData *data, IVRDxServer *VRDxServer, + nsresult (*GetPorts)(vboxPrivate *data, IVRDxServer *VRDxServer, virDomainGraphicsDefPtr graphics); - nsresult (*SetPorts)(vboxGlobalData *data, IVRDxServer *VRDxServer, + nsresult (*SetPorts)(vboxPrivate *data, IVRDxServer *VRDxServer, virDomainGraphicsDefPtr graphics); nsresult (*GetReuseSingleConnection)(IVRDxServer *VRDxServer, PRBool *enabled); nsresult (*SetReuseSingleConnection)(IVRDxServer *VRDxServer, PRBool enabled); nsresult (*GetAllowMultiConnection)(IVRDxServer *VRDxServer, PRBool *enabled); nsresult (*SetAllowMultiConnection)(IVRDxServer *VRDxServer, PRBool enabled); - nsresult (*GetNetAddress)(vboxGlobalData *data, IVRDxServer *VRDxServer, + nsresult (*GetNetAddress)(vboxPrivate *data, IVRDxServer *VRDxServer, PRUnichar **netAddress); - nsresult (*SetNetAddress)(vboxGlobalData *data, IVRDxServer *VRDxServer, + nsresult (*SetNetAddress)(vboxPrivate *data, IVRDxServer *VRDxServer, PRUnichar *netAddress); } vboxUniformedIVRDxServer; @@ -516,7 +516,7 @@ typedef struct { IHostNetworkInterface **networkInterface); nsresult (*FindHostNetworkInterfaceByName)(IHost *host, PRUnichar *name, IHostNetworkInterface **networkInterface); - nsresult (*CreateHostOnlyNetworkInterface)(vboxGlobalData *data, + nsresult (*CreateHostOnlyNetworkInterface)(vboxPrivate *data, IHost *host, char *name, IHostNetworkInterface **networkInterface); nsresult (*RemoveHostOnlyNetworkInterface)(IHost *host, vboxIIDUnion *iidu, @@ -584,19 +584,19 @@ typedef struct { uint32_t APIVersion; uint32_t XPCOMCVersion; /* vbox APIs */ - int (*initializeDomainEvent)(vboxGlobalData *data); - void (*registerGlobalData)(vboxGlobalData *data); - void (*detachDevices)(vboxGlobalData *data, IMachine *machine, PRUnichar *hddcnameUtf16); - nsresult (*unregisterMachine)(vboxGlobalData *data, vboxIIDUnion *iidu, IMachine **machine); + int (*initializeDomainEvent)(vboxPrivate *data); + void (*registerGlobalData)(vboxPrivate *data); + void (*detachDevices)(vboxPrivate *data, IMachine *machine, PRUnichar *hddcnameUtf16); + nsresult (*unregisterMachine)(vboxPrivate *data, vboxIIDUnion *iidu, IMachine **machine); void (*deleteConfig)(IMachine *machine); - void (*vboxAttachDrivesOld)(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine); + void (*vboxAttachDrivesOld)(virDomainDefPtr def, vboxPrivate *data, IMachine *machine); virDomainState (*vboxConvertState)(PRUint32 state); - void (*dumpIDEHDDsOld)(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine); - void (*dumpDVD)(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine); - int (*attachDVD)(vboxGlobalData *data, IMachine *machine, const char *src); + void (*dumpIDEHDDsOld)(virDomainDefPtr def, vboxPrivate *data, IMachine *machine); + void (*dumpDVD)(virDomainDefPtr def, vboxPrivate *data, IMachine *machine); + int (*attachDVD)(vboxPrivate *data, IMachine *machine, const char *src); int (*detachDVD)(IMachine *machine); - void (*dumpFloppy)(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine); - int (*attachFloppy)(vboxGlobalData *data, IMachine *machine, const char *src); + void (*dumpFloppy)(virDomainDefPtr def, vboxPrivate *data, IMachine *machine); + int (*attachFloppy)(vboxPrivate *data, IMachine *machine, const char *src); int (*detachFloppy)(IMachine *machine); int (*snapshotRestore)(virDomainPtr dom, IMachine *machine, ISnapshot *snapshot); void (*registerDomainEvent)(virHypervisorDriverPtr driver); -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list