persistentstorage/store/UFILE/UF_STD.H
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 1998-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 "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 
       
    16 #include <s32file.h>
       
    17 #include "U32STD.H"
       
    18 #include "U32PERM.H"
       
    19 
       
    20 #ifndef MAX_READ_AHEAD_VALUE
       
    21 	#define MAX_READ_AHEAD_VALUE 2048
       
    22 #else
       
    23 	#if MAX_READ_AHEAD_VALUE < 512
       
    24 		#error "MAX_READ_AHEAD_VALUE macro value can't be less than 512"
       
    25 	#endif
       
    26 #endif
       
    27 
       
    28 const TInt KMaxFileBufReadAhead=MAX_READ_AHEAD_VALUE;
       
    29 
       
    30 #ifndef FILE_BLOCK_SIZE
       
    31 	#define FILE_BLOCK_SIZE 1024
       
    32 #else
       
    33 	#if FILE_BLOCK_SIZE < 512
       
    34 		#error "FILE_BLOCK_SIZE macro value can't be less than 512"
       
    35 	#endif
       
    36 	#if ((FILE_BLOCK_SIZE) & ((FILE_BLOCK_SIZE) - 1)) != 0
       
    37 		#error "FILE_BLOCK_SIZE macro value must be power of 2"
       
    38 	#endif
       
    39 #endif
       
    40 
       
    41 const TInt KFileBufBlockSize=FILE_BLOCK_SIZE;
       
    42 
       
    43 //
       
    44 enum TFilePanic
       
    45 	{
       
    46 	EFileReadLengthNegative,
       
    47 	EFileReadBeyondEnd,
       
    48 	EFileReadNoTransfer,
       
    49 	EFileWriteLengthNegative,
       
    50 	EFileWriteBeyondEnd,
       
    51 	EFileWriteNoTransfer,
       
    52 	EFileWriteOutstanding,
       
    53 	EFileMarkInvalid,
       
    54 	EFileLocationInvalid,
       
    55 	EFileStoreBadType,
       
    56 	EStoreUid3MustNotBeNull
       
    57 	};
       
    58 
       
    59 GLREF_C void Panic(TFilePanic aPanic);
       
    60 
       
    61 #include "UF_STD.INL"
       
    62