VirtualBox

Changeset 27537 in vbox


Ignore:
Timestamp:
Mar 19, 2010 2:04:54 PM (15 years ago)
Author:
vboxsync
Message:

Main: API consistency: method names start with lower case always; no camel case within acronyms in method names (Cpu -> CPU)

Location:
trunk/src/VBox
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r27255 r27537  
    255255
    256256    BOOL fSyntheticCpu;
    257     machine->GetCpuProperty(CpuPropertyType_Synthetic, &fSyntheticCpu);
     257    machine->GetCPUProperty(CPUPropertyType_Synthetic, &fSyntheticCpu);
    258258    if (details == VMINFO_MACHINEREADABLE)
    259259        RTPrintf("synthcpu=\"%s\"\n", fSyntheticCpu ? "on" : "off");
     
    273273        {
    274274            ULONG uEAX, uEBX, uECX, uEDX;
    275             rc = machine->GetCpuIdLeaf(uLeaf, &uEAX, &uEBX, &uECX, &uEDX);
     275            rc = machine->GetCPUIDLeaf(uLeaf, &uEAX, &uEBX, &uECX, &uEDX);
    276276            if (SUCCEEDED(rc))
    277277            {
     
    392392
    393393    BOOL PAEEnabled;
    394     machine->GetCpuProperty(CpuPropertyType_PAE, &PAEEnabled);
     394    machine->GetCPUProperty(CPUPropertyType_PAE, &PAEEnabled);
    395395    if (details == VMINFO_MACHINEREADABLE)
    396396        RTPrintf("pae=\"%s\"\n", PAEEnabled ? "on" : "off");
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r26517 r27537  
    454454            {
    455455                ULONG uEAX, uEBX, uECX, uEDX, cLeafs;
    456                 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, s_auCpuIdRanges[i], 0, &cLeafs, &uEBX, &uECX, &uEDX));
     456                CHECK_ERROR(Host, GetProcessorCPUIDLeaf(uCpuNo, s_auCpuIdRanges[i], 0, &cLeafs, &uEBX, &uECX, &uEDX));
    457457                if (cLeafs < s_auCpuIdRanges[i] || cLeafs > s_auCpuIdRanges[i+1])
    458458                    continue;
     
    460460                for (ULONG iLeaf = s_auCpuIdRanges[i]; iLeaf <= cLeafs; iLeaf++)
    461461                {
    462                     CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX));
     462                    CHECK_ERROR(Host, GetProcessorCPUIDLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX));
    463463                    RTPrintf("%08x  %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX);
    464464                }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r27519 r27537  
    379379            case MODIFYVM_PAE:
    380380            {
    381                 CHECK_ERROR(machine, SetCpuProperty(CpuPropertyType_PAE, ValueUnion.f));
     381                CHECK_ERROR(machine, SetCPUProperty(CPUPropertyType_PAE, ValueUnion.f));
    382382                break;
    383383            }
     
    385385            case MODIFYVM_SYNTHCPU:
    386386            {
    387                 CHECK_ERROR(machine, SetCpuProperty(CpuPropertyType_Synthetic, ValueUnion.f));
     387                CHECK_ERROR(machine, SetCPUProperty(CPUPropertyType_Synthetic, ValueUnion.f));
    388388                break;
    389389            }
     
    415415                    aValue[i] = ValueUnion.u32;
    416416                }
    417                 CHECK_ERROR(machine, SetCpuIdLeaf(id, aValue[0], aValue[1], aValue[2], aValue[3]));
     417                CHECK_ERROR(machine, SetCPUIDLeaf(id, aValue[0], aValue[1], aValue[2], aValue[3]));
    418418                break;
    419419            }
     
    421421            case MODIFYVM_DELCPUID:
    422422            {
    423                 CHECK_ERROR(machine, RemoveCpuIdLeaf(ValueUnion.u32));
     423                CHECK_ERROR(machine, RemoveCPUIDLeaf(ValueUnion.u32));
    424424                break;
    425425            }
     
    427427            case MODIFYVM_DELALLCPUID:
    428428            {
    429                 CHECK_ERROR(machine, RemoveAllCpuIdLeafs());
     429                CHECK_ERROR(machine, RemoveAllCPUIDLeaves());
    430430                break;
    431431            }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsSystem.cpp

    r26714 r27537  
    186186                         .GetProcessorFeature (KProcessorFeature_PAE);
    187187    mCbPae->setEnabled (fPAESupported);
    188     mCbPae->setChecked (aMachine.GetCpuProperty(KCpuPropertyType_PAE));
     188    mCbPae->setChecked (aMachine.GetCPUProperty(KCPUPropertyType_PAE));
    189189
    190190    /* VT-x/AMD-V */
     
    246246
    247247    /* PAE/NX */
    248     mMachine.SetCpuProperty(KCpuPropertyType_PAE, mCbPae->isChecked());
     248    mMachine.SetCPUProperty(KCPUPropertyType_PAE, mCbPae->isChecked());
    249249
    250250    /* VT-x/AMD-V */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp

    r27480 r27537  
    682682
    683683    // Turn on PAE, if recommended
    684     m_Machine.SetCpuProperty(KCpuPropertyType_PAE, type.GetRecommendedPae());
     684    m_Machine.SetCPUProperty(KCPUPropertyType_PAE, type.GetRecommendedPae());
    685685
    686686    // Set recommended firmware type
     
    692692    {
    693693        m_Machine.SetKeyboardHidType(KKeyboardHidType_USBKeyboard);
    694         m_Machine.SetPointingHidType(type.GetRecommendedUsbTablet()  ? 
     694        m_Machine.SetPointingHidType(type.GetRecommendedUsbTablet()  ?
    695695                                     KPointingHidType_USBTablet : KPointingHidType_USBMouse);
    696696        if (!usbController.isNull())
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r27461 r27537  
    330330    ComPtr<IGuestOSType> guestOSType;
    331331    hrc = virtualBox->GetGuestOSType(osTypeId, guestOSType.asOutParam());           H();
    332    
     332
    333333    Bstr guestTypeFamilyId;
    334334    hrc = guestOSType->COMGETTER(FamilyId)(guestTypeFamilyId.asOutParam());       H();
     
    370370        {
    371371            ULONG ulEax, ulEbx, ulEcx, ulEdx;
    372             hrc = pMachine->GetCpuIdLeaf(uLeaf, &ulEax, &ulEbx, &ulEcx, &ulEdx);
     372            hrc = pMachine->GetCPUIDLeaf(uLeaf, &ulEax, &ulEbx, &ulEcx, &ulEdx);
    373373            if (SUCCEEDED(hrc))
    374374            {
     
    497497    /* Physical Address Extension (PAE) */
    498498    BOOL fEnablePAE = false;
    499     hrc = pMachine->GetCpuProperty(CpuPropertyType_PAE, &fEnablePAE);               H();
     499    hrc = pMachine->GetCPUProperty(CPUPropertyType_PAE, &fEnablePAE);               H();
    500500    rc = CFGMR3InsertInteger(pRoot, "EnablePAE", fEnablePAE);                       RC_CHECK();
    501501
    502502    /* Synthetic CPU */
    503503    BOOL fSyntheticCpu = false;
    504     hrc = pMachine->GetCpuProperty(CpuPropertyType_Synthetic, &fSyntheticCpu);      H();
     504    hrc = pMachine->GetCPUProperty(CPUPropertyType_Synthetic, &fSyntheticCpu);      H();
    505505    rc = CFGMR3InsertInteger(pRoot, "SyntheticCpu", fSyntheticCpu);                 RC_CHECK();
    506506
  • trunk/src/VBox/Main/HostImpl.cpp

    r26753 r27537  
    940940 * @param   aValEDX             Where to return EDX.
    941941 */
    942 STDMETHODIMP Host::GetProcessorCpuIdLeaf(ULONG aCpuId, ULONG aLeaf, ULONG aSubLeaf,
     942STDMETHODIMP Host::GetProcessorCPUIDLeaf(ULONG aCpuId, ULONG aLeaf, ULONG aSubLeaf,
    943943                                         ULONG *aValEAX, ULONG *aValEBX, ULONG *aValECX, ULONG *aValEDX)
    944944{
  • trunk/src/VBox/Main/MachineImpl.cpp

    r27324 r27537  
    14231423}
    14241424
    1425 STDMETHODIMP Machine::GetCpuProperty(CpuPropertyType_T property, BOOL *aVal)
     1425STDMETHODIMP Machine::GetCPUProperty(CPUPropertyType_T property, BOOL *aVal)
    14261426{
    14271427    if (!aVal)
     
    14351435    switch(property)
    14361436    {
    1437     case CpuPropertyType_PAE:
     1437    case CPUPropertyType_PAE:
    14381438        *aVal = mHWData->mPAEEnabled;
    14391439        break;
    14401440
    1441     case CpuPropertyType_Synthetic:
     1441    case CPUPropertyType_Synthetic:
    14421442        *aVal = mHWData->mSyntheticCpu;
    14431443        break;
     
    14491449}
    14501450
    1451 STDMETHODIMP Machine::SetCpuProperty(CpuPropertyType_T property, BOOL aVal)
     1451STDMETHODIMP Machine::SetCPUProperty(CPUPropertyType_T property, BOOL aVal)
    14521452{
    14531453    AutoCaller autoCaller(this);
     
    14611461    switch(property)
    14621462    {
    1463     case CpuPropertyType_PAE:
     1463    case CPUPropertyType_PAE:
    14641464        setModified(IsModified_MachineData);
    14651465        mHWData.backup();
     
    14671467        break;
    14681468
    1469     case CpuPropertyType_Synthetic:
     1469    case CPUPropertyType_Synthetic:
    14701470        setModified(IsModified_MachineData);
    14711471        mHWData.backup();
     
    14791479}
    14801480
    1481 STDMETHODIMP Machine::GetCpuIdLeaf(ULONG aId, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx)
     1481STDMETHODIMP Machine::GetCPUIDLeaf(ULONG aId, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx)
    14821482{
    14831483    CheckComArgOutPointerValid(aValEax);
     
    15391539}
    15401540
    1541 STDMETHODIMP Machine::SetCpuIdLeaf(ULONG aId, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx)
     1541STDMETHODIMP Machine::SetCPUIDLeaf(ULONG aId, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx)
    15421542{
    15431543    AutoCaller autoCaller(this);
     
    16011601}
    16021602
    1603 STDMETHODIMP Machine::RemoveCpuIdLeaf(ULONG aId)
     1603STDMETHODIMP Machine::RemoveCPUIDLeaf(ULONG aId)
    16041604{
    16051605    AutoCaller autoCaller(this);
     
    16571657}
    16581658
    1659 STDMETHODIMP Machine::RemoveAllCpuIdLeafs()
     1659STDMETHODIMP Machine::RemoveAllCPUIDLeaves()
    16601660{
    16611661    AutoCaller autoCaller(this);
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r27532 r27537  
    807807
    808808  <enum
    809     name="CpuPropertyType"
    810     uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
     809    name="CPUPropertyType"
     810    uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
    811811  >
    812812    <desc>
    813813      Virtual CPU property type. This enumeration represents possible values of the
    814       IMachine get- and setCpuProperty methods.
     814      IMachine get- and setCPUProperty methods.
    815815    </desc>
    816816    <const name="Null"                  value="0">
     
    42674267  <interface
    42684268     name="IMachine" extends="$unknown"
    4269      uuid="8d8f6fbb-54c1-4604-b68e-17619d458611"
     4269     uuid="254f7fd0-a99b-4ea9-992f-794624e67882"
    42704270     wsmap="managed"
    42714271     >
     
    53715371    </method>
    53725372
    5373     <method name="getCpuProperty" const="yes">
     5373    <method name="getCPUProperty" const="yes">
    53745374      <desc>
    53755375        Returns the virtual CPU boolean value of the specified property.
     
    53805380
    53815381      </desc>
    5382       <param name="property" type="CpuPropertyType" dir="in">
     5382      <param name="property" type="CPUPropertyType" dir="in">
    53835383        <desc>
    53845384          Property type to query.
     
    53925392    </method>
    53935393
    5394     <method name="setCpuProperty">
     5394    <method name="setCPUProperty">
    53955395      <desc>
    53965396        Sets the virtual CPU boolean value of the specified property.
     
    54015401
    54025402      </desc>
    5403       <param name="property" type="CpuPropertyType" dir="in">
     5403      <param name="property" type="CPUPropertyType" dir="in">
    54045404        <desc>
    54055405          Property type to query.
     
    54135413    </method>
    54145414
    5415     <method name="getCpuIdLeaf" const="yes">
     5415    <method name="getCPUIDLeaf" const="yes">
    54165416      <desc>
    54175417        Returns the virtual CPU cpuid information for the specified leaf.
     
    54305430      <param name="id" type="unsigned long" dir="in">
    54315431        <desc>
    5432           Cpuid leaf index.
     5432          CPUID leaf index.
    54335433        </desc>
    54345434      </param>
    54355435      <param name="valEax" type="unsigned long" dir="out">
    54365436        <desc>
    5437           Cpuid leaf value for register eax.
     5437          CPUID leaf value for register eax.
    54385438        </desc>
    54395439      </param>
    54405440      <param name="valEbx" type="unsigned long" dir="out">
    54415441        <desc>
    5442           Cpuid leaf value for register ebx.
     5442          CPUID leaf value for register ebx.
    54435443        </desc>
    54445444      </param>
    54455445      <param name="valEcx" type="unsigned long" dir="out">
    54465446        <desc>
    5447           Cpuid leaf value for register ecx.
     5447          CPUID leaf value for register ecx.
    54485448        </desc>
    54495449      </param>
    54505450      <param name="valEdx" type="unsigned long" dir="out">
    54515451        <desc>
    5452           Cpuid leaf value for register edx.
    5453         </desc>
    5454       </param>
    5455     </method>
    5456 
    5457     <method name="setCpuIdLeaf" const="yes">
     5452          CPUID leaf value for register edx.
     5453        </desc>
     5454      </param>
     5455    </method>
     5456
     5457    <method name="setCPUIDLeaf" const="yes">
    54585458      <desc>
    54595459        Sets the virtual CPU cpuid information for the specified leaf. Note that these values
     
    54765476      <param name="id" type="unsigned long" dir="in">
    54775477        <desc>
    5478           Cpuid leaf index.
     5478          CPUID leaf index.
    54795479        </desc>
    54805480      </param>
    54815481      <param name="valEax" type="unsigned long" dir="in">
    54825482        <desc>
    5483           Cpuid leaf value for register eax.
     5483          CPUID leaf value for register eax.
    54845484        </desc>
    54855485      </param>
    54865486      <param name="valEbx" type="unsigned long" dir="in">
    54875487        <desc>
    5488           Cpuid leaf value for register ebx.
     5488          CPUID leaf value for register ebx.
    54895489        </desc>
    54905490      </param>
    54915491      <param name="valEcx" type="unsigned long" dir="in">
    54925492        <desc>
    5493           Cpuid leaf value for register ecx.
     5493          CPUID leaf value for register ecx.
    54945494        </desc>
    54955495      </param>
    54965496      <param name="valEdx" type="unsigned long" dir="in">
    54975497        <desc>
    5498           Cpuid leaf value for register edx.
    5499         </desc>
    5500       </param>
    5501     </method>
    5502 
    5503     <method name="removeCpuIdLeaf" const="yes">
     5498          CPUID leaf value for register edx.
     5499        </desc>
     5500      </param>
     5501    </method>
     5502
     5503    <method name="removeCPUIDLeaf" const="yes">
    55045504      <desc>
    55055505        Removes the virtual CPU cpuid leaf for the specified index
     
    55125512      <param name="id" type="unsigned long" dir="in">
    55135513        <desc>
    5514           Cpuid leaf index.
    5515         </desc>
    5516       </param>
    5517     </method>
    5518 
    5519     <method name="removeAllCpuIdLeafs" const="yes">
    5520       <desc>
    5521         Removes all the virtual CPU cpuid leafs
     5514          CPUID leaf index.
     5515        </desc>
     5516      </param>
     5517    </method>
     5518
     5519    <method name="removeAllCPUIDLeaves" const="yes">
     5520      <desc>
     5521        Removes all the virtual CPU cpuid leaves
    55225522      </desc>
    55235523    </method>
     
    60926092    </method>
    60936093
    6094     <method name="HotPlugCPU">
     6094    <method name="hotPlugCPU">
    60956095      <desc>
    60966096        Plugs a CPU into the machine.
     
    61036103    </method>
    61046104
    6105     <method name="HotUnplugCPU">
     6105    <method name="hotUnplugCPU">
    61066106      <desc>
    61076107        Removes a CPU from the machine.
     
    61146114    </method>
    61156115
    6116     <method name="GetCPUStatus">
     6116    <method name="getCPUStatus">
    61176117      <desc>
    61186118        Plugs a CPU into the machine.
     
    76847684    </method>
    76857685
    7686     <method name="getProcessorCpuIdLeaf">
     7686    <method name="getProcessorCPUIDLeaf">
    76877687      <desc>
    76887688        Returns the CPU cpuid information for the specified leaf.
     
    76997699      <param name="leaf" type="unsigned long" dir="in">
    77007700        <desc>
    7701           Cpuid leaf index (eax).
     7701          CPUID leaf index (eax).
    77027702        </desc>
    77037703      </param>
    77047704      <param name="subLeaf" type="unsigned long" dir="in">
    77057705        <desc>
    7706           Cpuid leaf sub index (ecx).  This currently only applies to cache
     7706          CPUID leaf sub index (ecx).  This currently only applies to cache
    77077707          information on Intel CPUs.  Use 0 if retriving values for
    7708           <link to="IMachine::setCpuIdLeaf"/>.
     7708          <link to="IMachine::setCPUIDLeaf"/>.
    77097709        </desc>
    77107710      </param>
    77117711      <param name="valEax" type="unsigned long" dir="out">
    77127712        <desc>
    7713           Cpuid leaf value for register eax.
     7713          CPUID leaf value for register eax.
    77147714        </desc>
    77157715      </param>
    77167716      <param name="valEbx" type="unsigned long" dir="out">
    77177717        <desc>
    7718           Cpuid leaf value for register ebx.
     7718          CPUID leaf value for register ebx.
    77197719        </desc>
    77207720      </param>
    77217721      <param name="valEcx" type="unsigned long" dir="out">
    77227722        <desc>
    7723           Cpuid leaf value for register ecx.
     7723          CPUID leaf value for register ecx.
    77247724        </desc>
    77257725      </param>
    77267726      <param name="valEdx" type="unsigned long" dir="out">
    77277727        <desc>
    7728           Cpuid leaf value for register edx.
     7728          CPUID leaf value for register edx.
    77297729        </desc>
    77307730      </param>
     
    1337213372  <interface
    1337313373    name="IStorageController" extends="$unknown"
    13374     uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
     13374    uuid="ce37b7a9-d895-4ee8-b9f8-9579bfc85813"
    1337513375    wsmap="managed"
    1337613376  >
     
    1345513455    </attribute>
    1345613456
    13457     <method name="GetIDEEmulationPort">
     13457    <method name="getIDEEmulationPort">
    1345813458      <desc>
    1345913459        Gets the corresponding port number which is emulated as an IDE device.
     
    1347213472    </method>
    1347313473
    13474     <method name="SetIDEEmulationPort">
     13474    <method name="setIDEEmulationPort">
    1347513475      <desc>
    1347613476        Sets the port number which is emulated as an IDE device.
  • trunk/src/VBox/Main/include/HostImpl.h

    r26044 r27537  
    7474    STDMETHOD(GetProcessorDescription)(ULONG cpuId, BSTR *description);
    7575    STDMETHOD(GetProcessorFeature) (ProcessorFeature_T feature, BOOL *supported);
    76     STDMETHOD(GetProcessorCpuIdLeaf)(ULONG aCpuId, ULONG aLeaf, ULONG aSubLeaf, ULONG *aValEAX, ULONG *aValEBX, ULONG *aValECX, ULONG *aValEDX);
     76    STDMETHOD(GetProcessorCPUIDLeaf)(ULONG aCpuId, ULONG aLeaf, ULONG aSubLeaf, ULONG *aValEAX, ULONG *aValEBX, ULONG *aValECX, ULONG *aValEDX);
    7777    STDMETHOD(COMGETTER(MemorySize))(ULONG *size);
    7878    STDMETHOD(COMGETTER(MemoryAvailable))(ULONG *available);
  • trunk/src/VBox/Main/include/MachineImpl.h

    r27324 r27537  
    467467    STDMETHOD(GetExtraData)(IN_BSTR aKey, BSTR *aValue);
    468468    STDMETHOD(SetExtraData)(IN_BSTR aKey, IN_BSTR aValue);
    469     STDMETHOD(GetCpuProperty)(CpuPropertyType_T property, BOOL *aVal);
    470     STDMETHOD(SetCpuProperty)(CpuPropertyType_T property, BOOL aVal);
    471     STDMETHOD(GetCpuIdLeaf)(ULONG id, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx);
    472     STDMETHOD(SetCpuIdLeaf)(ULONG id, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx);
    473     STDMETHOD(RemoveCpuIdLeaf)(ULONG id);
    474     STDMETHOD(RemoveAllCpuIdLeafs)();
     469    STDMETHOD(GetCPUProperty)(CPUPropertyType_T property, BOOL *aVal);
     470    STDMETHOD(SetCPUProperty)(CPUPropertyType_T property, BOOL aVal);
     471    STDMETHOD(GetCPUIDLeaf)(ULONG id, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx);
     472    STDMETHOD(SetCPUIDLeaf)(ULONG id, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx);
     473    STDMETHOD(RemoveCPUIDLeaf)(ULONG id);
     474    STDMETHOD(RemoveAllCPUIDLeaves)();
    475475    STDMETHOD(GetHWVirtExProperty)(HWVirtExPropertyType_T property, BOOL *aVal);
    476476    STDMETHOD(SetHWVirtExProperty)(HWVirtExPropertyType_T property, BOOL aVal);
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