Update contrib.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
15 // WARNING: This file contains some APIs which are internal and are subject
16 // to change without notice. Such APIs should therefore not be used
17 // outside the Kernel and Hardware Services package.
20 #ifndef __DOMAIN_DEFS_H__
21 #define __DOMAIN_DEFS_H__
29 // Property category UID value reserved for Domain Management services.
30 // This is the same as the process SID (see domainsrv.mmp)
31 static const TInt32 KUidDmPropertyCategoryValue = 0x1020E406;
35 // Property category UID reserved for Domain Management services
36 static const TUid KUidDmPropertyCategory = { KUidDmPropertyCategoryValue };
40 static const TUint KDmPropertyKeyInit = 0x00000001;
48 Defines the ways in which a domain hierarchy can be traversed.
50 @see CDmDomainManager::RequestSystemTransition()
51 @see CDmDomainManager::RequestDomainTransition()
53 enum TDmTraverseDirection
56 Transition parents first (i.e. before their children).
58 ETraverseParentsFirst,
61 Transition children first (i.e. before their parents).
63 ETraverseChildrenFirst,
66 Use the default direction specified in policy
71 Maximum value for traverse mode
73 ETraverseMax = ETraverseDefault
82 Defines the type of transitions that will be notified to the observer.
84 One of these values is specified when the observer is started through a
85 call to CHierarchyObserver::StartObserver().
90 Notifies the observer about all transition requests.
92 EDmNotifyTransRequest =0x02,
95 Notifies the observer about successful transitions only.
100 Notifies the observer about failing transitions only.
105 Notifies the observer about all completed transitions.
107 EDmNotifyTransOnly=EDmNotifyPass|EDmNotifyFail,
110 Notifies the observer about successful transitions and transition requests.
112 EDmNotifyReqNPass=EDmNotifyTransRequest|EDmNotifyPass,
115 Notifies the observer about failed transitions and transition requests.
117 EDmNotifyReqNFail=EDmNotifyTransRequest|EDmNotifyFail,
120 Notifies the observer about every event.
122 EDmNotifyAll=EDmNotifyTransRequest|EDmNotifyFail|EDmNotifyPass,
131 Domain hierarchy identifier type.
133 Domain hierarchies are designated by "well known" domain hierarchy identifiers.
134 The domain policy statically defines the list of domain hierarchies and their
137 @see RDmDomainManager::Connect()
138 @see RDmDomainManager::AddDomainHierarchy()
139 @see RDmDomain::Connect()
140 @see CHierarchyObserver
141 @see CDmDomainManager
144 typedef TUint8 TDmHierarchyId;
152 A type used to describe the state of a domain.
154 typedef TUint TDmDomainState;
162 The power domain hierarchy Id.
164 static const TDmHierarchyId KDmHierarchyIdPower = 1;
172 The start-up domain hierarchy Id.
174 static const TDmHierarchyId KDmHierarchyIdStartup = 2;
181 The start-up domain hierarchy Id. (For use by domain manager and/or SSMA)
183 static const TDmHierarchyId KDmHierarchyIdSystemState = KDmHierarchyIdStartup;
191 Domain identifier type.
193 Domains are designated by "well known" domain identifiers.
194 The domain manager statically defines the list of domains and their identifiers.
196 typedef TUint16 TDmDomainId;
203 A structure use to describe a transition failure.
205 class TTransitionFailure
208 inline TTransitionFailure() {};
209 TTransitionFailure( TDmDomainId aDomainId, TInt aError);
213 Id of the domain of interest
215 TDmDomainId iDomainId;
217 error code in transition
226 A structure use to describe a successful transition.
231 inline TTransInfo() {};
232 TTransInfo( TDmDomainId aDomainId, TDmDomainState aState, TInt aError);
236 Id of the domain of interest
238 TDmDomainId iDomainId;
240 Final state of the domain after the transition
242 TDmDomainState iState;
244 Any error in transition
256 The null domain identifier.
258 There are no domains with this identifier.
260 static const TDmDomainId KDmIdNone = 0x00;
269 The common ancestor of all domains.
271 static const TDmDomainId KDmIdRoot = 0x01;
280 The usual domain for all non-UI applications.
282 static const TDmDomainId KDmIdApps = 0x02;
291 The usual domain for all UI applications.
293 static const TDmDomainId KDmIdUiApps = 0x03;
302 Domain manager specific error code - the domain designated by
303 the specified domain identifier does not exist.
305 static const TInt KDmErrBadDomainId = -256;
314 Domain manager specific error code - this RDmDomain object has already been
315 connected to a domain.
317 static const TInt KDmErrAlreadyJoin = -257;
326 Domain manager specific error code - this RDmDomain object is not connected
329 static const TInt KDmErrNotJoin = -258;
338 Domain manager specific error code - indicates a client-server protocol internal error.
340 static const TInt KDmErrBadRequest = -259;
349 Domain manager specific error code - indicates an internal Domain Manager error.
351 static const TInt KDmErrBadDomainSpec = -260;
360 Domain manager specific error code - indicates a bad sequence of requests.
362 Typically, this occurs when a new request been made while an ongoing domain
363 transition request has not yet completed.
365 static const TInt KDmErrBadSequence = -261;
373 Domain manager specific error code - indicates that a transition is outstanding.
376 static const TInt KDmErrOutstanding = -262;
384 Domain manager specific error code - indicates that the domain hierarchy does not exist.
386 static const TInt KErrBadHierarchyId = -263;