VirtualBox

Changeset 42551 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Aug 2, 2012 4:44:39 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
79727
Message:

Main: big API naming cleanup, use all caps acronyms everywhere, including SDK docs
Frontends/VBoxManage: implement guestcontrol execute for new API, disabled by default

Location:
trunk/src/VBox/Main/src-client
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/BusAssignmentManager.cpp

    r37423 r42551  
    77
    88/*
    9  * Copyright (C) 2010 Oracle Corporation
     9 * Copyright (C) 2010-2012 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2626
    2727
    28 #include "PciDeviceAttachmentImpl.h"
     28#include "PCIDeviceAttachmentImpl.h"
    2929
    3030#include <map>
     
    217217struct BusAssignmentManager::State
    218218{
    219     struct PciDeviceRecord
     219    struct PCIDeviceRecord
    220220    {
    221221        char          szDevName[32];
    222         PciBusAddress HostAddress;
    223 
    224         PciDeviceRecord(const char* pszName, PciBusAddress aHostAddress)
     222        PCIBusAddress HostAddress;
     223
     224        PCIDeviceRecord(const char* pszName, PCIBusAddress aHostAddress)
    225225        {
    226226            RTStrCopy(this->szDevName, sizeof(szDevName), pszName);
     
    228228        }
    229229
    230         PciDeviceRecord(const char* pszName)
     230        PCIDeviceRecord(const char* pszName)
    231231        {
    232232            RTStrCopy(this->szDevName, sizeof(szDevName), pszName);
    233233        }
    234234
    235         bool operator<(const PciDeviceRecord &a) const
     235        bool operator<(const PCIDeviceRecord &a) const
    236236        {
    237237            return RTStrNCmp(szDevName, a.szDevName, sizeof(szDevName)) < 0;
    238238        }
    239239
    240         bool operator==(const PciDeviceRecord &a) const
     240        bool operator==(const PCIDeviceRecord &a) const
    241241        {
    242242            return RTStrNCmp(szDevName, a.szDevName, sizeof(szDevName)) == 0;
     
    244244    };
    245245
    246     typedef std::map <PciBusAddress,PciDeviceRecord > PciMap;
    247     typedef std::vector<PciBusAddress>                PciAddrList;
    248     typedef std::vector<const DeviceAssignmentRule*>  PciRulesList;
    249     typedef std::map <PciDeviceRecord,PciAddrList >   ReversePciMap;
     246    typedef std::map <PCIBusAddress,PCIDeviceRecord > PCIMap;
     247    typedef std::vector<PCIBusAddress>                PCIAddrList;
     248    typedef std::vector<const DeviceAssignmentRule*>  PCIRulesList;
     249    typedef std::map <PCIDeviceRecord,PCIAddrList >   ReversePCIMap;
    250250
    251251    volatile int32_t cRefCnt;
    252252    ChipsetType_T    mChipsetType;
    253     PciMap           mPciMap;
    254     ReversePciMap    mReversePciMap;
     253    PCIMap           mPCIMap;
     254    ReversePCIMap    mReversePCIMap;
    255255
    256256    State()
     
    262262    HRESULT init(ChipsetType_T chipsetType);
    263263
    264     HRESULT record(const char* pszName, PciBusAddress& GuestAddress, PciBusAddress HostAddress);
    265     HRESULT autoAssign(const char* pszName, PciBusAddress& Address);
    266     bool    checkAvailable(PciBusAddress& Address);
    267     bool    findPciAddress(const char* pszDevName, int iInstance, PciBusAddress& Address);
     264    HRESULT record(const char* pszName, PCIBusAddress& GuestAddress, PCIBusAddress HostAddress);
     265    HRESULT autoAssign(const char* pszName, PCIBusAddress& Address);
     266    bool    checkAvailable(PCIBusAddress& Address);
     267    bool    findPCIAddress(const char* pszDevName, int iInstance, PCIBusAddress& Address);
    268268
    269269    const char* findAlias(const char* pszName);
    270     void addMatchingRules(const char* pszName, PciRulesList& aList);
    271     void listAttachedPciDevices(ComSafeArrayOut(IPciDeviceAttachment*, aAttached));
     270    void addMatchingRules(const char* pszName, PCIRulesList& aList);
     271    void listAttachedPCIDevices(ComSafeArrayOut(IPCIDeviceAttachment*, aAttached));
    272272};
    273273
     
    278278}
    279279
    280 HRESULT BusAssignmentManager::State::record(const char* pszName, PciBusAddress& Address, PciBusAddress HostAddress)
    281 {
    282     PciDeviceRecord devRec(pszName, HostAddress);
     280HRESULT BusAssignmentManager::State::record(const char* pszName, PCIBusAddress& Address, PCIBusAddress HostAddress)
     281{
     282    PCIDeviceRecord devRec(pszName, HostAddress);
    283283
    284284    /* Remember address -> device mapping */
    285     mPciMap.insert(PciMap::value_type(Address, devRec));
    286 
    287     ReversePciMap::iterator it = mReversePciMap.find(devRec);
    288     if (it == mReversePciMap.end())
    289     {
    290         mReversePciMap.insert(ReversePciMap::value_type(devRec, PciAddrList()));
    291         it = mReversePciMap.find(devRec);
     285    mPCIMap.insert(PCIMap::value_type(Address, devRec));
     286
     287    ReversePCIMap::iterator it = mReversePCIMap.find(devRec);
     288    if (it == mReversePCIMap.end())
     289    {
     290        mReversePCIMap.insert(ReversePCIMap::value_type(devRec, PCIAddrList()));
     291        it = mReversePCIMap.find(devRec);
    292292    }
    293293
     
    298298}
    299299
    300 bool    BusAssignmentManager::State::findPciAddress(const char* pszDevName, int iInstance, PciBusAddress& Address)
    301 {
    302     PciDeviceRecord devRec(pszDevName);
    303 
    304     ReversePciMap::iterator it = mReversePciMap.find(devRec);
    305     if (it == mReversePciMap.end())
     300bool    BusAssignmentManager::State::findPCIAddress(const char* pszDevName, int iInstance, PCIBusAddress& Address)
     301{
     302    PCIDeviceRecord devRec(pszDevName);
     303
     304    ReversePCIMap::iterator it = mReversePCIMap.find(devRec);
     305    if (it == mReversePCIMap.end())
    306306        return false;
    307307
     
    313313}
    314314
    315 void BusAssignmentManager::State::addMatchingRules(const char* pszName, PciRulesList& aList)
     315void BusAssignmentManager::State::addMatchingRules(const char* pszName, PCIRulesList& aList)
    316316{
    317317    size_t iRuleset, iRule;
     
    359359}
    360360
    361 HRESULT BusAssignmentManager::State::autoAssign(const char* pszName, PciBusAddress& Address)
    362 {
    363     PciRulesList matchingRules;
     361HRESULT BusAssignmentManager::State::autoAssign(const char* pszName, PCIBusAddress& Address)
     362{
     363    PCIRulesList matchingRules;
    364364
    365365    addMatchingRules(pszName,  matchingRules);
     
    388388}
    389389
    390 bool BusAssignmentManager::State::checkAvailable(PciBusAddress& Address)
    391 {
    392     PciMap::const_iterator it = mPciMap.find(Address);
    393 
    394     return (it == mPciMap.end());
    395 }
    396 
    397 
    398 void BusAssignmentManager::State::listAttachedPciDevices(ComSafeArrayOut(IPciDeviceAttachment*, aAttached))
    399 {
    400     com::SafeIfaceArray<IPciDeviceAttachment> result(mPciMap.size());
     390bool BusAssignmentManager::State::checkAvailable(PCIBusAddress& Address)
     391{
     392    PCIMap::const_iterator it = mPCIMap.find(Address);
     393
     394    return (it == mPCIMap.end());
     395}
     396
     397
     398void BusAssignmentManager::State::listAttachedPCIDevices(ComSafeArrayOut(IPCIDeviceAttachment*, aAttached))
     399{
     400    com::SafeIfaceArray<IPCIDeviceAttachment> result(mPCIMap.size());
    401401
    402402    size_t iIndex = 0;
    403     ComObjPtr<PciDeviceAttachment> dev;
    404     for (PciMap::const_iterator it = mPciMap.begin(); it !=  mPciMap.end(); ++it)
     403    ComObjPtr<PCIDeviceAttachment> dev;
     404    for (PCIMap::const_iterator it = mPCIMap.begin(); it !=  mPCIMap.end(); ++it)
    405405    {
    406406        dev.createObject();
     
    458458}
    459459
    460 HRESULT BusAssignmentManager::assignPciDeviceImpl(const char* pszDevName,
     460HRESULT BusAssignmentManager::assignPCIDeviceImpl(const char* pszDevName,
    461461                                                  PCFGMNODE pCfg,
    462                                                   PciBusAddress& GuestAddress,
    463                                                   PciBusAddress HostAddress,
     462                                                  PCIBusAddress& GuestAddress,
     463                                                  PCIBusAddress HostAddress,
    464464                                                  bool fGuestAddressRequired)
    465465{
     
    504504
    505505
    506 bool BusAssignmentManager::findPciAddress(const char* pszDevName, int iInstance, PciBusAddress& Address)
    507 {
    508     return pState->findPciAddress(pszDevName, iInstance, Address);
    509 }
    510 
    511 void BusAssignmentManager::listAttachedPciDevices(ComSafeArrayOut(IPciDeviceAttachment*, aAttached))
    512 {
    513     pState->listAttachedPciDevices(ComSafeArrayOutArg(aAttached));
    514 }
     506bool BusAssignmentManager::findPCIAddress(const char* pszDevName, int iInstance, PCIBusAddress& Address)
     507{
     508    return pState->findPCIAddress(pszDevName, iInstance, Address);
     509}
     510
     511void BusAssignmentManager::listAttachedPCIDevices(ComSafeArrayOut(IPCIDeviceAttachment*, aAttached))
     512{
     513    pState->listAttachedPCIDevices(ComSafeArrayOutArg(aAttached));
     514}
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r42382 r42551  
    325325                Bstr hostIp, guestIp;
    326326                LONG hostPort, guestPort;
    327                 pNREv->COMGETTER(HostIp)(hostIp.asOutParam());
     327                pNREv->COMGETTER(HostIP)(hostIp.asOutParam());
    328328                pNREv->COMGETTER(HostPort)(&hostPort);
    329                 pNREv->COMGETTER(GuestIp)(guestIp.asOutParam());
     329                pNREv->COMGETTER(GuestIP)(guestIp.asOutParam());
    330330                pNREv->COMGETTER(GuestPort)(&guestPort);
    331331                ULONG ulSlot;
     
    338338            break;
    339339
    340             case VBoxEventType_OnHostPciDevicePlug:
     340            case VBoxEventType_OnHostPCIDevicePlug:
    341341            {
    342342                // handle if needed
     
    555555            com::SafeArray<VBoxEventType_T> eventTypes;
    556556            eventTypes.push_back(VBoxEventType_OnNATRedirect);
    557             eventTypes.push_back(VBoxEventType_OnHostPciDevicePlug);
     557            eventTypes.push_back(VBoxEventType_OnHostPCIDevicePlug);
    558558            rc = pES->RegisterListener(aVmListener, ComSafeArrayAsInParam(eventTypes), true);
    559559            AssertComRC(rc);
     
    19231923}
    19241924
    1925 STDMETHODIMP Console::COMGETTER(AttachedPciDevices)(ComSafeArrayOut(IPciDeviceAttachment *, aAttachments))
     1925STDMETHODIMP Console::COMGETTER(AttachedPCIDevices)(ComSafeArrayOut(IPCIDeviceAttachment *, aAttachments))
    19261926{
    19271927    CheckComArgOutSafeArrayPointerValid(aAttachments);
     
    19331933
    19341934    if (mBusMgr)
    1935         mBusMgr->listAttachedPciDevices(ComSafeArrayOutArg(aAttachments));
     1935        mBusMgr->listAttachedPCIDevices(ComSafeArrayOutArg(aAttachments));
    19361936    else
    19371937    {
    1938         com::SafeIfaceArray<IPciDeviceAttachment> result((size_t)0);
     1938        com::SafeIfaceArray<IPCIDeviceAttachment> result((size_t)0);
    19391939        result.detachTo(ComSafeArrayOutArg(aAttachments));
    19401940    }
     
    37753775                                             fUseHostIOCache,
    37763776                                             false /* fSetupMerge */,
    3777                                              false /* fBuiltinIoCache */,
     3777                                             false /* fBuiltinIOCache */,
    37783778                                             0 /* uMergeSource */,
    37793779                                             0 /* uMergeTarget */,
     
    40204020                                             fUseHostIOCache,
    40214021                                             false /* fSetupMerge */,
    4022                                              false /* fBuiltinIoCache */,
     4022                                             false /* fBuiltinIOCache */,
    40234023                                             0 /* uMergeSource */,
    40244024                                             0 /* uMergeTarget */,
     
    44364436 */
    44374437HRESULT Console::onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove,
    4438                                          NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort)
     4438                                         NATProtocol_T aProto, IN_BSTR aHostIP, LONG aHostPort, IN_BSTR aGuestIP, LONG aGuestPort)
    44394439{
    44404440    LogFlowThisFunc(("\n"));
     
    45074507            bool fUdp = aProto == NATProtocol_UDP;
    45084508            vrc = pNetNatCfg->pfnRedirectRuleCommand(pNetNatCfg, !!aNatRuleRemove, fUdp,
    4509                                                      Utf8Str(aHostIp).c_str(), aHostPort, Utf8Str(aGuestIp).c_str(),
     4509                                                     Utf8Str(aHostIP).c_str(), aHostPort, Utf8Str(aGuestIP).c_str(),
    45104510                                                     aGuestPort);
    45114511            if (RT_FAILURE(vrc))
     
    55585558    /** @todo AssertComRC -> AssertComRCReturn! Could potentially end up
    55595559     *        using uninitialized variables here. */
    5560     BOOL fBuiltinIoCache;
    5561     rc = mMachine->COMGETTER(IoCacheEnabled)(&fBuiltinIoCache);
     5560    BOOL fBuiltinIOCache;
     5561    rc = mMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache);
    55625562    AssertComRC(rc);
    55635563    SafeIfaceArray<IStorageController> ctrls;
     
    56435643                          enmBus,
    56445644                          fUseHostIOCache,
    5645                           fBuiltinIoCache,
     5645                          fBuiltinIOCache,
    56465646                          true /* fSetupMerge */,
    56475647                          aSourceIdx,
     
    57195719                          enmBus,
    57205720                          fUseHostIOCache,
    5721                           fBuiltinIoCache,
     5721                          fBuiltinIOCache,
    57225722                          false /* fSetupMerge */,
    57235723                          0 /* uMergeSource */,
     
    90969096                                                       StorageBus_T enmBus,
    90979097                                                       bool fUseHostIOCache,
    9098                                                        bool fBuiltinIoCache,
     9098                                                       bool fBuiltinIOCache,
    90999099                                                       bool fSetupMerge,
    91009100                                                       unsigned uMergeSource,
     
    91319131                                          enmBus,
    91329132                                          fUseHostIOCache,
    9133                                           fBuiltinIoCache,
     9133                                          fBuiltinIOCache,
    91349134                                          fSetupMerge,
    91359135                                          uMergeSource,
     
    93149314                const char *pcszDevice = Console::convertControllerTypeToDev(enmController);
    93159315
    9316                 BOOL fBuiltinIoCache;
    9317                 rc = that->mMachine->COMGETTER(IoCacheEnabled)(&fBuiltinIoCache);
     9316                BOOL fBuiltinIOCache;
     9317                rc = that->mMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache);
    93189318                if (FAILED(rc))
    93199319                    throw rc;
     
    93339333                                      enmBus,
    93349334                                      fUseHostIOCache,
    9335                                       fBuiltinIoCache,
     9335                                      fBuiltinIOCache,
    93369336                                      false /* fSetupMerge */,
    93379337                                      0 /* uMergeSource */,
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r42437 r42551  
    3838#include "Global.h"
    3939#ifdef VBOX_WITH_PCI_PASSTHROUGH
    40 # include "PciRawDevImpl.h"
     40# include "PCIRawDevImpl.h"
    4141#endif
    4242
     
    217217{
    218218    ULONG          mInstance;
    219     PciBusAddress  mPciAddress;
     219    PCIBusAddress  mPCIAddress;
    220220
    221221    ULONG          mBootPrio;
     
    466466
    467467#ifdef VBOX_WITH_PCI_PASSTHROUGH
    468 HRESULT Console::attachRawPciDevices(PVM pVM,
     468HRESULT Console::attachRawPCIDevices(PVM pVM,
    469469                                     BusAssignmentManager *BusMgr,
    470470                                     PCFGMNODE            pDevices)
     
    473473    PCFGMNODE pInst, pCfg, pLunL0, pLunL1;
    474474
    475     SafeIfaceArray<IPciDeviceAttachment> assignments;
     475    SafeIfaceArray<IPCIDeviceAttachment> assignments;
    476476    ComPtr<IMachine> aMachine = machine();
    477477
    478     hrc = aMachine->COMGETTER(PciDeviceAssignments)(ComSafeArrayAsOutParam(assignments));
     478    hrc = aMachine->COMGETTER(PCIDeviceAssignments)(ComSafeArrayAsOutParam(assignments));
    479479    if (   hrc != S_OK
    480480        || assignments.size() < 1)
     
    490490     */
    491491# ifdef VBOX_WITH_EXTPACK
    492     static const char *s_pszPciRawExtPackName = "Oracle VM VirtualBox Extension Pack";
    493     if (!mptrExtPackManager->isExtPackUsable(s_pszPciRawExtPackName))
     492    static const char *s_pszPCIRawExtPackName = "Oracle VM VirtualBox Extension Pack";
     493    if (!mptrExtPackManager->isExtPackUsable(s_pszPCIRawExtPackName))
    494494    {
    495495        /* Always fatal! */
     
    498498                   "The VM cannot be started. To fix this problem, either "
    499499                   "install the '%s' or disable PCI passthrough via VBoxManage"),
    500                 s_pszPciRawExtPackName);
     500                s_pszPCIRawExtPackName);
    501501    }
    502502# endif
     
    508508    for (size_t iDev = 0; iDev < assignments.size(); iDev++)
    509509    {
    510         ComPtr<IPciDeviceAttachment> assignment = assignments[iDev];
     510        ComPtr<IPCIDeviceAttachment> assignment = assignments[iDev];
    511511        LONG guest = 0;
    512         PciBusAddress GuestPciAddress;
     512        PCIBusAddress GuestPCIAddress;
    513513
    514514        assignment->COMGETTER(GuestAddress)(&guest);
    515         GuestPciAddress.fromLong(guest);
    516         Assert(GuestPciAddress.valid());
    517 
    518         if (GuestPciAddress.miBus > 0)
     515        GuestPCIAddress.fromLong(guest);
     516        Assert(GuestPCIAddress.valid());
     517
     518        if (GuestPCIAddress.miBus > 0)
    519519        {
    520520            int iBridgesMissed = 0;
    521             int iBase = GuestPciAddress.miBus - 1;
    522 
    523             while (!BusMgr->hasPciDevice("ich9pcibridge", iBase) && iBase > 0)
     521            int iBase = GuestPCIAddress.miBus - 1;
     522
     523            while (!BusMgr->hasPCIDevice("ich9pcibridge", iBase) && iBase > 0)
    524524            {
    525525                iBridgesMissed++; iBase--;
     
    531531                InsertConfigNode(pBridges, Utf8StrFmt("%d", iBase + iBridge).c_str(), &pInst);
    532532                InsertConfigInteger(pInst, "Trusted",              1);
    533                 hrc = BusMgr->assignPciDevice("ich9pcibridge", pInst);
     533                hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst);
    534534            }
    535535        }
     
    537537
    538538    /* Now actually add devices */
    539     PCFGMNODE pPciDevs = NULL;
     539    PCFGMNODE pPCIDevs = NULL;
    540540
    541541    if (assignments.size() > 0)
    542542    {
    543         InsertConfigNode(pDevices, "pciraw",  &pPciDevs);
     543        InsertConfigNode(pDevices, "pciraw",  &pPCIDevs);
    544544
    545545        PCFGMNODE pRoot = CFGMR3GetParent(pDevices); Assert(pRoot);
    546546
    547         /* Tell PGM to tell GPciRaw about guest mappings. */
     547        /* Tell PGM to tell GPCIRaw about guest mappings. */
    548548        CFGMR3InsertNode(pRoot, "PGM", NULL);
    549549        InsertConfigInteger(CFGMR3GetChild(pRoot, "PGM"), "PciPassThrough", 1);
     
    560560    for (size_t iDev = 0; iDev < assignments.size(); iDev++)
    561561    {
    562         PciBusAddress HostPciAddress, GuestPciAddress;
    563         ComPtr<IPciDeviceAttachment> assignment = assignments[iDev];
     562        PCIBusAddress HostPCIAddress, GuestPCIAddress;
     563        ComPtr<IPCIDeviceAttachment> assignment = assignments[iDev];
    564564        LONG host, guest;
    565565        Bstr aDevName;
     
    569569        assignment->COMGETTER(Name)(aDevName.asOutParam());
    570570
    571         InsertConfigNode(pPciDevs, Utf8StrFmt("%d", iDev).c_str(), &pInst);
     571        InsertConfigNode(pPCIDevs, Utf8StrFmt("%d", iDev).c_str(), &pInst);
    572572        InsertConfigInteger(pInst, "Trusted", 1);
    573573
    574         HostPciAddress.fromLong(host);
    575         Assert(HostPciAddress.valid());
     574        HostPCIAddress.fromLong(host);
     575        Assert(HostPCIAddress.valid());
    576576        InsertConfigNode(pInst,        "Config",  &pCfg);
    577577        InsertConfigString(pCfg,       "DeviceName",  aDevName);
    578578
    579579        InsertConfigInteger(pCfg,      "DetachHostDriver",  1);
    580         InsertConfigInteger(pCfg,      "HostPCIBusNo",      HostPciAddress.miBus);
    581         InsertConfigInteger(pCfg,      "HostPCIDeviceNo",   HostPciAddress.miDevice);
    582         InsertConfigInteger(pCfg,      "HostPCIFunctionNo", HostPciAddress.miFn);
    583 
    584         GuestPciAddress.fromLong(guest);
    585         Assert(GuestPciAddress.valid());
    586         hrc = BusMgr->assignHostPciDevice("pciraw", pInst, HostPciAddress, GuestPciAddress, true);
     580        InsertConfigInteger(pCfg,      "HostPCIBusNo",      HostPCIAddress.miBus);
     581        InsertConfigInteger(pCfg,      "HostPCIDeviceNo",   HostPCIAddress.miDevice);
     582        InsertConfigInteger(pCfg,      "HostPCIFunctionNo", HostPCIAddress.miFn);
     583
     584        GuestPCIAddress.fromLong(guest);
     585        Assert(GuestPCIAddress.valid());
     586        hrc = BusMgr->assignHostPCIDevice("pciraw", pInst, HostPCIAddress, GuestPCIAddress, true);
    587587        if (hrc != S_OK)
    588588            return hrc;
    589589
    590         InsertConfigInteger(pCfg,      "GuestPCIBusNo",      GuestPciAddress.miBus);
    591         InsertConfigInteger(pCfg,      "GuestPCIDeviceNo",   GuestPciAddress.miDevice);
    592         InsertConfigInteger(pCfg,      "GuestPCIFunctionNo", GuestPciAddress.miFn);
     590        InsertConfigInteger(pCfg,      "GuestPCIBusNo",      GuestPCIAddress.miBus);
     591        InsertConfigInteger(pCfg,      "GuestPCIDeviceNo",   GuestPCIAddress.miDevice);
     592        InsertConfigInteger(pCfg,      "GuestPCIFunctionNo", GuestPCIAddress.miFn);
    593593
    594594        /* the driver */
     
    600600        InsertConfigString(pLunL1,     "Driver", "MainPciRaw");
    601601        InsertConfigNode(pLunL1,       "Config", &pCfg);
    602         PciRawDev* pMainDev = new PciRawDev(this);
     602        PCIRawDev* pMainDev = new PCIRawDev(this);
    603603        InsertConfigInteger(pCfg,      "Object", (uintptr_t)pMainDev);
    604604    }
     
    10021002        /* I/O cache size */
    10031003        ULONG ioCacheSize = 5;
    1004         hrc = pMachine->COMGETTER(IoCacheSize)(&ioCacheSize);                               H();
     1004        hrc = pMachine->COMGETTER(IOCacheSize)(&ioCacheSize);                               H();
    10051005        InsertConfigInteger(pPDMBlkCache, "CacheSize", ioCacheSize * _1M);
    10061006
     
    11001100         * PCI buses.
    11011101         */
    1102         uint32_t uIocPciAddress, uHbcPciAddress;
     1102        uint32_t uIocPCIAddress, uHbcPCIAddress;
    11031103        switch (chipsetType)
    11041104        {
     
    11071107            case ChipsetType_PIIX3:
    11081108                InsertConfigNode(pDevices, "pci", &pDev);
    1109                 uHbcPciAddress = (0x0 << 16) | 0;
    1110                 uIocPciAddress = (0x1 << 16) | 0; // ISA controller
     1109                uHbcPCIAddress = (0x0 << 16) | 0;
     1110                uIocPCIAddress = (0x1 << 16) | 0; // ISA controller
    11111111                break;
    11121112            case ChipsetType_ICH9:
    11131113                InsertConfigNode(pDevices, "ich9pci", &pDev);
    1114                 uHbcPciAddress = (0x1e << 16) | 0;
    1115                 uIocPciAddress = (0x1f << 16) | 0; // LPC controller
     1114                uHbcPCIAddress = (0x1e << 16) | 0;
     1115                uIocPCIAddress = (0x1f << 16) | 0; // LPC controller
    11161116                break;
    11171117        }
     
    11311131            InsertConfigNode(pDev,     "0", &pInst);
    11321132            InsertConfigInteger(pInst, "Trusted",              1); /* boolean */
    1133             hrc = BusMgr->assignPciDevice("ich9pcibridge", pInst);                          H();
     1133            hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst);                          H();
    11341134
    11351135            InsertConfigNode(pDev,     "1", &pInst);
    11361136            InsertConfigInteger(pInst, "Trusted",              1); /* boolean */
    1137             hrc = BusMgr->assignPciDevice("ich9pcibridge", pInst);                          H();
     1137            hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst);                          H();
    11381138
    11391139#ifdef VBOX_WITH_PCI_PASSTHROUGH
    11401140            /* Add PCI passthrough devices */
    1141             hrc = attachRawPciDevices(pVM, BusMgr, pDevices);                               H();
     1141            hrc = attachRawPCIDevices(pVM, BusMgr, pDevices);                               H();
    11421142#endif
    11431143        }
     
    11501150         * High Precision Event Timer (HPET)
    11511151         */
    1152         BOOL fHpetEnabled;
     1152        BOOL fHPETEnabled;
    11531153        /* Other guests may wish to use HPET too, but MacOS X not functional without it */
    1154         hrc = pMachine->COMGETTER(HpetEnabled)(&fHpetEnabled);                              H();
     1154        hrc = pMachine->COMGETTER(HPETEnabled)(&fHPETEnabled);                              H();
    11551155        /* so always enable HPET in extended profile */
    1156         fHpetEnabled |= fOsXGuest;
     1156        fHPETEnabled |= fOsXGuest;
    11571157        /* HPET is always present on ICH9 */
    1158         fHpetEnabled |= (chipsetType == ChipsetType_ICH9);
    1159         if (fHpetEnabled)
     1158        fHPETEnabled |= (chipsetType == ChipsetType_ICH9);
     1159        if (fHPETEnabled)
    11601160        {
    11611161            InsertConfigNode(pDevices, "hpet", &pDev);
     
    11971197            InsertConfigNode(pDevices, "lpc", &pDev);
    11981198            InsertConfigNode(pDev,     "0", &pInst);
    1199             hrc = BusMgr->assignPciDevice("lpc", pInst);                                    H();
     1199            hrc = BusMgr->assignPCIDevice("lpc", pInst);                                    H();
    12001200            InsertConfigInteger(pInst, "Trusted",   1); /* boolean */
    12011201        }
     
    12931293        InsertConfigInteger(pInst, "Trusted",              1); /* boolean */
    12941294
    1295         hrc = BusMgr->assignPciDevice("vga", pInst);                                        H();
     1295        hrc = BusMgr->assignPCIDevice("vga", pInst);                                        H();
    12961296        InsertConfigNode(pInst,    "Config", &pCfg);
    12971297        ULONG cVRamMBs;
     
    15641564                case StorageControllerType_LsiLogic:
    15651565                {
    1566                     hrc = BusMgr->assignPciDevice("lsilogic", pCtlInst);                    H();
     1566                    hrc = BusMgr->assignPCIDevice("lsilogic", pCtlInst);                    H();
    15671567
    15681568                    InsertConfigInteger(pCfg, "Bootable",  fBootable);
     
    15781578                case StorageControllerType_BusLogic:
    15791579                {
    1580                     hrc = BusMgr->assignPciDevice("buslogic", pCtlInst);                    H();
     1580                    hrc = BusMgr->assignPCIDevice("buslogic", pCtlInst);                    H();
    15811581
    15821582                    InsertConfigInteger(pCfg, "Bootable",  fBootable);
     
    15921592                case StorageControllerType_IntelAhci:
    15931593                {
    1594                     hrc = BusMgr->assignPciDevice("ahci", pCtlInst);                        H();
     1594                    hrc = BusMgr->assignPCIDevice("ahci", pCtlInst);                        H();
    15951595
    15961596                    ULONG cPorts = 0;
     
    16001600
    16011601                    /* Needed configuration values for the bios, only first controller. */
    1602                     if (!BusMgr->hasPciDevice("ahci", 1))
     1602                    if (!BusMgr->hasPCIDevice("ahci", 1))
    16031603                    {
    16041604                        if (pBiosCfg)
     
    16351635                     * IDE (update this when the main interface changes)
    16361636                     */
    1637                     hrc = BusMgr->assignPciDevice("piix3ide", pCtlInst);                    H();
     1637                    hrc = BusMgr->assignPCIDevice("piix3ide", pCtlInst);                    H();
    16381638                    InsertConfigString(pCfg,   "Type", controllerString(enmCtrlType));
    16391639                    /* Attach the status driver */
     
    16711671                case StorageControllerType_LsiLogicSas:
    16721672                {
    1673                     hrc = BusMgr->assignPciDevice("lsilogicsas", pCtlInst);                 H();
     1673                    hrc = BusMgr->assignPCIDevice("lsilogicsas", pCtlInst);                 H();
    16741674
    16751675                    InsertConfigString(pCfg,  "ControllerType", "SAS1068");
     
    16941694
    16951695            /* Builtin I/O cache - per device setting. */
    1696             BOOL fBuiltinIoCache = true;
    1697             hrc = pMachine->COMGETTER(IoCacheEnabled)(&fBuiltinIoCache);                    H();
     1696            BOOL fBuiltinIOCache = true;
     1697            hrc = pMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache);                    H();
    16981698
    16991699
     
    17061706                                            enmBus,
    17071707                                            !!fUseHostIOCache,
    1708                                             !!fBuiltinIoCache,
     1708                                            !!fBuiltinIOCache,
    17091709                                            false /* fSetupMerge */,
    17101710                                            0 /* uMergeSource */,
     
    17891789            /* the first network card gets the PCI ID 3, the next 3 gets 8..10,
    17901790             * next 4 get 16..19. */
    1791             int iPciDeviceNo;
     1791            int iPCIDeviceNo;
    17921792            switch (ulInstance)
    17931793            {
    17941794                case 0:
    1795                     iPciDeviceNo = 3;
     1795                    iPCIDeviceNo = 3;
    17961796                    break;
    17971797                case 1: case 2: case 3:
    1798                     iPciDeviceNo = ulInstance - 1 + 8;
     1798                    iPCIDeviceNo = ulInstance - 1 + 8;
    17991799                    break;
    18001800                case 4: case 5: case 6: case 7:
    1801                     iPciDeviceNo = ulInstance - 4 + 16;
     1801                    iPCIDeviceNo = ulInstance - 4 + 16;
    18021802                    break;
    18031803                default:
    18041804                    /* auto assignment */
    1805                     iPciDeviceNo = -1;
     1805                    iPCIDeviceNo = -1;
    18061806                    break;
    18071807            }
     
    18111811             * it assigns slot 11 to the first network controller.
    18121812             */
    1813             if (iPciDeviceNo == 3 && adapterType == NetworkAdapterType_I82545EM)
    1814             {
    1815                 iPciDeviceNo = 0x11;
     1813            if (iPCIDeviceNo == 3 && adapterType == NetworkAdapterType_I82545EM)
     1814            {
     1815                iPCIDeviceNo = 0x11;
    18161816                fSwapSlots3and11 = true;
    18171817            }
    1818             else if (iPciDeviceNo == 0x11 && fSwapSlots3and11)
    1819                 iPciDeviceNo = 3;
     1818            else if (iPCIDeviceNo == 0x11 && fSwapSlots3and11)
     1819                iPCIDeviceNo = 3;
    18201820#endif
    1821             PciBusAddress PciAddr = PciBusAddress(0, iPciDeviceNo, 0);
    1822             hrc = BusMgr->assignPciDevice(pszAdapterName, pInst, PciAddr);                  H();
     1821            PCIBusAddress PCIAddr = PCIBusAddress(0, iPCIDeviceNo, 0);
     1822            hrc = BusMgr->assignPCIDevice(pszAdapterName, pInst, PCIAddr);                  H();
    18231823
    18241824            InsertConfigNode(pInst, "Config", &pCfg);
     
    18361836            nic.mInstance    = ulInstance;
    18371837            /* Could be updated by reference, if auto assigned */
    1838             nic.mPciAddress  = PciAddr;
     1838            nic.mPCIAddress  = PCIAddr;
    18391839
    18401840            hrc = networkAdapter->COMGETTER(BootPriority)(&nic.mBootPrio);                  H();
     
    19441944                InsertConfigNode(pNetBootCfg, achBootIdx, &pNetBtDevCfg);
    19451945                InsertConfigInteger(pNetBtDevCfg, "NIC", it->mInstance);
    1946                 InsertConfigInteger(pNetBtDevCfg, "PCIBusNo",      it->mPciAddress.miBus);
    1947                 InsertConfigInteger(pNetBtDevCfg, "PCIDeviceNo",   it->mPciAddress.miDevice);
    1948                 InsertConfigInteger(pNetBtDevCfg, "PCIFunctionNo", it->mPciAddress.miFn);
     1946                InsertConfigInteger(pNetBtDevCfg, "PCIBusNo",      it->mPCIAddress.miBus);
     1947                InsertConfigInteger(pNetBtDevCfg, "PCIDeviceNo",   it->mPCIAddress.miDevice);
     1948                InsertConfigInteger(pNetBtDevCfg, "PCIFunctionNo", it->mPCIAddress.miFn);
    19491949            }
    19501950        }
     
    20532053        InsertConfigNode(pInst,    "Config", &pCfg);
    20542054        InsertConfigInteger(pInst, "Trusted",              1); /* boolean */
    2055         hrc = BusMgr->assignPciDevice("VMMDev", pInst);                                     H();
     2055        hrc = BusMgr->assignPCIDevice("VMMDev", pInst);                                     H();
    20562056
    20572057        Bstr hwVersion;
     
    21102110                    InsertConfigNode(pDev,     "0", &pInst);
    21112111                    InsertConfigInteger(pInst, "Trusted",          1); /* boolean */
    2112                     hrc = BusMgr->assignPciDevice("ichac97", pInst);                        H();
     2112                    hrc = BusMgr->assignPCIDevice("ichac97", pInst);                        H();
    21132113                    InsertConfigNode(pInst,    "Config", &pCfg);
    21142114                    break;
     
    21342134                    InsertConfigNode(pDev,     "0", &pInst);
    21352135                    InsertConfigInteger(pInst, "Trusted",          1); /* boolean */
    2136                     hrc = BusMgr->assignPciDevice("hda", pInst);                            H();
     2136                    hrc = BusMgr->assignPCIDevice("hda", pInst);                            H();
    21372137                    InsertConfigNode(pInst,    "Config", &pCfg);
    21382138                }
     
    22332233                InsertConfigNode(pInst,    "Config", &pCfg);
    22342234                InsertConfigInteger(pInst, "Trusted",              1); /* boolean */
    2235                 hrc = BusMgr->assignPciDevice("usb-ohci", pInst);                           H();
     2235                hrc = BusMgr->assignPCIDevice("usb-ohci", pInst);                           H();
    22362236                InsertConfigNode(pInst,    "LUN#0", &pLunL0);
    22372237                InsertConfigString(pLunL0, "Driver",               "VUSBRootHub");
     
    22442244
    22452245#ifdef VBOX_WITH_EHCI
    2246                 BOOL fEhciEnabled;
    2247                 hrc = USBCtlPtr->COMGETTER(EnabledEhci)(&fEhciEnabled);                     H();
    2248                 if (fEhciEnabled)
     2246                BOOL fEHCIEnabled;
     2247                hrc = USBCtlPtr->COMGETTER(EnabledEHCI)(&fEHCIEnabled);                     H();
     2248                if (fEHCIEnabled)
    22492249                {
    22502250                    /*
     
    22652265                        InsertConfigNode(pInst,    "Config", &pCfg);
    22662266                        InsertConfigInteger(pInst, "Trusted", 1); /* boolean */
    2267                         hrc = BusMgr->assignPciDevice("usb-ehci", pInst);                   H();
     2267                        hrc = BusMgr->assignPCIDevice("usb-ehci", pInst);                   H();
    22682268
    22692269                        InsertConfigNode(pInst,    "LUN#0", &pLunL0);
     
    23802380
    23812381                /* Virtual USB Mouse/Tablet */
    2382                 PointingHidType_T aPointingHid;
    2383                 hrc = pMachine->COMGETTER(PointingHidType)(&aPointingHid);                  H();
    2384                 if (aPointingHid == PointingHidType_USBMouse || aPointingHid == PointingHidType_USBTablet)
     2382                PointingHIDType_T aPointingHID;
     2383                hrc = pMachine->COMGETTER(PointingHIDType)(&aPointingHID);                  H();
     2384                if (aPointingHID == PointingHIDType_USBMouse || aPointingHID == PointingHIDType_USBTablet)
    23852385                {
    23862386                    InsertConfigNode(pUsbDevices, "HidMouse", &pDev);
     
    23882388                    InsertConfigNode(pInst,    "Config", &pCfg);
    23892389
    2390                     if (aPointingHid == PointingHidType_USBTablet)
     2390                    if (aPointingHID == PointingHIDType_USBTablet)
    23912391                    {
    23922392                        InsertConfigInteger(pCfg, "Absolute", 1);
     
    24092409
    24102410                /* Virtual USB Keyboard */
    2411                 KeyboardHidType_T aKbdHid;
    2412                 hrc = pMachine->COMGETTER(KeyboardHidType)(&aKbdHid);                       H();
    2413                 if (aKbdHid == KeyboardHidType_USBKeyboard)
     2411                KeyboardHIDType_T aKbdHID;
     2412                hrc = pMachine->COMGETTER(KeyboardHIDType)(&aKbdHID);                       H();
     2413                if (aKbdHID == KeyboardHIDType_USBKeyboard)
    24142414                {
    24152415                    InsertConfigNode(pUsbDevices, "HidKeyboard", &pDev);
     
    25892589            InsertConfigInteger(pInst, "Trusted", 1); /* boolean */
    25902590            InsertConfigNode(pInst,    "Config", &pCfg);
    2591             hrc = BusMgr->assignPciDevice("acpi", pInst);                                   H();
     2591            hrc = BusMgr->assignPCIDevice("acpi", pInst);                                   H();
    25922592
    25932593            InsertConfigInteger(pCfg,  "RamSize",          cbRam);
     
    25972597            InsertConfigInteger(pCfg,  "IOAPIC", fIOAPIC);
    25982598            InsertConfigInteger(pCfg,  "FdcEnabled", fFdcEnabled);
    2599             InsertConfigInteger(pCfg,  "HpetEnabled", fHpetEnabled);
     2599            InsertConfigInteger(pCfg,  "HpetEnabled", fHPETEnabled);
    26002600            InsertConfigInteger(pCfg,  "SmcEnabled", fSmcEnabled);
    26012601            InsertConfigInteger(pCfg,  "ShowRtc",    fShowRtc);
     
    26032603            {
    26042604                BootNic aNic = llBootNics.front();
    2605                 uint32_t u32NicPciAddr = (aNic.mPciAddress.miDevice << 16) | aNic.mPciAddress.miFn;
    2606                 InsertConfigInteger(pCfg, "NicPciAddress",    u32NicPciAddr);
     2605                uint32_t u32NicPCIAddr = (aNic.mPCIAddress.miDevice << 16) | aNic.mPCIAddress.miFn;
     2606                InsertConfigInteger(pCfg, "NicPciAddress",    u32NicPCIAddr);
    26072607            }
    26082608            if (fOsXGuest && fAudioEnabled)
    26092609            {
    2610                 PciBusAddress Address;
    2611                 if (BusMgr->findPciAddress("hda", 0, Address))
    2612                 {
    2613                     uint32_t u32AudioPciAddr = (Address.miDevice << 16) | Address.miFn;
    2614                     InsertConfigInteger(pCfg, "AudioPciAddress",    u32AudioPciAddr);
    2615                 }
    2616             }
    2617             InsertConfigInteger(pCfg,  "IocPciAddress", uIocPciAddress);
     2610                PCIBusAddress Address;
     2611                if (BusMgr->findPCIAddress("hda", 0, Address))
     2612                {
     2613                    uint32_t u32AudioPCIAddr = (Address.miDevice << 16) | Address.miFn;
     2614                    InsertConfigInteger(pCfg, "AudioPciAddress",    u32AudioPCIAddr);
     2615                }
     2616            }
     2617            InsertConfigInteger(pCfg,  "IocPciAddress", uIocPCIAddress);
    26182618            if (chipsetType == ChipsetType_ICH9)
    26192619            {
     
    26212621                InsertConfigInteger(pCfg,  "McfgLength", cbMcfgLength);
    26222622            }
    2623             InsertConfigInteger(pCfg,  "HostBusPciAddress", uHbcPciAddress);
     2623            InsertConfigInteger(pCfg,  "HostBusPciAddress", uHbcPCIAddress);
    26242624            InsertConfigInteger(pCfg,  "ShowCpu", fShowCpu);
    26252625            InsertConfigInteger(pCfg,  "CpuHotPlug", fCpuHotPlug);
     
    29412941                                    StorageBus_T enmBus,
    29422942                                    bool fUseHostIOCache,
    2943                                     bool fBuiltinIoCache,
     2943                                    bool fBuiltinIOCache,
    29442944                                    bool fSetupMerge,
    29452945                                    unsigned uMergeSource,
     
    32663266                          lType,
    32673267                          fUseHostIOCache,
    3268                           fBuiltinIoCache,
     3268                          fBuiltinIOCache,
    32693269                          fSetupMerge,
    32703270                          uMergeSource,
     
    33083308                          DeviceType_T enmType,
    33093309                          bool fUseHostIOCache,
    3310                           bool fBuiltinIoCache,
     3310                          bool fBuiltinIOCache,
    33113311                          bool fSetupMerge,
    33123312                          unsigned uMergeSource,
     
    34733473                     * and just increases the overhead.
    34743474                     */
    3475                     if (   fBuiltinIoCache
     3475                    if (   fBuiltinIOCache
    34763476                        && (enmType == DeviceType_HardDisk))
    34773477                        InsertConfigInteger(pCfg, "BlockCache", 1);
     
    37373737            case NetworkAttachmentType_NAT:
    37383738            {
    3739                 ComPtr<INATEngine> natDriver;
    3740                 hrc = aNetworkAdapter->COMGETTER(NatDriver)(natDriver.asOutParam());        H();
     3739                ComPtr<INATEngine> natEngine;
     3740                hrc = aNetworkAdapter->COMGETTER(NATEngine)(natEngine.asOutParam());        H();
    37413741                InsertConfigString(pLunL0, "Driver", "NAT");
    37423742                InsertConfigNode(pLunL0, "Config", &pCfg);
     
    37493749                InsertConfigString(pCfg, "BootFile", Utf8StrFmt("%ls.pxe", bstr.raw()));
    37503750
    3751                 hrc = natDriver->COMGETTER(Network)(bstr.asOutParam());                     H();
     3751                hrc = natEngine->COMGETTER(Network)(bstr.asOutParam());                     H();
    37523752                if (!bstr.isEmpty())
    37533753                    InsertConfigString(pCfg, "Network", bstr);
     
    37583758                    InsertConfigString(pCfg, "Network", Utf8StrFmt("10.0.%d.0/24", uSlot+2));
    37593759                }
    3760                 hrc = natDriver->COMGETTER(HostIP)(bstr.asOutParam());                      H();
     3760                hrc = natEngine->COMGETTER(HostIP)(bstr.asOutParam());                      H();
    37613761                if (!bstr.isEmpty())
    37623762                    InsertConfigString(pCfg, "BindIP", bstr);
     
    37663766                ULONG tcpSnd = 0;
    37673767                ULONG tcpRcv = 0;
    3768                 hrc = natDriver->GetNetworkSettings(&mtu, &sockSnd, &sockRcv, &tcpSnd, &tcpRcv); H();
     3768                hrc = natEngine->GetNetworkSettings(&mtu, &sockSnd, &sockRcv, &tcpSnd, &tcpRcv); H();
    37693769                if (mtu)
    37703770                    InsertConfigInteger(pCfg, "SlirpMTU", mtu);
     
    37773777                if (tcpSnd)
    37783778                    InsertConfigInteger(pCfg, "TcpSnd", tcpSnd);
    3779                 hrc = natDriver->COMGETTER(TftpPrefix)(bstr.asOutParam());                  H();
     3779                hrc = natEngine->COMGETTER(TFTPPrefix)(bstr.asOutParam());                  H();
    37803780                if (!bstr.isEmpty())
    37813781                {
     
    37833783                    InsertConfigString(pCfg, "TFTPPrefix", bstr);
    37843784                }
    3785                 hrc = natDriver->COMGETTER(TftpBootFile)(bstr.asOutParam());                H();
     3785                hrc = natEngine->COMGETTER(TFTPBootFile)(bstr.asOutParam());                H();
    37863786                if (!bstr.isEmpty())
    37873787                {
     
    37893789                    InsertConfigString(pCfg, "BootFile", bstr);
    37903790                }
    3791                 hrc = natDriver->COMGETTER(TftpNextServer)(bstr.asOutParam());              H();
     3791                hrc = natEngine->COMGETTER(TFTPNextServer)(bstr.asOutParam());              H();
    37923792                if (!bstr.isEmpty())
    37933793                    InsertConfigString(pCfg, "NextServer", bstr);
    3794                 BOOL fDnsFlag;
    3795                 hrc = natDriver->COMGETTER(DnsPassDomain)(&fDnsFlag);                       H();
    3796                 InsertConfigInteger(pCfg, "PassDomain", fDnsFlag);
    3797                 hrc = natDriver->COMGETTER(DnsProxy)(&fDnsFlag);                            H();
    3798                 InsertConfigInteger(pCfg, "DNSProxy", fDnsFlag);
    3799                 hrc = natDriver->COMGETTER(DnsUseHostResolver)(&fDnsFlag);                  H();
    3800                 InsertConfigInteger(pCfg, "UseHostResolver", fDnsFlag);
     3794                BOOL fDNSFlag;
     3795                hrc = natEngine->COMGETTER(DNSPassDomain)(&fDNSFlag);                       H();
     3796                InsertConfigInteger(pCfg, "PassDomain", fDNSFlag);
     3797                hrc = natEngine->COMGETTER(DNSProxy)(&fDNSFlag);                            H();
     3798                InsertConfigInteger(pCfg, "DNSProxy", fDNSFlag);
     3799                hrc = natEngine->COMGETTER(DNSUseHostResolver)(&fDNSFlag);                  H();
     3800                InsertConfigInteger(pCfg, "UseHostResolver", fDNSFlag);
    38013801
    38023802                ULONG aliasMode;
    3803                 hrc = natDriver->COMGETTER(AliasMode)(&aliasMode);                          H();
     3803                hrc = natEngine->COMGETTER(AliasMode)(&aliasMode);                          H();
    38043804                InsertConfigInteger(pCfg, "AliasMode", aliasMode);
    38053805
    38063806                /* port-forwarding */
    38073807                SafeArray<BSTR> pfs;
    3808                 hrc = natDriver->COMGETTER(Redirects)(ComSafeArrayAsOutParam(pfs));         H();
     3808                hrc = natEngine->COMGETTER(Redirects)(ComSafeArrayAsOutParam(pfs));         H();
    38093809                PCFGMNODE pPF = NULL;          /* /Devices/Dev/.../Config/PF#0/ */
    38103810                for (unsigned int i = 0; i < pfs.size(); ++i)
     
    44924492                                                   tmpMask.asOutParam());
    44934493                    if (SUCCEEDED(hrc) && !tmpMask.isEmpty())
    4494                         hrc = hostInterface->EnableStaticIpConfig(tmpAddr.raw(),
     4494                        hrc = hostInterface->EnableStaticIPConfig(tmpAddr.raw(),
    44954495                                                                  tmpMask.raw());
    44964496                    else
    4497                         hrc = hostInterface->EnableStaticIpConfig(tmpAddr.raw(),
     4497                        hrc = hostInterface->EnableStaticIPConfig(tmpAddr.raw(),
    44984498                                                                  Bstr(VBOXNET_IPV4MASK_DEFAULT).raw());
    44994499                }
     
    45014501                {
    45024502                    /* Grab the IP number from the 'vboxnetX' instance number (see netif.h) */
    4503                     hrc = hostInterface->EnableStaticIpConfig(getDefaultIPv4Address(Bstr(pszHostOnlyName)).raw(),
     4503                    hrc = hostInterface->EnableStaticIPConfig(getDefaultIPv4Address(Bstr(pszHostOnlyName)).raw(),
    45044504                                                              Bstr(VBOXNET_IPV4MASK_DEFAULT).raw());
    45054505                }
     
    45154515                if (SUCCEEDED(hrc) && !tmpAddr.isEmpty() && !tmpMask.isEmpty())
    45164516                {
    4517                     hrc = hostInterface->EnableStaticIpConfigV6(tmpAddr.raw(),
     4517                    hrc = hostInterface->EnableStaticIPConfigV6(tmpAddr.raw(),
    45184518                                                                Utf8Str(tmpMask).toUInt32());
    45194519                    ComAssertComRC(hrc); /** @todo r=bird: Why this isn't fatal? (H()) */
  • trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp

    r42525 r42551  
    273273}
    274274
    275 STDMETHODIMP GuestProcess::COMGETTER(Pid)(ULONG *aPID)
     275STDMETHODIMP GuestProcess::COMGETTER(PID)(ULONG *aPID)
    276276{
    277277#ifndef VBOX_WITH_GUEST_CONTROL
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r42546 r42551  
    289289    LogFlowFuncLeaveRC(S_OK);
    290290    return S_OK;
     291#endif /* VBOX_WITH_GUEST_CONTROL */
     292}
     293
     294STDMETHODIMP GuestSession::COMSETTER(Environment)(ComSafeArrayIn(IN_BSTR, aValues))
     295{
     296#ifndef VBOX_WITH_GUEST_CONTROL
     297    ReturnComNotImplemented();
     298#else
     299    LogFlowThisFuncEnter();
     300
     301    AutoCaller autoCaller(this);
     302    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     303
     304    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     305
     306    com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aValues));
     307
     308    int rc = VINF_SUCCESS;
     309    for (size_t i = 0; i < environment.size() && RT_SUCCESS(rc); i++)
     310    {
     311        Utf8Str strEnv(environment[i]);
     312        if (!strEnv.isEmpty()) /* Silently skip empty entries. */
     313            rc = mData.mEnvironment.Set(strEnv);
     314    }
     315
     316    HRESULT hr = RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR;
     317    LogFlowFuncLeaveRC(hr);
     318    return hr;
    291319#endif /* VBOX_WITH_GUEST_CONTROL */
    292320}
     
    10831111}
    10841112
    1085 STDMETHODIMP GuestSession::EnvironmentSetArray(ComSafeArrayIn(IN_BSTR, aValues))
    1086 {
    1087 #ifndef VBOX_WITH_GUEST_CONTROL
    1088     ReturnComNotImplemented();
    1089 #else
    1090     LogFlowThisFuncEnter();
    1091 
    1092     AutoCaller autoCaller(this);
    1093     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    1094 
    1095     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    1096 
    1097     com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aValues));
    1098 
    1099     int rc = VINF_SUCCESS;
    1100     for (size_t i = 0; i < environment.size() && RT_SUCCESS(rc); i++)
    1101     {
    1102         Utf8Str strEnv(environment[i]);
    1103         if (!strEnv.isEmpty()) /* Silently skip empty entries. */
    1104             rc = mData.mEnvironment.Set(strEnv);
    1105     }
    1106 
    1107     HRESULT hr = RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR;
    1108     LogFlowFuncLeaveRC(hr);
    1109     return hr;
    1110 #endif /* VBOX_WITH_GUEST_CONTROL */
    1111 }
    1112 
    11131113STDMETHODIMP GuestSession::EnvironmentUnset(IN_BSTR aName)
    11141114{
  • trunk/src/VBox/Main/src-client/PCIRawDevImpl.cpp

    r42497 r42551  
    55
    66/*
    7  * Copyright (C) 2010-2011 Oracle Corporation
     7 * Copyright (C) 2010-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717#include "Logging.h"
    18 #include "PciRawDevImpl.h"
    19 #include "PciDeviceAttachmentImpl.h"
     18#include "PCIRawDevImpl.h"
     19#include "PCIDeviceAttachmentImpl.h"
    2020#include "ConsoleImpl.h"
    2121#include "MachineImpl.h"
     
    3030{
    3131    /** Pointer to the real PCI raw object. */
    32     PciRawDev                   *pPciRawDev;
     32    PCIRawDev                   *pPCIRawDev;
    3333    /** Pointer to the driver instance structure. */
    3434    PPDMDRVINS                  pDrvIns;
     
    4141// constructor / destructor
    4242//
    43 PciRawDev::PciRawDev(Console *console)
     43PCIRawDev::PCIRawDev(Console *console)
    4444  : mpDrv(NULL),
    4545    mParent(console)
     
    4747}
    4848
    49 PciRawDev::~PciRawDev()
     49PCIRawDev::~PCIRawDev()
    5050{
    5151}
     
    5454 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
    5555 */
    56 DECLCALLBACK(void *) PciRawDev::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID)
     56DECLCALLBACK(void *) PCIRawDev::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    5757{
    5858    PPDMDRVINS         pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
     
    6969 * @interface_method_impl{PDMIPCIRAWUP,pfnPciDeviceConstructComplete}
    7070 */
    71 DECLCALLBACK(int) PciRawDev::drvDeviceConstructComplete(PPDMIPCIRAWCONNECTOR pInterface, const char *pcszName,
    72                                                         uint32_t uHostPciAddress, uint32_t uGuestPciAddress,
     71DECLCALLBACK(int) PCIRawDev::drvDeviceConstructComplete(PPDMIPCIRAWCONNECTOR pInterface, const char *pcszName,
     72                                                        uint32_t uHostPCIAddress, uint32_t uGuestPCIAddress,
    7373                                                        int rc)
    7474{
    7575    PDRVMAINPCIRAWDEV pThis = RT_FROM_CPP_MEMBER(pInterface, DRVMAINPCIRAWDEV, IConnector);
    76     Console *pConsole = pThis->pPciRawDev->getParent();
     76    Console *pConsole = pThis->pPCIRawDev->getParent();
    7777    const ComPtr<IMachine>& machine = pConsole->machine();
    7878    ComPtr<IVirtualBox> vbox;
     
    8989    Assert(SUCCEEDED(hrc));
    9090
    91     ComObjPtr<PciDeviceAttachment> pda;
     91    ComObjPtr<PCIDeviceAttachment> pda;
    9292    BstrFmt bstrName(pcszName);
    9393    pda.createObject();
    94     pda->init(machine, bstrName, uHostPciAddress, uGuestPciAddress, TRUE);
     94    pda->init(machine, bstrName, uHostPCIAddress, uGuestPCIAddress, TRUE);
    9595
    9696    Bstr msg("");
     
    9898        msg = BstrFmt("runtime error %Rrc", rc);
    9999
    100     fireHostPciDevicePlugEvent(es, bstrId.raw(), true /* plugged */, RT_SUCCESS(rc) /* success */, pda, msg.raw());
     100    fireHostPCIDevicePlugEvent(es, bstrId.raw(), true /* plugged */, RT_SUCCESS(rc) /* success */, pda, msg.raw());
    101101
    102102    return VINF_SUCCESS;
     
    110110 * @param   pDrvIns     The driver instance data.
    111111 */
    112 DECLCALLBACK(void) PciRawDev::drvDestruct(PPDMDRVINS pDrvIns)
     112DECLCALLBACK(void) PCIRawDev::drvDestruct(PPDMDRVINS pDrvIns)
    113113{
    114114    PDRVMAINPCIRAWDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINPCIRAWDEV);
    115115    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
    116116
    117     if (pData->pPciRawDev)
    118         pData->pPciRawDev->mpDrv = NULL;
     117    if (pData->pPCIRawDev)
     118        pData->pPCIRawDev->mpDrv = NULL;
    119119}
    120120
     
    126126 * @param   pDrvIns     The driver instance data.
    127127 */
    128 DECLCALLBACK(void) PciRawDev::drvReset(PPDMDRVINS pDrvIns)
     128DECLCALLBACK(void) PCIRawDev::drvReset(PPDMDRVINS pDrvIns)
    129129{
    130130}
     
    136136 * @copydoc FNPDMDRVCONSTRUCT
    137137 */
    138 DECLCALLBACK(int) PciRawDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
     138DECLCALLBACK(int) PCIRawDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
    139139{
    140140    PDRVMAINPCIRAWDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINPCIRAWDEV);
     
    154154     * IBase.
    155155     */
    156     pDrvIns->IBase.pfnQueryInterface = PciRawDev::drvQueryInterface;
     156    pDrvIns->IBase.pfnQueryInterface = PCIRawDev::drvQueryInterface;
    157157
    158158    /*
    159159     * IConnector.
    160160     */
    161     pData->IConnector.pfnDeviceConstructComplete = PciRawDev::drvDeviceConstructComplete;
     161    pData->IConnector.pfnDeviceConstructComplete = PCIRawDev::drvDeviceConstructComplete;
    162162
    163163    /*
     
    172172    }
    173173
    174     pData->pPciRawDev = (PciRawDev*)pv;
    175     pData->pPciRawDev->mpDrv = pData;
     174    pData->pPCIRawDev = (PCIRawDev *)pv;
     175    pData->pPCIRawDev->mpDrv = pData;
    176176
    177177    return VINF_SUCCESS;
     
    181181 * Main raw PCI driver registration record.
    182182 */
    183 const PDMDRVREG PciRawDev::DrvReg =
     183const PDMDRVREG PCIRawDev::DrvReg =
    184184{
    185185    /* u32Version */
     
    202202    sizeof(DRVMAINPCIRAWDEV),
    203203    /* pfnConstruct */
    204     PciRawDev::drvConstruct,
     204    PCIRawDev::drvConstruct,
    205205    /* pfnDestruct */
    206     PciRawDev::drvDestruct,
     206    PCIRawDev::drvDestruct,
    207207    /* pfnRelocate */
    208208    NULL,
     
    212212    NULL,
    213213    /* pfnReset */
    214     PciRawDev::drvReset,
     214    PCIRawDev::drvReset,
    215215    /* pfnSuspend */
    216216    NULL,
  • trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp

    r41352 r42551  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3333#include "ConsoleImpl.h"
    3434#ifdef VBOX_WITH_PCI_PASSTHROUGH
    35 # include "PciRawDevImpl.h"
     35# include "PCIRawDevImpl.h"
    3636#endif
    3737
     
    9090
    9191#ifdef VBOX_WITH_PCI_PASSTHROUGH
    92     rc = pCallbacks->pfnRegister(pCallbacks, &PciRawDev::DrvReg);
     92    rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
    9393    if (RT_FAILURE(rc))
    9494        return rc;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette