279
|
1 |
// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
|
0
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
279
|
14 |
// Contains the common definitions for the Domain Manager interface for clients.
|
0
|
15 |
//
|
|
16 |
// WARNING: This file contains some APIs which are internal and are subject
|
|
17 |
// to change without notice. Such APIs should therefore not be used
|
|
18 |
// outside the Kernel and Hardware Services package.
|
|
19 |
//
|
|
20 |
|
|
21 |
#ifndef __DOMAIN_DEFS_H__
|
|
22 |
#define __DOMAIN_DEFS_H__
|
|
23 |
|
|
24 |
#include <e32cmn.h>
|
|
25 |
#include <e32power.h>
|
|
26 |
|
279
|
27 |
|
0
|
28 |
/**
|
|
29 |
@internalTechnology
|
|
30 |
*/
|
|
31 |
// Property category UID value reserved for Domain Management services.
|
|
32 |
// This is the same as the process SID (see domainsrv.mmp)
|
|
33 |
static const TInt32 KUidDmPropertyCategoryValue = 0x1020E406;
|
|
34 |
/**
|
|
35 |
@internalTechnology
|
|
36 |
*/
|
|
37 |
// Property category UID reserved for Domain Management services
|
|
38 |
static const TUid KUidDmPropertyCategory = { KUidDmPropertyCategoryValue };
|
|
39 |
/**
|
|
40 |
@internalTechnology
|
|
41 |
*/
|
|
42 |
static const TUint KDmPropertyKeyInit = 0x00000001;
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
/**
|
|
48 |
@internalAll
|
|
49 |
|
|
50 |
Defines the ways in which a domain hierarchy can be traversed.
|
|
51 |
|
|
52 |
@see CDmDomainManager::RequestSystemTransition()
|
|
53 |
@see CDmDomainManager::RequestDomainTransition()
|
|
54 |
*/
|
|
55 |
enum TDmTraverseDirection
|
|
56 |
{
|
|
57 |
/**
|
|
58 |
Transition parents first (i.e. before their children).
|
|
59 |
*/
|
|
60 |
ETraverseParentsFirst,
|
|
61 |
|
|
62 |
/**
|
|
63 |
Transition children first (i.e. before their parents).
|
|
64 |
*/
|
|
65 |
ETraverseChildrenFirst,
|
|
66 |
|
|
67 |
/**
|
|
68 |
Use the default direction specified in policy
|
|
69 |
*/
|
|
70 |
ETraverseDefault,
|
|
71 |
|
|
72 |
/**
|
|
73 |
Maximum value for traverse mode
|
|
74 |
*/
|
|
75 |
ETraverseMax = ETraverseDefault
|
|
76 |
};
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
/**
|
|
82 |
@internalAll
|
|
83 |
|
|
84 |
Defines the type of transitions that will be notified to the observer.
|
|
85 |
|
|
86 |
One of these values is specified when the observer is started through a
|
|
87 |
call to CHierarchyObserver::StartObserver().
|
|
88 |
*/
|
|
89 |
enum TDmNotifyType
|
|
90 |
{
|
|
91 |
/**
|
|
92 |
Notifies the observer about all transition requests.
|
|
93 |
*/
|
|
94 |
EDmNotifyTransRequest =0x02,
|
|
95 |
|
|
96 |
/**
|
|
97 |
Notifies the observer about successful transitions only.
|
|
98 |
*/
|
|
99 |
EDmNotifyPass =0x04,
|
|
100 |
|
|
101 |
/**
|
|
102 |
Notifies the observer about failing transitions only.
|
|
103 |
*/
|
|
104 |
EDmNotifyFail=0x08,
|
|
105 |
|
|
106 |
/**
|
|
107 |
Notifies the observer about all completed transitions.
|
|
108 |
*/
|
|
109 |
EDmNotifyTransOnly=EDmNotifyPass|EDmNotifyFail,
|
|
110 |
|
|
111 |
/**
|
|
112 |
Notifies the observer about successful transitions and transition requests.
|
|
113 |
*/
|
|
114 |
EDmNotifyReqNPass=EDmNotifyTransRequest|EDmNotifyPass,
|
|
115 |
|
|
116 |
/**
|
|
117 |
Notifies the observer about failed transitions and transition requests.
|
|
118 |
*/
|
|
119 |
EDmNotifyReqNFail=EDmNotifyTransRequest|EDmNotifyFail,
|
|
120 |
|
|
121 |
/**
|
|
122 |
Notifies the observer about every event.
|
|
123 |
*/
|
|
124 |
EDmNotifyAll=EDmNotifyTransRequest|EDmNotifyFail|EDmNotifyPass,
|
|
125 |
};
|
|
126 |
|
|
127 |
|
|
128 |
|
|
129 |
|
|
130 |
/**
|
|
131 |
@internalAll
|
|
132 |
|
|
133 |
Domain hierarchy identifier type.
|
|
134 |
|
|
135 |
Domain hierarchies are designated by "well known" domain hierarchy identifiers.
|
|
136 |
The domain policy statically defines the list of domain hierarchies and their
|
|
137 |
identifiers.
|
|
138 |
|
|
139 |
@see RDmDomainManager::Connect()
|
|
140 |
@see RDmDomainManager::AddDomainHierarchy()
|
|
141 |
@see RDmDomain::Connect()
|
|
142 |
@see CHierarchyObserver
|
|
143 |
@see CDmDomainManager
|
|
144 |
@see CDmDomain
|
|
145 |
*/
|
|
146 |
typedef TUint8 TDmHierarchyId;
|
|
147 |
|
|
148 |
|
|
149 |
|
|
150 |
|
|
151 |
/**
|
|
152 |
@internalAll
|
|
153 |
|
|
154 |
A type used to describe the state of a domain.
|
|
155 |
*/
|
|
156 |
typedef TUint TDmDomainState;
|
|
157 |
|
|
158 |
|
|
159 |
|
|
160 |
|
|
161 |
/**
|
|
162 |
@internalTechnology
|
|
163 |
|
279
|
164 |
The power domain hierarchy Id. This hierarchy is used in development
|
|
165 |
platforms.
|
0
|
166 |
*/
|
|
167 |
static const TDmHierarchyId KDmHierarchyIdPower = 1;
|
|
168 |
|
|
169 |
|
|
170 |
|
|
171 |
|
|
172 |
/**
|
|
173 |
@internalAll
|
|
174 |
|
279
|
175 |
The system state start-up and shutdown domain hierarchy Id. This hierarchy is
|
|
176 |
used in production devices.
|
0
|
177 |
*/
|
|
178 |
static const TDmHierarchyId KDmHierarchyIdStartup = 2;
|
|
179 |
|
|
180 |
|
|
181 |
|
|
182 |
/**
|
|
183 |
@internalAll
|
|
184 |
|
|
185 |
The start-up domain hierarchy Id. (For use by domain manager and/or SSMA)
|
|
186 |
*/
|
|
187 |
static const TDmHierarchyId KDmHierarchyIdSystemState = KDmHierarchyIdStartup;
|
|
188 |
|
|
189 |
|
|
190 |
|
|
191 |
/**
|
|
192 |
@publishedPartner
|
|
193 |
@released
|
|
194 |
|
|
195 |
Domain identifier type.
|
|
196 |
|
|
197 |
Domains are designated by "well known" domain identifiers.
|
|
198 |
The domain manager statically defines the list of domains and their identifiers.
|
|
199 |
*/
|
|
200 |
typedef TUint16 TDmDomainId;
|
|
201 |
|
|
202 |
|
|
203 |
|
|
204 |
/**
|
|
205 |
@internalAll
|
|
206 |
|
|
207 |
A structure use to describe a transition failure.
|
|
208 |
*/
|
|
209 |
class TTransitionFailure
|
|
210 |
{
|
|
211 |
public:
|
|
212 |
inline TTransitionFailure() {};
|
|
213 |
TTransitionFailure( TDmDomainId aDomainId, TInt aError);
|
|
214 |
|
|
215 |
public:
|
|
216 |
/**
|
|
217 |
Id of the domain of interest
|
|
218 |
*/
|
|
219 |
TDmDomainId iDomainId;
|
|
220 |
/**
|
|
221 |
error code in transition
|
|
222 |
*/
|
|
223 |
TInt iError;
|
|
224 |
};
|
|
225 |
|
|
226 |
|
|
227 |
/**
|
|
228 |
@internalTechnology
|
|
229 |
|
|
230 |
A structure use to describe a successful transition.
|
|
231 |
*/
|
|
232 |
class TTransInfo
|
|
233 |
{
|
|
234 |
public:
|
|
235 |
inline TTransInfo() {};
|
|
236 |
TTransInfo( TDmDomainId aDomainId, TDmDomainState aState, TInt aError);
|
|
237 |
|
|
238 |
public:
|
|
239 |
/**
|
|
240 |
Id of the domain of interest
|
|
241 |
*/
|
|
242 |
TDmDomainId iDomainId;
|
|
243 |
/**
|
|
244 |
Final state of the domain after the transition
|
|
245 |
*/
|
|
246 |
TDmDomainState iState;
|
|
247 |
/**
|
|
248 |
Any error in transition
|
|
249 |
*/
|
|
250 |
TInt iError;
|
|
251 |
};
|
|
252 |
|
|
253 |
|
|
254 |
|
279
|
255 |
/**
|
|
256 |
The possible ways in which the domain manager can behave when a transition
|
|
257 |
fails.
|
|
258 |
|
|
259 |
@see TDmHierarchyPolicy
|
|
260 |
@see TDmStateSpecV1
|
|
261 |
@see DmPolicyGetPolicy
|
|
262 |
*/
|
|
263 |
enum TDmTransitionFailurePolicy
|
|
264 |
{
|
|
265 |
// Failure policies
|
|
266 |
|
|
267 |
/** The domain manager stops at the first transition failure */
|
|
268 |
ETransitionFailureStop,
|
|
269 |
|
|
270 |
/** The domain manager continues at any transition failure */
|
|
271 |
ETransitionFailureContinue,
|
|
272 |
|
|
273 |
|
|
274 |
// Special failure policies
|
|
275 |
|
|
276 |
/** Used in SDmStateSpecV1 when the default failure policy for the
|
|
277 |
hierarchy should be used. The default failure policy is
|
|
278 |
returned by the DmPolicyGetPolicy() function, ordinal 3 in
|
|
279 |
the policy library. */
|
|
280 |
ETransitionFailureUsePolicyFromOrdinal3 = 256
|
|
281 |
};
|
|
282 |
|
|
283 |
|
0
|
284 |
|
|
285 |
/**
|
|
286 |
@publishedPartner
|
|
287 |
@released
|
|
288 |
|
|
289 |
The null domain identifier.
|
|
290 |
|
|
291 |
There are no domains with this identifier.
|
|
292 |
*/
|
|
293 |
static const TDmDomainId KDmIdNone = 0x00;
|
|
294 |
|
|
295 |
|
|
296 |
|
|
297 |
|
|
298 |
/**
|
|
299 |
@publishedPartner
|
|
300 |
@released
|
|
301 |
|
|
302 |
The common ancestor of all domains.
|
|
303 |
*/
|
|
304 |
static const TDmDomainId KDmIdRoot = 0x01;
|
|
305 |
|
|
306 |
|
|
307 |
|
|
308 |
|
|
309 |
/**
|
|
310 |
@publishedPartner
|
|
311 |
@released
|
|
312 |
|
|
313 |
The usual domain for all non-UI applications.
|
|
314 |
*/
|
|
315 |
static const TDmDomainId KDmIdApps = 0x02;
|
|
316 |
|
|
317 |
|
|
318 |
|
|
319 |
|
|
320 |
/**
|
|
321 |
@publishedPartner
|
|
322 |
@released
|
|
323 |
|
|
324 |
The usual domain for all UI applications.
|
|
325 |
*/
|
|
326 |
static const TDmDomainId KDmIdUiApps = 0x03;
|
|
327 |
|
|
328 |
|
|
329 |
|
|
330 |
|
|
331 |
/**
|
|
332 |
@publishedPartner
|
|
333 |
@released
|
|
334 |
|
|
335 |
Domain manager specific error code - the domain designated by
|
|
336 |
the specified domain identifier does not exist.
|
|
337 |
*/
|
|
338 |
static const TInt KDmErrBadDomainId = -256;
|
|
339 |
|
|
340 |
|
|
341 |
|
|
342 |
|
|
343 |
/**
|
|
344 |
@publishedPartner
|
|
345 |
@released
|
|
346 |
|
|
347 |
Domain manager specific error code - this RDmDomain object has already been
|
|
348 |
connected to a domain.
|
|
349 |
*/
|
|
350 |
static const TInt KDmErrAlreadyJoin = -257;
|
|
351 |
|
|
352 |
|
|
353 |
|
|
354 |
|
|
355 |
/**
|
|
356 |
@publishedPartner
|
|
357 |
@released
|
|
358 |
|
|
359 |
Domain manager specific error code - this RDmDomain object is not connected
|
|
360 |
to any domain.
|
|
361 |
*/
|
|
362 |
static const TInt KDmErrNotJoin = -258;
|
|
363 |
|
|
364 |
|
|
365 |
|
|
366 |
|
|
367 |
/**
|
|
368 |
@publishedPartner
|
|
369 |
@released
|
|
370 |
|
|
371 |
Domain manager specific error code - indicates a client-server protocol internal error.
|
|
372 |
*/
|
|
373 |
static const TInt KDmErrBadRequest = -259;
|
|
374 |
|
|
375 |
|
|
376 |
|
|
377 |
|
|
378 |
/**
|
|
379 |
@publishedPartner
|
|
380 |
@released
|
|
381 |
|
|
382 |
Domain manager specific error code - indicates an internal Domain Manager error.
|
|
383 |
*/
|
|
384 |
static const TInt KDmErrBadDomainSpec = -260;
|
|
385 |
|
|
386 |
|
|
387 |
|
|
388 |
|
|
389 |
/**
|
|
390 |
@publishedPartner
|
|
391 |
@released
|
|
392 |
|
|
393 |
Domain manager specific error code - indicates a bad sequence of requests.
|
|
394 |
|
|
395 |
Typically, this occurs when a new request been made while an ongoing domain
|
|
396 |
transition request has not yet completed.
|
|
397 |
*/
|
|
398 |
static const TInt KDmErrBadSequence = -261;
|
|
399 |
|
|
400 |
|
|
401 |
|
|
402 |
|
|
403 |
/**
|
|
404 |
@internalTechnology
|
|
405 |
|
|
406 |
Domain manager specific error code - indicates that a transition is outstanding.
|
|
407 |
|
|
408 |
*/
|
|
409 |
static const TInt KDmErrOutstanding = -262;
|
|
410 |
|
|
411 |
|
|
412 |
|
|
413 |
|
|
414 |
/**
|
|
415 |
@internalAll
|
|
416 |
|
|
417 |
Domain manager specific error code - indicates that the domain hierarchy does not exist.
|
|
418 |
*/
|
|
419 |
static const TInt KErrBadHierarchyId = -263;
|
|
420 |
|
279
|
421 |
|
|
422 |
|
|
423 |
|
0
|
424 |
#endif
|
|
425 |
|