kernel/eka/include/drivers/pbusmedia.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32\include\drivers\pbusmedia.h
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner
       
    21  @released
       
    22 */
       
    23 
       
    24 #ifndef __PBUSMEDIA_H__
       
    25 #define __PBUSMEDIA_H__
       
    26 #include <drivers/pbus.h>
       
    27 #include <drivers/locmedia.h>
       
    28 
       
    29 const TInt KMediaRemountForceMediaChange = 0x00000001;
       
    30 
       
    31 /**
       
    32   The purpose of this class is to abstract the interface between the local media sub-system and peripheral bus controller.
       
    33   An instance of this class provides the notification call back of media change and power down events.
       
    34   This class is used by Media driver.
       
    35   @see TMMCardControllerInterface
       
    36   */
       
    37 NONSHARABLE_CLASS(DPBusPrimaryMedia) : public DPrimaryMediaBase
       
    38 	{
       
    39 public:
       
    40 	DPBusPrimaryMedia(DPBusSocket* aSocket);
       
    41 public:
       
    42 	virtual TInt Create(TMediaDevice aDevice, TInt aMediaId, TInt aLastMediaId);
       
    43 	virtual TInt QuickCheckStatus();
       
    44 	virtual TInt ForceMediaChange(TInt aFlags);
       
    45 	virtual TInt InitiatePowerUp();
       
    46 	virtual TInt DoInCritical();
       
    47 	virtual void DoEndInCritical();
       
    48 	virtual void DeltaCurrentConsumption(TInt aCurrent);
       
    49 	virtual void DefaultDriveCaps(TLocalDriveCapsV2& aCaps);
       
    50 	virtual TBool IsRemovableDevice(TInt& aSocketNum);
       
    51 public:
       
    52 	void PBusStateChange(TInt aState, TInt anError);
       
    53 public:
       
    54 	/**
       
    55 	 Peripheral bus notification callback.
       
    56      @see TPBusCallBack
       
    57 	 */
       
    58 	TPBusCallBack iBusCallBack;
       
    59 
       
    60 	/**
       
    61 	 Pointer to peripheral bus socket object.
       
    62      @see DPBusSocket
       
    63 	 */
       
    64 	DPBusSocket* iSocket;
       
    65 
       
    66 	/**
       
    67      Holds one of the state corresponding to PBUS.
       
    68 	 @see TPBusState
       
    69 	 */
       
    70 	TInt iPBusState;
       
    71 	/** 
       
    72 	Updated with greater than zero, if pbus supports more than one card.
       
    73 	For each slot new instance of DPBusPrimaryMedia is created and updated in iSlotNumber.
       
    74 	*/
       
    75 	TInt iSlotNumber;	
       
    76 	};
       
    77 
       
    78 #endif
       
    79