userlibandfileserver/fileserver/sfile/sf_std.h
branchRCL_3
changeset 43 c1f20ce4abcf
parent 42 a179b74831c9
child 44 3e88ff8f41d5
equal deleted inserted replaced
42:a179b74831c9 43:c1f20ce4abcf
    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>
       
    38 
    37 
    39 #define __PRINT1TEMP_ALWAYS(t,a) {{TBuf<KMaxFileName>temp(a);RDebug::Print(t,&temp);}}
    38 #define __PRINT1TEMP_ALWAYS(t,a) {{TBuf<KMaxFileName>temp(a);RDebug::Print(t,&temp);}}
    40 #define __PRINT2TEMP_ALWAYS(t,a,b) {{TBuf<KMaxFileName>temp(b);RDebug::Print(t,a,&temp);}}
    39 #define __PRINT2TEMP_ALWAYS(t,a,b) {{TBuf<KMaxFileName>temp(b);RDebug::Print(t,a,&temp);}}
    41 #define __PRINT3TEMP_ALWAYS(t,a,b,c) {{TBuf<KMaxFileName>temp(c);RDebug::Print(t,a,b,&temp);}}
    40 #define __PRINT3TEMP_ALWAYS(t,a,b,c) {{TBuf<KMaxFileName>temp(c);RDebug::Print(t,a,b,&temp);}}
    42 #define __PRINT4TEMP_ALWAYS(t,a,b,c,d) {{TBuf<KMaxFileName>temp(d);RDebug::Print(t,a,b,c,&temp);}}
    41 #define __PRINT4TEMP_ALWAYS(t,a,b,c,d) {{TBuf<KMaxFileName>temp(d);RDebug::Print(t,a,b,c,&temp);}}
   242 	TUint8* iTempData;
   241 	TUint8* iTempData;
   243 	};
   242 	};
   244 
   243 
   245 enum TFsPanic
   244 enum TFsPanic
   246 	{
   245 	{
   247 	ELdrImportedOrdinalDoesNotExist,
   246 	ELdrImportedOrdinalDoesNotExist	
   248 	ELdrHeapCorruptionOnRemove
       
   249 	};
   247 	};
   250 //
   248 //
   251 enum TFsFault
   249 enum TFsFault
   252 	{
   250 	{
   253 	EDrvIllegalShareValue,			//0
   251 	EDrvIllegalShareValue,			//0
   451 	ECacheMemoryManagerCreateFailed,
   449 	ECacheMemoryManagerCreateFailed,
   452 	EFileBodyIsNull,
   450 	EFileBodyIsNull,
   453 	ETraceLddLoadFailure,				//200
   451 	ETraceLddLoadFailure,				//200
   454 	ETooManyDrivesPerSocket,
   452 	ETooManyDrivesPerSocket,
   455 	ENotificationFault,
   453 	ENotificationFault,
   456 	EFsObjectOpen
   454 	EFsObjectOpen,
       
   455 	EContainerHeapCorruptionOnRemove
   457 	};
   456 	};
   458 
   457 
   459 
   458 
   460 NONSHARABLE_CLASS(CFsObjectConIx) : public CBase
   459 NONSHARABLE_CLASS(CFsObjectConIx) : public CBase
   461 	{
   460 	{
   808 
   807 
   809 class CFsPlugin;
   808 class CFsPlugin;
   810 NONSHARABLE_CLASS(CPluginThread) : public CRequestThread
   809 NONSHARABLE_CLASS(CPluginThread) : public CRequestThread
   811 	{
   810 	{
   812 public:
   811 public:
   813 	CPluginThread(CFsPlugin& aPlugin);
   812 	CPluginThread(CFsPlugin& aPlugin, RLibrary aLibrary);
   814 	~CPluginThread();
   813 	~CPluginThread();
   815 	
   814 	
   816 	void CompleteSessionRequests(CSessionFs* aSession, TInt aValue);
   815 	void CompleteSessionRequests(CSessionFs* aSession, TInt aValue);
   817 
   816 
   818 	/** @prototype */
   817 	/** @prototype */
   820 
   819 
   821 	/** @prototype */
   820 	/** @prototype */
   822 	void OperationLockSignal();
   821 	void OperationLockSignal();
   823 
   822 
   824 private:
   823 private:
   825 	static CPluginThread* NewL(CFsPlugin& aPlugin);
   824 	static CPluginThread* NewL(CFsPlugin& aPlugin, RLibrary aLibrary);
   826 	TUint StartL();
   825 	TUint StartL();
   827 	virtual TInt DoThreadInitialise();
   826 	virtual TInt DoThreadInitialise();
   828 private:
   827 private:
   829 	CFsPlugin& iPlugin;
   828 	CFsPlugin& iPlugin;
   830 
   829 
   831 	/** @prototype */
   830 	/** @prototype */
   832 	RSemaphore iOperationLock;
   831 	RSemaphore iOperationLock;
   833 
   832 
       
   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;
       
  1720 
  1719 
  1721 extern SCapabilitySet AllCapabilities;
  1720 extern SCapabilitySet AllCapabilities;
  1722 extern SCapabilitySet DisabledCapabilities;
  1721 extern SCapabilitySet DisabledCapabilities;
  1723 
  1722 
  1724 const TInt KDispatchObjectClose=KMaxTInt-1;
  1723 const TInt KDispatchObjectClose=KMaxTInt-1;
  1873 	CFileCB* iFileCB;
  1872 	CFileCB* iFileCB;
  1874 	CFileCB::MExtendedFileInterface* iExtendedFileInterface;
  1873 	CFileCB::MExtendedFileInterface* iExtendedFileInterface;
  1875 	TInt iFairSchedulingLen;
  1874 	TInt iFairSchedulingLen;
  1876 	TBool iNotifyAsyncReadersPending;
  1875 	TBool iNotifyAsyncReadersPending;
  1877 	TBool iDeleteOnClose;
  1876 	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
  1892 
  1895 
  1893 public:
  1896 public:
  1894 	// Provides support for large file size ( file size > 4GB - 1)
  1897 	// Provides support for large file size ( file size > 4GB - 1)
  1895 	// Upper / High 32 bit word of the file size is saved here.
  1898 	// Upper / High 32 bit word of the file size is saved here.
  1896 	// This can be non-zero only if the CFileShare::iMode is ORed with EFileBigFile
  1899 	// This can be non-zero only if the CFileShare::iMode is ORed with EFileBigFile
  1956 	{
  1959 	{
  1957 public:
  1960 public:
  1958 	RLibrary iLibrary;
  1961 	RLibrary iLibrary;
  1959 	};
  1962 	};
  1960 
  1963 
  1961 
       
  1962 #include "sf_ops.h"
  1964 #include "sf_ops.h"
  1963 #include "sf_std.inl"
  1965 #include "sf_std.inl"
  1964 
  1966 
  1965 
  1967 
  1966 #endif //SF_STD_H
  1968 #endif //SF_STD_H