author | sl |
Tue, 10 Jun 2014 14:32:02 +0200 | |
changeset 1 | 260cb5ec6c19 |
permissions | -rw-r--r-- |
sl@0 | 1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
sl@0 | 2 |
// All rights reserved. |
sl@0 | 3 |
// This component and the accompanying materials are made available |
sl@0 | 4 |
// under the terms of the License "Eclipse Public License v1.0" |
sl@0 | 5 |
// which accompanies this distribution, and is available |
sl@0 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
sl@0 | 7 |
// |
sl@0 | 8 |
// Initial Contributors: |
sl@0 | 9 |
// Nokia Corporation - initial contribution. |
sl@0 | 10 |
// |
sl@0 | 11 |
// Contributors: |
sl@0 | 12 |
// |
sl@0 | 13 |
// Description: |
sl@0 | 14 |
// |
sl@0 | 15 |
// WARNING: This file contains some APIs which are internal and are subject |
sl@0 | 16 |
// to change without notice. Such APIs should therefore not be used |
sl@0 | 17 |
// outside the Kernel and Hardware Services package. |
sl@0 | 18 |
// |
sl@0 | 19 |
|
sl@0 | 20 |
#ifndef __DOMAIN_POLICY_H__ |
sl@0 | 21 |
#define __DOMAIN_POLICY_H__ |
sl@0 | 22 |
|
sl@0 | 23 |
#include <e32std.h> |
sl@0 | 24 |
|
sl@0 | 25 |
#include <domaindefs.h> |
sl@0 | 26 |
|
sl@0 | 27 |
|
sl@0 | 28 |
|
sl@0 | 29 |
|
sl@0 | 30 |
/** |
sl@0 | 31 |
@publishedPartner |
sl@0 | 32 |
@released |
sl@0 | 33 |
|
sl@0 | 34 |
Defines the characteristics of a domain. |
sl@0 | 35 |
*/ |
sl@0 | 36 |
struct TDmDomainSpec |
sl@0 | 37 |
{ |
sl@0 | 38 |
/** |
sl@0 | 39 |
The domain identifier. |
sl@0 | 40 |
*/ |
sl@0 | 41 |
TDmDomainId iId; |
sl@0 | 42 |
|
sl@0 | 43 |
/** |
sl@0 | 44 |
The domain identifier of the domain's parent. |
sl@0 | 45 |
*/ |
sl@0 | 46 |
TDmDomainId iParentId; |
sl@0 | 47 |
|
sl@0 | 48 |
/** |
sl@0 | 49 |
The security capability required to join this domain |
sl@0 | 50 |
*/ |
sl@0 | 51 |
TStaticSecurityPolicy iJoinPolicy; |
sl@0 | 52 |
|
sl@0 | 53 |
/** |
sl@0 | 54 |
The initial state of the domain after construction. |
sl@0 | 55 |
*/ |
sl@0 | 56 |
TDmDomainState iInitState; |
sl@0 | 57 |
|
sl@0 | 58 |
/** |
sl@0 | 59 |
The total time allowed for members of the domain to acknowledge |
sl@0 | 60 |
a transition. |
sl@0 | 61 |
*/ |
sl@0 | 62 |
TUint32 iTimeBudgetUs; |
sl@0 | 63 |
}; |
sl@0 | 64 |
|
sl@0 | 65 |
|
sl@0 | 66 |
|
sl@0 | 67 |
|
sl@0 | 68 |
/** |
sl@0 | 69 |
@internalAll |
sl@0 | 70 |
|
sl@0 | 71 |
The possible ways in which the domain manager can behave |
sl@0 | 72 |
when a transition fails. |
sl@0 | 73 |
|
sl@0 | 74 |
This is defined for each domain hierarchy. |
sl@0 | 75 |
|
sl@0 | 76 |
@see TDmHierarchyPolicy |
sl@0 | 77 |
*/ |
sl@0 | 78 |
enum TDmTransitionFailurePolicy |
sl@0 | 79 |
{ |
sl@0 | 80 |
/** |
sl@0 | 81 |
The domain manager stops at the first transition failure. |
sl@0 | 82 |
*/ |
sl@0 | 83 |
ETransitionFailureStop, |
sl@0 | 84 |
|
sl@0 | 85 |
/** |
sl@0 | 86 |
The domain manager continues at any transition failure. |
sl@0 | 87 |
*/ |
sl@0 | 88 |
ETransitionFailureContinue |
sl@0 | 89 |
}; |
sl@0 | 90 |
|
sl@0 | 91 |
|
sl@0 | 92 |
|
sl@0 | 93 |
/** |
sl@0 | 94 |
@internalTechnology |
sl@0 | 95 |
|
sl@0 | 96 |
Defines the policy for a particular domain hierarchy. |
sl@0 | 97 |
*/ |
sl@0 | 98 |
class TDmHierarchyPolicy |
sl@0 | 99 |
{ |
sl@0 | 100 |
public: |
sl@0 | 101 |
/** |
sl@0 | 102 |
direction of traverse if target state is after current state |
sl@0 | 103 |
*/ |
sl@0 | 104 |
TDmTraverseDirection iPositiveTransitions; |
sl@0 | 105 |
/** |
sl@0 | 106 |
direction of traverse if target state is before current state |
sl@0 | 107 |
*/ |
sl@0 | 108 |
TDmTraverseDirection iNegativeTransitions; |
sl@0 | 109 |
/** |
sl@0 | 110 |
policy which outlines the action upon transition failure |
sl@0 | 111 |
*/ |
sl@0 | 112 |
TDmTransitionFailurePolicy iFailurePolicy; |
sl@0 | 113 |
}; |
sl@0 | 114 |
|
sl@0 | 115 |
|
sl@0 | 116 |
/** |
sl@0 | 117 |
@internalAll |
sl@0 | 118 |
|
sl@0 | 119 |
Defines the function type for a static function that is implemented by |
sl@0 | 120 |
a device's domain policy DLL. |
sl@0 | 121 |
|
sl@0 | 122 |
The domain manager uses this function to access the hierarchy's policy. |
sl@0 | 123 |
*/ |
sl@0 | 124 |
typedef const TDmDomainSpec* (*DmPolicyGetDomainSpecs)(); |
sl@0 | 125 |
|
sl@0 | 126 |
|
sl@0 | 127 |
/** |
sl@0 | 128 |
@internalAll |
sl@0 | 129 |
|
sl@0 | 130 |
Defines the function type for a static function that is implemented by |
sl@0 | 131 |
a device's domain policy DLL. |
sl@0 | 132 |
|
sl@0 | 133 |
The domain manager uses this function to release the domain |
sl@0 | 134 |
hierarchy specification. |
sl@0 | 135 |
*/ |
sl@0 | 136 |
typedef void (*DmPolicyRelease) (const TDmDomainSpec* aDomainSpec); |
sl@0 | 137 |
|
sl@0 | 138 |
|
sl@0 | 139 |
/** |
sl@0 | 140 |
@internalAll |
sl@0 | 141 |
|
sl@0 | 142 |
Defines the function type for a static function that is implemented by |
sl@0 | 143 |
a device's domain policy DLL. |
sl@0 | 144 |
|
sl@0 | 145 |
The domain manager uses this function to access the domain |
sl@0 | 146 |
hierarchy specification. |
sl@0 | 147 |
*/ |
sl@0 | 148 |
typedef TInt (*DmPolicyGetPolicy) (TDmHierarchyPolicy& aPolicy); |
sl@0 | 149 |
|
sl@0 | 150 |
/** |
sl@0 | 151 |
@publishedPartner |
sl@0 | 152 |
@released |
sl@0 | 153 |
|
sl@0 | 154 |
A set of static functions implemented by a device's domain policy DLL that |
sl@0 | 155 |
the domain manager uses to access, and release, the domain |
sl@0 | 156 |
hierarchy specification. |
sl@0 | 157 |
*/ |
sl@0 | 158 |
class DmPolicy |
sl@0 | 159 |
{ |
sl@0 | 160 |
public: |
sl@0 | 161 |
IMPORT_C static const TDmDomainSpec* GetDomainSpecs(); |
sl@0 | 162 |
IMPORT_C static void Release(const TDmDomainSpec* aDomainSpec); |
sl@0 | 163 |
IMPORT_C static TInt GetPolicy(TDmHierarchyPolicy& aPolicy); |
sl@0 | 164 |
}; |
sl@0 | 165 |
|
sl@0 | 166 |
|
sl@0 | 167 |
/** |
sl@0 | 168 |
@internalTechnology |
sl@0 | 169 |
*/ |
sl@0 | 170 |
enum DmPolicyOrdinals |
sl@0 | 171 |
{ |
sl@0 | 172 |
EDmPolicyGetDomainSpecs = 1, |
sl@0 | 173 |
EDmPolicyRelease, |
sl@0 | 174 |
EDmPolicyGetPolicy |
sl@0 | 175 |
}; |
sl@0 | 176 |
|
sl@0 | 177 |
#endif |