VirtualBox

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


Ignore:
Timestamp:
Aug 2, 2012 4:44:39 PM (12 years ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/VBox/Main/src-server
Files:
8 edited

Legend:

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

    r41882 r42551  
    529529}
    530530
    531 HRESULT BandwidthControl::loadSettings(const settings::IoSettings &data)
     531HRESULT BandwidthControl::loadSettings(const settings::IOSettings &data)
    532532{
    533533    HRESULT rc = S_OK;
     
    548548}
    549549
    550 HRESULT BandwidthControl::saveSettings(settings::IoSettings &data)
     550HRESULT BandwidthControl::saveSettings(settings::IOSettings &data)
    551551{
    552552    AutoCaller autoCaller(this);
  • trunk/src/VBox/Main/src-server/GuestOSTypeImpl.cpp

    r39058 r42551  
    55
    66/*
    7  * Copyright (C) 2006-2010 Oracle Corporation
     7 * Copyright (C) 2006-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3131    , mNetworkAdapterType(NetworkAdapterType_Am79C973)
    3232    , mNumSerialEnabled(0)
    33     , mDvdStorageControllerType(StorageControllerType_PIIX3)
    34     , mDvdStorageBusType(StorageBus_IDE)
    35     , mHdStorageControllerType(StorageControllerType_PIIX3)
    36     , mHdStorageBusType(StorageBus_IDE)
     33    , mDVDStorageControllerType(StorageControllerType_PIIX3)
     34    , mDVDStorageBusType(StorageBus_IDE)
     35    , mHDStorageControllerType(StorageControllerType_PIIX3)
     36    , mHDStorageBusType(StorageBus_IDE)
    3737    , mChipsetType(ChipsetType_PIIX3)
    3838    , mAudioControllerType(AudioControllerType_AC97)
     
    7979                          NetworkAdapterType_T aNetworkAdapterType,
    8080                          uint32_t aNumSerialEnabled,
    81                           StorageControllerType_T aDvdStorageControllerType,
    82                           StorageBus_T aDvdStorageBusType,
    83                           StorageControllerType_T aHdStorageControllerType,
    84                           StorageBus_T aHdStorageBusType,
     81                          StorageControllerType_T aDVDStorageControllerType,
     82                          StorageBus_T aDVDStorageBusType,
     83                          StorageControllerType_T aHDStorageControllerType,
     84                          StorageBus_T aHDStorageBusType,
    8585                          ChipsetType_T aChipsetType
    8686                          AudioControllerType_T aAudioControllerType*/
     
    119119    unconst(mNetworkAdapterType)        = ostype.networkAdapterType;
    120120    unconst(mNumSerialEnabled)          = ostype.numSerialEnabled;
    121     unconst(mDvdStorageControllerType)  = ostype.dvdStorageControllerType;
    122     unconst(mDvdStorageBusType)         = ostype.dvdStorageBusType;
    123     unconst(mHdStorageControllerType)   = ostype.hdStorageControllerType;
    124     unconst(mHdStorageBusType)          = ostype.hdStorageBusType;
     121    unconst(mDVDStorageControllerType)  = ostype.dvdStorageControllerType;
     122    unconst(mDVDStorageBusType)         = ostype.dvdStorageBusType;
     123    unconst(mHDStorageControllerType)   = ostype.hdStorageControllerType;
     124    unconst(mHDStorageBusType)          = ostype.hdStorageBusType;
    125125    unconst(mChipsetType)               = ostype.chipsetType;
    126126    unconst(mAudioControllerType)       = ostype.audioControllerType;
     
    316316}
    317317
    318 STDMETHODIMP GuestOSType::COMGETTER(RecommendedPae)(BOOL *aRecommendedPae)
    319 {
    320     CheckComArgOutPointerValid(aRecommendedPae);
     318STDMETHODIMP GuestOSType::COMGETTER(RecommendedPAE)(BOOL *aRecommendedPAE)
     319{
     320    CheckComArgOutPointerValid(aRecommendedPAE);
    321321
    322322    AutoCaller autoCaller(this);
     
    324324
    325325    /* recommended PAE is constant during life time, no need to lock */
    326     *aRecommendedPae = !!(mOSHint & VBOXOSHINT_PAE);
     326    *aRecommendedPAE = !!(mOSHint & VBOXOSHINT_PAE);
    327327
    328328    return S_OK;
     
    345345}
    346346
    347 STDMETHODIMP GuestOSType::COMGETTER(RecommendedDvdStorageController)(StorageControllerType_T * aStorageControllerType)
     347STDMETHODIMP GuestOSType::COMGETTER(RecommendedDVDStorageController)(StorageControllerType_T * aStorageControllerType)
    348348{
    349349    CheckComArgOutPointerValid(aStorageControllerType);
     
    353353
    354354    /* storage controller type is constant during life time, no need to lock */
    355     *aStorageControllerType = mDvdStorageControllerType;
    356 
    357     return S_OK;
    358 }
    359 
    360 STDMETHODIMP GuestOSType::COMGETTER(RecommendedDvdStorageBus)(StorageBus_T * aStorageBusType)
     355    *aStorageControllerType = mDVDStorageControllerType;
     356
     357    return S_OK;
     358}
     359
     360STDMETHODIMP GuestOSType::COMGETTER(RecommendedDVDStorageBus)(StorageBus_T * aStorageBusType)
    361361{
    362362    CheckComArgOutPointerValid(aStorageBusType);
     
    366366
    367367    /* storage controller type is constant during life time, no need to lock */
    368     *aStorageBusType = mDvdStorageBusType;
    369 
    370     return S_OK;
    371 }
    372 
    373 STDMETHODIMP GuestOSType::COMGETTER(RecommendedHdStorageController)(StorageControllerType_T * aStorageControllerType)
     368    *aStorageBusType = mDVDStorageBusType;
     369
     370    return S_OK;
     371}
     372
     373STDMETHODIMP GuestOSType::COMGETTER(RecommendedHDStorageController)(StorageControllerType_T * aStorageControllerType)
    374374{
    375375    CheckComArgOutPointerValid(aStorageControllerType);
     
    379379
    380380    /* storage controller type is constant during life time, no need to lock */
    381     *aStorageControllerType = mHdStorageControllerType;
    382 
    383     return S_OK;
    384 }
    385 
    386 STDMETHODIMP GuestOSType::COMGETTER(RecommendedHdStorageBus)(StorageBus_T * aStorageBusType)
     381    *aStorageControllerType = mHDStorageControllerType;
     382
     383    return S_OK;
     384}
     385
     386STDMETHODIMP GuestOSType::COMGETTER(RecommendedHDStorageBus)(StorageBus_T * aStorageBusType)
    387387{
    388388    CheckComArgOutPointerValid(aStorageBusType);
     
    392392
    393393    /* storage controller type is constant during life time, no need to lock */
    394     *aStorageBusType = mHdStorageBusType;
    395 
    396     return S_OK;
    397 }
    398 
    399 STDMETHODIMP GuestOSType::COMGETTER(RecommendedUsbHid)(BOOL *aRecommendedUsbHid)
    400 {
    401     CheckComArgOutPointerValid(aRecommendedUsbHid);
     394    *aStorageBusType = mHDStorageBusType;
     395
     396    return S_OK;
     397}
     398
     399STDMETHODIMP GuestOSType::COMGETTER(RecommendedUSBHID)(BOOL *aRecommendedUSBHID)
     400{
     401    CheckComArgOutPointerValid(aRecommendedUSBHID);
    402402
    403403    AutoCaller autoCaller(this);
     
    405405
    406406    /* HID type is constant during life time, no need to lock */
    407     *aRecommendedUsbHid = !!(mOSHint & VBOXOSHINT_USBHID);
    408 
    409     return S_OK;
    410 }
    411 
    412 STDMETHODIMP GuestOSType::COMGETTER(RecommendedHpet)(BOOL *aRecommendedHpet)
    413 {
    414     CheckComArgOutPointerValid(aRecommendedHpet);
     407    *aRecommendedUSBHID = !!(mOSHint & VBOXOSHINT_USBHID);
     408
     409    return S_OK;
     410}
     411
     412STDMETHODIMP GuestOSType::COMGETTER(RecommendedHPET)(BOOL *aRecommendedHPET)
     413{
     414    CheckComArgOutPointerValid(aRecommendedHPET);
    415415
    416416    AutoCaller autoCaller(this);
     
    418418
    419419    /* HPET recommendation is constant during life time, no need to lock */
    420     *aRecommendedHpet = !!(mOSHint & VBOXOSHINT_HPET);
    421 
    422     return S_OK;
    423 }
    424 
    425 STDMETHODIMP GuestOSType::COMGETTER(RecommendedUsbTablet)(BOOL *aRecommendedUsbTablet)
    426 {
    427     CheckComArgOutPointerValid(aRecommendedUsbTablet);
     420    *aRecommendedHPET = !!(mOSHint & VBOXOSHINT_HPET);
     421
     422    return S_OK;
     423}
     424
     425STDMETHODIMP GuestOSType::COMGETTER(RecommendedUSBTablet)(BOOL *aRecommendedUSBTablet)
     426{
     427    CheckComArgOutPointerValid(aRecommendedUSBTablet);
    428428
    429429    AutoCaller autoCaller(this);
     
    431431
    432432    /* HID type is constant during life time, no need to lock */
    433     *aRecommendedUsbTablet = !!(mOSHint & VBOXOSHINT_USBTABLET);
    434 
    435     return S_OK;
    436 }
    437 
    438 STDMETHODIMP GuestOSType::COMGETTER(RecommendedRtcUseUtc)(BOOL *aRecommendedRtcUseUtc)
    439 {
    440     CheckComArgOutPointerValid(aRecommendedRtcUseUtc);
     433    *aRecommendedUSBTablet = !!(mOSHint & VBOXOSHINT_USBTABLET);
     434
     435    return S_OK;
     436}
     437
     438STDMETHODIMP GuestOSType::COMGETTER(RecommendedRTCUseUTC)(BOOL *aRecommendedRTCUseUTC)
     439{
     440    CheckComArgOutPointerValid(aRecommendedRTCUseUTC);
    441441
    442442    AutoCaller autoCaller(this);
     
    444444
    445445    /* Value is constant during life time, no need to lock */
    446     *aRecommendedRtcUseUtc = !!(mOSHint & VBOXOSHINT_RTCUTC);
     446    *aRecommendedRTCUseUTC = !!(mOSHint & VBOXOSHINT_RTCUTC);
    447447
    448448    return S_OK;
     
    487487}
    488488
    489 STDMETHODIMP GuestOSType::COMGETTER(RecommendedUsb)(BOOL *aRecommendedUsb)
    490 {
    491     CheckComArgOutPointerValid(aRecommendedUsb);
     489STDMETHODIMP GuestOSType::COMGETTER(RecommendedUSB)(BOOL *aRecommendedUSB)
     490{
     491    CheckComArgOutPointerValid(aRecommendedUSB);
    492492
    493493    AutoCaller autoCaller(this);
     
    495495
    496496    /* Value is constant during life time, no need to lock */
    497     *aRecommendedUsb = !(mOSHint & VBOXOSHINT_NOUSB);
     497    *aRecommendedUSB = !(mOSHint & VBOXOSHINT_NOUSB);
    498498
    499499    return S_OK;
  • trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp

    r40078 r42551  
    77
    88/*
    9  * Copyright (C) 2006-2008 Oracle Corporation
     9 * Copyright (C) 2006-2012 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4848void HostNetworkInterface::FinalRelease()
    4949{
    50     uninit ();
     50    uninit();
    5151    BaseFinalRelease();
    5252}
     
    8787#ifdef VBOX_WITH_HOSTNETIF_API
    8888
    89 HRESULT HostNetworkInterface::updateConfig ()
     89HRESULT HostNetworkInterface::updateConfig()
    9090{
    9191    NETIFINFO info;
     
    123123 * @param   aGuid GUID of the host network interface
    124124 */
    125 HRESULT HostNetworkInterface::init (Bstr aInterfaceName, HostNetworkInterfaceType_T ifType, PNETIFINFO pIf)
     125HRESULT HostNetworkInterface::init(Bstr aInterfaceName, HostNetworkInterfaceType_T ifType, PNETIFINFO pIf)
    126126{
    127127//    LogFlowThisFunc(("aInterfaceName={%ls}, aGuid={%s}\n",
     
    140140    if (pIf->szShortName[0])
    141141        unconst(mNetworkName) = composeNetworkName(pIf->szShortName);
    142     else 
     142    else
    143143        unconst(mNetworkName) = composeNetworkName(aInterfaceName);
    144144    mIfType = ifType;
     
    174174 * @param   aInterfaceName address of result pointer
    175175 */
    176 STDMETHODIMP HostNetworkInterface::COMGETTER(Name) (BSTR *aInterfaceName)
     176STDMETHODIMP HostNetworkInterface::COMGETTER(Name)(BSTR *aInterfaceName)
    177177{
    178178    CheckComArgOutPointerValid(aInterfaceName);
     
    192192 * @param   aGuid address of result pointer
    193193 */
    194 STDMETHODIMP HostNetworkInterface::COMGETTER(Id) (BSTR *aGuid)
     194STDMETHODIMP HostNetworkInterface::COMGETTER(Id)(BSTR *aGuid)
    195195{
    196196    CheckComArgOutPointerValid(aGuid);
     
    204204}
    205205
    206 STDMETHODIMP HostNetworkInterface::COMGETTER(DhcpEnabled) (BOOL *aDhcpEnabled)
    207 {
    208     CheckComArgOutPointerValid(aDhcpEnabled);
    209 
    210     AutoCaller autoCaller(this);
    211     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    212 
    213     *aDhcpEnabled = m.dhcpEnabled;
     206STDMETHODIMP HostNetworkInterface::COMGETTER(DHCPEnabled)(BOOL *aDHCPEnabled)
     207{
     208    CheckComArgOutPointerValid(aDHCPEnabled);
     209
     210    AutoCaller autoCaller(this);
     211    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     212
     213    *aDHCPEnabled = m.dhcpEnabled;
    214214
    215215    return S_OK;
     
    223223 * @param   aIPAddress address of result pointer
    224224 */
    225 STDMETHODIMP HostNetworkInterface::COMGETTER(IPAddress) (BSTR *aIPAddress)
     225STDMETHODIMP HostNetworkInterface::COMGETTER(IPAddress)(BSTR *aIPAddress)
    226226{
    227227    CheckComArgOutPointerValid(aIPAddress);
     
    252252 * @param   aNetworkMask address of result pointer
    253253 */
    254 STDMETHODIMP HostNetworkInterface::COMGETTER(NetworkMask) (BSTR *aNetworkMask)
     254STDMETHODIMP HostNetworkInterface::COMGETTER(NetworkMask)(BSTR *aNetworkMask)
    255255{
    256256    CheckComArgOutPointerValid(aNetworkMask);
     
    275275}
    276276
    277 STDMETHODIMP HostNetworkInterface::COMGETTER(IPV6Supported) (BOOL *aIPV6Supported)
     277STDMETHODIMP HostNetworkInterface::COMGETTER(IPV6Supported)(BOOL *aIPV6Supported)
    278278{
    279279    CheckComArgOutPointerValid(aIPV6Supported);
     
    293293 * @param   aIPV6Address address of result pointer
    294294 */
    295 STDMETHODIMP HostNetworkInterface::COMGETTER(IPV6Address) (BSTR *aIPV6Address)
     295STDMETHODIMP HostNetworkInterface::COMGETTER(IPV6Address)(BSTR *aIPV6Address)
    296296{
    297297    CheckComArgOutPointerValid(aIPV6Address);
     
    311311 * @param   aIPV6Mask address of result pointer
    312312 */
    313 STDMETHODIMP HostNetworkInterface::COMGETTER(IPV6NetworkMaskPrefixLength) (ULONG *aIPV6NetworkMaskPrefixLength)
     313STDMETHODIMP HostNetworkInterface::COMGETTER(IPV6NetworkMaskPrefixLength)(ULONG *aIPV6NetworkMaskPrefixLength)
    314314{
    315315    CheckComArgOutPointerValid(aIPV6NetworkMaskPrefixLength);
     
    329329 * @param   aHardwareAddress address of result pointer
    330330 */
    331 STDMETHODIMP HostNetworkInterface::COMGETTER(HardwareAddress) (BSTR *aHardwareAddress)
     331STDMETHODIMP HostNetworkInterface::COMGETTER(HardwareAddress)(BSTR *aHardwareAddress)
    332332{
    333333    CheckComArgOutPointerValid(aHardwareAddress);
     
    347347 * @param   aType address of result pointer
    348348 */
    349 STDMETHODIMP HostNetworkInterface::COMGETTER(MediumType) (HostNetworkInterfaceMediumType_T *aType)
     349STDMETHODIMP HostNetworkInterface::COMGETTER(MediumType)(HostNetworkInterfaceMediumType_T *aType)
    350350{
    351351    CheckComArgOutPointerValid(aType);
     
    365365 * @param   aStatus address of result pointer
    366366 */
    367 STDMETHODIMP HostNetworkInterface::COMGETTER(Status) (HostNetworkInterfaceStatus_T *aStatus)
     367STDMETHODIMP HostNetworkInterface::COMGETTER(Status)(HostNetworkInterfaceStatus_T *aStatus)
    368368{
    369369    CheckComArgOutPointerValid(aStatus);
     
    383383 * @param   aType address of result pointer
    384384 */
    385 STDMETHODIMP HostNetworkInterface::COMGETTER(InterfaceType) (HostNetworkInterfaceType_T *aType)
     385STDMETHODIMP HostNetworkInterface::COMGETTER(InterfaceType)(HostNetworkInterfaceType_T *aType)
    386386{
    387387    CheckComArgOutPointerValid(aType);
     
    396396}
    397397
    398 STDMETHODIMP HostNetworkInterface::COMGETTER(NetworkName) (BSTR *aNetworkName)
     398STDMETHODIMP HostNetworkInterface::COMGETTER(NetworkName)(BSTR *aNetworkName)
    399399{
    400400    CheckComArgOutPointerValid(aNetworkName);
     
    408408}
    409409
    410 STDMETHODIMP HostNetworkInterface::EnableStaticIpConfig (IN_BSTR aIPAddress, IN_BSTR aNetMask)
     410STDMETHODIMP HostNetworkInterface::EnableStaticIPConfig(IN_BSTR aIPAddress, IN_BSTR aNetMask)
    411411{
    412412#ifndef VBOX_WITH_HOSTNETIF_API
     
    452452                m.realIPAddress   = ip;
    453453                m.realNetworkMask = mask;
    454                 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(), 
     454                if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(),
    455455                                                       Bstr(aIPAddress).raw())))
    456456                    return E_FAIL;
     
    472472}
    473473
    474 STDMETHODIMP HostNetworkInterface::EnableStaticIpConfigV6 (IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
     474STDMETHODIMP HostNetworkInterface::EnableStaticIPConfigV6(IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
    475475{
    476476#ifndef VBOX_WITH_HOSTNETIF_API
     
    513513}
    514514
    515 STDMETHODIMP HostNetworkInterface::EnableDynamicIpConfig ()
     515STDMETHODIMP HostNetworkInterface::EnableDynamicIPConfig()
    516516{
    517517#ifndef VBOX_WITH_HOSTNETIF_API
     
    531531}
    532532
    533 STDMETHODIMP HostNetworkInterface::DhcpRediscover ()
     533STDMETHODIMP HostNetworkInterface::DHCPRediscover()
    534534{
    535535#ifndef VBOX_WITH_HOSTNETIF_API
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r42538 r42551  
    131131    mGuestPropertiesModified   = FALSE;
    132132
    133     mSession.mPid              = NIL_RTPROCESS;
     133    mSession.mPID              = NIL_RTPROCESS;
    134134    mSession.mState            = SessionState_Unlocked;
    135135}
     
    187187#endif
    188188    mSyntheticCpu = false;
    189     mHpetEnabled = false;
     189    mHPETEnabled = false;
    190190
    191191    /* default boot order: floppy - DVD - HDD */
     
    201201
    202202    mFirmwareType = FirmwareType_BIOS;
    203     mKeyboardHidType = KeyboardHidType_PS2Keyboard;
    204     mPointingHidType = PointingHidType_PS2Mouse;
     203    mKeyboardHIDType = KeyboardHIDType_PS2Keyboard;
     204    mPointingHIDType = PointingHIDType_PS2Mouse;
    205205    mChipsetType = ChipsetType_PIIX3;
    206206    mEmulatedUSBCardReaderEnabled = FALSE;
     
    209209        mCPUAttached[i] = false;
    210210
    211     mIoCacheEnabled = true;
    212     mIoCacheSize    = 5; /* 5MB */
     211    mIOCacheEnabled = true;
     212    mIOCacheSize    = 5; /* 5MB */
    213213
    214214    /* Maximum CPU execution cap by default. */
     
    11761176}
    11771177
    1178 STDMETHODIMP Machine::COMGETTER(KeyboardHidType)(KeyboardHidType_T *aKeyboardHidType)
    1179 {
    1180     CheckComArgOutPointerValid(aKeyboardHidType);
     1178STDMETHODIMP Machine::COMGETTER(KeyboardHIDType)(KeyboardHIDType_T *aKeyboardHIDType)
     1179{
     1180    CheckComArgOutPointerValid(aKeyboardHIDType);
    11811181
    11821182    AutoCaller autoCaller(this);
     
    11851185    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    11861186
    1187     *aKeyboardHidType = mHWData->mKeyboardHidType;
    1188 
    1189     return S_OK;
    1190 }
    1191 
    1192 STDMETHODIMP Machine::COMSETTER(KeyboardHidType)(KeyboardHidType_T  aKeyboardHidType)
     1187    *aKeyboardHIDType = mHWData->mKeyboardHIDType;
     1188
     1189    return S_OK;
     1190}
     1191
     1192STDMETHODIMP Machine::COMSETTER(KeyboardHIDType)(KeyboardHIDType_T  aKeyboardHIDType)
    11931193{
    11941194    AutoCaller autoCaller(this);
     
    12011201    setModified(IsModified_MachineData);
    12021202    mHWData.backup();
    1203     mHWData->mKeyboardHidType = aKeyboardHidType;
    1204 
    1205     return S_OK;
    1206 }
    1207 
    1208 STDMETHODIMP Machine::COMGETTER(PointingHidType)(PointingHidType_T *aPointingHidType)
    1209 {
    1210     CheckComArgOutPointerValid(aPointingHidType);
     1203    mHWData->mKeyboardHIDType = aKeyboardHIDType;
     1204
     1205    return S_OK;
     1206}
     1207
     1208STDMETHODIMP Machine::COMGETTER(PointingHIDType)(PointingHIDType_T *aPointingHIDType)
     1209{
     1210    CheckComArgOutPointerValid(aPointingHIDType);
    12111211
    12121212    AutoCaller autoCaller(this);
     
    12151215    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    12161216
    1217     *aPointingHidType = mHWData->mPointingHidType;
    1218 
    1219     return S_OK;
    1220 }
    1221 
    1222 STDMETHODIMP Machine::COMSETTER(PointingHidType)(PointingHidType_T  aPointingHidType)
     1217    *aPointingHIDType = mHWData->mPointingHIDType;
     1218
     1219    return S_OK;
     1220}
     1221
     1222STDMETHODIMP Machine::COMSETTER(PointingHIDType)(PointingHIDType_T  aPointingHIDType)
    12231223{
    12241224    AutoCaller autoCaller(this);
     
    12311231    setModified(IsModified_MachineData);
    12321232    mHWData.backup();
    1233     mHWData->mPointingHidType = aPointingHidType;
     1233    mHWData->mPointingHIDType = aPointingHIDType;
    12341234
    12351235    return S_OK;
     
    16261626}
    16271627
    1628 STDMETHODIMP Machine::COMGETTER(HpetEnabled)(BOOL *enabled)
     1628STDMETHODIMP Machine::COMGETTER(HPETEnabled)(BOOL *enabled)
    16291629{
    16301630    CheckComArgOutPointerValid(enabled);
     
    16341634    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    16351635
    1636     *enabled = mHWData->mHpetEnabled;
    1637 
    1638     return S_OK;
    1639 }
    1640 
    1641 STDMETHODIMP Machine::COMSETTER(HpetEnabled)(BOOL enabled)
     1636    *enabled = mHWData->mHPETEnabled;
     1637
     1638    return S_OK;
     1639}
     1640
     1641STDMETHODIMP Machine::COMSETTER(HPETEnabled)(BOOL enabled)
    16421642{
    16431643    HRESULT rc = S_OK;
     
    16531653    mHWData.backup();
    16541654
    1655     mHWData->mHpetEnabled = enabled;
     1655    mHWData->mHPETEnabled = enabled;
    16561656
    16571657    return rc;
     
    24392439}
    24402440
    2441 STDMETHODIMP Machine::COMGETTER(SessionPid)(ULONG *aSessionPid)
    2442 {
    2443     CheckComArgOutPointerValid(aSessionPid);
     2441STDMETHODIMP Machine::COMGETTER(SessionPID)(ULONG *aSessionPID)
     2442{
     2443    CheckComArgOutPointerValid(aSessionPID);
    24442444
    24452445    AutoCaller autoCaller(this);
     
    24482448    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    24492449
    2450     *aSessionPid = mData->mSession.mPid;
     2450    *aSessionPID = mData->mSession.mPID;
    24512451
    24522452    return S_OK;
     
    30633063}
    30643064
    3065 STDMETHODIMP Machine::COMGETTER(IoCacheEnabled)(BOOL *aEnabled)
     3065STDMETHODIMP Machine::COMGETTER(IOCacheEnabled)(BOOL *aEnabled)
    30663066{
    30673067    CheckComArgOutPointerValid(aEnabled);
     
    30723072    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    30733073
    3074     *aEnabled = mHWData->mIoCacheEnabled;
    3075 
    3076     return S_OK;
    3077 }
    3078 
    3079 STDMETHODIMP Machine::COMSETTER(IoCacheEnabled)(BOOL aEnabled)
     3074    *aEnabled = mHWData->mIOCacheEnabled;
     3075
     3076    return S_OK;
     3077}
     3078
     3079STDMETHODIMP Machine::COMSETTER(IOCacheEnabled)(BOOL aEnabled)
    30803080{
    30813081    AutoCaller autoCaller(this);
     
    30893089    setModified(IsModified_MachineData);
    30903090    mHWData.backup();
    3091     mHWData->mIoCacheEnabled = aEnabled;
    3092 
    3093     return S_OK;
    3094 }
    3095 
    3096 STDMETHODIMP Machine::COMGETTER(IoCacheSize)(ULONG *aIoCacheSize)
    3097 {
    3098     CheckComArgOutPointerValid(aIoCacheSize);
     3091    mHWData->mIOCacheEnabled = aEnabled;
     3092
     3093    return S_OK;
     3094}
     3095
     3096STDMETHODIMP Machine::COMGETTER(IOCacheSize)(ULONG *aIOCacheSize)
     3097{
     3098    CheckComArgOutPointerValid(aIOCacheSize);
    30993099
    31003100    AutoCaller autoCaller(this);
     
    31033103    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    31043104
    3105     *aIoCacheSize = mHWData->mIoCacheSize;
    3106 
    3107     return S_OK;
    3108 }
    3109 
    3110 STDMETHODIMP Machine::COMSETTER(IoCacheSize)(ULONG  aIoCacheSize)
     3105    *aIOCacheSize = mHWData->mIOCacheSize;
     3106
     3107    return S_OK;
     3108}
     3109
     3110STDMETHODIMP Machine::COMSETTER(IOCacheSize)(ULONG  aIOCacheSize)
    31113111{
    31123112    AutoCaller autoCaller(this);
     
    31203120    setModified(IsModified_MachineData);
    31213121    mHWData.backup();
    3122     mHWData->mIoCacheSize = aIoCacheSize;
     3122    mHWData->mIOCacheSize = aIOCacheSize;
    31233123
    31243124    return S_OK;
     
    32633263            // LaunchVMProcess()
    32643264
    3265             LogFlowThisFunc(("mSession.mPid=%d(0x%x)\n", mData->mSession.mPid, mData->mSession.mPid));
     3265            LogFlowThisFunc(("mSession.mPID=%d(0x%x)\n", mData->mSession.mPID, mData->mSession.mPID));
    32663266            LogFlowThisFunc(("session.pid=%d(0x%x)\n", pid, pid));
    32673267
    3268             if (mData->mSession.mPid != pid)
     3268            if (mData->mSession.mPID != pid)
    32693269                return setError(E_ACCESSDENIED,
    32703270                                tr("An unexpected process (PID=0x%08X) has tried to lock the "
    32713271                                   "machine '%s', while only the process started by LaunchVMProcess (PID=0x%08X) is allowed"),
    3272                                 pid, mUserData->s.strName.c_str(), mData->mSession.mPid);
     3272                                pid, mUserData->s.strName.c_str(), mData->mSession.mPID);
    32733273        }
    32743274
     
    33683368             *        around here.  */
    33693369
    3370             /* We don't reset mSession.mPid here because it is necessary for
     3370            /* We don't reset mSession.mPID here because it is necessary for
    33713371             * SessionMachine::uninit() to reap the child process later. */
    33723372
     
    33923392            /* memorize PID of the directly opened session */
    33933393            if (SUCCEEDED(rc))
    3394                 mData->mSession.mPid = pid;
     3394                mData->mSession.mPID = pid;
    33953395        }
    33963396
     
    35353535
    35363536        /* forcibly terminate the VM process */
    3537         if (mData->mSession.mPid != NIL_RTPROCESS)
    3538             RTProcTerminate(mData->mSession.mPid);
     3537        if (mData->mSession.mPID != NIL_RTPROCESS)
     3538            RTProcTerminate(mData->mSession.mPID);
    35393539
    35403540        /* signal the client watcher thread, as most likely the client has
     
    64436443 * just makes sure it's plugged on next VM start.
    64446444 */
    6445 STDMETHODIMP Machine::AttachHostPciDevice(LONG hostAddress, LONG desiredGuestAddress, BOOL /*tryToUnbind*/)
     6445STDMETHODIMP Machine::AttachHostPCIDevice(LONG hostAddress, LONG desiredGuestAddress, BOOL /*tryToUnbind*/)
    64466446{
    64476447    AutoCaller autoCaller(this);
     
    64656465
    64666466        // check if device with this host PCI address already attached
    6467         for (HWData::PciDeviceAssignmentList::iterator it =  mHWData->mPciDeviceAssignments.begin();
    6468              it !=  mHWData->mPciDeviceAssignments.end();
     6467        for (HWData::PCIDeviceAssignmentList::iterator it =  mHWData->mPCIDeviceAssignments.begin();
     6468             it !=  mHWData->mPCIDeviceAssignments.end();
    64696469             ++it)
    64706470        {
    64716471            LONG iHostAddress = -1;
    6472             ComPtr<PciDeviceAttachment> pAttach;
     6472            ComPtr<PCIDeviceAttachment> pAttach;
    64736473            pAttach = *it;
    64746474            pAttach->COMGETTER(HostAddress)(&iHostAddress);
     
    64786478        }
    64796479
    6480         ComObjPtr<PciDeviceAttachment> pda;
     6480        ComObjPtr<PCIDeviceAttachment> pda;
    64816481        char name[32];
    64826482
     
    64876487        setModified(IsModified_MachineData);
    64886488        mHWData.backup();
    6489         mHWData->mPciDeviceAssignments.push_back(pda);
     6489        mHWData->mPCIDeviceAssignments.push_back(pda);
    64906490    }
    64916491
     
    64976497 * just makes sure it's not plugged on next VM start.
    64986498 */
    6499 STDMETHODIMP Machine::DetachHostPciDevice(LONG hostAddress)
    6500 {
    6501     AutoCaller autoCaller(this);
    6502     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    6503 
    6504     ComObjPtr<PciDeviceAttachment> pAttach;
     6499STDMETHODIMP Machine::DetachHostPCIDevice(LONG hostAddress)
     6500{
     6501    AutoCaller autoCaller(this);
     6502    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     6503
     6504    ComObjPtr<PCIDeviceAttachment> pAttach;
    65056505    bool fRemoved = false;
    65066506    HRESULT rc;
     
    65136513        if (FAILED(rc)) return rc;
    65146514
    6515         for (HWData::PciDeviceAssignmentList::iterator it =  mHWData->mPciDeviceAssignments.begin();
    6516              it !=  mHWData->mPciDeviceAssignments.end();
     6515        for (HWData::PCIDeviceAssignmentList::iterator it =  mHWData->mPCIDeviceAssignments.begin();
     6516             it !=  mHWData->mPCIDeviceAssignments.end();
    65176517             ++it)
    65186518        {
     
    65246524                setModified(IsModified_MachineData);
    65256525                mHWData.backup();
    6526                 mHWData->mPciDeviceAssignments.remove(pAttach);
     6526                mHWData->mPCIDeviceAssignments.remove(pAttach);
    65276527                fRemoved = true;
    65286528                break;
     
    65426542        rc = this->COMGETTER(Id)(mid.asOutParam());
    65436543        Assert(SUCCEEDED(rc));
    6544         fireHostPciDevicePlugEvent(es, mid.raw(), false /* unplugged */, true /* success */, pAttach, NULL);
     6544        fireHostPCIDevicePlugEvent(es, mid.raw(), false /* unplugged */, true /* success */, pAttach, NULL);
    65456545    }
    65466546
     
    65516551}
    65526552
    6553 STDMETHODIMP Machine::COMGETTER(PciDeviceAssignments)(ComSafeArrayOut(IPciDeviceAttachment *, aAssignments))
     6553STDMETHODIMP Machine::COMGETTER(PCIDeviceAssignments)(ComSafeArrayOut(IPCIDeviceAttachment *, aAssignments))
    65546554{
    65556555    CheckComArgOutSafeArrayPointerValid(aAssignments);
     
    65606560    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    65616561
    6562     SafeIfaceArray<IPciDeviceAttachment> assignments(mHWData->mPciDeviceAssignments);
     6562    SafeIfaceArray<IPCIDeviceAttachment> assignments(mHWData->mPCIDeviceAssignments);
    65636563    assignments.detachTo(ComSafeArrayOutArg(aAssignments));
    65646564
     
    72987298
    72997299    /* attach launch data to the machine */
    7300     Assert(mData->mSession.mPid == NIL_RTPROCESS);
     7300    Assert(mData->mSession.mPID == NIL_RTPROCESS);
    73017301    mData->mSession.mRemoteControls.push_back(aControl);
    73027302    mData->mSession.mProgress = aProgress;
    7303     mData->mSession.mPid = pid;
     7303    mData->mSession.mPID = pid;
    73047304    mData->mSession.mState = SessionState_Spawning;
    73057305    mData->mSession.mType = strType;
     
    74007400        if (aPID != NULL)
    74017401        {
    7402             AssertReturn(mData->mSession.mPid != NIL_RTPROCESS, false);
    7403             *aPID = mData->mSession.mPid;
     7402            AssertReturn(mData->mSession.mPID != NIL_RTPROCESS, false);
     7403            *aPID = mData->mSession.mPID;
    74047404        }
    74057405#endif
     
    74567456
    74577457    /* PID not yet initialized, skip check. */
    7458     if (mData->mSession.mPid == NIL_RTPROCESS)
     7458    if (mData->mSession.mPID == NIL_RTPROCESS)
    74597459        return false;
    74607460
    74617461    RTPROCSTATUS status;
    7462     int vrc = ::RTProcWait(mData->mSession.mPid, RTPROCWAIT_FLAGS_NOBLOCK,
     7462    int vrc = ::RTProcWait(mData->mSession.mPID, RTPROCWAIT_FLAGS_NOBLOCK,
    74637463                           &status);
    74647464
     
    75087508        }
    75097509
    7510         mParent->addProcessToReap(mData->mSession.mPid);
    7511         mData->mSession.mPid = NIL_RTPROCESS;
     7510        mParent->addProcessToReap(mData->mSession.mPID);
     7511        mData->mSession.mPID = NIL_RTPROCESS;
    75127512
    75137513        mParent->onSessionStateChange(mData->mUuid, SessionState_Unlocked);
     
    84208420        mHWData->mAccelerate2DVideoEnabled = data.fAccelerate2DVideo;
    84218421        mHWData->mFirmwareType = data.firmwareType;
    8422         mHWData->mPointingHidType = data.pointingHidType;
    8423         mHWData->mKeyboardHidType = data.keyboardHidType;
     8422        mHWData->mPointingHIDType = data.pointingHIDType;
     8423        mHWData->mKeyboardHIDType = data.keyboardHIDType;
    84248424        mHWData->mChipsetType = data.chipsetType;
    84258425        mHWData->mEmulatedUSBCardReaderEnabled = data.fEmulatedUSBCardReader;
    8426         mHWData->mHpetEnabled = data.fHpetEnabled;
     8426        mHWData->mHPETEnabled = data.fHPETEnabled;
    84278427
    84288428        /* VRDEServer */
     
    85348534
    85358535        // IO settings
    8536         mHWData->mIoCacheEnabled = data.ioSettings.fIoCacheEnabled;
    8537         mHWData->mIoCacheSize = data.ioSettings.ulIoCacheSize;
     8536        mHWData->mIOCacheEnabled = data.ioSettings.fIOCacheEnabled;
     8537        mHWData->mIOCacheSize = data.ioSettings.ulIOCacheSize;
    85388538
    85398539        // Host PCI devices
    8540         for (settings::HostPciDeviceAttachmentList::const_iterator it = data.pciAttachments.begin();
     8540        for (settings::HostPCIDeviceAttachmentList::const_iterator it = data.pciAttachments.begin();
    85418541             it != data.pciAttachments.end();
    85428542             ++it)
    85438543        {
    8544             const settings::HostPciDeviceAttachment &hpda = *it;
    8545             ComObjPtr<PciDeviceAttachment> pda;
     8544            const settings::HostPCIDeviceAttachment &hpda = *it;
     8545            ComObjPtr<PCIDeviceAttachment> pda;
    85468546
    85478547            pda.createObject();
    85488548            pda->loadSettings(this, hpda);
    8549             mHWData->mPciDeviceAssignments.push_back(pda);
     8549            mHWData->mPCIDeviceAssignments.push_back(pda);
    85508550        }
    85518551
     
    95949594
    95959595        // HID
    9596         data.pointingHidType = mHWData->mPointingHidType;
    9597         data.keyboardHidType = mHWData->mKeyboardHidType;
     9596        data.pointingHIDType = mHWData->mPointingHIDType;
     9597        data.keyboardHIDType = mHWData->mKeyboardHIDType;
    95989598
    95999599        // chipset
     
    96039603
    96049604        // HPET
    9605         data.fHpetEnabled = !!mHWData->mHpetEnabled;
     9605        data.fHPETEnabled = !!mHWData->mHPETEnabled;
    96069606
    96079607        // boot order
     
    97109710
    97119711        // IO settings
    9712         data.ioSettings.fIoCacheEnabled = !!mHWData->mIoCacheEnabled;
    9713         data.ioSettings.ulIoCacheSize = mHWData->mIoCacheSize;
     9712        data.ioSettings.fIOCacheEnabled = !!mHWData->mIOCacheEnabled;
     9713        data.ioSettings.ulIOCacheSize = mHWData->mIOCacheSize;
    97149714
    97159715        /* BandwidthControl (required) */
     
    97189718
    97199719        /* Host PCI devices */
    9720         for (HWData::PciDeviceAssignmentList::const_iterator it = mHWData->mPciDeviceAssignments.begin();
    9721              it != mHWData->mPciDeviceAssignments.end();
     9720        for (HWData::PCIDeviceAssignmentList::const_iterator it = mHWData->mPCIDeviceAssignments.begin();
     9721             it != mHWData->mPCIDeviceAssignments.end();
    97229722             ++it)
    97239723        {
    9724             ComObjPtr<PciDeviceAttachment> pda = *it;
    9725             settings::HostPciDeviceAttachment hpda;
     9724            ComObjPtr<PCIDeviceAttachment> pda = *it;
     9725            settings::HostPCIDeviceAttachment hpda;
    97269726
    97279727            rc = pda->saveSettings(hpda);
     
    1170911709         * need to queue the PID to reap the process (and avoid zombies on
    1171011710         * Linux). */
    11711         Assert(mData->mSession.mPid != NIL_RTPROCESS);
    11712         mParent->addProcessToReap(mData->mSession.mPid);
    11713     }
    11714 
    11715     mData->mSession.mPid = NIL_RTPROCESS;
     11711        Assert(mData->mSession.mPID != NIL_RTPROCESS);
     11712        mParent->addProcessToReap(mData->mSession.mPID);
     11713    }
     11714
     11715    mData->mSession.mPID = NIL_RTPROCESS;
    1171611716
    1171711717    if (aReason == Uninit::Unexpected)
     
    1195911959         * object. Doing it earlier wouldn't be safe. */
    1196011960        registerMetrics(mParent->performanceCollector(), mPeer,
    11961                         mData->mSession.mPid);
     11961                        mData->mSession.mPID);
    1196211962#endif /* VBOX_WITH_RESOURCE_USAGE_API */
    1196311963    }
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r42538 r42551  
    19471947}
    19481948
    1949 STDMETHODIMP Medium::SetIDs(BOOL aSetImageId,
     1949STDMETHODIMP Medium::SetIds(BOOL aSetImageId,
    19501950                            IN_BSTR aImageId,
    19511951                            BOOL aSetParentId,
  • trunk/src/VBox/Main/src-server/NATEngineImpl.cpp

    r35638 r42551  
    55
    66/*
    7  * Copyright (C) 2010 Oracle Corporation
     7 * Copyright (C) 2010-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    6060    Log(("init that:%p this:%p\n", aThat, this));
    6161
    62     AutoCaller thatCaller (aThat);
     62    AutoCaller thatCaller(aThat);
    6363    AssertComRCReturnRC(thatCaller.rc());
    6464
     
    7979}
    8080
    81 HRESULT NATEngine::initCopy (Machine *aParent, INetworkAdapter *aAdapter, NATEngine *aThat)
     81HRESULT NATEngine::initCopy(Machine *aParent, INetworkAdapter *aAdapter, NATEngine *aThat)
    8282{
    8383    AutoInitSpan autoInitSpan(this);
     
    8686    Log(("initCopy that:%p this:%p\n", aThat, this));
    8787
    88     AutoCaller thatCaller (aThat);
     88    AutoCaller thatCaller(aThat);
    8989    AssertComRCReturnRC(thatCaller.rc());
    9090
     
    133133{
    134134    AutoCaller autoCaller(this);
    135     AssertComRCReturn (autoCaller.rc(), false);
     135    AssertComRCReturn(autoCaller.rc(), false);
    136136
    137137    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     
    151151{
    152152    AutoCaller autoCaller(this);
    153     AssertComRCReturnVoid (autoCaller.rc());
     153    AssertComRCReturnVoid(autoCaller.rc());
    154154
    155155    /* sanity too */
    156     AutoCaller peerCaller (mPeer);
    157     AssertComRCReturnVoid (peerCaller.rc());
     156    AutoCaller peerCaller(mPeer);
     157    AssertComRCReturnVoid(peerCaller.rc());
    158158
    159159    /* lock both for writing since we modify both (mPeer is "master" so locked
     
    165165        if (mPeer)
    166166        {
    167             mPeer->mData.attach (mData);
     167            mPeer->mData.attach(mData);
    168168            mPeer->mNATRules.clear();
    169169            NATRuleMap::iterator it;
     
    358358    mData->mTcpSnd = data.u32TcpSnd;
    359359    /* TFTP */
    360     mData->mTftpPrefix = data.strTftpPrefix;
    361     mData->mTftpBootFile = data.strTftpBootFile;
    362     mData->mTftpNextServer = data.strTftpNextServer;
     360    mData->mTFTPPrefix = data.strTFTPPrefix;
     361    mData->mTFTPBootFile = data.strTFTPBootFile;
     362    mData->mTFTPNextServer = data.strTFTPNextServer;
    363363    /* DNS */
    364     mData->mDnsPassDomain = data.fDnsPassDomain;
    365     mData->mDnsProxy = data.fDnsProxy;
    366     mData->mDnsUseHostResolver = data.fDnsUseHostResolver;
     364    mData->mDNSPassDomain = data.fDNSPassDomain;
     365    mData->mDNSProxy = data.fDNSProxy;
     366    mData->mDNSUseHostResolver = data.fDNSUseHostResolver;
    367367    /* Alias */
    368368    mData->mAliasMode  = (data.fAliasUseSamePorts ? NATAliasMode_AliasUseSamePorts : 0);
     
    396396    data.u32TcpSnd = mData->mTcpSnd;
    397397    /* TFTP */
    398     data.strTftpPrefix = mData->mTftpPrefix;
    399     data.strTftpBootFile = mData->mTftpBootFile;
    400     data.strTftpNextServer = mData->mTftpNextServer;
     398    data.strTFTPPrefix = mData->mTFTPPrefix;
     399    data.strTFTPBootFile = mData->mTFTPBootFile;
     400    data.strTFTPNextServer = mData->mTFTPNextServer;
    401401    /* DNS */
    402     data.fDnsPassDomain = !!mData->mDnsPassDomain;
    403     data.fDnsProxy = !!mData->mDnsProxy;
    404     data.fDnsUseHostResolver = !!mData->mDnsUseHostResolver;
     402    data.fDNSPassDomain = !!mData->mDNSPassDomain;
     403    data.fDNSProxy = !!mData->mDNSProxy;
     404    data.fDNSUseHostResolver = !!mData->mDNSUseHostResolver;
    405405    /* Alias */
    406406    data.fAliasLog = !!(mData->mAliasMode & NATAliasMode_AliasLog);
     
    420420{
    421421    AutoCaller autoCaller(this);
    422     AssertComRCReturnRC (autoCaller.rc());
     422    AssertComRCReturnRC(autoCaller.rc());
    423423    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    424424    if (Bstr(mData->mNetwork) != aNetwork)
     
    449449
    450450STDMETHODIMP
    451 NATEngine::COMSETTER(HostIP) (IN_BSTR aBindIP)
    452 {
    453     AutoCaller autoCaller(this);
    454     AssertComRCReturnRC (autoCaller.rc());
     451NATEngine::COMSETTER(HostIP)(IN_BSTR aBindIP)
     452{
     453    AutoCaller autoCaller(this);
     454    AssertComRCReturnRC(autoCaller.rc());
    455455    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    456456    if (Bstr(mData->mBindIP) != aBindIP)
     
    463463    return S_OK;
    464464}
    465 STDMETHODIMP NATEngine::COMGETTER(HostIP) (BSTR *aBindIP)
     465STDMETHODIMP NATEngine::COMGETTER(HostIP)(BSTR *aBindIP)
    466466{
    467467    AutoCaller autoCaller(this);
     
    476476
    477477STDMETHODIMP
    478 NATEngine::COMSETTER(TftpPrefix)(IN_BSTR aTftpPrefix)
    479 {
    480     AutoCaller autoCaller(this);
    481     AssertComRCReturnRC (autoCaller.rc());
    482     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    483     if (Bstr(mData->mTftpPrefix) != aTftpPrefix)
    484     {
    485         mData.backup();
    486         mData->mTftpPrefix = aTftpPrefix;
    487         mParent->setModified(Machine::IsModified_NetworkAdapters);
    488         m_fModified = true;
    489     }
    490     return S_OK;
    491 }
    492 
    493 STDMETHODIMP
    494 NATEngine::COMGETTER(TftpPrefix)(BSTR *aTftpPrefix)
    495 {
    496     AutoCaller autoCaller(this);
    497     AssertComRCReturnRC(autoCaller.rc());
    498 
    499     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    500     if (!mData->mTftpPrefix.isEmpty())
    501     {
    502         mData->mTftpPrefix.cloneTo(aTftpPrefix);
    503         Log(("Getter (this:%p) TftpPrefix: %s\n", this, mData->mTftpPrefix.c_str()));
    504     }
    505     return S_OK;
    506 }
    507 
    508 STDMETHODIMP
    509 NATEngine::COMSETTER(TftpBootFile)(IN_BSTR aTftpBootFile)
    510 {
    511     AutoCaller autoCaller(this);
    512     AssertComRCReturnRC (autoCaller.rc());
    513     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    514     if (Bstr(mData->mTftpBootFile) != aTftpBootFile)
    515     {
    516         mData.backup();
    517         mData->mTftpBootFile = aTftpBootFile;
    518         mParent->setModified(Machine::IsModified_NetworkAdapters);
    519         m_fModified = true;
    520     }
    521     return S_OK;
    522 }
    523 
    524 STDMETHODIMP
    525 NATEngine::COMGETTER(TftpBootFile)(BSTR *aTftpBootFile)
    526 {
    527     AutoCaller autoCaller(this);
    528     AssertComRCReturnRC(autoCaller.rc());
    529 
    530     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    531     if (!mData->mTftpBootFile.isEmpty())
    532     {
    533         mData->mTftpBootFile.cloneTo(aTftpBootFile);
    534         Log(("Getter (this:%p) BootFile: %s\n", this, mData->mTftpBootFile.c_str()));
    535     }
    536     return S_OK;
    537 }
    538 
    539 STDMETHODIMP
    540 NATEngine::COMSETTER(TftpNextServer)(IN_BSTR aTftpNextServer)
    541 {
    542     AutoCaller autoCaller(this);
    543     AssertComRCReturnRC (autoCaller.rc());
    544     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    545     if (Bstr(mData->mTftpNextServer) != aTftpNextServer)
    546     {
    547         mData.backup();
    548         mData->mTftpNextServer = aTftpNextServer;
    549         mParent->setModified(Machine::IsModified_NetworkAdapters);
    550         m_fModified = true;
    551     }
    552     return S_OK;
    553 }
    554 
    555 STDMETHODIMP
    556 NATEngine::COMGETTER(TftpNextServer)(BSTR *aTftpNextServer)
    557 {
    558     AutoCaller autoCaller(this);
    559     AssertComRCReturnRC(autoCaller.rc());
    560 
    561     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    562     if (!mData->mTftpNextServer.isEmpty())
    563     {
    564         mData->mTftpNextServer.cloneTo(aTftpNextServer);
    565         Log(("Getter (this:%p) NextServer: %s\n", this, mData->mTftpNextServer.c_str()));
     478NATEngine::COMSETTER(TFTPPrefix)(IN_BSTR aTFTPPrefix)
     479{
     480    AutoCaller autoCaller(this);
     481    AssertComRCReturnRC(autoCaller.rc());
     482    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     483    if (Bstr(mData->mTFTPPrefix) != aTFTPPrefix)
     484    {
     485        mData.backup();
     486        mData->mTFTPPrefix = aTFTPPrefix;
     487        mParent->setModified(Machine::IsModified_NetworkAdapters);
     488        m_fModified = true;
     489    }
     490    return S_OK;
     491}
     492
     493STDMETHODIMP
     494NATEngine::COMGETTER(TFTPPrefix)(BSTR *aTFTPPrefix)
     495{
     496    AutoCaller autoCaller(this);
     497    AssertComRCReturnRC(autoCaller.rc());
     498
     499    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     500    if (!mData->mTFTPPrefix.isEmpty())
     501    {
     502        mData->mTFTPPrefix.cloneTo(aTFTPPrefix);
     503        Log(("Getter (this:%p) TFTPPrefix: %s\n", this, mData->mTFTPPrefix.c_str()));
     504    }
     505    return S_OK;
     506}
     507
     508STDMETHODIMP
     509NATEngine::COMSETTER(TFTPBootFile)(IN_BSTR aTFTPBootFile)
     510{
     511    AutoCaller autoCaller(this);
     512    AssertComRCReturnRC(autoCaller.rc());
     513    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     514    if (Bstr(mData->mTFTPBootFile) != aTFTPBootFile)
     515    {
     516        mData.backup();
     517        mData->mTFTPBootFile = aTFTPBootFile;
     518        mParent->setModified(Machine::IsModified_NetworkAdapters);
     519        m_fModified = true;
     520    }
     521    return S_OK;
     522}
     523
     524STDMETHODIMP
     525NATEngine::COMGETTER(TFTPBootFile)(BSTR *aTFTPBootFile)
     526{
     527    AutoCaller autoCaller(this);
     528    AssertComRCReturnRC(autoCaller.rc());
     529
     530    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     531    if (!mData->mTFTPBootFile.isEmpty())
     532    {
     533        mData->mTFTPBootFile.cloneTo(aTFTPBootFile);
     534        Log(("Getter (this:%p) BootFile: %s\n", this, mData->mTFTPBootFile.c_str()));
     535    }
     536    return S_OK;
     537}
     538
     539STDMETHODIMP
     540NATEngine::COMSETTER(TFTPNextServer)(IN_BSTR aTFTPNextServer)
     541{
     542    AutoCaller autoCaller(this);
     543    AssertComRCReturnRC(autoCaller.rc());
     544    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     545    if (Bstr(mData->mTFTPNextServer) != aTFTPNextServer)
     546    {
     547        mData.backup();
     548        mData->mTFTPNextServer = aTFTPNextServer;
     549        mParent->setModified(Machine::IsModified_NetworkAdapters);
     550        m_fModified = true;
     551    }
     552    return S_OK;
     553}
     554
     555STDMETHODIMP
     556NATEngine::COMGETTER(TFTPNextServer)(BSTR *aTFTPNextServer)
     557{
     558    AutoCaller autoCaller(this);
     559    AssertComRCReturnRC(autoCaller.rc());
     560
     561    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     562    if (!mData->mTFTPNextServer.isEmpty())
     563    {
     564        mData->mTFTPNextServer.cloneTo(aTFTPNextServer);
     565        Log(("Getter (this:%p) NextServer: %s\n", this, mData->mTFTPNextServer.c_str()));
    566566    }
    567567    return S_OK;
     
    569569/* DNS */
    570570STDMETHODIMP
    571 NATEngine::COMSETTER(DnsPassDomain) (BOOL aDnsPassDomain)
    572 {
    573     AutoCaller autoCaller(this);
    574     AssertComRCReturnRC (autoCaller.rc());
    575     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    576 
    577     if (mData->mDnsPassDomain != aDnsPassDomain)
    578     {
    579         mData.backup();
    580         mData->mDnsPassDomain = aDnsPassDomain;
    581         mParent->setModified(Machine::IsModified_NetworkAdapters);
    582         m_fModified = true;
    583     }
    584     return S_OK;
    585 }
    586 STDMETHODIMP
    587 NATEngine::COMGETTER(DnsPassDomain)(BOOL *aDnsPassDomain)
    588 {
    589     AutoCaller autoCaller(this);
    590     AssertComRCReturnRC(autoCaller.rc());
    591 
    592     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    593     *aDnsPassDomain = mData->mDnsPassDomain;
    594     return S_OK;
    595 }
    596 STDMETHODIMP
    597 NATEngine::COMSETTER(DnsProxy)(BOOL aDnsProxy)
    598 {
    599     AutoCaller autoCaller(this);
    600     AssertComRCReturnRC (autoCaller.rc());
    601     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    602 
    603     if (mData->mDnsProxy != aDnsProxy)
    604     {
    605         mData.backup();
    606         mData->mDnsProxy = aDnsProxy;
    607         mParent->setModified(Machine::IsModified_NetworkAdapters);
    608         m_fModified = true;
    609     }
    610     return S_OK;
    611 }
    612 STDMETHODIMP
    613 NATEngine::COMGETTER(DnsProxy)(BOOL *aDnsProxy)
    614 {
    615     AutoCaller autoCaller(this);
    616     AssertComRCReturnRC(autoCaller.rc());
    617 
    618     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    619     *aDnsProxy = mData->mDnsProxy;
    620     return S_OK;
    621 }
    622 STDMETHODIMP
    623 NATEngine::COMGETTER(DnsUseHostResolver)(BOOL *aDnsUseHostResolver)
    624 {
    625     AutoCaller autoCaller(this);
    626     AssertComRCReturnRC (autoCaller.rc());
    627     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    628     *aDnsUseHostResolver = mData->mDnsUseHostResolver;
    629     return S_OK;
    630 }
    631 STDMETHODIMP
    632 NATEngine::COMSETTER(DnsUseHostResolver)(BOOL aDnsUseHostResolver)
    633 {
    634     AutoCaller autoCaller(this);
    635     AssertComRCReturnRC(autoCaller.rc());
    636 
    637     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    638 
    639     if (mData->mDnsUseHostResolver != aDnsUseHostResolver)
    640     {
    641         mData.backup();
    642         mData->mDnsUseHostResolver = aDnsUseHostResolver;
    643         mParent->setModified(Machine::IsModified_NetworkAdapters);
    644         m_fModified = true;
    645     }
    646     return S_OK;
    647 }
    648 
    649 STDMETHODIMP NATEngine::COMSETTER(AliasMode) (ULONG aAliasMode)
     571NATEngine::COMSETTER(DNSPassDomain) (BOOL aDNSPassDomain)
     572{
     573    AutoCaller autoCaller(this);
     574    AssertComRCReturnRC(autoCaller.rc());
     575    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     576
     577    if (mData->mDNSPassDomain != aDNSPassDomain)
     578    {
     579        mData.backup();
     580        mData->mDNSPassDomain = aDNSPassDomain;
     581        mParent->setModified(Machine::IsModified_NetworkAdapters);
     582        m_fModified = true;
     583    }
     584    return S_OK;
     585}
     586STDMETHODIMP
     587NATEngine::COMGETTER(DNSPassDomain)(BOOL *aDNSPassDomain)
     588{
     589    AutoCaller autoCaller(this);
     590    AssertComRCReturnRC(autoCaller.rc());
     591
     592    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     593    *aDNSPassDomain = mData->mDNSPassDomain;
     594    return S_OK;
     595}
     596STDMETHODIMP
     597NATEngine::COMSETTER(DNSProxy)(BOOL aDNSProxy)
     598{
     599    AutoCaller autoCaller(this);
     600    AssertComRCReturnRC(autoCaller.rc());
     601    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     602
     603    if (mData->mDNSProxy != aDNSProxy)
     604    {
     605        mData.backup();
     606        mData->mDNSProxy = aDNSProxy;
     607        mParent->setModified(Machine::IsModified_NetworkAdapters);
     608        m_fModified = true;
     609    }
     610    return S_OK;
     611}
     612STDMETHODIMP
     613NATEngine::COMGETTER(DNSProxy)(BOOL *aDNSProxy)
     614{
     615    AutoCaller autoCaller(this);
     616    AssertComRCReturnRC(autoCaller.rc());
     617
     618    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     619    *aDNSProxy = mData->mDNSProxy;
     620    return S_OK;
     621}
     622STDMETHODIMP
     623NATEngine::COMGETTER(DNSUseHostResolver)(BOOL *aDNSUseHostResolver)
     624{
     625    AutoCaller autoCaller(this);
     626    AssertComRCReturnRC(autoCaller.rc());
     627    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     628    *aDNSUseHostResolver = mData->mDNSUseHostResolver;
     629    return S_OK;
     630}
     631STDMETHODIMP
     632NATEngine::COMSETTER(DNSUseHostResolver)(BOOL aDNSUseHostResolver)
     633{
     634    AutoCaller autoCaller(this);
     635    AssertComRCReturnRC(autoCaller.rc());
     636
     637    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     638
     639    if (mData->mDNSUseHostResolver != aDNSUseHostResolver)
     640    {
     641        mData.backup();
     642        mData->mDNSUseHostResolver = aDNSUseHostResolver;
     643        mParent->setModified(Machine::IsModified_NetworkAdapters);
     644        m_fModified = true;
     645    }
     646    return S_OK;
     647}
     648
     649STDMETHODIMP NATEngine::COMSETTER(AliasMode)(ULONG aAliasMode)
    650650{
    651651    AutoCaller autoCaller(this);
     
    664664}
    665665
    666 STDMETHODIMP NATEngine::COMGETTER(AliasMode) (ULONG *aAliasMode)
    667 {
    668     AutoCaller autoCaller(this);
    669     AssertComRCReturnRC (autoCaller.rc());
     666STDMETHODIMP NATEngine::COMGETTER(AliasMode)(ULONG *aAliasMode)
     667{
     668    AutoCaller autoCaller(this);
     669    AssertComRCReturnRC(autoCaller.rc());
    670670    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    671671    *aAliasMode = mData->mAliasMode;
  • trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp

    r40536 r42551  
    11/* $Id$ */
    22/** @file
    3  * Implementation of INetworkAdaptor in VBoxSVC.
     3 * Implementation of INetworkAdapter in VBoxSVC.
    44 */
    55
    66/*
    7  * Copyright (C) 2006-2011 Oracle Corporation
     7 * Copyright (C) 2006-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    956956}
    957957
    958 STDMETHODIMP NetworkAdapter::COMGETTER(NatDriver)(INATEngine **aNatDriver)
    959 {
    960     CheckComArgOutPointerValid(aNatDriver);
    961 
    962     AutoCaller autoCaller(this);
    963     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    964 
    965     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    966 
    967     mNATEngine.queryInterfaceTo(aNatDriver);
     958STDMETHODIMP NetworkAdapter::COMGETTER(NATEngine)(INATEngine **aNATEngine)
     959{
     960    CheckComArgOutPointerValid(aNATEngine);
     961
     962    AutoCaller autoCaller(this);
     963    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     964
     965    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     966
     967    mNATEngine.queryInterfaceTo(aNATEngine);
    968968
    969969    return S_OK;
  • trunk/src/VBox/Main/src-server/USBControllerImpl.cpp

    r41520 r42551  
    308308}
    309309
    310 STDMETHODIMP USBController::COMGETTER(EnabledEhci)(BOOL *aEnabled)
     310STDMETHODIMP USBController::COMGETTER(EnabledEHCI)(BOOL *aEnabled)
    311311{
    312312    CheckComArgOutPointerValid(aEnabled);
     
    322322}
    323323
    324 STDMETHODIMP USBController::COMSETTER(EnabledEhci)(BOOL aEnabled)
     324STDMETHODIMP USBController::COMSETTER(EnabledEHCI)(BOOL aEnabled)
    325325{
    326326    LogFlowThisFunc(("aEnabled=%RTbool\n", aEnabled));
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