StorageControllerImpl.h revision c8faf7a704e698dec3679d7df43ae55b1bab3ead
af062818b47340eef15700d2f0211576ba3506eevboxsync * VBox StorageController COM Class declaration.
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright (C) 2008 Sun Microsystems, Inc.
af062818b47340eef15700d2f0211576ba3506eevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync * available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync * you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync * General Public License (GPL) as published by the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
af062818b47340eef15700d2f0211576ba3506eevboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
af062818b47340eef15700d2f0211576ba3506eevboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
af062818b47340eef15700d2f0211576ba3506eevboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync * additional information or have any questions.
af062818b47340eef15700d2f0211576ba3506eevboxsync public VirtualBoxSupportErrorInfoImpl<StorageController, IStorageController>,
af062818b47340eef15700d2f0211576ba3506eevboxsync public VirtualBoxSupportTranslation<StorageController>,
af062818b47340eef15700d2f0211576ba3506eevboxsync /* Constructor. */
af062818b47340eef15700d2f0211576ba3506eevboxsync mStorageControllerType (StorageControllerType_PIIX4),
af062818b47340eef15700d2f0211576ba3506eevboxsync || ( (mStorageControllerType == that.mStorageControllerType)
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Unique name of the storage controller. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** The connection type of thestorage controller. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Type of the Storage controller. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Instance number of the storage controller. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Number of usable ports. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** The following is only for the SATA controller atm. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Port which acts as primary master for ide emulation. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Port which acts as primary slave for ide emulation. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Port which acts as secondary master for ide emulation. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Port which acts as secondary slave for ide emulation. */
af062818b47340eef15700d2f0211576ba3506eevboxsync VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (StorageController)
af062818b47340eef15700d2f0211576ba3506eevboxsync COM_INTERFACE_ENTRY2 (IDispatch, IStorageController)
af062818b47340eef15700d2f0211576ba3506eevboxsync // public initializer/uninitializer for internal purposes only
af062818b47340eef15700d2f0211576ba3506eevboxsync bool aReshare = false);
af062818b47340eef15700d2f0211576ba3506eevboxsync // IStorageController properties
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(COMGETTER(ControllerType)) (StorageControllerType_T *aControllerType);
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(COMSETTER(ControllerType)) (StorageControllerType_T aControllerType);
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(COMGETTER(MaxDevicesPerPortCount)) (ULONG *aMaxDevices);
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(COMGETTER(MinPortCount)) (ULONG *aMinPortCount);
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(COMGETTER(MaxPortCount)) (ULONG *aMaxPortCount);
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(COMGETTER(PortCount)) (ULONG *aPortCount);
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(COMSETTER(PortCount)) (ULONG aPortCount);
af062818b47340eef15700d2f0211576ba3506eevboxsync // StorageController methods
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(GetIDEEmulationPort) (LONG DevicePosition, LONG *aPortNumber);
af062818b47340eef15700d2f0211576ba3506eevboxsync STDMETHOD(SetIDEEmulationPort) (LONG DevicePosition, LONG aPortNumber);
af062818b47340eef15700d2f0211576ba3506eevboxsync // public methods only for internal purposes
af062818b47340eef15700d2f0211576ba3506eevboxsync const Utf8Str &name() const { return mData->strName; }
af062818b47340eef15700d2f0211576ba3506eevboxsync StorageControllerType_T controllerType() const { return mData->mStorageControllerType; }
af062818b47340eef15700d2f0211576ba3506eevboxsync StorageBus_T storageBus() const { return mData->mStorageBus; }
af062818b47340eef15700d2f0211576ba3506eevboxsync ULONG instance() const { return mData->mInstance; }
af062818b47340eef15700d2f0211576ba3506eevboxsync bool isModified() { AutoWriteLock alock (this); return mData.isBackedUp(); }
af062818b47340eef15700d2f0211576ba3506eevboxsync bool isReallyModified() { AutoWriteLock alock (this); return mData.hasActualChanges(); }
af062818b47340eef15700d2f0211576ba3506eevboxsync // public methods for internal purposes only
af062818b47340eef15700d2f0211576ba3506eevboxsync // (ensure there is a caller and a read lock before calling them!)
af062818b47340eef15700d2f0211576ba3506eevboxsync /** @note this doesn't require a read lock since mParent is constant. */
af062818b47340eef15700d2f0211576ba3506eevboxsync const ComObjPtr<Machine, ComWeakRef> &parent() { return mParent; };
af062818b47340eef15700d2f0211576ba3506eevboxsync ComObjPtr<StorageController> peer() { return mPeer; }
af062818b47340eef15700d2f0211576ba3506eevboxsync // for VirtualBoxSupportErrorInfoImpl
af062818b47340eef15700d2f0211576ba3506eevboxsync static const wchar_t *getComponentName() { return L"StorageController"; }
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Parent object. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Peer object. */
af062818b47340eef15700d2f0211576ba3506eevboxsync /** Data. */
af062818b47340eef15700d2f0211576ba3506eevboxsync#endif //!____H_STORAGECONTROLLERIMPL
af062818b47340eef15700d2f0211576ba3506eevboxsync/* vi: set tabstop=4 shiftwidth=4 expandtab: */