|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Definitions for this file system extension |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #ifndef WIN_DRIVE_EXTENSION_H |
|
23 #define WIN_DRIVE_EXTENSION_H |
|
24 |
|
25 #include "win_media.h" |
|
26 |
|
27 //----------------------------------------------------------------------------- |
|
28 |
|
29 /** |
|
30 This class represents the File System extension (.fxt module) that intercepts media driver operations and |
|
31 deals with them on windows filesystem level. |
|
32 */ |
|
33 class CWinDrvProxyDrive : public CBaseExtProxyDrive |
|
34 { |
|
35 public: |
|
36 static CWinDrvProxyDrive* NewL(CProxyDrive* aProxyDrive, CMountCB* aMount); |
|
37 |
|
38 protected: |
|
39 CWinDrvProxyDrive(CProxyDrive* aProxyDrive, CMountCB* aMount); |
|
40 virtual ~CWinDrvProxyDrive(); |
|
41 |
|
42 //-- overrides from the base class |
|
43 |
|
44 virtual TInt Initialise(); |
|
45 virtual TInt Dismounted(); |
|
46 |
|
47 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags); |
|
48 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset); |
|
49 virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg); |
|
50 |
|
51 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags); |
|
52 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset); |
|
53 virtual TInt Write(TInt64 aPos,const TDesC8& aSrc); |
|
54 |
|
55 virtual TInt Caps(TDes8& anInfo); |
|
56 |
|
57 virtual TInt Format(TFormatInfo& anInfo); |
|
58 virtual TInt Format(TInt64 aPos,TInt aLength); |
|
59 |
|
60 /* -------- virtual base class API -------------- |
|
61 virtual TInt Enlarge(TInt aLength); |
|
62 virtual TInt ReduceSize(TInt aPos, TInt aLength); |
|
63 |
|
64 # virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags); |
|
65 # virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset); |
|
66 # virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg); |
|
67 |
|
68 # virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags); |
|
69 # virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset); |
|
70 # virtual TInt Write(TInt64 aPos,const TDesC8& aSrc); |
|
71 |
|
72 # virtual TInt Caps(TDes8& anInfo); |
|
73 #virtual TInt Format(TFormatInfo& anInfo); |
|
74 #virtual TInt Format(TInt64 aPos,TInt aLength); |
|
75 virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle); |
|
76 virtual TInt ForceRemount(TUint aFlags=0); |
|
77 virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword); |
|
78 virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword); |
|
79 virtual TInt Clear(TMediaPassword &aPassword); |
|
80 virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2); |
|
81 virtual TInt ErasePassword(); |
|
82 virtual TInt GetLastErrorInfo(TDes8& aErrorInfo); |
|
83 virtual TInt DeleteNotify(TInt64 aPos, TInt aLength); |
|
84 */ |
|
85 protected: |
|
86 virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput); |
|
87 |
|
88 |
|
89 protected: |
|
90 CMountCB* iMount; ///< pointer to the owning mount |
|
91 CProxyDrive* iProxyDrive; ///< pointer to the chain of the proxies to the native media driver |
|
92 CMediaBase* ipMedia; ///< pointer to the base "media" object that implements this extension't IO operations |
|
93 |
|
94 RBuf8 iScratchBuf; ///< scratch buffer for non-local read/write operations |
|
95 }; |
|
96 |
|
97 //----------------------------------------------------------------------------- |
|
98 |
|
99 /** |
|
100 This Proxy drive factory class |
|
101 */ |
|
102 class CWinDrvProxyDriveFactory : public CProxyDriveFactory |
|
103 { |
|
104 public: |
|
105 CWinDrvProxyDriveFactory(); |
|
106 virtual TInt Install(); |
|
107 virtual CProxyDrive* NewProxyDriveL(CProxyDrive* aProxy,CMountCB* aMount); |
|
108 }; |
|
109 |
|
110 |
|
111 #endif //WIN_DRIVE_EXTENSION_H |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |