1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/f32test/testfsys/t_tfsys3.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,113 @@
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_tfsys3.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 +const TUint KTestClusterSize=1024;
1.29 +
1.30 +class CTestMountCB : public CMountCB,
1.31 + public MFileSystemSubType,
1.32 + public MFileSystemClusterSize
1.33 + {
1.34 +public:
1.35 + CTestMountCB();
1.36 + ~CTestMountCB();
1.37 + void MountL(TBool /*aForceMount*/){}
1.38 + TInt ReMount(){return KErrNone;}
1.39 + void Dismounted(){}
1.40 + void VolumeL(TVolumeInfo& /*aVolume*/) const{}
1.41 + void SetVolumeL(TDes& /*aName*/){}
1.42 + void MkDirL(const TDesC& /*aName*/){}
1.43 + void RmDirL(const TDesC& /*aName*/){}
1.44 + void DeleteL(const TDesC& /*aName*/){}
1.45 + void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){}
1.46 + void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){}
1.47 + void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{}
1.48 + void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){}
1.49 + void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/){}
1.50 + void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/){}
1.51 + void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const{}
1.52 + void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/){}
1.53 + void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{}
1.54 + void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/){}
1.55 + void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/){}
1.56 + void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/){}
1.57 + void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/){}
1.58 +
1.59 +public:
1.60 + // interface extension implementation
1.61 + virtual TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput);
1.62 + virtual TInt SubType(TDes& aName) const;
1.63 + virtual TInt ClusterSize() const;
1.64 + };
1.65 +
1.66 +
1.67 +
1.68 +class CTestFileCB : public CFileCB
1.69 + {
1.70 +public:
1.71 + CTestFileCB();
1.72 + ~CTestFileCB();
1.73 + void RenameL(const TDesC& /*aNewName*/){}
1.74 + void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){}
1.75 + void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){}
1.76 + TInt Address(TInt& /*aPos*/) const{return 0;}
1.77 + void SetSizeL(TInt /*aSize*/){}
1.78 + void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){}
1.79 + void FlushDataL(){}
1.80 + void FlushAllL(){}
1.81 + void CheckPos(TInt /*aPos*/){}
1.82 + };
1.83 +
1.84 +class CTestDirCB : public CDirCB
1.85 + {
1.86 +public:
1.87 + CTestDirCB();
1.88 + ~CTestDirCB();
1.89 + void ReadL(TEntry& /*anEntry*/){}
1.90 + };
1.91 +
1.92 +class CTestFormatCB : public CFormatCB
1.93 + {
1.94 +public:
1.95 + CTestFormatCB();
1.96 + ~CTestFormatCB();
1.97 + void DoFormatStepL(){}
1.98 + };
1.99 +
1.100 +class CTestFileSystem : public CFileSystem
1.101 + {
1.102 +public:
1.103 + CTestFileSystem();
1.104 + ~CTestFileSystem();
1.105 + TInt Install();
1.106 + TInt DefaultPath(TDes& aPath) const;
1.107 + TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber);
1.108 + TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput);
1.109 +private:
1.110 + CMountCB* NewMountL() const;
1.111 + CFileCB* NewFileL() const;
1.112 + CDirCB* NewDirL() const;
1.113 + CFormatCB* NewFormatL() const;
1.114 +public:
1.115 + static CFileSystem* NewL();
1.116 + };