os/kernelhwsrv/userlibandfileserver/fileserver/inc/f32file_private.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 // WARNING: This file contains some APIs which are internal and are subject
    16 //          to change without notice. Such APIs should therefore not be used
    17 //          outside the Kernel and Hardware Services package.
    18 //
    19 
    20 /**
    21  @file
    22  @internalTechnology
    23  @released
    24 */
    25 
    26 #if !defined(__F32FILE_PRIVATE_H__)
    27 #define __F32FILE_PRIVATE_H__
    28 
    29 #include <e32base.h>
    30 #include <e32svr.h>
    31 #include <e32ldr.h>
    32 #include <e32ldr_private.h>
    33 
    34 
    35 /**
    36 @publishedPartner
    37 @released
    38 
    39 Bit mask used when evaluating whether or not a session gets notified of a
    40 debug event.
    41 
    42 @see DebugNotifySessions
    43 */
    44 const TUint KDebugNotifyMask=0xFF000000; // Reserved for debug notification
    45 
    46 
    47 /**
    48 @publishedPartner
    49 @released
    50 
    51 The default blocksize value.
    52 
    53 This value is returned when you query the blocksize for a media type that does not
    54 support the concept of 'block' (e.g. NOR flash media).
    55 
    56 @see TVolumeIOParamInfo
    57 */
    58 const TUint KDefaultVolumeBlockSize = 512;
    59 
    60 
    61 /**
    62 @internalTechnology
    63 
    64 Indicates that a TIpcArg slot 0 contains a descriptor.
    65 This shall be ORed with the file server request aFunction.
    66 Server should read from the location accordingly.
    67 
    68 @note This constant is intended for use inside Kernel and Hardware Services only.
    69 */
    70 const TUint KIpcArgSlot0Desc = 0x00010000;
    71 
    72 /**
    73 @internalTechnology
    74 
    75 Indicates that a TIpcArg slot 1 contains a descriptor.
    76 This shall be ORed with the file server request aFunction.
    77 Server should read from the location accordingly.
    78 
    79 @note This constant is intended for use inside Kernel and Hardware Services only.
    80 */
    81 const TUint KIpcArgSlot1Desc = 0x00020000;
    82 
    83 /**
    84 @internalTechnology
    85 
    86 Indicates that a TIpcArg slot 2 contains a descriptor.
    87 This shall be ORed with the file server request aFunction.
    88 Server should read from the location accordingly.
    89 
    90 @note This constant is intended for use inside Kernel and Hardware Services only.
    91 */
    92 const TUint KIpcArgSlot2Desc = 0x00040000;
    93 
    94 
    95 /**
    96 @internalTechnology
    97 
    98 Flag to indicate that the Adopt request is from RFile::Adopt or from RFile::AdoptFromXXX functions
    99 
   100 @note This constant is intended for use inside Kernel and Hardware Services only.
   101 */
   102 const TInt KFileAdopt32 = 0;
   103 
   104 
   105 /**
   106 @internalTechnology
   107 
   108 Flag to indicates that the Adopt request is from RFile::Duplicate.
   109 
   110 @note This constant is intended for use inside Kernel and Hardware Services only.
   111 */
   112 const TInt KFileDuplicate = 1;
   113 
   114 
   115 /**
   116 @internalTechnology
   117 
   118 Flag to indicates that the Adopt request is from RFile64::AdoptFromXXX functions
   119 
   120 @note This constant is intended for use inside Kernel and Hardware Services only.
   121 */
   122 const TInt KFileAdopt64 = 2;
   123 
   124 
   125 
   126 enum TStartupConfigurationCmd
   127 /**
   128 @publishedPartner
   129 @released
   130 
   131 Command used to set file server configuration at startup.
   132 
   133 @see RFs::SetStartupConfiguration()
   134 */
   135     {
   136     /**
   137     Set loader thread priority
   138     */
   139     ELoaderPriority,
   140 
   141     /**
   142     Set TDrive flags. Value should be ETrue or EFalse
   143     */
   144     ESetRugged,
   145     /**
   146     Command upper boundary
   147     */
   148     EMaxStartupConfigurationCmd
   149     };
   150 
   151 
   152 /**
   153 Local drive mapping list - passed as argument to RFs::SetLocalDriveMapping().
   154 
   155 @publishedPartner
   156 @released
   157 */
   158 class TLocalDriveMappingInfo
   159 	{
   160 public:
   161 	enum TDrvMapOperation {EWriteMappingsAndSet=0,EWriteMappingsNoSet=1,ESwapIntMappingAndSet=2};
   162 public:
   163 	TInt iDriveMapping[KMaxLocalDrives];
   164 	TDrvMapOperation iOperation;
   165     };
   166 
   167 
   168 /**
   169 @internalTechnology
   170 @released
   171 
   172 @note This class is intended for use inside Kernel and Hardware Services only.
   173 */
   174 typedef TPckgBuf<TLocalDriveMappingInfo> TLocalDriveMappingInfoBuf;
   175 
   176 
   177 /**
   178 Client side plugin API.
   179 
   180 @publishedPartner
   181 @released
   182 */
   183 class RPlugin : public RSubSessionBase
   184 	{
   185 public:
   186 	IMPORT_C TInt Open(RFs& aFs, TInt aPos);
   187 	IMPORT_C void Close();
   188 protected:
   189 	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus) const;
   190 	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1) const;
   191 	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1,TDes8& a2) const;
   192 	IMPORT_C TInt DoControl(TInt aFunction) const;
   193 	IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1) const;
   194 	IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1,TDes8& a2) const;
   195 	IMPORT_C void DoCancel(TUint aReqMask) const;
   196 	};
   197 
   198 /**
   199 @publishedPartner
   200 @released
   201 
   202 Specifies that a plugin should determine for itself which drives it attaches to.
   203 
   204 @see RFs::MountPlugin
   205 @see RFs::DismountPlugin
   206 */
   207 const TInt KPluginAutoAttach = 0x19;
   208 
   209 /**
   210 @publishedPartner
   211 @released
   212 
   213 Specifies that a plugin should mount on drive Z.
   214 
   215 @see RFs::MountPlugin
   216 @see RFs::DismountPlugin
   217 */
   218 const TInt KPluginMountDriveZ = 0x1A;
   219 
   220 
   221 /**
   222 @publishedPartner
   223 @released
   224 
   225 Specifies that a plugin should be mounted on all drives.
   226 
   227 @see RFs::MountPlugin
   228 @see RFs::DismountPlugin
   229 */
   230 const TInt KPluginSupportAllDrives = 0x3FFFFFF; //All 26 bits (each corrosponding to a drive) are set to one.
   231 
   232 /**
   233 @publishedPartner
   234 @released
   235 
   236 Used to determine if a plugin is of version 2, meaning it can support drive Z.
   237 
   238 */
   239 const TInt KPluginVersionTwo = 0x4000000; //bit 27 is set to one.
   240 
   241 /**
   242 @publishedPartner
   243 @released
   244 
   245 Specifies that a plugin should determine its own position in the plugin stack.
   246 
   247 @see RFs::MountPlugin
   248 @see RFs::DismountPlugin
   249 */
   250 const TInt KPluginAutoLocate = 0xC8;
   251 
   252 
   253 enum TSessionFlags
   254 /**
   255 @internalTechnology
   256 
   257 A set of session specific configuration flags.
   258 
   259 @note This enum definition is intended for use inside Kernel and Hardware Services only.
   260 */
   261 	{
   262 	/**
   263 	Notify the user or write failures
   264 	*/
   265 	EFsSessionNotifyUser	= KBit0,
   266 
   267 	/**
   268 	Notify clients registered for change notification
   269 	*/
   270 	EFsSessionNotifyChange	= KBit1,
   271 
   272 	/**
   273 	Enables all session flags
   274 	*/
   275 	EFsSessionFlagsAll		= KSet32,
   276 	};
   277 
   278 /**
   279 @internalTechnology
   280 
   281 @note This structure is intended for use inside Kernel and Hardware Services only.
   282 */
   283 struct SBlockMapArgs
   284 	{
   285 	TInt64 iStartPos;
   286 	TInt64 iEndPos;
   287 	};
   288 
   289 
   290 /**
   291 @internalTechnology
   292 
   293 Validates the mask used to match drive attributes.
   294 
   295 @note This function is intended for use inside Kernel and Hardware Services only.
   296 
   297 @see RFs::DriveList
   298 @see TFindFile::SetFindMask
   299 */
   300 TInt ValidateMatchMask( TUint aMask);
   301 
   302 
   303 /**
   304 Returns the entire size of the TEntry, including the valid portion of the name string.
   305 The returned value is aligned to 4-byte boundary.
   306 @param aPacked If ETrue, returns the length including packed iSizeHigh and iReserved. 
   307 			   If EFalse, returns the length including only the name.
   308 
   309 @note This function is intended for use inside Kernel and Hardware Services only.
   310 
   311 @internalTechnology
   312 */
   313 inline TInt EntrySize(const TEntry& anEntry, TBool aPacked = EFalse)
   314 	{
   315 	return(sizeof(TUint)+sizeof(TInt)+sizeof(TTime)+sizeof(TInt)+sizeof(TUidType)+Align4(anEntry.iName.Size()) + (aPacked ? (2*sizeof(TInt)) : 0));
   316 	}
   317 
   318 
   319 
   320 #endif //__F32FILE_PRIVATE_H__