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: CCSXHHtmlTOC1 class declaration
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef INC_CSXHHTMLTOC1_H_HEADER_INCLUDED_BC0568C5
|
|
20 |
#define INC_CSXHHTMLTOC1_H_HEADER_INCLUDED_BC0568C5
|
|
21 |
|
|
22 |
#include "CSXHGenericTOC1.h"
|
|
23 |
|
|
24 |
class CCSXHHelpDataBase;
|
|
25 |
|
|
26 |
/**
|
|
27 |
* @class TAppUid
|
|
28 |
* This class stores the required information to store a folder name in string
|
|
29 |
* as integer and converts it back to a string when required. This class is mainly
|
|
30 |
* to save RAM space
|
|
31 |
*/
|
|
32 |
|
|
33 |
class TAppUid
|
|
34 |
{
|
|
35 |
public:
|
|
36 |
TAppUid(const TDesC& aFolder);
|
|
37 |
const TUid& GetUid() const;
|
|
38 |
TBool IsValid() const;
|
|
39 |
void AppendUid(TBuf<KMaxFileName>& aStr) const;
|
|
40 |
private:
|
|
41 |
TUid iUid;
|
|
42 |
TUint8 iLength;
|
|
43 |
};
|
|
44 |
|
|
45 |
|
|
46 |
/**
|
|
47 |
* @class CCSXHHtmlTOC1
|
|
48 |
* This class has the information of html TOC1
|
|
49 |
*/
|
|
50 |
class CCSXHHtmlTOC1 : public CCSXHGenericTOC1
|
|
51 |
{
|
|
52 |
public:
|
|
53 |
/**
|
|
54 |
* @function NewL
|
|
55 |
* @since S60 3.2
|
|
56 |
* Construct a CCSXHHtmlTOC1
|
|
57 |
* and return a pointer to the created object
|
|
58 |
* @param aName - TOC1 Name
|
|
59 |
* aUid - Application Uid
|
|
60 |
* aDrive - Drive Number
|
|
61 |
* @return a CCSXHHtmlTOC1 Pointer
|
|
62 |
*/
|
|
63 |
static CCSXHHtmlTOC1* NewL(const TDesC& aName,const TDesC& aFolder,
|
|
64 |
const TInt& aDrive, TUid aViewId, TInt32 aPriority = 0);
|
|
65 |
/**
|
|
66 |
* @function ~CCSXHHtmlTOC1
|
|
67 |
* @since S60 3.2
|
|
68 |
* Destroy the object and release all memory objects
|
|
69 |
*/
|
|
70 |
~CCSXHHtmlTOC1();
|
|
71 |
|
|
72 |
/**
|
|
73 |
* @function GetViewID
|
|
74 |
* @since S60 3.2
|
|
75 |
* Get ViewId to activate the View
|
|
76 |
* @return View Id
|
|
77 |
*/
|
|
78 |
TUid GetViewID() const;
|
|
79 |
|
|
80 |
/**
|
|
81 |
* @function GetAppUid
|
|
82 |
* @since S60 3.2
|
|
83 |
* Get Application uid
|
|
84 |
* @return Application UId
|
|
85 |
*/
|
|
86 |
const TUid& GetAppUid() const;
|
|
87 |
/**
|
|
88 |
* @function GetContextTopic
|
|
89 |
* @since S60 3.2
|
|
90 |
* Get content for Context Name
|
|
91 |
* @param acontextName - Context Name
|
|
92 |
* @return pointer to database class
|
|
93 |
*/
|
|
94 |
CCSXHHelpContentBase* GetContextTopic(const TDesC& acontextName);
|
|
95 |
/**
|
|
96 |
* @function GetHelpFileL
|
|
97 |
* @since S60 3.2
|
|
98 |
* Get the file path
|
|
99 |
* @param aFilePath - File Path
|
|
100 |
*/
|
|
101 |
void GetHelpFileL(TBuf<KMaxFileName>& aFilePath) const;
|
|
102 |
/**
|
|
103 |
* @function GetHtmlTopicForFile
|
|
104 |
* @since S60 3.2
|
|
105 |
* Get the toc2 object in order to get Content
|
|
106 |
* @param aFile - toc2 Name
|
|
107 |
*/
|
|
108 |
CCSXHHelpContentBase* GetHtmlTopicForFile(const TDesC& aFile);
|
|
109 |
|
|
110 |
/**
|
|
111 |
* @function GetHelpFileL
|
|
112 |
* @since S60 3.2
|
|
113 |
* Get the file path
|
|
114 |
* @return ETrue, if it part of ROMdrive, EFalse otherwise
|
|
115 |
*/
|
|
116 |
TBool IsROMDrive();
|
|
117 |
|
|
118 |
TBool IsValid() const;
|
|
119 |
|
|
120 |
protected:
|
|
121 |
/**
|
|
122 |
* @function CCSXHHtmlTOC1
|
|
123 |
* @since S60 3.2
|
|
124 |
* Construct a CCSXHHtmlTOC1
|
|
125 |
* @param aName - TOC1 Name
|
|
126 |
* aUid - Application Uid
|
|
127 |
* aDrive - Drive Number
|
|
128 |
*/
|
|
129 |
CCSXHHtmlTOC1(const TDesC& aName, const TDesC& aFolder, const TInt& aDriveName, TUid aViewId, TInt32 aPriority);
|
|
130 |
/**
|
|
131 |
* @function InitChildList
|
|
132 |
* @since S60 3.2
|
|
133 |
* Allocate Memory to the array
|
|
134 |
*/
|
|
135 |
void InitChildList();
|
|
136 |
|
|
137 |
|
|
138 |
private:
|
|
139 |
|
|
140 |
|
|
141 |
TAppUid iAppUid;
|
|
142 |
short iDrive;
|
|
143 |
TUid iViewId;
|
|
144 |
};
|
|
145 |
|
|
146 |
|
|
147 |
|
|
148 |
#endif /* INC_CSXHHTMLTOC1_H_HEADER_INCLUDED_BC0568C5 */
|