VirtualBox

Ignore:
Timestamp:
Feb 28, 2008 6:43:08 PM (17 years ago)
Author:
vboxsync
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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp

    r5999 r7207  
    216216     */
    217217    USBDeviceState_T eState = hostDevice->state();
    218     if (eState != USBDeviceState_USBDeviceBusy &&
    219         eState != USBDeviceState_USBDeviceAvailable &&
    220         eState != USBDeviceState_USBDeviceHeld)
     218    if (eState != USBDeviceState_Busy &&
     219        eState != USBDeviceState_Available &&
     220        eState != USBDeviceState_Held)
    221221        return setError (E_FAIL,
    222222                         tr ("Device is not in a capturable state"));
Note: See TracChangeset for help on using the changeset viewer.

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