diff -r 3a60ebea00d0 -r cd0ae4656946 uiacceltk/hitchcock/coretoolkit/inc/appiconcache.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uiacceltk/hitchcock/coretoolkit/inc/appiconcache.h Mon Jun 21 16:41:52 2010 +0300 @@ -0,0 +1,58 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef __APPICONCACHE_H__ +#define __APPICONCACHE_H__ + +#include +#include +#include + +NONSHARABLE_STRUCT(TRasterizedBitmap) + { + TRasterizedBitmap(TInt64 aBitmapSerial, CFbsBitmap* aBitmap) : iBitmapSerial(aBitmapSerial), iBitmap(aBitmap) + { + } + TRasterizedBitmap() : iBitmapSerial(0), iBitmap(NULL) {} + TInt64 iBitmapSerial; + CFbsBitmap* iBitmap; + }; + + +NONSHARABLE_CLASS(CAppIconCache) : public CBase + { + public: + static CAppIconCache* NewL(TInt aCacheLimit); + virtual ~CAppIconCache(); + + IMPORT_C CFbsBitmap* Find(TInt64 aSerialNumber, TSize aSize); + IMPORT_C TInt Insert(TRasterizedBitmap& aBitmap); + IMPORT_C void Clear(); + + protected: + CAppIconCache(TInt aCacheLimit); + void ConstructL(); + + private: + RArray iCache; + TInt iCacheLimit; + }; + + + +#endif