114
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-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: AI2 main class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef _AIFW_H
|
|
20 |
#define _AIFW_H
|
|
21 |
|
|
22 |
// System includes
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <cenrepnotifyhandler.h>
|
|
25 |
|
|
26 |
// User includes
|
|
27 |
#include <aifweventhandler.h>
|
|
28 |
|
|
29 |
// Forward declarations
|
|
30 |
class CAiUiControllerManager;
|
|
31 |
class CAiStateManager;
|
|
32 |
class CAiStateProvider;
|
|
33 |
class CAiPluginFactory;
|
|
34 |
class CAiEventHandler;
|
|
35 |
class CAiWsPluginManager;
|
|
36 |
class THsPublisherInfo;
|
|
37 |
|
|
38 |
// Class declaration
|
|
39 |
/**
|
|
40 |
* @ingroup group_aifw
|
|
41 |
*
|
|
42 |
* Active Idle Framework main class.
|
|
43 |
*/
|
|
44 |
NONSHARABLE_CLASS( CAiFw ) : public CBase, public MAiFwEventHandler,
|
|
45 |
public MCenRepNotifyHandlerCallback
|
|
46 |
{
|
|
47 |
public:
|
|
48 |
// constructors and destructor
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Creates and returns a new Active Idle Framework object.
|
|
52 |
*
|
|
53 |
* @return new Active Idle Framework object. The object is also left
|
|
54 |
* on the cleanup stack.
|
|
55 |
* @exception Any of the system-wide error codes if framework creation
|
|
56 |
* fails due to an unrecoverable error.
|
|
57 |
*/
|
|
58 |
IMPORT_C static CAiFw* NewLC();
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Destructor
|
|
62 |
*/
|
|
63 |
~CAiFw();
|
|
64 |
|
|
65 |
public: // New functions
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Runs the Active Idle Framework. This function returns when the
|
|
69 |
* framework is shut down.
|
|
70 |
*
|
|
71 |
* @exception Any of the system-wide error codes if the framework
|
|
72 |
* encounters a fatal initialization or run-time error.
|
|
73 |
*/
|
|
74 |
IMPORT_C void RunL();
|
|
75 |
|
|
76 |
private:
|
|
77 |
// constructors
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Default C++ constructor
|
|
81 |
*/
|
|
82 |
CAiFw();
|
|
83 |
|
|
84 |
/**
|
|
85 |
* 2nd phase constructor
|
|
86 |
*/
|
|
87 |
void ConstructL();
|
|
88 |
|
|
89 |
private:
|
|
90 |
// from MAiFwEventHandler
|
|
91 |
|
|
92 |
/**
|
|
93 |
* @see MAiFwEventHandler
|
|
94 |
*/
|
|
95 |
void AppEnvReadyL();
|
|
96 |
|
|
97 |
/**
|
|
98 |
* @see MAiFwEventHandler
|
|
99 |
*/
|
|
100 |
void HandleUiReadyEventL( CAiUiController& aUiController );
|
|
101 |
|
|
102 |
/**
|
|
103 |
* @see MAiFwEventHandler
|
|
104 |
*/
|
|
105 |
void HandleActivateUI();
|
|
106 |
|
|
107 |
/**
|
|
108 |
* @see MAiFwEventHandler
|
|
109 |
*/
|
|
110 |
void HandleUiShutdown( CAiUiController& aUiController );
|
|
111 |
|
|
112 |
/**
|
|
113 |
* @see MAiFwEventHandler
|
|
114 |
*/
|
|
115 |
void HandlePluginEvent( const TDesC& aParam );
|
|
116 |
|
|
117 |
/**
|
|
118 |
* @see MAiFwEventHandler
|
|
119 |
*/
|
|
120 |
void HandlePluginEventL(
|
|
121 |
const THsPublisherInfo& aPublisherInfo,
|
|
122 |
const TDesC& aParam );
|
|
123 |
|
|
124 |
/**
|
|
125 |
* @see MAiFwEventHandler
|
|
126 |
*/
|
|
127 |
TBool HasMenuItemL(
|
|
128 |
const THsPublisherInfo& aPublisherInfo,
|
|
129 |
const TDesC& aMenuItem );
|
|
130 |
|
|
131 |
/**
|
|
132 |
* @see MAiFwEventHandler
|
|
133 |
*/
|
|
134 |
TBool RefreshContent( const TDesC& aContentCid );
|
|
135 |
|
|
136 |
/**
|
|
137 |
* @see MAiFwEventHandler
|
|
138 |
*/
|
|
139 |
TBool RefreshContent(
|
|
140 |
const THsPublisherInfo& aPublisherInfo,
|
|
141 |
const TDesC& aContentCid );
|
|
142 |
|
|
143 |
/**
|
|
144 |
* @see MAiFwEventHandler
|
|
145 |
*/
|
|
146 |
TBool SuspendContent(
|
|
147 |
const THsPublisherInfo& aPublisherInfo,
|
|
148 |
const TDesC& aContentCid );
|
|
149 |
|
|
150 |
/**
|
|
151 |
* @see MAiFwEventHandler
|
|
152 |
*/
|
|
153 |
TBool QueryIsMenuOpen();
|
|
154 |
|
|
155 |
private:
|
|
156 |
// from MCenRepNotifyHandlerCallback
|
|
157 |
|
|
158 |
/**
|
|
159 |
* @see MCenRepNotifyHandlerCallback
|
|
160 |
*/
|
|
161 |
void HandleNotifyInt( TUint32 aId, TInt aNewValue );
|
|
162 |
|
|
163 |
public:
|
|
164 |
// new functions
|
|
165 |
|
|
166 |
/**
|
|
167 |
* Get repository
|
|
168 |
*
|
|
169 |
* @since S60 5.2
|
|
170 |
* @return Repositury
|
|
171 |
*/
|
|
172 |
CRepository& Repository() const;
|
|
173 |
|
|
174 |
private:
|
|
175 |
// new functions
|
|
176 |
|
|
177 |
void SwapUiControllerL( TBool aToExtHS );
|
|
178 |
|
|
179 |
private:
|
|
180 |
// data
|
|
181 |
|
|
182 |
/** UI Controller manager, Owned. */
|
|
183 |
CAiUiControllerManager* iUiControllerManager;
|
|
184 |
/** Plugin factory, Owned */
|
|
185 |
CAiPluginFactory* iFactory;
|
|
186 |
/** State manager, Owned */
|
|
187 |
CAiStateManager* iStateManager;
|
|
188 |
/** State provider, Owned */
|
|
189 |
CAiStateProvider* iStateProvider;
|
|
190 |
/** Plugin event handler, Owned. */
|
|
191 |
CAiEventHandler* iEventHandler;
|
|
192 |
/** Window server plug-in manager, Owned. */
|
|
193 |
CAiWsPluginManager* iWsPluginManager;
|
|
194 |
/** Notify handler for cenrep, Owned. */
|
|
195 |
CCenRepNotifyHandler* iNotifyHandler;
|
|
196 |
/** Notify handler for cenrep, Owned. */
|
|
197 |
CCenRepNotifyHandler* iNotifyHandlerESS;
|
|
198 |
/** Idle repository, Owned. */
|
|
199 |
CRepository* iRepository;
|
|
200 |
|
|
201 |
TBool iLibrariesLoaded;
|
|
202 |
|
|
203 |
RLibrary iLibrary1;
|
|
204 |
RLibrary iLibrary2;
|
|
205 |
RLibrary iLibrary3;
|
|
206 |
};
|
|
207 |
|
|
208 |
#endif // _AIFW_H
|
|
209 |
|