sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: #ifndef __HOST_USBMS_PROXY_H__ sl@0: #define __HOST_USBMS_PROXY_H__ sl@0: sl@0: /** @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #include sl@0: #include "rusbhostmslogicalunit.h" sl@0: sl@0: #include "tmsmemmap.h" sl@0: sl@0: class CUsbHostMsProxyDrive : public CExtProxyDrive sl@0: { sl@0: public: sl@0: CUsbHostMsProxyDrive(CMountCB* aMount, CExtProxyDriveFactory* aDevice); sl@0: ~CUsbHostMsProxyDrive(); sl@0: sl@0: public: sl@0: virtual TInt Initialise(); sl@0: virtual TInt Dismounted(); sl@0: virtual TInt Enlarge(TInt aLength); sl@0: virtual TInt ReduceSize(TInt aPos, TInt aLength); sl@0: virtual TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aThreadHandle, TInt aOffset, TInt aFlags); sl@0: virtual TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aThreadHandle, TInt anOffset); sl@0: virtual TInt Read(TInt64 aPos, TInt aLength, TDes8& aTrg); sl@0: virtual TInt Write(TInt64 aPos, TInt aLength,const TAny* aSrc, TInt aThreadHandle, TInt aOffset, TInt aFlags); sl@0: virtual TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aThreadHandle, TInt anOffset); sl@0: virtual TInt Write(TInt64 aPos,const TDesC8& aSrc); sl@0: virtual TInt Caps(TDes8& anInfo); sl@0: virtual TInt Format(TFormatInfo& aInfo); sl@0: virtual TInt Format(TInt64 aPos,TInt aLength); sl@0: virtual TInt SetInfo(const RMessage2 &msg, TAny* aMessageParam2, TAny* aMessageParam3); sl@0: virtual TInt NotifyChange(TDes8 &aChanged,TRequestStatus* aStatus); sl@0: virtual void NotifyChangeCancel(); sl@0: sl@0: TInt SetMountInfo(const TDesC8* /*aMountInfo*/,TInt /*aMountInfoThreadHandle=KCurrentThreadHandle*/); sl@0: TInt ForceRemount(TUint aFlags = 0); sl@0: TInt Unlock(TMediaPassword& /*aPassword*/, TBool /*aStorePassword*/); sl@0: TInt Lock(TMediaPassword& /*aOldPassword*/, TMediaPassword& /*aNewPassword*/, TBool /*aStorePassword*/); sl@0: TInt Clear(TMediaPassword& /*aPassword*/); sl@0: TInt ErasePassword(); sl@0: sl@0: TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput); sl@0: sl@0: private: sl@0: static const TUint KBufSize = 128 * 1024; sl@0: sl@0: TInt InitialiseOffset(TCapsInfo& aCapsInfo); sl@0: TInt ParameterNum(const TInt aMessageHandle, const TAny* aAddress); sl@0: TInt Erase(TInt64 aPos, TInt& aLength); sl@0: sl@0: public: sl@0: RUsbHostMsLogicalUnit iUsbHostMsLun; sl@0: sl@0: // Partition Info sl@0: // Just the first partition is supported sl@0: TMsDataMemMap iMsDataMemMap; sl@0: sl@0: TBuf8 iBuf; sl@0: }; sl@0: sl@0: #endif