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