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_POLICY_H__
21 #define __DOMAIN_POLICY_H__
25 #include <domaindefs.h>
34 Defines the characteristics of a domain.
39 The domain identifier.
44 The domain identifier of the domain's parent.
46 TDmDomainId iParentId;
49 The security capability required to join this domain
51 TStaticSecurityPolicy iJoinPolicy;
54 The initial state of the domain after construction.
56 TDmDomainState iInitState;
59 The total time allowed for members of the domain to acknowledge
62 TUint32 iTimeBudgetUs;
71 The possible ways in which the domain manager can behave
72 when a transition fails.
74 This is defined for each domain hierarchy.
76 @see TDmHierarchyPolicy
78 enum TDmTransitionFailurePolicy
81 The domain manager stops at the first transition failure.
83 ETransitionFailureStop,
86 The domain manager continues at any transition failure.
88 ETransitionFailureContinue
96 Defines the policy for a particular domain hierarchy.
98 class TDmHierarchyPolicy
102 direction of traverse if target state is after current state
104 TDmTraverseDirection iPositiveTransitions;
106 direction of traverse if target state is before current state
108 TDmTraverseDirection iNegativeTransitions;
110 policy which outlines the action upon transition failure
112 TDmTransitionFailurePolicy iFailurePolicy;
119 Defines the function type for a static function that is implemented by
120 a device's domain policy DLL.
122 The domain manager uses this function to access the hierarchy's policy.
124 typedef const TDmDomainSpec* (*DmPolicyGetDomainSpecs)();
130 Defines the function type for a static function that is implemented by
131 a device's domain policy DLL.
133 The domain manager uses this function to release the domain
134 hierarchy specification.
136 typedef void (*DmPolicyRelease) (const TDmDomainSpec* aDomainSpec);
142 Defines the function type for a static function that is implemented by
143 a device's domain policy DLL.
145 The domain manager uses this function to access the domain
146 hierarchy specification.
148 typedef TInt (*DmPolicyGetPolicy) (TDmHierarchyPolicy& aPolicy);
154 A set of static functions implemented by a device's domain policy DLL that
155 the domain manager uses to access, and release, the domain
156 hierarchy specification.
161 IMPORT_C static const TDmDomainSpec* GetDomainSpecs();
162 IMPORT_C static void Release(const TDmDomainSpec* aDomainSpec);
163 IMPORT_C static TInt GetPolicy(TDmHierarchyPolicy& aPolicy);
170 enum DmPolicyOrdinals
172 EDmPolicyGetDomainSpecs = 1,