os/kernelhwsrv/kernel/eka/include/e32base_private.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/include/e32base_private.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,91 @@
     1.4 +// Copyright (c) 1994-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 +// e32\include\e32base_private.h
    1.18 +// 
    1.19 +// WARNING: This file contains some APIs which are internal and are subject
    1.20 +//          to change without notice. Such APIs should therefore not be used
    1.21 +//          outside the Kernel and Hardware Services package.
    1.22 +//
    1.23 +
    1.24 +/**
    1.25 + @file
    1.26 + @internalTechnology
    1.27 + @released
    1.28 +*/
    1.29 +
    1.30 +#ifndef __E32BASE_PRIVATE_H__
    1.31 +#define __E32BASE_PRIVATE_H__
    1.32 +#include <e32std.h>
    1.33 +#include <e32std_private.h>
    1.34 +#include <e32base.h>
    1.35 +
    1.36 +/**
    1.37 +@internalComponent
    1.38 +*/
    1.39 +		struct	TObjectDataStr	//In use if this slot contains pointer to object.
    1.40 +			{			
    1.41 +			TInt16 instance;  
    1.42 +			TUint16 uniqueID;
    1.43 +			};
    1.44 +/**
    1.45 +@internalComponent
    1.46 +*/
    1.47 +		struct SObjectIxRec
    1.48 +			{
    1.49 +			union
    1.50 +			{
    1.51 +				TObjectDataStr str;	//This is in use if the slot contains pointer to CObject.	
    1.52 +				TInt nextEmpty;		//This is in use if the slot is empty. Points to the next empty slot ...
    1.53 +									//... in the list. 16 bits would be enough but ARM prefers 32 bytes.
    1.54 +			};
    1.55 +			CObject* obj;
    1.56 +			};
    1.57 +
    1.58 +/**
    1.59 +@internalTechnology
    1.60 +@deprecated
    1.61 +*/
    1.62 +class CBitMapAllocator : public CBase
    1.63 +	{
    1.64 +public:
    1.65 +	IMPORT_C static CBitMapAllocator* New(TInt aSize);
    1.66 +	IMPORT_C static CBitMapAllocator* NewL(TInt aSize);
    1.67 +	IMPORT_C ~CBitMapAllocator();
    1.68 +	IMPORT_C TInt Alloc();
    1.69 +	IMPORT_C TInt AllocFrom(TInt aPos);
    1.70 +	IMPORT_C TInt Alloc(TInt aCount, TInt& aConsecutive);
    1.71 +	IMPORT_C TInt AllocAligned(TInt anAlignment);
    1.72 +	IMPORT_C TInt AllocAlignedBlock(TInt anAlignment);
    1.73 +	IMPORT_C TInt AllocFromTop();
    1.74 +	IMPORT_C TInt AllocFromTopFrom(TInt aPos);
    1.75 +	IMPORT_C void AllocAt(TInt aPos);
    1.76 +	IMPORT_C void AllocAt(TInt aPos, TInt aCount);
    1.77 +	IMPORT_C TBool IsFree(TInt aPos);
    1.78 +	IMPORT_C TBool IsFree(TInt aPos, TInt aCount);
    1.79 +	IMPORT_C void Free(TInt aPos);
    1.80 +	IMPORT_C void Free(TInt aPos, TInt aCount);
    1.81 +	IMPORT_C TInt Avail();
    1.82 +	IMPORT_C TInt Size();
    1.83 +	IMPORT_C TInt ExtractRamPages(TInt aConsecutive,TInt& aPageNo);
    1.84 +protected:
    1.85 +	IMPORT_C CBitMapAllocator(TInt aSize,TInt aLength);
    1.86 +protected:
    1.87 +	TInt iAvail;
    1.88 +	TInt iSize;
    1.89 +	TInt iLength;
    1.90 +	TUint iMap[1];
    1.91 +	};
    1.92 +
    1.93 +
    1.94 +#endif //__E32BASE_H__