eapol/eapol_framework/eapol_common/am/include/eap_am_type_securid.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 #ifndef EAP_AM_TYPE_SECURID_H
       
    20 #define EAP_AM_TYPE_SECURID_H
       
    21 
       
    22 #include "abs_eap_am_type_securid.h"
       
    23 
       
    24 /// This class is interface to adaptation module of EAP SecurID
       
    25 class EAP_EXPORT eap_am_type_securid_c
       
    26 {
       
    27 private:
       
    28 
       
    29 	abs_eap_am_type_securid_c *m_am_partner;
       
    30 	abs_eap_am_tools_c *m_am_tools;
       
    31 
       
    32 	bool m_is_valid;
       
    33 
       
    34 protected:
       
    35 
       
    36 public:
       
    37 
       
    38 	virtual ~eap_am_type_securid_c()
       
    39 	{
       
    40 		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
    41 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
    42 	}
       
    43 
       
    44 	eap_am_type_securid_c(abs_eap_am_tools_c * const tools /*, abs_eap_am_type_securid_c * const partner */)
       
    45 	: m_am_partner(0)
       
    46 	, m_am_tools(tools)
       
    47 	, m_is_valid(false)
       
    48 	{
       
    49 		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
    50 		set_is_valid();
       
    51 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
    52 	}
       
    53 
       
    54 	virtual eap_status_e shutdown() = 0;
       
    55 
       
    56 	/** Function returns partner object of adaptation module of EAP SecurID.
       
    57 	 *  Partner object is the EAP SecurID object.
       
    58 	 */
       
    59 	abs_eap_am_type_securid_c * const get_am_partner()
       
    60 	{
       
    61 		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
    62 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
    63 		return m_am_partner;
       
    64 	}
       
    65 
       
    66 	/** Function sets partner object of adaptation module of SECURID.
       
    67 	 *  Partner object is the SECURID object.
       
    68 	 */
       
    69 	void set_am_partner(abs_eap_am_type_securid_c * const partner)
       
    70 	{
       
    71 		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
    72 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
    73 		m_am_partner = partner;
       
    74 	}
       
    75 
       
    76 	void set_is_valid()
       
    77 	{
       
    78 		m_is_valid = true;
       
    79 	}
       
    80 
       
    81 	bool get_is_valid()
       
    82 	{
       
    83 		return m_is_valid;
       
    84 	}
       
    85 
       
    86 	virtual eap_status_e type_configure_read(
       
    87 		const eap_configuration_field_c * const field,
       
    88 		eap_variable_data_c * const data) = 0;
       
    89 
       
    90 	virtual eap_status_e type_configure_write(
       
    91 		const eap_configuration_field_c * const field,
       
    92 		eap_variable_data_c * const data) = 0;
       
    93 
       
    94 	virtual eap_status_e configure() = 0;
       
    95 
       
    96 	virtual eap_status_e reset() = 0;
       
    97 
       
    98 	virtual eap_status_e show_identity_query_dialog(eap_type_value_e eap_type, eap_variable_data_c * const identity) = 0;
       
    99 
       
   100 	virtual eap_status_e show_passcode_query_dialog(eap_variable_data_c * const passcode,
       
   101 													bool is_first_query) = 0;
       
   102 
       
   103 	virtual eap_status_e show_pincode_query_dialog(eap_variable_data_c * const passcode,
       
   104 												   eap_variable_data_c * const pincode,
       
   105 												   bool is_first_query) = 0;
       
   106 
       
   107 	virtual eap_status_e show_gtc_query_dialog(eap_variable_data_c * const passcode,
       
   108 												   const u8_t * const message,
       
   109 												   u32_t message_length,
       
   110 												   bool is_first_query) = 0;
       
   111 
       
   112 	virtual eap_status_e read_auth_failure_string(eap_variable_data_c * const string) = 0;
       
   113 
       
   114 	/// This function queries unique key for memory store object of this access.
       
   115 	virtual eap_status_e get_memory_store_key(eap_variable_data_c * const memory_store_key) = 0;
       
   116 };
       
   117 
       
   118 EAP_C_FUNC_IMPORT  eap_am_type_securid_c *new_eap_am_type_securid(
       
   119 	abs_eap_am_tools_c * const tools,
       
   120 	abs_eap_base_type_c * const partner,
       
   121 	const eap_type_value_e eap_type,
       
   122 	const eap_am_network_id_c * const receive_network_id);
       
   123 
       
   124 #endif // EAP_AM_TYPE_SECURID_H