VirtualBox

Changeset 7207 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Feb 28, 2008 6:43:08 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28520
Message:

Main: Reworked enums to avoid 1) weird duplication of enum name when referring to enum values in cross-platform code; 2) possible clashes on Win32 due to putting identifiers like Paused or Disabled to the global namespace (via C enums). In the new style, enums are used like this: a) USBDeviceState_T v = USBDeviceState_Busy from cross-platform non-Qt code; b) KUSBDeviceState v = KUSBDeviceState_Busy from Qt code; c) USBDeviceState v = USBDeviceState_Busy from plain Win32 and d) PRUInt32 USBDeviceState v = USBDeviceState::Busy from plain XPCOM.

Location:
trunk/src/VBox/Main
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/AudioAdapterImpl.cpp

    r6597 r7207  
    225225        switch (aAudioDriver)
    226226        {
    227             case AudioDriverType_NullAudioDriver:
     227            case AudioDriverType_Null:
    228228#ifdef RT_OS_WINDOWS
    229229# ifdef VBOX_WITH_WINMM
    230             case AudioDriverType_WINMMAudioDriver:
    231 # endif
    232             case AudioDriverType_DSOUNDAudioDriver:
     230            case AudioDriverType_WINMM:
     231# endif
     232            case AudioDriverType_DSOUND:
    233233#endif /* RT_OS_WINDOWS */
    234234#ifdef RT_OS_LINUX
    235             case AudioDriverType_OSSAudioDriver:
     235            case AudioDriverType_OSS:
    236236# ifdef VBOX_WITH_ALSA
    237             case AudioDriverType_ALSAAudioDriver:
     237            case AudioDriverType_ALSA:
    238238# endif
    239239# ifdef VBOX_WITH_PULSE
    240             case AudioDriverType_PulseAudioDriver:
     240            case AudioDriverType_Pulse:
    241241# endif
    242242#endif /* RT_OS_LINUX */
    243243#ifdef RT_OS_DARWIN
    244             case AudioDriverType_CoreAudioDriver:
    245 #endif 
     244            case AudioDriverType_Core:
     245#endif
    246246#ifdef RT_OS_OS2
    247             case AudioDriverType_MMPMAudioDriver:
    248 #endif 
     247            case AudioDriverType_MMPM:
     248#endif
    249249            {
    250250                mData.backup();
     
    324324/////////////////////////////////////////////////////////////////////////////
    325325
    326 /** 
     326/**
    327327 *  Loads settings from the given machine node.
    328328 *  May be called once right after this object creation.
    329  * 
     329 *
    330330 *  @param aMachineNode <Machine> node.
    331  * 
    332  *  @note Locks this object for writing. 
     331 *
     332 *  @note Locks this object for writing.
    333333 */
    334334HRESULT AudioAdapter::loadSettings (const settings::Key &aMachineNode)
     
    352352     * place when a setting of a newly created object must default to A while
    353353     * the same setting of an object loaded from the old settings file must
    354      * default to B. */ 
     354     * default to B. */
    355355
    356356    /* AudioAdapter node (required) */
     
    369369    /* now check the audio driver (required) */
    370370    const char *driver = audioAdapterNode.stringValue ("driver");
    371     mData->mAudioDriver = AudioDriverType_NullAudioDriver;
     371    mData->mAudioDriver = AudioDriverType_Null;
    372372    if      (strcmp (driver, "null") == 0)
    373373        ; /* Null has been set above */
     
    375375    else if (strcmp (driver, "winmm") == 0)
    376376#ifdef VBOX_WITH_WINMM
    377         mData->mAudioDriver = AudioDriverType_WINMMAudioDriver;
     377        mData->mAudioDriver = AudioDriverType_WINMM;
    378378#else
    379379        /* fall back to dsound */
    380         mData->mAudioDriver = AudioDriverType_DSOUNDAudioDriver;
     380        mData->mAudioDriver = AudioDriverType_DSOUND;
    381381#endif
    382382    else if (strcmp (driver, "dsound") == 0)
    383         mData->mAudioDriver = AudioDriverType_DSOUNDAudioDriver;
     383        mData->mAudioDriver = AudioDriverType_DSOUND;
    384384#endif // RT_OS_WINDOWS
    385385#ifdef RT_OS_LINUX
    386386    else if (strcmp (driver, "oss") == 0)
    387         mData->mAudioDriver = AudioDriverType_OSSAudioDriver;
     387        mData->mAudioDriver = AudioDriverType_OSS;
    388388    else if (strcmp (driver, "alsa") == 0)
    389389# ifdef VBOX_WITH_ALSA
    390         mData->mAudioDriver = AudioDriverType_ALSAAudioDriver;
     390        mData->mAudioDriver = AudioDriverType_ALSA;
    391391# else
    392392        /* fall back to OSS */
    393         mData->mAudioDriver = AudioDriverType_OSSAudioDriver;
     393        mData->mAudioDriver = AudioDriverType_OSS;
    394394# endif
    395395    else if (strcmp (driver, "pulse") == 0)
    396396# ifdef VBOX_WITH_PULSE
    397         mData->mAudioDriver = AudioDriverType_PulseAudioDriver;
     397        mData->mAudioDriver = AudioDriverType_Pulse;
    398398# else
    399399        /* fall back to OSS */
    400         mData->mAudioDriver = AudioDriverType_OSSAudioDriver;
     400        mData->mAudioDriver = AudioDriverType_OSS;
    401401# endif
    402402#endif // RT_OS_LINUX
    403403#ifdef RT_OS_DARWIN
    404404    else if (strcmp (driver, "coreaudio") == 0)
    405         mData->mAudioDriver = AudioDriverType_CoreAudioDriver;
     405        mData->mAudioDriver = AudioDriverType_Core;
    406406#endif
    407407#ifdef RT_OS_OS2
    408408    else if (strcmp (driver, "mmpm") == 0)
    409         mData->mAudioDriver = AudioDriverType_MMPMAudioDriver;
     409        mData->mAudioDriver = AudioDriverType_MMPM;
    410410#endif
    411411    else
     
    415415}
    416416
    417 /** 
     417/**
    418418 *  Saves settings to the given machine node.
    419  * 
     419 *
    420420 *  @param aMachineNode <Machine> node.
    421  * 
    422  *  @note Locks this object for reading. 
     421 *
     422 *  @note Locks this object for reading.
    423423 */
    424424HRESULT AudioAdapter::saveSettings (settings::Key &aMachineNode)
     
    454454    switch (mData->mAudioDriver)
    455455    {
    456         case AudioDriverType_NullAudioDriver:
     456        case AudioDriverType_Null:
    457457        {
    458458            driverStr = "null";
     
    460460        }
    461461#ifdef RT_OS_WINDOWS
    462             case AudioDriverType_WINMMAudioDriver:
     462            case AudioDriverType_WINMM:
    463463# ifdef VBOX_WITH_WINMM
    464464            {
     
    467467            }
    468468# endif
    469             case AudioDriverType_DSOUNDAudioDriver:
     469            case AudioDriverType_DSOUND:
    470470            {
    471471                driverStr = "dsound";
     
    474474#endif /* RT_OS_WINDOWS */
    475475#ifdef RT_OS_LINUX
    476             case AudioDriverType_ALSAAudioDriver:
     476            case AudioDriverType_ALSA:
    477477# ifdef VBOX_WITH_ALSA
    478478            {
     
    481481            }
    482482# endif
    483             case AudioDriverType_PulseAudioDriver:
     483            case AudioDriverType_Pulse:
    484484# ifdef VBOX_WITH_PULSE
    485485            {
     
    488488            }
    489489# endif
    490             case AudioDriverType_OSSAudioDriver:
     490            case AudioDriverType_OSS:
    491491            {
    492492                driverStr = "oss";
     
    495495#endif /* RT_OS_LINUX */
    496496#ifdef RT_OS_DARWIN
    497             case AudioDriverType_CoreAudioDriver:
     497            case AudioDriverType_Core:
    498498            {
    499499                driverStr = "coreaudio";
     
    502502#endif
    503503#ifdef RT_OS_OS2
    504             case AudioDriverType_MMPMAudioDriver:
     504            case AudioDriverType_MMPM:
    505505            {
    506506                driverStr = "mmpm";
     
    520520}
    521521
    522 /** 
     522/**
    523523 *  @note Locks this object for writing.
    524524 */
     
    544544}
    545545
    546 /** 
     546/**
    547547 *  @note Locks this object for writing, together with the peer object (also
    548548 *  for writing) if there is one.
     
    572572}
    573573
    574 /** 
     574/**
    575575 *  @note Locks this object for writing, together with the peer object
    576576 *  represented by @a aThat (locked for reading).
  • trunk/src/VBox/Main/BIOSSettingsImpl.cpp

    r6076 r7207  
    434434    switch (aControllerType)
    435435    {
    436         case IDEControllerType_IDEControllerPIIX3:
    437         case IDEControllerType_IDEControllerPIIX4:
     436        case IDEControllerType_PIIX3:
     437        case IDEControllerType_PIIX4:
    438438            break;
    439439        default:
     
    441441                tr("Invalid IDE controller type '%d'"),
    442442                aControllerType);
    443     }   
     443    }
    444444
    445445    mData.backup();
     
    489489/////////////////////////////////////////////////////////////////////////////
    490490
    491 /** 
     491/**
    492492 *  Loads settings from the given machine node.
    493493 *  May be called once right after this object creation.
    494  * 
     494 *
    495495 *  @param aMachineNode <Machine> node.
    496  * 
    497  *  @note Locks this object for writing. 
     496 *
     497 *  @note Locks this object for writing.
    498498 */
    499499HRESULT BIOSSettings::loadSettings (const settings::Key &aMachineNode)
     
    517517     * place when a setting of a newly created object must default to A while
    518518     * the same setting of an object loaded from the old settings file must
    519      * default to B. */ 
     519     * default to B. */
    520520
    521521    /* BIOS node (required) */
     
    585585     * defaults to PIIX3) */
    586586    {
    587         mData->mIDEControllerType = IDEControllerType_IDEControllerPIIX3;
     587        mData->mIDEControllerType = IDEControllerType_PIIX3;
    588588
    589589        Key ideControllerNode = biosNode.findKey ("IDEController");
     
    592592            const char *typeStr = ideControllerNode.stringValue ("type");
    593593            if (strcmp (typeStr, "PIIX3") == 0)
    594                 mData->mIDEControllerType = IDEControllerType_IDEControllerPIIX3;
     594                mData->mIDEControllerType = IDEControllerType_PIIX3;
    595595            else if (strcmp (typeStr, "PIIX4") == 0)
    596                 mData->mIDEControllerType = IDEControllerType_IDEControllerPIIX4;
     596                mData->mIDEControllerType = IDEControllerType_PIIX4;
    597597            else
    598598                ComAssertMsgFailedRet (("Invalid boot menu mode '%s'\n", typeStr),
     
    604604}
    605605
    606 /** 
     606/**
    607607 *  Saves settings to the given machine node.
    608  * 
     608 *
    609609 *  @param aMachineNode <Machine> node.
    610  * 
    611  *  @note Locks this object for reading. 
     610 *
     611 *  @note Locks this object for reading.
    612612 */
    613613HRESULT BIOSSettings::saveSettings (settings::Key &aMachineNode)
     
    686686        switch (mData->mIDEControllerType)
    687687        {
    688             case IDEControllerType_IDEControllerPIIX3:
     688            case IDEControllerType_PIIX3:
    689689                ideControllerTypeStr = "PIIX3";
    690690                break;
    691             case IDEControllerType_IDEControllerPIIX4:
     691            case IDEControllerType_PIIX4:
    692692                ideControllerTypeStr = "PIIX4";
    693693                break;
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r6895 r7207  
    189189        : VMProgressTask (aConsole, aProgress, true /* aUsesVMPtr */)
    190190        , mIsSnapshot (false)
    191         , mLastMachineState (MachineState_InvalidMachineState) {}
     191        , mLastMachineState (MachineState_Null) {}
    192192
    193193    bool mIsSnapshot;
     
    477477    AssertComRCReturn (hrc, VERR_ACCESS_DENIED);
    478478
    479     VRDPAuthType_T authType = VRDPAuthType_VRDPAuthNull;
     479    VRDPAuthType_T authType = VRDPAuthType_Null;
    480480    hrc = mVRDPServer->COMGETTER(AuthType) (&authType);
    481481    AssertComRCReturn (hrc, VERR_ACCESS_DENIED);
     
    492492    LogRel (("VRDPAUTH: User: [%s]. Domain: [%s]. Authentication type: [%s]\n",
    493493                pszUser, pszDomain,
    494                 authType == VRDPAuthType_VRDPAuthNull?
     494                authType == VRDPAuthType_Null?
    495495                    "null":
    496                     (authType == VRDPAuthType_VRDPAuthExternal?
     496                    (authType == VRDPAuthType_External?
    497497                        "external":
    498                         (authType == VRDPAuthType_VRDPAuthGuest?
     498                        (authType == VRDPAuthType_Guest?
    499499                            "guest":
    500500                            "INVALID"
     
    526526    switch (authType)
    527527    {
    528         case VRDPAuthType_VRDPAuthNull:
     528        case VRDPAuthType_Null:
    529529        {
    530530            result = VRDPAuthAccessGranted;
     
    532532        }
    533533
    534         case VRDPAuthType_VRDPAuthExternal:
     534        case VRDPAuthType_External:
    535535        {
    536536            /* Call the external library. */
     
    547547        } /* pass through */
    548548
    549         case VRDPAuthType_VRDPAuthGuest:
     549        case VRDPAuthType_Guest:
    550550        {
    551551            guestJudgement = VRDPAuthGuestNotReacted;
     
    590590            }
    591591
    592             if (authType == VRDPAuthType_VRDPAuthExternal)
     592            if (authType == VRDPAuthType_External)
    593593            {
    594594                LogRel(("VRDPAUTH: Guest judgement %d.\n", guestJudgement));
     
    709709    AssertComRC (hrc);
    710710
    711     VRDPAuthType_T authType = VRDPAuthType_VRDPAuthNull;
     711    VRDPAuthType_T authType = VRDPAuthType_Null;
    712712    hrc = mVRDPServer->COMGETTER(AuthType) (&authType);
    713713    AssertComRC (hrc);
    714714
    715     if (authType == VRDPAuthType_VRDPAuthExternal)
     715    if (authType == VRDPAuthType_External)
    716716        mConsoleVRDPServer->AuthDisconnect (uuid, u32ClientId);
    717717
     
    12661266        switch (netattach)
    12671267        {
    1268             case NetworkAttachmentType_HostInterfaceNetworkAttachment:
     1268            case NetworkAttachmentType_HostInterface:
    12691269            {
    12701270#ifdef RT_OS_WINDOWS
     
    18531853    switch (aDeviceType)
    18541854    {
    1855         case DeviceType_FloppyDevice:
     1855        case DeviceType_Floppy:
    18561856        {
    18571857            for (unsigned i = 0; i < ELEMENTS(mapFDLeds); i++)
     
    18601860        }
    18611861
    1862         case DeviceType_DVDDevice:
     1862        case DeviceType_DVD:
    18631863        {
    18641864            SumLed.u32 |= readAndClearLed(mapIDELeds[2]);
     
    18661866        }
    18671867
    1868         case DeviceType_HardDiskDevice:
     1868        case DeviceType_HardDisk:
    18691869        {
    18701870            SumLed.u32 |= readAndClearLed(mapIDELeds[0]);
     
    18741874        }
    18751875
    1876         case DeviceType_NetworkDevice:
     1876        case DeviceType_Network:
    18771877        {
    18781878            for (unsigned i = 0; i < ELEMENTS(mapNetworkLeds); i++)
     
    18811881        }
    18821882
    1883         case DeviceType_USBDevice:
     1883        case DeviceType_USB:
    18841884        {
    18851885            SumLed.u32 |= readAndClearLed(mapUSBLed);
     
    18871887        }
    18881888
    1889         case DeviceType_SharedFolderDevice:
     1889        case DeviceType_SharedFolder:
    18901890        {
    18911891            SumLed.u32 |= readAndClearLed(mapSharedFolderLed);
     
    19021902    {
    19031903        case 0:
    1904             *aDeviceActivity = DeviceActivity_DeviceIdle;
     1904            *aDeviceActivity = DeviceActivity_Idle;
    19051905            break;
    19061906        case PDMLED_READING:
    1907             *aDeviceActivity = DeviceActivity_DeviceReading;
     1907            *aDeviceActivity = DeviceActivity_Reading;
    19081908            break;
    19091909        case PDMLED_WRITING:
    19101910        case PDMLED_READING | PDMLED_WRITING:
    1911             *aDeviceActivity = DeviceActivity_DeviceWriting;
     1911            *aDeviceActivity = DeviceActivity_Writing;
    19121912            break;
    19131913    }
     
    21112111        CallbackList::iterator it = mCallbacks.begin();
    21122112        while (it != mCallbacks.end())
    2113             (*it++)->OnSharedFolderChange (Scope_SessionScope);
     2113            (*it++)->OnSharedFolderChange (Scope_Session);
    21142114    }
    21152115
     
    21702170        CallbackList::iterator it = mCallbacks.begin();
    21712171        while (it != mCallbacks.end())
    2172             (*it++)->OnSharedFolderChange (Scope_SessionScope);
     2172            (*it++)->OnSharedFolderChange (Scope_Session);
    21732173    }
    21742174
     
    23692369            mMachineState);
    23702370
    2371     MachineState_T machineState = MachineState_InvalidMachineState;
     2371    MachineState_T machineState = MachineState_Null;
    23722372    HRESULT rc = mControl->DiscardSnapshot (this, aId, &machineState, aProgress);
    23732373    CheckComRCReturnRC (rc);
     
    23902390            mMachineState);
    23912391
    2392     MachineState_T machineState = MachineState_InvalidMachineState;
     2392    MachineState_T machineState = MachineState_Null;
    23932393    HRESULT rc = mControl->DiscardCurrentState (this, &machineState, aProgress);
    23942394    CheckComRCReturnRC (rc);
     
    24112411            mMachineState);
    24122412
    2413     MachineState_T machineState = MachineState_InvalidMachineState;
     2413    MachineState_T machineState = MachineState_Null;
    24142414    HRESULT rc =
    24152415        mControl->DiscardCurrentSnapshotAndState (this, &machineState, aProgress);
     
    33503350        CallbackList::iterator it = mCallbacks.begin();
    33513351        while (it != mCallbacks.end())
    3352             (*it++)->OnSharedFolderChange (aGlobal ? (Scope_T)Scope_GlobalScope
    3353                                                    : (Scope_T)Scope_MachineScope);
     3352            (*it++)->OnSharedFolderChange (aGlobal ? (Scope_T) Scope_Global
     3353                                                   : (Scope_T) Scope_Machine);
    33543354    }
    33553355
     
    42444244             *  can lead to various unexpected results (like the machine state being
    42454245             *  >= MachineState_Running on the server, while the session state is
    4246              *  already SessionState_SessionClosed at the same time there).
     4246             *  already SessionState_Closed at the same time there).
    42474247             *
    42484248             *  Cross-lock conditions should be carefully watched out: calling
     
    51405140    NetworkAttachmentType_T attachment;
    51415141    networkAdapter->COMGETTER(AttachmentType)(&attachment);
    5142     Assert(attachment == NetworkAttachmentType_HostInterfaceNetworkAttachment);
     5142    Assert(attachment == NetworkAttachmentType_HostInterface);
    51435143#endif /* DEBUG */
    51445144
     
    53395339    NetworkAttachmentType_T attachment;
    53405340    networkAdapter->COMGETTER(AttachmentType)(&attachment);
    5341     Assert(attachment == NetworkAttachmentType_HostInterfaceNetworkAttachment);
     5341    Assert(attachment == NetworkAttachmentType_HostInterface);
    53425342#endif /* DEBUG */
    53435343
     
    54495449        NetworkAttachmentType_T attachment;
    54505450        networkAdapter->COMGETTER(AttachmentType)(&attachment);
    5451         if (attachment == NetworkAttachmentType_HostInterfaceNetworkAttachment)
     5451        if (attachment == NetworkAttachmentType_HostInterface)
    54525452        {
    54535453            HRESULT rc2 = detachFromHostInterface(networkAdapter);
     
    61276127    switch (enmCtl)
    61286128    {
    6129         case DiskControllerType_IDE0Controller:
     6129        case DiskControllerType_IDE0:
    61306130            i = 0;
    61316131            break;
    6132         case DiskControllerType_IDE1Controller:
     6132        case DiskControllerType_IDE1:
    61336133            i = 2;
    61346134            break;
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r6935 r7207  
    150150
    151151    /* hardware virtualization extensions */
    152     TriStateBool_T hwVirtExEnabled;
     152    TSBool_T hwVirtExEnabled;
    153153    BOOL fHWVirtExEnabled;
    154154    hrc = pMachine->COMGETTER(HWVirtExEnabled)(&hwVirtExEnabled);                   H();
    155     if (hwVirtExEnabled == TriStateBool_TSDefault)
     155    if (hwVirtExEnabled == TSBool_Default)
    156156    {
    157157        /* check the default value */
     
    159159    }
    160160    else
    161         fHWVirtExEnabled = (hwVirtExEnabled == TriStateBool_TSTrue);
     161        fHWVirtExEnabled = (hwVirtExEnabled == TSBool_True);
    162162#ifndef RT_OS_DARWIN /** @todo Implement HWVirtExt on darwin. See #1865. */
    163163    if (fHWVirtExEnabled)
     
    183183    switch (controllerType)
    184184    {
    185         case IDEControllerType_IDEControllerPIIX3:
     185        case IDEControllerType_PIIX3:
    186186            fPIIX4 = FALSE;
    187187            break;
    188         case IDEControllerType_IDEControllerPIIX4:
     188        case IDEControllerType_PIIX4:
    189189            fPIIX4 = TRUE;
    190190            break;
     
    267267        switch (bootDevice)
    268268        {
    269             case DeviceType_NoDevice:
     269            case DeviceType_Null:
    270270                pszBootDevice = "NONE";
    271271                break;
    272             case DeviceType_HardDiskDevice:
     272            case DeviceType_HardDisk:
    273273                pszBootDevice = "IDE";
    274274                break;
    275             case DeviceType_DVDDevice:
     275            case DeviceType_DVD:
    276276                pszBootDevice = "DVD";
    277277                break;
    278             case DeviceType_FloppyDevice:
     278            case DeviceType_Floppy:
    279279                pszBootDevice = "FLOPPY";
    280280                break;
    281             case DeviceType_NetworkDevice:
     281            case DeviceType_Network:
    282282                pszBootDevice = "LAN";
    283283                break;
     
    611611        switch (enmCtl)
    612612        {
    613             case DiskControllerType_IDE0Controller:
     613            case DiskControllerType_IDE0:
    614614                i = 0;
    615615                break;
    616             case DiskControllerType_IDE1Controller:
     616            case DiskControllerType_IDE1:
    617617                i = 2;
    618618                break;
     
    867867        switch (adapterType)
    868868        {
    869             case NetworkAdapterType_NetworkAdapterAm79C970A:
    870             case NetworkAdapterType_NetworkAdapterAm79C973:
     869            case NetworkAdapterType_Am79C970A:
     870            case NetworkAdapterType_Am79C973:
    871871                pDev = pDevPCNet;
    872872                break;
    873873#ifdef VBOX_WITH_E1000
    874             case NetworkAdapterType_NetworkAdapter82540EM:
     874            case NetworkAdapterType_I82540EM:
    875875                pDev = pDevE1000;
    876876                break;
     
    899899        switch (adapterType)
    900900        {
    901             case NetworkAdapterType_NetworkAdapterAm79C970A:
     901            case NetworkAdapterType_Am79C970A:
    902902                rc = CFGMR3InsertInteger(pCfg, "Am79C973", 0);                      RC_CHECK();
    903903                break;
    904             case NetworkAdapterType_NetworkAdapterAm79C973:
     904            case NetworkAdapterType_Am79C973:
    905905                rc = CFGMR3InsertInteger(pCfg, "Am79C973", 1);                      RC_CHECK();
    906906                break;
     
    977977        switch (networkAttachment)
    978978        {
    979             case NetworkAttachmentType_NoNetworkAttachment:
    980                 break;
    981 
    982             case NetworkAttachmentType_NATNetworkAttachment:
     979            case NetworkAttachmentType_Null:
     980                break;
     981
     982            case NetworkAttachmentType_NAT:
    983983            {
    984984                if (fSniffer)
     
    10151015            }
    10161016
    1017             case NetworkAttachmentType_HostInterfaceNetworkAttachment:
     1017            case NetworkAttachmentType_HostInterface:
    10181018            {
    10191019                /*
     
    11261126            }
    11271127
    1128             case NetworkAttachmentType_InternalNetworkAttachment:
     1128            case NetworkAttachmentType_Internal:
    11291129            {
    11301130                hrc = networkAdapter->COMGETTER(InternalNetwork)(&str);                 H();
     
    11851185        rc = CFGMR3InsertInteger(pCfg,   "IRQ", ulIRQ);                             RC_CHECK();
    11861186        rc = CFGMR3InsertInteger(pCfg,   "IOBase", ulIOBase);                       RC_CHECK();
    1187         if (HostMode != PortMode_DisconnectedPort)
     1187        if (HostMode != PortMode_Disconnected)
    11881188        {
    11891189            rc = CFGMR3InsertNode(pInst,     "LUN#0", &pLunL0);                     RC_CHECK();
    1190             if (HostMode == PortMode_HostPipePort)
     1190            if (HostMode == PortMode_HostPipe)
    11911191            {
    11921192                rc = CFGMR3InsertString(pLunL0,  "Driver", "Char");                 RC_CHECK();
     
    11971197                rc = CFGMR3InsertInteger(pLunL2, "IsServer", fServer);              RC_CHECK();
    11981198            }
    1199             else if (HostMode == PortMode_HostDevicePort)
     1199            else if (HostMode == PortMode_HostDevice)
    12001200            {
    12011201                rc = CFGMR3InsertString(pLunL0,  "Driver", "Host Serial");          RC_CHECK();
     
    13351335        switch (audioDriver)
    13361336        {
    1337             case AudioDriverType_NullAudioDriver:
     1337            case AudioDriverType_Null:
    13381338            {
    13391339                rc = CFGMR3InsertString(pCfg, "AudioDriver", "null");                   RC_CHECK();
     
    13421342#ifdef RT_OS_WINDOWS
    13431343#ifdef VBOX_WITH_WINMM
    1344             case AudioDriverType_WINMMAudioDriver:
     1344            case AudioDriverType_WINMM:
    13451345            {
    13461346                rc = CFGMR3InsertString(pCfg, "AudioDriver", "winmm");                  RC_CHECK();
     
    13481348            }
    13491349#endif
    1350             case AudioDriverType_DSOUNDAudioDriver:
     1350            case AudioDriverType_DSOUND:
    13511351            {
    13521352                rc = CFGMR3InsertString(pCfg, "AudioDriver", "dsound");                 RC_CHECK();
     
    13551355#endif /* RT_OS_WINDOWS */
    13561356#ifdef RT_OS_LINUX
    1357             case AudioDriverType_OSSAudioDriver:
     1357            case AudioDriverType_OSS:
    13581358            {
    13591359                rc = CFGMR3InsertString(pCfg, "AudioDriver", "oss");                    RC_CHECK();
     
    13611361            }
    13621362# ifdef VBOX_WITH_ALSA
    1363             case AudioDriverType_ALSAAudioDriver:
     1363            case AudioDriverType_ALSA:
    13641364            {
    13651365                rc = CFGMR3InsertString(pCfg, "AudioDriver", "alsa");                   RC_CHECK();
     
    13681368# endif
    13691369# ifdef VBOX_WITH_PULSE
    1370             case AudioDriverType_PulseAudioDriver:
     1370            case AudioDriverType_Pulse:
    13711371            {
    13721372                rc = CFGMR3InsertString(pCfg, "AudioDriver", "pulse");                  RC_CHECK();
     
    13761376#endif /* RT_OS_LINUX */
    13771377#ifdef RT_OS_DARWIN
    1378             case AudioDriverType_CoreAudioDriver:
     1378            case AudioDriverType_Core:
    13791379            {
    13801380                rc = CFGMR3InsertString(pCfg, "AudioDriver", "coreaudio");              RC_CHECK();
     
    14721472     */
    14731473    {
    1474         ClipboardMode_T mode = ClipboardMode_ClipDisabled;
     1474        ClipboardMode_T mode = ClipboardMode_Disabled;
    14751475        hrc = pMachine->COMGETTER(ClipboardMode) (&mode);                               H();
    14761476
    1477         if (mode != ClipboardMode_ClipDisabled)
     1477        if (mode != ClipboardMode_Disabled)
    14781478        {
    14791479            /* Load the service */
     
    14961496                {
    14971497                    default:
    1498                     case ClipboardMode_ClipDisabled:
     1498                    case ClipboardMode_Disabled:
    14991499                    {
    15001500                        LogRel(("VBoxSharedClipboard mode: Off\n"));
     
    15021502                        break;
    15031503                    }
    1504                     case ClipboardMode_ClipGuestToHost:
     1504                    case ClipboardMode_GuestToHost:
    15051505                    {
    15061506                        LogRel(("VBoxSharedClipboard mode: Guest to Host\n"));
     
    15081508                        break;
    15091509                    }
    1510                     case ClipboardMode_ClipHostToGuest:
     1510                    case ClipboardMode_HostToGuest:
    15111511                    {
    15121512                        LogRel(("VBoxSharedClipboard mode: Host to Guest\n"));
     
    15141514                        break;
    15151515                    }
    1516                     case ClipboardMode_ClipBidirectional:
     1516                    case ClipboardMode_Bidirectional:
    15171517                    {
    15181518                        LogRel(("VBoxSharedClipboard mode: Bidirectional\n"));
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r5999 r7207  
    242242/**
    243243 *  Handles display resize event.
    244  *  Disables access to VGA device; 
     244 *  Disables access to VGA device;
    245245 *  calls the framebuffer RequestResize method;
    246246 *  if framebuffer resizes synchronously,
     
    282282            break;
    283283        default:
    284             pixelFormat = FramebufferPixelFormat_PixelFormatOpaque;
     284            pixelFormat = FramebufferPixelFormat_Opaque;
    285285            bpp = cbLine = 0;
    286286            break;
     
    331331{
    332332    LogFlowFunc(("\n"));
    333    
     333
    334334    unsigned uScreenId;
    335335    for (uScreenId = 0; uScreenId < mcMonitors; uScreenId++)
     
    350350            /* Primary framebuffer has completed the resize. Update the connector data for VGA device. */
    351351            updateDisplayData();
    352    
     352
    353353            /* Check the framebuffer pixel format to setup the rendering in VGA device. */
    354354            BOOL usesGuestVRAM = FALSE;
     
    542542    prgn->pDisplay = pd;
    543543    prgn->pPort = pp;
    544    
     544
    545545    unsigned uScreenId;
    546546    for (uScreenId = 0; uScreenId < cMonitors; uScreenId++)
     
    794794                ASMAtomicIncS32 (&mcVideoAccelVRDPRefs):
    795795                ASMAtomicDecS32 (&mcVideoAccelVRDPRefs);
    796                
     796
    797797    Assert (c >= 0);
    798    
     798
    799799    if (c == 0)
    800800    {
    801         /* The last client has disconnected, and the accel can be 
     801        /* The last client has disconnected, and the accel can be
    802802         * disabled.
    803803         */
    804804        Assert (fEnable == false);
    805        
     805
    806806        mfVideoAccelVRDP = false;
    807807        mfu32SupportedOrders = 0;
    808        
     808
    809809        vbvaSetMemoryFlags (mpVbvaMemory, mfVideoAccelEnabled, mfVideoAccelVRDP, mfu32SupportedOrders, maFramebuffers, mcMonitors);
    810        
     810
    811811        LogRel(("VBVA: VRDP acceleration has been disabled.\n"));
    812812    }
     
    814814             && !mfVideoAccelVRDP)
    815815    {
    816         /* The first client has connected. Enable the accel. 
     816        /* The first client has connected. Enable the accel.
    817817         */
    818818        Assert (fEnable == true);
    819        
     819
    820820        mfVideoAccelVRDP = true;
    821821        /* Supporting all orders. */
    822822        mfu32SupportedOrders = ~0;
    823        
     823
    824824        vbvaSetMemoryFlags (mpVbvaMemory, mfVideoAccelEnabled, mfVideoAccelVRDP, mfu32SupportedOrders, maFramebuffers, mcMonitors);
    825    
     825
    826826        LogRel(("VBVA: VRDP acceleration has been requested.\n"));
    827827    }
    828828    else
    829829    {
    830         /* A client is connected or disconnected but there is no change in the 
     830        /* A client is connected or disconnected but there is no change in the
    831831         * accel state. It remains enabled.
    832832         */
     
    11901190            phdr->w = (uint16_t)w;
    11911191            phdr->h = (uint16_t)h;
    1192            
     1192
    11931193            DISPLAYFBINFO *pFBInfo = &maFramebuffers[uScreenId];
    11941194
     
    12121212                /* Forward the command to VRDP server. */
    12131213                mParent->consoleVRDPServer()->SendUpdate (uScreenId, phdr, cbCmd);
    1214                
     1214
    12151215                *phdr = hdrSaved;
    12161216            }
     
    21612161         uint8_t *pu8 = (uint8_t *)pvVRAM;
    21622162         pu8 += u32VRAMSize - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE;
    2163          
     2163
    21642164         // @todo
    21652165         uint8_t *pu8End = pu8 + VBOX_VIDEO_ADAPTER_INFORMATION_SIZE;
    21662166
    21672167         VBOXVIDEOINFOHDR *pHdr;
    2168    
     2168
    21692169         for (;;)
    21702170         {
    21712171             pHdr = (VBOXVIDEOINFOHDR *)pu8;
    21722172             pu8 += sizeof (VBOXVIDEOINFOHDR);
    2173              
     2173
    21742174             if (pu8 >= pu8End)
    21752175             {
     
    22182218                         pConf32->u32Value = pDrv->pDisplay->mcMonitors;
    22192219                     } break;
    2220                      
     2220
    22212221                     case VBOX_VIDEO_QCI32_OFFSCREEN_HEAP_SIZE:
    22222222                     {
     
    22242224                         pConf32->u32Value = _1M;
    22252225                     } break;
    2226                      
     2226
    22272227                     default:
    22282228                         LogRel(("VBoxVideo: CONF32 %d not supported!!! Skipping.\n", pConf32->u32Index));
     
    22692269    uint8_t *pu8 = (uint8_t *)pvVRAM;
    22702270    pu8 += pFBInfo->u32Offset + pFBInfo->u32MaxFramebufferSize;
    2271          
     2271
    22722272    // @todo
    22732273    uint8_t *pu8End = pu8 + pFBInfo->u32InformationSize;
    22742274
    22752275    VBOXVIDEOINFOHDR *pHdr;
    2276    
     2276
    22772277    for (;;)
    22782278    {
    22792279        pHdr = (VBOXVIDEOINFOHDR *)pu8;
    22802280        pu8 += sizeof (VBOXVIDEOINFOHDR);
    2281              
     2281
    22822282        if (pu8 >= pu8End)
    22832283        {
  • trunk/src/VBox/Main/HardDiskAttachmentImpl.cpp

    r5999 r7207  
    2828HRESULT HardDiskAttachment::FinalConstruct()
    2929{
    30     mController = DiskControllerType_InvalidController;
     30    mController = DiskControllerType_Null;
    3131    mDeviceNumber = 0;
    3232
  • trunk/src/VBox/Main/HardDiskImpl.cpp

    r6461 r7207  
    102102
    103103    mStorageType = HardDiskStorageType_VirtualDiskImage;
    104     mType = HardDiskType_NormalHardDisk;
     104    mType = HardDiskType_Normal;
    105105
    106106    mBusy = false;
     
    888888    AutoLock chLock (childrenLock());
    889889
    890     if (mParent.isNull() && mType == HardDiskType_NormalHardDisk &&
     890    if (mParent.isNull() && mType == HardDiskType_Normal &&
    891891        children().size() != 0)
    892892    {
     
    12201220        const char *type = aHDNode.stringValue ("type");
    12211221        if (strcmp (type, "normal") == 0)
    1222             mType = HardDiskType_NormalHardDisk;
     1222            mType = HardDiskType_Normal;
    12231223        else if (strcmp (type, "immutable") == 0)
    1224             mType = HardDiskType_ImmutableHardDisk;
     1224            mType = HardDiskType_Immutable;
    12251225        else if (strcmp (type, "writethrough") == 0)
    1226             mType = HardDiskType_WritethroughHardDisk;
     1226            mType = HardDiskType_Writethrough;
    12271227        else
    12281228            ComAssertMsgFailedRet (("Invalid hard disk type '%s'\n", type),
     
    12301230    }
    12311231    else
    1232         mType = HardDiskType_NormalHardDisk;
     1232        mType = HardDiskType_Normal;
    12331233
    12341234    HRESULT rc = mVirtualBox->registerHardDisk (this, VirtualBox::RHD_OnStartUp);
     
    12791279        switch (mType)
    12801280        {
    1281             case HardDiskType_NormalHardDisk:
     1281            case HardDiskType_Normal:
    12821282                type = "normal";
    12831283                break;
    1284             case HardDiskType_ImmutableHardDisk:
     1284            case HardDiskType_Immutable:
    12851285                type = "immutable";
    12861286                break;
    1287             case HardDiskType_WritethroughHardDisk:
     1287            case HardDiskType_Writethrough:
    12881288                type = "writethrough";
    12891289                break;
     
    28762876        CheckComRCBreakRC (rc);
    28772877
    2878         if (mType != HardDiskType_WritethroughHardDisk)
     2878        if (mType != HardDiskType_Writethrough)
    28792879        {
    28802880            rc = setError (E_FAIL,
     
    29212921        mId.create();
    29222922        /* currently, all iSCSI hard disks are writethrough */
    2923         mType = HardDiskType_WritethroughHardDisk;
     2923        mType = HardDiskType_Writethrough;
    29242924        mRegistered = FALSE;
    29252925    }
     
    34103410 */
    34113411HRESULT HVMDKImage::init (VirtualBox *aVirtualBox, HardDisk *aParent,
    3412                           const settings::Key &aHDNode, 
     3412                          const settings::Key &aHDNode,
    34133413                          const settings::Key &aVMDKNode)
    34143414{
     
    34453445        CheckComRCBreakRC (rc);
    34463446
    3447         if (mType != HardDiskType_WritethroughHardDisk)
     3447        if (mType != HardDiskType_Writethrough)
    34483448        {
    34493449            rc = setError (E_FAIL,
     
    35073507
    35083508        /* currently, all VMDK hard disks are writethrough */
    3509         mType = HardDiskType_WritethroughHardDisk;
     3509        mType = HardDiskType_Writethrough;
    35103510
    35113511        Assert (mId.isEmpty());
     
    43344334        CheckComRCBreakRC (rc);
    43354335
    4336         if (mType != HardDiskType_WritethroughHardDisk)
     4336        if (mType != HardDiskType_Writethrough)
    43374337        {
    43384338            rc = setError (E_FAIL,
     
    43964396
    43974397        /* currently, all custom hard disks are writethrough */
    4398         mType = HardDiskType_WritethroughHardDisk;
     4398        mType = HardDiskType_Writethrough;
    43994399
    44004400        Assert (mId.isEmpty());
     
    51125112 */
    51135113HRESULT HVHDImage::init (VirtualBox *aVirtualBox, HardDisk *aParent,
    5114                          const settings::Key &aHDNode, 
     5114                         const settings::Key &aHDNode,
    51155115                         const settings::Key &aVHDNode)
    51165116{
     
    51465146        CheckComRCBreakRC (rc);
    51475147
    5148         if (mType != HardDiskType_WritethroughHardDisk)
     5148        if (mType != HardDiskType_Writethrough)
    51495149        {
    51505150            rc = setError (E_FAIL,
     
    52085208
    52095209        /* currently, all VHD hard disks are writethrough */
    5210         mType = HardDiskType_WritethroughHardDisk;
     5210        mType = HardDiskType_Writethrough;
    52115211
    52125212        Assert (mId.isEmpty());
  • trunk/src/VBox/Main/HostImpl.cpp

    r7104 r7207  
    11581158
    11591159        USBDeviceFilterAction_T action;
    1160         action = USBDeviceFilterAction_USBDeviceFilterIgnore;
     1160        action = USBDeviceFilterAction_Ignore;
    11611161        const char *actionStr = (*it).stringValue ("action");
    11621162        if (strcmp (actionStr, "Ignore") == 0)
    1163             action = USBDeviceFilterAction_USBDeviceFilterIgnore;
     1163            action = USBDeviceFilterAction_Ignore;
    11641164        else
    11651165        if (strcmp (actionStr, "Hold") == 0)
    1166             action = USBDeviceFilterAction_USBDeviceFilterHold;
     1166            action = USBDeviceFilterAction_Hold;
    11671167        else
    11681168            AssertMsgFailed (("Invalid action: '%s'\n", actionStr));
     
    12421242
    12431243        /* action is mandatory */
    1244         if (data.mAction == USBDeviceFilterAction_USBDeviceFilterIgnore)
     1244        if (data.mAction == USBDeviceFilterAction_Ignore)
    12451245            filter.setStringValue ("action", "Ignore");
    12461246        else
    1247         if (data.mAction == USBDeviceFilterAction_USBDeviceFilterHold)
     1247        if (data.mAction == USBDeviceFilterAction_Hold)
    12481248            filter.setStringValue ("action", "Hold");
    12491249        else
     
    12831283
    12841284        /* action is mandatory */
    1285         ULONG action = USBDeviceFilterAction_InvalidUSBDeviceFilterAction;
     1285        ULONG action = USBDeviceFilterAction_Null;
    12861286        (*it)->COMGETTER (Action) (&action);
    1287         if (action == USBDeviceFilterAction_USBDeviceFilterIgnore)
     1287        if (action == USBDeviceFilterAction_Ignore)
    12881288            filter.setStringValue ("action", "Ignore");
    1289         else if (action == USBDeviceFilterAction_USBDeviceFilterHold)
     1289        else if (action == USBDeviceFilterAction_Hold)
    12901290            filter.setStringValue ("action", "Hold");
    12911291        else
     
    13411341            device->name().raw(), id.raw());
    13421342
    1343     if (device->state() == USBDeviceState_USBDeviceNotSupported)
     1343    if (device->state() == USBDeviceState_NotSupported)
    13441344        return setError (E_INVALIDARG,
    13451345            tr ("USB device '%s' with UUID {%Vuuid} cannot be accessed by guest "
     
    13471347            device->name().raw(), id.raw());
    13481348
    1349     if (device->state() == USBDeviceState_USBDeviceUnavailable)
     1349    if (device->state() == USBDeviceState_Unavailable)
    13501350        return setError (E_INVALIDARG,
    13511351            tr ("USB device '%s' with UUID {%Vuuid} is being exclusively used by the "
     
    13531353            device->name().raw(), id.raw());
    13541354
    1355     if (device->state() == USBDeviceState_USBDeviceCaptured)
     1355    if (device->state() == USBDeviceState_Captured)
    13561356    {
    13571357        /* Machine::name() requires a read lock */
     
    14911491            continue;
    14921492
    1493         if (device->state() == USBDeviceState_USBDeviceBusy ||
    1494             device->state() == USBDeviceState_USBDeviceAvailable ||
    1495             device->state() == USBDeviceState_USBDeviceHeld)
     1493        if (device->state() == USBDeviceState_Busy ||
     1494            device->state() == USBDeviceState_Available ||
     1495            device->state() == USBDeviceState_Held)
    14961496        {
    14971497            applyMachineUSBFilters (aMachine, device);
     
    15361536                if (!device->isStatePending())
    15371537                {
    1538                     Assert (device->state() == USBDeviceState_USBDeviceCaptured);
     1538                    Assert (device->state() == USBDeviceState_Captured);
    15391539
    15401540                    /* re-apply filters on the device before giving it back to the
     
    20602060    AssertReturn (aDevice->isLockedOnCurrentThread(), E_FAIL);
    20612061
    2062     AssertReturn (aDevice->state() != USBDeviceState_USBDeviceCaptured, E_FAIL);
     2062    AssertReturn (aDevice->state() != USBDeviceState_Captured, E_FAIL);
    20632063
    20642064    AssertReturn (aDevice->isStatePending() == false, E_FAIL);
    20652065
    20662066    /* ignore unsupported devices */
    2067     if (aDevice->state() == USBDeviceState_USBDeviceNotSupported)
     2067    if (aDevice->state() == USBDeviceState_NotSupported)
    20682068        return S_OK;
    20692069    /* ignore unavailable devices as well */
    2070     if (aDevice->state() == USBDeviceState_USBDeviceUnavailable)
     2070    if (aDevice->state() == USBDeviceState_Unavailable)
    20712071        return S_OK;
    20722072
     
    20892089            USBDeviceFilterAction_T action = data.mAction;
    20902090#else
    2091             ULONG action = USBDeviceFilterAction_InvalidUSBDeviceFilterAction;
     2091            ULONG action = USBDeviceFilterAction_Null;
    20922092            (*it)->COMGETTER (Action) (&action);
    20932093#endif
    2094             if (action == USBDeviceFilterAction_USBDeviceFilterIgnore)
     2094            if (action == USBDeviceFilterAction_Ignore)
    20952095            {
    20962096                /* request to give the device back to the host*/
     
    20992099                return S_OK;
    21002100            }
    2101             if (action == USBDeviceFilterAction_USBDeviceFilterHold)
     2101            if (action == USBDeviceFilterAction_Hold)
    21022102                break;
    21032103        }
     
    21602160    AssertReturn (aDevice->isLockedOnCurrentThread(), false);
    21612161
    2162     AssertReturn (aDevice->state() != USBDeviceState_USBDeviceNotSupported, false);
    2163     AssertReturn (aDevice->state() != USBDeviceState_USBDeviceUnavailable, false);
     2162    AssertReturn (aDevice->state() != USBDeviceState_NotSupported, false);
     2163    AssertReturn (aDevice->state() != USBDeviceState_Unavailable, false);
    21642164
    21652165    AssertReturn (aDevice->isStatePending() == false, false);
     
    22822282            ComObjPtr <SessionMachine> machine (device->machine());
    22832283            device->handlePendingStateChange();
    2284             if (device->state() == USBDeviceState_USBDeviceCaptured)
     2284            if (device->state() == USBDeviceState_Captured)
    22852285            {
    22862286                Log (("USB: running filters on async detached device\n"));
     
    22912291            else
    22922292                Log (("USB: async detached devices reappeared in stated %d instead of %d!\n",
    2293                       device->state(), USBDeviceState_USBDeviceCaptured));
     2293                      device->state(), USBDeviceState_Captured));
    22942294        }
    22952295        else
    22962296            device->handlePendingStateChange();
    22972297    }
    2298     else if (   device->state() == USBDeviceState_USBDeviceAvailable
    2299              || device->state() == USBDeviceState_USBDeviceBusy)
     2298    else if (   device->state() == USBDeviceState_Available
     2299             || device->state() == USBDeviceState_Busy)
    23002300    {
    23012301        /* The device has gone from being unavailable (not subject to filters) to being
  • trunk/src/VBox/Main/HostUSBDeviceImpl.cpp

    r5999 r7207  
    8383            AssertMsgFailed(("aUsb->enmState=%d\n", aUsb->enmState));
    8484        case USBDEVICESTATE_UNSUPPORTED:
    85             mState = USBDeviceState_USBDeviceNotSupported;
     85            mState = USBDeviceState_NotSupported;
    8686            break;
    8787        case USBDEVICESTATE_USED_BY_HOST:
    88             mState = USBDeviceState_USBDeviceUnavailable;
     88            mState = USBDeviceState_Unavailable;
    8989            break;
    9090        case USBDEVICESTATE_USED_BY_HOST_CAPTURABLE:
    91             mState = USBDeviceState_USBDeviceBusy;
     91            mState = USBDeviceState_Busy;
    9292            break;
    9393        case USBDEVICESTATE_UNUSED:
    94             mState = USBDeviceState_USBDeviceAvailable;
     94            mState = USBDeviceState_Available;
    9595            break;
    9696        case USBDEVICESTATE_HELD_BY_PROXY:
    97             mState = USBDeviceState_USBDeviceHeld;
     97            mState = USBDeviceState_Held;
    9898            break;
    9999        case USBDEVICESTATE_USED_BY_GUEST:
     
    400400
    401401    AssertReturn (
    402         mState == USBDeviceState_USBDeviceBusy ||
    403         mState == USBDeviceState_USBDeviceAvailable ||
    404         mState == USBDeviceState_USBDeviceHeld,
     402        mState == USBDeviceState_Busy ||
     403        mState == USBDeviceState_Available ||
     404        mState == USBDeviceState_Held,
    405405        false);
    406406
    407     if (mState == USBDeviceState_USBDeviceHeld)
     407    if (mState == USBDeviceState_Held)
    408408    {
    409409        /* can perform immediate capture, inform the VM process */
     
    437437        if (SUCCEEDED (rc))
    438438        {
    439             mState = mPendingState = USBDeviceState_USBDeviceCaptured;
     439            mState = mPendingState = USBDeviceState_Captured;
    440440            mMachine = aMachine;
    441441            return true;
     
    446446
    447447    mIsStatePending = true;
    448     mPendingState = USBDeviceState_USBDeviceCaptured;
     448    mPendingState = USBDeviceState_Captured;
    449449    mPendingStateEx = kNothingPending;
    450450    mPendingSince = RTTimeNanoTS();
     
    475475
    476476    AssertReturnVoid (
    477         mState == USBDeviceState_USBDeviceBusy ||
    478         mState == USBDeviceState_USBDeviceAvailable ||
    479         mState == USBDeviceState_USBDeviceHeld);
    480 
    481     if (mState != USBDeviceState_USBDeviceHeld)
     477        mState == USBDeviceState_Busy ||
     478        mState == USBDeviceState_Available ||
     479        mState == USBDeviceState_Held);
     480
     481    if (mState != USBDeviceState_Held)
    482482        return;
    483483
    484484    mIsStatePending = true;
    485     mPendingState = USBDeviceState_USBDeviceAvailable;
     485    mPendingState = USBDeviceState_Available;
    486486    mPendingStateEx = kNothingPending;
    487487    mPendingSince = RTTimeNanoTS();
     
    509509
    510510    AssertReturnVoid (
    511         mState == USBDeviceState_USBDeviceBusy ||
    512         mState == USBDeviceState_USBDeviceAvailable ||
    513         mState == USBDeviceState_USBDeviceHeld);
     511        mState == USBDeviceState_Busy ||
     512        mState == USBDeviceState_Available ||
     513        mState == USBDeviceState_Held);
    514514
    515515    mMachine.setNull();
    516516
    517     if (mState == USBDeviceState_USBDeviceHeld)
     517    if (mState == USBDeviceState_Held)
    518518        return;
    519519
    520520    mIsStatePending = true;
    521     mPendingState = USBDeviceState_USBDeviceHeld;
     521    mPendingState = USBDeviceState_Held;
    522522    mPendingStateEx = kNothingPending;
    523523    mPendingSince = RTTimeNanoTS();
     
    538538    AssertReturnVoid (isLockedOnCurrentThread());
    539539
    540     AssertReturnVoid (mState == USBDeviceState_USBDeviceCaptured);
    541     AssertReturnVoid (mPendingState == USBDeviceState_USBDeviceCaptured);
     540    AssertReturnVoid (mState == USBDeviceState_Captured);
     541    AssertReturnVoid (mPendingState == USBDeviceState_Captured);
    542542    AssertReturnVoid (mIsStatePending == false);
    543543
    544     mState = USBDeviceState_USBDeviceHeld;
     544    mState = USBDeviceState_Held;
    545545    mMachine.setNull();
    546546}
     
    559559    AssertReturnVoid (isLockedOnCurrentThread());
    560560
    561     if (!mMachine.isNull() && mState == USBDeviceState_USBDeviceCaptured)
     561    if (!mMachine.isNull() && mState == USBDeviceState_Captured)
    562562    {
    563563        /* the device is captured by a machine, instruct it to release */
     
    592592         * matter what state we put it in. */
    593593        mIsStatePending = false;
    594         mState = mPendingState = USBDeviceState_USBDeviceNotSupported;
     594        mState = mPendingState = USBDeviceState_NotSupported;
    595595        mPendingStateEx = kNothingPending;
    596596        mMachine.setNull();
     
    611611
    612612    AssertReturnVoid (mIsStatePending == true);
    613     AssertReturnVoid (mState != USBDeviceState_USBDeviceCaptured || mPendingStateEx != kNothingPending);
     613    AssertReturnVoid (mState != USBDeviceState_Captured || mPendingStateEx != kNothingPending);
    614614
    615615    bool wasCapture = false;
     
    623623            switch (mPendingState)
    624624            {
    625                 case USBDeviceState_USBDeviceCaptured:
     625                case USBDeviceState_Captured:
    626626                {
    627                     if (mState == USBDeviceState_USBDeviceHeld)
     627                    if (mState == USBDeviceState_Held)
    628628                    {
    629629                        if (!mMachine.isNull())
     
    633633                            /* it is a canceled capture request. Give the device back
    634634                             * to the host. */
    635                             mPendingState = USBDeviceState_USBDeviceAvailable;
     635                            mPendingState = USBDeviceState_Available;
    636636                            mUSBProxyService->releaseDevice (this);
    637637                        }
     
    656656                    break;
    657657                }
    658                 case USBDeviceState_USBDeviceAvailable:
     658                case USBDeviceState_Available:
    659659                {
    660660                    Assert (mMachine.isNull());
    661661
    662                     if (mState == USBDeviceState_USBDeviceHeld)
     662                    if (mState == USBDeviceState_Held)
    663663                    {
    664664                        /* couldn't release the device (give it back to the host).
     
    674674                    break;
    675675                }
    676                 case USBDeviceState_USBDeviceHeld:
     676                case USBDeviceState_Held:
    677677                {
    678                     if (mState == USBDeviceState_USBDeviceHeld)
     678                    if (mState == USBDeviceState_Held)
    679679                    {
    680680                        /* All right, the device is now held (due to some global
     
    757757        {
    758758            mIsStatePending = false;
    759             mState = mPendingState = USBDeviceState_USBDeviceCaptured;
     759            mState = mPendingState = USBDeviceState_Captured;
    760760            mPendingStateEx = kNothingPending;
    761761            return;
     
    792792            switch (mPendingState)
    793793            {
    794                 case USBDeviceState_USBDeviceCaptured:
     794                case USBDeviceState_Captured:
    795795                    /* reset mMachine to deassociate it from the filter and tell
    796796                     * handlePendingStateChange() what to do */
     
    798798                    if (!aTimeout)
    799799                        break;
    800                 case USBDeviceState_USBDeviceAvailable:
    801                 case USBDeviceState_USBDeviceHeld:
     800                case USBDeviceState_Available:
     801                case USBDeviceState_Held:
    802802                    if (aTimeout)
    803803                    {
     
    10791079            AssertMsgFailed (("aDev->enmState=%d\n", aDev->enmState));
    10801080        case USBDEVICESTATE_UNSUPPORTED:
    1081             Assert (mState == USBDeviceState_USBDeviceNotSupported);
     1081            Assert (mState == USBDeviceState_NotSupported);
    10821082            switch (mState)
    10831083            {
    1084                 case USBDeviceState_USBDeviceCaptured:
     1084                case USBDeviceState_Captured:
    10851085                    isImportant = mIsStatePending;
    10861086                    break;
     
    10911091            switch (mState)
    10921092            {
    1093                 case USBDeviceState_USBDeviceUnavailable:
     1093                case USBDeviceState_Unavailable:
    10941094                    return false;
    10951095                /* the following state changes don't require any action for now */
    1096                 case USBDeviceState_USBDeviceBusy:
    1097                 case USBDeviceState_USBDeviceAvailable:
     1096                case USBDeviceState_Busy:
     1097                case USBDeviceState_Available:
    10981098                    isImportant = false;
    10991099                    break;
    11001100#ifndef RT_OS_WINDOWS /* Only windows really knows whether the device is unavailable or captured. */
    1101                 case USBDeviceState_USBDeviceCaptured:
     1101                case USBDeviceState_Captured:
    11021102                    if (!mIsStatePending)
    11031103                        return false;
     
    11081108            }
    11091109            LogFlowThisFunc (("%d -> %d\n",
    1110                               mState, USBDeviceState_USBDeviceUnavailable));
    1111             mState = USBDeviceState_USBDeviceUnavailable;
     1110                              mState, USBDeviceState_Unavailable));
     1111            mState = USBDeviceState_Unavailable;
    11121112            return isImportant;
    11131113
     
    11151115            switch (mState)
    11161116            {
    1117                 case USBDeviceState_USBDeviceBusy:
     1117                case USBDeviceState_Busy:
    11181118                    return false;
    1119                 case USBDeviceState_USBDeviceAvailable:
     1119                case USBDeviceState_Available:
    11201120                    isImportant = false;
    11211121                    break;
    1122                 case USBDeviceState_USBDeviceCaptured:
     1122                case USBDeviceState_Captured:
    11231123#ifndef RT_OS_WINDOWS /* Only Windows really knows whether the device is busy or captured. */
    11241124                    if (!mIsStatePending)
     
    11331133                    /* fall thru */
    11341134                default:
    1135                     /* USBDeviceState_USBDeviceUnavailable: The device has become capturable, re-run filters. */
    1136                     /* USBDeviceState_USBDeviceHeld:        Pending request. */
    1137                     /* USBDeviceState_USBDeviceCaptured:    Pending request. */
    1138                     /* USBDeviceState_USBDeviceNotSupported: Something is broken. */
     1135                    /* USBDeviceState_Unavailable: The device has become capturable, re-run filters. */
     1136                    /* USBDeviceState_Held:        Pending request. */
     1137                    /* USBDeviceState_Captured:    Pending request. */
     1138                    /* USBDeviceState_NotSupported: Something is broken. */
    11391139                    isImportant = true;
    11401140            }
    11411141            LogFlowThisFunc (("%d -> %d\n",
    1142                               mState, USBDeviceState_USBDeviceBusy));
    1143             mState = USBDeviceState_USBDeviceBusy;
     1142                              mState, USBDeviceState_Busy));
     1143            mState = USBDeviceState_Busy;
    11441144            return isImportant;
    11451145
     
    11471147            switch (mState)
    11481148            {
    1149                 case USBDeviceState_USBDeviceAvailable:
     1149                case USBDeviceState_Available:
    11501150                    return false;
    11511151#if defined(RT_OS_LINUX)  /* Hack for /proc/bus/usb/devices not necessarily putting up a driver. */ \
    11521152 || defined(RT_OS_DARWIN) /* We're a bit clueless as to the exact device state, just like linux. */
    1153                 case USBDeviceState_USBDeviceCaptured:
     1153                case USBDeviceState_Captured:
    11541154                    if (    !mIsStatePending
    11551155                        ||  mPendingStateEx != kNothingPending)
     
    11591159#endif
    11601160                /* the following state changes don't require any action for now */
    1161                 case USBDeviceState_USBDeviceBusy:
     1161                case USBDeviceState_Busy:
    11621162                    isImportant = false;
    11631163                    break;
    11641164                default:
    1165                 /* USBDeviceState_USBDeviceUnavailable: The device has become available, re-run filters. */
    1166                 /* USBDeviceState_USBDeviceHeld:        Pending request. */
    1167                 /* USBDeviceState_USBDeviceNotSupported: Something is broken. */
     1165                /* USBDeviceState_Unavailable: The device has become available, re-run filters. */
     1166                /* USBDeviceState_Held:        Pending request. */
     1167                /* USBDeviceState_NotSupported: Something is broken. */
    11681168                    isImportant = true;
    11691169            }
    11701170            LogFlowThisFunc (("%d -> %d\n",
    1171                               mState, USBDeviceState_USBDeviceAvailable));
    1172             mState = USBDeviceState_USBDeviceAvailable;
     1171                              mState, USBDeviceState_Available));
     1172            mState = USBDeviceState_Available;
    11731173            return isImportant;
    11741174
     
    11761176            switch (mState)
    11771177            {
    1178                 case USBDeviceState_USBDeviceHeld:
     1178                case USBDeviceState_Held:
    11791179                    return false;
    1180                 case USBDeviceState_USBDeviceCaptured:
     1180                case USBDeviceState_Captured:
    11811181                    if (!mIsStatePending)
    11821182                        return false;
     
    11841184                default:
    11851185                    LogFlowThisFunc (("%d -> %d\n",
    1186                                       mState, USBDeviceState_USBDeviceHeld));
    1187                     mState = USBDeviceState_USBDeviceHeld;
     1186                                      mState, USBDeviceState_Held));
     1187                    mState = USBDeviceState_Held;
    11881188                    return true;
    11891189            }
     
    11981198            switch (mState)
    11991199            {
    1200                 case USBDeviceState_USBDeviceCaptured:
     1200                case USBDeviceState_Captured:
    12011201                /* the proxy may confuse following state(s) with captured */
    1202                 case USBDeviceState_USBDeviceHeld:
    1203                 case USBDeviceState_USBDeviceAvailable:
    1204                 case USBDeviceState_USBDeviceBusy:
     1202                case USBDeviceState_Held:
     1203                case USBDeviceState_Available:
     1204                case USBDeviceState_Busy:
    12051205                    return false;
    12061206                default:
    12071207                    LogFlowThisFunc (("%d -> %d\n",
    1208                                       mState, USBDeviceState_USBDeviceHeld));
    1209                     mState = USBDeviceState_USBDeviceHeld;
     1208                                      mState, USBDeviceState_Held));
     1209                    mState = USBDeviceState_Held;
    12101210                    return true;
    12111211            }
  • trunk/src/VBox/Main/MachineImpl.cpp

    r6965 r7207  
    127127
    128128    mSession.mPid = NIL_RTPROCESS;
    129     mSession.mState = SessionState_SessionClosed;
     129    mSession.mState = SessionState_Closed;
    130130}
    131131
     
    169169    mVRAMSize = 8;
    170170    mMonitorCount = 1;
    171     mHWVirtExEnabled = TriStateBool_TSFalse;
     171    mHWVirtExEnabled = TSBool_False;
    172172
    173173    /* default boot order: floppy - DVD - HDD */
    174     mBootOrder [0] = DeviceType_FloppyDevice;
    175     mBootOrder [1] = DeviceType_DVDDevice;
    176     mBootOrder [2] = DeviceType_HardDiskDevice;
     174    mBootOrder [0] = DeviceType_Floppy;
     175    mBootOrder [1] = DeviceType_DVD;
     176    mBootOrder [2] = DeviceType_HardDisk;
    177177    for (size_t i = 3; i < ELEMENTS (mBootOrder); i++)
    178         mBootOrder [i] = DeviceType_NoDevice;
    179 
    180     mClipboardMode = ClipboardMode_ClipBidirectional;
     178        mBootOrder [i] = DeviceType_Null;
     179
     180    mClipboardMode = ClipboardMode_Bidirectional;
    181181}
    182182
     
    10791079}
    10801080
    1081 STDMETHODIMP Machine::COMGETTER(HWVirtExEnabled)(TriStateBool_T *enabled)
     1081STDMETHODIMP Machine::COMGETTER(HWVirtExEnabled)(TSBool_T *enabled)
    10821082{
    10831083    if (!enabled)
     
    10941094}
    10951095
    1096 STDMETHODIMP Machine::COMSETTER(HWVirtExEnabled)(TriStateBool_T enable)
     1096STDMETHODIMP Machine::COMSETTER(HWVirtExEnabled)(TSBool_T enable)
    10971097{
    10981098    AutoCaller autoCaller (this);
     
    15511551                aPosition, SchemaDefs::MaxBootPosition);
    15521552
    1553     if (aDevice == DeviceType_USBDevice)
     1553    if (aDevice == DeviceType_USB)
    15541554        return setError (E_FAIL,
    15551555            tr ("Booting from USB devices is not currently supported"));
     
    15921592
    15931593    if (id.isEmpty() ||
    1594         aCtl == DiskControllerType_InvalidController ||
     1594        aCtl == DiskControllerType_Null ||
    15951595        aDev < 0 || aDev > 1)
    15961596        return E_INVALIDARG;
     
    16471647    switch (hd->type())
    16481648    {
    1649         case HardDiskType_ImmutableHardDisk:
     1649        case HardDiskType_Immutable:
    16501650        {
    16511651            Assert (hd->machineId().isEmpty());
     
    16591659            break;
    16601660        }
    1661         case HardDiskType_WritethroughHardDisk:
     1661        case HardDiskType_Writethrough:
    16621662        {
    16631663            Assert (hd->children().size() == 0);
     
    16651665            /* fall through */
    16661666        }
    1667         case HardDiskType_NormalHardDisk:
     1667        case HardDiskType_Normal:
    16681668        {
    16691669            if (hd->machineId().isEmpty())
     
    17221722                {
    17231723                    /*
    1724                      *  here we go when the HardDiskType_NormalHardDisk
     1724                     *  here we go when the HardDiskType_Normal
    17251725                     *  is attached to some VM (probably to this one, too)
    17261726                     *  at some particular snapshot, so we can create a diff
     
    17581758                                   LONG aDev, IHardDisk **aHardDisk)
    17591759{
    1760     if (aCtl == DiskControllerType_InvalidController ||
     1760    if (aCtl == DiskControllerType_Null ||
    17611761        aDev < 0 || aDev > 1)
    17621762        return E_INVALIDARG;
     
    17871787STDMETHODIMP Machine::DetachHardDisk (DiskControllerType_T aCtl, LONG aDev)
    17881788{
    1789     if (aCtl == DiskControllerType_InvalidController ||
     1789    if (aCtl == DiskControllerType_Null ||
    17901790        aDev < 0 || aDev > 1)
    17911791        return E_INVALIDARG;
     
    18211821                switch (hd->type())
    18221822                {
    1823                     case HardDiskType_ImmutableHardDisk:
     1823                    case HardDiskType_Immutable:
    18241824                    {
    18251825                        /* decrease readers increased in AttachHardDisk() */
     
    18281828                        break;
    18291829                    }
    1830                     case HardDiskType_WritethroughHardDisk:
     1830                    case HardDiskType_Writethrough:
    18311831                    {
    18321832                        /* deassociate from this machine */
     
    18351835                        break;
    18361836                    }
    1837                     case HardDiskType_NormalHardDisk:
     1837                    case HardDiskType_Normal:
    18381838                    {
    18391839                        if (hd->snapshotId().isEmpty())
     
    24542454        AutoReaderLock alock (this);
    24552455
    2456         if (mData->mSession.mState != SessionState_SessionOpen)
     2456        if (mData->mSession.mState != SessionState_Open)
    24572457            return setError (E_FAIL,
    24582458                tr ("Machine session is not open (session state: %d)"),
     
    24822482        AutoReaderLock alock (this);
    24832483
    2484         if (mData->mSession.mState != SessionState_SessionOpen)
     2484        if (mData->mSession.mState != SessionState_Open)
    24852485            return setError (E_FAIL,
    24862486                tr ("Machine session is not open (session state: %d)"),
     
    25222522    sm = mData->mSession.mMachine;
    25232523    Assert (!sm.isNull() ||
    2524             mData->mSession.mState != SessionState_SessionOpen);
     2524            mData->mSession.mState != SessionState_Open);
    25252525
    25262526    return  sm;
     
    26892689        }
    26902690
    2691         if (!(aUsage & ResourceUsage_PermanentUsage))
     2691        if (!(aUsage & ResourceUsage_Permanent))
    26922692            d [0] = NULL;
    2693         if (!(aUsage & ResourceUsage_TemporaryUsage))
     2693        if (!(aUsage & ResourceUsage_Temporary))
    26942694            d [1] = NULL;
    26952695
     
    27092709
    27102710    /* then, check snapshots if any */
    2711     if (aUsage & ResourceUsage_PermanentUsage)
     2711    if (aUsage & ResourceUsage_Permanent)
    27122712    {
    27132713        if (!mData->mFirstSnapshot.isNull() &&
     
    27652765        }
    27662766
    2767         if (!(aUsage & ResourceUsage_PermanentUsage))
     2767        if (!(aUsage & ResourceUsage_Permanent))
    27682768            d [0] = NULL;
    2769         if (!(aUsage & ResourceUsage_TemporaryUsage))
     2769        if (!(aUsage & ResourceUsage_Temporary))
    27702770            d [1] = NULL;
    27712771
     
    27852785
    27862786    /* then, check snapshots if any */
    2787     if (aUsage & ResourceUsage_PermanentUsage)
     2787    if (aUsage & ResourceUsage_Permanent)
    27882788    {
    27892789        if (!mData->mFirstSnapshot.isNull() &&
     
    28172817    LogFlowThisFunc (("mSession.mState=%d\n", mData->mSession.mState));
    28182818
    2819     if (mData->mSession.mState == SessionState_SessionOpen ||
    2820         mData->mSession.mState == SessionState_SessionClosing)
     2819    if (mData->mSession.mState == SessionState_Open ||
     2820        mData->mSession.mState == SessionState_Closing)
    28212821        return setError (E_ACCESSDENIED,
    28222822            tr ("A session for the machine '%ls' is currently open "
     
    28332833    Assert (pid != NIL_RTPROCESS);
    28342834
    2835     if (mData->mSession.mState == SessionState_SessionSpawning)
     2835    if (mData->mSession.mState == SessionState_Spawning)
    28362836    {
    28372837        /* This machine is awaiting for a spawning session to be opened, so
     
    28652865         */
    28662866        SessionState_T origState = mData->mSession.mState;
    2867         mData->mSession.mState = SessionState_SessionSpawning;
     2867        mData->mSession.mState = SessionState_Spawning;
    28682868
    28692869        /*
     
    28882888                tr ("Failed to assign the machine to the session"));
    28892889
    2890         if (SUCCEEDED (rc) && origState == SessionState_SessionSpawning)
     2890        if (SUCCEEDED (rc) && origState == SessionState_Spawning)
    28912891        {
    28922892            /* complete the remote session initialization */
     
    29332933
    29342934    /* finalize spawning amyway (this is why we don't return on errors above) */
    2935     if (mData->mSession.mState == SessionState_SessionSpawning)
     2935    if (mData->mSession.mState == SessionState_Spawning)
    29362936    {
    29372937        /* Note that the progress object is finalized later */
     
    29462946             * and reset session state to Closed. */
    29472947            mData->mSession.mRemoteControls.clear();
    2948             mData->mSession.mState = SessionState_SessionClosed;
     2948            mData->mSession.mState = SessionState_Closed;
    29492949        }
    29502950    }
     
    29602960        /* memorize the direct session control and cache IUnknown for it */
    29612961        mData->mSession.mDirectControl = aControl;
    2962         mData->mSession.mState = SessionState_SessionOpen;
     2962        mData->mSession.mState = SessionState_Open;
    29632963        /* associate the SessionMachine with this Machine */
    29642964        mData->mSession.mMachine = sessionMachine;
     
    30113011    LogFlowThisFunc (("mSession.mState=%d\n", mData->mSession.mState));
    30123012
    3013     if (mData->mSession.mState == SessionState_SessionOpen ||
    3014         mData->mSession.mState == SessionState_SessionSpawning ||
    3015         mData->mSession.mState == SessionState_SessionClosing)
     3013    if (mData->mSession.mState == SessionState_Open ||
     3014        mData->mSession.mState == SessionState_Spawning ||
     3015        mData->mSession.mState == SessionState_Closing)
    30163016        return setError (E_ACCESSDENIED,
    30173017            tr ("A session for the machine '%ls' is currently open "
     
    31723172    {
    31733173        /* restore the session state */
    3174         mData->mSession.mState = SessionState_SessionClosed;
     3174        mData->mSession.mState = SessionState_Closed;
    31753175        /* The failure may w/o any error info (from RPC), so provide one */
    31763176        return setError (rc,
     
    31833183    mData->mSession.mProgress = aProgress;
    31843184    mData->mSession.mPid = pid;
    3185     mData->mSession.mState = SessionState_SessionSpawning;
     3185    mData->mSession.mState = SessionState_Spawning;
    31863186    mData->mSession.mType = type;
    31873187
     
    32113211    LogFlowThisFunc (("mSession.state=%d\n", mData->mSession.mState));
    32123212
    3213     if (mData->mSession.mState != SessionState_SessionOpen)
     3213    if (mData->mSession.mState != SessionState_Open)
    32143214        return setError (E_ACCESSDENIED,
    32153215            tr ("The machine '%ls' does not have an open session"),
     
    32583258
    32593259    /* need to revalidate the state after entering the lock again */
    3260     if (mData->mSession.mState != SessionState_SessionOpen)
     3260    if (mData->mSession.mState != SessionState_Open)
    32613261    {
    32623262        aControl->Uninitialize();
     
    33493349                mUserData->mName.raw(), snapshotCount);
    33503350
    3351         if (mData->mSession.mState != SessionState_SessionClosed)
     3351        if (mData->mSession.mState != SessionState_Closed)
    33523352            return setError (E_FAIL,
    33533353                tr ("Cannot unregister the machine '%ls' because it has an "
     
    41404140    {
    41414141        /* default value in case the node is not there */
    4142         mHWData->mHWVirtExEnabled = TriStateBool_TSDefault;
     4142        mHWData->mHWVirtExEnabled = TSBool_Default;
    41434143
    41444144        Key cpuNode = aNode.findKey ("CPU");
     
    41504150                const char *enabled = hwVirtExNode.stringValue ("enabled");
    41514151                if      (strcmp (enabled, "false") == 0)
    4152                     mHWData->mHWVirtExEnabled = TriStateBool_TSFalse;
     4152                    mHWData->mHWVirtExEnabled = TSBool_False;
    41534153                else if (strcmp (enabled, "true") == 0)
    4154                     mHWData->mHWVirtExEnabled = TriStateBool_TSTrue;
     4154                    mHWData->mHWVirtExEnabled = TSBool_True;
    41554155                else
    4156                     mHWData->mHWVirtExEnabled = TriStateBool_TSDefault;
     4156                    mHWData->mHWVirtExEnabled = TSBool_Default;
    41574157            }
    41584158        }
     
    41704170        /* reset all boot order positions to NoDevice */
    41714171        for (size_t i = 0; i < ELEMENTS (mHWData->mBootOrder); i++)
    4172             mHWData->mBootOrder [i] = DeviceType_NoDevice;
     4172            mHWData->mBootOrder [i] = DeviceType_Null;
    41734173
    41744174        Key bootNode = aNode.key ("Boot");
     
    41874187            const char *device = (*it).stringValue ("device");
    41884188            if      (strcmp (device, "None") == 0)
    4189                 mHWData->mBootOrder [position] = DeviceType_NoDevice;
     4189                mHWData->mBootOrder [position] = DeviceType_Null;
    41904190            else if (strcmp (device, "Floppy") == 0)
    4191                 mHWData->mBootOrder [position] = DeviceType_FloppyDevice;
     4191                mHWData->mBootOrder [position] = DeviceType_Floppy;
    41924192            else if (strcmp (device, "DVD") == 0)
    4193                 mHWData->mBootOrder [position] = DeviceType_DVDDevice;
     4193                mHWData->mBootOrder [position] = DeviceType_DVD;
    41944194            else if (strcmp (device, "HardDisk") == 0)
    4195                 mHWData->mBootOrder [position] = DeviceType_HardDiskDevice;
     4195                mHWData->mBootOrder [position] = DeviceType_HardDisk;
    41964196            else if (strcmp (device, "Network") == 0)
    4197                 mHWData->mBootOrder [position] = DeviceType_NetworkDevice;
     4197                mHWData->mBootOrder [position] = DeviceType_Network;
    41984198            else
    41994199                ComAssertMsgFailed (("Invalid device: %s\n", device));
     
    43314331    {
    43324332        /* default value in case if the node is not there */
    4333         mHWData->mClipboardMode = ClipboardMode_ClipDisabled;
     4333        mHWData->mClipboardMode = ClipboardMode_Disabled;
    43344334
    43354335        Key clipNode = aNode.findKey ("Clipboard");
     
    43384338            const char *mode = clipNode.stringValue ("mode");
    43394339            if      (strcmp (mode, "Disabled") == 0)
    4340                 mHWData->mClipboardMode = ClipboardMode_ClipDisabled;
     4340                mHWData->mClipboardMode = ClipboardMode_Disabled;
    43414341            else if (strcmp (mode, "HostToGuest") == 0)
    4342                 mHWData->mClipboardMode = ClipboardMode_ClipHostToGuest;
     4342                mHWData->mClipboardMode = ClipboardMode_HostToGuest;
    43434343            else if (strcmp (mode, "GuestToHost") == 0)
    4344                 mHWData->mClipboardMode = ClipboardMode_ClipGuestToHost;
     4344                mHWData->mClipboardMode = ClipboardMode_GuestToHost;
    43454345            else if (strcmp (mode, "Bidirectional") == 0)
    4346                 mHWData->mClipboardMode = ClipboardMode_ClipBidirectional;
     4346                mHWData->mClipboardMode = ClipboardMode_Bidirectional;
    43474347            else
    43484348                AssertMsgFailed (("Invalid clipboard mode '%s'\n", mode));
     
    44304430        }
    44314431
    4432         if (hd->type() == HardDiskType_ImmutableHardDisk)
     4432        if (hd->type() == HardDiskType_Immutable)
    44334433        {
    44344434            return setError (E_FAIL,
     
    44404440
    44414441        /* attach the device */
    4442         DiskControllerType_T ctl = DiskControllerType_InvalidController;
     4442        DiskControllerType_T ctl = DiskControllerType_Null;
    44434443        LONG dev = -1;
    44444444
    44454445        if (strcmp (bus, "ide0") == 0)
    44464446        {
    4447             ctl = DiskControllerType_IDE0Controller;
     4447            ctl = DiskControllerType_IDE0;
    44484448            if (strcmp (device, "master") == 0)
    44494449                dev = 0;
     
    44564456        else if (strcmp (bus, "ide1") == 0)
    44574457        {
    4458             ctl = DiskControllerType_IDE1Controller;
     4458            ctl = DiskControllerType_IDE1;
    44594459            if (strcmp (device, "master") == 0)
    44604460                rc = setError (E_FAIL, tr("Could not attach a disk as a master "
     
    55285528        switch (mHWData->mHWVirtExEnabled)
    55295529        {
    5530             case TriStateBool_TSFalse:
     5530            case TSBool_False:
    55315531                value = "false";
    55325532                break;
    5533             case TriStateBool_TSTrue:
     5533            case TSBool_True:
    55345534                value = "true";
    55355535                break;
    5536             case TriStateBool_TSDefault:
     5536            case TSBool_Default:
    55375537                value = "default";
    55385538        }
     
    55555555            switch (mHWData->mBootOrder [pos])
    55565556            {
    5557                 case DeviceType_NoDevice:
     5557                case DeviceType_Null:
    55585558                    /* skip, this is allowed for <Order> nodes
    55595559                     * when loading, the default value NoDevice will remain */
    55605560                    continue;
    5561                 case DeviceType_FloppyDevice:   device = "Floppy"; break;
    5562                 case DeviceType_DVDDevice:      device = "DVD"; break;
    5563                 case DeviceType_HardDiskDevice: device = "HardDisk"; break;
    5564                 case DeviceType_NetworkDevice:  device = "Network"; break;
     5561                case DeviceType_Floppy:         device = "Floppy"; break;
     5562                case DeviceType_DVD:            device = "DVD"; break;
     5563                case DeviceType_HardDisk:      device = "HardDisk"; break;
     5564                case DeviceType_Network:        device = "Network"; break;
    55655565                default:
    55665566                {
     
    56795679        switch (mHWData->mClipboardMode)
    56805680        {
    5681             case ClipboardMode_ClipDisabled:
     5681            case ClipboardMode_Disabled:
    56825682                /* already assigned */
    56835683                break;
    5684             case ClipboardMode_ClipHostToGuest:
     5684            case ClipboardMode_HostToGuest:
    56855685                modeStr = "HostToGuest";
    56865686                break;
    5687             case ClipboardMode_ClipGuestToHost:
     5687            case ClipboardMode_GuestToHost:
    56885688                modeStr = "GuestToHost";
    56895689                break;
    5690             case ClipboardMode_ClipBidirectional:
     5690            case ClipboardMode_Bidirectional:
    56915691                modeStr = "Bidirectional";
    56925692                break;
     
    57425742            switch (att->controller())
    57435743            {
    5744                 case DiskControllerType_IDE0Controller: bus = "ide0"; break;
    5745                 case DiskControllerType_IDE1Controller: bus = "ide1"; break;
     5744                case DiskControllerType_IDE0: bus = "ide0"; break;
     5745                case DiskControllerType_IDE1: bus = "ide1"; break;
    57465746                default:
    57475747                    ComAssertFailedRet (E_FAIL);
     
    59565956                switch (hd->type())
    59575957                {
    5958                     case HardDiskType_ImmutableHardDisk:
     5958                    case HardDiskType_Immutable:
    59595959                    {
    59605960                        /* decrease readers increased in AttachHardDisk() */
     
    59655965                        break;
    59665966                    }
    5967                     case HardDiskType_WritethroughHardDisk:
     5967                    case HardDiskType_Writethrough:
    59685968                    {
    59695969                        /* reset the dirty flag */
     
    59725972                        break;
    59735973                    }
    5974                     case HardDiskType_NormalHardDisk:
     5974                    case HardDiskType_Normal:
    59755975                    {
    59765976                        if (hd->snapshotId().isEmpty())
     
    62366236            switch (hd->type())
    62376237            {
    6238                 case HardDiskType_ImmutableHardDisk:
     6238                case HardDiskType_Immutable:
    62396239                {
    62406240                    /* decrease readers increased in AttachHardDisk() */
     
    62436243                    break;
    62446244                }
    6245                 case HardDiskType_WritethroughHardDisk:
     6245                case HardDiskType_Writethrough:
    62466246                {
    62476247                    /* deassociate from this machine */
     
    62506250                    break;
    62516251                }
    6252                 case HardDiskType_NormalHardDisk:
     6252                case HardDiskType_Normal:
    62536253                {
    62546254                    if (hd->snapshotId().isEmpty())
     
    63246324            AutoLock hdLock (hd);
    63256325
    6326             ComAssertMsgBreak (hd->type() == HardDiskType_NormalHardDisk,
     6326            ComAssertMsgBreak (hd->type() == HardDiskType_Normal,
    63276327                               ("Invalid hard disk type %d\n", hd->type()),
    63286328                               rc = E_FAIL);
     
    63946394        {
    63956395            // checked in the first pass
    6396             Assert (hd->type() == HardDiskType_NormalHardDisk);
     6396            Assert (hd->type() == HardDiskType_Normal);
    63976397
    63986398            aProgress->advanceOperation (Bstr (Utf8StrFmt (
     
    64346434            {
    64356435                // associate the snapshot id with the old hard disk
    6436                 if (hd->type() != HardDiskType_WritethroughHardDisk && aSnapshotId)
     6436                if (hd->type() != HardDiskType_Writethrough && aSnapshotId)
    64376437                    hd->setSnapshotId (*aSnapshotId);
    64386438
     
    73177317        /* this must be null here (see #OnSessionEnd()) */
    73187318        Assert (mData->mSession.mDirectControl.isNull());
    7319         Assert (mData->mSession.mState == SessionState_SessionClosing);
     7319        Assert (mData->mSession.mState == SessionState_Closing);
    73207320        Assert (!mData->mSession.mProgress.isNull());
    73217321
     
    73307330    /* reset the rest of session data */
    73317331    mData->mSession.mMachine.setNull();
    7332     mData->mSession.mState = SessionState_SessionClosed;
     7332    mData->mSession.mState = SessionState_Closed;
    73337333    mData->mSession.mType.setNull();
    73347334
     
    73517351
    73527352    /* fire an event */
    7353     mParent->onSessionStateChange (mData->mUuid, SessionState_SessionClosed);
     7353    mParent->onSessionStateChange (mData->mUuid, SessionState_Closed);
    73547354
    73557355    uninitDataAndChildObjects();
     
    75477547        /* go to the closing state (essential for all open*Session() calls and
    75487548         * for #checkForDeath()) */
    7549         Assert (mData->mSession.mState == SessionState_SessionOpen);
    7550         mData->mSession.mState = SessionState_SessionClosing;
     7549        Assert (mData->mSession.mState == SessionState_Open);
     7550        mData->mSession.mState = SessionState_Closing;
    75517551
    75527552        /* set direct control to NULL to release the remote instance */
     
    76047604
    76057605    AssertReturn (mData->mMachineState == MachineState_Paused &&
    7606                   mSnapshotData.mLastState == MachineState_InvalidMachineState &&
     7606                  mSnapshotData.mLastState == MachineState_Null &&
    76077607                  mSnapshotData.mProgressId.isEmpty() &&
    76087608                  mSnapshotData.mStateFilePath.isNull(),
     
    76527652
    76537653    AssertReturn (mData->mMachineState == MachineState_Saving &&
    7654                   mSnapshotData.mLastState != MachineState_InvalidMachineState &&
     7654                  mSnapshotData.mLastState != MachineState_Null &&
    76557655                  !mSnapshotData.mProgressId.isEmpty() &&
    76567656                  !mSnapshotData.mStateFilePath.isNull(),
     
    77277727    AssertReturn ((mData->mMachineState < MachineState_Running ||
    77287728                   mData->mMachineState == MachineState_Paused) &&
    7729                   mSnapshotData.mLastState == MachineState_InvalidMachineState &&
     7729                  mSnapshotData.mLastState == MachineState_Null &&
    77307730                  mSnapshotData.mSnapshot.isNull() &&
    77317731                  mSnapshotData.mServerProgress.isNull() &&
     
    77537753        ComObjPtr <HardDisk> hd = (*it)->hardDisk();
    77547754        AutoLock hdLock (hd);
    7755         if (hd->type() == HardDiskType_WritethroughHardDisk)
     7755        if (hd->type() == HardDiskType_Writethrough)
    77567756            return setError (E_FAIL,
    77577757                tr ("Cannot take a snapshot when there is a Writethrough hard "
     
    78877887    AssertReturn (!aSuccess ||
    78887888                  (mData->mMachineState == MachineState_Saving &&
    7889                    mSnapshotData.mLastState != MachineState_InvalidMachineState &&
     7889                   mSnapshotData.mLastState != MachineState_Null &&
    78907890                   !mSnapshotData.mSnapshot.isNull() &&
    78917891                   !mSnapshotData.mServerProgress.isNull() &&
     
    81878187         *  (see Session::uninit() for details).
    81888188         */
    8189         reason = mData->mSession.mState == SessionState_SessionClosing ?
     8189        reason = mData->mSession.mState == SessionState_Closing ?
    81908190                 Uninit::Normal :
    81918191                 Uninit::Abnormal;
     
    85398539
    85408540    /* clear out the temporary saved state data */
    8541     mSnapshotData.mLastState = MachineState_InvalidMachineState;
     8541    mSnapshotData.mLastState = MachineState_Null;
    85428542    mSnapshotData.mProgressId.clear();
    85438543    mSnapshotData.mStateFilePath.setNull();
     
    86228622
    86238623    /* clear out the snapshot data */
    8624     mSnapshotData.mLastState = MachineState_InvalidMachineState;
     8624    mSnapshotData.mLastState = MachineState_Null;
    86258625    mSnapshotData.mSnapshot.setNull();
    86268626    mSnapshotData.mServerProgress.setNull();
     
    88008800            }
    88018801
    8802             if (hd->type() == HardDiskType_NormalHardDisk)
     8802            if (hd->type() == HardDiskType_Normal)
    88038803            {
    88048804                AutoLock hdChildrenLock (hd->childrenLock());
     
    89168916                }
    89178917            }
    8918             else if (hd->type() == HardDiskType_NormalHardDisk)
     8918            else if (hd->type() == HardDiskType_Normal)
    89198919            {
    89208920                /*
     
    95999599         * and simply do nothing here. */
    96009600
    9601         if (mData->mSession.mState == SessionState_SessionClosing)
     9601        if (mData->mSession.mState == SessionState_Closing)
    96029602            return S_OK;
    96039603
  • trunk/src/VBox/Main/NetworkAdapterImpl.cpp

    r6344 r7207  
    6868
    6969    /* default to Am79C973 */
    70     mData->mAdapterType = NetworkAdapterType_NetworkAdapterAm79C973;
     70    mData->mAdapterType = NetworkAdapterType_Am79C973;
    7171
    7272    /* generate the MAC address early to guarantee it is the same both after
     
    199199    switch (aAdapterType)
    200200    {
    201         case NetworkAdapterType_NetworkAdapterAm79C970A:
    202         case NetworkAdapterType_NetworkAdapterAm79C973:
     201        case NetworkAdapterType_Am79C970A:
     202        case NetworkAdapterType_Am79C973:
    203203#ifdef VBOX_WITH_E1000
    204         case NetworkAdapterType_NetworkAdapter82540EM:
     204        case NetworkAdapterType_I82540EM:
    205205#endif
    206206            break;
     
    631631        /* if an empty string is to be set, internal networking must be turned off */
    632632        if (   (aInternalNetwork == Bstr(""))
    633             && (mData->mAttachmentType = NetworkAttachmentType_InternalNetworkAttachment))
     633            && (mData->mAttachmentType = NetworkAttachmentType_Internal))
    634634        {
    635635            return setError (E_FAIL, tr ("Empty internal network name is not valid"));
     
    821821    AutoLock alock (this);
    822822
    823     if (mData->mAttachmentType != NetworkAttachmentType_NATNetworkAttachment)
     823    if (mData->mAttachmentType != NetworkAttachmentType_NAT)
    824824    {
    825825        mData.backup();
     
    827827        detach();
    828828
    829         mData->mAttachmentType = NetworkAttachmentType_NATNetworkAttachment;
     829        mData->mAttachmentType = NetworkAttachmentType_NAT;
    830830
    831831        /* leave the lock before informing callbacks */
     
    850850
    851851    /* don't do anything if we're already host interface attached */
    852     if (mData->mAttachmentType != NetworkAttachmentType_HostInterfaceNetworkAttachment)
     852    if (mData->mAttachmentType != NetworkAttachmentType_HostInterface)
    853853    {
    854854        mData.backup();
     
    857857        detach();
    858858
    859         mData->mAttachmentType = NetworkAttachmentType_HostInterfaceNetworkAttachment;
     859        mData->mAttachmentType = NetworkAttachmentType_HostInterface;
    860860
    861861        /* leave the lock before informing callbacks */
     
    880880
    881881    /* don't do anything if we're already internal network attached */
    882     if (mData->mAttachmentType != NetworkAttachmentType_InternalNetworkAttachment)
     882    if (mData->mAttachmentType != NetworkAttachmentType_Internal)
    883883    {
    884884        mData.backup();
     
    896896        }
    897897
    898         mData->mAttachmentType = NetworkAttachmentType_InternalNetworkAttachment;
     898        mData->mAttachmentType = NetworkAttachmentType_Internal;
    899899
    900900        /* leave the lock before informing callbacks */
     
    918918    AutoLock alock (this);
    919919
    920     if (mData->mAttachmentType != NetworkAttachmentType_NoNetworkAttachment)
     920    if (mData->mAttachmentType != NetworkAttachmentType_Null)
    921921    {
    922922        mData.backup();
     
    939939 *  Loads settings from the given adapter node.
    940940 *  May be called once right after this object creation.
    941  * 
     941 *
    942942 *  @param aAdapterNode <Adapter> node.
    943  * 
    944  *  @note Locks this object for writing. 
     943 *
     944 *  @note Locks this object for writing.
    945945 */
    946946HRESULT NetworkAdapter::loadSettings (const settings::Key &aAdapterNode)
     
    964964     * place when a setting of a newly created object must default to A while
    965965     * the same setting of an object loaded from the old settings file must
    966      * default to B. */ 
     966     * default to B. */
    967967
    968968    HRESULT rc = S_OK;
     
    972972
    973973    if (strcmp (adapterType, "Am79C970A") == 0)
    974         mData->mAdapterType = NetworkAdapterType_NetworkAdapterAm79C970A;
     974        mData->mAdapterType = NetworkAdapterType_Am79C970A;
    975975    else if (strcmp (adapterType, "Am79C973") == 0)
    976         mData->mAdapterType = NetworkAdapterType_NetworkAdapterAm79C973;
     976        mData->mAdapterType = NetworkAdapterType_Am79C973;
    977977    else if (strcmp (adapterType, "82540EM") == 0)
    978         mData->mAdapterType = NetworkAdapterType_NetworkAdapter82540EM;
     978        mData->mAdapterType = NetworkAdapterType_I82540EM;
    979979    else
    980980        ComAssertMsgFailedRet (("Invalid adapter type '%s'", adapterType),
     
    10471047}
    10481048
    1049 /** 
     1049/**
    10501050 *  Saves settings to the given adapter node.
    1051  * 
     1051 *
    10521052 *  Note that the given Adapter node is comletely empty on input.
    10531053 *
    10541054 *  @param aAdapterNode <Adapter> node.
    1055  * 
    1056  *  @note Locks this object for reading. 
     1055 *
     1056 *  @note Locks this object for reading.
    10571057 */
    10581058HRESULT NetworkAdapter::saveSettings (settings::Key &aAdapterNode)
     
    10811081    switch (mData->mAdapterType)
    10821082    {
    1083         case NetworkAdapterType_NetworkAdapterAm79C970A:
     1083        case NetworkAdapterType_Am79C970A:
    10841084            typeStr = "Am79C970A";
    10851085            break;
    1086         case NetworkAdapterType_NetworkAdapterAm79C973:
     1086        case NetworkAdapterType_Am79C973:
    10871087            typeStr = "Am79C973";
    10881088            break;
    1089         case NetworkAdapterType_NetworkAdapter82540EM:
     1089        case NetworkAdapterType_I82540EM:
    10901090            typeStr = "82540EM";
    10911091            break;
     
    10991099    switch (mData->mAttachmentType)
    11001100    {
    1101         case NetworkAttachmentType_NoNetworkAttachment:
     1101        case NetworkAttachmentType_Null:
    11021102        {
    11031103            /* do nothing -- empty content */
    11041104            break;
    11051105        }
    1106         case NetworkAttachmentType_NATNetworkAttachment:
     1106        case NetworkAttachmentType_NAT:
    11071107        {
    11081108            Key attachmentNode = aAdapterNode.createKey ("NAT");
    11091109            break;
    11101110        }
    1111         case NetworkAttachmentType_HostInterfaceNetworkAttachment:
     1111        case NetworkAttachmentType_HostInterface:
    11121112        {
    11131113            Key attachmentNode = aAdapterNode.createKey ("HostInterface");
     
    11291129            break;
    11301130        }
    1131         case NetworkAttachmentType_InternalNetworkAttachment:
     1131        case NetworkAttachmentType_Internal:
    11321132        {
    11331133            Key attachmentNode = aAdapterNode.createKey ("InternalNetwork");
     
    12341234    switch (mData->mAttachmentType)
    12351235    {
    1236         case NetworkAttachmentType_NoNetworkAttachment:
     1236        case NetworkAttachmentType_Null:
    12371237        {
    12381238            /* nothing to do here */
    12391239            break;
    12401240        }
    1241         case NetworkAttachmentType_NATNetworkAttachment:
     1241        case NetworkAttachmentType_NAT:
    12421242        {
    12431243            break;
    12441244        }
    1245         case NetworkAttachmentType_HostInterfaceNetworkAttachment:
     1245        case NetworkAttachmentType_HostInterface:
    12461246        {
    12471247            /* reset handle and device name */
     
    12551255            break;
    12561256        }
    1257         case NetworkAttachmentType_InternalNetworkAttachment:
     1257        case NetworkAttachmentType_Internal:
    12581258        {
    12591259            mData->mInternalNetwork.setNull();
     
    12621262    }
    12631263
    1264     mData->mAttachmentType = NetworkAttachmentType_NoNetworkAttachment;
     1264    mData->mAttachmentType = NetworkAttachmentType_Null;
    12651265}
    12661266
  • trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp

    r5999 r7207  
    7373    mPortVersion  = mVersion; /** @todo fix this */
    7474
    75     mState        = USBDeviceState_USBDeviceAvailable;
     75    mState        = USBDeviceState_Available;
    7676
    7777    mDirty        = false;
  • trunk/src/VBox/Main/SerialPortImpl.cpp

    r6168 r7207  
    160160////////////////////////////////////////////////////////////////////////////////
    161161
    162 /** 
     162/**
    163163 *  Loads settings from the given port node.
    164164 *  May be called once right after this object creation.
    165  * 
     165 *
    166166 *  @param aPortNode <Port> node.
    167  * 
    168  *  @note Locks this object for writing. 
     167 *
     168 *  @note Locks this object for writing.
    169169 */
    170170HRESULT SerialPort::loadSettings (const settings::Key &aPortNode)
     
    188188     * place when a setting of a newly created object must default to A while
    189189     * the same setting of an object loaded from the old settings file must
    190      * default to B. */ 
     190     * default to B. */
    191191
    192192    /* enabled (required) */
     
    199199    const char *mode = aPortNode.stringValue ("hostMode");
    200200    if (strcmp (mode, "HostPipe") == 0)
    201         mData->mHostMode = PortMode_HostPipePort;
     201        mData->mHostMode = PortMode_HostPipe;
    202202    else if (strcmp (mode, "HostDevice") == 0)
    203         mData->mHostMode = PortMode_HostDevicePort;
     203        mData->mHostMode = PortMode_HostDevice;
    204204    else if (strcmp (mode, "Disconnected") == 0)
    205         mData->mHostMode = PortMode_DisconnectedPort;
     205        mData->mHostMode = PortMode_Disconnected;
    206206    else
    207207        ComAssertMsgFailedRet (("Invalid port mode '%s'\n", mode), E_FAIL);
     
    225225 *
    226226 *  @param aPortNode <Port> node.
    227  * 
     227 *
    228228 *  @note Locks this object for reading.
    229229 */
     
    246246    switch (mData->mHostMode)
    247247    {
    248         case PortMode_DisconnectedPort:
     248        case PortMode_Disconnected:
    249249            mode = "Disconnected";
    250250            break;
    251         case PortMode_HostPipePort:
     251        case PortMode_HostPipe:
    252252            mode = "HostPipe";
    253253            break;
    254         case PortMode_HostDevicePort:
     254        case PortMode_HostDevice:
    255255            mode = "HostDevice";
    256256            break;
     
    261261    }
    262262    aPortNode.setStringValue ("hostMode", mode);
    263    
     263
    264264    /* Always save non-null mPath and mServer to preserve the user values for
    265265     * later use. Note that 'server' is false by default in XML so we don't
     
    273273}
    274274
    275 /** 
     275/**
    276276 *  @note Locks this object for writing.
    277277 */
     
    297297}
    298298
    299 /** 
     299/**
    300300 *  @note Locks this object for writing, together with the peer object (also
    301301 *  for writing) if there is one.
     
    325325}
    326326
    327 /** 
     327/**
    328328 *  @note Locks this object for writing, together with the peer object
    329329 *  represented by @a aThat (locked for reading).
     
    426426        switch (aHostMode)
    427427        {
    428             case PortMode_HostPipePort:
     428            case PortMode_HostPipe:
    429429                if (mData->mPath.isEmpty())
    430430                    return setError (E_INVALIDARG,
     
    433433                        mData->mSlot);
    434434                break;
    435             case PortMode_HostDevicePort:
     435            case PortMode_HostDevice:
    436436                if (mData->mPath.isEmpty())
    437437                    return setError (E_INVALIDARG,
     
    440440                        mData->mSlot);
    441441                break;
    442             case PortMode_DisconnectedPort:
     442            case PortMode_Disconnected:
    443443                break;
    444444        }
     
    601601}
    602602
    603 /** 
     603/**
    604604 *  Validates COMSETTER(Path) arguments.
    605605 */
     
    608608    AssertReturn (isLockedOnCurrentThread(), E_FAIL);
    609609
    610     if ((mData->mHostMode == PortMode_HostDevicePort ||
    611          mData->mHostMode == PortMode_HostPipePort) &&
     610    if ((mData->mHostMode == PortMode_HostDevice ||
     611         mData->mHostMode == PortMode_HostPipe) &&
    612612        (aPath == NULL || *aPath == '\0'))
    613613        return setError (E_INVALIDARG,
  • trunk/src/VBox/Main/SessionImpl.cpp

    r5999 r7207  
    4848#define CHECK_OPEN() \
    4949    do { \
    50         if (mState != SessionState_SessionOpen) \
     50        if (mState != SessionState_Open) \
    5151            return setError (E_UNEXPECTED, \
    5252                tr ("The session is not open")); \
     
    8484    LogFlowThisFuncEnter();
    8585
    86     mState = SessionState_SessionClosed;
    87     mType = SessionType_InvalidSessionType;
     86    mState = SessionState_Closed;
     87    mType = SessionType_Null;
    8888
    8989#if defined(RT_OS_WINDOWS)
     
    128128    AutoLock alock (this);
    129129
    130     if (mState != SessionState_SessionClosed)
    131     {
    132         Assert (mState == SessionState_SessionOpen ||
    133                 mState == SessionState_SessionSpawning);
     130    if (mState != SessionState_Closed)
     131    {
     132        Assert (mState == SessionState_Open ||
     133                mState == SessionState_Spawning);
    134134
    135135        HRESULT rc = close (aFinalRelease, false /* aFromServer */);
     
    265265    AutoReaderLock alock (this);
    266266
    267     AssertReturn (mState == SessionState_SessionOpen, E_FAIL);
    268 
    269     AssertMsgReturn (mType == SessionType_DirectSession && !!mConsole,
     267    AssertReturn (mState == SessionState_Open, E_FAIL);
     268
     269    AssertMsgReturn (mType == SessionType_Direct && !!mConsole,
    270270                     ("This is not a direct session!\n"), E_FAIL);
    271271
     
    285285    AutoLock alock (this);
    286286
    287     AssertReturn (mState == SessionState_SessionClosed, E_FAIL);
     287    AssertReturn (mState == SessionState_Closed, E_FAIL);
    288288
    289289    if (!aMachine)
     
    296296         */
    297297
    298         AssertReturn (mType == SessionType_InvalidSessionType, E_FAIL);
    299         mType = SessionType_RemoteSession;
    300         mState = SessionState_SessionSpawning;
     298        AssertReturn (mType == SessionType_Null, E_FAIL);
     299        mType = SessionType_Remote;
     300        mState = SessionState_Spawning;
    301301
    302302        LogFlowThisFuncLeave();
     
    327327    if (SUCCEEDED (rc))
    328328    {
    329         mType = SessionType_DirectSession;
    330         mState = SessionState_SessionOpen;
     329        mType = SessionType_Direct;
     330        mState = SessionState_Open;
    331331    }
    332332    else
     
    356356    AutoLock alock (this);
    357357
    358     AssertReturn (mState == SessionState_SessionClosed ||
    359                   mState == SessionState_SessionSpawning, E_FAIL);
     358    AssertReturn (mState == SessionState_Closed ||
     359                  mState == SessionState_Spawning, E_FAIL);
    360360
    361361    HRESULT rc = E_FAIL;
     
    396396         *  argument is NULL (a special case)
    397397         */
    398         if (mType != SessionType_RemoteSession)
    399             mType = SessionType_ExistingSession;
     398        if (mType != SessionType_Remote)
     399            mType = SessionType_Existing;
    400400        else
    401             Assert (mState == SessionState_SessionSpawning);
    402 
    403         mState = SessionState_SessionOpen;
     401            Assert (mState == SessionState_Spawning);
     402
     403        mState = SessionState_Open;
    404404    }
    405405    else
     
    433433    AutoReaderLock alock (this);
    434434
    435     if (mState == SessionState_SessionClosing)
     435    if (mState == SessionState_Closing)
    436436    {
    437437        LogFlowThisFunc (("Already being closed.\n"));
     
    439439    }
    440440
    441     AssertReturn (mState == SessionState_SessionOpen &&
    442                   mType == SessionType_DirectSession, E_FAIL);
     441    AssertReturn (mState == SessionState_Open &&
     442                  mType == SessionType_Direct, E_FAIL);
    443443
    444444    AssertReturn (!mControl.isNull(), E_FAIL);
     
    462462        LogFlowThisFunc (("mState=%d, mType=%d\n", mState, mType));
    463463
    464         if (mState == SessionState_SessionClosing)
     464        if (mState == SessionState_Closing)
    465465        {
    466466            LogFlowThisFunc (("Already being closed.\n"));
     
    468468        }
    469469
    470         AssertReturn (mState == SessionState_SessionOpen, E_FAIL);
     470        AssertReturn (mState == SessionState_Open, E_FAIL);
    471471
    472472        /* close ourselves */
     
    501501
    502502    AutoReaderLock alock (this);
    503     AssertReturn (mState == SessionState_SessionOpen &&
    504                   mType == SessionType_DirectSession, E_FAIL);
     503    AssertReturn (mState == SessionState_Open &&
     504                  mType == SessionType_Direct, E_FAIL);
    505505
    506506    return mConsole->onDVDDriveChange();
     
    515515
    516516    AutoReaderLock alock (this);
    517     AssertReturn (mState == SessionState_SessionOpen &&
    518                   mType == SessionType_DirectSession, E_FAIL);
     517    AssertReturn (mState == SessionState_Open &&
     518                  mType == SessionType_Direct, E_FAIL);
    519519
    520520    return mConsole->onFloppyDriveChange();
     
    529529
    530530    AutoReaderLock alock (this);
    531     AssertReturn (mState == SessionState_SessionOpen &&
    532                   mType == SessionType_DirectSession, E_FAIL);
     531    AssertReturn (mState == SessionState_Open &&
     532                  mType == SessionType_Direct, E_FAIL);
    533533
    534534    return mConsole->onNetworkAdapterChange(networkAdapter);
     
    543543
    544544    AutoReaderLock alock (this);
    545     AssertReturn (mState == SessionState_SessionOpen &&
    546                   mType == SessionType_DirectSession, E_FAIL);
     545    AssertReturn (mState == SessionState_Open &&
     546                  mType == SessionType_Direct, E_FAIL);
    547547
    548548    return mConsole->onSerialPortChange(serialPort);
     
    557557
    558558    AutoReaderLock alock (this);
    559     AssertReturn (mState == SessionState_SessionOpen &&
    560                   mType == SessionType_DirectSession, E_FAIL);
     559    AssertReturn (mState == SessionState_Open &&
     560                  mType == SessionType_Direct, E_FAIL);
    561561
    562562    return mConsole->onParallelPortChange(parallelPort);
     
    571571
    572572    AutoReaderLock alock (this);
    573     AssertReturn (mState == SessionState_SessionOpen &&
    574                   mType == SessionType_DirectSession, E_FAIL);
     573    AssertReturn (mState == SessionState_Open &&
     574                  mType == SessionType_Direct, E_FAIL);
    575575
    576576    return mConsole->onVRDPServerChange();
     
    585585
    586586    AutoReaderLock alock (this);
    587     AssertReturn (mState == SessionState_SessionOpen &&
    588                   mType == SessionType_DirectSession, E_FAIL);
     587    AssertReturn (mState == SessionState_Open &&
     588                  mType == SessionType_Direct, E_FAIL);
    589589
    590590    return mConsole->onUSBControllerChange();
     
    599599
    600600    AutoReaderLock alock (this);
    601     AssertReturn (mState == SessionState_SessionOpen &&
    602                   mType == SessionType_DirectSession, E_FAIL);
     601    AssertReturn (mState == SessionState_Open &&
     602                  mType == SessionType_Direct, E_FAIL);
    603603
    604604    return mConsole->onSharedFolderChange (aGlobal);
     
    615615
    616616    AutoReaderLock alock (this);
    617     AssertReturn (mState == SessionState_SessionOpen &&
    618                   mType == SessionType_DirectSession, E_FAIL);
     617    AssertReturn (mState == SessionState_Open &&
     618                  mType == SessionType_Direct, E_FAIL);
    619619
    620620    return mConsole->onUSBDeviceAttach (aDevice, aError, aMaskedIfs);
     
    630630
    631631    AutoReaderLock alock (this);
    632     AssertReturn (mState == SessionState_SessionOpen &&
    633                   mType == SessionType_DirectSession, E_FAIL);
     632    AssertReturn (mState == SessionState_Open &&
     633                  mType == SessionType_Direct, E_FAIL);
    634634
    635635    return mConsole->onUSBDeviceDetach (aId, aError);
     
    642642
    643643    AutoReaderLock alock (this);
    644     AssertReturn (mState == SessionState_SessionOpen &&
    645                   mType == SessionType_DirectSession, E_FAIL);
     644    AssertReturn (mState == SessionState_Open &&
     645                  mType == SessionType_Direct, E_FAIL);
    646646
    647647    return mConsole->onShowWindow (aCheck, aCanShow, aWinId);
     
    673673    LogFlowThisFunc (("mState=%d, mType=%d\n", mState, mType));
    674674
    675     if (mState != SessionState_SessionOpen)
    676     {
    677         Assert (mState == SessionState_SessionSpawning);
     675    if (mState != SessionState_Open)
     676    {
     677        Assert (mState == SessionState_Spawning);
    678678
    679679        /* The session object is going to be uninitialized by the client before
     
    685685        AssertFailed();
    686686
    687         mState = SessionState_SessionClosed;
    688         mType = SessionType_InvalidSessionType;
     687        mState = SessionState_Closed;
     688        mType = SessionType_Null;
    689689#if defined(RT_OS_WINDOWS)
    690690        Assert (!mIPCSem && !mIPCThreadSem);
     
    702702
    703703    /* go to the closing state */
    704     mState =  SessionState_SessionClosing;
    705 
    706     if (mType == SessionType_DirectSession)
     704    mState =  SessionState_Closing;
     705
     706    if (mType == SessionType_Direct)
    707707    {
    708708        mConsole->uninit();
     
    734734         *  direct session has initiated a closure just a bit before us) so
    735735         *  we need to release the lock to avoid deadlocks. The state is already
    736          *  SessionState_SessionClosing here, so it's safe.
     736         *  SessionState_Closing here, so it's safe.
    737737         */
    738738        alock.leave();
     
    748748         *  been closed, we're just too late with our notification and nothing more
    749749         */
    750         if (mType != SessionType_DirectSession && rc == E_UNEXPECTED)
     750        if (mType != SessionType_Direct && rc == E_UNEXPECTED)
    751751            rc = S_OK;
    752752
     
    756756    mControl.setNull();
    757757
    758     if (mType == SessionType_DirectSession)
     758    if (mType == SessionType_Direct)
    759759    {
    760760        releaseIPCSemaphore();
     
    772772    }
    773773
    774     mState = SessionState_SessionClosed;
    775     mType = SessionType_InvalidSessionType;
     774    mState = SessionState_Closed;
     775    mType = SessionType_Null;
    776776
    777777    /* release the VirtualBox instance as the very last step */
  • trunk/src/VBox/Main/USBDeviceFilterImpl.cpp

    r5999 r7207  
    13011301    mData->mActive = FALSE;
    13021302#ifndef VBOX_WITH_USBFILTER
    1303     mData->mAction = USBDeviceFilterAction_USBDeviceFilterIgnore;
     1303    mData->mAction = USBDeviceFilterAction_Ignore;
    13041304#endif /* !VBOX_WITH_USBFILTER */
    13051305
     
    18641864    switch (USBFilterGetFilterType (&mData->mUSBFilter))
    18651865    {
    1866         case USBFILTERTYPE_IGNORE:   *aAction = USBDeviceFilterAction_USBDeviceFilterIgnore; break;
    1867         case USBFILTERTYPE_CAPTURE:  *aAction = USBDeviceFilterAction_USBDeviceFilterHold; break;
    1868         default:                     *aAction = USBDeviceFilterAction_InvalidUSBDeviceFilterAction; break;
     1866        case USBFILTERTYPE_IGNORE:   *aAction = USBDeviceFilterAction_Ignore; break;
     1867        case USBFILTERTYPE_CAPTURE:  *aAction = USBDeviceFilterAction_Hold; break;
     1868        default:                     *aAction = USBDeviceFilterAction_Null; break;
    18691869    }
    18701870#endif  /* VBOX_WITH_USBFILTER */
     
    18951895    switch (aAction)
    18961896    {
    1897         case USBDeviceFilterAction_USBDeviceFilterIgnore:   filterType = USBFILTERTYPE_IGNORE; break;
    1898         case USBDeviceFilterAction_USBDeviceFilterHold:     filterType = USBFILTERTYPE_CAPTURE; break;
    1899         case USBDeviceFilterAction_InvalidUSBDeviceFilterAction:
     1897        case USBDeviceFilterAction_Ignore:   filterType = USBFILTERTYPE_IGNORE; break;
     1898        case USBDeviceFilterAction_Hold:     filterType = USBFILTERTYPE_CAPTURE; break;
     1899        case USBDeviceFilterAction_Null:
    19001900            return setError (E_INVALIDARG,
    19011901                tr ("Action value InvalidUSBDeviceFilterAction is not permitted"));
  • trunk/src/VBox/Main/USBProxyService.cpp

    r5999 r7207  
    511511                     * quite logical because the proxy doesn't know anything about guest VMs. We use HELD_BY_PROXY
    512512                     * instead -- it is sufficient and is what Main expects. */
    513                     case USBDeviceState_USBDeviceCaptured:      aUSBDevice->enmState = USBDEVICESTATE_HELD_BY_PROXY; break;
    514                     case USBDeviceState_USBDeviceHeld:          aUSBDevice->enmState = USBDEVICESTATE_HELD_BY_PROXY; break;
    515                     case USBDeviceState_USBDeviceAvailable:     aUSBDevice->enmState = USBDEVICESTATE_UNUSED; break;
    516                     case USBDeviceState_USBDeviceUnavailable:   aUSBDevice->enmState = USBDEVICESTATE_USED_BY_HOST; break;
    517                     case USBDeviceState_USBDeviceBusy:          aUSBDevice->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE; break;
     513                    case USBDeviceState_Captured:      aUSBDevice->enmState = USBDEVICESTATE_HELD_BY_PROXY; break;
     514                    case USBDeviceState_Held:          aUSBDevice->enmState = USBDEVICESTATE_HELD_BY_PROXY; break;
     515                    case USBDeviceState_Available:     aUSBDevice->enmState = USBDEVICESTATE_UNUSED; break;
     516                    case USBDeviceState_Unavailable:   aUSBDevice->enmState = USBDEVICESTATE_USED_BY_HOST; break;
     517                    case USBDeviceState_Busy:          aUSBDevice->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE; break;
    518518                    default:
    519519                        AssertMsgFailed(("%d\n", aDevice->pendingState()));
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r6935 r7207  
    13471347    if (!aMachineIDs)
    13481348        return E_POINTER;
    1349     if (aUsage == ResourceUsage_InvalidUsage)
     1349    if (aUsage == ResourceUsage_Null)
    13501350        return E_INVALIDARG;
    13511351
     
    13861386    CheckComRCReturnRC (rc);
    13871387
    1388     if (!getDVDImageUsage (aId, ResourceUsage_AllUsage))
     1388    if (!getDVDImageUsage (aId, ResourceUsage_All))
    13891389    {
    13901390        /* remove from the collection */
     
    15161516    if (!aMachineIDs)
    15171517        return E_POINTER;
    1518     if (aUsage == ResourceUsage_InvalidUsage)
     1518    if (aUsage == ResourceUsage_Null)
    15191519        return E_INVALIDARG;
    15201520
     
    15551555    CheckComRCReturnRC (rc);
    15561556
    1557     if (!getFloppyImageUsage (aId, ResourceUsage_AllUsage))
     1557    if (!getFloppyImageUsage (aId, ResourceUsage_All))
    15581558    {
    15591559        /* remove from the collection */
     
    19181918    CheckComRCReturnRC (rc);
    19191919
    1920     if (state != SessionState_SessionClosed)
     1920    if (state != SessionState_Closed)
    19211921        return setError (E_INVALIDARG,
    19221922            tr ("The given session is already open or being opened"));
     
    19381938
    19391939        /* fire an event */
    1940         onSessionStateChange (aMachineId, SessionState_SessionOpen);
     1940        onSessionStateChange (aMachineId, SessionState_Open);
    19411941    }
    19421942
     
    19721972    CheckComRCReturnRC (rc);
    19731973
    1974     if (state != SessionState_SessionClosed)
     1974    if (state != SessionState_Closed)
    19751975        return setError (E_INVALIDARG,
    19761976            tr ("The given session is already open or being opened"));
     
    19951995
    19961996        /* fire an event */
    1997         onSessionStateChange (aMachineId, SessionState_SessionSpawning);
     1997        onSessionStateChange (aMachineId, SessionState_Spawning);
    19981998    }
    19991999
     
    20242024    CheckComRCReturnRC (rc);
    20252025
    2026     if (state != SessionState_SessionClosed)
     2026    if (state != SessionState_Closed)
    20272027        return setError (E_INVALIDARG,
    20282028            tr ("The given session is already open or being opened"));
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r6965 r7207  
    9898
    9999  <enum
    100      name="TriStateBool"
    101      uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
    102      >
     100    name="TSBool"
     101    uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
     102  >
    103103    <desc>
    104       This represents a boolean variable having a third state, default.
     104      Boolean variable having a third state, default.
    105105    </desc>
    106106
    107     <const name="TSFalse"   value="0"/>
    108     <const name="TSTrue"    value="1"/>
    109     <const name="TSDefault" value="2"/>
     107    <const name="False"   value="0"/>
     108    <const name="True"    value="1"/>
     109    <const name="Default" value="2"/>
    110110  </enum>
    111111
    112112  <enum
    113      name="MachineState"
    114      uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
    115      >
     113    name="MachineState"
     114    uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
     115  >
    116116    <desc>
    117117      Virtual machine execution state. This enumeration represents possible
     
    119119    </desc>
    120120
    121     <const name="InvalidMachineState"   value="0">
    122       <desc>
    123         Invalid machine state. This state is never used by the virtual machine
    124         and may be used as a <tt>null</tt> value for state
    125         variables.
    126       </desc>
     121    <const name="Null"                  value="0">
     122      <desc><tt>null</tt> value. Never used by the API.</desc>
    127123    </const>
    128124    <const name="PoweredOff"            value="1">
     
    228224
    229225  <enum
    230      name="SessionState"
    231      uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
    232      >
     226    name="SessionState"
     227    uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
     228  >
    233229    <desc>
    234230      Session state. This enumeration represents possible values of
     
    238234    </desc>
    239235
    240     <const name="InvalidSessionState"   value="0"/>
    241     <const name="SessionClosed"         value="1">
     236    <const name="Null"                  value="0">
     237      <desc><tt>null</tt> value. Never used by the API.</desc>
     238    </const>
     239    <const name="Closed"                value="1">
    242240      <desc>
    243241        The machine has no open sessions (<link to="IMachine::sessionState"/>);
     
    245243      </desc>
    246244    </const>
    247     <const name="SessionOpen"           value="2">
     245    <const name="Open"                  value="2">
    248246      <desc>
    249247        The machine has an open direct session (<link to="IMachine::sessionState"/>);
     
    251249      </desc>
    252250    </const>
    253     <const name="SessionSpawning"       value="3">
     251    <const name="Spawning"              value="3">
    254252      <desc>
    255253        A new (direct) session is being opened for the machine
     
    261259      </desc>
    262260    </const>
    263     <const name="SessionClosing"       value="4">
     261    <const name="Closing"               value="4">
    264262      <desc>
    265263        The direct session is being closed (<link to="IMachine::sessionState"/>);
     
    270268
    271269  <enum
    272      name="SessionType"
    273      uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
    274      >
     270    name="SessionType"
     271    uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
     272  >
    275273    <desc>
    276274      Session type. This enumeration represents possible values of the
     
    278276    </desc>
    279277
    280     <const name="InvalidSessionType"    value="0"/>
    281     <const name="DirectSession"         value="1">
     278    <const name="Null"                  value="0">
     279      <desc><tt>null</tt> value. Never used by the API.</desc>
     280    </const>
     281    <const name="Direct"                value="1">
    282282      <desc>
    283283        Direct session
     
    285285      </desc>
    286286    </const>
    287     <const name="RemoteSession"         value="2">
     287    <const name="Remote"                value="2">
    288288      <desc>
    289289        Remote session
     
    291291      </desc>
    292292    </const>
    293     <const name="ExistingSession"       value="3">
     293    <const name="Existing"              value="3">
    294294      <desc>
    295295        Existing session
     
    300300
    301301  <enum
    302      name="DeviceType"
    303      uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
    304      >
     302    name="DeviceType"
     303    uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
     304  >
    305305    <desc>
    306306      Device type.
    307307    </desc>
    308     <const name="NoDevice"          value="0">
    309       <desc>
    310         No Device. This value is not used by
    311         <link to="IConsole::getDeviceActivity"/>
     308    <const name="Null"              value="0">
     309      <desc>
     310        <tt>null</tt> value which may also mean "no device".
     311        <note>
     312          This value is not allowed for
     313          <link to="IConsole::getDeviceActivity"/>
     314        </note>
    312315      </desc>
    313316    </const>
    314     <const name="FloppyDevice"      value="1">
     317    <const name="Floppy"            value="1">
    315318      <desc>Floppy device.</desc>
    316319    </const>
    317     <const name="DVDDevice"         value="2">
     320    <const name="DVD"               value="2">
    318321      <desc>CD/DVD-ROM device.</desc>
    319322    </const>
    320     <const name="HardDiskDevice"    value="3">
     323    <const name="HardDisk"          value="3">
    321324      <desc>Hard disk device.</desc>
    322325    </const>
    323     <const name="NetworkDevice"     value="4">
     326    <const name="Network"           value="4">
    324327      <desc>Network device.</desc>
    325328    </const>
    326     <const name="USBDevice"         value="5">
     329    <const name="USB"               value="5">
    327330      <desc>USB device.</desc>
    328331    </const>
    329     <const name="SharedFolderDevice" value="6">
     332    <const name="SharedFolder"      value="6">
    330333      <desc>Shared folder device.</desc>
    331334    </const>
     
    333336
    334337  <enum
    335      name="DeviceActivity"
    336      uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
    337      >
    338     <const name="InvalidActivity"   value="0"/>
    339     <const name="DeviceIdle"        value="1"/>
    340     <const name="DeviceReading"     value="2"/>
    341     <const name="DeviceWriting"     value="3"/>
     338    name="DeviceActivity"
     339    uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
     340  >
     341    <desc>
     342      Device activity for <link to="IConsole::getDeviceActivity"/>.
     343    </desc>
     344
     345    <const name="Null"              value="0"/>
     346    <const name="Idle"              value="1"/>
     347    <const name="Reading"           value="2"/>
     348    <const name="Writing"           value="3"/>
    342349  </enum>
    343350
    344351  <enum
    345      name="ResourceUsage"
    346      uuid="FC56E4B6-B195-48e2-A5E1-A667B0D9F809"
    347      >
     352    name="ResourceUsage"
     353    uuid="FC56E4B6-B195-48e2-A5E1-A667B0D9F809"
     354  >
    348355    <desc>
    349356      Usage type constants for
     
    351358      <link to="IVirtualBox::getFloppyImageUsage"/>.
    352359    </desc>
    353     <const name="InvalidUsage"      value="0"/>
    354     <const name="PermanentUsage"    value="1">
     360
     361    <const name="Null"              value="0">
     362      <desc><tt>null</tt> value. Never used by the API.</desc>
     363    </const>
     364    <const name="Permanent"         value="1">
    355365      <desc>
    356366        Scopes the VMs that use the resource permanently
     
    359369      </desc>
    360370    </const>
    361     <const name="TemporaryUsage"    value="2">
     371    <const name="Temporary"         value="2">
    362372      <desc>
    363373        Scopes the VMs that are temporarily using the resource
     
    367377      </desc>
    368378    </const>
    369     <const name="AllUsage"          value="3">
    370       <desc>
    371         Combines PermanentUsage and TemporaryUsage.
     379    <const name="All"               value="3">
     380      <desc>
     381        Combines Permanent and Temporary.
    372382      </desc>
    373383    </const>
     
    375385
    376386  <enum
    377      name="DiskControllerType"
    378      uuid="1115b810-2ee7-4ebd-8b39-92e98c9a2b48"
    379      >
    380     <const name="InvalidController"  value="0"/>
    381     <const name="IDE0Controller"     value="1"/>
    382     <const name="IDE1Controller"     value="2"/>
     387    name="DiskControllerType"
     388    uuid="1115b810-2ee7-4ebd-8b39-92e98c9a2b48"
     389  >
     390    <desc>
     391      Disk controller type for hard disk attachments.
     392    </desc>
     393
     394    <const name="Null"              value="0">
     395      <desc><tt>null</tt> value. Never used by the API.</desc>
     396    </const>
     397    <const name="IDE0"              value="1"/>
     398    <const name="IDE1"              value="2"/>
    383399  </enum>
    384400
    385401  <enum
    386      name="ClipboardMode"
    387      uuid="33364716-4008-4701-8f14-be0fa3d62950"
    388      >
    389     <const name="ClipDisabled"         value="0"/>
    390     <const name="ClipHostToGuest"      value="1"/>
    391     <const name="ClipGuestToHost"      value="2"/>
    392     <const name="ClipBidirectional"    value="3"/>
     402    name="ClipboardMode"
     403    uuid="33364716-4008-4701-8f14-be0fa3d62950"
     404  >
     405    <desc>
     406     Host-Guest clipboard interchange mode.
     407    </desc>
     408
     409    <const name="Disabled"          value="0"/>
     410    <const name="HostToGuest"       value="1"/>
     411    <const name="GuestToHost"       value="2"/>
     412    <const name="Bidirectional"     value="3"/>
    393413  </enum>
    394414
    395415  <enum
    396      name="Scope"
    397      uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
    398      >
     416    name="Scope"
     417    uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
     418  >
    399419    <desc>
    400420      Scope of the operation.
     
    403423      argument scope.
    404424    </desc>
    405     <const name="GlobalScope"         value="0"/>
    406     <const name="MachineScope"        value="1"/>
    407     <const name="SessionScope"        value="2"/>
     425
     426    <const name="Global"          value="0"/>
     427    <const name="Machine"         value="1"/>
     428    <const name="Session"         value="2"/>
    408429  </enum>
    409430
    410431  <enum
    411      name="GuestStatisticType"
    412      uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
    413      >
     432    name="GuestStatisticType"
     433    uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
     434  >
     435    <desc>
     436      Statistics type for <link to="IGuest::getStatistic"/>.
     437    </desc>
     438
    414439    <const name="CPULoad_Idle"         value="0">
    415440      <desc>
     
    498523    </const>
    499524    <const name="MaxVal"               value="17"/>
     525  </enum>
     526
     527  <enum
     528    name="BIOSBootMenuMode"
     529    uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
     530  >
     531    <desc>
     532      BIOS boot menu mode.
     533    </desc>
     534
     535    <const name="Disabled"        value="0"/>
     536    <const name="MenuOnly"        value="1"/>
     537    <const name="MessageAndMenu"  value="2"/>
     538  </enum>
     539
     540  <enum
     541    name="IDEControllerType"
     542    uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
     543  >
     544    <desc>
     545      IDE controller type.
     546    </desc>
     547
     548    <const name="Null"            value="0">
     549      <desc><tt>null</tt> value. Never used by the API.</desc>
     550    </const>
     551    <const name="PIIX3"           value="1"/>
     552    <const name="PIIX4"           value="2"/>
     553  </enum>
     554
     555  <enum
     556    name="DriveState"
     557    uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
     558  >
     559    <const name="Null"              value="0">
     560      <desc><tt>null</tt> value. Never used by the API.</desc>
     561    </const>
     562    <const name="NotMounted"        value="1"/>
     563    <const name="ImageMounted"      value="2"/>
     564    <const name="HostDriveCaptured" value="3"/>
    500565  </enum>
    501566
     
    699764        values are:
    700765
    701         - <link to="HardDiskDevice"/>: the media is a hard disk
     766        - <link to="DeviceType::HardDisk"/>: the media is a hard disk
    702767        that, if registered, can be obtained using the
    703768        <link to="IVirtualBox::getHardDisk"/> call.
    704         - <link to="DVDDevice"/>: the media is a CD/DVD image
     769        - <link to="DeviceType::DVD"/>: the media is a CD/DVD image
    705770        that, if registered, can be obtained using the
    706771        <link to="IVirtualBox::getDVDImage"/> call.
    707         - <link to="FloppyDevice"/>: the media is a Floppy image
     772        - <link to="DeviceType::Floppy"/>: the media is a Floppy image
    708773        that, if registered, can be obtained using the
    709774        <link to="IVirtualBox::getFloppyImage"/> call.
     
    811876
    812877  <interface
    813      name="IVirtualBox" extends="$dispatched"
    814      uuid="64f652cb-7fdf-482d-ae19-4dbb289a5ca0"
    815      wsmap="managed"
    816      >
     878    name="IVirtualBox" extends="$dispatched"
     879    uuid="64f652cb-7fdf-482d-ae19-4dbb289a5ca0"
     880    wsmap="managed"
     881  >
    817882    <desc>
    818883      The IVirtualBox interface represents the main interface exposed by the
     
    820885
    821886      An instance of IVirtualBox is required for the product to do anything
    822       useful. Even though the interface does not expose this, internally, IVirtualBox
    823       is implemented as a singleton and actually lives in the process of the
    824       VirtualBox server (VBoxSVC.exe). This makes sure that IVirtualBox can
    825       track the state of all virtual machines on a particular host, regardless
    826       of which frontend started them.
    827 
    828       To enumerate all the virtual machines on the host, use the <link to="IVirtualBox::machines" />
    829       attribute.</desc>
     887      useful. Even though the interface does not expose this, internally,
     888      IVirtualBox is implemented as a singleton and actually lives in the
     889      process of the VirtualBox server (VBoxSVC.exe). This makes sure that
     890      IVirtualBox can track the state of all virtual machines on a particular
     891      host, regardless of which frontend started them.
     892
     893      To enumerate all the virtual machines on the host, use the
     894      <link to="IVirtualBox::machines"/> attribute.
     895    </desc>
    830896
    831897    <attribute name="version" type="wstring" readonly="yes">
     
    14281494          by spaces. A null string means that the image is not used.
    14291495          <note>
    1430             When the usage type is <link to="ResourceUsage::AllUsage"/>
    1431             and the image is used by the VM both permanently
    1432             and temporarily, the VM's UUID will be present only
    1433             once in the list.
     1496            When the usage type is <link to="ResourceUsage::All"/> and the image
     1497            is used by the VM both permanently and temporarily, the VM's UUID
     1498            will be present only once in the list.
    14341499          </note>
    14351500        </desc>
     
    15431608          by spaces. A null string means that the image is not used.
    15441609          <note>
    1545             When the usage type is <link to="ResourceUsage::AllUsage"/>
    1546             and the image is used by the VM both permanently
    1547             and temporarily, the VM's UUID will be present only
    1548             once in the list.
     1610            When the usage type is <link to="ResourceUsage::All"/> and the image
     1611            is used by the VM both permanently and temporarily, the VM's UUID
     1612            will be present only once in the list.
    15491613          </note>
    15501614        </desc>
     
    21782242
    21792243  </interface>
    2180 
    2181   <enum
    2182      name="BIOSBootMenuMode"
    2183      uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
    2184      >
    2185     <desc>
    2186       This represents the BIOS boot menu state.
    2187     </desc>
    2188 
    2189     <const name="Disabled"       value="0"/>
    2190     <const name="MenuOnly"       value="1"/>
    2191     <const name="MessageAndMenu" value="2"/>
    2192   </enum>
    2193 
    2194   <enum
    2195      name="IDEControllerType"
    2196      uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
    2197      >
    2198     <const name="InvalidIDEControllerType"       value="0"/>
    2199     <const name="IDEControllerPIIX3"             value="1"/>
    2200     <const name="IDEControllerPIIX4"             value="2"/>
    2201   </enum>
    22022244
    22032245  <interface
     
    24842526    </attribute>
    24852527
    2486     <attribute name="HWVirtExEnabled" type="TriStateBool">
     2528    <attribute name="HWVirtExEnabled" type="TSBool">
    24872529      <desc>
    24882530        This setting determines whether VirtualBox will try to make use of
     
    27302772
    27312773        To indicate that no device is associated with the given position,
    2732         <link to="DeviceType::NoDevice"/> should be used.
     2774        <link to="DeviceType::Null"/> should be used.
    27332775
    27342776        @todo setHardDiskBootOrder(), setNetworkBootOrder()
     
    27592801
    27602802        If here are no devices at the given position, then
    2761         <link to="DeviceType::NoDevice"/> is returned.
     2803        <link to="DeviceType::Null"/> is returned.
    27622804
    27632805        @todo getHardDiskBootOrder(), getNetworkBootOrder()
     
    33623404        The @a scope argument defines one of three scopes:
    33633405        <link to="IVirtualBox::sharedFolders">global shared folders</link>
    3364         (<link to="Scope::GlobalScope">GlobalScope</link>),
     3406        (<link to="Scope::Global">Global</link>),
    33653407        <link to="IMachine::sharedFolders">permanent shared folders</link> of
    3366         the machine (<link to="Scope::MachineScope">MachineScope</link>)
    3367         or <link to="IConsole::sharedFolders">transient shared folders</link>
    3368         of the machine
    3369         (<link to="Scope::SessionScope">SessionScope</link>). Interested
    3370         callees should use query the corresponding collections to find out
    3371         what has changed.
     3408        the machine (<link to="Scope::Machine">Machine</link>) or <link
     3409        to="IConsole::sharedFolders">transient shared folders</link> of the
     3410        machine (<link to="Scope::Session">Session</link>). Interested callees
     3411        should use query the corresponding collections to find out what has
     3412        changed.
    33723413      </desc>
    33733414      <param name="scope" type="Scope" dir="in">
     
    38873928
    38883929        The device needs to be in one of the following states:
    3889         <link to="USBDeviceState::USBDeviceBusy">USBDeviceBusy</link>,
    3890         <link to="USBDeviceState::USBDeviceAvailable">USBDeviceAvailable</link> or
    3891         <link to="USBDeviceState::USBDeviceHeld">USBDeviceHeld</link>,
     3930        <link to="USBDeviceState::Busy">Busy</link>,
     3931        <link to="USBDeviceState::Available">Available</link> or
     3932        <link to="USBDeviceState::Held">Held</link>,
    38923933        otherwise an error is immediately returned.
    38933934
    38943935        When the device state is
    3895         <link to="USBDeviceState::USBDeviceBusy">USBDeviceBusy</link>,
    3896         an error may also be returned if the host computer
    3897         refuses to release it for some reason.
     3936        <link to="USBDeviceState::Busy">Busy</link>, an error may also
     3937        be returned if the host computer refuses to release it for some reason.
    38983938
    38993939        <see>IUSBController::deviceFilters, USBDeviceState</see>
     
    40174057
    40184058        You cannot discard the snapshot if it
    4019         stores <link to="HardDiskType::NormalHardDisk">normal</link>
    4020         (non-differencing) hard disks that have differencing hard disks based
    4021         on them. Snapshots of such kind can be discarded only when every
    4022         normal hard disk has either no children at all or exactly one
    4023         child. In the former case, the normal hard disk simply becomes unused
    4024         (i.e. not attached to any VM). In the latter case, it receives all the
    4025         changes strored in the child hard disk, and then it replaces the child
    4026         hard disk in the configuration of the corresponding snapshot or
    4027         machine.
     4059        stores <link to="HardDiskType::Normal">normal</link> (non-differencing)
     4060        hard disks that have differencing hard disks based on them. Snapshots of
     4061        such kind can be discarded only when every normal hard disk has either
     4062        no children at all or exactly one child. In the former case, the normal
     4063        hard disk simply becomes unused (i.e. not attached to any VM). In the
     4064        latter case, it receives all the changes strored in the child hard disk,
     4065        and then it replaces the child hard disk in the configuration of the
     4066        corresponding snapshot or machine.
    40284067
    40294068        Also, you cannot discard the snapshot if it stores hard disks
     
    53315370
    53325371  <enum
    5333      name="HardDiskStorageType"
    5334      uuid="48138584-ad99-479d-a36f-eb82a7663685"
    5335      >
     5372    name="HardDiskStorageType"
     5373    uuid="48138584-ad99-479d-a36f-eb82a7663685"
     5374  >
    53365375    <desc>
    53375376      Virtual hard disk storage type.
    53385377      <see>IHardDisk</see>
    53395378    </desc>
    5340     <const name="VirtualDiskImage" value="0">
     5379
     5380    <const name="VirtualDiskImage"  value="0">
    53415381      <desc>
    53425382        Virtual Disk Image, VDI (a regular file in the file
     
    53445384      </desc>
    53455385    </const>
    5346     <const name="ISCSIHardDisk" value="1">
     5386    <const name="ISCSIHardDisk"     value="1">
    53475387      <desc>
    53485388        iSCSI Remote Disk (a disk accessed via the Internet
     
    53515391      </desc>
    53525392    </const>
    5353     <const name="VMDKImage" value="2">
     5393    <const name="VMDKImage"         value="2">
    53545394      <desc>
    53555395        VMware Virtual Machine Disk image (a regular file in the file
     
    53575397      </desc>
    53585398    </const>
    5359     <const name="CustomHardDisk" value="3">
     5399    <const name="CustomHardDisk"    value="3">
    53605400      <desc>
    53615401        Disk formats supported through plugins (see
     
    53635403      </desc>
    53645404    </const>
    5365     <const name="VHDImage" value="4">
     5405    <const name="VHDImage"          value="4">
    53665406      <desc>
    53675407        Virtual PC Virtual Machine Disk image (a regular file in the file
     
    53725412
    53735413  <enum
    5374      name="HardDiskType"
    5375      uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
    5376      >
     5414    name="HardDiskType"
     5415    uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
     5416   >
    53775417    <desc>
    53785418      Virtual hard disk type.
    53795419      <see>IHardDisk</see>
    53805420    </desc>
    5381     <const name="NormalHardDisk" value="0">
     5421
     5422    <const name="Normal"            value="0">
    53825423      <desc>
    53835424        Normal hard disk (attached directly or indirectly, preserved
     
    53855426      </desc>
    53865427    </const>
    5387     <const name="ImmutableHardDisk" value="1">
     5428    <const name="Immutable"        value="1">
    53885429      <desc>
    53895430        Immutable hard disk (attached indirectly, changes are wiped out
     
    53915432      </desc>
    53925433    </const>
    5393     <const name="WritethroughHardDisk" value="2">
     5434    <const name="Writethrough"      value="2">
    53945435      <desc>
    53955436        Write through hard disk (attached directly, ignored when
     
    57935834
    57945835        Type (behavior) of this hard disk. For a newly created or opened hard
    5795         disk, this value is <link to="HardDiskType::NormalHardDisk"/>.
     5836        disk, this value is <link to="HardDiskType::Normal"/>.
    57965837
    57975838        <note>
     
    61856226      <note>
    61866227        In the current imlementation, the type of all iSCSI hard disks
    6187         is <link to="HardDiskType::WritethroughHardDisk">Writethrough</link>
     6228        is <link to="HardDiskType::Writethrough">Writethrough</link>
    61886229        and cannot be changed.
    61896230      </note>
     
    62916332      <note>
    62926333        In the current imlementation, the type of all VMDK hard disks
    6293         is <link to="HardDiskType::WritethroughHardDisk">Writethrough</link>
    6294         and cannot be changed.
     6334        is <link to="HardDiskType::Writethrough">Writethrough</link> and cannot
     6335        be changed.
    62956336      </note>
    62966337
     
    66166657      <note>
    66176658        In the current imlementation, the type of all VHD hard disks
    6618         is <link to="HardDiskType::WritethroughHardDisk">Writethrough</link>
    6619         and cannot be changed.
     6659        is <link to="HardDiskType::Writethrough">Writethrough</link> and cannot
     6660        be changed.
    66206661      </note>
    66216662
     
    68406881  /////////////////////////////////////////////////////////////////////////
    68416882  -->
    6842 
    6843   <enum
    6844      name="DriveState"
    6845      uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
    6846      >
    6847     <const name="InvalidDriveState"  value="0"/>
    6848     <const name="NotMounted"         value="1"/>
    6849     <const name="ImageMounted"       value="2"/>
    6850     <const name="HostDriveCaptured"  value="3"/>
    6851   </enum>
    68526883
    68536884  <interface
     
    70937124
    70947125  <enum
    7095      name="MouseButtonState"
    7096      uuid="03131722-2EC5-4173-9794-0DACA46673EF"
    7097      >
     7126    name="MouseButtonState"
     7127    uuid="03131722-2EC5-4173-9794-0DACA46673EF"
     7128  >
     7129    <desc>
     7130      Mouse button state.
     7131    </desc>
     7132
    70987133    <const name="LeftButton"        value="0x01"/>
    70997134    <const name="RightButton"       value="0x02"/>
     
    72277262
    72287263  <enum
    7229      name="FramebufferAccelerationOperation"
    7230      uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
    7231      >
     7264    name="FramebufferAccelerationOperation"
     7265    uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
     7266  >
     7267    <desc>
     7268      Framebuffer acceleration operation.
     7269    </desc>
     7270
    72327271    <const name="SolidFillAcceleration"   value="1"/>
    72337272    <const name="ScreenCopyAcceleration"  value="2"/>
     
    72357274
    72367275  <enum
    7237      name="FramebufferPixelFormat"
    7238      uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
    7239      >
     7276    name="FramebufferPixelFormat"
     7277    uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
     7278  >
    72407279    <desc>
    72417280      Format of the video memory buffer. Constants represented by this enum can
     
    72467285      See also www.fourcc.org for more informantion about FOURCC pixel formats.
    72477286    </desc>
    7248     <const name="PixelFormatOpaque"       value="0xFFFFFFFF">
     7287
     7288    <const name="Opaque"                  value="0xFFFFFFFF">
    72497289      <desc>
    72507290        Unknown buffer format. The user may not assume any particular
     
    72997339        <note>
    73007340          This attribute must never return <link
    7301           to="PixelFormat::PixelFormatOpaque"/> -- the format of the buffer
     7341          to="PixelFormat::Opaque"/> -- the format of the buffer
    73027342          <link to="#address"/> points to must be always known.
    73037343        </note>
     
    73997439        The @a pixelFormat parameter defines whether the direct mode is
    74007440        available or not. If @a pixelFormat is <link
    7401         to="PixelFormat::PixelFormatOpaque"/> then direct access to the guest
     7441        to="PixelFormat::Opaque"/> then direct access to the guest
    74027442        VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
    74037443        bytesPerLine parameters must be ignored and the implementation must use
     
    74407480        value must always correlate with <link to="#pixelFormat"/>. Note that
    74417481        the <link to="#pixelFormat"/> attribute must never return <link
    7442         to="PixelFormat::PixelFormatOpaque"/> regardless of the selected mode.
     7482        to="PixelFormat::Opaque"/> regardless of the selected mode.
    74437483
    74447484        <note>
     
    78117851
    78127852  <enum
    7813      name="NetworkAttachmentType"
    7814      uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
    7815      >
    7816     <const name="NoNetworkAttachment"            value="0"/>
    7817     <const name="NATNetworkAttachment"           value="1"/>
    7818     <const name="HostInterfaceNetworkAttachment" value="2"/>
    7819     <const name="InternalNetworkAttachment"      value="3"/>
     7853    name="NetworkAttachmentType"
     7854    uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
     7855  >
     7856    <desc>
     7857      Network attachment type.
     7858    </desc>
     7859
     7860    <const name="Null"                  value="0">
     7861      <desc><tt>null</tt> value. Also means "not attached".</desc>
     7862    </const>
     7863    <const name="NAT"                   value="1"/>
     7864    <const name="HostInterface"         value="2"/>
     7865    <const name="Internal"              value="3"/>
    78207866  </enum>
    78217867
    78227868  <enum
    7823      name="NetworkAdapterType"
    7824      uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
    7825      >
    7826     <const name="InvalidNetworkAdapterType"      value="0"/>
    7827     <const name="NetworkAdapterAm79C970A"        value="1"/>
    7828     <const name="NetworkAdapterAm79C973"         value="2"/>
    7829     <const name="NetworkAdapter82540EM"          value="3"/>
     7869    name="NetworkAdapterType"
     7870    uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
     7871  >
     7872    <desc>
     7873      Network adapter type.
     7874    </desc>
     7875
     7876    <const name="Null"                  value="0">
     7877      <desc><tt>null</tt> value. Never used by the API.</desc>
     7878    </const>
     7879    <const name="Am79C970A"             value="1"/>
     7880    <const name="Am79C973"              value="2"/>
     7881    <const name="I82540EM"              value="3"/>
    78307882  </enum>
    78317883
     
    79738025
    79748026  <enum
    7975      name="PortMode"
    7976      uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
    7977      >
     8027    name="PortMode"
     8028    uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
     8029  >
    79788030    <desc>
    79798031      The PortMode enumeration represents possible communicaton modes for
     
    79818033    </desc>
    79828034
    7983     <const name="DisconnectedPort"        value="0">
     8035    <const name="Disconnected"        value="0">
    79848036      <desc>Virtual device is not attached to any real host device.</desc>
    79858037    </const>
    7986     <const name="HostPipePort"            value="1">
     8038    <const name="HostPipe"            value="1">
    79878039      <desc>Virtual device is attached to a host pipe.</desc>
    79888040    </const>
    7989     <const name="HostDevicePort"          value="2">
     8041    <const name="HostDevice"          value="2">
    79908042      <desc>Virtual device is attached to a host device.</desc>
    79918043    </const>
     
    82698321        They are run against a list of all currently available USB
    82708322        devices (in states
    8271         <link to="USBDeviceState::USBDeviceAvailable">USBDeviceAvailable</link>,
    8272         <link to="USBDeviceState::USBDeviceBusy">USBDeviceBusy</link>,
    8273         <link to="USBDeviceState::USBDeviceHeld">USBDeviceHeld</link>)
    8274         that were not previously ignored by global filters.
     8323        <link to="USBDeviceState::Available">Available</link>,
     8324        <link to="USBDeviceState::Busy">Busy</link>,
     8325        <link to="USBDeviceState::Held">Held</link>) that were not previously
     8326        ignored by global filters.
    82758327
    82768328        If at least one filter matches the USB device in question, this
     
    86908742      Once a supported USB device is attached to the host, global USB
    86918743      filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
    8692       either ignore the device, or put ot to #USBDeviceHeld state, or do
    8693       nothing. Unless the device is ignored by global filters, filters of
    8694       all currently running guests (<link to="IUSBController::deviceFilters"/>)
    8695       are activated that can put it to #USBDeviceCaptured state.
     8744      either ignore the device, or put ot to #Held state, or do nothing. Unless
     8745      the device is ignored by global filters, filters of all currently running
     8746      guests (<link to="IUSBController::deviceFilters"/>) are activated that can
     8747      put it to #Captured state.
    86968748
    86978749      If the device was ignored by global filters, or didn't match
    86988750      any filters at all (including guest ones), it is handled by the host
    86998751      in a normal way. In this case, the device state is determined by
    8700       the host and can be one of #USBDeviceUnavailable, #USBDeviceBusy or
    8701       #USBDeviceAvailable, depending on the current device usage.
     8752      the host and can be one of #Unavailable, #Busy or #Available, depending on
     8753      the current device usage.
    87028754
    87038755      Besides auto-capturing based on filters, the device can be manually
    87048756      captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
    8705       state is #USBDeviceBusy, #USBDeviceAvailable or #USBDeviceHeld.
     8757      state is #Busy, #Available or #Held.
    87068758
    87078759      <note>
    87088760        Due to differences in USB stack implementations in Linux and Win32,
    8709         states #USBDeviceBusy and #USBDeviceAvailable are applicable
    8710         only to the Linux version of the product. This also means that
    8711         (<link to="IConsole::attachUSBDevice()"/>) can only succeed
    8712         on Win32 if the device state is #USBDeviceHeld.
     8761        states #Busy and #Available are applicable only to the Linux version of
     8762        the product. This also means that (<link
     8763        to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
     8764        the device state is #USBDeviceHeld.
    87138765      </note>
    87148766
     
    87168768    </desc>
    87178769
    8718     <const name="USBDeviceNotSupported" value="0">
     8770    <const name="NotSupported"          value="0">
    87198771      <desc>
    87208772        Not supported by the VirtualBox server, not available to guests.
    87218773      </desc>
    87228774    </const>
    8723     <const name="USBDeviceUnavailable"  value="1">
     8775    <const name="Unavailable"           value="1">
    87248776      <desc>
    87258777        Being used by the host computer exclusively,
     
    87278779      </desc>
    87288780    </const>
    8729     <const name="USBDeviceBusy"         value="2">
     8781    <const name="Busy"                  value="2">
    87308782      <desc>
    87318783        Being used by the host computer, potentially available to guests.
    87328784      </desc>
    87338785    </const>
    8734     <const name="USBDeviceAvailable"    value="3">
     8786    <const name="Available"             value="3">
    87358787      <desc>
    87368788        Not used by the host computer, available to guests.
     
    87388790      </desc>
    87398791    </const>
    8740     <const name="USBDeviceHeld"         value="4">
     8792    <const name="Held"                  value="4">
    87418793      <desc>
    87428794        Held by the VirtualBox server (ignored by the host computer),
     
    87448796      </desc>
    87458797    </const>
    8746     <const name="USBDeviceCaptured"     value="5">
     8798    <const name="Captured"              value="5">
    87478799      <desc>
    87488800        Captured by one of the guest computers, not available
     
    88368888
    88378889  <enum
    8838      name="USBDeviceFilterAction"
    8839      uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
    8840      >
     8890    name="USBDeviceFilterAction"
     8891    uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
     8892  >
    88418893    <desc>
    88428894      Actions for host USB device filters.
     
    88448896    </desc>
    88458897
    8846     <const name="InvalidUSBDeviceFilterAction"  value="0"/>
    8847     <const name="USBDeviceFilterIgnore"         value="1">
     8898    <const name="Null"          value="0">
     8899      <desc><tt>null</tt> value. Never used by the API.</desc>
     8900    </const>
     8901    <const name="Ignore"        value="1">
    88488902      <desc>Ignore the matched USB device.</desc>
    88498903    </const>
    8850     <const name="USBDeviceFilterHold"           value="2">
     8904    <const name="Hold"          value="2">
    88518905      <desc>Hold the matched USB device.</desc>
    88528906    </const>
     
    89038957
    89048958  <enum
    8905      name="AudioDriverType"
    8906      uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
    8907      >
    8908     <const name="NullAudioDriver"   value="0"/>
    8909     <const name="WINMMAudioDriver"  value="1"/>
    8910     <const name="OSSAudioDriver"    value="2"/>
    8911     <const name="ALSAAudioDriver"   value="3"/>
    8912     <const name="DSOUNDAudioDriver" value="4"/>
    8913     <const name="CoreAudioDriver"   value="5"/>
    8914     <const name="MMPMAudioDriver"   value="6"/>
    8915     <const name="PulseAudioDriver"  value="7"/>
     8959    name="AudioDriverType"
     8960    uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
     8961  >
     8962    <desc>
     8963      Host audio driver type.
     8964    </desc>
     8965
     8966    <const name="Null"          value="0">
     8967      <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
     8968    </const>
     8969    <const name="WINMM"         value="1"/>
     8970    <const name="OSS"           value="2"/>
     8971    <const name="ALSA"          value="3"/>
     8972    <const name="DSOUND"        value="4"/>
     8973    <const name="Core"          value="5"/>
     8974    <const name="MMPM"          value="6"/>
     8975    <const name="Pulse"         value="7"/>
    89168976  </enum>
    89178977
     
    89198979    name="AudioControllerType"
    89208980    uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
    8921     >
     8981  >
     8982    <desc>
     8983      Virtual audio controller type.
     8984    </desc>
     8985
    89228986    <const name="AC97" value="0"/>
    89238987    <const name="SB16" value="1"/>
     
    89609024
    89619025  <enum
    8962      name="VRDPAuthType"
    8963      uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
    8964      >
    8965     <const name="VRDPAuthNull"            value="0"/>
    8966     <const name="VRDPAuthExternal"        value="1"/>
    8967     <const name="VRDPAuthGuest"           value="2"/>
     9026    name="VRDPAuthType"
     9027    uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
     9028  >
     9029    <desc>
     9030      VRDP authentication type.
     9031    </desc>
     9032
     9033    <const name="Null"            value="0">
     9034      <desc><tt>null</tt> value. Also means "no authentication".</desc>
     9035    </const>
     9036    <const name="External"        value="1"/>
     9037    <const name="Guest"           value="2"/>
    89689038  </enum>
    89699039
  • trunk/src/VBox/Main/idl/midl.xsl

    r6851 r7207  
    379379    <xsl:for-each select="const">
    380380        <xsl:text>    </xsl:text>
    381         <xsl:value-of select="@name"/> = <xsl:value-of select="@value"/>
     381        <xsl:value-of select="concat(../@name,'_',@name)"/> = <xsl:value-of select="@value"/>
    382382        <xsl:choose>
    383383            <xsl:when test="position()!=last()"><xsl:text>,&#x0A;</xsl:text></xsl:when>
     
    392392    <xsl:value-of select="concat('cpp_quote(&quot;#define ', @name, '_T', ' ',
    393393                                 @name, '&quot;)&#x0A;&#x0A;')"/>
    394     <xsl:text>cpp_quote("")&#x0A;</xsl:text>
    395     <!-- -->
    396     <xsl:value-of select="concat('/* cross-platform constants for ', @name, ' */&#x0A;')"/>
    397     <xsl:for-each select="const">
    398         <xsl:value-of select="concat('cpp_quote(&quot;#define ', ../@name, '_', @name, ' ',
    399                                      @name, '&quot;)&#x0A;')"/>
    400         <xsl:choose>
    401             <xsl:when test="position()=last()"><xsl:text>cpp_quote("")&#x0A;</xsl:text></xsl:when>
    402         </xsl:choose>
    403     </xsl:for-each>
    404394    <xsl:text>&#x0A;&#x0A;</xsl:text>
    405395</xsl:template>
  • trunk/src/VBox/Main/include/AudioAdapterImpl.h

    r6597 r7207  
    3737        Data() {
    3838            mEnabled = false;
    39             mAudioDriver = AudioDriverType_NullAudioDriver;
     39            mAudioDriver = AudioDriverType_Null;
    4040            mAudioController = AudioControllerType_AC97;
    4141        }
  • trunk/src/VBox/Main/include/BIOSSettingsImpl.h

    r6076 r7207  
    4545            mPXEDebugEnabled = false;
    4646            mTimeOffset = 0;
    47             mIDEControllerType = IDEControllerType_IDEControllerPIIX4;
     47            mIDEControllerType = IDEControllerType_PIIX4;
    4848        }
    4949
  • trunk/src/VBox/Main/include/HardDiskImpl.h

    r6174 r7207  
    102102    bool isDifferencing() const
    103103    {
    104         return mType == HardDiskType_NormalHardDisk &&
     104        return mType == HardDiskType_Normal &&
    105105               mStorageType == HardDiskStorageType_VirtualDiskImage &&
    106106               !mParent.isNull();
     
    109109    {
    110110        AutoLock parentLock (mParent);
    111         return !mParent.isNull() && mParent->type() == HardDiskType_ImmutableHardDisk;
     111        return !mParent.isNull() && mParent->type() == HardDiskType_Immutable;
    112112    }
    113113
     
    306306
    307307    State mState;
    308    
     308
    309309    RTSEMEVENTMULTI mStateCheckSem;
    310310    ULONG mStateCheckWaiters;
     
    521521
    522522    State mState;
    523    
     523
    524524    RTSEMEVENTMULTI mStateCheckSem;
    525525    ULONG mStateCheckWaiters;
     
    632632
    633633    State mState;
    634    
     634
    635635    RTSEMEVENTMULTI mStateCheckSem;
    636636    ULONG mStateCheckWaiters;
     
    653653
    654654////////////////////////////////////////////////////////////////////////////////
    655  
     655
    656656class ATL_NO_VTABLE HVHDImage :
    657657    public HardDisk,
     
    746746
    747747    State mState;
    748    
     748
    749749    RTSEMEVENTMULTI mStateCheckSem;
    750750    ULONG mStateCheckWaiters;
  • trunk/src/VBox/Main/include/MachineImpl.h

    r6965 r7207  
    227227        ULONG          mVRAMSize;
    228228        ULONG          mMonitorCount;
    229         TriStateBool_T mHWVirtExEnabled;
     229        TSBool_T      mHWVirtExEnabled;
    230230
    231231        DeviceType_T   mBootOrder [SchemaDefs::MaxBootPosition];
     
    300300        AutoStateDependency (Machine *aThat)
    301301            : mThat (aThat), mRC (S_OK)
    302             , mMachineState (MachineState_InvalidMachineState)
     302            , mMachineState (MachineState_Null)
    303303            , mRegistered (FALSE)
    304304        {
     
    454454    STDMETHOD(COMSETTER(MonitorCount))(ULONG monitorCount);
    455455    STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings);
    456     STDMETHOD(COMGETTER(HWVirtExEnabled))(TriStateBool_T *enabled);
    457     STDMETHOD(COMSETTER(HWVirtExEnabled))(TriStateBool_T enabled);
     456    STDMETHOD(COMGETTER(HWVirtExEnabled))(TSBool_T *enabled);
     457    STDMETHOD(COMSETTER(HWVirtExEnabled))(TSBool_T enabled);
    458458    STDMETHOD(COMGETTER(SnapshotFolder))(BSTR *aSavedStateFolder);
    459459    STDMETHOD(COMSETTER(SnapshotFolder))(INPTR BSTR aSavedStateFolder);
     
    821821    struct SnapshotData
    822822    {
    823         SnapshotData() : mLastState (MachineState_InvalidMachineState) {}
     823        SnapshotData() : mLastState (MachineState_Null) {}
    824824
    825825        MachineState_T mLastState;
  • trunk/src/VBox/Main/include/NetworkAdapterImpl.h

    r6076 r7207  
    3838        Data()
    3939            : mSlot (0), mEnabled (FALSE)
    40             , mAttachmentType (NetworkAttachmentType_NoNetworkAttachment)
     40            , mAttachmentType (NetworkAttachmentType_Null)
    4141            ,  mCableConnected (TRUE), mLineSpeed (0), mTraceEnabled (FALSE)
    4242#ifdef RT_OS_WINDOWS
  • trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h

    r5999 r7207  
    7777    uint32_t clientId (void) { return mClientId; }
    7878
    79     bool captured (void) { return mState == USBDeviceState_USBDeviceCaptured; }
     79    bool captured (void) { return mState == USBDeviceState_Captured; }
    8080    void captured (bool aCaptured)
    8181    {
    8282        if (aCaptured)
    8383        {
    84             Assert(mState == USBDeviceState_USBDeviceAvailable);
    85             mState = USBDeviceState_USBDeviceCaptured;
     84            Assert(mState == USBDeviceState_Available);
     85            mState = USBDeviceState_Captured;
    8686        }
    8787        else
    8888        {
    89             Assert(mState == USBDeviceState_USBDeviceCaptured);
    90             mState = USBDeviceState_USBDeviceAvailable;
     89            Assert(mState == USBDeviceState_Captured);
     90            mState = USBDeviceState_Available;
    9191        }
    9292    }
  • trunk/src/VBox/Main/include/SerialPortImpl.h

    r6076 r7207  
    4040            , mIRQ (4)
    4141            , mIOBase (0x3f8)
    42             , mHostMode (PortMode_DisconnectedPort)
     42            , mHostMode (PortMode_Disconnected)
    4343            , mServer (FALSE)
    4444        {}
  • trunk/src/VBox/Main/include/USBDeviceFilterImpl.h

    r5999 r7207  
    239239    {
    240240#ifndef VBOX_WITH_USBFILTER
    241         Data() : mAction (USBDeviceFilterAction_USBDeviceFilterIgnore) {}
     241        Data() : mAction (USBDeviceFilterAction_Ignore) {}
    242242        USBDeviceFilterAction_T mAction;
    243243#else  /* VBOX_WITH_USBFILTER */
  • trunk/src/VBox/Main/testcase/tstAPI.cpp

    r6922 r7207  
    733733                Guid mid;
    734734                CHECK_RC_BREAK (
    735                     virtualBox->GetHardDiskUsage (id, ResourceUsage_AllUsage,
     735                    virtualBox->GetHardDiskUsage (id, ResourceUsage_All,
    736736                                                  mid.asOutParam())
    737737                );
     
    762762                Bstr mIDs;
    763763                CHECK_RC_BREAK (
    764                     virtualBox->GetDVDImageUsage (id, ResourceUsage_AllUsage,
     764                    virtualBox->GetDVDImageUsage (id, ResourceUsage_All,
    765765                                                  mIDs.asOutParam())
    766766                );
  • trunk/src/VBox/Main/testcase/tstVBoxAPILinux.cpp

    r5999 r7207  
    366366                    hardDisk->GetId(&vdiUUID);
    367367                    rc = machine->AttachHardDisk(*vdiUUID,
    368                                                 DiskControllerType::IDE0Controller, // controler identifier
    369                                                 0);                                 // device number on the controller
     368                                                DiskControllerType::IDE0, // controler identifier
     369                                                0);                       // device number on the controller
    370370                    nsMemory::Free(vdiUUID);
    371371                    if (NS_FAILED(rc))
     
    424424                 * Last step: tell the VM to boot from the CD.
    425425                 */
    426                 rc = machine->SetBootOrder (1, DeviceType::DVDDevice);
     426                rc = machine->SetBootOrder (1, DeviceType::DVD);
    427427                if (NS_FAILED(rc))
    428428                {
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