networksecurity/ipsec/ipsecpol/inc/ipsecpol.h
changeset 0 af10295192d8
child 53 7e41d162e158
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2005-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 "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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // IpsecPol - Ipsecpol.h
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 /**
       
    20  @internalComponent
       
    21 */
       
    22 #ifndef __IPSECPOL_H__
       
    23 #define __IPSECPOL_H__
       
    24 
       
    25 #include <e32std.h>
       
    26 
       
    27 _LIT(KIpsecPolicyServerName,"IPSec Policyserver");
       
    28 _LIT(KIpsecPolicyServerImg,"ipsecpol");
       
    29 _LIT(KPreloadFileName, "ipsecpol.ini");
       
    30 _LIT(KAutoLoadPolicy, "Autoload");
       
    31 _LIT(KLoadFlag, "Loadflag");
       
    32 _LIT(KFileName, "FileName");
       
    33 
       
    34 //algorithms configuration file name
       
    35 _LIT(KAlgorithmFile,"algorithms.conf");
       
    36 
       
    37 
       
    38 _LIT(KAutoloadNone, "None");
       
    39 _LIT(KAutoloadPreload, "Preload");
       
    40 _LIT(KAutoloadBeforeManualLoad, "BeforeManualLoad");
       
    41 _LIT(KAutoloadAfterManualLoad, "AfterManualLoad");
       
    42 _LIT(KAutoloadBeforeScopedLoad, "BeforeScopedLoad");
       
    43 _LIT(KAutoloadAfterScopedLoad, "AfterScopedLoad");
       
    44 
       
    45 const TUid KServerUid3={0x01000000};
       
    46 
       
    47 const TInt KMyServerStackSize=0x2000;           //  8KB
       
    48 const TInt KMyServerInitHeapSize=0x1000;        //  4KB
       
    49 const TInt KMyServerMaxHeapSize=0x1000000;      // 16MB
       
    50 
       
    51 const TInt KPolicyServMajorVersion = 1;
       
    52 const TInt KPolicyServMinorVersion = 0;
       
    53 const TInt KPolicyServBuildVersion = 0;
       
    54 
       
    55 const TInt KMaxMyMessage=100;
       
    56 
       
    57 enum TPolicyMessages 
       
    58     { 
       
    59     EIpsecPolicyLoadPolicy,
       
    60         EIpsecPolicyCancelLoad,
       
    61         EIpsecPolicyActivatePolicy,
       
    62         EIpsecPolicyCancelActivate,
       
    63         EIpsecPolicyGetLastConflictInfo,
       
    64         EIpsecPolicyUnloadPolicy,
       
    65         EIpsecPolicyCancelUnload,
       
    66         EIpsecPolicyMatchSelector,
       
    67         EIpsecPolicyCancelMatch,
       
    68         ERequestInfo,
       
    69         
       
    70         EIpsecPolicyReadPolicyCount,
       
    71         EIpsecPolicyReadPolicy,
       
    72         EIpsecPolicyCancelRead,
       
    73         EIpsecPolicyCancelSelector,
       
    74         EIpsecPolicyCancelAll,
       
    75         EIpsecPolicyGetSpecsForSelector,
       
    76         EIpsecPolicyAddPolicy,
       
    77         EIpsecPolicyGetPolicy,
       
    78         EIpsecPolicyGetPolicyCount,
       
    79         EIpsecPolicyGetPolicyIds,
       
    80         EIpsecPolicyGetPolicyHandles,
       
    81         EIpsecPolicyGetSelectorCount,
       
    82         EIpsecPolicyGetSASpec,
       
    83         EIpsecPolicyAddSASpec,
       
    84         EIpsecPolicyDeleteSASpec,
       
    85         EIpsecPolicyGetSelector,
       
    86         EIpsecPolicyAddSelector,
       
    87         EIpsecPolicyDeleteSelector,
       
    88         EIpsecPolicyUnloadAllPolicies,
       
    89         EIpsecPolicyDebugNotificationRequest,
       
    90         EIpsecPolicyGetDebugInfo,
       
    91         EIpsecPolicyCancelDebug,
       
    92         EIpsecPolicyAvailableSelectors,
       
    93         EIpsecPolicyEnumerateSelectors
       
    94     };
       
    95     
       
    96 enum TAutoloadFlags 
       
    97     { 
       
    98     EAutoloadNone,
       
    99         EAutoloadPreload,
       
   100         EAutoloadBeforeManualLoad,
       
   101         EAutoloadAfterManualLoad,
       
   102         EAutoloadBeforeScopedLoad,
       
   103         EAutoloadAfterScopedLoad
       
   104     };
       
   105 
       
   106 enum TPolicyType
       
   107     {
       
   108     EManualLoad,
       
   109         EScopedManualLoad,
       
   110         EAutoload
       
   111     };
       
   112 
       
   113 class TServerStart
       
   114     {
       
   115     public:
       
   116         TServerStart(TRequestStatus& aStatus);
       
   117         TPtrC AsCommand() const;
       
   118         
       
   119         TServerStart();
       
   120         TInt GetCommand();
       
   121         void SignalL();
       
   122     private:
       
   123         TThreadId iId;
       
   124         TRequestStatus* iStatus;
       
   125     };
       
   126 
       
   127 #endif