|
1 // Copyright (c) 2005-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 "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: |
|
14 // |
|
15 |
|
16 #include "StartUpDomainDefs.h" |
|
17 #include <startup.hrh> |
|
18 |
|
19 #ifdef __WINS__ |
|
20 const TInt KStateTransitionTimeout = 30000000; /* 30 seconds */ |
|
21 #else |
|
22 const TInt KStateTransitionTimeout = 10000000; /* 10 seconds */ |
|
23 #endif |
|
24 |
|
25 /* |
|
26 Domain specification and policy for the startup domain hierarchy |
|
27 */ |
|
28 |
|
29 static const TDmDomainSpec DomainHierarchy[] = |
|
30 { |
|
31 { KKernelServicesDomain3, KDmIdNone, _INIT_SECURITY_POLICY_PASS, EStartupStateUndefined, KStateTransitionTimeout }, |
|
32 { KBaseServicesDomain3, KKernelServicesDomain3, _INIT_SECURITY_POLICY_PASS, EStartupStateUndefined, KStateTransitionTimeout }, |
|
33 { KOSServicesDomain3, KBaseServicesDomain3, _INIT_SECURITY_POLICY_PASS, EStartupStateUndefined, KStateTransitionTimeout }, |
|
34 { KAppServicesDomain3, KOSServicesDomain3, _INIT_SECURITY_POLICY_PASS, EStartupStateUndefined, KStateTransitionTimeout }, |
|
35 { KUIFrameworkDomain3, KAppServicesDomain3, _INIT_SECURITY_POLICY_PASS, EStartupStateUndefined, KStateTransitionTimeout }, |
|
36 // end of array marker |
|
37 { KDmIdNone, KDmIdNone, _INIT_SECURITY_POLICY_PASS, 0, 0 } |
|
38 }; |
|
39 |
|
40 /* |
|
41 Note that the _INIT_SECURITY_POLICY_C1(ECapabilityWriteDeviceData) is not used for the root domain, since this refers to the capabilities of |
|
42 the SSA components connecting to the Start-up Domain Hierarchy. No capabilities are required by SSA components to attach to the Start-up Domain Hierarchy. |
|
43 */ |
|
44 |
|
45 // Policy for traversal of the startup Domain Hierarchy. Only positive transitions should take place |
|
46 static const TDmHierarchyPolicy HierarchyPolicyStartup = |
|
47 {ETraverseParentsFirst, ETraverseParentsFirst, ETransitionFailureStop}; |
|
48 |
|
49 /** |
|
50 Gets access to the domain hierarchy specification. |
|
51 |
|
52 The domain hierarchy specification is a simple array of TDmDomainSpec items. |
|
53 |
|
54 The default implementation provided by Symbian OS just returns a pointer to |
|
55 the domain hierarchy specification array. |
|
56 |
|
57 @return A pointer to the domain hierarchy specification array. |
|
58 */ |
|
59 EXPORT_C const TDmDomainSpec* DmPolicy::GetDomainSpecs() |
|
60 { |
|
61 return (TDmDomainSpec*) DomainHierarchy; |
|
62 } |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 /** |
|
68 Releases access to the specified domain hierarchy specification. |
|
69 |
|
70 The domain hierarchy specification is a simple array of TDmDomainSpec items. |
|
71 |
|
72 As the default Symbian OS implementation of GetDomainSpecs() just returns |
|
73 a pointer to the domain hierarchy specification array, then the default |
|
74 implementation of Release() is empty. The API is provided to permit |
|
75 more complex implementations, if required. |
|
76 |
|
77 @param aDomainSpec A pointer to the domain hierarchy specification array. |
|
78 */ |
|
79 EXPORT_C void DmPolicy::Release(const TDmDomainSpec* /*aDomainSpec*/) |
|
80 { |
|
81 } |
|
82 |
|
83 |
|
84 /** |
|
85 Retrieves the domain hierarchy policy. |
|
86 |
|
87 @param aPolicy a client-supplied policy which on exit |
|
88 will contain a copy of the policy for the requested domain hierarchy Id. |
|
89 |
|
90 @return KErrNone |
|
91 */ |
|
92 EXPORT_C TInt DmPolicy::GetPolicy(TDmHierarchyPolicy& aPolicy) |
|
93 { |
|
94 aPolicy = HierarchyPolicyStartup; |
|
95 return KErrNone; |
|
96 } |
|
97 |