os/kernelhwsrv/kerneltest/f32test/testfsys/t_tfsys2.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/f32test/testfsys/t_tfsys2.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,117 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// f32test\testfsys\t_tfsys2.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#include <f32file.h>
    1.22 +#include "common.h"
    1.23 +#include <f32fsys.h>
    1.24 +#include <f32ver.h>
    1.25 +#include <f32dbg.h>
    1.26 +#include <e32svr.h>
    1.27 +
    1.28 +class CTestFileSystem : public CFileSystem
    1.29 +	{
    1.30 +public:
    1.31 +	CTestFileSystem();
    1.32 +	~CTestFileSystem();
    1.33 +	TInt Install();
    1.34 +	TInt DefaultPath(TDes& aPath) const;
    1.35 +	void DriveInfo(TDriveInfo& anInfo, TInt aDriveNumber) const;
    1.36 +	TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber);
    1.37 +	TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput);
    1.38 +private:
    1.39 +	CMountCB* NewMountL() const;
    1.40 +	CFileCB* NewFileL() const;
    1.41 +	CDirCB* NewDirL() const;
    1.42 +	CFormatCB* NewFormatL() const;
    1.43 +
    1.44 +public:
    1.45 +	static CFileSystem* NewL();
    1.46 +
    1.47 +public:
    1.48 +	TInt iMountAttempts;
    1.49 +	};
    1.50 +
    1.51 +
    1.52 +
    1.53 +class CTestMountCB : public CMountCB
    1.54 +	{
    1.55 +public:
    1.56 +	CTestMountCB();
    1.57 +	~CTestMountCB();
    1.58 +	void MountL(TBool /*aForceMount*/);
    1.59 +	TInt ReMount(){return KErrNone;}
    1.60 +	void Dismounted(){}
    1.61 +	void VolumeL(TVolumeInfo& /*aVolume*/) const{}
    1.62 +	void SetVolumeL(TDes& /*aName*/){}
    1.63 +	void MkDirL(const TDesC& /*aName*/){}
    1.64 +	void RmDirL(const TDesC& /*aName*/){}
    1.65 +	void DeleteL(const TDesC& /*aName*/){}
    1.66 +	void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){}
    1.67 +	void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){}
    1.68 +	void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const;
    1.69 +	void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){}
    1.70 +	void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/){}
    1.71 +	void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/){}
    1.72 +	void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const{}
    1.73 +	void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/){}
    1.74 +	void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{}
    1.75 +	void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/){}
    1.76 +	void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/){}
    1.77 +	void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/){}
    1.78 +	void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/){}
    1.79 +	TInt ForceRemountDrive(const TDesC8* /*aMountInfo*/,TInt /*aMountInfoMessageHandle*/,TUint /*aFlags*/);
    1.80 +
    1.81 +	void SetFsy(const CTestFileSystem* aFileSystem);
    1.82 +
    1.83 +public:
    1.84 +	CTestFileSystem* iFileSystem;
    1.85 +	};
    1.86 +
    1.87 +
    1.88 +
    1.89 +class CTestFileCB : public CFileCB
    1.90 +	{
    1.91 +public:
    1.92 +	CTestFileCB();
    1.93 +	~CTestFileCB();
    1.94 +	void RenameL(const TDesC& /*aNewName*/){}
    1.95 +	void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){}
    1.96 +	void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){}
    1.97 +	TInt Address(TInt& /*aPos*/) const{return 0;}
    1.98 +	void SetSizeL(TInt /*aSize*/){}
    1.99 +	void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){}
   1.100 +	void FlushDataL(){}
   1.101 +	void FlushAllL(){}
   1.102 +	void CheckPos(TInt /*aPos*/){}
   1.103 +	};
   1.104 +
   1.105 +class CTestDirCB : public CDirCB
   1.106 +	{
   1.107 +public:
   1.108 +	CTestDirCB();
   1.109 +	~CTestDirCB();
   1.110 +	void ReadL(TEntry& /*anEntry*/){}
   1.111 +	};
   1.112 +
   1.113 +class CTestFormatCB : public CFormatCB
   1.114 +	{
   1.115 +public:
   1.116 +	CTestFormatCB();
   1.117 +	~CTestFormatCB();
   1.118 +	void DoFormatStepL(){}
   1.119 +	};
   1.120 +