VirtualBox

Changeset 41371 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
May 21, 2012 3:23:40 PM (13 years ago)
Author:
vboxsync
Message:

Main,include,VBoxManage: smartcard support: IMachine::EmulatedUSBCardReaderEnabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r41225 r41371  
    202202    mPointingHidType = PointingHidType_PS2Mouse;
    203203    mChipsetType = ChipsetType_PIIX3;
     204    mEmulatedUSBCardReaderEnabled = FALSE;
    204205
    205206    for (size_t i = 0; i < RT_ELEMENTS(mCPUAttached); i++)
     
    15261527STDMETHODIMP Machine::COMGETTER(EmulatedUSBCardReaderEnabled)(BOOL *enabled)
    15271528{
     1529#ifdef VBOX_WITH_USB_CARDREADER
     1530    CheckComArgOutPointerValid(enabled);
     1531
     1532    AutoCaller autoCaller(this);
     1533    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     1534
     1535    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     1536
     1537    *enabled = mHWData->mEmulatedUSBCardReaderEnabled;
     1538
     1539    return S_OK;
     1540#else
    15281541    NOREF(enabled);
    15291542    return E_NOTIMPL;
     1543#endif
    15301544}
    15311545
    15321546STDMETHODIMP Machine::COMSETTER(EmulatedUSBCardReaderEnabled)(BOOL enabled)
    15331547{
     1548#ifdef VBOX_WITH_USB_CARDREADER
     1549    AutoCaller autoCaller(this);
     1550    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     1551    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     1552
     1553    int rc = checkStateDependency(MutableStateDep);
     1554    if (FAILED(rc)) return rc;
     1555
     1556    setModified(IsModified_MachineData);
     1557    mHWData.backup();
     1558    mHWData->mEmulatedUSBCardReaderEnabled = enabled;
     1559
     1560    return S_OK;
     1561#else
    15341562    NOREF(enabled);
    15351563    return E_NOTIMPL;
     1564#endif
    15361565}
    15371566
     
    80778106        mHWData->mKeyboardHidType = data.keyboardHidType;
    80788107        mHWData->mChipsetType = data.chipsetType;
     8108        mHWData->mEmulatedUSBCardReaderEnabled = data.fEmulatedUSBCardReader;
    80798109        mHWData->mHpetEnabled = data.fHpetEnabled;
    80808110
     
    92119241        // chipset
    92129242        data.chipsetType = mHWData->mChipsetType;
     9243
     9244        data.fEmulatedUSBCardReader = !!mHWData->mEmulatedUSBCardReaderEnabled;
    92139245
    92149246        // HPET
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