os/kernelhwsrv/kerneltest/f32test/testfsys/t_tfsys2.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
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_tfsys2.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
class CTestFileSystem : public CFileSystem
sl@0
    26
	{
sl@0
    27
public:
sl@0
    28
	CTestFileSystem();
sl@0
    29
	~CTestFileSystem();
sl@0
    30
	TInt Install();
sl@0
    31
	TInt DefaultPath(TDes& aPath) const;
sl@0
    32
	void DriveInfo(TDriveInfo& anInfo, TInt aDriveNumber) const;
sl@0
    33
	TBusLocalDrive& DriveNumberToLocalDrive(TInt aDriveNumber);
sl@0
    34
	TInt GetInterface(TInt aInterfaceId, TAny*& aInterface,TAny* aInput);
sl@0
    35
private:
sl@0
    36
	CMountCB* NewMountL() const;
sl@0
    37
	CFileCB* NewFileL() const;
sl@0
    38
	CDirCB* NewDirL() const;
sl@0
    39
	CFormatCB* NewFormatL() const;
sl@0
    40
sl@0
    41
public:
sl@0
    42
	static CFileSystem* NewL();
sl@0
    43
sl@0
    44
public:
sl@0
    45
	TInt iMountAttempts;
sl@0
    46
	};
sl@0
    47
sl@0
    48
sl@0
    49
sl@0
    50
class CTestMountCB : public CMountCB
sl@0
    51
	{
sl@0
    52
public:
sl@0
    53
	CTestMountCB();
sl@0
    54
	~CTestMountCB();
sl@0
    55
	void MountL(TBool /*aForceMount*/);
sl@0
    56
	TInt ReMount(){return KErrNone;}
sl@0
    57
	void Dismounted(){}
sl@0
    58
	void VolumeL(TVolumeInfo& /*aVolume*/) const{}
sl@0
    59
	void SetVolumeL(TDes& /*aName*/){}
sl@0
    60
	void MkDirL(const TDesC& /*aName*/){}
sl@0
    61
	void RmDirL(const TDesC& /*aName*/){}
sl@0
    62
	void DeleteL(const TDesC& /*aName*/){}
sl@0
    63
	void RenameL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){}
sl@0
    64
	void ReplaceL(const TDesC& /*anOldName*/,const TDesC& /*anNewName*/){}
sl@0
    65
	void EntryL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const;
sl@0
    66
	void SetEntryL(const TDesC& /*aName*/,const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){}
sl@0
    67
	void FileOpenL(const TDesC& /*aName*/,TUint /*aMode*/,TFileOpen /*anOpen*/,CFileCB* /*aFile*/){}
sl@0
    68
	void DirOpenL(const TDesC& /*aName*/,CDirCB* /*aDir*/){}
sl@0
    69
	void RawReadL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aTrg*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/) const{}
sl@0
    70
	void RawWriteL(TInt64 /*aPos*/,TInt /*aLength*/,const TAny* /*aSrc*/,TInt /*anOffset*/,const RMessagePtr2& /*aMessage*/){}
sl@0
    71
	void ReadUidL(const TDesC& /*aName*/,TEntry& /*anEntry*/) const{}
sl@0
    72
	void GetShortNameL(const TDesC& /*aLongName*/,TDes& /*aShortName*/){}
sl@0
    73
	void GetLongNameL(const TDesC& /*aShortName*/,TDes& /*aLongName*/){}
sl@0
    74
	void IsFileInRom(const TDesC& /*aFileName*/,TUint8*& /*aFileStart*/){}
sl@0
    75
	void ReadSectionL(const TDesC& /*aName*/,TInt /*aPos*/,TAny* /*aTrg*/,TInt /*aLength*/,const RMessagePtr2& /*aMessage*/){}
sl@0
    76
	TInt ForceRemountDrive(const TDesC8* /*aMountInfo*/,TInt /*aMountInfoMessageHandle*/,TUint /*aFlags*/);
sl@0
    77
sl@0
    78
	void SetFsy(const CTestFileSystem* aFileSystem);
sl@0
    79
sl@0
    80
public:
sl@0
    81
	CTestFileSystem* iFileSystem;
sl@0
    82
	};
sl@0
    83
sl@0
    84
sl@0
    85
sl@0
    86
class CTestFileCB : public CFileCB
sl@0
    87
	{
sl@0
    88
public:
sl@0
    89
	CTestFileCB();
sl@0
    90
	~CTestFileCB();
sl@0
    91
	void RenameL(const TDesC& /*aNewName*/){}
sl@0
    92
	void ReadL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){}
sl@0
    93
	void WriteL(TInt /*aPos*/,TInt& /*aLength*/,const TAny* /*aDes*/,const RMessagePtr2& /*aMessage*/){}
sl@0
    94
	TInt Address(TInt& /*aPos*/) const{return 0;}
sl@0
    95
	void SetSizeL(TInt /*aSize*/){}
sl@0
    96
	void SetEntryL(const TTime& /*aTime*/,TUint /*aSetAttMask*/,TUint /*aClearAttMask*/){}
sl@0
    97
	void FlushDataL(){}
sl@0
    98
	void FlushAllL(){}
sl@0
    99
	void CheckPos(TInt /*aPos*/){}
sl@0
   100
	};
sl@0
   101
sl@0
   102
class CTestDirCB : public CDirCB
sl@0
   103
	{
sl@0
   104
public:
sl@0
   105
	CTestDirCB();
sl@0
   106
	~CTestDirCB();
sl@0
   107
	void ReadL(TEntry& /*anEntry*/){}
sl@0
   108
	};
sl@0
   109
sl@0
   110
class CTestFormatCB : public CFormatCB
sl@0
   111
	{
sl@0
   112
public:
sl@0
   113
	CTestFormatCB();
sl@0
   114
	~CTestFormatCB();
sl@0
   115
	void DoFormatStepL(){}
sl@0
   116
	};
sl@0
   117