|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: The security policy for MCE Server |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef TMCECSPLATSECPOLICY_H |
|
22 #define TMCECSPLATSECPOLICY_H |
|
23 |
|
24 /** |
|
25 * Number of different IPC ranges |
|
26 */ |
|
27 const TUint KMceCSPlatSecRangeCount = 13; |
|
28 |
|
29 |
|
30 /** |
|
31 * IPC ranges segmented into groups based on their capability requirements |
|
32 */ |
|
33 const TInt TMceCSPlatSecRanges[KMceCSPlatSecRangeCount] = |
|
34 { |
|
35 0, // IPC message 0 |
|
36 1, // IPC message 1 - 14 |
|
37 15, // IPC message 15 - 20 |
|
38 21, // IPC message 21 |
|
39 22, // IPC message 22 - 24 |
|
40 25, // IPC message 25 - 32 |
|
41 33, // IPC message 33 |
|
42 34, // IPC message 34 - 35 |
|
43 36, // IPC message 36 |
|
44 37, // IPC message 37 - 41 |
|
45 42, // IPC message 42 - 49 |
|
46 50, // IPC messages 50 - 150 |
|
47 150 // Not Supported 150 -> |
|
48 }; |
|
49 |
|
50 /** |
|
51 * IPC segments and their capability requirements |
|
52 */ |
|
53 const TUint8 TMceCSPlatSecElementsIndex[KMceCSPlatSecRangeCount] = |
|
54 { |
|
55 CPolicyServer::EAlwaysPass,// Security policy for IPC 0 |
|
56 0, // Security policy for IPC message 1 - 14 (NetworkServices) |
|
57 CPolicyServer::EAlwaysPass,// Security policy for IPC message 15 - 20 (None) |
|
58 0, // Security policy for IPC message 21 (NetworkServices) |
|
59 CPolicyServer::EAlwaysPass,// Security policy for IPC message 22 - 24 (None) |
|
60 0, // Security policy for IPC message 25 - 32 (NetworkServices) |
|
61 1, // Security policy for IPC message 33 (WriteDeviceData) |
|
62 CPolicyServer::EAlwaysPass,// Security policy for IPC message 34 - 35 (None) |
|
63 1, // Security policy for IPC message 36 (WriteDeviceData) |
|
64 CPolicyServer::EAlwaysPass,// Security policy for IPC message 37 - 41 (None) |
|
65 2, // Security policy for IPC message 42 - 49 (MultimediaDD) |
|
66 CPolicyServer::EAlwaysPass,// Security policy for IPC message 50 - 150 (None) |
|
67 CPolicyServer::ENotSupported // Not Supported -> |
|
68 }; |
|
69 |
|
70 /** |
|
71 * Capability sets and the action performed in case of failure |
|
72 */ |
|
73 const CPolicyServer::TPolicyElement TMceCSPlatSecElements[3] = |
|
74 { |
|
75 // Requires the user to have NetworkServices capability, otherwise the message is |
|
76 // completed with KErrPermissionDenied |
|
77 { _INIT_SECURITY_POLICY_C1(ECapabilityNetworkServices), CPolicyServer::EFailClient }, |
|
78 |
|
79 // Requires the user to have WriteDeviceData capability, otherwise the message is |
|
80 // completed with KErrPermissionDenied |
|
81 { _INIT_SECURITY_POLICY_C1(ECapabilityWriteDeviceData), CPolicyServer::EFailClient }, |
|
82 |
|
83 |
|
84 // Requires the user to have MultimediaDD capability, otherwise the message is |
|
85 // completed with KErrPermissionDenied |
|
86 { _INIT_SECURITY_POLICY_C1(ECapabilityMultimediaDD), CPolicyServer::EFailClient } |
|
87 |
|
88 }; |
|
89 |
|
90 /** |
|
91 * Platform security policy that MCE Server uses. |
|
92 */ |
|
93 const CPolicyServer::TPolicy TMceCSPlatSecPolicy = |
|
94 { |
|
95 CPolicyServer::EAlwaysPass, // Specifies all connect attempts should pass |
|
96 KMceCSPlatSecRangeCount, // Number of ITC ranges |
|
97 TMceCSPlatSecRanges, // ITC Ranges |
|
98 TMceCSPlatSecElementsIndex, // Policy to ITC mapping array |
|
99 TMceCSPlatSecElements // Policies used in MCE Server |
|
100 }; |
|
101 |
|
102 #endif//TMCECSPLATSECPOLICY_H |