eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_leap_symbian.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 16.1.11 %
    19 * %version: 18 %
    20 */
    20 */
    21 
    21 
    22 #ifndef EAP_AM_TYPE_LEAP_SYMBIAN_H
    22 #ifndef EAP_AM_TYPE_LEAP_SYMBIAN_H
    23 #define EAP_AM_TYPE_LEAP_SYMBIAN_H
    23 #define EAP_AM_TYPE_LEAP_SYMBIAN_H
    24 
       
    25 // This flag is for testing memory leaks that occurs in QT notifier.
       
    26 #define USE_EAP_AUTH_NOTIFIER
       
    27 
    24 
    28 // INCLUDES
    25 // INCLUDES
    29 
    26 
    30 #include "eap_am_tools_symbian.h"
    27 #include "eap_am_tools_symbian.h"
    31 #include "abs_eap_base_type.h"
    28 #include "abs_eap_base_type.h"
    32 #include "eap_am_type_leap.h"
    29 #include "eap_am_type_leap.h"
    33 #include "eap_am_network_id.h"
    30 #include "eap_am_network_id.h"
    34 
    31 #include "EapLeapNotifierStructs.h"
    35 #if defined(USE_EAP_AUTH_NOTIFIER)
       
    36 #include "eap_auth_notifier.h"
       
    37 #endif //#if defined(USE_EAP_AUTH_NOTIFIER)
       
    38 
       
    39 #include <EapType.h>
    32 #include <EapType.h>
    40 #include <d32dbms.h>
    33 #include <d32dbms.h>
    41 
    34 
    42 const TUint KDefaultTimeoutLEAP = 120000;
    35 const TUint KDefaultTimeoutLEAP = 120000;
    43 
    36 
    47 * Class that implements the operating system dependent portion of EAP LEAP protocol.
    40 * Class that implements the operating system dependent portion of EAP LEAP protocol.
    48 * For Symbian OS.
    41 * For Symbian OS.
    49 */
    42 */
    50 class EAP_EXPORT eap_am_type_leap_symbian_c
    43 class EAP_EXPORT eap_am_type_leap_symbian_c
    51 : public CActive, public eap_am_type_leap_c
    44 : public CActive, public eap_am_type_leap_c
    52 #if defined(USE_EAP_AUTH_NOTIFIER)
       
    53 	, public MNotificationCallback
       
    54 #endif //#if defined(USE_EAP_AUTH_NOTIFIER)
       
    55 
       
    56 {
    45 {
    57 private:
    46 private:
    58 	//--------------------------------------------------
    47 	//--------------------------------------------------
    59 
    48 
    60 	eap_am_tools_symbian_c * const m_am_tools;
    49 	eap_am_tools_symbian_c * const m_am_tools;
    61 
    50 
    62 	abs_eap_base_type_c * const m_partner;
    51 	abs_eap_base_type_c * const m_partner;
    63 
    52 
    64 	RFs m_session;
    53 	RDbs m_session;
    65 
    54 
    66 	RDbNamedDatabase m_database;
    55 	RDbNamedDatabase m_database;
    67 
    56 
    68 #if defined(USE_EAP_AUTH_NOTIFIER)
       
    69 	RNotifier m_notifier;
    57 	RNotifier m_notifier;
    70 
    58 
    71 	CEapAuthNotifier::TEapDialogInfo * m_input_output_data_ptr;
    59 	TEapLeapUsernamePasswordInfo * m_input_output_data_ptr;
    72 
    60 
    73 	TPckg<CEapAuthNotifier::TEapDialogInfo> * m_input_output_pckg_ptr;
    61 	TPckg<TEapLeapUsernamePasswordInfo> * m_input_output_pckg_ptr;
    74 #endif //#if defined(USE_EAP_AUTH_NOTIFIER)
       
    75 
    62 
    76 	eap_am_network_id_c m_receive_network_id;
    63 	eap_am_network_id_c m_receive_network_id;
    77 
    64 
    78 	TIndexType m_index_type;
    65 	TIndexType m_index_type;
    79 	
    66 	
    93 
    80 
    94 	eap_variable_data_c * m_password_utf8;
    81 	eap_variable_data_c * m_password_utf8;
    95 
    82 
    96 	bool m_shutdown_was_called;
    83 	bool m_shutdown_was_called;
    97 	
    84 	
    98 
    85 	bool m_is_notifier_connected; // Tells if notifier server is connected.
       
    86 	
    99 	// This holds the max session time read from the configuration file.
    87 	// This holds the max session time read from the configuration file.
   100 	TInt64 m_max_session_time;
    88 	TInt64 m_max_session_time;
       
    89 	
       
    90 	// This is the vendor-type for tunneling EAP type.
       
    91 	// Valid for both expanded and non-expanded EAP types.
       
    92 	// This is used since m_tunneling_type can not be used in the same way 
       
    93 	// in expanded and non-expanded cases. 
       
    94 	// Unlike EAP type, Tunneling type is still non-expanded
       
    95 	// for both cases especially for using in the EAP databases.
       
    96 	u32_t m_tunneling_vendor_type;	
   101 	
    97 	
   102 	void send_error_notification(const eap_status_e error);
    98 	void send_error_notification(const eap_status_e error);
   103 
    99 
   104 	/**
   100 	/**
   105 	 * Stores current universal time as the the full authentication time
   101 	 * Stores current universal time as the the full authentication time
   107 	 */
   103 	 */
   108 	void store_authentication_timeL();
   104 	void store_authentication_timeL();
   109 	 
   105 	 
   110 	bool is_session_validL();	
   106 	bool is_session_validL();	
   111 
   107 
   112 #if defined(USE_EAP_AUTH_NOTIFIER)
       
   113 	CEapAuthNotifier* iEapAuthNotifier;
       
   114 #endif //#if defined(USE_EAP_AUTH_NOTIFIER)
       
   115 
   108 
   116 	//--------------------------------------------------
   109 	//--------------------------------------------------
   117 protected:
   110 protected:
   118 	//--------------------------------------------------
   111 	//--------------------------------------------------
   119 
   112 
   202 	 * in the database by calling the leaving function store_authentication_time_L.
   195 	 * in the database by calling the leaving function store_authentication_time_L.
   203 	 * Returns appropriate error if storing fails. eap_status_ok for successful storing.
   196 	 * Returns appropriate error if storing fails. eap_status_ok for successful storing.
   204 	 */
   197 	 */
   205 	eap_status_e store_authentication_time();
   198 	eap_status_e store_authentication_time();
   206 
   199 
   207 	void DlgComplete( TInt aStatus );
       
   208 
       
   209 	TInt IsDlgReadyToCompleteL();
       
   210 	
       
   211 }; // class eap_am_type_leap_symbian_c
   200 }; // class eap_am_type_leap_symbian_c
   212 
   201 
   213 
   202 
   214 #endif // EAP_AM_TYPE_LEAP_SYMBIAN_H
   203 #endif // EAP_AM_TYPE_LEAP_SYMBIAN_H
   215 
   204