279
|
1 |
// Copyright (c) 2004-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:
|
|
14 |
//
|
|
15 |
|
|
16 |
#include <domainpolicy.h>
|
|
17 |
#include "domainpolicytest.h"
|
|
18 |
|
|
19 |
|
|
20 |
/**
|
|
21 |
Gets access to the test hierarchy specification.
|
|
22 |
|
|
23 |
The domain hierarchy specification is a simple array of TDmDomainSpec items.
|
|
24 |
|
|
25 |
The default implementation provided by Symbian OS just returns a pointer to
|
|
26 |
the domain hierarchy specification array.
|
|
27 |
|
|
28 |
@return A pointer to the domain hierarchy specification array.
|
|
29 |
*/
|
|
30 |
EXPORT_C const TDmDomainSpec* DmPolicy::GetDomainSpecs()
|
|
31 |
{
|
279
|
32 |
return DomainHierarchy;
|
0
|
33 |
}
|
|
34 |
|
|
35 |
|
|
36 |
/**
|
|
37 |
Releases access to the specified domain hierarchy specification.
|
|
38 |
|
|
39 |
The domain hierarchy specification is a simple array of TDmDomainSpec items.
|
|
40 |
|
|
41 |
As the default Symbian OS implementation of GetDomainSpecs() just returns
|
|
42 |
a pointer to the domain hierarchy specification array, then the default
|
|
43 |
implementation of Release() is empty. The API is provided to permit
|
|
44 |
more complex implementations, if required.
|
|
45 |
|
|
46 |
@param aDomainSpec A pointer to the domain hierarchy specification array.
|
|
47 |
*/
|
|
48 |
EXPORT_C void DmPolicy::Release(const TDmDomainSpec* /*aDomainSpec*/)
|
|
49 |
{
|
|
50 |
}
|
|
51 |
|
|
52 |
|
|
53 |
/**
|
279
|
54 |
Retrieves the domain hierarchy policy
|
0
|
55 |
|
|
56 |
@param aPolicy a client-supplied policy which on exit
|
|
57 |
will contain a copy of the policy for the requested domain hierarchy id.
|
|
58 |
|
279
|
59 |
|
0
|
60 |
@return KErrNone
|
|
61 |
*/
|
|
62 |
EXPORT_C TInt DmPolicy::GetPolicy(TDmHierarchyPolicy& aPolicy)
|
|
63 |
{
|
|
64 |
aPolicy = HierarchyPolicy;
|
|
65 |
return KErrNone;
|
|
66 |
}
|
|
67 |
|
279
|
68 |
|
|
69 |
#ifdef DOMAIN_POLICY_V2
|
|
70 |
|
|
71 |
EXPORT_C TInt DmPolicy::GetStateSpec(TAny*& aPtr, TUint& aNumElements)
|
|
72 |
{
|
|
73 |
aNumElements = StateSpecificationSize;
|
|
74 |
if (StateSpecificationSize)
|
|
75 |
aPtr = (TAny*) StateSpecification;
|
|
76 |
else
|
|
77 |
aPtr = NULL;
|
|
78 |
return StateSpecificationVersion;
|
|
79 |
}
|
|
80 |
|
|
81 |
|
|
82 |
EXPORT_C void DmPolicy::ReleaseStateSpec(TAny* /*aStateSpec*/)
|
|
83 |
{
|
|
84 |
}
|
|
85 |
|
|
86 |
#endif
|
|
87 |
|
|
88 |
|