author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 31 Aug 2010 16:34:26 +0300 | |
branch | RCL_3 |
changeset 256 | c1f20ce4abcf |
parent 249 | a179b74831c9 |
child 294 | 039a3e647356 |
permissions | -rw-r--r-- |
249
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
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 |
||
249
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
47 |
/** |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
48 |
Called when a client registers with the SD card. |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
49 |
*/ |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
50 |
inline void TSDCard::RegisterClient() |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
51 |
{ |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
52 |
__e32_atomic_add_ord32(&iClientCountSD, 1); |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
53 |
} |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
54 |
|
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
55 |
/** |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
56 |
Called when a client de-registers with the SD card. |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
57 |
*/ |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
58 |
inline void TSDCard::DeregisterClient() |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
59 |
|
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
60 |
{ |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
61 |
__e32_atomic_add_ord32(&iClientCountSD, TUint32(-1)); |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
62 |
} |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
63 |
|
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
64 |
/** |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
65 |
Returned value indicates whether or not clients have registered with the SD card. |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
66 |
*/ |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
67 |
inline TBool TSDCard::ClientsRegistered() |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
68 |
{ |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
69 |
if(iClientCountSD) |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
70 |
return ETrue; |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
71 |
|
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
72 |
return EFalse; |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
73 |
} |
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
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 |