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