1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/boardsupport/emulator/emulatorbsp/win_drive/win_drive_ext.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,147 @@
1.4 +// Copyright (c) 2007-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 "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 +// Definitions for this file system extension
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file
1.23 +*/
1.24 +
1.25 +#ifndef WIN_DRIVE_EXTENSION_H
1.26 +#define WIN_DRIVE_EXTENSION_H
1.27 +
1.28 +#include "win_media.h"
1.29 +
1.30 +//-----------------------------------------------------------------------------
1.31 +
1.32 +/**
1.33 + This class represents the File System extension (.fxt module) that intercepts media driver operations and
1.34 + deals with them on windows filesystem level.
1.35 +*/
1.36 +class CWinDrvProxyDrive : public CBaseExtProxyDrive
1.37 +{
1.38 +public:
1.39 + static CWinDrvProxyDrive* NewL(CProxyDrive* aProxyDrive, CMountCB* aMount);
1.40 +
1.41 +protected:
1.42 + CWinDrvProxyDrive(CProxyDrive* aProxyDrive, CMountCB* aMount);
1.43 + virtual ~CWinDrvProxyDrive();
1.44 +
1.45 + //-- overrides from the base class
1.46 +
1.47 + virtual TInt Initialise();
1.48 + virtual TInt Dismounted();
1.49 +
1.50 + virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
1.51 + virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset);
1.52 + virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
1.53 +
1.54 + virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
1.55 + virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset);
1.56 + virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
1.57 +
1.58 + virtual TInt Caps(TDes8& anInfo);
1.59 +
1.60 + virtual TInt Format(TFormatInfo& anInfo);
1.61 + virtual TInt Format(TInt64 aPos,TInt aLength);
1.62 +
1.63 + /* -------- virtual base class API --------------
1.64 + virtual TInt Enlarge(TInt aLength);
1.65 + virtual TInt ReduceSize(TInt aPos, TInt aLength);
1.66 +
1.67 + # virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
1.68 + # virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset);
1.69 + # virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
1.70 +
1.71 + # virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
1.72 + # virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset);
1.73 + # virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
1.74 +
1.75 + # virtual TInt Caps(TDes8& anInfo);
1.76 + #virtual TInt Format(TFormatInfo& anInfo);
1.77 + #virtual TInt Format(TInt64 aPos,TInt aLength);
1.78 + virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle);
1.79 + virtual TInt ForceRemount(TUint aFlags=0);
1.80 + virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword);
1.81 + virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword);
1.82 + virtual TInt Clear(TMediaPassword &aPassword);
1.83 + virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
1.84 + virtual TInt ErasePassword();
1.85 + virtual TInt GetLastErrorInfo(TDes8& aErrorInfo);
1.86 + virtual TInt DeleteNotify(TInt64 aPos, TInt aLength);
1.87 + */
1.88 +protected:
1.89 + virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.90 +
1.91 +
1.92 +protected:
1.93 + CMountCB* iMount; ///< pointer to the owning mount
1.94 + CProxyDrive* iProxyDrive; ///< pointer to the chain of the proxies to the native media driver
1.95 + CMediaBase* ipMedia; ///< pointer to the base "media" object that implements this extension't IO operations
1.96 +
1.97 + RBuf8 iScratchBuf; ///< scratch buffer for non-local read/write operations
1.98 +};
1.99 +
1.100 +//-----------------------------------------------------------------------------
1.101 +
1.102 +/**
1.103 + This Proxy drive factory class
1.104 +*/
1.105 +class CWinDrvProxyDriveFactory : public CProxyDriveFactory
1.106 +{
1.107 + public:
1.108 + CWinDrvProxyDriveFactory();
1.109 + virtual TInt Install();
1.110 + virtual CProxyDrive* NewProxyDriveL(CProxyDrive* aProxy,CMountCB* aMount);
1.111 +};
1.112 +
1.113 +
1.114 +#endif //WIN_DRIVE_EXTENSION_H
1.115 +
1.116 +
1.117 +
1.118 +
1.119 +
1.120 +
1.121 +
1.122 +
1.123 +
1.124 +
1.125 +
1.126 +
1.127 +
1.128 +
1.129 +
1.130 +
1.131 +
1.132 +
1.133 +
1.134 +
1.135 +
1.136 +
1.137 +
1.138 +
1.139 +
1.140 +
1.141 +
1.142 +
1.143 +
1.144 +
1.145 +
1.146 +
1.147 +
1.148 +
1.149 +
1.150 +