diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-2E4C50DE-AF0A-5393-A1FB-F739653EB727.dita
--- a/Symbian3/PDK/Source/GUID-2E4C50DE-AF0A-5393-A1FB-F739653EB727.dita Tue Jul 20 12:00:49 2010 +0100
+++ b/Symbian3/PDK/Source/GUID-2E4C50DE-AF0A-5393-A1FB-F739653EB727.dita Fri Aug 13 16:47:46 2010 +0100
@@ -1,199 +1,199 @@
-
-
-
-
-
-Interfacing
-File Systems to the 64-bit File ServerDescribes the changes to existing file system interface APIs.
-Introduction64-bit
-versions of some functions have been added to the plugin framework to allow
-you to handle large files. Other functions have been modified that they may
-now handle larger files. Changes you may need to make to existing code are
-detailed here.
This is a list of 32-bit functions that have been replaced
-with 64-bit equivalents to enable large files to be handled:
- CFileCB::Size()
- CFileCB::SetSize(TInt
-aSize)
- CFileCB::ReadL(TInt
-aPos,TInt& aLength,const TAny* aDes,const RMessagePtr2& aMessage)
- CFileCB::WriteL(TInt
-aPos,TInt& aLength,const TAny* aDes,const RMessagePtr2& aMessage)
- CFileCB::SetSizeL(TInt
-aSize)
- CMountCB::ReadSectionL(const
-TDesC& aName,TInt aPos,TAny* aTrg,TInt aLength,const RMessagePtr2&
-aMessage)
-
-Using the CFileCB
-functions Size() and SetSize()New functions have been added to
-the class CFileCB to allow the handling of 64-bit file
-sizes. File system plugins using the existing 32-bit functions to support
-large files should replace these with the 64-bit functions:
-use CFileCB::Sze64() instead
-of CFileCB::Size()
-use CFileCB::SetSize64(TInt64
-aSize, TBool aDriveLocked) instead of CFileCB::SetSize(TInt
-aSize).
-Replace 32-bit function
-calls by 64-bit function calls and change TInt variables
-to TInt64. CFileCB file;
-TInt64 iSize;
-...
-file->SetSize64(iSize, EFalse);
-
The 32-bit versions of these functions are used widely by the
-file server and the file system. Alter calls to the 32-bit versions of these
-functions to handle large files.
-Using the CFileCB
-functions ReadL(), WriteL() and SetSizeL()If you use the ReadL(), WriteL() and SetSize() functions, you must modify the implementation to replace them with their
-64-bit versions:
- ReadL(TInt64
-aPos, TInt& aLength, TDes8* aDes, const RMessagePtr2& aMessage, TInt
-aOffset)
- WriteL(TInt64
-aPos, TInt& aLength, const TDesC8* aDes, const RMessagePtr2& aMessage,
-TInt aOffset)
- SetSizeL(TInt64
-aSize)
-
The file system plugin developer must implement the extended interface
-class CFileCB::MExtendedFileInterface to perform 64-bit
-file accesses.The file server retrieves the extended interface by calling CFileCB::GetInterface() with EExtendedFileInterface as an argument. Sub-classes of CFileCB that support large
-file access will need to inherit this class and implement the interface.
-Derive CYourFileSystemFileCB from
-the classes CFileCB and CFileCB::MExtendedFileInterface.
class CYourFileSystemFileCB : public CFileCB,
- ...
- public CFileCB::MExtendedFileInterface
- {
-public:
- // Implement this function to return the CFileCB::MExtendedFileInterface
- // interface pointer to the file server.
-
- virtual TInt GetInterface(TInt aInterfaceId,
- TAny*& aInterface,
- TAny* aInput);
-
-public:
- // Implement the CFileCB::MExtendedFileInterface interface extension functions
- // for 64-bit Read, Write and SetSize.
- virtual void ReadL(TInt64 aPos,
- TInt& aLength,
- TDes8* aDes,
- const RMessagePtr2& aMessage,
- TInt aOffset);
- virtual void WriteL(TInt64 aPos,
- TInt& aLength,
- const TDesC8* aDes,
- const RMessagePtr2& aMessage,
- TInt aOffset);
- virtual void SetSizeL(TInt64 aSize);
- ...
- }
-In the function CYourFileSystemFileCB::GetInterface(),
-return the pointer to a CYourFileSystemFileCB object through
-the aInterface output parameter when the input parameter aInterfaceId is CFileCB::TInterfaceId::EExtendedFileInterface. This enables the file server to invoke the 64-bit functions for file access.
TInt CYourFileSystemFileCB::GetInterface(TInt aInterfaceId,
- TAny*& aInterface,
- TAny* aInput)
- {
- switch(aInterfaceId)
- {
- // For supporting large file ReadFileSection
- case CFileCB::EExtendedFileInterface:
- aInterface = (CFileCB::MExtendedFileInterface*) (this);
- return KErrNone;
- ...
- default:
- return(CFileCB::GetInterface(aInterfaceId, aInterface, aInput));
- }
- }
-Implement the CFileCB::MExtendedFileInterface functions ReadL(), WriteL() and SetSizeL() in CYourFileSystemFileCB class
-to provide the 64-bit file access functionality.
void CYourFileSystemFileCB::ReadL(TInt64 aPos,
- TInt& aLength,
- TDes8* aDes,
- const RMessagePtr2& aMessage,
- TInt aOffset)
- {
- // 64-bit Read implementation.
- ...
- }
-
-void CYourFileSystemFileCB::WriteL(TInt64 aPos,
- TInt& aLength,
- const TDesC8* aDes,
- const RMessagePtr2& aMessage,
- TInt aOffset)
- {
- // 64-bit Write implementation.
- ...
- }
-
-void CYourFileSystemFileCB::SetSizeL(TInt64 aSize)
- {
- // 64-bit Set Size implementation.
- ...
- }
-
The CFileCB::MExtendedFileInterface also
-supports fair scheduling. Implementations of the functions CFileCB::MExtendedFileInterface::ReadL() and CFileCB::MExtendedFileInterface::WriteL() should also support Fair
-scheduling.
-Using the CMountCB
-function ReadSectionL()To enable large files access, calls to the
-32-bit CMountCB::ReadSectionL() function should be replaced
-by calls to the 64-bit CMountCB::ReadSection64L() function.
ReadSection64L(const TDesC& aName, TInt64 aPos, TAny* aTrg, TInt aLength, const RMessagePtr2& aMessage) To enable 64-bit file access, you must implement the extended interface
-class CMountCB::MFileExtendedInterface.
The file
-server retrieves the interface by calling CMountCB::GetInterface() with EFileExtendedInterface as
-an argument. Sub-classes of CMountCB that support large
-file accesses need to inherit this class and implement the interface.
-Derive CYourFileSystemMountCB from
-the classes CMountCB::MFileAccessor and CMountCB.
class CYourFileSystemMountCB : public CMountCB, public CMountCB::MFileAccessor
- {
- ...
-
-public:
- // Implement this function to return the CMountCB::MFileExtendedInterface
- // interface pointer to file server.
- virtual TInt GetInterface(TInt aInterfaceId,
- TAny*& aInterface,
- TAny* aInput);
- ...
-
-public:
- // The CMountCB::MFileExtendedInterface interface extension function
- // for 64-bit read file section implementation
- virtual void ReadSection64L(const TDesC& aName,
- TInt64 aPos,
- TAny* aTrg,
- TInt aLength,
- const RMessagePtr2& aMessage);
- ...
- }
-When your implementation
-of GetInterface() is passed TInterfaceIds::EFileAccessor through
-the aInterfaceId parameter, return a pointer to the CYourFileSystemMountCB object
-through the aInterface output parameter.
TInt CYourFileSystemMountCB::GetInterface(TInt aInterfaceId, TAny*& aInterface, TAny* aInput)
- {
- switch(aInterfaceId)
- {
- case (CMountCB::EFileAccessor):
- ((CMountCB::MFileAccessor*&) aInterface) = this;
- return KErrNone;
- ...
- default:
- return(CMountCB::GetInterface(aInterfaceId, aInterface, aInput));
- }
- }
-Implement CYourFileSystemMountCB::ReadSection64L() to
-perform a 64-bit read from a file.
void CYourFileSystemMountCB::ReadSection64L(const TDesC& aName,
- TInt64 aPos,
- TAny* aTrg,
- TInt aLength,
- const RMessagePtr2& aMessage)
- {
- // 64-bit Read File Section implementation.
- ...
- }
-
+
+
+
+
+
+Interfacing
+File Systems to the 64-bit File ServerDescribes the changes to existing file system interface APIs.
+Introduction64-bit
+versions of some functions have been added to the plugin framework to allow
+you to handle large files. Other functions have been modified that they may
+now handle larger files. Changes you may need to make to existing code are
+detailed here.
This is a list of 32-bit functions that have been replaced
+with 64-bit equivalents to enable large files to be handled:
+ CFileCB::Size()
+ CFileCB::SetSize(TInt
+aSize)
+ CFileCB::ReadL(TInt
+aPos,TInt& aLength,const TAny* aDes,const RMessagePtr2& aMessage)
+ CFileCB::WriteL(TInt
+aPos,TInt& aLength,const TAny* aDes,const RMessagePtr2& aMessage)
+ CFileCB::SetSizeL(TInt
+aSize)
+ CMountCB::ReadSectionL(const
+TDesC& aName,TInt aPos,TAny* aTrg,TInt aLength,const RMessagePtr2&
+aMessage)
+
+Using the CFileCB
+functions Size() and SetSize()New functions have been added to
+the class CFileCB to allow the handling of 64-bit file
+sizes. File system plugins using the existing 32-bit functions to support
+large files should replace these with the 64-bit functions:
+use CFileCB::Sze64() instead
+of CFileCB::Size()
+use CFileCB::SetSize64(TInt64
+aSize, TBool aDriveLocked) instead of CFileCB::SetSize(TInt
+aSize).
+Replace 32-bit function
+calls by 64-bit function calls and change TInt variables
+to TInt64. CFileCB file;
+TInt64 iSize;
+...
+file->SetSize64(iSize, EFalse);
+
The 32-bit versions of these functions are used widely by the
+file server and the file system. Alter calls to the 32-bit versions of these
+functions to handle large files.
+Using the CFileCB
+functions ReadL(), WriteL() and SetSizeL()If you use the ReadL(), WriteL() and SetSize() functions, you must modify the implementation to replace them with their
+64-bit versions:
+ ReadL(TInt64
+aPos, TInt& aLength, TDes8* aDes, const RMessagePtr2& aMessage, TInt
+aOffset)
+ WriteL(TInt64
+aPos, TInt& aLength, const TDesC8* aDes, const RMessagePtr2& aMessage,
+TInt aOffset)
+ SetSizeL(TInt64
+aSize)
+
The file system plugin developer must implement the extended interface
+class CFileCB::MExtendedFileInterface to perform 64-bit
+file accesses.The file server retrieves the extended interface by calling CFileCB::GetInterface() with EExtendedFileInterface as an argument. Sub-classes of CFileCB that support large
+file access will need to inherit this class and implement the interface.
+Derive CYourFileSystemFileCB from
+the classes CFileCB and CFileCB::MExtendedFileInterface.
class CYourFileSystemFileCB : public CFileCB,
+ ...
+ public CFileCB::MExtendedFileInterface
+ {
+public:
+ // Implement this function to return the CFileCB::MExtendedFileInterface
+ // interface pointer to the file server.
+
+ virtual TInt GetInterface(TInt aInterfaceId,
+ TAny*& aInterface,
+ TAny* aInput);
+
+public:
+ // Implement the CFileCB::MExtendedFileInterface interface extension functions
+ // for 64-bit Read, Write and SetSize.
+ virtual void ReadL(TInt64 aPos,
+ TInt& aLength,
+ TDes8* aDes,
+ const RMessagePtr2& aMessage,
+ TInt aOffset);
+ virtual void WriteL(TInt64 aPos,
+ TInt& aLength,
+ const TDesC8* aDes,
+ const RMessagePtr2& aMessage,
+ TInt aOffset);
+ virtual void SetSizeL(TInt64 aSize);
+ ...
+ }
+In the function CYourFileSystemFileCB::GetInterface(),
+return the pointer to a CYourFileSystemFileCB object through
+the aInterface output parameter when the input parameter aInterfaceId is CFileCB::TInterfaceId::EExtendedFileInterface. This enables the file server to invoke the 64-bit functions for file access.
TInt CYourFileSystemFileCB::GetInterface(TInt aInterfaceId,
+ TAny*& aInterface,
+ TAny* aInput)
+ {
+ switch(aInterfaceId)
+ {
+ // For supporting large file ReadFileSection
+ case CFileCB::EExtendedFileInterface:
+ aInterface = (CFileCB::MExtendedFileInterface*) (this);
+ return KErrNone;
+ ...
+ default:
+ return(CFileCB::GetInterface(aInterfaceId, aInterface, aInput));
+ }
+ }
+Implement the CFileCB::MExtendedFileInterface functions ReadL(), WriteL() and SetSizeL() in CYourFileSystemFileCB class
+to provide the 64-bit file access functionality.
void CYourFileSystemFileCB::ReadL(TInt64 aPos,
+ TInt& aLength,
+ TDes8* aDes,
+ const RMessagePtr2& aMessage,
+ TInt aOffset)
+ {
+ // 64-bit Read implementation.
+ ...
+ }
+
+void CYourFileSystemFileCB::WriteL(TInt64 aPos,
+ TInt& aLength,
+ const TDesC8* aDes,
+ const RMessagePtr2& aMessage,
+ TInt aOffset)
+ {
+ // 64-bit Write implementation.
+ ...
+ }
+
+void CYourFileSystemFileCB::SetSizeL(TInt64 aSize)
+ {
+ // 64-bit Set Size implementation.
+ ...
+ }
+
The CFileCB::MExtendedFileInterface also
+supports fair scheduling. Implementations of the functions CFileCB::MExtendedFileInterface::ReadL() and CFileCB::MExtendedFileInterface::WriteL() should also support Fair
+scheduling.
+Using the CMountCB
+function ReadSectionL()To enable large files access, calls to the
+32-bit CMountCB::ReadSectionL() function should be replaced
+by calls to the 64-bit CMountCB::ReadSection64L() function.
ReadSection64L(const TDesC& aName, TInt64 aPos, TAny* aTrg, TInt aLength, const RMessagePtr2& aMessage) To enable 64-bit file access, you must implement the extended interface
+class CMountCB::MFileExtendedInterface.
The file
+server retrieves the interface by calling CMountCB::GetInterface() with EFileExtendedInterface as
+an argument. Sub-classes of CMountCB that support large
+file accesses need to inherit this class and implement the interface.
+Derive CYourFileSystemMountCB from
+the classes CMountCB::MFileAccessor and CMountCB.
class CYourFileSystemMountCB : public CMountCB, public CMountCB::MFileAccessor
+ {
+ ...
+
+public:
+ // Implement this function to return the CMountCB::MFileExtendedInterface
+ // interface pointer to file server.
+ virtual TInt GetInterface(TInt aInterfaceId,
+ TAny*& aInterface,
+ TAny* aInput);
+ ...
+
+public:
+ // The CMountCB::MFileExtendedInterface interface extension function
+ // for 64-bit read file section implementation
+ virtual void ReadSection64L(const TDesC& aName,
+ TInt64 aPos,
+ TAny* aTrg,
+ TInt aLength,
+ const RMessagePtr2& aMessage);
+ ...
+ }
+When your implementation
+of GetInterface() is passed TInterfaceIds::EFileAccessor through
+the aInterfaceId parameter, return a pointer to the CYourFileSystemMountCB object
+through the aInterface output parameter.
TInt CYourFileSystemMountCB::GetInterface(TInt aInterfaceId, TAny*& aInterface, TAny* aInput)
+ {
+ switch(aInterfaceId)
+ {
+ case (CMountCB::EFileAccessor):
+ ((CMountCB::MFileAccessor*&) aInterface) = this;
+ return KErrNone;
+ ...
+ default:
+ return(CMountCB::GetInterface(aInterfaceId, aInterface, aInput));
+ }
+ }
+Implement CYourFileSystemMountCB::ReadSection64L() to
+perform a 64-bit read from a file.
void CYourFileSystemMountCB::ReadSection64L(const TDesC& aName,
+ TInt64 aPos,
+ TAny* aTrg,
+ TInt aLength,
+ const RMessagePtr2& aMessage)
+ {
+ // 64-bit Read File Section implementation.
+ ...
+ }
+
\ No newline at end of file