equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __APPICONCACHE_H__ |
|
20 #define __APPICONCACHE_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32cmn.h> |
|
24 #include <fbs.h> |
|
25 |
|
26 NONSHARABLE_STRUCT(TRasterizedBitmap) |
|
27 { |
|
28 TRasterizedBitmap(TInt64 aBitmapSerial, CFbsBitmap* aBitmap) : iBitmapSerial(aBitmapSerial), iBitmap(aBitmap) |
|
29 { |
|
30 } |
|
31 TRasterizedBitmap() : iBitmapSerial(0), iBitmap(NULL) {} |
|
32 TInt64 iBitmapSerial; |
|
33 CFbsBitmap* iBitmap; |
|
34 }; |
|
35 |
|
36 |
|
37 NONSHARABLE_CLASS(CAppIconCache) : public CBase |
|
38 { |
|
39 public: |
|
40 static CAppIconCache* NewL(TInt aCacheLimit); |
|
41 virtual ~CAppIconCache(); |
|
42 |
|
43 IMPORT_C CFbsBitmap* Find(TInt64 aSerialNumber, TSize aSize); |
|
44 IMPORT_C TInt Insert(TRasterizedBitmap& aBitmap); |
|
45 IMPORT_C void Clear(); |
|
46 |
|
47 protected: |
|
48 CAppIconCache(TInt aCacheLimit); |
|
49 void ConstructL(); |
|
50 |
|
51 private: |
|
52 RArray<TRasterizedBitmap> iCache; |
|
53 TInt iCacheLimit; |
|
54 }; |
|
55 |
|
56 |
|
57 |
|
58 #endif |