sl@0: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\include\drivers\pbusmedia.h sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: #ifndef __PBUSMEDIA_H__ sl@0: #define __PBUSMEDIA_H__ sl@0: #include sl@0: #include sl@0: sl@0: const TInt KMediaRemountForceMediaChange = 0x00000001; sl@0: sl@0: /** sl@0: The purpose of this class is to abstract the interface between the local media sub-system and peripheral bus controller. sl@0: An instance of this class provides the notification call back of media change and power down events. sl@0: This class is used by Media driver. sl@0: @see TMMCardControllerInterface sl@0: */ sl@0: NONSHARABLE_CLASS(DPBusPrimaryMedia) : public DPrimaryMediaBase sl@0: { sl@0: public: sl@0: DPBusPrimaryMedia(DPBusSocket* aSocket); sl@0: public: sl@0: virtual TInt Create(TMediaDevice aDevice, TInt aMediaId, TInt aLastMediaId); sl@0: virtual TInt QuickCheckStatus(); sl@0: virtual TInt ForceMediaChange(TInt aFlags); sl@0: virtual TInt InitiatePowerUp(); sl@0: virtual TInt DoInCritical(); sl@0: virtual void DoEndInCritical(); sl@0: virtual void DeltaCurrentConsumption(TInt aCurrent); sl@0: virtual void DefaultDriveCaps(TLocalDriveCapsV2& aCaps); sl@0: virtual TBool IsRemovableDevice(TInt& aSocketNum); sl@0: public: sl@0: void PBusStateChange(TInt aState, TInt anError); sl@0: public: sl@0: /** sl@0: Peripheral bus notification callback. sl@0: @see TPBusCallBack sl@0: */ sl@0: TPBusCallBack iBusCallBack; sl@0: sl@0: /** sl@0: Pointer to peripheral bus socket object. sl@0: @see DPBusSocket sl@0: */ sl@0: DPBusSocket* iSocket; sl@0: sl@0: /** sl@0: Holds one of the state corresponding to PBUS. sl@0: @see TPBusState sl@0: */ sl@0: TInt iPBusState; sl@0: /** sl@0: Updated with greater than zero, if pbus supports more than one card. sl@0: For each slot new instance of DPBusPrimaryMedia is created and updated in iSlotNumber. sl@0: */ sl@0: TInt iSlotNumber; sl@0: }; sl@0: sl@0: #endif sl@0: