VirtualBox

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


Ignore:
Timestamp:
Jul 25, 2013 7:12:24 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
87551
Message:

Main,Frontends: Second step of USB controller rework. There is one controller instance for every USB controller now. Adapt frontends and testsuite to work with the changed API

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

Legend:

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

    r47376 r47401  
    457457    STDMETHOD(COMGETTER(VRDEServer))(IVRDEServer **vrdeServer);
    458458    STDMETHOD(COMGETTER(AudioAdapter))(IAudioAdapter **audioAdapter);
    459     STDMETHOD(COMGETTER(USBController))(IUSBController * *aUSBController);
     459    STDMETHOD(COMGETTER(USBControllers))(ComSafeArrayOut(IUSBController *, aUSBControllers));
    460460    STDMETHOD(COMGETTER(USBDeviceFilters))(IUSBDeviceFilters * *aUSBDeviceFilters);
    461461    STDMETHOD(COMGETTER(SettingsFilePath))(BSTR *aFilePath);
     
    529529    STDMETHOD(COMGETTER(Icon))(ComSafeArrayOut(BYTE, aIcon));
    530530    STDMETHOD(COMSETTER(Icon))(ComSafeArrayIn(BYTE, aIcon));
     531    STDMETHOD(COMGETTER(USBProxyAvailable))(BOOL *aAvailable);
    531532
    532533    // IMachine methods
     
    593594    STDMETHOD(GetStorageControllerByInstance(ULONG aInstance, IStorageController **storageController));
    594595    STDMETHOD(SetStorageControllerBootable)(IN_BSTR aName, BOOL fBootable);
     596    STDMETHOD(AddUSBController)(IN_BSTR aName, StorageBus_T aConnectionType, IUSBController **controller);
     597    STDMETHOD(RemoveUSBController(IN_BSTR aName));
     598    STDMETHOD(GetUSBControllerByName(IN_BSTR aName, IUSBController **usbController));
     599    STDMETHOD(GetUSBControllerCountByType(USBControllerType_T aType, ULONG *aControllers));
    595600    STDMETHOD(QuerySavedGuestScreenInfo)(ULONG uScreenId, ULONG *puOriginX, ULONG *puOriginY, ULONG *puWidth, ULONG *puHeight, BOOL *pfEnabled);
    596601    STDMETHOD(QuerySavedThumbnailSize)(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
     
    886891    HRESULT getMediumAttachmentsOfController(CBSTR aName,
    887892                                             MediaData::AttachmentList &aAttachments);
     893
     894    HRESULT getUSBControllerByName(const Utf8Str &aName,
     895                                   ComObjPtr<USBController> &aUSBController,
     896                                   bool aSetError = false);
     897
     898    ULONG   getUSBControllerCountByType(USBControllerType_T enmType);
    888899
    889900    enum
     
    9981009    const ComObjPtr<ParallelPort>      mParallelPorts[SchemaDefs::ParallelPortCount];
    9991010    const ComObjPtr<AudioAdapter>      mAudioAdapter;
    1000     const ComObjPtr<USBController>     mUSBController;
    10011011    const ComObjPtr<USBDeviceFilters>  mUSBDeviceFilters;
    10021012    const ComObjPtr<BIOSSettings>      mBIOSSettings;
     1013    const ComObjPtr<BandwidthControl>  mBandwidthControl;
     1014
    10031015    typedef std::vector<ComObjPtr<NetworkAdapter> > NetworkAdapterVector;
    1004     NetworkAdapterVector            mNetworkAdapters;
    1005     const ComObjPtr<BandwidthControl> mBandwidthControl;
     1016    NetworkAdapterVector               mNetworkAdapters;
    10061017
    10071018    typedef std::list<ComObjPtr<StorageController> > StorageControllerList;
    1008     Backupable<StorageControllerList> mStorageControllers;
     1019    Backupable<StorageControllerList>  mStorageControllers;
     1020
     1021    typedef std::list<ComObjPtr<USBController> > USBControllerList;
     1022    Backupable<USBControllerList>      mUSBControllers;
    10091023
    10101024    uint64_t                        uRegistryNeedsSaving;
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r46367 r47401  
    109109    STDMETHOD(GetDeviceTypesForStorageBus)(StorageBus_T aBus, ComSafeArrayOut(DeviceType_T, aDeviceTypes));
    110110    STDMETHOD(GetDefaultIoCacheSettingForStorageController)(StorageControllerType_T aControllerType, BOOL *aEnabled);
     111    STDMETHOD(GetMaxInstancesOfUSBControllerType)(ChipsetType_T aChipset, USBControllerType_T aType, ULONG *aMaxInstances);
    111112
    112113    // public methods only for internal purposes
  • trunk/src/VBox/Main/include/USBControllerImpl.h

    r47376 r47401  
    5252
    5353    // public initializer/uninitializer for internal purposes only
    54     HRESULT init(Machine *aParent);
    55     HRESULT init(Machine *aParent, USBController *aThat);
     54    HRESULT init(Machine *aParent, const Utf8Str &aName, USBControllerType_T enmType);
     55    HRESULT init(Machine *aParent, USBController *aThat, bool fReshare = false);
    5656    HRESULT initCopy(Machine *aParent, USBController *aThat);
    5757    void uninit();
    5858
    5959    // IUSBController properties
    60     STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
    61     STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
    62     STDMETHOD(COMGETTER(EnabledEHCI))(BOOL *aEnabled);
    63     STDMETHOD(COMSETTER(EnabledEHCI))(BOOL aEnabled);
    64     STDMETHOD(COMGETTER(ProxyAvailable))(BOOL *aEnabled);
     60    STDMETHOD(COMGETTER(Name))(BSTR *aName);
     61    STDMETHOD(COMGETTER(Type))(USBControllerType_T *enmType);
    6562    STDMETHOD(COMGETTER(USBStandard))(USHORT *aUSBStandard);
    6663
    6764    // public methods only for internal purposes
    6865
    69     HRESULT loadSettings(const settings::USBController &data);
    70     HRESULT saveSettings(settings::USBController &data);
    71 
    7266    void rollback();
    7367    void commit();
    7468    void copyFrom(USBController *aThat);
     69    void unshare();
     70
     71    const Utf8Str &getName() const;
     72    USBControllerType_T getControllerType() const;
     73
     74    ComObjPtr<USBController> getPeer();
    7575
    7676private:
  • trunk/src/VBox/Main/include/USBDeviceFiltersImpl.h

    r47377 r47401  
    2828namespace settings
    2929{
    30     struct USBController;
     30    struct USB;
    3131}
    3232
     
    6767    // public methods only for internal purposes
    6868
    69     HRESULT loadSettings(const settings::USBController &data);
    70     HRESULT saveSettings(settings::USBController &data);
     69    HRESULT loadSettings(const settings::USB &data);
     70    HRESULT saveSettings(settings::USB &data);
    7171
    7272    void rollback();
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette