|
1 // Copyright (c) 1995-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 the License "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 // |
|
15 // WARNING: This file contains some APIs which are internal and are subject |
|
16 // to change without notice. Such APIs should therefore not be used |
|
17 // outside the Kernel and Hardware Services package. |
|
18 // |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalTechnology |
|
23 @released |
|
24 */ |
|
25 |
|
26 #if !defined(__F32FILE_PRIVATE_H__) |
|
27 #define __F32FILE_PRIVATE_H__ |
|
28 |
|
29 #include <e32base.h> |
|
30 #include <e32svr.h> |
|
31 #include <e32ldr.h> |
|
32 |
|
33 |
|
34 /** |
|
35 @publishedPartner |
|
36 @released |
|
37 |
|
38 Bit mask used when evaluating whether or not a session gets notified of a |
|
39 debug event. |
|
40 |
|
41 @see DebugNotifySessions |
|
42 */ |
|
43 const TUint KDebugNotifyMask=0xFF000000; // Reserved for debug notification |
|
44 |
|
45 |
|
46 /** |
|
47 @publishedPartner |
|
48 @released |
|
49 |
|
50 The default blocksize value. |
|
51 |
|
52 This value is returned when you query the blocksize for a media type that does not |
|
53 support the concept of 'block' (e.g. NOR flash media). |
|
54 |
|
55 @see TVolumeIOParamInfo |
|
56 */ |
|
57 const TUint KDefaultVolumeBlockSize = 512; |
|
58 |
|
59 |
|
60 /** |
|
61 @internalTechnology |
|
62 |
|
63 Indicates that a TIpcArg slot 0 contains a descriptor. |
|
64 This shall be ORed with the file server request aFunction. |
|
65 Server should read from the location accordingly. |
|
66 |
|
67 @note This constant is intended for use inside Kernel and Hardware Services only. |
|
68 */ |
|
69 const TUint KIpcArgSlot0Desc = 0x00010000; |
|
70 |
|
71 /** |
|
72 @internalTechnology |
|
73 |
|
74 Indicates that a TIpcArg slot 1 contains a descriptor. |
|
75 This shall be ORed with the file server request aFunction. |
|
76 Server should read from the location accordingly. |
|
77 |
|
78 @note This constant is intended for use inside Kernel and Hardware Services only. |
|
79 */ |
|
80 const TUint KIpcArgSlot1Desc = 0x00020000; |
|
81 |
|
82 /** |
|
83 @internalTechnology |
|
84 |
|
85 Indicates that a TIpcArg slot 2 contains a descriptor. |
|
86 This shall be ORed with the file server request aFunction. |
|
87 Server should read from the location accordingly. |
|
88 |
|
89 @note This constant is intended for use inside Kernel and Hardware Services only. |
|
90 */ |
|
91 const TUint KIpcArgSlot2Desc = 0x00040000; |
|
92 |
|
93 |
|
94 /** |
|
95 @internalTechnology |
|
96 |
|
97 Flag to indicate that the Adopt request is from RFile::Adopt or from RFile::AdoptFromXXX functions |
|
98 |
|
99 @note This constant is intended for use inside Kernel and Hardware Services only. |
|
100 */ |
|
101 const TInt KFileAdopt32 = 0; |
|
102 |
|
103 |
|
104 /** |
|
105 @internalTechnology |
|
106 |
|
107 Flag to indicates that the Adopt request is from RFile::Duplicate. |
|
108 |
|
109 @note This constant is intended for use inside Kernel and Hardware Services only. |
|
110 */ |
|
111 const TInt KFileDuplicate = 1; |
|
112 |
|
113 |
|
114 /** |
|
115 @internalTechnology |
|
116 |
|
117 Flag to indicates that the Adopt request is from RFile64::AdoptFromXXX functions |
|
118 |
|
119 @note This constant is intended for use inside Kernel and Hardware Services only. |
|
120 */ |
|
121 const TInt KFileAdopt64 = 2; |
|
122 |
|
123 |
|
124 |
|
125 enum TStartupConfigurationCmd |
|
126 /** |
|
127 @publishedPartner |
|
128 @released |
|
129 |
|
130 Command used to set file server configuration at startup. |
|
131 |
|
132 @see RFs::SetStartupConfiguration() |
|
133 */ |
|
134 { |
|
135 /** |
|
136 Set loader thread priority |
|
137 */ |
|
138 ELoaderPriority, |
|
139 |
|
140 /** |
|
141 Set TDrive flags. Value should be ETrue or EFalse |
|
142 */ |
|
143 ESetRugged, |
|
144 /** |
|
145 Command upper boundary |
|
146 */ |
|
147 EMaxStartupConfigurationCmd |
|
148 }; |
|
149 |
|
150 |
|
151 /** |
|
152 Local drive mapping list - passed as argument to RFs::SetLocalDriveMapping(). |
|
153 |
|
154 @publishedPartner |
|
155 @released |
|
156 */ |
|
157 class TLocalDriveMappingInfo |
|
158 { |
|
159 public: |
|
160 enum TDrvMapOperation {EWriteMappingsAndSet=0,EWriteMappingsNoSet=1,ESwapIntMappingAndSet=2}; |
|
161 public: |
|
162 TInt iDriveMapping[KMaxLocalDrives]; |
|
163 TDrvMapOperation iOperation; |
|
164 }; |
|
165 |
|
166 |
|
167 /** |
|
168 @internalTechnology |
|
169 @released |
|
170 |
|
171 @note This class is intended for use inside Kernel and Hardware Services only. |
|
172 */ |
|
173 typedef TPckgBuf<TLocalDriveMappingInfo> TLocalDriveMappingInfoBuf; |
|
174 |
|
175 |
|
176 /** |
|
177 Client side plugin API. |
|
178 |
|
179 @publishedPartner |
|
180 @released |
|
181 */ |
|
182 class RPlugin : public RSubSessionBase |
|
183 { |
|
184 public: |
|
185 IMPORT_C TInt Open(RFs& aFs, TInt aPos); |
|
186 IMPORT_C void Close(); |
|
187 protected: |
|
188 IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus) const; |
|
189 IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1) const; |
|
190 IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1,TDes8& a2) const; |
|
191 IMPORT_C TInt DoControl(TInt aFunction) const; |
|
192 IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1) const; |
|
193 IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1,TDes8& a2) const; |
|
194 IMPORT_C void DoCancel(TUint aReqMask) const; |
|
195 }; |
|
196 |
|
197 /** |
|
198 @publishedPartner |
|
199 @released |
|
200 |
|
201 Specifies that a plugin should determine for itself which drives it attaches to. |
|
202 |
|
203 @see RFs::MountPlugin |
|
204 @see RFs::DismountPlugin |
|
205 */ |
|
206 const TInt KPluginAutoAttach = 0x19; |
|
207 |
|
208 /** |
|
209 @publishedPartner |
|
210 @released |
|
211 |
|
212 Specifies that a plugin should mount on drive Z. |
|
213 |
|
214 @see RFs::MountPlugin |
|
215 @see RFs::DismountPlugin |
|
216 */ |
|
217 const TInt KPluginMountDriveZ = 0x1A; |
|
218 |
|
219 |
|
220 /** |
|
221 @publishedPartner |
|
222 @released |
|
223 |
|
224 Specifies that a plugin should be mounted on all drives. |
|
225 |
|
226 @see RFs::MountPlugin |
|
227 @see RFs::DismountPlugin |
|
228 */ |
|
229 const TInt KPluginSupportAllDrives = 0x3FFFFFF; //All 26 bits (each corrosponding to a drive) are set to one. |
|
230 |
|
231 /** |
|
232 @publishedPartner |
|
233 @released |
|
234 |
|
235 Used to determine if a plugin is of version 2, meaning it can support drive Z. |
|
236 |
|
237 */ |
|
238 const TInt KPluginVersionTwo = 0x4000000; //bit 27 is set to one. |
|
239 |
|
240 /** |
|
241 @publishedPartner |
|
242 @released |
|
243 |
|
244 Specifies that a plugin should determine its own position in the plugin stack. |
|
245 |
|
246 @see RFs::MountPlugin |
|
247 @see RFs::DismountPlugin |
|
248 */ |
|
249 const TInt KPluginAutoLocate = 0xC8; |
|
250 |
|
251 |
|
252 enum TSessionFlags |
|
253 /** |
|
254 @internalTechnology |
|
255 |
|
256 A set of session specific configuration flags. |
|
257 |
|
258 @note This enum definition is intended for use inside Kernel and Hardware Services only. |
|
259 */ |
|
260 { |
|
261 /** |
|
262 Notify the user or write failures |
|
263 */ |
|
264 EFsSessionNotifyUser = KBit0, |
|
265 |
|
266 /** |
|
267 Notify clients registered for change notification |
|
268 */ |
|
269 EFsSessionNotifyChange = KBit1, |
|
270 |
|
271 /** |
|
272 Enables all session flags |
|
273 */ |
|
274 EFsSessionFlagsAll = KSet32, |
|
275 }; |
|
276 |
|
277 /** |
|
278 @internalTechnology |
|
279 |
|
280 @note This structure is intended for use inside Kernel and Hardware Services only. |
|
281 */ |
|
282 struct SBlockMapArgs |
|
283 { |
|
284 TInt64 iStartPos; |
|
285 TInt64 iEndPos; |
|
286 }; |
|
287 |
|
288 |
|
289 /** |
|
290 @internalTechnology |
|
291 |
|
292 Validates the mask used to match drive attributes. |
|
293 |
|
294 @note This function is intended for use inside Kernel and Hardware Services only. |
|
295 |
|
296 @see RFs::DriveList |
|
297 @see TFindFile::SetFindMask |
|
298 */ |
|
299 TInt ValidateMatchMask( TUint aMask); |
|
300 |
|
301 |
|
302 /** |
|
303 Returns the entire size of the TEntry, including the valid portion of the name string. |
|
304 The returned value is aligned to 4-byte boundary. |
|
305 @param aPacked If ETrue, returns the length including packed iSizeHigh and iReserved. |
|
306 If EFalse, returns the length including only the name. |
|
307 |
|
308 @note This function is intended for use inside Kernel and Hardware Services only. |
|
309 |
|
310 @internalTechnology |
|
311 */ |
|
312 inline TInt EntrySize(const TEntry& anEntry, TBool aPacked = EFalse) |
|
313 { |
|
314 return(sizeof(TUint)+sizeof(TInt)+sizeof(TTime)+sizeof(TInt)+sizeof(TUidType)+Align4(anEntry.iName.Size()) + (aPacked ? (2*sizeof(TInt)) : 0)); |
|
315 } |
|
316 |
|
317 |
|
318 |
|
319 #endif //__F32FILE_PRIVATE_H__ |