featuremgmt/featuremgr/src/serverexe/featmgrsecuritypolicy.h
changeset 0 08ec8eefde2f
child 10 fa9941cf3867
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 /*
       
     2 * Copyright (c) 2007-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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef FEATMGR_SECURITY_POLICY_H
       
    21 #define FEATMGR_SECURITY_POLICY_H
       
    22 
       
    23 
       
    24 /**
       
    25  * Number of different IPC ranges
       
    26  */
       
    27 const TUint KFeatMgrPlatSecRangeCount = 3;
       
    28 
       
    29 
       
    30 #ifndef EXTENDED_FEATURE_MANAGER_TEST
       
    31 //
       
    32 // NORMAL
       
    33 // The security ranges for messages in the framework.
       
    34 // See also featmgrclientserver.h for message enum TFeatMgrServRequest
       
    35 //
       
    36 
       
    37 /**
       
    38  * IPC ranges segmented into groups based on their capability requirements
       
    39  */
       
    40 const TInt KFeatMgrPlatSecRanges[KFeatMgrPlatSecRangeCount] =
       
    41     {
       
    42     0,  // IPC 0-7 Always passed
       
    43     8,  // IPC 8-13 WriteDeviceData
       
    44     16  // IPC Not supported 16 ->
       
    45     };
       
    46 
       
    47 
       
    48 /**
       
    49  * IPC segments and their capability requirements
       
    50  */
       
    51 const TUint8 KFeatMgrPlatSecElementsIndex[KFeatMgrPlatSecRangeCount] =
       
    52     {
       
    53     CPolicyServer::EAlwaysPass,             // IPC 0-3
       
    54     0,                                      // IPC 8-13
       
    55     CPolicyServer::ENotSupported            // IPC 16 -> 
       
    56     };
       
    57 
       
    58 #else
       
    59 //
       
    60 // CONFIGURED test server has debug only API(s) built into the framework. 
       
    61 // e.g. EFeatMgrNumberOfNotifyFeatures which will return debug information about 
       
    62 // the server for testing purposes. Consequently, the platform security setup 
       
    63 // for the test server differs slightly to allow these specific debug only message(s).
       
    64 //
       
    65 
       
    66 /**
       
    67  * IPC ranges segmented into groups based on their capability requirements
       
    68  */
       
    69 const TInt KFeatMgrPlatSecRanges[KFeatMgrPlatSecRangeCount] =
       
    70     {
       
    71     0,   // IPC 0-9 Always passed
       
    72     10,  // IPC 10-15 WriteDeviceData
       
    73     18   // IPC Not supported 18 ->
       
    74     };
       
    75 /**
       
    76  * IPC segments and their capability requirements
       
    77  */
       
    78 const TUint8 KFeatMgrPlatSecElementsIndex[KFeatMgrPlatSecRangeCount] =
       
    79     {
       
    80     CPolicyServer::EAlwaysPass,             // IPC 0-3
       
    81     0,                                      // IPC 10-15
       
    82     CPolicyServer::ENotSupported            // IPC 18 ->
       
    83     };
       
    84 
       
    85 #endif
       
    86 
       
    87 
       
    88 /**
       
    89  * Capability sets and the action performed in case of failure
       
    90  */
       
    91 const CPolicyServer::TPolicyElement KFeatMgrPlatSecElements[] =
       
    92     {
       
    93        
       
    94         {
       
    95         _INIT_SECURITY_POLICY_C1( ECapabilityWriteDeviceData ),
       
    96         CPolicyServer::EFailClient
       
    97         }
       
    98        
       
    99     };
       
   100 
       
   101 
       
   102 /**
       
   103  * Platform security policy that Feature Manager server uses.
       
   104  */
       
   105 const CPolicyServer::TPolicy KFeatMgrPlatSecPolicy =
       
   106     {
       
   107     CPolicyServer::EAlwaysPass,     // Specifies all connect attempts should pass
       
   108     KFeatMgrPlatSecRangeCount,      // Number of IPC ranges
       
   109     KFeatMgrPlatSecRanges,          // IPC Ranges
       
   110     KFeatMgrPlatSecElementsIndex,   // Policy to IPC mapping array
       
   111     KFeatMgrPlatSecElements         // Policies used in Feature Manager Server
       
   112     };
       
   113 
       
   114 
       
   115 #endif