VirtualBox

Changeset 16569 in vbox for trunk


Ignore:
Timestamp:
Feb 9, 2009 8:59:58 AM (16 years ago)
Author:
vboxsync
Message:

Main: API support for the CPU count contrains.

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

Legend:

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

    r16560 r16569  
    196196}
    197197
     198STDMETHODIMP SystemProperties::COMGETTER(MinGuestCPUCount)(ULONG *minCPUCount)
     199{
     200    if (!minCPUCount)
     201        return E_POINTER;
     202
     203    AutoCaller autoCaller (this);
     204    CheckComRCReturnRC (autoCaller.rc());
     205
     206    /* no need to lock, this is const */
     207    *minCPUCount = SchemaDefs::MinCPUCount;
     208
     209    return S_OK;
     210}
     211
     212STDMETHODIMP SystemProperties::COMGETTER(MaxGuestCPUCount)(ULONG *maxCPUCount)
     213{
     214    if (!maxCPUCount)
     215        return E_POINTER;
     216
     217    AutoCaller autoCaller (this);
     218    CheckComRCReturnRC (autoCaller.rc());
     219
     220    /* no need to lock, this is const */
     221    *maxCPUCount = 1; // SchemaDefs::MaxCPUCount;
     222
     223    return S_OK;
     224}
     225
    198226STDMETHODIMP SystemProperties::COMGETTER(MaxGuestMonitors)(ULONG *maxMonitors)
    199227{
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r16568 r16569  
    67766776     name="ISystemProperties"
    67776777     extends="$unknown"
    6778      uuid="604afeba-5963-4d12-a577-902ffb96352a"
     6778     uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
    67796779     wsmap="managed"
    67806780     >
     
    68026802    <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
    68036803      <desc>Maximum guest video memory in Megabytes.</desc>
     6804    </attribute>
     6805
     6806    <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
     6807      <desc>Minimum CPU count.</desc>
     6808    </attribute>
     6809
     6810    <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
     6811      <desc>Maximum CPU count.</desc>
    68046812    </attribute>
    68056813
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r15051 r16569  
    6969    STDMETHOD(COMGETTER(MinGuestVRAM) (ULONG *minVRAM));
    7070    STDMETHOD(COMGETTER(MaxGuestVRAM) (ULONG *maxVRAM));
     71    STDMETHOD(COMGETTER(MinGuestCPUCount) (ULONG *minCPUCount));
     72    STDMETHOD(COMGETTER(MaxGuestCPUCount) (ULONG *maxCPUCount));
    7173    STDMETHOD(COMGETTER(MaxGuestMonitors) (ULONG *maxMonitors));
    7274    STDMETHOD(COMGETTER(MaxVDISize) (ULONG64 *maxVDISize));
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