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: CCSXHHtmlTOC2 class declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef INC_CSXHHTMLTOC2_H_HEADER_INCLUDED_BC052432 |
|
20 #define INC_CSXHHTMLTOC2_H_HEADER_INCLUDED_BC052432 |
|
21 |
|
22 #include "CSXHGenericTOC2.h" |
|
23 |
|
24 class CCSXHGenericTOC1; |
|
25 class CCSXHKywdTOC1; |
|
26 class CCoeEnv; |
|
27 class TCoeHelpContext; |
|
28 class RFeatureControl; |
|
29 /** |
|
30 * @class CCSXHHtmlTOC2 |
|
31 * This class has the information of html TOC2 |
|
32 */ |
|
33 class CCSXHHtmlTOC2 : public CCSXHGenericTOC2 |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * @function NewL |
|
38 * @since S60 3.2 |
|
39 * Construct a CCSXHHtmlTOC2 |
|
40 * and return a pointer to the created object |
|
41 * @param aparent - TOC1 object |
|
42 * aName - toc2 Name |
|
43 * aHtmlFileName - FileName |
|
44 * aKey - ETrue for Keyword toc2, EFalse otherwise |
|
45 * @return a CCSXHHtmlTOC2 Pointer |
|
46 */ |
|
47 static CCSXHHtmlTOC2* NewL(CCSXHGenericTOC1* aparent,const TDesC& aName, |
|
48 const TDesC& aHtmlFileName,TBool aKey=EFalse); |
|
49 /** |
|
50 * @function NewLC |
|
51 * @since S60 3.2 |
|
52 * Construct a CCSXHHtmlTOC2 |
|
53 * and return a pointer to the created object using two phase construction |
|
54 * @param aparent - TOC1 object |
|
55 * aName - toc2 Name |
|
56 * aHtmlFileName - FileName |
|
57 * aKey - ETrue for Keyword toc2, EFalse otherwise |
|
58 * @return a CCSXHHtmlTOC2 Pointer |
|
59 */ |
|
60 static CCSXHHtmlTOC2* NewLC(CCSXHGenericTOC1*aparent,const TDesC& aName, |
|
61 const TDesC& aHtmlFileName,TBool aKey=EFalse); |
|
62 |
|
63 /** |
|
64 * @function ~CCSXHHtmlTOC2 |
|
65 * @since S60 3.2 |
|
66 * Destroy the object and release all memory objects |
|
67 */ |
|
68 ~CCSXHHtmlTOC2(); |
|
69 |
|
70 /** |
|
71 * @function ~CCSXHHtmlTOC2 |
|
72 * @since S60 3.2 |
|
73 * Get the full path of the HTML file |
|
74 * @param aFileUrl - Buffer in order to get the file path |
|
75 */ |
|
76 IMPORT_C void GetHtmlUrlL(TBuf<KMaxFileName>& aFileUrl) const; |
|
77 |
|
78 /** |
|
79 * @function GetViewID |
|
80 * @since S60 3.2 |
|
81 * Get ViewId to activate the View |
|
82 * @return View Id |
|
83 */ |
|
84 TUid GetViewID() const; |
|
85 /** |
|
86 * @function GetTopicContentL |
|
87 * @since S60 3.2 |
|
88 * Get the content to display in the browser |
|
89 * @return Pointer to the buffer |
|
90 */ |
|
91 TAny* GetTopicContentL(); |
|
92 |
|
93 /** |
|
94 * @function GetFileName |
|
95 * @since S60 3.2 |
|
96 * Get html file Name |
|
97 * @return buffer which contains html file Name |
|
98 */ |
|
99 const TBuf<KMaxFileName>& GetFileName() const; |
|
100 |
|
101 /** |
|
102 * @function GetHelpContext |
|
103 * @since S60 3.2 |
|
104 * Constructs a Help Context corresponding to the topic |
|
105 * @returns true on success |
|
106 */ |
|
107 IMPORT_C TBool GetHelpContext(TCoeHelpContext& aContext) const; |
|
108 |
|
109 /** |
|
110 * @function GetContentsFromUrlL |
|
111 * @since S60 3.2 |
|
112 * Get content from a html file |
|
113 * @param aUrl - Full file path |
|
114 * aCoeEnv - Control Environment |
|
115 * @return pointer to buffer which contains HTML file content |
|
116 */ |
|
117 IMPORT_C static HBufC8* GetContentsFromUrlL(const TDesC& aUrl, |
|
118 CCoeEnv* aCoeEnv,RFeatureControl& aFeatureControl); |
|
119 |
|
120 /** |
|
121 * @function SetKywdParent |
|
122 * @since S60 3.2 |
|
123 * Set the parent object |
|
124 * @param aParent - keyword toc1 class pointer |
|
125 */ |
|
126 void SetKywdParent(CCSXHKywdTOC1* aParent); |
|
127 /** |
|
128 * @function GetKywdParent |
|
129 * @since S60 3.2 |
|
130 * Get the parent |
|
131 * @return poniter to keywordtoc1 (parent) class |
|
132 */ |
|
133 IMPORT_C CCSXHKywdTOC1* GetKywdParent(); |
|
134 |
|
135 /** |
|
136 * @function SetHtmlFilePath |
|
137 * @since S60 3.2 |
|
138 * Set Html file path |
|
139 * @param aFilePath - Html file path |
|
140 */ |
|
141 void SetHtmlFilePath(const TDesC& aFilePath); |
|
142 |
|
143 /** |
|
144 * @function GetHtmlFileName |
|
145 * @since S60 3.2 |
|
146 * Get html file |
|
147 * @param aFileName - Full path with html file name |
|
148 */ |
|
149 void GetHtmlFileName(TBuf<KMaxFileName>& aFileName); |
|
150 |
|
151 private: |
|
152 /** |
|
153 * @function CCSXHHtmlTOC2 |
|
154 * @since S60 3.2 |
|
155 * Construct a CCSXHHtmlTOC2 |
|
156 * @param aparent - TOC1 object |
|
157 * aName - toc2 Name |
|
158 * aHtmlFileName - FileName |
|
159 * aKey - ETrue for Keyword toc2, EFalse otherwise |
|
160 */ |
|
161 CCSXHHtmlTOC2(CCSXHGenericTOC1* aparent,const TDesC& aName, |
|
162 const TDesC& aHtmlFileName,TBool aKeyWord = false); |
|
163 |
|
164 private: |
|
165 TBuf<KMaxFileName> iHTMLFileName,iHTMLFilePath; |
|
166 TBool iKeyWordTopic; |
|
167 CCSXHKywdTOC1 *iKywdParent; |
|
168 }; |
|
169 |
|
170 |
|
171 |
|
172 #endif /* INC_CSXHHTMLTOC2_H_HEADER_INCLUDED_BC052432 */ |
|