localconnectivityservice/dun/server/inc/DunServerSecurityPolicy.h
branchRCL_3
changeset 20 4a793f564d72
parent 19 0aa8cc770c8a
child 21 74aa6861c87d
equal deleted inserted replaced
19:0aa8cc770c8a 20:4a793f564d72
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  DUN server security policy definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DUNSERVER_SECURITYPOLICY_H
       
    20 #define DUNSERVER_SECURITYPOLICY_H
       
    21 
       
    22 #include "dunserverdef.h"
       
    23 
       
    24 // First range for KServerRanges[] definition, do not change
       
    25 const TInt KFirstServerRange  = 0;
       
    26 
       
    27 // First range for KServerElementsIndex[] definition, do not change
       
    28 const TInt KFirstElementRange = 0;
       
    29 
       
    30 // ---------------------------------------------------------------------------
       
    31 // DunServer's policy
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 
       
    35 // Definition of the ranges of IPC numbers
       
    36 const TInt KServerRanges[] =
       
    37     {
       
    38     KFirstServerRange,  // Range 1: all client APIs
       
    39     EInvalidIpc         // Range 2: Invalid IPC opcode
       
    40     };
       
    41 
       
    42 const TUint KServerRangeCount = sizeof( KServerRanges ) / sizeof( TInt );
       
    43 
       
    44 // Policy to implement for each of the above ranges
       
    45 const TUint8 KServerElementsIndex[KServerRangeCount] =
       
    46     {
       
    47     KFirstElementRange,           // applies to 0th range
       
    48     CPolicyServer::ENotSupported  // out of range DUN's IPC
       
    49     };
       
    50 
       
    51 //Specific capability checks
       
    52 const CPolicyServer::TPolicyElement KServerElements[] =
       
    53     {
       
    54         {_INIT_SECURITY_POLICY_C2(ECapabilityLocalServices, ECapabilityNetworkServices),
       
    55          CPolicyServer::EFailClient
       
    56         } // Policy 0
       
    57     };
       
    58 
       
    59 // Policy structure for DunServer. This is passed to DunServer's constructor
       
    60 const CPolicyServer::TPolicy KDunServerPolicy =
       
    61         {
       
    62         CPolicyServer::EAlwaysPass,  // Indicates that Connect attempts should be processed without any further checks.
       
    63         KServerRangeCount,           // Range count
       
    64         KServerRanges,               // ranges array
       
    65         KServerElementsIndex,        // elements' index
       
    66         KServerElements              // array of elements
       
    67         };
       
    68 
       
    69 #endif // DUNSERVER_SECURITYPOLICY_H