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: CCSXHDocument class declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef INC_CSXHDOCUMENT_H_HEADER_INCLUDED_BC0121B7 |
|
20 #define INC_CSXHDOCUMENT_H_HEADER_INCLUDED_BC0121B7 |
|
21 |
|
22 #include <AknDoc.h> |
|
23 |
|
24 // Forward references |
|
25 class CAknAppUi; |
|
26 class CEikApplication; |
|
27 class CCSXHHelpDataBase; |
|
28 class CCSXHHelpContentBase; |
|
29 class CEikAppUi; |
|
30 class CEikProgressInfo; |
|
31 class CAknProgressDialog; |
|
32 class CIdle; |
|
33 /** |
|
34 @class CCSXHDocument |
|
35 * An instance of class CCSXHDocument is the Document part of the AVKON |
|
36 * application framework for the Csxhelp application |
|
37 */ |
|
38 |
|
39 class CCSXHDocument : public CAknDocument |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * @function NewL |
|
44 * @since S60 3.2 |
|
45 * Construct a CCSXHDocument for the AVKON application aApp |
|
46 * construction, and return a pointer to the created object |
|
47 * @param aApp - Application Object |
|
48 * @return a CCSXHDocument Pointer |
|
49 */ |
|
50 static CCSXHDocument* NewL( |
|
51 // application creating this document |
|
52 CEikApplication& aApp); |
|
53 // Construct a CCSXHDocument for the AVKON application aApp using two phase |
|
54 // construction, and return a pointer to the created object |
|
55 |
|
56 /** |
|
57 * @function NewLC |
|
58 * @since S60 3.2 |
|
59 * Construct a CCSXHDocument for the AVKON application aApp using two phase |
|
60 * construction, and return a pointer to the created object |
|
61 * @param aApp - Application Object |
|
62 * @return a CCSXHDocument Pointer |
|
63 */ |
|
64 static CCSXHDocument* NewLC( |
|
65 // application creating this document |
|
66 CEikApplication& aApp); |
|
67 |
|
68 |
|
69 /** |
|
70 * @function ~CCSXHDocument |
|
71 * @since S60 3.2 |
|
72 * Destroy the object and release all memory objects |
|
73 */ |
|
74 ~CCSXHDocument(); |
|
75 |
|
76 public: // from CAknDocument |
|
77 /** |
|
78 * @function CreateAppUiL |
|
79 * @since S60 3.2 |
|
80 * Create a CCSXHAppUi object and return a pointer to it |
|
81 * @return CCSXHAppUi class pointer |
|
82 */ |
|
83 CEikAppUi* CreateAppUiL(); |
|
84 |
|
85 public: |
|
86 /** |
|
87 * @function SetDisplayTopic |
|
88 * @since S60 3.2 |
|
89 * @param aDisplayTopic - HelpContentbase Class pointer |
|
90 */ |
|
91 void SetDisplayTopic(CCSXHHelpContentBase *aDisplayTopic); |
|
92 /** |
|
93 * @function SetDisplayAndPrevTopic |
|
94 * @since S60 3.2 |
|
95 * @param aDisplayTopic - HelpContentbase Class pointer |
|
96 */ |
|
97 void SetDisplayAndPrevTopic(CCSXHHelpContentBase *aDisplayTopic); |
|
98 /** |
|
99 * @function GetDisplayTopic |
|
100 * @since S60 3.2 |
|
101 * @return HelpContentBase Class pointer |
|
102 */ |
|
103 inline CCSXHHelpContentBase* GetDisplayTopic() const |
|
104 {return iDisplayTopic;} |
|
105 /** |
|
106 * @function GetPrevTopic |
|
107 * @since S60 3.2 |
|
108 * @return HelpContentBase Class pointer |
|
109 */ |
|
110 inline CCSXHHelpContentBase* GetPrevTopic() const |
|
111 {return iPrevTopic;} |
|
112 /** |
|
113 * @function ClearPrevTopic |
|
114 * @since S60 3.2 |
|
115 * @Clears the previous topic |
|
116 */ |
|
117 inline void ClearPrevTopic() |
|
118 {iPrevTopic = NULL;} |
|
119 /** |
|
120 * @function GetHelpDataBase |
|
121 * @since S60 3.2 |
|
122 * @return HelpContentBase Class pointer |
|
123 */ |
|
124 inline CCSXHHelpDataBase* GetHelpDataBase() const |
|
125 {return iHelpDataBase;} |
|
126 |
|
127 /** |
|
128 * @function GetHelpDataBase |
|
129 * @since S60 3.2 |
|
130 * Sends a Command to Application UI Class |
|
131 * @param aCommand - Command to be Handled |
|
132 */ |
|
133 void SendMessageToAppUiL(TInt aCommand); |
|
134 |
|
135 /** |
|
136 * @function SetContextTopicAsDisplayTopicL |
|
137 * @since S60 3.2 |
|
138 * Parse the Message, Get the topic for Display & set this Object as Current Display Object |
|
139 * @param aContextMessage - Message from Other Application for Context Sensitive launch |
|
140 * @return ETrue for Topic Found /EFalse for topic Not found |
|
141 */ |
|
142 TBool SetContextTopicAsDisplayTopicL(const TDesC8& aContextMessage); |
|
143 |
|
144 /** |
|
145 * @function GetHtmlTopicForUrlL |
|
146 * @since S60 3.2 |
|
147 * Get the Object for HTML topic using url Name |
|
148 * @param url - url Name |
|
149 * @return Pointer to the HelpDataBase which contains HTMLtopic info |
|
150 */ |
|
151 CCSXHHelpContentBase* GetHtmlTopicForUrlL(const TDesC &url); |
|
152 |
|
153 /** |
|
154 * @function InitProgressBar |
|
155 * @since S60 3.2 |
|
156 * Initializes the progress bar |
|
157 */ |
|
158 void InitProgressBarL(); |
|
159 |
|
160 /** |
|
161 * @function FreeProgressBar |
|
162 * @since S60 3.2 |
|
163 * Frees the progress bar |
|
164 */ |
|
165 void FreeProgressBarL(); |
|
166 |
|
167 /** |
|
168 * function for TCAllBack protocol. |
|
169 * called directly |
|
170 * @since 1.1 |
|
171 * @param aThis is the pointer to the actual instance |
|
172 * @return Whether finished or not |
|
173 */ |
|
174 static TInt CallBack(TAny* aThis); |
|
175 |
|
176 /** |
|
177 * call back function. |
|
178 * called by CallBackL() |
|
179 * @since 1.1 |
|
180 * @return Whether finished or not |
|
181 */ |
|
182 TInt DoCallBackL(); |
|
183 |
|
184 private: |
|
185 /** |
|
186 * @function CCSXHDocument |
|
187 * @since S60 3.2 |
|
188 * Perform the first phase of two phase construction |
|
189 */ |
|
190 CCSXHDocument( |
|
191 // application creating this document |
|
192 CEikApplication& aApp); |
|
193 |
|
194 private: |
|
195 CCSXHHelpDataBase *iHelpDataBase; |
|
196 CAknAppUi *iHelpAppUi; |
|
197 |
|
198 CCSXHHelpContentBase *iDisplayTopic; |
|
199 CCSXHHelpContentBase *iPrevTopic; |
|
200 |
|
201 CAknProgressDialog *iProgressDialog; |
|
202 |
|
203 CIdle *iIdle; |
|
204 |
|
205 TInt iTotalKeywordsInResultView; |
|
206 }; |
|
207 |
|
208 |
|
209 |
|
210 #endif /* INC_CSXHDOCUMENT_H_HEADER_INCLUDED_BC0121B7 */ |
|