eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSim.h
changeset 0 c8830336c852
child 2 1c7bc153c08e
equal deleted inserted replaced
-1:000000000000 0:c8830336c852
       
     1 /*
       
     2 * Copyright (c) 2001-2006 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 the License "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:  EAP and WLAN authentication protocols.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef _EAPSIM_H_
       
    21 #define _EAPSIM_H_
       
    22 
       
    23 // INCLUDES
       
    24 #include <EapType.h>
       
    25 #include "eap_header.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class eap_am_network_id_c;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 * Class that implements the generic EAP type interface. Implements EAP SIM protocol.
       
    33 */
       
    34 class CEapSim : public CEapType
       
    35 {
       
    36 public:		
       
    37 
       
    38 	/**
       
    39 	* Construction function. Called by ECom after the EAP SIM plugin has been loaded.
       
    40 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
       
    41 	* @return Pointer to the instance.
       
    42 	*/
       
    43 	static CEapSim* NewL(const SIapInfo* aIapInfo);	
       
    44 
       
    45 	/**
       
    46 	* Destructor does nothing.
       
    47 	*/
       
    48 	virtual ~CEapSim();
       
    49 	
       
    50 #ifdef USE_EAP_SIMPLE_CONFIG
       
    51 
       
    52 	/**
       
    53 	* Creates EAP protocol interface implementation. Instances an object that
       
    54 	* has been derived from eap_base_type_c that handles the communication 
       
    55 	* with EAP stack. 
       
    56 	* @param aTools Pointer to tools class.
       
    57 	* @param aPartner Used for callbacks to the stack.
       
    58 	* @param is_client_when_true Specifies whether the EAP type acts as a client or server.
       
    59 	* @param receive_network_id Network addresses
       
    60 	* @param eap_config_if Pointer used for call back to creater of stack (eapol_am_wlan_authentication_symbian_c class).
       
    61 	* @return Pointer to the implementation.
       
    62 	*/		
       
    63 	virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
       
    64 											   abs_eap_base_type_c* const aPartner,
       
    65 											   const bool is_client_when_true,
       
    66 											   const eap_am_network_id_c * const receive_network_id,
       
    67 											   abs_eap_configuration_if_c * const configuration_if);
       
    68 	
       
    69 #else
       
    70 	
       
    71 	/**
       
    72 	* Creates EAP protocol interface implementation. Instances an object that
       
    73 	* has been derived from eap_base_type_c that handles the communication 
       
    74 	* with EAP stack. 
       
    75 	* @param aTools Pointer to tools class.
       
    76 	* @param aPartner Used for callbacks to the stack.
       
    77 	* @param is_client_when_true Specifies whether the EAP type acts as a client or server.
       
    78 	* @param receive_network_id Network addresses
       
    79 	* @return Pointer to the implementation.
       
    80 	*/
       
    81 	eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
       
    82 									   abs_eap_base_type_c* const aPartner,
       
    83 									   const bool is_client_when_true,
       
    84 									   const eap_am_network_id_c * const receive_network_id);
       
    85 	
       
    86 #endif // #ifdef USE_EAP_SIMPLE_CONFIG
       
    87 	
       
    88 	/**
       
    89 	* Invokes the configuration UI.
       
    90 	**/
       
    91 	TInt InvokeUiL();
       
    92 	
       
    93 	/**
       
    94 	* Gets information about EAP type. 
       
    95 	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
       
    96 	*/
       
    97 	CEapTypeInfo* GetInfoLC();
       
    98 
       
    99 	/**
       
   100 	* Deletes EAP type configuration
       
   101 	*/	
       
   102 	void DeleteConfigurationL();
       
   103 
       
   104 	/**
       
   105 	* Returns the version of the interface that the EAP type implements.
       
   106 	* The client-side of the interface must always check the version with this function 
       
   107 	* and not call the functions that are not implemented. New functions must be
       
   108 	* added to the end of the interface so that the order of the old functions
       
   109 	* does not change.
       
   110 	* @return Integer indicating the version.
       
   111 	*/
       
   112 	TUint GetInterfaceVersion();
       
   113 
       
   114 	/**
       
   115 	* Sets the tunneling type. This is used to indicate that this type is run inside another 
       
   116 	* EAP type. 
       
   117 	* @param aTunnelingType Type number for the tunneling type
       
   118 	*/	
       
   119 	void SetTunnelingType(const TInt aTunnelingType);
       
   120 
       
   121 	/**
       
   122 	* Changes the index of the saved parameters.
       
   123 	* @param aIndexType Indicates the bearer used for this connection.
       
   124 	* @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection.
       
   125 	*/
       
   126 	void SetIndexL(
       
   127 		const TIndexType aIndexType, 
       
   128 		const TInt aIndex);
       
   129 		
       
   130 	/**
       
   131 	* Sets the EAP types configuration
       
   132 	* @param aSettings Structure containing the settings
       
   133 	*/
       
   134 	void SetConfigurationL(const EAPSettings& aSettings);
       
   135 
       
   136 	/**
       
   137 	* Gets the EAP types configuration
       
   138 	* @param aSettings Structure containing the settings
       
   139 	*/
       
   140 	void GetConfigurationL(EAPSettings& aSettings);
       
   141 	
       
   142 	/**
       
   143 	* Copies the EAP types configuration
       
   144 	* @param aDestinationIndex ID to where copy the settings.
       
   145 	*/
       
   146 	void CopySettingsL(const TIndexType aDestinationIndexType, const TInt aDestinationIndex);
       
   147 
       
   148 	
       
   149 		
       
   150 protected:
       
   151 
       
   152 	/**
       
   153 	* Constructor initialises member variables.
       
   154 	*/
       
   155 	CEapSim(const TIndexType aIndexType, const TInt aIndex);
       
   156 
       
   157 private:
       
   158 
       
   159 	// Bearer type
       
   160 	TIndexType iIndexType;
       
   161 
       
   162 	// Unique index
       
   163 	TInt iIndex;
       
   164 
       
   165 	// Tunneling type
       
   166 	eap_type_value_e iTunnelingType;
       
   167 };
       
   168 
       
   169 #endif // _EAPSIM_H_
       
   170 
       
   171 // End of file