kernel/eka/include/drivers/sdcard.inl
changeset 0 a41df078684a
child 42 a179b74831c9
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 1999-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 // 
       
    15 //
       
    16 
       
    17 /**
       
    18  @file
       
    19  @internalComponent
       
    20 */
       
    21 
       
    22 #ifndef __SDCARD_INL__
       
    23 #define __SDCARD_INL__
       
    24 
       
    25 // ======== TSDCSD ========
       
    26 
       
    27 inline TSDCSD::TSDCSD(const TCSD& aCSD) : TCSD(aCSD.iData)
       
    28 	{ /* empty */ }
       
    29 
       
    30 inline TBool TSDCSD::SDEraseBlkEn() const		{return( CSDField(46,46) );}
       
    31 inline TBool TSDCSD::SDSectorSize() const		{return( CSDField(45,39) );}
       
    32 inline TBool TSDCSD::SDWPGrpSize() const		{return( CSDField(38,32) );}
       
    33 
       
    34 // ======== TSDCard ========
       
    35 
       
    36 inline TBool TSDCard::IsSDCard() const					{return(iFlags&KSDCardIsSDCard);}
       
    37 
       
    38 inline TUint32 TSDCard::ProtectedAreaSize() const		{return(iProtectedAreaSize);}
       
    39 inline void TSDCard::SetProtectedAreaSize(TUint32 aPAS)	{iProtectedAreaSize=aPAS;}
       
    40 inline void TSDCard::SetAUSize(TUint8 aAU)	{iAUSize=aAU;}
       
    41 inline TUint8 TSDCard::GetAUSize() const		{return(iAUSize);}
       
    42 
       
    43 
       
    44 inline TUint32 TSDCard::PARootDirEnd() const			{return iPARootDirEnd;}
       
    45 inline void TSDCard::SetPARootDirEnd(TUint32 aPARootDirEnd)	{iPARootDirEnd=aPARootDirEnd;}
       
    46 
       
    47 // ======== TSDCardArray ========
       
    48 
       
    49 inline TSDCardArray::TSDCardArray(DSDStack* aOwningStack) : TMMCardArray(aOwningStack)
       
    50 	{ /* empty */ }
       
    51 
       
    52 inline TSDCard& TSDCardArray::Card(TUint aCardNumber) const
       
    53 	{ return *static_cast<TSDCard*>(iCards[aCardNumber]); }
       
    54 
       
    55 inline TSDCard& TSDCardArray::NewCard(TUint aCardNumber) const
       
    56 	{ return *static_cast<TSDCard*>(iNewCards[aCardNumber]); }
       
    57 
       
    58 // ========= DSDStack ========
       
    59 
       
    60 inline DSDStack::DSDStack(TInt aBus, DMMCSocket* aSocket)
       
    61 :	DMMCStack(aBus, aSocket)
       
    62 	{ iMultiplexedBus = ETrue; }
       
    63 
       
    64 inline TSDCardArray& DSDStack::CardArray() const
       
    65 	{ return *static_cast<TSDCardArray*>(iCardArray); }
       
    66 
       
    67 inline TMMCErr DSDStack::BaseModifyCardCapabilitySMST( TAny* aStackP )
       
    68 	{ return( static_cast<DSDStack *>(aStackP)->DSDStack::ModifyCardCapabilitySM() ); }
       
    69 
       
    70 // ========= DSDSession ========
       
    71 
       
    72 inline DSDSession::DSDSession(const TMMCCallBack& aCallBack)
       
    73 :	DMMCSession(aCallBack)
       
    74 	{ /* empty */ }
       
    75 
       
    76 #endif	// #ifndef __SDCARD_INL__
       
    77