eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_securid_symbian.h
branchRCL_3
changeset 18 bad0cc58d154
parent 2 1c7bc153c08e
child 19 c74b3d9f6b9e
equal deleted inserted replaced
17:30e048a7b597 18:bad0cc58d154
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 18 %
    19 * %version: 16.1.11 %
    20 */
    20 */
    21 
    21 
    22 #ifndef EAP_AM_TYPE_SECURID_SYMBIAN_H
    22 #ifndef EAP_AM_TYPE_SECURID_SYMBIAN_H
    23 #define EAP_AM_TYPE_SECURID_SYMBIAN_H
    23 #define EAP_AM_TYPE_SECURID_SYMBIAN_H
    24 
    24 
    25 //  INCLUDES
    25 //  INCLUDES
    26 #include "eap_am_tools.h"
    26 #include "eap_am_tools.h"
    27 #include "abs_eap_base_type.h"
    27 #include "abs_eap_base_type.h"
    28 #include "eap_am_type_securid.h"
    28 #include "eap_am_type_securid.h"
    29 #include "eap_am_network_id.h"
    29 #include "eap_am_network_id.h"
    30 #include "EapSecurIDNotifierStructs.h"
    30 #include "eap_auth_notifier.h"
       
    31 
    31 #include <EapType.h>
    32 #include <EapType.h>
    32 #include <d32dbms.h>
    33 #include <d32dbms.h>
    33 
    34 
    34 const TUint KDefaultTimeoutEAPSecurId = 120000;
    35 const TUint KDefaultTimeoutEAPSecurId = 120000;
    35 
    36 
    36 /**
    37 /**
    37 * Class that implements the operating system dependent portion of EAP SecurID protocol.
    38 * Class that implements the operating system dependent portion of EAP SecurID protocol.
    38 * For Symbian OS.
    39 * For Symbian OS.
    39 */
    40 */
    40 class EAP_EXPORT eap_am_type_securid_symbian_c
    41 class EAP_EXPORT eap_am_type_securid_symbian_c
    41 	: public CActive, public eap_am_type_securid_c
    42 	: public CActive
       
    43 	, public eap_am_type_securid_c
       
    44 	, public abs_eap_base_timer_c
       
    45 	, public MNotificationCallback
       
    46 
       
    47 
    42 {
    48 {
    43 private:
    49 private:
    44 
    50 
    45 	RDbs m_session;
    51 	RFs m_session;
    46 
    52 
    47 	RDbNamedDatabase m_database;
    53 	RDbNamedDatabase m_database;
    48 
    54 
    49 	enum TState 
    55 	enum TState 
    50 	{
    56 	{
    51 		EHandlingIdentityQuery,
    57 		EHandlingIdentityQuery,
    52 		EHandlingPasscodeQuery,
    58 		EHandlingPasscodeQuery,
    53 		EHandlingPincodeQuery,
    59 		EHandlingPincodeQuery,
    54 		EHandlingGTCQuery
    60 		EHandlingGTCQuery,
       
    61 		EHandlingTimerCall
    55 	};
    62 	};
    56 
    63 
    57 	TState m_state;
    64 	TState m_state;
    58 
    65 
    59 	RNotifier m_notifier;
    66 	RNotifier m_notifier;
    60 
    67 
    61 	TEapSecurIDStruct * m_dialog_data_ptr;
    68 	CEapAuthNotifier::TEapDialogInfo * m_dialog_data_ptr;
    62 	TPckg<TEapSecurIDStruct> * m_dialog_data_pckg_ptr;
    69 	TPckg<CEapAuthNotifier::TEapDialogInfo> * m_dialog_data_pckg_ptr;
       
    70 
    63 
    71 
    64 	abs_eap_am_tools_c * const m_am_tools;
    72 	abs_eap_am_tools_c * const m_am_tools;
    65 
    73 
    66 	abs_eap_base_type_c * const m_partner;
    74 	abs_eap_base_type_c * const m_partner;
    67 
    75 
    86 	bool m_is_notifier_connected; // Tells if notifier server is connected.
    94 	bool m_is_notifier_connected; // Tells if notifier server is connected.
    87 
    95 
    88 	// This holds the max session time read from the configuration file.
    96 	// This holds the max session time read from the configuration file.
    89 	TInt64 m_max_session_time;
    97 	TInt64 m_max_session_time;
    90 	
    98 	
    91 	// This is the vendor-type for tunneling EAP type.
       
    92 	// Valid for both expanded and non-expanded EAP types.
       
    93 	// This is used since m_tunneling_type can not be used in the same way 
       
    94 	// in expanded and non-expanded cases. 
       
    95 	// Unlike EAP type, Tunneling type is still non-expanded
       
    96 	// for both cases especially for using in the EAP databases.
       
    97 	u32_t m_tunneling_vendor_type;	
       
    98 
       
    99 	u32_t m_eap_vendor_type; // This is needed in certain cases.
       
   100 	
       
   101 	void send_error_notification(const eap_status_e error);
    99 	void send_error_notification(const eap_status_e error);
   102 	
   100 	
   103 	bool is_session_validL();	
   101 	bool is_session_validL();	
       
   102 
       
   103 	CEapAuthNotifier* iEapAuthNotifier;
       
   104 
   104 
   105 
   105 protected:
   106 protected:
   106 
   107 
   107 	eap_am_type_securid_symbian_c(
   108 	eap_am_type_securid_symbian_c(
   108 		abs_eap_am_tools_c * const m_am_tools,
   109 		abs_eap_am_tools_c * const m_am_tools,
   203 	 * in the database by calling the leaving function store_authentication_time_L.
   204 	 * in the database by calling the leaving function store_authentication_time_L.
   204 	 * Returns appropriate error if storing fails. eap_status_ok for successful storing.
   205 	 * Returns appropriate error if storing fails. eap_status_ok for successful storing.
   205 	 */
   206 	 */
   206 	eap_status_e store_authentication_time();
   207 	eap_status_e store_authentication_time();
   207 
   208 
       
   209 	void DlgComplete( TInt aStatus );
       
   210 
       
   211 	TInt IsDlgReadyToCompleteL();
       
   212 
       
   213 	EAP_FUNC_IMPORT eap_status_e timer_expired(
       
   214 		const u32_t id, void *data);
       
   215 
       
   216 	//
       
   217 	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
       
   218 		const u32_t id, void *data);
       
   219 
   208 }; // class eap_am_type_securid_symbian_c
   220 }; // class eap_am_type_securid_symbian_c
   209 
   221 
   210 
   222 
   211 #endif // EAP_AM_TYPE_SECURID_SYMBIAN_H
   223 #endif // EAP_AM_TYPE_SECURID_SYMBIAN_H