45
|
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: CCSXHHelpDataBase class declaration
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef INC_CSXHHELPDATABASE_H_HEADER_INCLUDED_BC054F58
|
|
20 |
#define INC_CSXHHELPDATABASE_H_HEADER_INCLUDED_BC054F58
|
|
21 |
|
|
22 |
#include "CSXHHelpContentBase.h"
|
|
23 |
#include "CSXHGenericTOC1.h"
|
|
24 |
#include <f32file.h>
|
|
25 |
#include <apadef.h>
|
|
26 |
class CAknProgressDialog;
|
|
27 |
|
|
28 |
class CCSXHHelpDataBase;
|
|
29 |
class CCSXHHTMLContentParser;
|
|
30 |
class CCSXHLegacyContentParser;
|
|
31 |
class CCSXHGenericTOC2;
|
|
32 |
class CCSXHKywdTOC1;
|
|
33 |
class CCSXHHtmlTOC1;
|
|
34 |
class CCoeEnv;
|
|
35 |
class CCSXHMainTopics;
|
|
36 |
class CCSXHKywdTopics;
|
|
37 |
class MCSXHKywdBuilder;
|
|
38 |
|
|
39 |
/**
|
|
40 |
* @class CCSXHHelpDataBase
|
|
41 |
* This class has all pointers & used to generate the required data from Application
|
|
42 |
*/
|
|
43 |
class CCSXHHelpDataBase : public CBase
|
|
44 |
{
|
|
45 |
public:
|
|
46 |
/**
|
|
47 |
* @function NewL
|
|
48 |
* @since S60 3.2
|
|
49 |
* Construct a CCSXHHelpDataBase
|
|
50 |
* and return a pointer to the created object
|
|
51 |
* @param aCoeEnv - Control Environment
|
|
52 |
* @return a CCSXHHelpDataBase Pointer
|
|
53 |
*/
|
|
54 |
IMPORT_C static CCSXHHelpDataBase* NewL(CCoeEnv* aCoeEnv,const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic);
|
|
55 |
/**
|
|
56 |
* @function NewLC
|
|
57 |
* @since S60 3.2
|
|
58 |
* Construct a CCSXHHelpDataBase
|
|
59 |
* and return a pointer to the created object using two phase construction
|
|
60 |
* @param aCoeEnv - Control Environment
|
|
61 |
* @return a CCSXHHelpDataBase Pointer
|
|
62 |
*/
|
|
63 |
static CCSXHHelpDataBase* NewLC(CCoeEnv *aCoeEnv,const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic);
|
|
64 |
|
|
65 |
/**
|
|
66 |
* @function GetInstance
|
|
67 |
* @since S60 3.2
|
|
68 |
* Get the instance of database class
|
|
69 |
* @return database pointer
|
|
70 |
*/
|
|
71 |
static CCSXHHelpDataBase* GetInstance();
|
|
72 |
|
|
73 |
/**
|
|
74 |
* @function ~CCSXHHelpDataBase
|
|
75 |
* @since S60 3.2
|
|
76 |
* Destroy the object and release all memory objects
|
|
77 |
*/
|
|
78 |
IMPORT_C ~CCSXHHelpDataBase();
|
|
79 |
/**
|
|
80 |
* @function GetMainTopics
|
|
81 |
* @since S60 3.2
|
|
82 |
* Get the instance of Main toc1
|
|
83 |
* @return toc1 pointer
|
|
84 |
*/
|
|
85 |
IMPORT_C CCSXHGenericTOC1* GetMainTopics();
|
|
86 |
/**
|
|
87 |
* @function GetKywdTopics
|
|
88 |
* @since S60 3.2
|
|
89 |
* Get the instance of keyword toc1
|
|
90 |
* @return toc1 pointer
|
|
91 |
*/
|
|
92 |
IMPORT_C CCSXHGenericTOC1* GetKywdTopics();
|
|
93 |
/**
|
|
94 |
* @function GetAppHelpsTopics
|
|
95 |
* @since S60 5.2
|
|
96 |
* Get the instance of application (custom) helps toc1
|
|
97 |
* @return toc1 pointer
|
|
98 |
*/
|
|
99 |
IMPORT_C CCSXHGenericTOC1* GetAppHelpsTopics();
|
|
100 |
/**
|
|
101 |
* @function ClearAllTOC1Contents
|
|
102 |
* @since S60 3.2
|
|
103 |
* Delete all the objects from the Array
|
|
104 |
*/
|
|
105 |
IMPORT_C void ClearAllTOC1Contents();
|
|
106 |
/**
|
|
107 |
* @function GetContextTopic
|
|
108 |
* @since S60 3.2
|
|
109 |
* Delete all the objects from the Array
|
|
110 |
* @param aContextMessage - Message Sent by other Application
|
|
111 |
* @return Database pointer
|
|
112 |
*/
|
|
113 |
IMPORT_C CCSXHHelpContentBase* GetContextTopic(const TDesC8& aContextMessage);
|
|
114 |
/**
|
|
115 |
* @function GetHtmlTopicForUrlL
|
|
116 |
* @since S60 3.2
|
|
117 |
* Delete all the objects from the Array
|
|
118 |
* @param aurl - Html file path
|
|
119 |
* @return Database pointer
|
|
120 |
*/
|
|
121 |
IMPORT_C CCSXHHelpContentBase* GetHtmlTopicForUrlL(const TDesC& aurl);
|
|
122 |
|
|
123 |
/**
|
|
124 |
* @function IncrementProgressBar
|
|
125 |
* @since S60 3.2
|
|
126 |
* Increments the progress info
|
|
127 |
* @return progress info pointer
|
|
128 |
*/
|
|
129 |
void IncrementKeywordSearchCount(TInt aUnits = 1);
|
|
130 |
/**
|
|
131 |
* @function GetLegacyParser
|
|
132 |
* @since S60 3.2
|
|
133 |
* Get LegacyContentparser
|
|
134 |
* @return LegacyContentParser pointer
|
|
135 |
*/
|
|
136 |
CCSXHLegacyContentParser* GetLegacyParser();
|
|
137 |
/**
|
|
138 |
* @function GetHtmlParser
|
|
139 |
* @since S60 3.2
|
|
140 |
* Get htmlContentparser
|
|
141 |
* @return HtmlContentParser pointer
|
|
142 |
*/
|
|
143 |
CCSXHHTMLContentParser* GetHtmlParser();
|
|
144 |
/**
|
|
145 |
* @function InsertKeywordL
|
|
146 |
* @since S60 3.2
|
|
147 |
* Insert into array
|
|
148 |
* @param aKywdName - Keyword Name
|
|
149 |
* aToc1 - Toc1 Object
|
|
150 |
*/
|
|
151 |
void InsertKeywordL(const TDesC& aKywdName, CCSXHHtmlTOC1* aToc1);
|
|
152 |
/**
|
|
153 |
* @function InsertKeywordL
|
|
154 |
* @since S60 3.2
|
|
155 |
* Insert into Array
|
|
156 |
* @param aKywdName - Keyword Name
|
|
157 |
* aLegacyKywdIndex - Position
|
|
158 |
* aCatUid - Application Uid
|
|
159 |
*/
|
|
160 |
void InsertKeywordL(const TDesC& aKywdName, TInt aLegacyKywdIndex, const TUid& aCatUid);
|
|
161 |
|
|
162 |
|
|
163 |
/**
|
|
164 |
* @function InitGenerateKeywordTOC2ListL
|
|
165 |
* @since S60 3.2
|
|
166 |
* Initializes the generation of kywd toc2 objects
|
|
167 |
* @param aKywdToc1 - Keyword toc1 object
|
|
168 |
*/
|
|
169 |
IMPORT_C TInt InitGenerateKeywordTOC2ListL(CCSXHKywdTOC1* aKywdToc1);
|
|
170 |
|
|
171 |
/**
|
|
172 |
* @function GenerateKeywordTOC2ListL
|
|
173 |
* @since S60 3.2
|
|
174 |
* Generate the toc2 objects,InitGenerateKeywordTOC2ListL has to be called first
|
|
175 |
* @param aKywdToc1 - Keyword toc1 object
|
|
176 |
*/
|
|
177 |
void GenerateKeywordTOC2ListL(CCSXHKywdTOC1* aKywdToc1);
|
|
178 |
|
|
179 |
/**
|
|
180 |
* @function InsertKeywordTopicL
|
|
181 |
* @since S60 3.2
|
|
182 |
* The caller should allocate memory for the aTOC2 object, if it is not successfully
|
|
183 |
* added to the topic, then this function will free the memory
|
|
184 |
* @param
|
|
185 |
* aToc2 - toc2 object
|
|
186 |
*/
|
|
187 |
CCSXHKywdTOC1* InsertKeywordTopicL(CCSXHGenericTOC2* aToc2);
|
|
188 |
|
|
189 |
/**
|
|
190 |
* @function InsertKeywordTopic
|
|
191 |
* @since S60 3.2
|
|
192 |
* The caller should allocate memory for the aTOC2 object, if it is not successfully
|
|
193 |
* added to the topic, then this function will free the memory
|
|
194 |
* @param aToc1 - toc1 object
|
|
195 |
* aToc2 - toc2 object
|
|
196 |
*/
|
|
197 |
void InsertKeywordTopic(CCSXHKywdTOC1* aToc1, CCSXHGenericTOC2* aToc2);
|
|
198 |
|
|
199 |
/**
|
|
200 |
* @function FillKeywordTopicsL
|
|
201 |
* @since S60 3.2
|
|
202 |
* Fills Keyword objects
|
|
203 |
* @param aBuilder - MCSXHKywdBuilder object
|
|
204 |
*/
|
|
205 |
void FillKeywordTopicsL(MCSXHKywdBuilder* aBuilder);
|
|
206 |
|
|
207 |
/**
|
|
208 |
* @function GetCoeEnv
|
|
209 |
* @since S60 3.2
|
|
210 |
* Get the Control Environment
|
|
211 |
* @return pointer to control environment
|
|
212 |
*/
|
|
213 |
CCoeEnv* GetCoeEnv();
|
|
214 |
/**
|
|
215 |
* @function GetKeywordSearchCount
|
|
216 |
* @since S60 3.2
|
|
217 |
* Gets the current count of keywords for search result view
|
|
218 |
* @return TInt count
|
|
219 |
*/
|
|
220 |
IMPORT_C TInt GetKeywordSearchCount();
|
|
221 |
|
|
222 |
private:
|
|
223 |
/**
|
|
224 |
* @function ConstructL
|
|
225 |
* @since S60 3.2
|
|
226 |
* perform the second phase construction
|
|
227 |
*/
|
|
228 |
void ConstructL();
|
|
229 |
/**
|
|
230 |
* @function CCSXHHelpDataBase
|
|
231 |
* @since S60 3.2
|
|
232 |
* Construct a CCSXHHelpDataBase
|
|
233 |
* @param aCoeEnv - Control Environment
|
|
234 |
*/
|
|
235 |
CCSXHHelpDataBase(CCoeEnv* aCoeEnv,const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic);
|
|
236 |
|
|
237 |
/**
|
|
238 |
* @function GetContextTopicL
|
|
239 |
* @since S60 3.2
|
|
240 |
* Get the topic for the Context
|
|
241 |
* @param aContextMessage - Message sent by other Application
|
|
242 |
* @return Database pointer
|
|
243 |
*/
|
|
244 |
CCSXHHelpContentBase* GetContextTopicL(const TDesC8& aContextMessage);
|
|
245 |
|
|
246 |
// List of TOC1 entries
|
|
247 |
CCSXHMainTopics *iMainTOC1;
|
|
248 |
// List of keyword entries
|
|
249 |
CCSXHKywdTopics *iKywdTOC1;
|
|
250 |
|
|
251 |
CCSXHMainTopics* iAppHelpsToc;
|
|
252 |
|
|
253 |
|
|
254 |
CCSXHHTMLContentParser *iHTMLContentParser;
|
|
255 |
CCSXHLegacyContentParser *iLegacyContentParser;
|
|
256 |
|
|
257 |
CCoeEnv *iCoeEnv;
|
|
258 |
|
|
259 |
CCSXHHelpContentBase *iLastContextTopic;
|
|
260 |
|
|
261 |
MCSXHKywdBuilder *iKwydBuilder;
|
|
262 |
|
|
263 |
TApaAppCaption iAppCaption;
|
|
264 |
|
|
265 |
TApaAppCaption iAppHelpTopic;
|
|
266 |
TInt iKeywordSearchCount;
|
|
267 |
|
|
268 |
};
|
|
269 |
|
|
270 |
|
|
271 |
|
|
272 |
#endif /* INC_CSXHHELPDATABASE_H_HEADER_INCLUDED_BC054F58 */
|