|
1 /* |
|
2 * ============================================================================ |
|
3 * Name : ./accesssec/eapol/eapol_framework/wapi_common/include/wapi_am_base_core.h |
|
4 * Part of : WAPI / WAPI *** Info from the SWAD |
|
5 * Description : WAPI authentication |
|
6 * Version : %version: 12 % << Don't touch! Updated by Synergy at check-out. |
|
7 * |
|
8 * Copyright © 2001-2009 Nokia. All rights reserved. |
|
9 * This material, including documentation and any related computer |
|
10 * programs, is protected by copyright controlled by Nokia. All |
|
11 * rights are reserved. Copying, including reproducing, storing, |
|
12 * adapting or translating, any or all of this material requires the |
|
13 * prior written consent of Nokia. This material also contains |
|
14 * confidential information which may not be disclosed to others |
|
15 * without the prior written consent of Nokia. |
|
16 * ============================================================================ |
|
17 * Template version: 4.2 |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #if !defined(_WAPI_AM_BASE_CORE_H_) |
|
23 #define _WAPI_AM_BASE_CORE_H_ |
|
24 |
|
25 #if defined(USE_WAPI_CORE) |
|
26 |
|
27 #include "eap_tools.h" |
|
28 #include "eap_variable_data.h" |
|
29 #include "eap_am_export.h" |
|
30 #include "eap_am_network_id.h" |
|
31 #include "ec_am_base_certificate_store.h" |
|
32 |
|
33 class abs_wapi_am_core_c; |
|
34 |
|
35 /// This class is interface to adaptation module of WAPI core. |
|
36 class EAP_EXPORT wapi_am_base_core_c |
|
37 : public ec_am_base_certificate_store_c |
|
38 { |
|
39 private: |
|
40 //-------------------------------------------------- |
|
41 |
|
42 /** Function returns partner object of adaptation module of WAPI. |
|
43 * Partner object is the WAPI core object. |
|
44 */ |
|
45 //virtual abs_wapi_am_core_c * get_am_partner() = 0; |
|
46 |
|
47 //-------------------------------------------------- |
|
48 protected: |
|
49 //-------------------------------------------------- |
|
50 |
|
51 //-------------------------------------------------- |
|
52 public: |
|
53 //-------------------------------------------------- |
|
54 |
|
55 virtual ~wapi_am_base_core_c() |
|
56 { |
|
57 } |
|
58 |
|
59 /** |
|
60 * This function creates a new instance of adaptation module of WAPI core. |
|
61 * @param tools is pointer to the abs_eap_am_tools class created by the adaptation module. |
|
62 * WAPI core AM will callback caller using the partner pointer. |
|
63 */ |
|
64 EAP_FUNC_IMPORT static wapi_am_base_core_c *new_wapi_am_core( |
|
65 abs_eap_am_tools_c * const tools, |
|
66 abs_wapi_am_core_c * const partner, |
|
67 const bool is_client_when_true, |
|
68 const eap_am_network_id_c * const receive_network_id); |
|
69 |
|
70 /** Function sets partner object of adaptation module of WAPI. |
|
71 * Partner object is the WAPI core object. |
|
72 */ |
|
73 //virtual void set_am_partner(abs_wapi_am_core_c * const partner) = 0; |
|
74 |
|
75 virtual eap_status_e configure() = 0; |
|
76 |
|
77 /** |
|
78 * The shutdown() function is called before the destructor of the |
|
79 * object is executed. During the function call the object |
|
80 * could shutdown the operations, for example cancel timers. |
|
81 * Each derived class must define this function. |
|
82 */ |
|
83 virtual eap_status_e shutdown() = 0; |
|
84 |
|
85 virtual bool get_is_valid() = 0; |
|
86 |
|
87 /** Client calls this function. |
|
88 * WAPI AM could do finishing operations to databases etc. based on authentication status and type. |
|
89 */ |
|
90 virtual eap_status_e reset() = 0; |
|
91 |
|
92 /** Client calls this function. |
|
93 * WAPI AM could make some fast operations here, heavy operations should be done in the reset() function. |
|
94 */ |
|
95 virtual eap_status_e authentication_finished( |
|
96 const bool true_when_successfull) = 0; |
|
97 |
|
98 /** |
|
99 * The type_configure_read() function reads the configuration data identified |
|
100 * by the field string of field_length bytes length. Adaptation module must direct |
|
101 * the query to some persistent store. |
|
102 * @param field is generic configure string idenfying the required configure data. |
|
103 * @param field_length is length of the field string. |
|
104 * @param data is pointer to existing eap_variable_data object. |
|
105 */ |
|
106 virtual eap_status_e type_configure_read( |
|
107 const eap_configuration_field_c * const field, |
|
108 eap_variable_data_c * const data) = 0; |
|
109 |
|
110 /** |
|
111 * The type_configure_write() function writes the configuration data identified |
|
112 * by the field string of field_length bytes length. Adaptation module must direct |
|
113 * the action to some persistent store. |
|
114 * @param field is generic configure string idenfying the required configure data. |
|
115 * @param field_length is length of the field string. |
|
116 * @param data is pointer to existing eap_variable_data object. |
|
117 */ |
|
118 virtual eap_status_e type_configure_write( |
|
119 const eap_configuration_field_c * const field, |
|
120 eap_variable_data_c * const data) = 0; |
|
121 |
|
122 //-------------------------------------------------- |
|
123 }; // class wapi_am_base_core_c |
|
124 |
|
125 |
|
126 /** @file */ |
|
127 |
|
128 |
|
129 #endif //#if defined(USE_WAPI_CORE) |
|
130 |
|
131 #endif //#if !defined(_WAPI_AM_BASE_CORE_H_) |
|
132 |
|
133 //-------------------------------------------------- |
|
134 |
|
135 |
|
136 |
|
137 // End. |