vpnengine/vpnconnagt/inc/vpnconnagtdefs.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2003 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: VPN Connection Agent definitions..
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef _VPNCONNAGTDEFS_H_
       
    21 #define _VPNCONNAGTDEFS_H_
       
    22 
       
    23 // INCLUDES
       
    24 #include "vpnmandefs.h"
       
    25 #include "vpnapidefs.h"
       
    26 #include "eventdefssit.h"
       
    27 
       
    28 #define NORMAL_DISCONNECT_MODE 0
       
    29 #define SILENT_DISCONNECT_MODE 1
       
    30 
       
    31 /**
       
    32  * Connection configuration parameter class declaration and implementation.
       
    33  */
       
    34 class TVPNParameters 
       
    35 	{
       
    36 	public:
       
    37 
       
    38 		/**
       
    39 		 * Returns the id of the VPN IAP.
       
    40 		 * @return Returns the id of the VPN IAP.
       
    41 		 */
       
    42 		inline TUint32 GetVPNIapId()
       
    43 				{return iVPNIapId;};
       
    44 
       
    45 		/**
       
    46 		 * Sets the id of the VPN IAP.
       
    47 		 * @param aVPNIapId Saves the id of the VPN IAP.
       
    48 		 */
       
    49 		inline void SetVPNIapId(TUint32 aVPNIapId)
       
    50 				{iVPNIapId=aVPNIapId;};
       
    51 
       
    52 		/**
       
    53 		 * Returns the id of the VPN Network.
       
    54 		 * @return Returns the id of the VPN Network.
       
    55 		 */
       
    56 		inline TUint32 GetVPNNetworkId()
       
    57 				{return iVPNNetworkId;};
       
    58 
       
    59 		/**
       
    60 		 * Sets the id of the VPN Network.
       
    61 		 * @param aVPNNetworkId Saves the id of the VPN Network.
       
    62 		 */
       
    63 		inline void SetVPNNetworkId(TUint32 aVPNNetworkId)
       
    64 				{iVPNNetworkId=aVPNNetworkId;};
       
    65 
       
    66 		/**
       
    67 		 * Returns the id of the real IAP.
       
    68 		 * @return Returns the id of the real IAP.
       
    69 		 */
       
    70 		inline TUint32 GetRealIapId()
       
    71 				{return iRealIapId;};
       
    72 
       
    73 		/**
       
    74 		 * Sets the id of the real IAP.
       
    75 		 * @param aRealIapId Saves the id of the real IAP.
       
    76 		 */
       
    77 		inline void SetRealIapId(TUint32 aRealIapId)
       
    78 				{iRealIapId=aRealIapId;};
       
    79 
       
    80 		/**
       
    81 		 * Returns the id of the real Network.
       
    82 		 * @return Returns the id of the real Network.
       
    83 		 */
       
    84 		inline TUint32 GetRealNetworkId()
       
    85 				{return iRealNetworkId;};
       
    86 		
       
    87 		/**
       
    88 		 * Sets the id of the real Network.
       
    89 		 * @param aRealNetworkId Saves the id of the real Network.
       
    90 		 */
       
    91 		inline void SetRealNetworkId(TUint32 aRealNetworkId)
       
    92 				{iRealNetworkId=aRealNetworkId;};
       
    93 
       
    94 		/**
       
    95 		 * Returns the pointer to the name of the VPN Nif.
       
    96 		 * @return A name of the VPN Nif.
       
    97 		 */
       
    98 		inline TName* GetVPNNifName()
       
    99 				{return &iVPNNifName;};
       
   100 
       
   101 		/**
       
   102 		 * Saves the name of the VPN Nif.
       
   103 		 * @param aVPNNifName Reference to a name of the VPN Nif.
       
   104 		 */
       
   105 		inline void SetVPNNifName(TName& aVPNNifName)
       
   106 				{iVPNNifName=aVPNNifName;};
       
   107 
       
   108 		/**
       
   109 		 * Saves the TVPNAddress object.
       
   110 		 * @param aVPNAddresses The address object to be saved.
       
   111 		 */
       
   112 		inline void SetAddresses(TVPNAddress& aVPNAddresses)
       
   113 				{iVPNAddresses=aVPNAddresses;};
       
   114 
       
   115 		/**
       
   116 		 * Returns the reference to the TVPNAddress object.
       
   117 		 * @return Returns the reference to the TVPNAddress object.
       
   118 		 */
       
   119 		inline TVPNAddress& GetAddresses()
       
   120 				{return iVPNAddresses;};
       
   121 
       
   122 		/**
       
   123 		 * Returns the IP address given to the VPN Nif.
       
   124 		 * @return Returns the reference to the TInetAddr type address object.
       
   125 		 */
       
   126 		inline TInetAddr& GetVPNNifAddress()
       
   127 				{return iVPNAddresses.iVPNIfAddr;};
       
   128 
       
   129 		/**
       
   130 		 * Saves the IP address to be given to the VPN Nif.
       
   131 		 * @param aVPNNifAddress A reference to the TInetAddr type address object.
       
   132 		 */
       
   133 		inline void SetVPNNifAddress(TInetAddr& aVPNNifAddress)
       
   134 				{iVPNAddresses.iVPNIfAddr=aVPNNifAddress;};
       
   135 
       
   136 		/**
       
   137 		 * Returns the first Domain Name Server address.
       
   138 		 * @return Returns the reference to the TInetAddr type object.
       
   139 		 */
       
   140 		inline TInetAddr& GetVPNNifDNS1()
       
   141 				{return iVPNAddresses.iVPNIfDNS1;};
       
   142 
       
   143 		/**
       
   144 		 * Saves the address of the first Domain Name Server adress.
       
   145 		 * @param aVPNNifDNS1 A reference to a TInetAddr type object to
       
   146 		 * be saved.
       
   147 		 */
       
   148 		inline void SetVPNNifDNS1(TInetAddr& aVPNNifDNS1)
       
   149 				{iVPNAddresses.iVPNIfDNS1=aVPNNifDNS1;};
       
   150 
       
   151 		/**
       
   152 		 * Returns the second Domain Name Server address.
       
   153 		 * @return Returns the reference to the TInetAddr type object.
       
   154 		 */
       
   155 		inline TInetAddr& GetVPNNifDNS2()
       
   156 				{return iVPNAddresses.iVPNIfDNS2;};
       
   157 		/**
       
   158 		 * Saves the address of the second Domain Name Server adress.
       
   159 		 * @param aVPNNifDNS2 A reference to a TInetAddr type object to
       
   160 		 * be saved.
       
   161 		 */
       
   162 		inline void SetVPNNifDNS2(TInetAddr& aVPNNifDNS2)
       
   163 				{iVPNAddresses.iVPNIfDNS2=aVPNNifDNS2;};
       
   164 
       
   165 		/**
       
   166 		 * Returns the pointer to the name of the VPN policy.
       
   167 		 * @return Returns the pointer to the TName object containinge VPN policy name.
       
   168 		 */
       
   169 		inline TVpnPolicyId* GetVPNPolicy()
       
   170 				{return &iVPNPolicyId;};
       
   171 		/**
       
   172 		 * Saves the name of the VPN policy.
       
   173 		 * @param aVPNPolicyId A reference to a descriptor containing the name of the policy.
       
   174 		 */
       
   175 		inline void SetVPNPolicy(TVpnPolicyId& aVPNPolicyId)
       
   176 				{iVPNPolicyId=aVPNPolicyId;};
       
   177 
       
   178         inline void SetProtocolVersion(TProtocolVersion& aProtocolVersion)
       
   179                 {iProtocolVersion = aProtocolVersion;};
       
   180         inline TProtocolVersion& GetProtocolVersion()
       
   181                 {return iProtocolVersion;};
       
   182 
       
   183         inline void SetIkePolicyHandle(TPolicyHandle& aIkePolicyHandle)
       
   184                 {iIkePolicyHandle.iHandle = aIkePolicyHandle.iHandle;};
       
   185         inline TPolicyHandle& GetIkePolicyHandle()
       
   186                 {return iIkePolicyHandle;};
       
   187 
       
   188         inline void SetIpSecPolicyHandle(TPolicyHandle& aIpsecPolicyHandle)
       
   189                 {iIpsecPolicyHandle.iHandle = aIpsecPolicyHandle.iHandle;};
       
   190         inline TPolicyHandle& GetIpsecPolicyHandle()
       
   191                 {return iIpsecPolicyHandle;};
       
   192 
       
   193 	private:
       
   194 
       
   195 		/** CommDb Id of the VPN IAP. */
       
   196 		TUint32		iVPNIapId;
       
   197 
       
   198 		/** CommDb Id of the VPN Network. */
       
   199 		TUint32		iVPNNetworkId;
       
   200 
       
   201 		/** CommDb Id of the real IAP. */
       
   202 		TUint32		iRealIapId;
       
   203 
       
   204 		/** CommDb Id of the real Network */
       
   205 		TUint32		iRealNetworkId;
       
   206 	
       
   207 		/** Name of the VPN Nif. */
       
   208 		TName		iVPNNifName;
       
   209 
       
   210 		/** IP address of the VPN Nif and DNS addresses. */
       
   211 		TVPNAddress	iVPNAddresses;
       
   212 
       
   213 		/** Id of the VPN policy. */
       
   214 		TVpnPolicyId	iVPNPolicyId;
       
   215 
       
   216         /** Version of the used protocol (ip or ip6) */
       
   217         TProtocolVersion iProtocolVersion;
       
   218 
       
   219         /** Ike policy handle */
       
   220         TPolicyHandle iIkePolicyHandle;
       
   221         
       
   222         /** Ipsec policy Handle */
       
   223         TPolicyHandle iIpsecPolicyHandle;
       
   224 	};
       
   225 
       
   226 
       
   227 #endif	// VPNCONNAGTDEFS_H
       
   228 
       
   229 // End of file