realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileSecurityPolicy.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005-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 * Name        : SipProfileSecurityPolicy.h
       
    16 * Part of     : SIP Profile Server
       
    17 * Interface   : private
       
    18 * The security policy for Profile Agent Server
       
    19 * Version     : 1.0
       
    20 *
       
    21 */
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 /**
       
    27  @internalComponent
       
    28 */
       
    29 
       
    30 #ifndef SIPPROFILESECURITYPOLICY_H
       
    31 #define SIPPROFILESECURITYPOLICY_H
       
    32 
       
    33 
       
    34 /**
       
    35  * Number of different IPC ranges 
       
    36  */
       
    37 const TUint KSipProfilePlatSecRangeCount = 6;
       
    38 
       
    39 
       
    40 /**
       
    41  * IPC ranges segmented into groups based on their capability requirements
       
    42  */
       
    43 const TInt TSipProfilePlatSecRanges[KSipProfilePlatSecRangeCount] =
       
    44 	{
       
    45 	0,  // IPC 0-15  No capabilities required
       
    46     16, // IPC 16-22 ReadUserData required
       
    47     23, // IPC 23-28 WriteDeviceData and NetworkServices
       
    48 	29, // IPC 29-31 NetworkServices
       
    49 	32, // IPC 32 Network Control 
       
    50 	33  // Not supported 33 ->	
       
    51 	};
       
    52 
       
    53 
       
    54 /**
       
    55  * Capability sets and the action performed in case of failure
       
    56  */	
       
    57 const CPolicyServer::TPolicyElement TSipProfilePlatSecElements[4] =
       
    58 	{
       
    59 	
       
    60 	{ // 0 
       
    61 	_INIT_SECURITY_POLICY_C1(ECapabilityReadUserData),
       
    62 	CPolicyServer::EFailClient
       
    63 	},
       
    64 
       
    65 	{ // 1
       
    66 	_INIT_SECURITY_POLICY_C1(ECapabilityNetworkServices), 
       
    67 	CPolicyServer::EFailClient
       
    68     },
       
    69 
       
    70 	{ // 2
       
    71 	_INIT_SECURITY_POLICY_C2(ECapabilityWriteDeviceData,
       
    72 	                         ECapabilityNetworkServices),
       
    73 	CPolicyServer::EFailClient
       
    74     },
       
    75     
       
    76     { // 3
       
    77     _INIT_SECURITY_POLICY_C1(ECapabilityNetworkControl),
       
    78     CPolicyServer::EFailClient    		
       
    79     }
       
    80     
       
    81 	};
       
    82 
       
    83 
       
    84 /**
       
    85  * IPC segments and their capability requirements
       
    86  */
       
    87 const TUint8 TSipProfilePlatSecElementsIndex[KSipProfilePlatSecRangeCount] =
       
    88 	{
       
    89     CPolicyServer::EAlwaysPass, // IPC 0-15
       
    90     0, // IPC 16-22
       
    91     2, // IPC 23-28
       
    92     1, // IPC 29-31
       
    93     3, // IPC 32
       
    94     CPolicyServer::ENotSupported // IPC 33 ->
       
    95 	};
       
    96 	
       
    97 	
       
    98 /**
       
    99  * Platform security policy that Profile Agent uses. 
       
   100  */	
       
   101 const CPolicyServer::TPolicy TSipProfilePlatSecPolicy =
       
   102 	{
       
   103 	CPolicyServer::EAlwaysPass, 	// Specifies all connect attempts should pass
       
   104 	KSipProfilePlatSecRangeCount,	// Number of IPC ranges
       
   105 	TSipProfilePlatSecRanges,		// IPC Ranges
       
   106 	TSipProfilePlatSecElementsIndex,// Policy to IPC mapping array
       
   107 	TSipProfilePlatSecElements		// Policies used in Profile agent
       
   108 	};
       
   109 						
       
   110 #endif // SIPPROFILESECURITYPOLICY_H		
       
   111