userlibandfileserver/fileserver/sfile/sf_std.h
changeset 200 73ea206103e6
parent 152 657f875b013e
child 201 43365a9b78a3
equal deleted inserted replaced
152:657f875b013e 200:73ea206103e6
   111 #define __PLUGIN_PRINT(t)
   111 #define __PLUGIN_PRINT(t)
   112 #define __PLUGIN_PRINT1(t,a)
   112 #define __PLUGIN_PRINT1(t,a)
   113 #define __PLUGIN_PRINT2(t,a,b)
   113 #define __PLUGIN_PRINT2(t,a,b)
   114 #define __PLUGIN_PRINT3(t,a,b,c)
   114 #define __PLUGIN_PRINT3(t,a,b,c)
   115 #endif
   115 #endif
       
   116 
       
   117 #define _LOFF(p,T,f) ((T*)(((TUint8*)(p))-_FOFF(T,f)))
   116 
   118 
   117 const TInt KMaxTotalDriveReserved	=0x100000;
   119 const TInt KMaxTotalDriveReserved	=0x100000;
   118 const TInt KMaxSessionDriveReserved	=0x10000;
   120 const TInt KMaxSessionDriveReserved	=0x10000;
   119 
   121 
   120 // If TFsFileDuplciate::DoRequestL() is called a new sub-session is created and 
   122 // If TFsFileDuplciate::DoRequestL() is called a new sub-session is created and 
   805 
   807 
   806 class CFsPlugin;
   808 class CFsPlugin;
   807 NONSHARABLE_CLASS(CPluginThread) : public CRequestThread
   809 NONSHARABLE_CLASS(CPluginThread) : public CRequestThread
   808 	{
   810 	{
   809 public:
   811 public:
   810 	CPluginThread(CFsPlugin& aPlugin);
   812 	CPluginThread(CFsPlugin& aPlugin, RLibrary aLibrary);
   811 	~CPluginThread();
   813 	~CPluginThread();
   812 	
   814 	
   813 	void CompleteSessionRequests(CSessionFs* aSession, TInt aValue);
   815 	void CompleteSessionRequests(CSessionFs* aSession, TInt aValue);
   814 
   816 
   815 	/** @prototype */
   817 	/** @prototype */
   817 
   819 
   818 	/** @prototype */
   820 	/** @prototype */
   819 	void OperationLockSignal();
   821 	void OperationLockSignal();
   820 
   822 
   821 private:
   823 private:
   822 	static CPluginThread* NewL(CFsPlugin& aPlugin);
   824 	static CPluginThread* NewL(CFsPlugin& aPlugin, RLibrary aLibrary);
   823 	TUint StartL();
   825 	TUint StartL();
   824 	virtual TInt DoThreadInitialise();
   826 	virtual TInt DoThreadInitialise();
   825 private:
   827 private:
   826 	CFsPlugin& iPlugin;
   828 	CFsPlugin& iPlugin;
   827 
   829 
   828 	/** @prototype */
   830 	/** @prototype */
   829 	RSemaphore iOperationLock;
   831 	RSemaphore iOperationLock;
   830 
   832 
       
   833 	RLibrary iLib;	// contains a handle to the library	which created the plugin
   831 friend class FsPluginManager;
   834 friend class FsPluginManager;
   832 	};
   835 	};
   833 
   836 
   834 class TFsDriveThread
   837 class TFsDriveThread
   835 	{
   838 	{
  1309 	inline TInt& LastError();
  1312 	inline TInt& LastError();
  1310 	inline void SetLastError(TInt aLastError);
  1313 	inline void SetLastError(TInt aLastError);
  1311 	inline void Init();
  1314 	inline void Init();
  1312 	void ReStart();
  1315 	void ReStart();
  1313 	TBool IsPluginRequest();
  1316 	TBool IsPluginRequest();
       
  1317 	static inline CFsMessageRequest* RequestFromMessage(const RMessagePtr2& aMessage);
  1314 	
  1318 	
  1315    // UID of the process to touching the file. (To be used in notification framework).
  1319    // UID of the process to touching the file. (To be used in notification framework).
  1316    // TUid iUID;
  1320    // TUid iUID;
  1317 private:
  1321 private:
  1318 	void DoNotify(TInt aError);
  1322 	void DoNotify(TInt aError);