author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 20:58:58 +0300 | |
branch | RCL_3 |
changeset 35 | 3321d3e205b6 |
parent 34 | 5456b4e8b3a8 |
permissions | -rw-r--r-- |
34 | 1 |
/* |
2 |
* Copyright (c) 2008 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: Data class to hold application configuration info |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef _XNROOTDATA_H |
|
20 |
#define _XNROOTDATA_H |
|
21 |
||
22 |
// System includes |
|
23 |
#include <e32base.h> |
|
24 |
#include <babitflags.h> |
|
25 |
||
26 |
// User includes |
|
27 |
#include "xnplugindata.h" |
|
28 |
||
29 |
// Forward declarations |
|
30 |
class CXnViewManager; |
|
31 |
class CXnViewData; |
|
32 |
class CXnEcomHandler; |
|
33 |
class CXnODTParser; |
|
34 |
class CXnODT; |
|
35 |
||
36 |
/** |
|
37 |
* Holds root data in UiEngine |
|
38 |
* |
|
39 |
* @ingroup group_xnlayoutengine |
|
40 |
* @lib xn3layoutengine.lib |
|
41 |
* @since S60 5.0 |
|
42 |
*/ |
|
43 |
NONSHARABLE_CLASS( CXnRootData ) : public CXnPluginData |
|
44 |
{ |
|
45 |
public: |
|
46 |
// Constructors and destructor |
|
47 |
||
48 |
/** |
|
49 |
* Two-phased constructor. |
|
50 |
*/ |
|
51 |
static CXnRootData* NewL( CXnViewManager& aManager, TUid aApplicationUid ); |
|
52 |
||
53 |
/** |
|
54 |
* Two-phased constructor. Leaving on stack |
|
55 |
*/ |
|
56 |
static CXnRootData* NewLC( CXnViewManager& aManager, TUid aApplicationUid ); |
|
57 |
||
58 |
/** |
|
59 |
* Destructor |
|
60 |
*/ |
|
61 |
~CXnRootData(); |
|
62 |
||
63 |
protected: |
|
64 |
/** |
|
65 |
* C++ constructor |
|
66 |
*/ |
|
67 |
CXnRootData( CXnViewManager& aManager, TUid aApplicationUid ); |
|
68 |
||
69 |
private: |
|
70 |
// private constructors |
|
71 |
||
72 |
/** |
|
73 |
* Leaving constructor |
|
74 |
*/ |
|
75 |
void ConstructL(); |
|
76 |
||
77 |
public: |
|
78 |
// From CXnPluginData |
|
79 |
||
80 |
/** |
|
81 |
* @see CXnPluginData |
|
82 |
*/ |
|
83 |
TInt Load(); |
|
84 |
||
85 |
/** |
|
86 |
* @see CXnPluginData |
|
87 |
*/ |
|
88 |
void Destroy(); |
|
89 |
||
90 |
public: |
|
91 |
// New functions |
|
92 |
||
93 |
/** |
|
94 |
* Loads remaining application views |
|
95 |
*/ |
|
35
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
96 |
void LoadRemainingViewsL(); |
34 | 97 |
|
98 |
/** |
|
99 |
* Cancels load remaining application views |
|
100 |
*/ |
|
101 |
void CancelLoadRemainingViews(); |
|
102 |
||
103 |
/** |
|
104 |
* Gets application active view data |
|
105 |
* |
|
106 |
* @return Active view data |
|
107 |
*/ |
|
108 |
CXnViewData& ActiveViewData() const; |
|
109 |
||
110 |
/** |
|
111 |
* Gets previous view data from currently active one |
|
112 |
* |
|
113 |
* @return Previous view data |
|
114 |
*/ |
|
115 |
CXnViewData& PreviousViewData() const; |
|
116 |
||
117 |
/** |
|
118 |
* Gets next view data from currently active one |
|
119 |
* |
|
120 |
* @return Next view data |
|
121 |
*/ |
|
122 |
CXnViewData& NextViewData() const; |
|
123 |
||
124 |
/** |
|
125 |
* Sets view data to destroyal list |
|
126 |
* |
|
127 |
* @param aViewData View data to destroy |
|
128 |
*/ |
|
129 |
void DestroyViewData( CXnViewData* aViewData ); |
|
130 |
||
131 |
/** |
|
132 |
* Gets ODT |
|
133 |
* |
|
134 |
* @return ODT |
|
135 |
*/ |
|
136 |
CXnODT* ODT() const; |
|
137 |
||
138 |
/** |
|
139 |
* Gets root node from ODT |
|
140 |
* |
|
141 |
* @return Root node |
|
142 |
*/ |
|
143 |
CXnNode* RootNode() const; |
|
144 |
||
145 |
/** |
|
146 |
* Gets ODT Parser |
|
147 |
* |
|
148 |
* @return ODT Parser |
|
149 |
*/ |
|
150 |
CXnODTParser& Parser() const; |
|
151 |
||
152 |
/** |
|
153 |
* Gets Ecom handler |
|
154 |
* |
|
155 |
* @return Ecom handler |
|
156 |
*/ |
|
157 |
CXnEcomHandler& EcomHandler() const; |
|
158 |
||
159 |
/** |
|
160 |
* Sets maximum pages allowed |
|
161 |
* |
|
162 |
* @param aPages maximum pages |
|
163 |
*/ |
|
164 |
void SetMaxPages( TInt32 aPages ); |
|
165 |
||
166 |
/** |
|
167 |
* Get maximum pages allowed |
|
168 |
* |
|
169 |
* @return number of pages allowed |
|
170 |
*/ |
|
171 |
TInt32 MaxPages(); |
|
35
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
172 |
|
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
173 |
/** |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
174 |
* Returns template view's uid |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
175 |
* |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
176 |
* @return Returns template view's uid, or if not set qhd default |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
177 |
*/ |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
178 |
const TDesC8& TemplateViewUid() const; |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
179 |
|
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
180 |
/** |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
181 |
* Sets template view's uid |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
182 |
* |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
183 |
* @param Template view's uid |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
184 |
*/ |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
185 |
void SetTemplateViewUidL( const TDesC8& aTemplateViewUid ); |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
186 |
|
34 | 187 |
/** |
188 |
* Returns ETrue, if all views are loaded |
|
189 |
*/ |
|
190 |
TBool AllViewsLoaded() const; |
|
191 |
||
192 |
/** |
|
193 |
* Returns ETrue, if all views are destoyed |
|
194 |
*/ |
|
195 |
TBool AllViewsDestroyed() const; |
|
196 |
||
197 |
private: |
|
198 |
// New functions |
|
199 |
static TInt RunLoadL( TAny* aAny ); |
|
200 |
static TInt RunDestroyL( TAny *aAny ); |
|
201 |
||
202 |
private: |
|
203 |
// data |
|
204 |
||
205 |
/** Timer for loading views, Owned */ |
|
206 |
CPeriodic* iLoadTimer; |
|
207 |
/** Timer for deleting views, Owned */ |
|
208 |
CPeriodic* iDestroyTimer; |
|
209 |
/** Application Uid */ |
|
210 |
TUid iApplicationUid; |
|
211 |
/** ECom handler, Owned */ |
|
212 |
CXnEcomHandler* iEcomHandler; |
|
213 |
/** ODT Parser, Owned */ |
|
214 |
CXnODTParser* iParser; |
|
215 |
/** ODT which describes application configuration, Owned */ |
|
216 |
CXnODT* iODT; |
|
217 |
/** Array of views waiting destruction */ |
|
218 |
RPointerArray< CXnViewData > iViewsToDestroy; |
|
219 |
/** Flag to determine remaining view load direction */ |
|
220 |
TBool iLoadForward; |
|
221 |
/** Maximum of views allowed */ |
|
222 |
TInt32 iMaxPages; |
|
35
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
223 |
/** Template view uid is uid of the view when user selects New view */ |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
224 |
HBufC8* iTemplateViewUid; |
34 | 225 |
/** Load error code */ |
226 |
TInt iLoadError; |
|
227 |
}; |
|
228 |
||
229 |
#endif // _XNROOTDATA_H |