equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2004 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 C_CONTENTCACHE_H |
|
20 #define C_CONTENTCACHE_H |
|
21 |
|
22 class CContentCache : public CBase |
|
23 { |
|
24 public: |
|
25 ~CContentCache() |
|
26 { |
|
27 delete iText; |
|
28 delete iData; |
|
29 } |
|
30 |
|
31 HBufC* iText; |
|
32 HBufC8* iData; |
|
33 TBool iClean; |
|
34 TInt iResource; |
|
35 TInt iIndex; |
|
36 TInt iId; |
|
37 }; |
|
38 |
|
39 |
|
40 LOCAL_C CContentCache* GetContent( RPointerArray<CContentCache>& aArray, TInt aId, TBool aClean = EFalse ) |
|
41 { |
|
42 const TInt count( aArray.Count() ); |
|
43 for( TInt i( 0 ); i < count; i++ ) |
|
44 { |
|
45 if( aArray[i]->iId == aId ) |
|
46 { |
|
47 if( !aClean && aArray[i]->iClean) |
|
48 { |
|
49 continue; |
|
50 } |
|
51 return aArray[i]; |
|
52 } |
|
53 } |
|
54 |
|
55 return NULL; |
|
56 } |
|
57 |
|
58 |
|
59 #endif // C_CONTENTCACHE_H |
|
60 |
|
61 // End of file |