sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // f32test\testfsys\t_tfsys3.h sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include "common.h" sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: const TUint KTestClusterSize=1024; sl@0: sl@0: class CTestMountCB : public CMountCB, sl@0: public MFileSystemSubType, sl@0: public MFileSystemClusterSize sl@0: { sl@0: public: sl@0: CTestMountCB(); sl@0: ~CTestMountCB(); sl@0: void MountL(TBool /*aForceMount*/){} sl@0: TInt ReMount(){return KErrNone;} sl@0: void Dismounted(){} sl@0: void VolumeL(TVolumeInfo& /*aVolume*/) const{} sl@0: void SetVolumeL(TDes& /*aName*/){} sl@0: void MkDirL(const TDesC& /*aName*/){} sl@0: void RmDirL(const TDesC& /*aName*/){} sl@0: void DeleteL(const TDesC& /*aName*/){} sl@0: void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){} sl@0: void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){} sl@0: void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{} sl@0: void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){} sl@0: void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/){} sl@0: void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/){} sl@0: void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const{} sl@0: void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/){} sl@0: void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{} sl@0: void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/){} sl@0: void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/){} sl@0: void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/){} sl@0: void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/){} sl@0: sl@0: public: sl@0: // interface extension implementation sl@0: virtual TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput); sl@0: virtual TInt SubType(TDes& aName) const; sl@0: virtual TInt ClusterSize() const; sl@0: }; sl@0: sl@0: sl@0: sl@0: class CTestFileCB : public CFileCB sl@0: { sl@0: public: sl@0: CTestFileCB(); sl@0: ~CTestFileCB(); sl@0: void RenameL(const TDesC& /*aNewName*/){} sl@0: void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){} sl@0: void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){} sl@0: TInt Address(TInt& /*aPos*/) const{return 0;} sl@0: void SetSizeL(TInt /*aSize*/){} sl@0: void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){} sl@0: void FlushDataL(){} sl@0: void FlushAllL(){} sl@0: void CheckPos(TInt /*aPos*/){} sl@0: }; sl@0: sl@0: class CTestDirCB : public CDirCB sl@0: { sl@0: public: sl@0: CTestDirCB(); sl@0: ~CTestDirCB(); sl@0: void ReadL(TEntry& /*anEntry*/){} sl@0: }; sl@0: sl@0: class CTestFormatCB : public CFormatCB sl@0: { sl@0: public: sl@0: CTestFormatCB(); sl@0: ~CTestFormatCB(); sl@0: void DoFormatStepL(){} sl@0: }; sl@0: sl@0: class CTestFileSystem : public CFileSystem sl@0: { sl@0: public: sl@0: CTestFileSystem(); sl@0: ~CTestFileSystem(); sl@0: TInt Install(); sl@0: TInt DefaultPath(TDes& aPath) const; sl@0: TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber); sl@0: TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput); sl@0: private: sl@0: CMountCB* NewMountL() const; sl@0: CFileCB* NewFileL() const; sl@0: CDirCB* NewDirL() const; sl@0: CFormatCB* NewFormatL() const; sl@0: public: sl@0: static CFileSystem* NewL(); sl@0: };