userlibandfileserver/fileserver/inc/f32fsys.h
changeset 286 48e57fb1237e
parent 273 6a75fa55495f
child 299 b5a01337d018
equal deleted inserted replaced
285:ff5437e4337c 286:48e57fb1237e
   249 	IMPORT_C virtual void Close();
   249 	IMPORT_C virtual void Close();
   250 	IMPORT_C TInt SetName(const TDesC* aName);
   250 	IMPORT_C TInt SetName(const TDesC* aName);
   251 	IMPORT_C TName Name() const;
   251 	IMPORT_C TName Name() const;
   252 	IMPORT_C virtual TBool IsCorrectThread();
   252 	IMPORT_C virtual TBool IsCorrectThread();
   253 	inline CFsObjectCon* Container() const;
   253 	inline CFsObjectCon* Container() const;
   254 	inline TInt AccessCount() const;
       
   255 protected:
   254 protected:
   256 	void DoClose();
   255 	void DoClose();
   257 	TInt UniqueID() const;
   256 	TInt UniqueID() const;
   258 	inline TInt Inc();
   257 	inline TInt Inc();
   259 	inline TInt Dec();
   258 	inline TInt Dec();
   467     inline void SetSynchronous(TBool aIsSynch);
   466     inline void SetSynchronous(TBool aIsSynch);
   468 
   467 
   469 	TInt DismountProxyDrive();
   468 	TInt DismountProxyDrive();
   470     TInt ForceUnmountFileSystemForFormatting();
   469     TInt ForceUnmountFileSystemForFormatting();
   471 
   470 
   472 public:
   471 	void DismountClientAdded();
       
   472 	void DismountClientRemoved();
       
   473 	TInt DismountClientCount();
       
   474 	TInt DeferredDismountCheck();
       
   475 
   473 	void DismountLock();
   476 	void DismountLock();
   474 	TInt DismountUnlock();
   477 	TInt DismountUnlock();
   475 	TInt DismountLocked() const;
   478 	TInt DismountLocked() const;
   476 	void SetDismountDeferred(TBool aPending);
   479 	void SetDismountDeferred(TBool aPending);
   477 	void ForceDismount();
   480 	void ForceDismount();
   516 	TBool ReMount();
   519 	TBool ReMount();
   517 	IMPORT_C TBool IsDriveThread() const;
   520 	IMPORT_C TBool IsDriveThread() const;
   518 	IMPORT_C TBool IsMainThread() const;
   521 	IMPORT_C TBool IsMainThread() const;
   519 	IMPORT_C void DriveFault(TBool aDriveError) const;
   522 	IMPORT_C void DriveFault(TBool aDriveError) const;
   520     void DoDismount();
   523     void DoDismount();
   521     void DoCompleteDismountNotify(TInt aCompletionCode);
       
   522 
   524 
   523 private:
   525 private:
   524 	
   526 	
   525     //-- intrinsic TDrive flags. Used in iDriveFlags.
   527     //-- intrinsic TDrive flags. Used in iDriveFlags.
   526     enum 
   528     enum 
   527 	    { 
   529 	    { 
   528         ENotifyOff       = 0x01, 
   530         ENotifyOff       = 0x01, 
   529         EDismountDeferred= 0x02,
   531         EDismountDeferred= 0x02,	// Dismount initiated, waiting for clients to respond with EFsAllowDismount or files to become unclamped
   530         ENotRugged       = 0x04, 
   532         ENotRugged       = 0x04, 
   531         EClampPresent    = 0x08,
   533         EClampPresent    = 0x08,
   532         EDriveIsSynch    = 0x10, //-- is set on mount when the drive is synchronous (doesn't have its own thread)
   534         EDriveIsSynch    = 0x10, //-- is set on mount when the drive is synchronous (doesn't have its own thread)
   533 		};	
   535 		};	
   534 
   536 
   548 	TInt            iDriveFlags;   ///< intrinsic TDrive flags
   550 	TInt            iDriveFlags;   ///< intrinsic TDrive flags
   549 	TInt            iReservedSpace;
   551 	TInt            iReservedSpace;
   550 	TInt            iDismountLock;
   552 	TInt            iDismountLock;
   551 	TInt            iMountFailures;		// number of times the mount has failed
   553 	TInt            iMountFailures;		// number of times the mount has failed
   552 	TInt            iLastMountError;
   554 	TInt            iLastMountError;
   553 
   555 	
   554 	TInt iSpare1;			
   556 	TInt iDismountClientCount;	// number of EFsAllowDismount requests pending following a EFsDismountNotifyClients request
   555 	TInt iSpare2;
   557 	CFsInternalRequest* iDeferredDismountRequest;
   556 
   558 
   557 	
   559 	
   558 	friend class LocalDrives;			// for access to iChanged flag
   560 	friend class LocalDrives;			// for access to iChanged flag
   559 	friend class CExtNotifyMediaChange; // for access to iChanged flag
   561 	friend class CExtNotifyMediaChange; // for access to iChanged flag
   560 	
   562 	
  2036 	CFileShare(CFileCB* aFileCB);
  2038 	CFileShare(CFileCB* aFileCB);
  2037 	~CFileShare();
  2039 	~CFileShare();
  2038 	TInt CheckMount();
  2040 	TInt CheckMount();
  2039 	void InitL();
  2041 	void InitL();
  2040 	inline CFileCB& File();
  2042 	inline CFileCB& File();
  2041 
       
  2042 	// override CFsDispatchObject::Close() so that we can flush dirty data
       
  2043 	void Close();
       
  2044 
  2043 
  2045 	// For serialising aync requests 
  2044 	// For serialising aync requests 
  2046 	TBool RequestStart(CFsMessageRequest* aRequest);
  2045 	TBool RequestStart(CFsMessageRequest* aRequest);
  2047 	void RequestEnd(CFsMessageRequest* aRequest);
  2046 	void RequestEnd(CFsMessageRequest* aRequest);
  2048 	TBool RequestInProgress() const;
  2047 	TBool RequestInProgress() const;