[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 39/66] vbox: Add API for vboxDomainGetXMLDesc



---
 src/vbox/vbox_common.h        |    2 +
 src/vbox/vbox_tmpl.c          |  718 +++++++++++++++++++++++++++++++++++++++++
 src/vbox/vbox_uniformed_api.h |   73 +++++
 3 files changed, 793 insertions(+)

diff --git a/src/vbox/vbox_common.h b/src/vbox/vbox_common.h
index eedd755..c4e7ae5 100644
--- a/src/vbox/vbox_common.h
+++ b/src/vbox/vbox_common.h
@@ -257,6 +257,8 @@ typedef nsISupports IVRDxServer;
 typedef nsISupports IUSBCommon;
 typedef nsISupports IUSBDeviceFilter;
 typedef nsISupports IMedium;
+typedef nsISupports IMediumAttachment;
 typedef nsISupports IStorageController;
+typedef nsISupports ISharedFolder;
 
 #endif /* VBOX_COMMON_H */
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 8abb9a7..803b0cc 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -102,6 +102,10 @@ typedef IUSBController IUSBCommon;
 typedef IUSBDeviceFilters IUSBCommon;
 #endif /* VBOX_API_VERSION >= 4003000 */
 
+#if VBOX_API_VERSION < 3001000
+typedef IHardDiskAttachment IMediumAttachment;
+#endif /* VBOX_API_VERSION < 3001000 */
+
 #include "vbox_uniformed_api.h"
 
 #define VIR_FROM_THIS                   VIR_FROM_VBOX
@@ -8982,6 +8986,260 @@ _deleteConfig(IMachine *machine)
 
 #endif /* VBOX_API_VERSION >= 4000000 */
 
+#if VBOX_API_VERSION < 3001000
+
+static void
+_dumpIDEHDDsOld(virDomainDefPtr def,
+                vboxGlobalData *data,
+                IMachine *machine)
+{
+    PRInt32       hddNum                = 0;
+    IHardDisk    *hardDiskPM            = NULL;
+    IHardDisk    *hardDiskPS            = NULL;
+    IHardDisk    *hardDiskSS            = NULL;
+    const char   *hddBus                = "IDE";
+    PRUnichar    *hddBusUtf16           = NULL;
+
+    /* dump IDE hdds if present */
+    VBOX_UTF8_TO_UTF16(hddBus, &hddBusUtf16);
+
+    def->ndisks = 0;
+    machine->vtbl->GetHardDisk(machine, hddBusUtf16, 0, 0,  &hardDiskPM);
+    if (hardDiskPM)
+        def->ndisks++;
+
+    machine->vtbl->GetHardDisk(machine, hddBusUtf16, 0, 1,  &hardDiskPS);
+    if (hardDiskPS)
+        def->ndisks++;
+
+    machine->vtbl->GetHardDisk(machine, hddBusUtf16, 1, 1,  &hardDiskSS);
+    if (hardDiskSS)
+        def->ndisks++;
+
+    VBOX_UTF16_FREE(hddBusUtf16);
+
+    if ((def->ndisks > 0) && (VIR_ALLOC_N(def->disks, def->ndisks) >= 0)) {
+        size_t i;
+        for (i = 0; i < def->ndisks; i++) {
+            if ((def->disks[i] = virDomainDiskDefNew())) {
+                def->disks[i]->device = VIR_DOMAIN_DISK_DEVICE_DISK;
+                def->disks[i]->bus = VIR_DOMAIN_DISK_BUS_IDE;
+                virDomainDiskSetType(def->disks[i],
+                                     VIR_STORAGE_TYPE_FILE);
+            }
+        }
+    }
+
+    if (hardDiskPM) {
+        PRUnichar *hddlocationUtf16 = NULL;
+        char *hddlocation           = NULL;
+        PRUint32 hddType            = HardDiskType_Normal;
+
+        hardDiskPM->vtbl->imedium.GetLocation((IMedium *)hardDiskPM, &hddlocationUtf16);
+        VBOX_UTF16_TO_UTF8(hddlocationUtf16, &hddlocation);
+
+        hardDiskPM->vtbl->GetType(hardDiskPM, &hddType);
+
+        if (hddType == HardDiskType_Immutable)
+            def->disks[hddNum]->src->readonly = true;
+        ignore_value(virDomainDiskSetSource(def->disks[hddNum],
+                                            hddlocation));
+        ignore_value(VIR_STRDUP(def->disks[hddNum]->dst, "hda"));
+        hddNum++;
+
+        VBOX_UTF8_FREE(hddlocation);
+        VBOX_UTF16_FREE(hddlocationUtf16);
+        VBOX_MEDIUM_RELEASE(hardDiskPM);
+    }
+
+    if (hardDiskPS) {
+        PRUnichar *hddlocationUtf16 = NULL;
+        char *hddlocation           = NULL;
+        PRUint32 hddType            = HardDiskType_Normal;
+
+        hardDiskPS->vtbl->imedium.GetLocation((IMedium *)hardDiskPS, &hddlocationUtf16);
+        VBOX_UTF16_TO_UTF8(hddlocationUtf16, &hddlocation);
+
+        hardDiskPS->vtbl->GetType(hardDiskPS, &hddType);
+
+        if (hddType == HardDiskType_Immutable)
+            def->disks[hddNum]->src->readonly = true;
+        ignore_value(virDomainDiskSetSource(def->disks[hddNum],
+                                            hddlocation));
+        ignore_value(VIR_STRDUP(def->disks[hddNum]->dst, "hdb"));
+        hddNum++;
+
+        VBOX_UTF8_FREE(hddlocation);
+        VBOX_UTF16_FREE(hddlocationUtf16);
+        VBOX_MEDIUM_RELEASE(hardDiskPS);
+    }
+
+    if (hardDiskSS) {
+        PRUnichar *hddlocationUtf16 = NULL;
+        char *hddlocation           = NULL;
+        PRUint32 hddType            = HardDiskType_Normal;
+
+        hardDiskSS->vtbl->imedium.GetLocation((IMedium *)hardDiskSS, &hddlocationUtf16);
+        VBOX_UTF16_TO_UTF8(hddlocationUtf16, &hddlocation);
+
+        hardDiskSS->vtbl->GetType(hardDiskSS, &hddType);
+
+        if (hddType == HardDiskType_Immutable)
+            def->disks[hddNum]->src->readonly = true;
+        ignore_value(virDomainDiskSetSource(def->disks[hddNum],
+                                            hddlocation));
+        ignore_value(VIR_STRDUP(def->disks[hddNum]->dst, "hdd"));
+        hddNum++;
+
+        VBOX_UTF8_FREE(hddlocation);
+        VBOX_UTF16_FREE(hddlocationUtf16);
+        VBOX_MEDIUM_RELEASE(hardDiskSS);
+    }
+}
+
+static void
+_dumpDVD(virDomainDefPtr def,
+         vboxGlobalData *data,
+         IMachine *machine)
+{
+    IDVDDrive *dvdDrive      = NULL;
+    IDVDImage *dvdImage      = NULL;
+    PRUnichar *locationUtf16 = NULL;
+    char *location           = NULL;
+
+
+    /* dump CDROM/DVD if the drive is attached and has DVD/CD in it */
+    machine->vtbl->GetDVDDrive(machine, &dvdDrive);
+    if (!dvdDrive)
+        return;
+
+    PRUint32 state = DriveState_Null;
+
+    dvdDrive->vtbl->GetState(dvdDrive, &state);
+    if (state != DriveState_ImageMounted)
+        goto cleanupDVDDrive;
+
+
+    dvdDrive->vtbl->GetImage(dvdDrive, &dvdImage);
+    if (!dvdImage)
+        goto cleanupDVDDrive;
+
+    dvdImage->vtbl->imedium.GetLocation((IMedium *)dvdImage, &locationUtf16);
+    VBOX_UTF16_TO_UTF8(locationUtf16, &location);
+
+    def->ndisks++;
+    if (VIR_REALLOC_N(def->disks, def->ndisks) >= 0) {
+        if ((def->disks[def->ndisks - 1] = virDomainDiskDefNew())) {
+            def->disks[def->ndisks - 1]->device = VIR_DOMAIN_DISK_DEVICE_CDROM;
+            def->disks[def->ndisks - 1]->bus = VIR_DOMAIN_DISK_BUS_IDE;
+            virDomainDiskSetType(def->disks[def->ndisks - 1],
+                                 VIR_STORAGE_TYPE_FILE);
+            def->disks[def->ndisks - 1]->src->readonly = true;
+            ignore_value(virDomainDiskSetSource(def->disks[def->ndisks - 1], location));
+            ignore_value(VIR_STRDUP(def->disks[def->ndisks - 1]->dst, "hdc"));
+            def->ndisks--;
+        } else {
+            def->ndisks--;
+        }
+    } else {
+        def->ndisks--;
+    }
+
+    VBOX_UTF8_FREE(location);
+    VBOX_UTF16_FREE(locationUtf16);
+    VBOX_MEDIUM_RELEASE(dvdImage);
+
+ cleanupDVDDrive:
+    VBOX_RELEASE(dvdDrive);
+}
+
+static void
+_dumpFloppy(virDomainDefPtr def,
+            vboxGlobalData *data,
+            IMachine *machine)
+{
+    IFloppyDrive *floppyDrive = NULL;
+    IFloppyImage *floppyImage = NULL;
+    PRUnichar *locationUtf16  = NULL;
+    char *location            = NULL;
+    PRBool enabled            = PR_FALSE;
+    PRUint32 state            = DriveState_Null;
+
+    /* dump Floppy if the drive is attached and has floppy in it */
+    machine->vtbl->GetFloppyDrive(machine, &floppyDrive);
+    if (!floppyDrive)
+        return;
+
+    floppyDrive->vtbl->GetEnabled(floppyDrive, &enabled);
+    if (!enabled)
+        goto cleanupFloppyDrive;
+
+
+    floppyDrive->vtbl->GetState(floppyDrive, &state);
+    if (state != DriveState_ImageMounted)
+        goto cleanupFloppyDrive;
+
+    floppyDrive->vtbl->GetImage(floppyDrive, &floppyImage);
+    if (!floppyImage)
+        goto cleanupFloppyDrive;
+
+    floppyImage->vtbl->imedium.GetLocation((IMedium *)floppyImage, &locationUtf16);
+    VBOX_UTF16_TO_UTF8(locationUtf16, &location);
+
+    def->ndisks++;
+    if (VIR_REALLOC_N(def->disks, def->ndisks) >= 0) {
+        if ((def->disks[def->ndisks - 1] = virDomainDiskDefNew())) {
+            def->disks[def->ndisks - 1]->device = VIR_DOMAIN_DISK_DEVICE_FLOPPY;
+            def->disks[def->ndisks - 1]->bus = VIR_DOMAIN_DISK_BUS_FDC;
+            virDomainDiskSetType(def->disks[def->ndisks - 1],
+                                 VIR_STORAGE_TYPE_FILE);
+            def->disks[def->ndisks - 1]->src->readonly = false;
+            ignore_value(virDomainDiskSetSource(def->disks[def->ndisks - 1], location));
+            ignore_value(VIR_STRDUP(def->disks[def->ndisks - 1]->dst, "fda"));
+            def->ndisks--;
+        } else {
+            def->ndisks--;
+        }
+    } else {
+        def->ndisks--;
+    }
+
+    VBOX_UTF8_FREE(location);
+    VBOX_UTF16_FREE(locationUtf16);
+    VBOX_MEDIUM_RELEASE(floppyImage);
+
+ cleanupFloppyDrive:
+    VBOX_RELEASE(floppyDrive);
+}
+
+#else  /* VBOX_API_VERSION >= 3001000 */
+
+static void
+_dumpIDEHDDsOld(virDomainDefPtr def ATTRIBUTE_UNUSED,
+                vboxGlobalData *data ATTRIBUTE_UNUSED,
+                IMachine *machine ATTRIBUTE_UNUSED)
+{
+    vboxUnsupported();
+}
+
+static void
+_dumpDVD(virDomainDefPtr def ATTRIBUTE_UNUSED,
+         vboxGlobalData *data ATTRIBUTE_UNUSED,
+         IMachine *machine ATTRIBUTE_UNUSED)
+{
+    vboxUnsupported();
+}
+
+static void
+_dumpFloppy(virDomainDefPtr def ATTRIBUTE_UNUSED,
+            vboxGlobalData *data ATTRIBUTE_UNUSED,
+            IMachine *machine ATTRIBUTE_UNUSED)
+{
+    vboxUnsupported();
+}
+
+#endif  /* VBOX_API_VERSION >= 3001000 */
+
 static void _pfnUninitialize(vboxGlobalData *data)
 {
     if (data->pFuncs)
@@ -9049,6 +9307,25 @@ static void* _handleGetMachines(IVirtualBox *vboxObj)
     return vboxObj->vtbl->GetMachines;
 }
 
