|
1 /* |
|
2 * Copyright (c) 2002 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 #ifdef PRECACHE2 |
|
20 #ifndef AKN_ICON_SRV_PRECACHER2_H |
|
21 #define AKN_ICON_SRV_PRECACHER2_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <f32file.h> |
|
26 #include <AknsSrvClient.h> |
|
27 |
|
28 |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CAknIconLoader; |
|
34 class CAknIconServer; |
|
35 class CAknSvgFormatHandler; |
|
36 |
|
37 #define KPreCache2Priority EPriorityAbsoluteVeryLow |
|
38 |
|
39 /** |
|
40 * Precacher for predefined cache items |
|
41 */ |
|
42 NONSHARABLE_CLASS(CAknIconSrvPrecacher) : public CBase |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * @Purpose: 2 Phase Constructor |
|
48 * @Version |
|
49 * @parameter: AknIconServer |
|
50 * @return: None |
|
51 */ |
|
52 CAknIconSrvPrecacher(CAknIconServer& aServer ); |
|
53 |
|
54 /** |
|
55 * @Purpose: 2 Phase Constructor |
|
56 * @Version |
|
57 * @parameter: AknIconServer |
|
58 * @return: object of type CAknIconSrvPrecacher |
|
59 */ |
|
60 static CAknIconSrvPrecacher* NewL( CAknIconServer& aServer ); |
|
61 |
|
62 /** |
|
63 * @Purpose: Destructor |
|
64 * @Version |
|
65 * @parameter: None |
|
66 * @return: None |
|
67 */ |
|
68 ~CAknIconSrvPrecacher(); |
|
69 |
|
70 /** |
|
71 * @Purpose: 2 Phase Constructor |
|
72 * @Version |
|
73 * @parameter: None |
|
74 * @return: None |
|
75 */ |
|
76 void ConstructL(); |
|
77 |
|
78 public: // New methods |
|
79 /** |
|
80 * @Purpose: Initiation of reading from resource |
|
81 * @Version |
|
82 * @parameter: None |
|
83 * @return: None |
|
84 */ |
|
85 void Start(); |
|
86 |
|
87 /** |
|
88 * @Purpose: Reads all the precached items |
|
89 * @Version |
|
90 * @parameter: resource reader |
|
91 * @return: None |
|
92 */ |
|
93 TInt ReadPrecacheItemsL(TResourceReader& aReader); |
|
94 |
|
95 |
|
96 private: |
|
97 /** |
|
98 * @Purpose: Processes each entry in the resource array |
|
99 * @Version |
|
100 * @parameter: resource reader & lookup |
|
101 * @return: None |
|
102 */ |
|
103 void ProcessEntryL(CAknsSrvChunkLookup* lookup, TResourceReader& aReader); |
|
104 HBufC8* SetupL(); |
|
105 |
|
106 private: |
|
107 RFs iFs; |
|
108 CAknIconServer& iServer; |
|
109 RAknsSrvSession iSkinSession; |
|
110 CAknIconLoader* iLoader; |
|
111 CAknSvgFormatHandler* iSvgFormatHandler; |
|
112 TFileName iCurrentFileName; |
|
113 }; |
|
114 |
|
115 #endif |
|
116 #endif |