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