|
1 // Copyright (c) 2008-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 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #ifndef PAIRINGSERVERSECURITYPOLICY_H |
|
22 #define PAIRINGSERVERSECURITYPOLICY_H |
|
23 |
|
24 #include <e32def.h> |
|
25 |
|
26 const TUint KPairingServerRangeCount = 5; |
|
27 |
|
28 const TInt KPairingServerRanges[KPairingServerRangeCount] = |
|
29 { |
|
30 // Local Services |
|
31 EPairingServerCloseSubSession, |
|
32 // EPairingServerCreateOobDataSubSession, |
|
33 // EPairingServerCreateDedicatedBondingSubSession, |
|
34 |
|
35 // Local Services & Read Device Data |
|
36 EPairingServerCreateSimplePairingResultSubSession, |
|
37 // EPairingServerCreateAuthenticationResultSubSession, |
|
38 |
|
39 // Local Services |
|
40 EPairingServerOobDataRefreshLocal, |
|
41 // EPairingServerOobDataReadLocal, |
|
42 // EPairingServerOobDataCancelReadLocal, |
|
43 // EPairingServerOobDataProvideRemoteParsed, |
|
44 // EPairingServerOobDataProvideRemoteRaw, |
|
45 // EPairingServerOobDataClearRemote, |
|
46 // EPairingServerStartDedicatedBond, |
|
47 |
|
48 // Local Services & Read Device Data |
|
49 EPairingServerSimplePairingResult, |
|
50 // EPairingServerCancelSimplePairingResult, |
|
51 // EPairingServerAuthenticationResult, |
|
52 // EPairingServerCancelAuthenticationResult, |
|
53 |
|
54 // Not Supported |
|
55 EPairingServerFunctionCount, |
|
56 }; |
|
57 |
|
58 /** Index numbers into KPairingServerElements[] */ |
|
59 const TInt KPolicyLocalServices = 0; |
|
60 const TInt KPolicyLocalServicesReadDeviceData = 1; |
|
61 const TInt KPolicyLocalServicesPanic = 2; |
|
62 const TInt KPolicyLocalServiceReadDeviceDataPanic = 3; |
|
63 |
|
64 /** Mapping IPCs to policy element */ |
|
65 const TUint8 KPairingServerElementsIndex[KPairingServerRangeCount] = |
|
66 { |
|
67 KPolicyLocalServices, |
|
68 KPolicyLocalServicesReadDeviceData, |
|
69 KPolicyLocalServicesPanic, |
|
70 KPolicyLocalServiceReadDeviceDataPanic, |
|
71 CPolicyServer::ENotSupported, /** Undefined functions */ |
|
72 }; |
|
73 |
|
74 /** Individual policy elements */ |
|
75 const CPolicyServer::TPolicyElement KPairingServerElements[] = |
|
76 { |
|
77 { _INIT_SECURITY_POLICY_C1(ECapabilityLocalServices), CPolicyServer::EFailClient }, |
|
78 { _INIT_SECURITY_POLICY_C2(ECapabilityLocalServices, ECapabilityReadDeviceData), CPolicyServer::EFailClient }, |
|
79 { _INIT_SECURITY_POLICY_C1(ECapabilityLocalServices), CPolicyServer::EPanicClient }, |
|
80 { _INIT_SECURITY_POLICY_C2(ECapabilityLocalServices, ECapabilityReadDeviceData), CPolicyServer::EPanicClient } |
|
81 }; |
|
82 |
|
83 /** Main policy */ |
|
84 const CPolicyServer::TPolicy KPairingServerPolicy = |
|
85 { |
|
86 CPolicyServer::EAlwaysPass, /** Specifies all connect attempts should pass */ |
|
87 KPairingServerRangeCount, |
|
88 KPairingServerRanges, |
|
89 KPairingServerElementsIndex, |
|
90 KPairingServerElements, |
|
91 }; |
|
92 |
|
93 #endif // __PAIRINGSERVERSECURITYPOLICY_H__ |