symport/e32/include/e32base_private.h
changeset 1 0a7b44b10206
child 2 806186ab5e14
equal deleted inserted replaced
0:c55016431358 1:0a7b44b10206
       
     1 // Copyright (c) 1994-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 "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32\include\e32base_private.h
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21  @released
       
    22 */
       
    23 
       
    24 #ifndef __E32BASE_PRIVATE_H__
       
    25 #define __E32BASE_PRIVATE_H__
       
    26 #include <e32std.h>
       
    27 #include <e32std_private.h>
       
    28 #include <e32base.h>
       
    29 
       
    30 /**
       
    31 @internalComponent
       
    32 */
       
    33 		struct	TObjectDataStr	//In use if this slot contains pointer to object.
       
    34 			{			
       
    35 			TInt16 instance;  
       
    36 			TUint16 uniqueID;
       
    37 			};
       
    38 /**
       
    39 @internalComponent
       
    40 */
       
    41 		struct SObjectIxRec
       
    42 			{
       
    43 			union
       
    44 			{
       
    45 				TObjectDataStr str;	//This is in use if the slot contains pointer to CObject.	
       
    46 				TInt nextEmpty;		//This is in use if the slot is empty. Points to the next empty slot ...
       
    47 									//... in the list. 16 bits would be enough but ARM prefers 32 bytes.
       
    48 			};
       
    49 			CObject* obj;
       
    50 			};
       
    51 
       
    52 /**
       
    53 @internalTechnology
       
    54 @deprecated
       
    55 */
       
    56 class CBitMapAllocator : public CBase
       
    57 	{
       
    58 public:
       
    59 	IMPORT_C static CBitMapAllocator* New(TInt aSize);
       
    60 	IMPORT_C static CBitMapAllocator* NewL(TInt aSize);
       
    61 	IMPORT_C ~CBitMapAllocator();
       
    62 	IMPORT_C TInt Alloc();
       
    63 	IMPORT_C TInt AllocFrom(TInt aPos);
       
    64 	IMPORT_C TInt Alloc(TInt aCount, TInt& aConsecutive);
       
    65 	IMPORT_C TInt AllocAligned(TInt anAlignment);
       
    66 	IMPORT_C TInt AllocAlignedBlock(TInt anAlignment);
       
    67 	IMPORT_C TInt AllocFromTop();
       
    68 	IMPORT_C TInt AllocFromTopFrom(TInt aPos);
       
    69 	IMPORT_C void AllocAt(TInt aPos);
       
    70 	IMPORT_C void AllocAt(TInt aPos, TInt aCount);
       
    71 	IMPORT_C TBool IsFree(TInt aPos);
       
    72 	IMPORT_C TBool IsFree(TInt aPos, TInt aCount);
       
    73 	IMPORT_C void Free(TInt aPos);
       
    74 	IMPORT_C void Free(TInt aPos, TInt aCount);
       
    75 	IMPORT_C TInt Avail();
       
    76 	IMPORT_C TInt Size();
       
    77 	IMPORT_C TInt ExtractRamPages(TInt aConsecutive,TInt& aPageNo);
       
    78 protected:
       
    79 	IMPORT_C CBitMapAllocator(TInt aSize,TInt aLength);
       
    80 protected:
       
    81 	TInt iAvail;
       
    82 	TInt iSize;
       
    83 	TInt iLength;
       
    84 	TUint iMap[1];
       
    85 	};
       
    86 
       
    87 
       
    88 #endif //__E32BASE_H__