os/kernelhwsrv/userlibandfileserver/fileserver/smassstorage/inc/usbmsserversecuritypolicy.h
Update contrib.
1 // Copyright (c) 2004-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 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // USB mass storage Server Security Policy definitions for Platform security.
23 #if !defined(__USBMSSERVERSECURITYPOLICY_H__)
24 #define __USBMSSERVERSECURITYPOLICY_H__
26 #include <usbmsshared.h>
28 // USB masss storage Server Security Policy Definition
30 const TUint KUsbMsServerRangeCount = 3;
32 const TInt KUsbMsServerRanges[KUsbMsServerRangeCount] =
34 EUsbMsStart, // NetworkControl [Start/Stop]
35 EUsbMsShutdown, // DiskAdmin [Shutdown]
36 EUsbMsShutdown + 1, // fail (to KMaxInt)
39 // Index numbers into KUsbMsServerElements[]
40 const TInt KPolicyNetworkControl = 0;
41 const TInt KPolicyDiskAdmin = 1;
43 // Mapping IPCs to poicy element
44 const TUint8 KUsbMsServerElementsIndex[KUsbMsServerRangeCount] =
46 KPolicyNetworkControl, // EUsbMsStart & EUsbMsStop
47 KPolicyDiskAdmin, // EUsbMsShutdown
48 CPolicyServer::ENotSupported, // EUsbMsShutdown + 1 to KMaxTInt
51 // Individual policy elements
52 const CPolicyServer::TPolicyElement KUsbMsServerElements[] =
54 { _INIT_SECURITY_POLICY_C1(ECapabilityNetworkControl), CPolicyServer::EFailClient },
55 { _INIT_SECURITY_POLICY_C1(ECapabilityDiskAdmin), CPolicyServer::EFailClient},
56 // the EFailClient means that if the check fails
57 // the CheckFailed method with return KErrPermissionDenied
61 const CPolicyServer::TPolicy KUsbMsServerPolicy =
63 CPolicyServer::EAlwaysPass, // all connect attempts should pass
64 KUsbMsServerRangeCount,
66 KUsbMsServerElementsIndex,
69 #endif //__USBMSSERVERSECURITYPOLICY_H__