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