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