os/kernelhwsrv/userlibandfileserver/fileserver/inc/f32file_private.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/userlibandfileserver/fileserver/inc/f32file_private.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,320 @@
     1.4 +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +// WARNING: This file contains some APIs which are internal and are subject
    1.19 +//          to change without notice. Such APIs should therefore not be used
    1.20 +//          outside the Kernel and Hardware Services package.
    1.21 +//
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @internalTechnology
    1.26 + @released
    1.27 +*/
    1.28 +
    1.29 +#if !defined(__F32FILE_PRIVATE_H__)
    1.30 +#define __F32FILE_PRIVATE_H__
    1.31 +
    1.32 +#include <e32base.h>
    1.33 +#include <e32svr.h>
    1.34 +#include <e32ldr.h>
    1.35 +#include <e32ldr_private.h>
    1.36 +
    1.37 +
    1.38 +/**
    1.39 +@publishedPartner
    1.40 +@released
    1.41 +
    1.42 +Bit mask used when evaluating whether or not a session gets notified of a
    1.43 +debug event.
    1.44 +
    1.45 +@see DebugNotifySessions
    1.46 +*/
    1.47 +const TUint KDebugNotifyMask=0xFF000000; // Reserved for debug notification
    1.48 +
    1.49 +
    1.50 +/**
    1.51 +@publishedPartner
    1.52 +@released
    1.53 +
    1.54 +The default blocksize value.
    1.55 +
    1.56 +This value is returned when you query the blocksize for a media type that does not
    1.57 +support the concept of 'block' (e.g. NOR flash media).
    1.58 +
    1.59 +@see TVolumeIOParamInfo
    1.60 +*/
    1.61 +const TUint KDefaultVolumeBlockSize = 512;
    1.62 +
    1.63 +
    1.64 +/**
    1.65 +@internalTechnology
    1.66 +
    1.67 +Indicates that a TIpcArg slot 0 contains a descriptor.
    1.68 +This shall be ORed with the file server request aFunction.
    1.69 +Server should read from the location accordingly.
    1.70 +
    1.71 +@note This constant is intended for use inside Kernel and Hardware Services only.
    1.72 +*/
    1.73 +const TUint KIpcArgSlot0Desc = 0x00010000;
    1.74 +
    1.75 +/**
    1.76 +@internalTechnology
    1.77 +
    1.78 +Indicates that a TIpcArg slot 1 contains a descriptor.
    1.79 +This shall be ORed with the file server request aFunction.
    1.80 +Server should read from the location accordingly.
    1.81 +
    1.82 +@note This constant is intended for use inside Kernel and Hardware Services only.
    1.83 +*/
    1.84 +const TUint KIpcArgSlot1Desc = 0x00020000;
    1.85 +
    1.86 +/**
    1.87 +@internalTechnology
    1.88 +
    1.89 +Indicates that a TIpcArg slot 2 contains a descriptor.
    1.90 +This shall be ORed with the file server request aFunction.
    1.91 +Server should read from the location accordingly.
    1.92 +
    1.93 +@note This constant is intended for use inside Kernel and Hardware Services only.
    1.94 +*/
    1.95 +const TUint KIpcArgSlot2Desc = 0x00040000;
    1.96 +
    1.97 +
    1.98 +/**
    1.99 +@internalTechnology
   1.100 +
   1.101 +Flag to indicate that the Adopt request is from RFile::Adopt or from RFile::AdoptFromXXX functions
   1.102 +
   1.103 +@note This constant is intended for use inside Kernel and Hardware Services only.
   1.104 +*/
   1.105 +const TInt KFileAdopt32 = 0;
   1.106 +
   1.107 +
   1.108 +/**
   1.109 +@internalTechnology
   1.110 +
   1.111 +Flag to indicates that the Adopt request is from RFile::Duplicate.
   1.112 +
   1.113 +@note This constant is intended for use inside Kernel and Hardware Services only.
   1.114 +*/
   1.115 +const TInt KFileDuplicate = 1;
   1.116 +
   1.117 +
   1.118 +/**
   1.119 +@internalTechnology
   1.120 +
   1.121 +Flag to indicates that the Adopt request is from RFile64::AdoptFromXXX functions
   1.122 +
   1.123 +@note This constant is intended for use inside Kernel and Hardware Services only.
   1.124 +*/
   1.125 +const TInt KFileAdopt64 = 2;
   1.126 +
   1.127 +
   1.128 +
   1.129 +enum TStartupConfigurationCmd
   1.130 +/**
   1.131 +@publishedPartner
   1.132 +@released
   1.133 +
   1.134 +Command used to set file server configuration at startup.
   1.135 +
   1.136 +@see RFs::SetStartupConfiguration()
   1.137 +*/
   1.138 +    {
   1.139 +    /**
   1.140 +    Set loader thread priority
   1.141 +    */
   1.142 +    ELoaderPriority,
   1.143 +
   1.144 +    /**
   1.145 +    Set TDrive flags. Value should be ETrue or EFalse
   1.146 +    */
   1.147 +    ESetRugged,
   1.148 +    /**
   1.149 +    Command upper boundary
   1.150 +    */
   1.151 +    EMaxStartupConfigurationCmd
   1.152 +    };
   1.153 +
   1.154 +
   1.155 +/**
   1.156 +Local drive mapping list - passed as argument to RFs::SetLocalDriveMapping().
   1.157 +
   1.158 +@publishedPartner
   1.159 +@released
   1.160 +*/
   1.161 +class TLocalDriveMappingInfo
   1.162 +	{
   1.163 +public:
   1.164 +	enum TDrvMapOperation {EWriteMappingsAndSet=0,EWriteMappingsNoSet=1,ESwapIntMappingAndSet=2};
   1.165 +public:
   1.166 +	TInt iDriveMapping[KMaxLocalDrives];
   1.167 +	TDrvMapOperation iOperation;
   1.168 +    };
   1.169 +
   1.170 +
   1.171 +/**
   1.172 +@internalTechnology
   1.173 +@released
   1.174 +
   1.175 +@note This class is intended for use inside Kernel and Hardware Services only.
   1.176 +*/
   1.177 +typedef TPckgBuf<TLocalDriveMappingInfo> TLocalDriveMappingInfoBuf;
   1.178 +
   1.179 +
   1.180 +/**
   1.181 +Client side plugin API.
   1.182 +
   1.183 +@publishedPartner
   1.184 +@released
   1.185 +*/
   1.186 +class RPlugin : public RSubSessionBase
   1.187 +	{
   1.188 +public:
   1.189 +	IMPORT_C TInt Open(RFs& aFs, TInt aPos);
   1.190 +	IMPORT_C void Close();
   1.191 +protected:
   1.192 +	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus) const;
   1.193 +	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1) const;
   1.194 +	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1,TDes8& a2) const;
   1.195 +	IMPORT_C TInt DoControl(TInt aFunction) const;
   1.196 +	IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1) const;
   1.197 +	IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1,TDes8& a2) const;
   1.198 +	IMPORT_C void DoCancel(TUint aReqMask) const;
   1.199 +	};
   1.200 +
   1.201 +/**
   1.202 +@publishedPartner
   1.203 +@released
   1.204 +
   1.205 +Specifies that a plugin should determine for itself which drives it attaches to.
   1.206 +
   1.207 +@see RFs::MountPlugin
   1.208 +@see RFs::DismountPlugin
   1.209 +*/
   1.210 +const TInt KPluginAutoAttach = 0x19;
   1.211 +
   1.212 +/**
   1.213 +@publishedPartner
   1.214 +@released
   1.215 +
   1.216 +Specifies that a plugin should mount on drive Z.
   1.217 +
   1.218 +@see RFs::MountPlugin
   1.219 +@see RFs::DismountPlugin
   1.220 +*/
   1.221 +const TInt KPluginMountDriveZ = 0x1A;
   1.222 +
   1.223 +
   1.224 +/**
   1.225 +@publishedPartner
   1.226 +@released
   1.227 +
   1.228 +Specifies that a plugin should be mounted on all drives.
   1.229 +
   1.230 +@see RFs::MountPlugin
   1.231 +@see RFs::DismountPlugin
   1.232 +*/
   1.233 +const TInt KPluginSupportAllDrives = 0x3FFFFFF; //All 26 bits (each corrosponding to a drive) are set to one.
   1.234 +
   1.235 +/**
   1.236 +@publishedPartner
   1.237 +@released
   1.238 +
   1.239 +Used to determine if a plugin is of version 2, meaning it can support drive Z.
   1.240 +
   1.241 +*/
   1.242 +const TInt KPluginVersionTwo = 0x4000000; //bit 27 is set to one.
   1.243 +
   1.244 +/**
   1.245 +@publishedPartner
   1.246 +@released
   1.247 +
   1.248 +Specifies that a plugin should determine its own position in the plugin stack.
   1.249 +
   1.250 +@see RFs::MountPlugin
   1.251 +@see RFs::DismountPlugin
   1.252 +*/
   1.253 +const TInt KPluginAutoLocate = 0xC8;
   1.254 +
   1.255 +
   1.256 +enum TSessionFlags
   1.257 +/**
   1.258 +@internalTechnology
   1.259 +
   1.260 +A set of session specific configuration flags.
   1.261 +
   1.262 +@note This enum definition is intended for use inside Kernel and Hardware Services only.
   1.263 +*/
   1.264 +	{
   1.265 +	/**
   1.266 +	Notify the user or write failures
   1.267 +	*/
   1.268 +	EFsSessionNotifyUser	= KBit0,
   1.269 +
   1.270 +	/**
   1.271 +	Notify clients registered for change notification
   1.272 +	*/
   1.273 +	EFsSessionNotifyChange	= KBit1,
   1.274 +
   1.275 +	/**
   1.276 +	Enables all session flags
   1.277 +	*/
   1.278 +	EFsSessionFlagsAll		= KSet32,
   1.279 +	};
   1.280 +
   1.281 +/**
   1.282 +@internalTechnology
   1.283 +
   1.284 +@note This structure is intended for use inside Kernel and Hardware Services only.
   1.285 +*/
   1.286 +struct SBlockMapArgs
   1.287 +	{
   1.288 +	TInt64 iStartPos;
   1.289 +	TInt64 iEndPos;
   1.290 +	};
   1.291 +
   1.292 +
   1.293 +/**
   1.294 +@internalTechnology
   1.295 +
   1.296 +Validates the mask used to match drive attributes.
   1.297 +
   1.298 +@note This function is intended for use inside Kernel and Hardware Services only.
   1.299 +
   1.300 +@see RFs::DriveList
   1.301 +@see TFindFile::SetFindMask
   1.302 +*/
   1.303 +TInt ValidateMatchMask( TUint aMask);
   1.304 +
   1.305 +
   1.306 +/**
   1.307 +Returns the entire size of the TEntry, including the valid portion of the name string.
   1.308 +The returned value is aligned to 4-byte boundary.
   1.309 +@param aPacked If ETrue, returns the length including packed iSizeHigh and iReserved. 
   1.310 +			   If EFalse, returns the length including only the name.
   1.311 +
   1.312 +@note This function is intended for use inside Kernel and Hardware Services only.
   1.313 +
   1.314 +@internalTechnology
   1.315 +*/
   1.316 +inline TInt EntrySize(const TEntry& anEntry, TBool aPacked = EFalse)
   1.317 +	{
   1.318 +	return(sizeof(TUint)+sizeof(TInt)+sizeof(TTime)+sizeof(TInt)+sizeof(TUidType)+Align4(anEntry.iName.Size()) + (aPacked ? (2*sizeof(TInt)) : 0));
   1.319 +	}
   1.320 +
   1.321 +
   1.322 +
   1.323 +#endif //__F32FILE_PRIVATE_H__