+static void* _handleUSBGetDeviceFilters(IUSBCommon *USBCommon)
+{
+    return USBCommon->vtbl->GetDeviceFilters;
+}
+
+static void* _handleMachineGetMediumAttachments(IMachine *machine)
+{
+#if VBOX_API_VERSION < 3001000
+    return machine->vtbl->GetHardDiskAttachments;
+#else /* VBOX_API_VERSION >= 3001000 */
+    return machine->vtbl->GetMediumAttachments;
+#endif /* VBOX_API_VERSION >= 3001000 */
+}
+
+static void* _handleMachineGetSharedFolders(IMachine *machine)
+{
+    return machine->vtbl->GetSharedFolders;
+}
+
 static nsresult _nsisupportsRelease(nsISupports *nsi)
 {
     return nsi->vtbl->Release(nsi);
@@ -9207,6 +9484,14 @@ _machineAddStorageController(IMachine *machine, PRUnichar *name,
 }
 
 static nsresult
+_machineGetStorageControllerByName(IMachine *machine, PRUnichar *name,
+                                   IStorageController **storageController)
+{
+    return machine->vtbl->GetStorageControllerByName(machine, name,
+                                                     storageController);
+}
+
+static nsresult
 _machineAttachDevice(IMachine *machine ATTRIBUTE_UNUSED,
                      PRUnichar *name ATTRIBUTE_UNUSED,
                      PRInt32 controllerPort ATTRIBUTE_UNUSED,
@@ -9367,6 +9652,18 @@ _machineSetMemorySize(IMachine *machine, PRUint32 memorySize)
 }
 
 static nsresult
+_machineGetCPUProperty(IMachine *machine, PRUint32 property ATTRIBUTE_UNUSED, PRBool *value)
+{
+#if VBOX_API_VERSION < 3001000
+    return machine->vtbl->GetPAEEnabled(machine, value);
+#elif VBOX_API_VERSION == 3001000
+    return machine->vtbl->GetCpuProperty(machine, property, value);
+#elif VBOX_API_VERSION >= 3002000
+    return machine->vtbl->GetCPUProperty(machine, property, value);
+#endif
+}
+
+static nsresult
 _machineSetCPUProperty(IMachine *machine, PRUint32 property ATTRIBUTE_UNUSED, PRBool value)
 {
 #if VBOX_API_VERSION < 3001000
@@ -9379,30 +9676,66 @@ _machineSetCPUProperty(IMachine *machine, PRUint32 property ATTRIBUTE_UNUSED, PR
 }
 
 static nsresult
+_machineGetBootOrder(IMachine *machine, PRUint32 position, PRUint32 *device)
+{
+    return machine->vtbl->GetBootOrder(machine, position, device);
+}
+
+static nsresult
 _machineSetBootOrder(IMachine *machine, PRUint32 position, PRUint32 device)
 {
     return machine->vtbl->SetBootOrder(machine, position, device);
 }
 
 static nsresult
+_machineGetVRAMSize(IMachine *machine, PRUint32 *VRAMSize)
+{
+    return machine->vtbl->GetVRAMSize(machine, VRAMSize);
+}
+
+static nsresult
 _machineSetVRAMSize(IMachine *machine, PRUint32 VRAMSize)
 {
     return machine->vtbl->SetVRAMSize(machine, VRAMSize);
 }
 
 static nsresult
+_machineGetMonitorCount(IMachine *machine, PRUint32 *monitorCount)
+{
+    return machine->vtbl->GetMonitorCount(machine, monitorCount);
+}
+
+static nsresult
 _machineSetMonitorCount(IMachine *machine, PRUint32 monitorCount)
 {
     return machine->vtbl->SetMonitorCount(machine, monitorCount);
 }
 
 static nsresult
+_machineGetAccelerate3DEnabled(IMachine *machine, PRBool *accelerate3DEnabled)
+{
+    return machine->vtbl->GetAccelerate3DEnabled(machine, accelerate3DEnabled);
+}
+
+static nsresult
 _machineSetAccelerate3DEnabled(IMachine *machine, PRBool accelerate3DEnabled)
 {
     return machine->vtbl->SetAccelerate3DEnabled(machine, accelerate3DEnabled);
 }
 
 static nsresult
+_machineGetAccelerate2DVideoEnabled(IMachine *machine ATTRIBUTE_UNUSED,
+                                    PRBool *accelerate2DVideoEnabled ATTRIBUTE_UNUSED)
+{
+#if VBOX_API_VERSION >= 3001000
+    return machine->vtbl->GetAccelerate2DVideoEnabled(machine, accelerate2DVideoEnabled);
+#else /* VBOX_API_VERSION < 3001000 */
+    vboxUnsupported();
+    return 0;
+#endif /* VBOX_API_VERSION < 3001000 */
+}
+
+static nsresult
 _machineSetAccelerate2DVideoEnabled(IMachine *machine ATTRIBUTE_UNUSED,
                                     PRBool accelerate2DVideoEnabled ATTRIBUTE_UNUSED)
 {
@@ -9634,48 +9967,102 @@ _systemPropertiesGetMaxGuestRAM(ISystemProperties *systemProperties, PRUint32 *m
 }
 
 static nsresult
+_biosSettingsGetACPIEnabled(IBIOSSettings *bios, PRBool *ACPIEnabled)
+{
+    return bios->vtbl->GetACPIEnabled(bios, ACPIEnabled);
+}
+
+static nsresult
 _biosSettingsSetACPIEnabled(IBIOSSettings *bios, PRBool ACPIEnabled)
 {
     return bios->vtbl->SetACPIEnabled(bios, ACPIEnabled);
 }
 
 static nsresult
+_biosSettingsGetIOAPICEnabled(IBIOSSettings *bios, PRBool *IOAPICEnabled)
+{
+    return bios->vtbl->GetIOAPICEnabled(bios, IOAPICEnabled);
+}
+
+static nsresult
 _biosSettingsSetIOAPICEnabled(IBIOSSettings *bios, PRBool IOAPICEnabled)
 {
     return bios->vtbl->SetIOAPICEnabled(bios, IOAPICEnabled);
 }
 
 static nsresult
+_audioAdapterGetEnabled(IAudioAdapter *audioAdapter, PRBool *enabled)
+{
+    return audioAdapter->vtbl->GetEnabled(audioAdapter, enabled);
+}
+
+static nsresult
 _audioAdapterSetEnabled(IAudioAdapter *audioAdapter, PRBool enabled)
 {
     return audioAdapter->vtbl->SetEnabled(audioAdapter, enabled);
 }
 
 static nsresult
+_audioAdapterGetAudioController(IAudioAdapter *audioAdapter, PRUint32 *audioController)
+{
+    return audioAdapter->vtbl->GetAudioController(audioAdapter, audioController);
+}
+
+static nsresult
 _audioAdapterSetAudioController(IAudioAdapter *audioAdapter, PRUint32 audioController)
 {
     return audioAdapter->vtbl->SetAudioController(audioAdapter, audioController);
 }
 
 static nsresult
+_networkAdapterGetAttachmentType(INetworkAdapter *adapter, PRUint32 *attachmentType)
+{
+    return adapter->vtbl->GetAttachmentType(adapter, attachmentType);
+}
+
+static nsresult
+_networkAdapterGetEnabled(INetworkAdapter *adapter, PRBool *enabled)
+{
+    return adapter->vtbl->GetEnabled(adapter, enabled);
+}
+
+static nsresult
 _networkAdapterSetEnabled(INetworkAdapter *adapter, PRBool enabled)
 {
     return adapter->vtbl->SetEnabled(adapter, enabled);
 }
 
 static nsresult
+_networkAdapterGetAdapterType(INetworkAdapter *adapter, PRUint32 *adapterType)
+{
+    return adapter->vtbl->GetAdapterType(adapter, adapterType);
+}
+
+static nsresult
 _networkAdapterSetAdapterType(INetworkAdapter *adapter, PRUint32 adapterType)
 {
     return adapter->vtbl->SetAdapterType(adapter, adapterType);
 }
 
 static nsresult
+_networkAdapterGetInternalNetwork(INetworkAdapter *adapter, PRUnichar **internalNetwork)
+{
+    return adapter->vtbl->GetInternalNetwork(adapter, internalNetwork);
+}
+
+static nsresult
 _networkAdapterSetInternalNetwork(INetworkAdapter *adapter, PRUnichar *internalNetwork)
 {
     return adapter->vtbl->SetInternalNetwork(adapter, internalNetwork);
 }
 
 static nsresult
+_networkAdapterGetMACAddress(INetworkAdapter *adapter, PRUnichar **MACAddress)
+{
+    return adapter->vtbl->GetMACAddress(adapter, MACAddress);
+}
+
+static nsresult
 _networkAdapterSetMACAddress(INetworkAdapter *adapter, PRUnichar *MACAddress)
 {
     return adapter->vtbl->SetMACAddress(adapter, MACAddress);
@@ -9684,12 +10071,24 @@ _networkAdapterSetMACAddress(INetworkAdapter *adapter, PRUnichar *MACAddress)
 #if VBOX_API_VERSION < 4001000
 
 static nsresult
+_networkAdapterGetBridgedInterface(INetworkAdapter *adapter, PRUnichar **hostInterface)
+{
+    return adapter->vtbl->GetHostInterface(adapter, hostInterface);
+}
+
+static nsresult
 _networkAdapterSetBridgedInterface(INetworkAdapter *adapter, PRUnichar *hostInterface)
 {
     return adapter->vtbl->SetHostInterface(adapter, hostInterface);
 }
 
 static nsresult
+_networkAdapterGetHostOnlyInterface(INetworkAdapter *adapter, PRUnichar **hostOnlyInterface)
+{
+    return adapter->vtbl->GetHostInterface(adapter, hostOnlyInterface);
+}
+
+static nsresult
 _networkAdapterSetHostOnlyInterface(INetworkAdapter *adapter, PRUnichar *hostOnlyInterface)
 {
     return adapter->vtbl->SetHostInterface(adapter, hostOnlyInterface);
@@ -9722,12 +10121,24 @@ _networkAdapterAttachToNAT(INetworkAdapter *adapter)
 #else /* VBOX_API_VERSION >= 4001000 */
 
 static nsresult
+_networkAdapterGetBridgedInterface(INetworkAdapter *adapter, PRUnichar **bridgedInterface)
+{
+    return adapter->vtbl->GetBridgedInterface(adapter, bridgedInterface);
+}
+
+static nsresult
 _networkAdapterSetBridgedInterface(INetworkAdapter *adapter, PRUnichar *bridgedInterface)
 {
     return adapter->vtbl->SetBridgedInterface(adapter, bridgedInterface);
 }
 
 static nsresult
+_networkAdapterGetHostOnlyInterface(INetworkAdapter *adapter, PRUnichar **hostOnlyInterface)
+{
+    return adapter->vtbl->GetHostOnlyInterface(adapter, hostOnlyInterface);
+}
+
+static nsresult
 _networkAdapterSetHostOnlyInterface(INetworkAdapter *adapter, PRUnichar *hostOnlyInterface)
 {
     return adapter->vtbl->SetHostOnlyInterface(adapter, hostOnlyInterface);
@@ -9760,66 +10171,166 @@ _networkAdapterAttachToNAT(INetworkAdapter *adapter)
 #endif /* VBOX_API_VERSION >= 4001000 */
 
 static nsresult
+_serialPortGetEnabled(ISerialPort *port, PRBool *enabled)
+{
+    return port->vtbl->GetEnabled(port, enabled);
+}
+
+static nsresult
 _serialPortSetEnabled(ISerialPort *port, PRBool enabled)
 {
     return port->vtbl->SetEnabled(port, enabled);
 }
 
 static nsresult
+_serialPortGetPath(ISerialPort *port, PRUnichar **path)
+{
+    return port->vtbl->GetPath(port, path);
+}
+
+static nsresult
 _serialPortSetPath(ISerialPort *port, PRUnichar *path)
 {
     return port->vtbl->SetPath(port, path);
 }
 
 static nsresult
+_serialPortGetIRQ(ISerialPort *port, PRUint32 *IRQ)
+{
+    return port->vtbl->GetIRQ(port, IRQ);
+}
+
+static nsresult
 _serialPortSetIRQ(ISerialPort *port, PRUint32 IRQ)
 {
     return port->vtbl->SetIRQ(port, IRQ);
 }
 
 static nsresult
+_serialPortGetIOBase(ISerialPort *port, PRUint32 *IOBase)
+{
+    return port->vtbl->GetIOBase(port, IOBase);
+}
+
+static nsresult
 _serialPortSetIOBase(ISerialPort *port, PRUint32 IOBase)
 {
     return port->vtbl->SetIOBase(port, IOBase);
 }
 
 static nsresult
+_serialPortGetHostMode(ISerialPort *port, PRUint32 *hostMode)
+{
+    return port->vtbl->GetHostMode(port, hostMode);
+}
+
+static nsresult
 _serialPortSetHostMode(ISerialPort *port, PRUint32 hostMode)
 {
     return port->vtbl->SetHostMode(port, hostMode);
 }
 
 static nsresult
+_parallelPortGetEnabled(IParallelPort *port, PRBool *enabled)
+{
+    return port->vtbl->GetEnabled(port, enabled);
+}
+
+static nsresult
 _parallelPortSetEnabled(IParallelPort *port, PRBool enabled)
 {
     return port->vtbl->SetEnabled(port, enabled);
 }
 
 static nsresult
+_parallelPortGetPath(IParallelPort *port, PRUnichar **path)
+{
+    return port->vtbl->GetPath(port, path);
+}
+
+static nsresult
 _parallelPortSetPath(IParallelPort *port, PRUnichar *path)
 {
     return port->vtbl->SetPath(port, path);
 }
 
 static nsresult
+_parallelPortGetIRQ(IParallelPort *port, PRUint32 *IRQ)
+{
+    return port->vtbl->GetIRQ(port, IRQ);
+}
+
+static nsresult
 _parallelPortSetIRQ(IParallelPort *port, PRUint32 IRQ)
 {
     return port->vtbl->SetIRQ(port, IRQ);
 }
 
 static nsresult
+_parallelPortGetIOBase(IParallelPort *port, PRUint32 *IOBase)
+{
+    return port->vtbl->GetIOBase(port, IOBase);
+}
+
+static nsresult
 _parallelPortSetIOBase(IParallelPort *port, PRUint32 IOBase)
 {
     return port->vtbl->SetIOBase(port, IOBase);
 }
 
 static nsresult
+_vrdxServerGetEnabled(IVRDxServer *VRDxServer, PRBool *enabled)
+{
+    return VRDxServer->vtbl->GetEnabled(VRDxServer, enabled);
+}
+
+static nsresult
 _vrdxServerSetEnabled(IVRDxServer *VRDxServer, PRBool enabled)
 {
     return VRDxServer->vtbl->SetEnabled(VRDxServer, enabled);
 }
 
 static nsresult
+_vrdxServerGetPorts(vboxGlobalData *data ATTRIBUTE_UNUSED,
+                    IVRDxServer *VRDxServer, virDomainGraphicsDefPtr graphics)
+{
+    nsresult rc;
+#if VBOX_API_VERSION < 3001000
+    PRUint32 VRDPport = 0;
+    rc = VRDxServer->vtbl->GetPort(VRDxServer, &VRDPport);
+    if (VRDPport) {
+        graphics->data.rdp.port = VRDPport;
+    } else {
+        graphics->data.rdp.autoport = true;
+    }
+#elif VBOX_API_VERSION < 4000000 /* 3001000 <= VBOX_API_VERSION < 4000000 */
+    PRUnichar *VRDPport = NULL;
+    rc = VRDxServer->vtbl->GetPorts(VRDxServer, &VRDPport);
+    if (VRDPport) {
+        /* even if vbox supports mutilpe ports, single port for now here */
+        graphics->data.rdp.port = PRUnicharToInt(VRDPport);
+        VBOX_UTF16_FREE(VRDPport);
+    } else {
+        graphics->data.rdp.autoport = true;
+    }
+#else /* VBOX_API_VERSION >= 4000000 */
+    PRUnichar *VRDEPortsKey = NULL;
+    PRUnichar *VRDEPortsValue = NULL;
+    VBOX_UTF8_TO_UTF16("TCP/Ports", &VRDEPortsKey);
+    rc = VRDxServer->vtbl->GetVRDEProperty(VRDxServer, VRDEPortsKey, &VRDEPortsValue);
+    VBOX_UTF16_FREE(VRDEPortsKey);
+    if (VRDEPortsValue) {
+        /* even if vbox supports mutilpe ports, single port for now here */
+        graphics->data.rdp.port = PRUnicharToInt(VRDEPortsValue);
+        VBOX_UTF16_FREE(VRDEPortsValue);
+    } else {
+        graphics->data.rdp.autoport = true;
+    }
+#endif /* VBOX_API_VERSION >= 4000000 */
+    return rc;
+}
+
+static nsresult
 _vrdxServerSetPorts(vboxGlobalData *data ATTRIBUTE_UNUSED,
                     IVRDxServer *VRDxServer, virDomainGraphicsDefPtr graphics)
 {
@@ -9856,18 +10367,46 @@ _vrdxServerSetPorts(vboxGlobalData *data ATTRIBUTE_UNUSED,
 }
 
 static nsresult
+_vrdxServerGetReuseSingleConnection(IVRDxServer *VRDxServer, PRBool *enabled)
+{
+    return VRDxServer->vtbl->GetReuseSingleConnection(VRDxServer, enabled);
+}
+
+static nsresult
 _vrdxServerSetReuseSingleConnection(IVRDxServer *VRDxServer, PRBool enabled)
 {
     return VRDxServer->vtbl->SetReuseSingleConnection(VRDxServer, enabled);
 }
 
 static nsresult
+_vrdxServerGetAllowMultiConnection(IVRDxServer *VRDxServer, PRBool *enabled)
+{
+    return VRDxServer->vtbl->GetAllowMultiConnection(VRDxServer, enabled);
+}
+
+static nsresult
 _vrdxServerSetAllowMultiConnection(IVRDxServer *VRDxServer, PRBool enabled)
 {
     return VRDxServer->vtbl->SetAllowMultiConnection(VRDxServer, enabled);
 }
 
 static nsresult
+_vrdxServerGetNetAddress(vboxGlobalData *data ATTRIBUTE_UNUSED,
+                         IVRDxServer *VRDxServer, PRUnichar **netAddress)
+{
+#if VBOX_API_VERSION >= 4000000
+    PRUnichar *VRDENetAddressKey = NULL;
+    nsresult rc;
+    VBOX_UTF8_TO_UTF16("TCP/Address", &VRDENetAddressKey);
+    rc = VRDxServer->vtbl->GetVRDEProperty(VRDxServer, VRDENetAddressKey, netAddress);
+    VBOX_UTF16_FREE(VRDENetAddressKey);
+    return rc;
+#else /* VBOX_API_VERSION < 4000000 */
+    return VRDxServer->vtbl->GetNetAddress(VRDxServer, netAddress);
+#endif /* VBOX_API_VERSION < 4000000 */
+}
+
+static nsresult
 _vrdxServerSetNetAddress(vboxGlobalData *data ATTRIBUTE_UNUSED,
                          IVRDxServer *VRDxServer, PRUnichar *netAddress)
 {
@@ -9902,6 +10441,17 @@ _usbCommonEnable(IUSBCommon *USBCommon ATTRIBUTE_UNUSED)
 }
 
 static nsresult
+_usbCommonGetEnabled(IUSBCommon *USBCommon ATTRIBUTE_UNUSED, PRBool *enabled)
+{
+#if VBOX_API_VERSION < 4003000
+    return USBCommon->vtbl->GetEnabled(USBCommon, enabled);
+#else /* VBOX_API_VERSION >= 4003000 */
+    *enabled = true;
+    return 0;
+#endif /* VBOX_API_VERSION >= 4003000 */
+}
+
+static nsresult
 _usbCommonCreateDeviceFilter(IUSBCommon *USBCommon, PRUnichar *name,
                              IUSBDeviceFilter **filter)
 {
@@ -9916,18 +10466,36 @@ _usbCommonInsertDeviceFilter(IUSBCommon *USBCommon, PRUint32 position,
 }
 
 static nsresult
+_usbDeviceFilterGetProductId(IUSBDeviceFilter *USBDeviceFilter, PRUnichar **productId)
+{
+    return USBDeviceFilter->vtbl->GetProductId(USBDeviceFilter, productId);
+}
+
+static nsresult
 _usbDeviceFilterSetProductId(IUSBDeviceFilter *USBDeviceFilter, PRUnichar *productId)
 {
     return USBDeviceFilter->vtbl->SetProductId(USBDeviceFilter, productId);
 }
 
 static nsresult
+_usbDeviceFilterGetActive(IUSBDeviceFilter *USBDeviceFilter, PRBool *active)
+{
+    return USBDeviceFilter->vtbl->GetActive(USBDeviceFilter, active);
+}
+
+static nsresult
 _usbDeviceFilterSetActive(IUSBDeviceFilter *USBDeviceFilter, PRBool active)
 {
     return USBDeviceFilter->vtbl->SetActive(USBDeviceFilter, active);
 }
 
 static nsresult
+_usbDeviceFilterGetVendorId(IUSBDeviceFilter *USBDeviceFilter, PRUnichar **vendorId)
+{
+    return USBDeviceFilter->vtbl->GetVendorId(USBDeviceFilter, vendorId);
+}
+
+static nsresult
 _usbDeviceFilterSetVendorId(IUSBDeviceFilter *USBDeviceFilter, PRUnichar *vendorId)
 {
     return USBDeviceFilter->vtbl->SetVendorId(USBDeviceFilter, vendorId);
@@ -9938,6 +10506,22 @@ static nsresult _mediumGetId(IMedium *medium, vboxIIDUnion *iidu)
     return medium->vtbl->GetId(medium, &IID_MEMBER(value));
 }
 
+static nsresult _mediumGetLocation(IMedium *medium, PRUnichar **location)
+{
+    return medium->vtbl->GetLocation(medium, location);
+}
+
+static nsresult _mediumGetReadOnly(IMedium *medium ATTRIBUTE_UNUSED,
+                                   PRBool *readOnly ATTRIBUTE_UNUSED)
+{
+#if VBOX_API_VERSION < 3001000
+    vboxUnsupported();
+    return 0;
+#else /* VBOX_API_VERSION >= 3001000 */
+    return medium->vtbl->GetReadOnly(medium, readOnly);
+#endif /* VBOX_API_VERSION >= 3001000 */
+}
+
 static nsresult _mediumRelease(IMedium *medium)
 {
     return medium->vtbl->nsisupports.Release((nsISupports *)medium);
@@ -9954,6 +10538,73 @@ static nsresult _mediumSetType(IMedium *medium ATTRIBUTE_UNUSED,
 #endif
 }
 
+static nsresult
+_mediumAttachmentGetMedium(IMediumAttachment *mediumAttachment ATTRIBUTE_UNUSED,
+                           IMedium **medium ATTRIBUTE_UNUSED)
+{
+#if VBOX_API_VERSION < 3001000
+    vboxUnsupported();
+    return 0;
+#else /* VBOX_API_VERSION >= 3001000 */
+    return mediumAttachment->vtbl->GetMedium(mediumAttachment, medium);
+#endif /* VBOX_API_VERSION >= 3001000 */
+}
+
+static nsresult
+_mediumAttachmentGetController(IMediumAttachment *mediumAttachment,
+                               PRUnichar **controller)
+{
+    return mediumAttachment->vtbl->GetController(mediumAttachment, controller);
+}
+
+static nsresult
+_mediumAttachmentGetType(IMediumAttachment *mediumAttachment ATTRIBUTE_UNUSED,
+                         PRUint32 *type ATTRIBUTE_UNUSED)
+{
+#if VBOX_API_VERSION < 3001000
+    vboxUnsupported();
+    return 0;
+#else /* VBOX_API_VERSION >= 3001000 */
+    return mediumAttachment->vtbl->GetType(mediumAttachment, type);
+#endif /* VBOX_API_VERSION >= 3001000 */
+}
+
+static nsresult
+_mediumAttachmentGetPort(IMediumAttachment *mediumAttachment, PRInt32 *port)
+{
+    return mediumAttachment->vtbl->GetPort(mediumAttachment, port);
+}
+
+static nsresult
+_mediumAttachmentGetDevice(IMediumAttachment *mediumAttachment, PRInt32 *device)
+{
+    return mediumAttachment->vtbl->GetDevice(mediumAttachment, device);
+}
+
+static nsresult
+_storageControllerGetBus(IStorageController *storageController, PRUint32 *bus)
+{
+    return storageController->vtbl->GetBus(storageController, bus);
+}
+
+static nsresult
+_sharedFolderGetHostPath(ISharedFolder *sharedFolder, PRUnichar **hostPath)
+{
+    return sharedFolder->vtbl->GetHostPath(sharedFolder, hostPath);
+}
+
+static nsresult
+_sharedFolderGetName(ISharedFolder *sharedFolder, PRUnichar **name)
+{
+    return sharedFolder->vtbl->GetName(sharedFolder, name);
+}
+
+static nsresult
+_sharedFolderGetWritable(ISharedFolder *sharedFolder, PRBool *writable)
+{
+    return sharedFolder->vtbl->GetWritable(sharedFolder, writable);
+}
+
 static bool _machineStateOnline(PRUint32 state)
 {
     return ((state >= MachineState_FirstOnline) &&
@@ -10006,6 +10657,9 @@ static vboxUniformedArray _UArray = {
     .vboxArrayGet = vboxArrayGet,
     .vboxArrayRelease = vboxArrayRelease,
     .handleGetMachines = _handleGetMachines,
+    .handleUSBGetDeviceFilters = _handleUSBGetDeviceFilters,
+    .handleMachineGetMediumAttachments = _handleMachineGetMediumAttachments,
+    .handleMachineGetSharedFolders = _handleMachineGetSharedFolders,
 };
 
 static vboxUniformednsISupports _nsUISupports = {
@@ -10024,6 +10678,7 @@ static vboxUniformedIVirtualBox _UIVirtualBox = {
 
 static vboxUniformedIMachine _UIMachine = {
     .AddStorageController = _machineAddStorageController,
+    .GetStorageControllerByName = _machineGetStorageControllerByName,
     .AttachDevice = _machineAttachDevice,
     .CreateSharedFolder = _machineCreateSharedFolder,
     .LaunchVMProcess = _machineLaunchVMProcess,
@@ -10043,11 +10698,17 @@ static vboxUniformedIMachine _UIMachine = {
     .SetCPUCount = _machineSetCPUCount,
     .GetMemorySize = _machineGetMemorySize,
     .SetMemorySize = _machineSetMemorySize,
+    .GetCPUProperty = _machineGetCPUProperty,
     .SetCPUProperty = _machineSetCPUProperty,
+    .GetBootOrder = _machineGetBootOrder,
     .SetBootOrder = _machineSetBootOrder,
+    .GetVRAMSize = _machineGetVRAMSize,
     .SetVRAMSize = _machineSetVRAMSize,
+    .GetMonitorCount = _machineGetMonitorCount,
     .SetMonitorCount = _machineSetMonitorCount,
+    .GetAccelerate3DEnabled = _machineGetAccelerate3DEnabled,
     .SetAccelerate3DEnabled = _machineSetAccelerate3DEnabled,
+    .GetAccelerate2DVideoEnabled = _machineGetAccelerate2DVideoEnabled,
     .SetAccelerate2DVideoEnabled = _machineSetAccelerate2DVideoEnabled,
     .GetExtraData = _machineGetExtraData,
     .SetExtraData = _machineSetExtraData,
@@ -10089,21 +10750,32 @@ static vboxUniformedISystemProperties _UISystemProperties = {
 };
 
 static vboxUniformedIBIOSSettings _UIBIOSSettings = {
+    .GetACPIEnabled = _biosSettingsGetACPIEnabled,
     .SetACPIEnabled = _biosSettingsSetACPIEnabled,
+    .GetIOAPICEnabled = _biosSettingsGetIOAPICEnabled,
     .SetIOAPICEnabled = _biosSettingsSetIOAPICEnabled,
 };
 
 static vboxUniformedIAudioAdapter _UIAudioAdapter = {
+    .GetEnabled = _audioAdapterGetEnabled,
     .SetEnabled = _audioAdapterSetEnabled,
+    .GetAudioController = _audioAdapterGetAudioController,
     .SetAudioController = _audioAdapterSetAudioController,
 };
 
 static vboxUniformedINetworkAdapter _UINetworkAdapter = {
+    .GetAttachmentType = _networkAdapterGetAttachmentType,
+    .GetEnabled = _networkAdapterGetEnabled,
     .SetEnabled = _networkAdapterSetEnabled,
+    .GetAdapterType = _networkAdapterGetAdapterType,
     .SetAdapterType = _networkAdapterSetAdapterType,
+    .GetBridgedInterface = _networkAdapterGetBridgedInterface,
     .SetBridgedInterface = _networkAdapterSetBridgedInterface,
+    .GetInternalNetwork = _networkAdapterGetInternalNetwork,
     .SetInternalNetwork = _networkAdapterSetInternalNetwork,
+    .GetHostOnlyInterface = _networkAdapterGetHostOnlyInterface,
     .SetHostOnlyInterface = _networkAdapterSetHostOnlyInterface,
+    .GetMACAddress = _networkAdapterGetMACAddress,
     .SetMACAddress = _networkAdapterSetMACAddress,
     .AttachToBridgedInterface = _networkAdapterAttachToBridgedInterface,
     .AttachToInternalNetwork = _networkAdapterAttachToInternalNetwork,
@@ -10112,46 +10784,84 @@ static vboxUniformedINetworkAdapter _UINetworkAdapter = {
 };
 
 static vboxUniformedISerialPort _UISerialPort = {
+    .GetEnabled = _serialPortGetEnabled,
     .SetEnabled = _serialPortSetEnabled,
+    .GetPath = _serialPortGetPath,
     .SetPath = _serialPortSetPath,
+    .GetIRQ = _serialPortGetIRQ,
     .SetIRQ = _serialPortSetIRQ,
+    .GetIOBase = _serialPortGetIOBase,
     .SetIOBase = _serialPortSetIOBase,
+    .GetHostMode = _serialPortGetHostMode,
     .SetHostMode = _serialPortSetHostMode,
 };
 
 static vboxUniformedIParallelPort _UIParallelPort = {
+    .GetEnabled = _parallelPortGetEnabled,
     .SetEnabled = _parallelPortSetEnabled,
+    .GetPath = _parallelPortGetPath,
     .SetPath = _parallelPortSetPath,
+    .GetIRQ = _parallelPortGetIRQ,
     .SetIRQ = _parallelPortSetIRQ,
+    .GetIOBase = _parallelPortGetIOBase,
     .SetIOBase = _parallelPortSetIOBase,
 };
 
 static vboxUniformedIVRDxServer _UIVRDxServer = {
+    .GetEnabled = _vrdxServerGetEnabled,
     .SetEnabled = _vrdxServerSetEnabled,
+    .GetPorts = _vrdxServerGetPorts,
     .SetPorts = _vrdxServerSetPorts,
+    .GetReuseSingleConnection = _vrdxServerGetReuseSingleConnection,
     .SetReuseSingleConnection = _vrdxServerSetReuseSingleConnection,
+    .GetAllowMultiConnection = _vrdxServerGetAllowMultiConnection,
     .SetAllowMultiConnection = _vrdxServerSetAllowMultiConnection,
+    .GetNetAddress = _vrdxServerGetNetAddress,
     .SetNetAddress = _vrdxServerSetNetAddress,
 };
 
 static vboxUniformedIUSBCommon _UIUSBCommon = {
     .Enable = _usbCommonEnable,
+    .GetEnabled = _usbCommonGetEnabled,
     .CreateDeviceFilter = _usbCommonCreateDeviceFilter,
     .InsertDeviceFilter = _usbCommonInsertDeviceFilter,
 };
 
 static vboxUniformedIUSBDeviceFilter _UIUSBDeviceFilter = {
+    .GetProductId = _usbDeviceFilterGetProductId,
     .SetProductId = _usbDeviceFilterSetProductId,
+    .GetActive = _usbDeviceFilterGetActive,
     .SetActive = _usbDeviceFilterSetActive,
+    .GetVendorId = _usbDeviceFilterGetVendorId,
     .SetVendorId = _usbDeviceFilterSetVendorId,
 };
 
 static vboxUniformedIMedium _UIMedium = {
     .GetId = _mediumGetId,
+    .GetLocation = _mediumGetLocation,
+    .GetReadOnly = _mediumGetReadOnly,
     .Release = _mediumRelease,
     .SetType = _mediumSetType,
 };
 
+static vboxUniformedIMediumAttachment _UIMediumAttachment = {
+    .GetMedium = _mediumAttachmentGetMedium,
+    .GetController = _mediumAttachmentGetController,
+    .GetType = _mediumAttachmentGetType,
+    .GetPort = _mediumAttachmentGetPort,
+    .GetDevice = _mediumAttachmentGetDevice,
+};
+
+static vboxUniformedIStorageController _UIStorageController = {
+    .GetBus = _storageControllerGetBus,
+};
+
+static vboxUniformedISharedFolder _UISharedFolder = {
+    .GetHostPath = _sharedFolderGetHostPath,
+    .GetName = _sharedFolderGetName,
+    .GetWritable = _sharedFolderGetWritable,
+};
+
 static uniformedMachineStateChecker _machineStateChecker = {
     .Online = _machineStateOnline,
     .NotStart = _machineStateNotStart,
@@ -10171,6 +10881,9 @@ void NAME(InstallUniformedAPI)(vboxUniformedAPI *pVBoxAPI)
     pVBoxAPI->deleteConfig = _deleteConfig;
     pVBoxAPI->vboxAttachDrivesOld = _vboxAttachDrivesOld;
     pVBoxAPI->vboxConvertState = _vboxConvertState;
+    pVBoxAPI->dumpIDEHDDsOld = _dumpIDEHDDsOld;
+    pVBoxAPI->dumpDVD = _dumpDVD;
+    pVBoxAPI->dumpFloppy = _dumpFloppy;
     pVBoxAPI->UPFN = _UPFN;
     pVBoxAPI->UIID = _UIID;
     pVBoxAPI->UArray = _UArray;
@@ -10190,6 +10903,9 @@ void NAME(InstallUniformedAPI)(vboxUniformedAPI *pVBoxAPI)
     pVBoxAPI->UIUSBCommon = _UIUSBCommon;
     pVBoxAPI->UIUSBDeviceFilter = _UIUSBDeviceFilter;
     pVBoxAPI->UIMedium = _UIMedium;
+    pVBoxAPI->UIMediumAttachment = _UIMediumAttachment;
+    pVBoxAPI->UIStorageController = _UIStorageController;
+    pVBoxAPI->UISharedFolder = _UISharedFolder;
     pVBoxAPI->machineStateChecker = _machineStateChecker;
 
 #if VBOX_API_VERSION <= 2002000 || VBOX_API_VERSION >= 4000000
@@ -10223,8 +10939,10 @@ void NAME(InstallUniformedAPI)(vboxUniformedAPI *pVBoxAPI)
 
 #if VBOX_API_VERSION >= 3001000
     pVBoxAPI->accelerate2DVideo = 1;
+    pVBoxAPI->oldMediumInterface = 0;
 #else /* VBOX_API_VERSION < 3001000 */
     pVBoxAPI->accelerate2DVideo = 0;
+    pVBoxAPI->oldMediumInterface = 1;
 #endif /* VBOX_API_VERSION < 3001000 */
 }
 
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index f67c109..f72d03f 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -168,6 +168,9 @@ typedef struct {
     void (*vboxArrayRelease)(vboxArray *array);
     /* Generate function pointers for vboxArrayGet */
     void* (*handleGetMachines)(IVirtualBox *vboxObj);
+    void* (*handleUSBGetDeviceFilters)(IUSBCommon *USBCommon);
+    void* (*handleMachineGetMediumAttachments)(IMachine *machine);
+    void* (*handleMachineGetSharedFolders)(IMachine *machine);
 } vboxUniformedArray;
 
 /* Functions for nsISupports */
@@ -190,6 +193,8 @@ typedef struct {
 typedef struct {
     nsresult (*AddStorageController)(IMachine *machine, PRUnichar *name,
         PRUint32 connectionType, IStorageController **controller);
+    nsresult (*GetStorageControllerByName)(IMachine *machine, PRUnichar *name,
+                                           IStorageController **storageController);
     nsresult (*AttachDevice)(IMachine *machine, PRUnichar *name,
                              PRInt32 controllerPort, PRInt32 device,
                              PRUint32 type, IMedium *medium);
@@ -216,11 +221,17 @@ typedef struct {
     nsresult (*SetCPUCount)(IMachine *machine, PRUint32 CPUCount);
     nsresult (*GetMemorySize)(IMachine *machine, PRUint32 *memorySize);
     nsresult (*SetMemorySize)(IMachine *machine, PRUint32 memorySize);
+    nsresult (*GetCPUProperty)(IMachine *machine, PRUint32 property, PRBool *value);
     nsresult (*SetCPUProperty)(IMachine *machine, PRUint32 property, PRBool value);
+    nsresult (*GetBootOrder)(IMachine *machine, PRUint32 position, PRUint32 *device);
     nsresult (*SetBootOrder)(IMachine *machine, PRUint32 position, PRUint32 device);
+    nsresult (*GetVRAMSize)(IMachine *machine, PRUint32 *VRAMSize);
     nsresult (*SetVRAMSize)(IMachine *machine, PRUint32 VRAMSize);
+    nsresult (*GetMonitorCount)(IMachine *machine, PRUint32 *monitorCount);
     nsresult (*SetMonitorCount)(IMachine *machine, PRUint32 monitorCount);
+    nsresult (*GetAccelerate3DEnabled)(IMachine *machine, PRBool *accelerate3DEnabled);
     nsresult (*SetAccelerate3DEnabled)(IMachine *machine, PRBool accelerate3DEnabled);
+    nsresult (*GetAccelerate2DVideoEnabled)(IMachine *machine, PRBool *accelerate2DVideoEnabled);
     nsresult (*SetAccelerate2DVideoEnabled)(IMachine *machine, PRBool accelerate2DVideoEnabled);
     nsresult (*GetExtraData)(IMachine *machine, PRUnichar *key, PRUnichar **value);
     nsresult (*SetExtraData)(IMachine *machine, PRUnichar *key, PRUnichar *value);
@@ -270,23 +281,34 @@ typedef struct {
 
 /* Functions for IBIOSSettings */
 typedef struct {
+    nsresult (*GetACPIEnabled)(IBIOSSettings *bios, PRBool *ACPIEnabled);
     nsresult (*SetACPIEnabled)(IBIOSSettings *bios, PRBool ACPIEnabled);
+    nsresult (*GetIOAPICEnabled)(IBIOSSettings *bios, PRBool *IOAPICEnabled);
     nsresult (*SetIOAPICEnabled)(IBIOSSettings *bios, PRBool IOAPICEnabled);
 } vboxUniformedIBIOSSettings;
 
 /* Functions for IAudioAdapter */
 typedef struct {
+    nsresult (*GetEnabled)(IAudioAdapter *audioAdapter, PRBool *enabled);
     nsresult (*SetEnabled)(IAudioAdapter *audioAdapter, PRBool enabled);
+    nsresult (*GetAudioController)(IAudioAdapter *audioAdapter, PRUint32 *audioController);
     nsresult (*SetAudioController)(IAudioAdapter *audioAdapter, PRUint32 audioController);
 } vboxUniformedIAudioAdapter;
 
 /* Functions for INetworkAdapter */
 typedef struct {
+    nsresult (*GetAttachmentType)(INetworkAdapter *adapter, PRUint32 *attachmentType);
+    nsresult (*GetEnabled)(INetworkAdapter *adapter, PRBool *enabled);
     nsresult (*SetEnabled)(INetworkAdapter *adapter, PRBool enabled);
+    nsresult (*GetAdapterType)(INetworkAdapter *adapter, PRUint32 *adapterType);
     nsresult (*SetAdapterType)(INetworkAdapter *adapter, PRUint32 adapterType);
+    nsresult (*GetBridgedInterface)(INetworkAdapter *adapter, PRUnichar **bridgedInterface);
     nsresult (*SetBridgedInterface)(INetworkAdapter *adapter, PRUnichar *bridgedInterface);
+    nsresult (*GetInternalNetwork)(INetworkAdapter *adapter, PRUnichar **internalNetwork);
     nsresult (*SetInternalNetwork)(INetworkAdapter *adapter, PRUnichar *internalNetwork);
+    nsresult (*GetHostOnlyInterface)(INetworkAdapter *adapter, PRUnichar **hostOnlyInterface);
     nsresult (*SetHostOnlyInterface)(INetworkAdapter *adapter, PRUnichar *hostOnlyInterface);
+    nsresult (*GetMACAddress)(INetworkAdapter *adapter, PRUnichar **MACAddress);
     nsresult (*SetMACAddress)(INetworkAdapter *adapter, PRUnichar *MACAddress);
     nsresult (*AttachToBridgedInterface)(INetworkAdapter *adapter);
     nsresult (*AttachToInternalNetwork)(INetworkAdapter *adapter);
@@ -296,28 +318,44 @@ typedef struct {
 
 /* Functions for ISerialPort */
 typedef struct {
+    nsresult (*GetEnabled)(ISerialPort *port, PRBool *enabled);
     nsresult (*SetEnabled)(ISerialPort *port, PRBool enabled);
+    nsresult (*GetPath)(ISerialPort *port, PRUnichar **path);
     nsresult (*SetPath)(ISerialPort *port, PRUnichar *path);
+    nsresult (*GetIRQ)(ISerialPort *port, PRUint32 *IRQ);
     nsresult (*SetIRQ)(ISerialPort *port, PRUint32 IRQ);
+    nsresult (*GetIOBase)(ISerialPort *port, PRUint32 *IOBase);
     nsresult (*SetIOBase)(ISerialPort *port, PRUint32 IOBase);
+    nsresult (*GetHostMode)(ISerialPort *port, PRUint32 *hostMode);
     nsresult (*SetHostMode)(ISerialPort *port, PRUint32 hostMode);
 } vboxUniformedISerialPort;
 
 /* Functions for IParallelPort */
 typedef struct {
+    nsresult (*GetEnabled)(IParallelPort *port, PRBool *enabled);
     nsresult (*SetEnabled)(IParallelPort *port, PRBool enabled);
+    nsresult (*GetPath)(IParallelPort *port, PRUnichar **path);
     nsresult (*SetPath)(IParallelPort *port, PRUnichar *path);
+    nsresult (*GetIRQ)(IParallelPort *port, PRUint32 *IRQ);
     nsresult (*SetIRQ)(IParallelPort *port, PRUint32 IRQ);
+    nsresult (*GetIOBase)(IParallelPort *port, PRUint32 *IOBase);
     nsresult (*SetIOBase)(IParallelPort *port, PRUint32 IOBase);
 } vboxUniformedIParallelPort;
 
 /* Functions for IVRDPServer and IVRDEServer */
 typedef struct {
+    nsresult (*GetEnabled)(IVRDxServer *VRDxServer, PRBool *enabled);
     nsresult (*SetEnabled)(IVRDxServer *VRDxServer, PRBool enabled);
+    nsresult (*GetPorts)(vboxGlobalData *data, IVRDxServer *VRDxServer,
+                         virDomainGraphicsDefPtr graphics);
     nsresult (*SetPorts)(vboxGlobalData *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,
+                              PRUnichar **netAddress);
     nsresult (*SetNetAddress)(vboxGlobalData *data, IVRDxServer *VRDxServer,
                               PRUnichar *netAddress);
 } vboxUniformedIVRDxServer;
@@ -325,6 +363,7 @@ typedef struct {
 /* Common Functions for IUSBController and IUSBDeviceFilters */
 typedef struct {
     nsresult (*Enable)(IUSBCommon *USBCommon);
+    nsresult (*GetEnabled)(IUSBCommon *USBCommon, PRBool *enabled);
     nsresult (*CreateDeviceFilter)(IUSBCommon *USBCommon, PRUnichar *name,
                                    IUSBDeviceFilter **filter);
     nsresult (*InsertDeviceFilter)(IUSBCommon *USBCommon, PRUint32 position,
@@ -332,18 +371,45 @@ typedef struct {
 } vboxUniformedIUSBCommon;
 
 typedef struct {
+    nsresult (*GetProductId)(IUSBDeviceFilter *USBDeviceFilter, PRUnichar **productId);
     nsresult (*SetProductId)(IUSBDeviceFilter *USBDeviceFilter, PRUnichar *productId);
+    nsresult (*GetActive)(IUSBDeviceFilter *USBDeviceFilter, PRBool *active);
     nsresult (*SetActive)(IUSBDeviceFilter *USBDeviceFilter, PRBool active);
+    nsresult (*GetVendorId)(IUSBDeviceFilter *USBDeviceFilter, PRUnichar **vendorId);
     nsresult (*SetVendorId)(IUSBDeviceFilter *USBDeviceFilter, PRUnichar *vendorId);
 } vboxUniformedIUSBDeviceFilter;
 
 /* Functions for IMedium */
 typedef struct {
     nsresult (*GetId)(IMedium *medium, vboxIIDUnion *iidu);
+    nsresult (*GetLocation)(IMedium *medium, PRUnichar **location);
+    nsresult (*GetReadOnly)(IMedium *medium, PRBool *readOnly);
     nsresult (*Release)(IMedium *medium);
     nsresult (*SetType)(IMedium *medium, PRUint32 type);
 } vboxUniformedIMedium;
 
+/* Functions for IMediumAttachment */
+typedef struct {
+    nsresult (*GetMedium)(IMediumAttachment *mediumAttachment, IMedium **medium);
+    nsresult (*GetController)(IMediumAttachment *mediumAttachment, PRUnichar **controller);
+    nsresult (*GetType)(IMediumAttachment *mediumAttachment, PRUint32 *type);
+    nsresult (*GetPort)(IMediumAttachment *mediumAttachment, PRInt32 *port);
+    nsresult (*GetDevice)(IMediumAttachment *mediumAttachment, PRInt32 *device);
+} vboxUniformedIMediumAttachment;
+
+
+/* Functions for IStorageController */
+typedef struct {
+    nsresult (*GetBus)(IStorageController *storageController, PRUint32 *bus);
+} vboxUniformedIStorageController;
+
+/* Functions for ISharedFolder */
+typedef struct {
+    nsresult (*GetHostPath)(ISharedFolder *sharedFolder, PRUnichar **hostPath);
+    nsresult (*GetName)(ISharedFolder *sharedFolder, PRUnichar **name);
+    nsresult (*GetWritable)(ISharedFolder *sharedFolder, PRBool *writable);
+} vboxUniformedISharedFolder;
+
 typedef struct {
     bool (*Online)(PRUint32 state);
     bool (*NotStart)(PRUint32 state);
@@ -364,6 +430,9 @@ typedef struct {
     void (*deleteConfig)(IMachine *machine);
     void (*vboxAttachDrivesOld)(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine);
     virDomainState (*vboxConvertState)(PRUint32 state);
+    void (*dumpIDEHDDsOld)(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine);
+    void (*dumpDVD)(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine);
+    void (*dumpFloppy)(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine);
     vboxUniformedPFN UPFN;
     vboxUniformedIID UIID;
     vboxUniformedArray UArray;
@@ -383,6 +452,9 @@ typedef struct {
     vboxUniformedIUSBCommon UIUSBCommon;
     vboxUniformedIUSBDeviceFilter UIUSBDeviceFilter;
     vboxUniformedIMedium UIMedium;
+    vboxUniformedIMediumAttachment UIMediumAttachment;
+    vboxUniformedIStorageController UIStorageController;
+    vboxUniformedISharedFolder UISharedFolder;
     uniformedMachineStateChecker machineStateChecker;
     /* vbox API features */
     bool domainEventCallbacks;
@@ -392,6 +464,7 @@ typedef struct {
     bool chipsetType;
     bool accelerate2DVideo;
     bool vboxAttachDrivesUseOld;
+    bool oldMediumInterface;
 } vboxUniformedAPI;
 
 /* libvirt API
-- 
1.7.9.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]