VirtualBox

Ignore:
Timestamp:
Oct 5, 2009 12:45:09 PM (15 years ago)
Author:
vboxsync
Message:

API/SystemProperties: new method to query the maximum instance count for each storage bus

File:
1 edited

Legend:

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

    r23257 r23560  
    469469}
    470470
     471STDMETHODIMP SystemProperties::GetMaxInstancesOfStorageBus(StorageBus_T aBus, ULONG *aMaxInstances)
     472{
     473    CheckComArgOutPointerValid(aMaxInstances);
     474
     475    AutoCaller autoCaller(this);
     476    CheckComRCReturnRC(autoCaller.rc());
     477
     478    /* no need to lock, this is const */
     479    switch (aBus)
     480    {
     481        case StorageBus_SATA:
     482        case StorageBus_SCSI:
     483        case StorageBus_IDE:
     484        case StorageBus_Floppy:
     485        {
     486            /** @todo raise the limits ASAP, per bus type */
     487            *aMaxInstances = 1;
     488            break;
     489        }
     490        default:
     491            AssertMsgFailed(("Invalid bus type %d\n", aBus));
     492    }
     493
     494    return S_OK;
     495}
     496
    471497STDMETHODIMP SystemProperties::COMGETTER(DefaultMachineFolder) (BSTR *aDefaultMachineFolder)
    472498{
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