author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 02 Sep 2010 21:31:49 +0300 | |
changeset 81 | 842c592edba7 |
parent 35 | 9d8b04ca6939 |
permissions | -rw-r--r-- |
81
842c592edba7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
1 |
// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
35 | 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: USB mass storage Server Security Policy definitions for Platform security. |
|
14 |
// |
|
15 |
// |
|
16 |
||
17 |
#ifndef MSCFILESERVERSECURITYPOLICY_H |
|
18 |
#define MSCFILESERVERSECURITYPOLICY_H |
|
19 |
||
20 |
#include "usbmscfileshared.h" |
|
21 |
||
22 |
// USB masss storage Server Security Policy Definition |
|
23 |
||
81
842c592edba7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
24 |
const TUint KUsbMsServerRangeCount = 2; |
35 | 25 |
|
26 |
const TInt KUsbMsServerRanges[KUsbMsServerRangeCount] = |
|
27 |
{ |
|
81
842c592edba7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
28 |
EMscFileSetupLu, // NetworkControl [SetupLogicalUnitL/StartL/Stop/Shutdown] |
35 | 29 |
EMscFileShutdown + 1, // fail (to KMaxInt) |
30 |
}; |
|
31 |
||
32 |
// Index numbers into KUsbMsServerElements[] |
|
33 |
const TInt KPolicyNetworkControl = 0; |
|
34 |
||
35 |
// Mapping IPCs to poicy element |
|
36 |
const TUint8 KUsbMsServerElementsIndex[KUsbMsServerRangeCount] = |
|
37 |
{ |
|
81
842c592edba7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
38 |
KPolicyNetworkControl, // EMscFileSetupLu, EMscFileStart, EMscFileStop, EMscFileShutdown |
35 | 39 |
CPolicyServer::ENotSupported, // EMscFileShutdown + 1 to KMaxTInt |
40 |
}; |
|
41 |
||
42 |
// Individual policy elements |
|
43 |
const CPolicyServer::TPolicyElement KUsbMsServerElements[] = |
|
44 |
{ |
|
45 |
{ _INIT_SECURITY_POLICY_C1(ECapabilityNetworkControl), CPolicyServer::EFailClient }, |
|
46 |
// the EFailClient means that if the check fails |
|
47 |
// the CheckFailed method with return KErrPermissionDenied |
|
48 |
}; |
|
49 |
||
50 |
// Main policy |
|
51 |
const CPolicyServer::TPolicy KMscFileServerPolicy = |
|
52 |
{ |
|
53 |
CPolicyServer::EAlwaysPass, // all connect attempts should pass |
|
54 |
KUsbMsServerRangeCount, |
|
55 |
KUsbMsServerRanges, |
|
56 |
KUsbMsServerElementsIndex, |
|
57 |
KUsbMsServerElements, |
|
58 |
}; |
|
59 |
#endif //MSCFILESERVERSECURITYPOLICY_H |