|
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 |
|
21 #ifndef EAP_TYPE_SECURID_STATE_H |
|
22 #define EAP_TYPE_SECURID_STATE_H |
|
23 |
|
24 #include "eap_am_export.h" |
|
25 |
|
26 /** |
|
27 * This is the internal state of the SecurId and GTC EAP type. |
|
28 */ |
|
29 enum eap_type_securid_state_variable_e |
|
30 { |
|
31 eap_type_securid_state_none, |
|
32 eap_type_securid_state_identity_query, |
|
33 |
|
34 eap_type_securid_state_passcode_query, |
|
35 eap_type_securid_state_pincode_query, |
|
36 eap_type_securid_state_success, |
|
37 eap_type_securid_state_failure, |
|
38 |
|
39 eap_type_securid_state_gtc_user_input_query, |
|
40 |
|
41 eap_type_securid_state_identity_response, |
|
42 eap_type_securid_state_passcode_response, |
|
43 |
|
44 eap_type_securid_state_gtc_response |
|
45 }; |
|
46 |
|
47 |
|
48 class EAP_EXPORT eap_type_securid_state_c |
|
49 { |
|
50 private: |
|
51 |
|
52 bool m_is_client; |
|
53 eap_type_securid_state_variable_e m_state; |
|
54 eap_type_securid_state_variable_e m_next_state; |
|
55 eap_type_securid_state_variable_e m_prev_state; |
|
56 |
|
57 public: |
|
58 eap_type_securid_state_c(const bool client); |
|
59 |
|
60 virtual ~eap_type_securid_state_c(); |
|
61 |
|
62 eap_type_securid_state_variable_e get_state() const; |
|
63 |
|
64 void set_state(const eap_type_securid_state_variable_e new_state); |
|
65 |
|
66 void set_state(const eap_type_securid_state_variable_e new_state, const eap_type_securid_state_variable_e next_state); |
|
67 |
|
68 bool is_valid_state(const eap_type_securid_state_variable_e new_state) const; |
|
69 |
|
70 void set_failure_message_received(); |
|
71 |
|
72 void unset_failure_message_received(); |
|
73 |
|
74 void cancel_eap_failure_timer(); |
|
75 }; |
|
76 |
|
77 |
|
78 #endif // EAP_TYPE_SECURID_STATE_H |
|
79 |
|
80 //-------------------------------------------------- |
|
81 |
|
82 |
|
83 // End. |