First public contribution.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32test\ext\t_fatext.h
18 #ifndef __FATTEST_EXT_H__
19 #define __FATTEST_EXT_H__
21 #include "t_testext.h"
22 #include "fat_utils.h"
24 using namespace Fat_Test_Utils;
27 This is the FAT test extension class.
30 class CFatTestProxyDrive : public CTestProxyDrive
35 EGetDataPosition = ETestCmdEnd + 1,
43 static CFatTestProxyDrive* NewL(CProxyDrive* aProxyDrive, CMountCB* aMount);
45 CFatTestProxyDrive(CProxyDrive* aProxyDrive, CMountCB* aMount);
49 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
50 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset);
51 virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
52 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
53 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset);
54 virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
55 virtual TInt Format(TFormatInfo& anInfo);
56 virtual TInt Format(TInt64 aPos,TInt aLength);
59 TInt ReadBootSector();
62 virtual void DoInitL();
63 virtual TBool DoCheckEvent(TInt64 aPos, TInt aLength);
64 virtual TInt DoControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
67 TFatBootSector iBootSector;
72 Factory class for FAT test extension.
75 class CFatTestProxyDriveFactory : public CProxyDriveFactory
78 CFatTestProxyDriveFactory();
79 virtual TInt Install();
80 virtual CProxyDrive* NewProxyDriveL(CProxyDrive* aProxy,CMountCB* aMount);