userlibandfileserver/fileserver/sfile/sf_std.h
branchRCL_3
changeset 257 3e88ff8f41d5
parent 256 c1f20ce4abcf
child 294 039a3e647356
equal deleted inserted replaced
256:c1f20ce4abcf 257:3e88ff8f41d5
    32 #include <e32const_private.h>
    32 #include <e32const_private.h>
    33 #include "sf_plugin.h"
    33 #include "sf_plugin.h"
    34 #include "sf_func.h"
    34 #include "sf_func.h"
    35 #include <f32plugin.h>
    35 #include <f32plugin.h>
    36 #include "f32trace.h"
    36 #include "f32trace.h"
       
    37 #include <utraceefile.h>
    37 
    38 
    38 #define __PRINT1TEMP_ALWAYS(t,a) {{TBuf<KMaxFileName>temp(a);RDebug::Print(t,&temp);}}
    39 #define __PRINT1TEMP_ALWAYS(t,a) {{TBuf<KMaxFileName>temp(a);RDebug::Print(t,&temp);}}
    39 #define __PRINT2TEMP_ALWAYS(t,a,b) {{TBuf<KMaxFileName>temp(b);RDebug::Print(t,a,&temp);}}
    40 #define __PRINT2TEMP_ALWAYS(t,a,b) {{TBuf<KMaxFileName>temp(b);RDebug::Print(t,a,&temp);}}
    40 #define __PRINT3TEMP_ALWAYS(t,a,b,c) {{TBuf<KMaxFileName>temp(c);RDebug::Print(t,a,b,&temp);}}
    41 #define __PRINT3TEMP_ALWAYS(t,a,b,c) {{TBuf<KMaxFileName>temp(c);RDebug::Print(t,a,b,&temp);}}
    41 #define __PRINT4TEMP_ALWAYS(t,a,b,c,d) {{TBuf<KMaxFileName>temp(d);RDebug::Print(t,a,b,c,&temp);}}
    42 #define __PRINT4TEMP_ALWAYS(t,a,b,c,d) {{TBuf<KMaxFileName>temp(d);RDebug::Print(t,a,b,c,&temp);}}
   241 	TUint8* iTempData;
   242 	TUint8* iTempData;
   242 	};
   243 	};
   243 
   244 
   244 enum TFsPanic
   245 enum TFsPanic
   245 	{
   246 	{
   246 	ELdrImportedOrdinalDoesNotExist	
   247 	ELdrImportedOrdinalDoesNotExist,
       
   248 	ELdrHeapCorruptionOnRemove
   247 	};
   249 	};
   248 //
   250 //
   249 enum TFsFault
   251 enum TFsFault
   250 	{
   252 	{
   251 	EDrvIllegalShareValue,			//0
   253 	EDrvIllegalShareValue,			//0
   449 	ECacheMemoryManagerCreateFailed,
   451 	ECacheMemoryManagerCreateFailed,
   450 	EFileBodyIsNull,
   452 	EFileBodyIsNull,
   451 	ETraceLddLoadFailure,				//200
   453 	ETraceLddLoadFailure,				//200
   452 	ETooManyDrivesPerSocket,
   454 	ETooManyDrivesPerSocket,
   453 	ENotificationFault,
   455 	ENotificationFault,
   454 	EFsObjectOpen,
   456 	EFsObjectOpen
   455 	EContainerHeapCorruptionOnRemove
       
   456 	};
   457 	};
   457 
   458 
   458 
   459 
   459 NONSHARABLE_CLASS(CFsObjectConIx) : public CBase
   460 NONSHARABLE_CLASS(CFsObjectConIx) : public CBase
   460 	{
   461 	{
   807 
   808 
   808 class CFsPlugin;
   809 class CFsPlugin;
   809 NONSHARABLE_CLASS(CPluginThread) : public CRequestThread
   810 NONSHARABLE_CLASS(CPluginThread) : public CRequestThread
   810 	{
   811 	{
   811 public:
   812 public:
   812 	CPluginThread(CFsPlugin& aPlugin, RLibrary aLibrary);
   813 	CPluginThread(CFsPlugin& aPlugin);
   813 	~CPluginThread();
   814 	~CPluginThread();
   814 	
   815 	
   815 	void CompleteSessionRequests(CSessionFs* aSession, TInt aValue);
   816 	void CompleteSessionRequests(CSessionFs* aSession, TInt aValue);
   816 
   817 
   817 	/** @prototype */
   818 	/** @prototype */
   819 
   820 
   820 	/** @prototype */
   821 	/** @prototype */
   821 	void OperationLockSignal();
   822 	void OperationLockSignal();
   822 
   823 
   823 private:
   824 private:
   824 	static CPluginThread* NewL(CFsPlugin& aPlugin, RLibrary aLibrary);
   825 	static CPluginThread* NewL(CFsPlugin& aPlugin);
   825 	TUint StartL();
   826 	TUint StartL();
   826 	virtual TInt DoThreadInitialise();
   827 	virtual TInt DoThreadInitialise();
   827 private:
   828 private:
   828 	CFsPlugin& iPlugin;
   829 	CFsPlugin& iPlugin;
   829 
   830 
   830 	/** @prototype */
   831 	/** @prototype */
   831 	RSemaphore iOperationLock;
   832 	RSemaphore iOperationLock;
   832 
   833 
   833 	RLibrary iLib;	// contains a handle to the library	which created the plugin
       
   834 friend class FsPluginManager;
   834 friend class FsPluginManager;
   835 	};
   835 	};
   836 
   836 
   837 class TFsDriveThread
   837 class TFsDriveThread
   838 	{
   838 	{
  1714 extern CServerFs* TheFileServer;
  1714 extern CServerFs* TheFileServer;
  1715 
  1715 
  1716 extern HBufC* TheDriveNames[];
  1716 extern HBufC* TheDriveNames[];
  1717 extern TDrive TheDrives[KMaxDrives];
  1717 extern TDrive TheDrives[KMaxDrives];
  1718 extern TFileName TheDefaultPath;
  1718 extern TFileName TheDefaultPath;
       
  1719 extern RFTrace TheFtrace;
  1719 
  1720 
  1720 extern SCapabilitySet AllCapabilities;
  1721 extern SCapabilitySet AllCapabilities;
  1721 extern SCapabilitySet DisabledCapabilities;
  1722 extern SCapabilitySet DisabledCapabilities;
  1722 
  1723 
  1723 const TInt KDispatchObjectClose=KMaxTInt-1;
  1724 const TInt KDispatchObjectClose=KMaxTInt-1;
  1872 	CFileCB* iFileCB;
  1873 	CFileCB* iFileCB;
  1873 	CFileCB::MExtendedFileInterface* iExtendedFileInterface;
  1874 	CFileCB::MExtendedFileInterface* iExtendedFileInterface;
  1874 	TInt iFairSchedulingLen;
  1875 	TInt iFairSchedulingLen;
  1875 	TBool iNotifyAsyncReadersPending;
  1876 	TBool iNotifyAsyncReadersPending;
  1876 	TBool iDeleteOnClose;
  1877 	TBool iDeleteOnClose;
  1877 	TDblQue<CFileShare> iShareList;	// A list containing the CFileShare objects associated with the file
       
  1878 
  1878 
  1879 protected:
  1879 protected:
  1880 	TInt iPromotedShares;
  1880 	TInt iPromotedShares;
  1881 	RArray<TAsyncReadRequest>* iAsyncReadRequests;
  1881 	RArray<TAsyncReadRequest>* iAsyncReadRequests;
  1882 	CFileCache* iFileCache;	// pointer to owner CFileCache 
  1882 	CFileCache* iFileCache;	// pointer to owner CFileCache 
  1883 	TBool iLocalBufferSupport;
  1883 	TBool iLocalBufferSupport;
  1884 
  1884 
  1885     /** 
  1885     /** 
  1886     maximum file size supported by the filesystem that instantiates the CFileCB, associated with this object.
  1886     maximum file size supported by the filesystem that instantiates the CFileCB, associated with this object.
  1887     For example, FAT32 supports files not larger than 4GB-1. Other file systems can support larger files.
  1887     For example, FAT32 supports files not larger than 4GB-1. Other file systems can support larger files. 
  1888     This member allows file server to know maximum allowed position in the file.
  1888     This member allows file server to know maximum allowed position in the file.
  1889     The default value is KMaxTUint64
  1889     The default value is KMaxTUint64
  1890     */
  1890     */
  1891     TUint64 iMaxSupportedFileSize;
  1891     TUint64 iMaxSupportedFileSize; 
  1892     
       
  1893     TInt iNonSequentialFileModes;	// Count of clients without the 'Sequential' mode enabled
       
  1894 	TBool iSequential;				// Indicates whether the file is in 'Sequential' mode
       
  1895 
  1892 
  1896 public:
  1893 public:
  1897 	// Provides support for large file size ( file size > 4GB - 1)
  1894 	// Provides support for large file size ( file size > 4GB - 1)
  1898 	// Upper / High 32 bit word of the file size is saved here.
  1895 	// Upper / High 32 bit word of the file size is saved here.
  1899 	// This can be non-zero only if the CFileShare::iMode is ORed with EFileBigFile
  1896 	// This can be non-zero only if the CFileShare::iMode is ORed with EFileBigFile
  1959 	{
  1956 	{
  1960 public:
  1957 public:
  1961 	RLibrary iLibrary;
  1958 	RLibrary iLibrary;
  1962 	};
  1959 	};
  1963 
  1960 
       
  1961 
  1964 #include "sf_ops.h"
  1962 #include "sf_ops.h"
  1965 #include "sf_std.inl"
  1963 #include "sf_std.inl"
  1966 
  1964 
  1967 
  1965 
  1968 #endif //SF_STD_H
  1966 #endif //SF_STD_H