|
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\testfsys\t_tfsys2.h |
|
15 // |
|
16 // |
|
17 |
|
18 #include <f32file.h> |
|
19 #include "common.h" |
|
20 #include <f32fsys.h> |
|
21 #include <f32ver.h> |
|
22 #include <f32dbg.h> |
|
23 #include <e32svr.h> |
|
24 |
|
25 class CTestFileSystem : public CFileSystem |
|
26 { |
|
27 public: |
|
28 CTestFileSystem(); |
|
29 ~CTestFileSystem(); |
|
30 TInt Install(); |
|
31 TInt DefaultPath(TDes& aPath) const; |
|
32 void DriveInfo(TDriveInfo& anInfo, TInt aDriveNumber) const; |
|
33 TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber); |
|
34 TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput); |
|
35 private: |
|
36 CMountCB* NewMountL() const; |
|
37 CFileCB* NewFileL() const; |
|
38 CDirCB* NewDirL() const; |
|
39 CFormatCB* NewFormatL() const; |
|
40 |
|
41 public: |
|
42 static CFileSystem* NewL(); |
|
43 |
|
44 public: |
|
45 TInt iMountAttempts; |
|
46 }; |
|
47 |
|
48 |
|
49 |
|
50 class CTestMountCB : public CMountCB |
|
51 { |
|
52 public: |
|
53 CTestMountCB(); |
|
54 ~CTestMountCB(); |
|
55 void MountL(TBool /*aForceMount*/); |
|
56 TInt ReMount(){return KErrNone;} |
|
57 void Dismounted(){} |
|
58 void VolumeL(TVolumeInfo& /*aVolume*/) const{} |
|
59 void SetVolumeL(TDes& /*aName*/){} |
|
60 void MkDirL(const TDesC& /*aName*/){} |
|
61 void RmDirL(const TDesC& /*aName*/){} |
|
62 void DeleteL(const TDesC& /*aName*/){} |
|
63 void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){} |
|
64 void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){} |
|
65 void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const; |
|
66 void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){} |
|
67 void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/){} |
|
68 void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/){} |
|
69 void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const{} |
|
70 void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/){} |
|
71 void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{} |
|
72 void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/){} |
|
73 void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/){} |
|
74 void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/){} |
|
75 void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/){} |
|
76 TInt ForceRemountDrive(const TDesC8* /*aMountInfo*/,TInt /*aMountInfoMessageHandle*/,TUint /*aFlags*/); |
|
77 |
|
78 void SetFsy(const CTestFileSystem* aFileSystem); |
|
79 |
|
80 public: |
|
81 CTestFileSystem* iFileSystem; |
|
82 }; |
|
83 |
|
84 |
|
85 |
|
86 class CTestFileCB : public CFileCB |
|
87 { |
|
88 public: |
|
89 CTestFileCB(); |
|
90 ~CTestFileCB(); |
|
91 void RenameL(const TDesC& /*aNewName*/){} |
|
92 void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){} |
|
93 void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){} |
|
94 TInt Address(TInt& /*aPos*/) const{return 0;} |
|
95 void SetSizeL(TInt /*aSize*/){} |
|
96 void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){} |
|
97 void FlushDataL(){} |
|
98 void FlushAllL(){} |
|
99 void CheckPos(TInt /*aPos*/){} |
|
100 }; |
|
101 |
|
102 class CTestDirCB : public CDirCB |
|
103 { |
|
104 public: |
|
105 CTestDirCB(); |
|
106 ~CTestDirCB(); |
|
107 void ReadL(TEntry& /*anEntry*/){} |
|
108 }; |
|
109 |
|
110 class CTestFormatCB : public CFormatCB |
|
111 { |
|
112 public: |
|
113 CTestFormatCB(); |
|
114 ~CTestFormatCB(); |
|
115 void DoFormatStepL(){} |
|
116 }; |
|
117 |