|
1 // Copyright (c) 2006-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 // f32test\ext\t_fatext.h |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __FATTEST_EXT_H__ |
|
19 #define __FATTEST_EXT_H__ |
|
20 |
|
21 #include "t_testext.h" |
|
22 #include "fat_utils.h" |
|
23 |
|
24 using namespace Fat_Test_Utils; |
|
25 |
|
26 /** |
|
27 This is the FAT test extension class. |
|
28 @internalTechnology |
|
29 */ |
|
30 class CFatTestProxyDrive : public CTestProxyDrive |
|
31 { |
|
32 public: |
|
33 enum TFatTestCmd |
|
34 { |
|
35 EGetDataPosition = ETestCmdEnd + 1, |
|
36 ESectorsPerCluster, |
|
37 EFatSectors, |
|
38 EFirstFatSector, |
|
39 EFatType |
|
40 }; |
|
41 |
|
42 public: |
|
43 static CFatTestProxyDrive* NewL(CProxyDrive* aProxyDrive, CMountCB* aMount); |
|
44 private: |
|
45 CFatTestProxyDrive(CProxyDrive* aProxyDrive, CMountCB* aMount); |
|
46 |
|
47 public: |
|
48 // Derived functions |
|
49 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags); |
|
50 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset); |
|
51 virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg); |
|
52 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags); |
|
53 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset); |
|
54 virtual TInt Write(TInt64 aPos,const TDesC8& aSrc); |
|
55 virtual TInt Format(TFormatInfo& anInfo); |
|
56 virtual TInt Format(TInt64 aPos,TInt aLength); |
|
57 |
|
58 private: |
|
59 TInt ReadBootSector(); |
|
60 TBool CheckMount(); |
|
61 private: |
|
62 virtual void DoInitL(); |
|
63 virtual TBool DoCheckEvent(TInt64 aPos, TInt aLength); |
|
64 virtual TInt DoControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2); |
|
65 |
|
66 private: |
|
67 TFatBootSector iBootSector; |
|
68 }; |
|
69 |
|
70 |
|
71 /** |
|
72 Factory class for FAT test extension. |
|
73 @internalTechnology |
|
74 */ |
|
75 class CFatTestProxyDriveFactory : public CProxyDriveFactory |
|
76 { |
|
77 public: |
|
78 CFatTestProxyDriveFactory(); |
|
79 virtual TInt Install(); |
|
80 virtual CProxyDrive* NewProxyDriveL(CProxyDrive* aProxy,CMountCB* aMount); |
|
81 }; |
|
82 |
|
83 #endif |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |