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