|
1 /* |
|
2 * Copyright (c) 2006 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: CCSXHLegacyContentParser class declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CCSXHLEGACYCONTENTPARSER_H__ |
|
20 #define __CCSXHLEGACYCONTENTPARSER_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <hlpmodel.h> |
|
24 |
|
25 class CHlpModel; |
|
26 class CHlpTopic; |
|
27 class CCSXHGenericTOC1; |
|
28 class CCSXHGenericTOC2; |
|
29 class CCSXHLegacyTOC2; |
|
30 class CCSXHHelpDataBase; |
|
31 class CCSXHKywdTOC1; |
|
32 class CCSXHLegacyTOC1; |
|
33 class CCoeEnv; |
|
34 class CCSXHHelpContentBase; |
|
35 class TCoeHelpContext; |
|
36 |
|
37 /** |
|
38 * CCSXHLegacyContentParser class. |
|
39 * This class is used to retrive Legacy content from .hlp file |
|
40 * @lib euser.lib |
|
41 * @since 3.2 |
|
42 */ |
|
43 |
|
44 class CCSXHLegacyContentParser: public CBase , public MHlpModelObserver |
|
45 { |
|
46 public: |
|
47 /** |
|
48 * @function NewL |
|
49 * @since S60 3.2 |
|
50 * Construct a CCSXHLegacyContentParser |
|
51 * and return a pointer to the created object |
|
52 * @param aDataBase - Database class Pointer |
|
53 * @return a CCSXHLegacyContentParser Pointer |
|
54 */ |
|
55 static CCSXHLegacyContentParser* NewL(CCSXHHelpDataBase* aDataBase); |
|
56 /** |
|
57 * @function NewLC |
|
58 * @since S60 3.2 |
|
59 * Construct a CCSXHLegacyContentParser |
|
60 * and return a pointer to the created object using two phase construction |
|
61 * @param aDataBase - Database class pointer |
|
62 * @return a CCSXHLegacyContentParser Pointer |
|
63 */ |
|
64 static CCSXHLegacyContentParser* NewLC(CCSXHHelpDataBase* aDataBase); |
|
65 |
|
66 /** |
|
67 * @function GenerateTOC1ListL |
|
68 * @since S60 3.2 |
|
69 * Generate Legacy TOC1 Objects |
|
70 * @param aDataBase - Database class pointer |
|
71 */ |
|
72 void GenerateTOC1ListL(CCSXHHelpDataBase* aDataBase); |
|
73 /** |
|
74 * @function GenerateTOC2ListL |
|
75 * @since S60 3.2 |
|
76 * Generate Legacy TOC2 Objects |
|
77 * @param atoc1 - generic toc1 class pointer |
|
78 * aArray - Database class pointer's array pointer |
|
79 */ |
|
80 void GenerateTOC2ListL(CCSXHGenericTOC1& atoc1,RPointerArray<CCSXHHelpContentBase>* aArray); |
|
81 /** |
|
82 * @function GetTopicContentL |
|
83 * @since S60 3.2 |
|
84 * Get the richtext for a selected toc2 |
|
85 * @param atoc2 - generic toc2 class pointer |
|
86 * @return richtext pointer |
|
87 */ |
|
88 TAny* GetTopicContentL(CCSXHGenericTOC2* atoc2); |
|
89 /** |
|
90 * @function GenerateKywdTOC1ListL |
|
91 * @since S60 3.2 |
|
92 * Generate Legacy Keyword TOC1 Objects |
|
93 * @param aDataBase - Database class pointer |
|
94 */ |
|
95 void GenerateKywdTOC1ListL(CCSXHHelpDataBase *aDataBase); |
|
96 |
|
97 /** |
|
98 * @function InitGenerateTOC2ListForKeywordSearchL |
|
99 * @since S60 3.2 |
|
100 * Generate Legacy Keyword TOC2 Objects |
|
101 * @param akywdtoc1 - keyword toc1 class pointer |
|
102 * @return TInt the number of keyword sub topics |
|
103 */ |
|
104 TInt InitGenerateTOC2ListForKeywordSearchL(CCSXHKywdTOC1* akywdtoc1); |
|
105 |
|
106 /** |
|
107 * @function GenerateTOC2ListForKeywordSearchL |
|
108 * @since S60 3.2 |
|
109 * Generate Legacy Keyword TOC2 Objects,InitGenerateTOC2ListForKeywordSearchL |
|
110 * has to be called first |
|
111 * @param akywdtoc1 - keyword toc1 class pointer |
|
112 */ |
|
113 void GenerateTOC2ListForKeywordSearchL(CCSXHKywdTOC1* akywdtoc1); |
|
114 /** |
|
115 * @function GetTOC1ForTOC2 |
|
116 * @since S60 3.2 |
|
117 * Get Legacy TOC1 Object |
|
118 * @param atoc2 - keyword toc2 class pointer |
|
119 * @return legacy toc1 class pointer |
|
120 */ |
|
121 CCSXHLegacyTOC1* GetTOC1ForTOC2(CCSXHLegacyTOC2* atoc2); |
|
122 /** |
|
123 * @function ~CCSXHLegacyContentParser |
|
124 * @since S60 3.2 |
|
125 * Destroy the object and release all memory objects |
|
126 */ |
|
127 ~CCSXHLegacyContentParser(); |
|
128 |
|
129 /** |
|
130 * @function GetContextTopic |
|
131 * @since S60 3.2 |
|
132 * Get the help Context object |
|
133 * @param aContext - Help context object |
|
134 * @param database class pointer |
|
135 */ |
|
136 CCSXHHelpContentBase* GetContextTopic(TCoeHelpContext &aContext); |
|
137 |
|
138 private: |
|
139 /** |
|
140 * @function CCSXHLegacyContentParser |
|
141 * @since S60 3.2 |
|
142 * Construct a CCSXHLegacyContentParser |
|
143 * @param aDataBase - Database class pointer |
|
144 */ |
|
145 CCSXHLegacyContentParser(CCSXHHelpDataBase *aDataBase); |
|
146 /** |
|
147 * @function ConstructL |
|
148 * @since S60 3.2 |
|
149 * perform the second phase construction |
|
150 * @param aDataBase - Database class pointer |
|
151 */ |
|
152 void ConstructL(); |
|
153 /** |
|
154 * From MHlpModelObserver class |
|
155 * @function HandleModelEventL |
|
156 * @since S60 3.2 |
|
157 * handle event from CHlpModel |
|
158 * @param aEvent from CHlpModel |
|
159 */ |
|
160 void HandleModelEventL(TInt aEvent); |
|
161 /** |
|
162 * @function LoadContextTopicL |
|
163 * @since S60 3.2 |
|
164 * Get the Richtext for context sensitive help |
|
165 * @param aContext Help context class object |
|
166 */ |
|
167 void LoadContextTopicL(TCoeHelpContext &aContext); |
|
168 |
|
169 private: |
|
170 CHlpModel* iModel; |
|
171 CHlpTopic* iTopic; |
|
172 CCSXHHelpDataBase* iDataBase; |
|
173 CHlpList* iHlpList; |
|
174 TInt iStatus; |
|
175 //Store all the created Legacy TOC1 objects for future reference. |
|
176 RPointerArray<CCSXHLegacyTOC1> iLegacyTOC1List; |
|
177 }; |
|
178 |
|
179 #endif |