os/kernelhwsrv/kerneltest/f32test/testfsys/t_tfsys3.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// f32test\testfsys\t_tfsys3.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include <f32file.h>
sl@0
    19
#include "common.h"
sl@0
    20
#include <f32fsys.h>
sl@0
    21
#include <f32ver.h>
sl@0
    22
#include <f32dbg.h>
sl@0
    23
#include <e32svr.h>
sl@0
    24
sl@0
    25
const TUint KTestClusterSize=1024;
sl@0
    26
sl@0
    27
class CTestMountCB : public CMountCB, 
sl@0
    28
					 public MFileSystemSubType,
sl@0
    29
					 public MFileSystemClusterSize
sl@0
    30
	{
sl@0
    31
public:
sl@0
    32
	CTestMountCB();
sl@0
    33
	~CTestMountCB();
sl@0
    34
	void MountL(TBool /*aForceMount*/){}
sl@0
    35
	TInt ReMount(){return KErrNone;}
sl@0
    36
	void Dismounted(){}
sl@0
    37
	void VolumeL(TVolumeInfo& /*aVolume*/) const{}
sl@0
    38
	void SetVolumeL(TDes& /*aName*/){}
sl@0
    39
	void MkDirL(const TDesC& /*aName*/){}
sl@0
    40
	void RmDirL(const TDesC& /*aName*/){}
sl@0
    41
	void DeleteL(const TDesC& /*aName*/){}
sl@0
    42
	void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){}
sl@0
    43
	void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){}
sl@0
    44
	void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{}
sl@0
    45
	void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){}
sl@0
    46
	void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/){}
sl@0
    47
	void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/){}
sl@0
    48
	void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const{}
sl@0
    49
	void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/){}
sl@0
    50
	void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{}
sl@0
    51
	void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/){}
sl@0
    52
	void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/){}
sl@0
    53
	void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/){}
sl@0
    54
	void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/){}
sl@0
    55
sl@0
    56
public:
sl@0
    57
	// interface extension implementation
sl@0
    58
	virtual TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput);
sl@0
    59
	virtual TInt SubType(TDes& aName) const;
sl@0
    60
	virtual TInt ClusterSize() const;
sl@0
    61
	};
sl@0
    62
sl@0
    63
sl@0
    64
sl@0
    65
class CTestFileCB : public CFileCB
sl@0
    66
	{
sl@0
    67
public:
sl@0
    68
	CTestFileCB();
sl@0
    69
	~CTestFileCB();
sl@0
    70
	void RenameL(const TDesC& /*aNewName*/){}
sl@0
    71
	void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){}
sl@0
    72
	void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){}
sl@0
    73
	TInt Address(TInt& /*aPos*/) const{return 0;}
sl@0
    74
	void SetSizeL(TInt /*aSize*/){}
sl@0
    75
	void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){}
sl@0
    76
	void FlushDataL(){}
sl@0
    77
	void FlushAllL(){}
sl@0
    78
	void CheckPos(TInt /*aPos*/){}
sl@0
    79
	};
sl@0
    80
sl@0
    81
class CTestDirCB : public CDirCB
sl@0
    82
	{
sl@0
    83
public:
sl@0
    84
	CTestDirCB();
sl@0
    85
	~CTestDirCB();
sl@0
    86
	void ReadL(TEntry& /*anEntry*/){}
sl@0
    87
	};
sl@0
    88
sl@0
    89
class CTestFormatCB : public CFormatCB
sl@0
    90
	{
sl@0
    91
public:
sl@0
    92
	CTestFormatCB();
sl@0
    93
	~CTestFormatCB();
sl@0
    94
	void DoFormatStepL(){}
sl@0
    95
	};
sl@0
    96
sl@0
    97
class CTestFileSystem : public CFileSystem
sl@0
    98
	{
sl@0
    99
public:
sl@0
   100
	CTestFileSystem();
sl@0
   101
	~CTestFileSystem();
sl@0
   102
	TInt Install();
sl@0
   103
	TInt DefaultPath(TDes& aPath) const;
sl@0
   104
	TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber);
sl@0
   105
	TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput);
sl@0
   106
private:
sl@0
   107
	CMountCB* NewMountL() const;
sl@0
   108
	CFileCB* NewFileL() const;
sl@0
   109
	CDirCB* NewDirL() const;
sl@0
   110
	CFormatCB* NewFormatL() const;
sl@0
   111
public:
sl@0
   112
	static CFileSystem* NewL();
sl@0
   113
	};