First public contribution.
1 // Copyright (c) 2006-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32\inc\f32plugin.h
16 // WARNING: This file contains some APIs which are internal and are subject
17 // to change without notice. Such APIs should therefore not be used
18 // outside the Kernel and Hardware Services package.
27 #if !defined(__F32PLUGIN_H__)
28 #define __F32PLUGIN_H__
31 #include <f32file_private.h>
34 const TInt KPluginMessageForward = 1; ///< Returned from ::Dispatch() to indicate that a request has been processed synchronously and should be passed down the stack.
35 const TInt KPluginMessageComplete = 2; ///< Returned from ::Dispatch() to indicate that a request has been processed synchronously and should be passed back up the stack.
37 const TInt KCountNeeded=KMinTInt;
40 List of file server operations
44 EFsAddFileSystem, ///< Adds a file system
45 EFsRemoveFileSystem, ///< Removes a file system
46 EFsMountFileSystem, ///< Mounts a file system
47 EFsNotifyChange, ///< Notifies file and/or directory change
48 EFsNotifyChangeCancel, ///< Cancels change notification
49 EFsDriveList, ///< Gets a list of the available drive
50 EFsDrive, ///< Gets information about a drive and the medium mounted on it
51 EFsVolume, ///< Gets volume information for a formatted device
52 EFsSetVolume, ///< Sets the label for a volume
53 EFsSubst, ///< Gets the path assigned to a drive letter
54 EFsSetSubst, ///< -- 10, Assigns a path to a drive letter
55 EFsRealName, ///< Gets the real name of a file
56 EFsDefaultPath, ///< Gets the system default path
57 EFsSetDefaultPath, ///< Sets the system default path
58 EFsSessionPath, ///< Gets the session path
59 EFsSetSessionPath, ///< Sets the session path for the current file server client
60 EFsMkDir, ///< Makes directory
61 EFsRmDir, ///< Removes a directory
62 EFsParse, ///< Parses a filename specification
63 EFsDelete, ///< Deletes file
64 EFsRename, ///< -- 20 Renames a single file or directory
65 EFsReplace, ///< Replaces a single file with another
66 EFsEntry, ///< Gets a file's attributes
67 EFsSetEntry, ///< Sets both the attributes and the last modified date and time for a file or directory
68 EFsGetDriveName, ///< Gets the name of a drive
69 EFsSetDriveName, ///< Sets the name of a drive
70 EFsFormatSubClose, ///< Closes the Format subsession
71 EFsDirSubClose, ///< Closes the directory.
72 EFsFileSubClose, ///< Closes the file
73 EFsRawSubClose, ///< Closes the direct access channel to the disk
74 EFsFileOpen, ///< -- 30 Opens file
75 EFsFileCreate, ///< Creates and opens a new file
76 EFsFileReplace, ///< Replaces a file of the same name or creates a new file
77 EFsFileTemp, ///< Creates and opens a temporary file
78 EFsFileRead, ///< Reads from the file
79 EFsFileWrite, ///< Writes to the file
80 EFsFileLock, ///< Locks a region within the file
81 EFsFileUnLock, ///< Unlocks a region within the file
82 EFsFileSeek, ///< Sets the the current file position
83 EFsFileFlush, ///< Commits data to the storage device
84 EFsFileSize, ///< -- 40 Gets the current file size
85 EFsFileSetSize, ///< Sets the file size
86 EFsFileAtt, ///< Gets the file's attributes
87 EFsFileSetAtt, ///< Sets or clears file attributes
88 EFsFileModified, ///< Gets local date and time the file was last modified
89 EFsFileSetModified, ///< Sets the date and time the file was last modified
90 EFsFileSet, ///< Sets the file’s attributes, last modification date/time
91 EFsFileChangeMode, ///< Switches an open file's access mode
92 EFsFileRename, ///< Renames a file
93 EFsDirOpen, ///< Opens a directory
94 EFsDirReadOne, ///< -- 50 Reads a single directory entry
95 EFsDirReadPacked, ///< Reads all filtered directory entries
96 EFsFormatOpen, ///< Opens a device for formatting
97 EFsFormatNext, ///< Executes the next format step
98 EFsRawDiskOpen, ///< Opens a direct access channel to the disk */
99 EFsRawDiskRead, ///< Reads directly from the disk
100 EFsRawDiskWrite, ///< Writes directly to the disk
101 EFsResourceCountMarkStart, ///< Marks the start of resource count checking
102 EFsResourceCountMarkEnd, ///< Ends resource count checking
103 EFsResourceCount, ///< Gets the number of currently open resources
104 EFsCheckDisk, ///< -- 60 Checks the integrity of the disk on the specified drive
105 EFsGetShortName, ///< Gets the short filename
106 EFsGetLongName, ///< Gets the long filename
107 EFsIsFileOpen, ///< Tests whether a file is open
108 EFsListOpenFiles, ///< get a list of open files */
109 EFsGetNotifyUser, ///< Tests user notification of file access failure is in effect
110 EFsSetNotifyUser, ///< Sets if the user should be notified of file access failure
111 EFsIsFileInRom, ///< Gets a pointer to the specified file, if it is in ROM
112 EFsIsValidName, ///< Tests whether a filename and path are syntactically correct
113 EFsDebugFunction, ///< Different debugging info
114 EFsReadFileSection, ///< -- 70 Reads data from a file without opening it
115 EFsNotifyChangeEx, ///< Requests a notification of change to files or directories
116 EFsNotifyChangeCancelEx, ///< Cancels all outstanding requests for notification of change
117 EFsDismountFileSystem, ///< Dismounts the file system from the specified drive
118 EFsFileSystemName, ///< Gets the name of the file system mounted on the specified drive
119 EFsScanDrive, ///< Checks the specified drive for specific errors and corrects them
120 EFsControlIo, ///< General purpose test interface
121 EFsLockDrive, ///< Locks a MultiMedia card in the specified drive
122 EFsUnlockDrive, ///< Unlocks the MultiMedia card in the specified drive
123 EFsClearPassword, ///< Clears the password from the locked MultiMedia card
124 EFsNotifyDiskSpace, ///< -- 80 Disk space change notification
125 EFsNotifyDiskSpaceCancel, ///< Cancels a specific outstanding notification
126 EFsFileDrive, ///< Gets drive information on which this file resides
127 EFsRemountDrive, ///< Forces a remount of the specified drive
128 EFsMountFileSystemScan, ///< Mounts a file system and performs a scan on a drive
129 EFsSessionToPrivate, ///< Sets the session path to point to the private path
130 EFsPrivatePath, ///< Creates the text defining the private path
131 EFsCreatePrivatePath, ///< Creates the private path for a process
132 EFsAddExtension, ///< Adds the specified extension
133 EFsMountExtension, ///< Mounts the the specified extension
134 EFsDismountExtension, ///< -- 90 Dismounts the specified extension
135 EFsRemoveExtension, ///< Removes the specified extension
136 EFsExtensionName, ///< Gets the name of the extension on the specified drive
137 EFsStartupInitComplete, ///< Noifies the file server of startup initialisation completion
138 EFsSetLocalDriveMapping, ///< Set the local drive mapping
139 EFsFinaliseDrive, ///< Finalise a specific drive
140 EFsFileDuplicate, ///< Makes a duplicate of this file handle
141 EFsFileAdopt, ///< Adopts an already open file
142 EFsSwapFileSystem, ///< Swaps file systems
143 EFsErasePassword, ///< Erase the password from the locked MultiMedia card
144 EFsReserveDriveSpace, ///< -- 100 Reserves an area of a drive
145 EFsGetReserveAccess, ///< Get exclusive access to reserved area
146 EFsReleaseReserveAccess, ///< Release exclusive access to reserved area
147 EFsFileName, ///< Gets the final part of a filename
148 EFsGetMediaSerialNumber, ///< Gets the serial number of media
149 EFsFileFullName, ///< Gets the full filename
150 EFsAddPlugin, ///< Adds the specified plugin
151 EFsRemovePlugin, ///< Removes the specified plugin
152 EFsMountPlugin, ///< Mounts the specified plugin
153 EFsDismountPlugin, ///< Dismounts the specified plugin
154 EFsPluginName, ///<-- 110 Gets a plugin's name in specific position and drive
155 EFsPluginOpen, ///< Opens the plugin
156 EFsPluginSubClose, ///< Closes the plugin
157 EFsPluginDoRequest, ///< Issues an asynchronous plugin request
158 EFsPluginDoControl, ///< Issues a synchronous plugin request
159 EFsPluginDoCancel, ///< Cancels an synchronous plugin request
160 EFsNotifyDismount, ///< Issues a request to asynchronously dismount the file system
161 EFsNotifyDismountCancel, ///< Cancels a request to asynchronously dismount the file system
162 EFsAllowDismount, ///< Notifies that it is safe to dismount the file system
163 EFsSetStartupConfiguration, ///< Configures file server at startup
164 EFsFileReadCancel, ///< -- 120 Cancels an outstanding asynchronous read request
165 EFsAddCompositeMount, ///< Add a mount to the composite file system
166 EFsSetSessionFlags, ///< Set/Clear session specific flags
167 EFsSetSystemDrive, ///< Set SystemDrive
168 EFsBlockMap, ///< Fetches the BlockMap of a file
169 EFsUnclamp, ///< Re-enable modification of a specified file in storage media
170 EFsFileClamp, ///< Disable modification of a specified file in storage media
171 EFsQueryVolumeInfoExt, ///< Query interface to retrieve extended volume information
172 EFsInitialisePropertiesFile,///< Read in the F32 properties file provided by ESTART
173 EFsFileWriteDirty, ///< Writes dirty data to disk. Used when write caching enabled
174 EFsSynchroniseDriveThread, ///< -- 130 Synchronises the asynchronous operation which executes in driver thread
175 EFsAddProxyDrive, ///< Loads a proxy drive
176 EFsRemoveProxyDrive, ///< Unloads a proxy drive
177 EFsMountProxyDrive, ///< Mounts a proxy drive
178 EFsDismountProxyDrive, ///< Dismounts a proxy drive
179 EFsNotificationOpen, ///< Opens the notification
180 EFsNotificationBuffer, ///< Communicates buffer to file server
181 EFsNotificationRequest, ///< Sends the notification request
182 EFsNotificationCancel, ///< Cancels the notification request
183 EFsNotificationSubClose, ///< Closes the notification
184 EFsNotificationAdd, ///< -- 140 Adds filter to the server, comprising a path and notification type
185 EFsNotificationRemove, ///< Removes filters from Server-Side
186 EFsLoadCodePage, ///< Loads a code page library
187 EMaxClientOperations ///< This must always be the last operation insert above
193 Request wrapper for plugins
195 class TFsPluginRequest
203 Used for getting parameters from
204 a CFsRequest by a F32 plugin.
227 IMPORT_C TFsPluginRequest(CFsRequest* aRequest);
233 Get the current Function number, as defined in TFsMessage
235 IMPORT_C TInt Function() const;
241 Returns the drive number of the current request
243 IMPORT_C TInt DriveNumber() const;
244 IMPORT_C TParse& Src() const;
245 IMPORT_C TParse& Dest() const;
246 IMPORT_C TDrive* Drive() const;
247 IMPORT_C TDrive* SubstedDrive() const;
248 IMPORT_C const RMessage2& Message() const;
249 IMPORT_C CFsRequest* Request() const;
250 IMPORT_C TUint ScratchValue() const;
251 IMPORT_C TInt64 ScratchValue64() const;
252 IMPORT_C TBool IsPostOperation() const;
258 Utility function for returning a TInt type of TF32ArgType value from the current request.
261 To obtain EPosition, authors should use ::Read(TF32ArgType,TInt64&)
263 IMPORT_C TInt Read(TF32ArgType aType, TInt& aVal);
269 Utility function for returning a TUint type of TF32ArgType value from the current request.
271 To obtain EPosition, authors should use ::Read(TF32ArgType,TInt64&)
273 IMPORT_C TInt Read(TF32ArgType aType, TUint& aVal);
279 Utility function for returning a TInt64 type of TF32ArgType value from the current request.
282 IMPORT_C TInt Read(TF32ArgType aType, TInt64& aVal);
288 Utility function for receving descriptor or packaged paramters of the current request.
289 For non-descriptor types such a TEntry, plugin authors should pass an object of type TPckg<TEntry> in to aDes.
291 IMPORT_C TInt Read(TF32ArgType aType, TDes8& aDes, TInt aOffset = 0);
297 Utility function for receving descriptor or packaged paramters of the current request.
298 For non-descriptor types such a TEntry, plugin authors should pass an object of type TPckg<TEntry> in to aDes.
300 IMPORT_C TInt Read(TF32ArgType aType, TDes16& aDes, TInt aOffset = 0);
306 Utilty function for writing data back to the request.
307 Non-descriptor values should be packaged i.e TPckg<TUidType>
309 IMPORT_C TInt Write(TF32ArgType aType, const TDesC8& aDes, TInt aOffset = 0);
315 Utilty function for writing data back to the request.
316 Non-descriptor values should be packaged i.e TPckg<TUidType>
318 IMPORT_C TInt Write(TF32ArgType aType, const TDesC16& aDes, TInt aOffset = 0);
324 IMPORT_C TInt FileName(TDes& aName);
330 When plugin authors perform early completion of read or write requests, then SetSharePos should be called in order to
331 update the share position to the client.
333 IMPORT_C TInt SetSharePos(TInt64& aPos);
336 TInt ClientSubSessionHandle(TInt& aHandle);
337 TInt ShareFromClientHandle(CFileShare*& aShare);
339 void NameFromShare(CFileShare& aFileShare, TDes& aName);
342 CFsRequest* iFsRequest;
344 friend class RFilePlugin;
351 Helper class for plugins to use to access TEntryArray data
353 class TRawEntryArray : public TEntryArray
356 IMPORT_C TDes8& Buf();
357 IMPORT_C void SetBuf(TDes8& aBuf);
358 IMPORT_C TInt EntrySize(TInt aIdx);
366 Plugin factory class. It is created when RFs::AddPlugin is called.
368 class CFsPluginFactory : public CFsObject
371 IMPORT_C CFsPluginFactory();
372 IMPORT_C ~CFsPluginFactory();
373 IMPORT_C virtual TInt Remove();
374 IMPORT_C void SetLibrary(RLibrary aLib);
375 IMPORT_C RLibrary Library() const;
379 Installs the plugin factory
380 @return KErrNone or one of the system wide errors
382 virtual TInt Install()=0;
386 @return plugin object
388 virtual CFsPlugin* NewPluginL()=0;
391 Returns unique position of the plugin
392 @return unique position of the plugin
394 virtual TInt UniquePosition()=0;
396 TBool IsDriveSupported(TInt aDrive);
397 inline TInt MountedPlugins();
398 inline TInt SupportedDrives(); //aSupportedDrives is a bit mask
400 inline void IncrementMounted();
401 inline void DecrementMounted();
403 TInt iSupportedDrives;
404 inline void SetSupportedDrives(TInt aSupportedDrives); //aSupportedDrives is a bit mask
406 TInt iMountedPlugins;
409 friend class FsPluginManager;
413 A base class for File Server Plugins
415 class CFsPlugin : public CFsObject
419 /** Intercept attribute to specify the order of request handling */
422 EPreIntercept = 0x01, ///< handles the request before the next plugin in chain
423 EPostIntercept = 0x02, ///< handles the request after the next plugin in chain
424 EPrePostIntercept = EPreIntercept | EPostIntercept ///< covers both pre and post intercept
427 IMPORT_C CFsPlugin();
428 IMPORT_C ~CFsPlugin();
430 inline void SetDrive(TInt aDrive);
431 inline virtual TInt SessionDisconnect(CSessionFs* aSession);
433 IMPORT_C virtual void InitialiseL();
434 IMPORT_C virtual TInt Deliver(TFsPluginRequest& aRequest);
435 virtual TInt DoRequestL(TFsPluginRequest& aRequest) = 0;
437 IMPORT_C virtual CFsPluginConn* NewPluginConnL();
439 IMPORT_C TInt RegisterIntercept(TInt aMessage, TInterceptAtts aInterceptAtts);
440 IMPORT_C TInt UnregisterIntercept(TInt aMessage, TInterceptAtts aInterceptAtts);
443 IMPORT_C TInt FileRead(TFsPluginRequest& aRequest, TDes8& aDes, TInt64 aPos);
444 IMPORT_C TInt FileWrite(TFsPluginRequest& aRequest, const TDesC8& aDes, TInt64 aPos);
445 IMPORT_C static TInt ClientRead(TFsPluginRequest& aRequest, TDes8& aDes,TInt aOffset=0);
446 IMPORT_C static TInt ClientWrite(TFsPluginRequest& aRequest, const TDesC8& aDes,TInt aOffset=0);
448 //Overloaded function - checks all types of TInterceptAtts
449 TBool IsRegistered(TInt aMessage);
450 TBool IsRegistered(TInt aMessage, TInterceptAtts aInterceptAtts);
451 TBool IsPluginThread(CFsRequest& aMessage);
452 TBool IsMounted(TInt aDrive);
455 TInt DispatchOperation(TFsPluginRequest& aRequest, TDes8& aDes, TInt64 aPos, TInt aFunction);
456 static TInt Complete(CFsRequest* aRequest, TInt aError);
457 static TInt Complete(CFsRequest* aRequest);
458 TInt WaitForRequest();
463 CPluginThread* iThreadP;
467 The remaining space in this base class in release 9.1 is defined as follows:
468 TUint8 iRegisteredIntercepts[EMaxClientOperations << 1]; 244 bytes
469 TInt iUniquePos; 4 bytes
471 where EMaxClientOperations = 122.
473 Unfortunately, the remaining space in release 9.2+ WAS defined as follows:
474 enum {KIntcArrSize = 123*2};
475 TUint8 iRegisteredIntercepts[KIntcArrSize]; 246 bytes
477 TInt iUniquePos; 4 bytes
480 This meant that a 9.1-compiled plugin running on 9.2+ would have its first data
481 member overwritten when the base class (CFsPlugin) wrote to iUniquePos.
483 To maintain Binary Compatibility (BC), we need to preserve both the (smaller) 9.1
484 and (larger) 9.2+ class sizes.
485 To allow 9.1 plugins to work unchanged on 9.2+ iUniquePos has been moved to BEFORE
486 the iRegisteredIntercepts byte array
488 N.B. - the iRegisteredIntercepts array uses only 2 bits per function, so the
489 array size only needs to be >= EMaxClientOperations/4.
491 enum {KIntcArrSize = 132};
492 TInt iUniquePos; // 4 bytes
493 TUint8 iRegisteredIntercepts[KIntcArrSize]; // 132 bytes
494 TInt iLastError; // 4 bytes
495 TInt iMountedOn; //bitmask // 4 bytes
496 TUint iSpare[26]; // 104 bytes
497 // extra 4 bytes to preserve BC with 9.1 plugins. Don't move !
498 const TUint iReadOnly; // 4 bytes
500 friend class FsPluginManager;
501 friend class CFsRequest;
502 friend class CFsMessageRequest;
503 friend class CFsInternalRequest;
504 friend class CPluginThread;
505 friend class TFsDismountPlugin;
506 friend class TPluginSessionHelper;
507 friend class TFsDirOpen; //For access to TInterceptAtts
510 class TPluginSessionHelper
513 TPluginSessionHelper();
514 TPluginSessionHelper(TFsPluginRequest* aRequest, TBool aDirectToDrive);
515 TInt CreateSubSession(const RSessionBase& aSession,TInt aFunction,const TIpcArgs& aArgs, TInt* aReply);
516 TInt SendReceive(TInt aFunction, const TIpcArgs& aArgs) const;
517 TInt SendReceive(TInt aFunction, const TIpcArgs& aArgs, TInt aSubSessionHandle) const;
518 inline TFsPluginRequest* Request();
520 TInt Dispatch(TInt aFunction, TIpcArgs& aArgs) const;
522 CFsPlugin* iPlugin; // owner; used for setting iCurrentPlugin in CFsMessageRequest
523 CSessionFs* iSession;
524 RLocalMessage iMessage;
525 TBool iDirectToDrive;
526 TFsPluginRequest* iRequest;
531 A class for making file server request internally from within a
534 See also RFilePlugin and RDirPlugin.
539 class RFsPlugin : private RFs
542 IMPORT_C RFsPlugin(TFsPluginRequest& aRequest, TBool aDirectToDrive = EFalse);
543 IMPORT_C ~RFsPlugin();
545 IMPORT_C TInt Connect();
546 IMPORT_C void Close();
548 IMPORT_C TInt Delete(const TDesC& aName);
549 IMPORT_C TInt Rename(const TDesC& anOldName,const TDesC& aNewName);
550 IMPORT_C TInt Replace(const TDesC& anOldName,const TDesC& aNewName);
551 IMPORT_C TInt Entry(const TDesC& aName,TEntry& anEntry) const;
552 IMPORT_C TInt SetEntry(const TDesC& aName,const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
553 IMPORT_C TInt ReadFileSection(const TDesC& aName,TInt64 aPos,TDes8& aDes,TInt aLength) const;
554 IMPORT_C TInt Volume(TVolumeInfo &aVol,TInt aDrive=KDefaultDrive) const;
557 TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
561 RFsPlugin(const RFsPlugin&);
562 RFsPlugin& operator=(const RFsPlugin&);
563 void SetHandle(TInt aHandle);
566 TPluginSessionHelper iSessionHelper;
574 #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
575 class RFilePlugin : private RFile
577 class RFilePlugin : private RFile64
581 IMPORT_C RFilePlugin(TFsPluginRequest& aRequest, TBool aDirectToDrive = EFalse);
582 IMPORT_C ~RFilePlugin();
584 // open a NEW file using same session as passed request
585 IMPORT_C TInt Open(const TDesC& aName,TUint aMode);
586 IMPORT_C TInt Create(const TDesC& aName,TUint aFileMode);
587 IMPORT_C TInt Replace(const TDesC& aName,TUint aFileMode);
588 IMPORT_C TInt Temp(const TDesC& aPath,TFileName& aName,TUint aFileMode);
590 // re-open SAME file as client's request
591 IMPORT_C TInt AdoptFromClient();
593 // Transfer the plugin's open file to the client
594 IMPORT_C TInt TransferToClient();
596 IMPORT_C void Close();
599 IMPORT_C TInt Read(TInt64 aPos,TDes8& aDes) const;
600 IMPORT_C TInt Read(TInt64 aPos,TDes8& aDes,TInt aLength) const;
601 IMPORT_C TInt Write(TInt64 aPos,const TDesC8& aDes);
602 IMPORT_C TInt Write(TInt64 aPos,const TDesC8& aDes,TInt aLength);
603 IMPORT_C TInt Lock(TInt64 aPos,TInt64 aLength) const;
604 IMPORT_C TInt UnLock(TInt64 aPos,TInt64 aLength) const;
605 IMPORT_C TInt Seek(TSeek aMode,TInt64& aPos) const;
606 IMPORT_C TInt Flush();
607 IMPORT_C TInt Size(TInt64& aSize) const;
608 IMPORT_C TInt SetSize(TInt64 aSize);
609 IMPORT_C TInt Att(TUint& aAttValue) const;
610 IMPORT_C TInt SetAtt(TUint aSetAttMask,TUint aClearAttMask);
611 IMPORT_C TInt Modified(TTime& aTime) const;
612 IMPORT_C TInt SetModified(const TTime& aTime);
613 IMPORT_C TInt Set(const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
614 IMPORT_C TInt ChangeMode(TFileMode aNewMode);
615 IMPORT_C TInt Rename(const TDesC& aNewName);
618 // RSubSessionBase overrides
619 TInt CreateSubSession(const RSessionBase& aSession,TInt aFunction,const TIpcArgs& aArgs);
620 TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
621 void CloseSubSession(TInt aFunction);
625 RFilePlugin(const RFilePlugin&);
626 RFilePlugin& operator=(const RFilePlugin&);
628 void SetHandle(TInt aHandle);
629 void SetSubSessionHandle(TInt aHandle);
632 TPluginSessionHelper iSessionHelper;
634 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
635 friend class RFile64;
643 class RDirPlugin : private RDir
646 IMPORT_C RDirPlugin(TFsPluginRequest& aRequest, TBool aDirectToDrive = EFalse);
647 IMPORT_C ~RDirPlugin();
649 IMPORT_C TInt Open(const TDesC& aMatchName,const TUidType& aUidType);
650 IMPORT_C TInt Open(const TDesC& aMatchName,TUint anAttMask);
651 IMPORT_C void Close();
654 Plugin authors should pass in a TRawEntryArray if their intent is to modify the data.
656 IMPORT_C TInt Read(TEntryArray& aArray);
657 IMPORT_C TInt Read(TEntry& aEntry);
660 // RSubSessionBase overrides
661 TInt CreateSubSession(const RSessionBase& aSession,TInt aFunction,const TIpcArgs& aArgs);
662 TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
663 void CloseSubSession(TInt aFunction);
667 RDirPlugin(const RDirPlugin&);
668 RDirPlugin& operator=(const RDirPlugin&);
670 void SetHandle(TInt aHandle);
671 void SetSubSessionHandle(TInt aHandle);
674 TPluginSessionHelper iSessionHelper;
680 class CFsPluginConnRequest : public CBase
683 CFsPluginConnRequest(CFsPluginConn* aPluginConn);
685 inline TInt Function() const;
686 inline TDes8* Param1() const;
687 inline TDes8* Param2() const;
688 inline void WriteParam1L(const TDesC8& aDes) const;
689 inline void WriteParam2L(const TDesC8& aDes) const;
690 inline void ReadParam1L(TDes8& aDes) const;
691 inline void ReadParam2L(TDes8& aDes) const;
692 inline const RMessagePtr2& Message() const;
696 inline void Complete(TInt aError);
698 TInt InitControl(CFsRequest* aRequest);
699 TInt InitRequest(CFsRequest* aRequest);
702 CFsPluginConn& iPluginConn;
707 RMessagePtr2 iMessage;
709 friend class TPluginConnRequestQue;
710 friend class CFsPluginConn;
713 class TPluginConnRequestQue
716 TPluginConnRequestQue();
717 ~TPluginConnRequestQue();
718 void DoAddRequest(CFsPluginConnRequest* aRequest);
719 IMPORT_C void DoCancelAll(TInt aCompletionCode);
721 TDblQue<CFsPluginConnRequest> iHeader;
725 Plugin connection object
727 class CFsPluginConn : public CFsObject
730 IMPORT_C CFsPluginConn();
731 IMPORT_C ~CFsPluginConn();
733 virtual TInt DoControl(CFsPluginConnRequest& aRequest) = 0;
734 virtual void DoRequest(CFsPluginConnRequest& aRequest) = 0;
735 virtual void DoCancel(TInt aReqMask) = 0;
737 inline CFsPlugin* Plugin() const;
738 inline TThreadId ClientId() const;
740 IMPORT_C void Close();
744 TPluginConnRequestQue iRequestQue;
745 friend class FsPluginManager;
748 #include <f32plugin.inl>
750 #endif // __F32PLUGIN_H