First public contribution.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
23 This contains CTestFileSystem
26 #if (!defined __T_TEST_FSY_H__)
27 #define __T_TEST_FSY_H__
32 class CTestMountCB : public CMountCB
37 virtual void MountL(TBool /*aForceMount*/) {}
38 virtual TInt ReMount() { return KErrNone; }
39 virtual void Dismounted() {}
40 virtual void VolumeL(TVolumeInfo& /*aVolume*/) const {}
41 virtual void SetVolumeL(TDes& /*aName*/) {}
42 virtual void MkDirL(const TDesC& /*aName*/) {}
43 virtual void RmDirL(const TDesC& /*aName*/) {}
44 virtual void DeleteL(const TDesC& /*aName*/) {}
45 virtual void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/) {}
46 virtual void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/) {}
47 virtual void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const {}
48 virtual void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/) {}
49 virtual void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/) {}
50 virtual void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/) {}
51 virtual void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const {}
52 virtual void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) {}
53 virtual void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const {}
54 virtual void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/) {}
55 virtual void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/) {}
56 virtual void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/) {}
57 virtual void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/) {}
60 class CTestFileCB : public CFileCB
65 virtual void RenameL(const TDesC& /*aNewName*/) {}
66 virtual void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/) {}
67 virtual void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/) {}
68 virtual TInt Address(TInt& /*aPos*/) const {return 0;}
69 virtual void SetSizeL(TInt /*aSize*/) {}
70 virtual void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/) {}
71 virtual void FlushDataL() {}
72 virtual void FlushAllL() {}
73 virtual void CheckPos(TInt /*aPos*/) {}
76 class CTestDirCB : public CDirCB
81 virtual void ReadL(TEntry& /*anEntry*/) {}
84 class CTestFormatCB : public CFormatCB
89 virtual void DoFormatStepL() {}
92 class CTestFileSystem : public CFileSystem
95 TInt DefaultPath(TDes& aPath) const;
96 void DriveInfo(TDriveInfo& anInfo, TInt aDriveNumber) const;
97 TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber) const;
98 CMountCB* NewMountL() const;
99 CFileCB* NewFileL() const;
100 CDirCB* NewDirL() const;
101 CFormatCB* NewFormatL() const;
107 #endif /* __T_TEST_FSY_H__ */