os/kernelhwsrv/kernel/eka/include/drivers/pbusmedia.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/include/drivers/pbusmedia.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,79 @@
     1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// e32\include\drivers\pbusmedia.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @publishedPartner
    1.24 + @released
    1.25 +*/
    1.26 +
    1.27 +#ifndef __PBUSMEDIA_H__
    1.28 +#define __PBUSMEDIA_H__
    1.29 +#include <drivers/pbus.h>
    1.30 +#include <drivers/locmedia.h>
    1.31 +
    1.32 +const TInt KMediaRemountForceMediaChange = 0x00000001;
    1.33 +
    1.34 +/**
    1.35 +  The purpose of this class is to abstract the interface between the local media sub-system and peripheral bus controller.
    1.36 +  An instance of this class provides the notification call back of media change and power down events.
    1.37 +  This class is used by Media driver.
    1.38 +  @see TMMCardControllerInterface
    1.39 +  */
    1.40 +NONSHARABLE_CLASS(DPBusPrimaryMedia) : public DPrimaryMediaBase
    1.41 +	{
    1.42 +public:
    1.43 +	DPBusPrimaryMedia(DPBusSocket* aSocket);
    1.44 +public:
    1.45 +	virtual TInt Create(TMediaDevice aDevice, TInt aMediaId, TInt aLastMediaId);
    1.46 +	virtual TInt QuickCheckStatus();
    1.47 +	virtual TInt ForceMediaChange(TInt aFlags);
    1.48 +	virtual TInt InitiatePowerUp();
    1.49 +	virtual TInt DoInCritical();
    1.50 +	virtual void DoEndInCritical();
    1.51 +	virtual void DeltaCurrentConsumption(TInt aCurrent);
    1.52 +	virtual void DefaultDriveCaps(TLocalDriveCapsV2& aCaps);
    1.53 +	virtual TBool IsRemovableDevice(TInt& aSocketNum);
    1.54 +public:
    1.55 +	void PBusStateChange(TInt aState, TInt anError);
    1.56 +public:
    1.57 +	/**
    1.58 +	 Peripheral bus notification callback.
    1.59 +     @see TPBusCallBack
    1.60 +	 */
    1.61 +	TPBusCallBack iBusCallBack;
    1.62 +
    1.63 +	/**
    1.64 +	 Pointer to peripheral bus socket object.
    1.65 +     @see DPBusSocket
    1.66 +	 */
    1.67 +	DPBusSocket* iSocket;
    1.68 +
    1.69 +	/**
    1.70 +     Holds one of the state corresponding to PBUS.
    1.71 +	 @see TPBusState
    1.72 +	 */
    1.73 +	TInt iPBusState;
    1.74 +	/** 
    1.75 +	Updated with greater than zero, if pbus supports more than one card.
    1.76 +	For each slot new instance of DPBusPrimaryMedia is created and updated in iSlotNumber.
    1.77 +	*/
    1.78 +	TInt iSlotNumber;	
    1.79 +	};
    1.80 +
    1.81 +#endif
    1.82 +