149
|
1 |
// Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies).
|
0
|
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 |
|
149
|
47 |
/**
|
|
48 |
Called when a client registers with the SD card.
|
|
49 |
*/
|
|
50 |
inline void TSDCard::RegisterClient()
|
|
51 |
{
|
|
52 |
__e32_atomic_add_ord32(&iClientCountSD, 1);
|
|
53 |
}
|
|
54 |
|
|
55 |
/**
|
|
56 |
Called when a client de-registers with the SD card.
|
|
57 |
*/
|
|
58 |
inline void TSDCard::DeregisterClient()
|
|
59 |
|
|
60 |
{
|
|
61 |
__e32_atomic_add_ord32(&iClientCountSD, TUint32(-1));
|
|
62 |
}
|
|
63 |
|
|
64 |
/**
|
|
65 |
Returned value indicates whether or not clients have registered with the SD card.
|
|
66 |
*/
|
|
67 |
inline TBool TSDCard::ClientsRegistered()
|
|
68 |
{
|
|
69 |
if(iClientCountSD)
|
|
70 |
return ETrue;
|
|
71 |
|
|
72 |
return EFalse;
|
|
73 |
}
|
|
74 |
|
0
|
75 |
// ======== TSDCardArray ========
|
|
76 |
|
|
77 |
inline TSDCardArray::TSDCardArray(DSDStack* aOwningStack) : TMMCardArray(aOwningStack)
|
|
78 |
{ /* empty */ }
|
|
79 |
|
|
80 |
inline TSDCard& TSDCardArray::Card(TUint aCardNumber) const
|
|
81 |
{ return *static_cast<TSDCard*>(iCards[aCardNumber]); }
|
|
82 |
|
|
83 |
inline TSDCard& TSDCardArray::NewCard(TUint aCardNumber) const
|
|
84 |
{ return *static_cast<TSDCard*>(iNewCards[aCardNumber]); }
|
|
85 |
|
|
86 |
// ========= DSDStack ========
|
|
87 |
|
|
88 |
inline DSDStack::DSDStack(TInt aBus, DMMCSocket* aSocket)
|
|
89 |
: DMMCStack(aBus, aSocket)
|
|
90 |
{ iMultiplexedBus = ETrue; }
|
|
91 |
|
|
92 |
inline TSDCardArray& DSDStack::CardArray() const
|
|
93 |
{ return *static_cast<TSDCardArray*>(iCardArray); }
|
|
94 |
|
|
95 |
inline TMMCErr DSDStack::BaseModifyCardCapabilitySMST( TAny* aStackP )
|
|
96 |
{ return( static_cast<DSDStack *>(aStackP)->DSDStack::ModifyCardCapabilitySM() ); }
|
|
97 |
|
|
98 |
// ========= DSDSession ========
|
|
99 |
|
|
100 |
inline DSDSession::DSDSession(const TMMCCallBack& aCallBack)
|
|
101 |
: DMMCSession(aCallBack)
|
|
102 |
{ /* empty */ }
|
|
103 |
|
|
104 |
#endif // #ifndef __SDCARD_INL__
|
|
105 |
|