sl@0: /* sl@0: * Copyright (c) 2005-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 "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: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @test sl@0: @internalComponent sl@0: sl@0: This contains CTestFileSystem sl@0: */ sl@0: sl@0: #if (!defined __T_TEST_FSY_H__) sl@0: #define __T_TEST_FSY_H__ sl@0: sl@0: // EPOC includes sl@0: #include sl@0: sl@0: class CTestMountCB : public CMountCB sl@0: { sl@0: public: sl@0: CTestMountCB() {} sl@0: ~CTestMountCB() {} sl@0: virtual void MountL(TBool /*aForceMount*/) {} sl@0: virtual TInt ReMount() { return KErrNone; } sl@0: virtual void Dismounted() {} sl@0: virtual void VolumeL(TVolumeInfo& /*aVolume*/) const {} sl@0: virtual void SetVolumeL(TDes& /*aName*/) {} sl@0: virtual void MkDirL(const TDesC& /*aName*/) {} sl@0: virtual void RmDirL(const TDesC& /*aName*/) {} sl@0: virtual void DeleteL(const TDesC& /*aName*/) {} sl@0: virtual void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/) {} sl@0: virtual void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/) {} sl@0: virtual void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const {} sl@0: virtual void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/) {} sl@0: virtual void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/) {} sl@0: virtual void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/) {} sl@0: virtual void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const {} sl@0: virtual void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) {} sl@0: virtual void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const {} sl@0: virtual void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/) {} sl@0: virtual void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/) {} sl@0: virtual void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/) {} sl@0: virtual void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/) {} sl@0: }; sl@0: sl@0: class CTestFileCB : public CFileCB sl@0: { sl@0: public: sl@0: CTestFileCB() {} sl@0: ~CTestFileCB() {} sl@0: virtual void RenameL(const TDesC& /*aNewName*/) {} sl@0: virtual void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/) {} sl@0: virtual void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/) {} sl@0: virtual TInt Address(TInt& /*aPos*/) const {return 0;} sl@0: virtual void SetSizeL(TInt /*aSize*/) {} sl@0: virtual void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/) {} sl@0: virtual void FlushDataL() {} sl@0: virtual void FlushAllL() {} sl@0: virtual 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: virtual 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: virtual void DoFormatStepL() {} sl@0: }; sl@0: sl@0: class CTestFileSystem : public CFileSystem sl@0: { sl@0: public: sl@0: TInt DefaultPath(TDes& aPath) const; sl@0: void DriveInfo(TDriveInfo& anInfo, TInt aDriveNumber) const; sl@0: TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber) const; sl@0: CMountCB* NewMountL() const; sl@0: CFileCB* NewFileL() const; sl@0: CDirCB* NewDirL() const; sl@0: CFormatCB* NewFormatL() const; sl@0: sl@0: protected: sl@0: CTestFileSystem(); sl@0: }; sl@0: sl@0: #endif /* __T_TEST_FSY_H__ */