usbengines/usbwatcher/inc/usbwatcherserversecuritypolicy.h
changeset 35 9d8b04ca6939
parent 0 1e05558e2206
equal deleted inserted replaced
34:7858bc6ead78 35:9d8b04ca6939
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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:  Server security policy definitions
       
    15 *
       
    16 */
       
    17 
       
    18  
       
    19 #ifndef USBWATCHERSERVERSECURITYPOLICY_H
       
    20 #define USBWATCHERSERVERSECURITYPOLICY_H
       
    21 
       
    22 /**
       
    23  * USB Wathcer server security policy definitions
       
    24  */
       
    25 const TUint KUsbWatcherServerRangeCount = 2;
       
    26 
       
    27 const TInt KUsbWatcherServerRanges[ KUsbWatcherServerRangeCount ] = 
       
    28 	{
       
    29 	EUsbWatcherSetPersonality,        // NetworkControl 
       
    30 	EUsbWatcherSetPreviousPersonalityOnDisconnect + 1  
       
    31 	};
       
    32 
       
    33 /** 
       
    34  * Index numbers into KUsbWatcherServerElements[] 
       
    35  */
       
    36 const TInt KPolicyLocalServices = 0;
       
    37 const TInt KPolicyPass = 1;
       
    38 
       
    39 /**
       
    40  * Mapping IPCs to poicy element 
       
    41  */
       
    42 const TUint8 KUsbWatcherServerElementsIndex[ KUsbWatcherServerRangeCount ] = 
       
    43     {
       
    44     KPolicyLocalServices,
       
    45     CPolicyServer::ENotSupported, 
       
    46     };
       
    47 
       
    48 /** 
       
    49  * Individual policy elements 
       
    50  */
       
    51 const CPolicyServer::TPolicyElement KUsbWatcherServerElements[] = 
       
    52     {
       
    53     // the EFailClient means that the if the check fails the CheckFailed method
       
    54     //with return KErrPermissionDenied 
       
    55     { _INIT_SECURITY_POLICY_C1( ECapabilityLocalServices ), 
       
    56             CPolicyServer::EFailClient },
       
    57     { _INIT_SECURITY_POLICY_PASS },
       
    58 	};
       
    59 
       
    60 /** 
       
    61  * Main policy definition
       
    62  */
       
    63 const CPolicyServer::TPolicy KUsbWatcherServerPolicy = 
       
    64     {
       
    65     CPolicyServer::EAlwaysPass, //Specifies all connect attempts should pass 
       
    66     KUsbWatcherServerRangeCount,
       
    67     KUsbWatcherServerRanges,
       
    68     KUsbWatcherServerElementsIndex,
       
    69     KUsbWatcherServerElements,
       
    70     };
       
    71 
       
    72 #endif //USBWATCHERSERVERSECURITYPOLICY_H
       
    73 
       
    74 // End of file