VirtualBox

Changeset 24250 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Nov 2, 2009 1:00:58 PM (15 years ago)
Author:
vboxsync
Message:

StorageController: added support for Instance number

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r23879 r24250  
    443443                                          const char *pszFormat, bool fPassthrough);
    444444    const char *controllerTypeToDev(StorageControllerType_T enmCtrlType);
     445    void controllerDevToBool(const char *pszCtrlDev, bool *afBool);
    445446    HRESULT convertBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun);
    446447    HRESULT doMediumChange(IMediumAttachment *aMediumAttachment);
  • trunk/src/VBox/Main/include/MachineImpl.h

    r24196 r24250  
    617617    STDMETHOD(RemoveStorageController(IN_BSTR aName));
    618618    STDMETHOD(GetStorageControllerByName(IN_BSTR aName, IStorageController **storageController));
     619    STDMETHOD(GetStorageControllerByInstance(ULONG aInstance, IStorageController **storageController));
    619620    STDMETHOD(COMGETTER(FirmwareType)) (FirmwareType_T *aFirmware);
    620621    STDMETHOD(COMSETTER(FirmwareType)) (FirmwareType_T  aFirmware);
  • trunk/src/VBox/Main/include/StorageControllerImpl.h

    r23223 r24250  
    4444        Data() : mStorageBus (StorageBus_IDE),
    4545                 mStorageControllerType (StorageControllerType_PIIX4),
     46                 mInstance (0),
    4647                 mPortCount (2),
    4748                 mPortIde0Master (0),
     
    6869        /** Type of the Storage controller. */
    6970        StorageControllerType_T mStorageControllerType;
     71        /** Instance number of the storage controller. */
     72        ULONG mInstance;
    7073        /** Number of usable ports. */
    7174        ULONG mPortCount;
     
    104107    HRESULT init(Machine *aParent,
    105108                 const Utf8Str &aName,
    106                  StorageBus_T aBus);
     109                 StorageBus_T aBus,
     110                 ULONG aInstance);
    107111    HRESULT init(Machine *aParent,
    108112                 StorageController *aThat,
     
    134138    StorageControllerType_T controllerType() const { return mData->mStorageControllerType; }
    135139    StorageBus_T storageBus() const { return mData->mStorageBus; }
     140    ULONG instance() const { return mData->mInstance; }
    136141
    137142    bool isModified() { AutoWriteLock alock (this); return mData.isBackedUp(); }
     
    164169    /** Data. */
    165170    Backupable<Data> mData;
    166 
    167     /* Instance number of the device in the running VM. */
    168     ULONG mInstance;
    169171};
    170172
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