os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/msproxy/hostusbmsproxy.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/msproxy/hostusbmsproxy.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,79 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +#ifndef __HOST_USBMS_PROXY_H__
1.21 +#define __HOST_USBMS_PROXY_H__
1.22 +
1.23 +/** @file
1.24 +@internalTechnology
1.25 +*/
1.26 +
1.27 +#include <rusbhostmsdevice.h>
1.28 +#include "rusbhostmslogicalunit.h"
1.29 +
1.30 +#include "tmsmemmap.h"
1.31 +
1.32 +class CUsbHostMsProxyDrive : public CExtProxyDrive
1.33 + {
1.34 +public:
1.35 + CUsbHostMsProxyDrive(CMountCB* aMount, CExtProxyDriveFactory* aDevice);
1.36 + ~CUsbHostMsProxyDrive();
1.37 +
1.38 +public:
1.39 + virtual TInt Initialise();
1.40 + virtual TInt Dismounted();
1.41 + virtual TInt Enlarge(TInt aLength);
1.42 + virtual TInt ReduceSize(TInt aPos, TInt aLength);
1.43 + virtual TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aThreadHandle, TInt aOffset, TInt aFlags);
1.44 + virtual TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aThreadHandle, TInt anOffset);
1.45 + virtual TInt Read(TInt64 aPos, TInt aLength, TDes8& aTrg);
1.46 + virtual TInt Write(TInt64 aPos, TInt aLength,const TAny* aSrc, TInt aThreadHandle, TInt aOffset, TInt aFlags);
1.47 + virtual TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aThreadHandle, TInt anOffset);
1.48 + virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
1.49 + virtual TInt Caps(TDes8& anInfo);
1.50 + virtual TInt Format(TFormatInfo& aInfo);
1.51 + virtual TInt Format(TInt64 aPos,TInt aLength);
1.52 + virtual TInt SetInfo(const RMessage2 &msg, TAny* aMessageParam2, TAny* aMessageParam3);
1.53 + virtual TInt NotifyChange(TDes8 &aChanged,TRequestStatus* aStatus);
1.54 + virtual void NotifyChangeCancel();
1.55 +
1.56 + TInt SetMountInfo(const TDesC8* /*aMountInfo*/,TInt /*aMountInfoThreadHandle=KCurrentThreadHandle*/);
1.57 + TInt ForceRemount(TUint aFlags = 0);
1.58 + TInt Unlock(TMediaPassword& /*aPassword*/, TBool /*aStorePassword*/);
1.59 + TInt Lock(TMediaPassword& /*aOldPassword*/, TMediaPassword& /*aNewPassword*/, TBool /*aStorePassword*/);
1.60 + TInt Clear(TMediaPassword& /*aPassword*/);
1.61 + TInt ErasePassword();
1.62 +
1.63 + TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.64 +
1.65 +private:
1.66 + static const TUint KBufSize = 128 * 1024;
1.67 +
1.68 + TInt InitialiseOffset(TCapsInfo& aCapsInfo);
1.69 + TInt ParameterNum(const TInt aMessageHandle, const TAny* aAddress);
1.70 + TInt Erase(TInt64 aPos, TInt& aLength);
1.71 +
1.72 +public:
1.73 + RUsbHostMsLogicalUnit iUsbHostMsLun;
1.74 +
1.75 + // Partition Info
1.76 + // Just the first partition is supported
1.77 + TMsDataMemMap iMsDataMemMap;
1.78 +
1.79 + TBuf8<KBufSize> iBuf;
1.80 + };
1.81 +
1.82 +#endif