0
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
#ifndef __HOST_USBMS_PROXY_H__
|
|
18 |
#define __HOST_USBMS_PROXY_H__
|
|
19 |
|
|
20 |
/** @file
|
|
21 |
@internalTechnology
|
|
22 |
*/
|
|
23 |
|
|
24 |
#include <rusbhostmsdevice.h>
|
|
25 |
#include "rusbhostmslogicalunit.h"
|
|
26 |
|
|
27 |
#include "tmsmemmap.h"
|
|
28 |
|
|
29 |
class CUsbHostMsProxyDrive : public CExtProxyDrive
|
|
30 |
{
|
|
31 |
public:
|
|
32 |
CUsbHostMsProxyDrive(CMountCB* aMount, CExtProxyDriveFactory* aDevice);
|
|
33 |
~CUsbHostMsProxyDrive();
|
|
34 |
|
|
35 |
public:
|
|
36 |
virtual TInt Initialise();
|
|
37 |
virtual TInt Dismounted();
|
|
38 |
virtual TInt Enlarge(TInt aLength);
|
|
39 |
virtual TInt ReduceSize(TInt aPos, TInt aLength);
|
|
40 |
virtual TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aThreadHandle, TInt aOffset, TInt aFlags);
|
|
41 |
virtual TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aThreadHandle, TInt anOffset);
|
|
42 |
virtual TInt Read(TInt64 aPos, TInt aLength, TDes8& aTrg);
|
|
43 |
virtual TInt Write(TInt64 aPos, TInt aLength,const TAny* aSrc, TInt aThreadHandle, TInt aOffset, TInt aFlags);
|
|
44 |
virtual TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aThreadHandle, TInt anOffset);
|
|
45 |
virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
|
|
46 |
virtual TInt Caps(TDes8& anInfo);
|
|
47 |
virtual TInt Format(TFormatInfo& aInfo);
|
|
48 |
virtual TInt Format(TInt64 aPos,TInt aLength);
|
|
49 |
virtual TInt SetInfo(const RMessage2 &msg, TAny* aMessageParam2, TAny* aMessageParam3);
|
|
50 |
virtual TInt NotifyChange(TDes8 &aChanged,TRequestStatus* aStatus);
|
|
51 |
virtual void NotifyChangeCancel();
|
|
52 |
|
|
53 |
TInt SetMountInfo(const TDesC8* /*aMountInfo*/,TInt /*aMountInfoThreadHandle=KCurrentThreadHandle*/);
|
|
54 |
TInt ForceRemount(TUint aFlags = 0);
|
|
55 |
TInt Unlock(TMediaPassword& /*aPassword*/, TBool /*aStorePassword*/);
|
|
56 |
TInt Lock(TMediaPassword& /*aOldPassword*/, TMediaPassword& /*aNewPassword*/, TBool /*aStorePassword*/);
|
|
57 |
TInt Clear(TMediaPassword& /*aPassword*/);
|
|
58 |
TInt ErasePassword();
|
|
59 |
|
|
60 |
TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
|
|
61 |
|
|
62 |
private:
|
|
63 |
static const TUint KBufSize = 128 * 1024;
|
|
64 |
|
|
65 |
TInt InitialiseOffset(TCapsInfo& aCapsInfo);
|
|
66 |
TInt ParameterNum(const TInt aMessageHandle, const TAny* aAddress);
|
|
67 |
TInt Erase(TInt64 aPos, TInt& aLength);
|
|
68 |
|
|
69 |
public:
|
|
70 |
RUsbHostMsLogicalUnit iUsbHostMsLun;
|
|
71 |
|
|
72 |
// Partition Info
|
|
73 |
// Just the first partition is supported
|
|
74 |
TMsDataMemMap iMsDataMemMap;
|
|
75 |
|
|
76 |
TBuf8<KBufSize> iBuf;
|
|
77 |
};
|
|
78 |
|
|
79 |
#endif
|