sl@0: // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: // WARNING: This file contains some APIs which are internal and are subject sl@0: // to change without notice. Such APIs should therefore not be used sl@0: // outside the Kernel and Hardware Services package. sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: @released sl@0: */ sl@0: sl@0: #if !defined(__F32FILE_PRIVATE_H__) sl@0: #define __F32FILE_PRIVATE_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Bit mask used when evaluating whether or not a session gets notified of a sl@0: debug event. sl@0: sl@0: @see DebugNotifySessions sl@0: */ sl@0: const TUint KDebugNotifyMask=0xFF000000; // Reserved for debug notification sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: The default blocksize value. sl@0: sl@0: This value is returned when you query the blocksize for a media type that does not sl@0: support the concept of 'block' (e.g. NOR flash media). sl@0: sl@0: @see TVolumeIOParamInfo sl@0: */ sl@0: const TUint KDefaultVolumeBlockSize = 512; sl@0: sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: Indicates that a TIpcArg slot 0 contains a descriptor. sl@0: This shall be ORed with the file server request aFunction. sl@0: Server should read from the location accordingly. sl@0: sl@0: @note This constant is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: const TUint KIpcArgSlot0Desc = 0x00010000; sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: Indicates that a TIpcArg slot 1 contains a descriptor. sl@0: This shall be ORed with the file server request aFunction. sl@0: Server should read from the location accordingly. sl@0: sl@0: @note This constant is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: const TUint KIpcArgSlot1Desc = 0x00020000; sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: Indicates that a TIpcArg slot 2 contains a descriptor. sl@0: This shall be ORed with the file server request aFunction. sl@0: Server should read from the location accordingly. sl@0: sl@0: @note This constant is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: const TUint KIpcArgSlot2Desc = 0x00040000; sl@0: sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: Flag to indicate that the Adopt request is from RFile::Adopt or from RFile::AdoptFromXXX functions sl@0: sl@0: @note This constant is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: const TInt KFileAdopt32 = 0; sl@0: sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: Flag to indicates that the Adopt request is from RFile::Duplicate. sl@0: sl@0: @note This constant is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: const TInt KFileDuplicate = 1; sl@0: sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: Flag to indicates that the Adopt request is from RFile64::AdoptFromXXX functions sl@0: sl@0: @note This constant is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: const TInt KFileAdopt64 = 2; sl@0: sl@0: sl@0: sl@0: enum TStartupConfigurationCmd sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Command used to set file server configuration at startup. sl@0: sl@0: @see RFs::SetStartupConfiguration() sl@0: */ sl@0: { sl@0: /** sl@0: Set loader thread priority sl@0: */ sl@0: ELoaderPriority, sl@0: sl@0: /** sl@0: Set TDrive flags. Value should be ETrue or EFalse sl@0: */ sl@0: ESetRugged, sl@0: /** sl@0: Command upper boundary sl@0: */ sl@0: EMaxStartupConfigurationCmd sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Local drive mapping list - passed as argument to RFs::SetLocalDriveMapping(). sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class TLocalDriveMappingInfo sl@0: { sl@0: public: sl@0: enum TDrvMapOperation {EWriteMappingsAndSet=0,EWriteMappingsNoSet=1,ESwapIntMappingAndSet=2}; sl@0: public: sl@0: TInt iDriveMapping[KMaxLocalDrives]; sl@0: TDrvMapOperation iOperation; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @internalTechnology sl@0: @released sl@0: sl@0: @note This class is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: typedef TPckgBuf TLocalDriveMappingInfoBuf; sl@0: sl@0: sl@0: /** sl@0: Client side plugin API. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class RPlugin : public RSubSessionBase sl@0: { sl@0: public: sl@0: IMPORT_C TInt Open(RFs& aFs, TInt aPos); sl@0: IMPORT_C void Close(); sl@0: protected: sl@0: IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus) const; sl@0: IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1) const; sl@0: IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1,TDes8& a2) const; sl@0: IMPORT_C TInt DoControl(TInt aFunction) const; sl@0: IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1) const; sl@0: IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1,TDes8& a2) const; sl@0: IMPORT_C void DoCancel(TUint aReqMask) const; sl@0: }; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Specifies that a plugin should determine for itself which drives it attaches to. sl@0: sl@0: @see RFs::MountPlugin sl@0: @see RFs::DismountPlugin sl@0: */ sl@0: const TInt KPluginAutoAttach = 0x19; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Specifies that a plugin should mount on drive Z. sl@0: sl@0: @see RFs::MountPlugin sl@0: @see RFs::DismountPlugin sl@0: */ sl@0: const TInt KPluginMountDriveZ = 0x1A; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Specifies that a plugin should be mounted on all drives. sl@0: sl@0: @see RFs::MountPlugin sl@0: @see RFs::DismountPlugin sl@0: */ sl@0: const TInt KPluginSupportAllDrives = 0x3FFFFFF; //All 26 bits (each corrosponding to a drive) are set to one. sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Used to determine if a plugin is of version 2, meaning it can support drive Z. sl@0: sl@0: */ sl@0: const TInt KPluginVersionTwo = 0x4000000; //bit 27 is set to one. sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Specifies that a plugin should determine its own position in the plugin stack. sl@0: sl@0: @see RFs::MountPlugin sl@0: @see RFs::DismountPlugin sl@0: */ sl@0: const TInt KPluginAutoLocate = 0xC8; sl@0: sl@0: sl@0: enum TSessionFlags sl@0: /** sl@0: @internalTechnology sl@0: sl@0: A set of session specific configuration flags. sl@0: sl@0: @note This enum definition is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: { sl@0: /** sl@0: Notify the user or write failures sl@0: */ sl@0: EFsSessionNotifyUser = KBit0, sl@0: sl@0: /** sl@0: Notify clients registered for change notification sl@0: */ sl@0: EFsSessionNotifyChange = KBit1, sl@0: sl@0: /** sl@0: Enables all session flags sl@0: */ sl@0: EFsSessionFlagsAll = KSet32, sl@0: }; sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: @note This structure is intended for use inside Kernel and Hardware Services only. sl@0: */ sl@0: struct SBlockMapArgs sl@0: { sl@0: TInt64 iStartPos; sl@0: TInt64 iEndPos; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: Validates the mask used to match drive attributes. sl@0: sl@0: @note This function is intended for use inside Kernel and Hardware Services only. sl@0: sl@0: @see RFs::DriveList sl@0: @see TFindFile::SetFindMask sl@0: */ sl@0: TInt ValidateMatchMask( TUint aMask); sl@0: sl@0: sl@0: /** sl@0: Returns the entire size of the TEntry, including the valid portion of the name string. sl@0: The returned value is aligned to 4-byte boundary. sl@0: @param aPacked If ETrue, returns the length including packed iSizeHigh and iReserved. sl@0: If EFalse, returns the length including only the name. sl@0: sl@0: @note This function is intended for use inside Kernel and Hardware Services only. sl@0: sl@0: @internalTechnology sl@0: */ sl@0: inline TInt EntrySize(const TEntry& anEntry, TBool aPacked = EFalse) sl@0: { sl@0: return(sizeof(TUint)+sizeof(TInt)+sizeof(TTime)+sizeof(TInt)+sizeof(TUidType)+Align4(anEntry.iName.Size()) + (aPacked ? (2*sizeof(TInt)) : 0)); sl@0: } sl@0: sl@0: sl@0: sl@0: #endif //__F32FILE_PRIVATE_H__