|
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 #if !defined(_SIMPLE_CONFIG_AM_SERVICES_H_) |
|
22 #define _SIMPLE_CONFIG_AM_SERVICES_H_ |
|
23 |
|
24 #include "eap_tools.h" |
|
25 #include "eap_variable_data.h" |
|
26 #include "eap_am_export.h" |
|
27 #include "abs_eap_am_type_simple_config.h" |
|
28 #include "eap_am_network_id.h" |
|
29 #include "eap_array.h" |
|
30 #include "simple_config_types.h" |
|
31 |
|
32 class abs_simple_config_am_services_c; |
|
33 class simple_config_payloads_c; |
|
34 class simple_config_credential_c; |
|
35 |
|
36 |
|
37 /// This class is interface to adaptation module of SIMPLE_CONFIG. |
|
38 class EAP_EXPORT simple_config_am_services_c |
|
39 { |
|
40 private: |
|
41 //-------------------------------------------------- |
|
42 |
|
43 /// This function returns pointer to adaptation module of SIMPLE_CONFIG. See abs_simple_config_am_services_c. |
|
44 virtual abs_simple_config_am_services_c * get_simple_config_am_partner() = 0; |
|
45 |
|
46 //-------------------------------------------------- |
|
47 protected: |
|
48 //-------------------------------------------------- |
|
49 |
|
50 //-------------------------------------------------- |
|
51 public: |
|
52 //-------------------------------------------------- |
|
53 |
|
54 virtual ~simple_config_am_services_c() |
|
55 { |
|
56 } |
|
57 |
|
58 /** |
|
59 * Object must indicate it's validity. |
|
60 * If object initialization fails this function must return false. |
|
61 * @return This function returns the validity of this object. |
|
62 */ |
|
63 virtual bool get_is_valid() = 0; |
|
64 |
|
65 /// This function sets pointer to adaptation module of SIMPLE_CONFIG. See abs_simple_config_am_services_c. |
|
66 virtual void set_simple_config_am_partner(abs_simple_config_am_services_c * const tls_am_partner) = 0; |
|
67 |
|
68 /** |
|
69 * The configure() function is called after the constructor of the |
|
70 * object is successfully executed. During the function call the object |
|
71 * could query the configuration. Each derived class must define this function. |
|
72 */ |
|
73 virtual eap_status_e configure() = 0; |
|
74 |
|
75 /** |
|
76 * The shutdown() function is called before the destructor of the |
|
77 * object is executed. During the function call the object |
|
78 * could shutdown the operations, for example cancel timers. |
|
79 * Each derived class must define this function. |
|
80 */ |
|
81 virtual eap_status_e shutdown() = 0; |
|
82 |
|
83 /** |
|
84 * This function queries all network and device parameters. |
|
85 * abs_simple_config_am_services_c::complete_query_network_and_device_parameters() completes this query. |
|
86 */ |
|
87 virtual eap_status_e query_network_and_device_parameters( |
|
88 const simple_config_state_e state) = 0; |
|
89 |
|
90 /** |
|
91 * This function tells AM to save SIMPLE_CONFIG configuration parameters. |
|
92 * This is always syncronous call. |
|
93 */ |
|
94 virtual eap_status_e save_simple_config_session( |
|
95 const simple_config_state_e state, |
|
96 EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array, |
|
97 const eap_variable_data_c * const new_password, |
|
98 const simple_config_Device_Password_ID_e Device_Password_ID, |
|
99 const simple_config_payloads_c * const other_configuration |
|
100 ) = 0; |
|
101 |
|
102 /** |
|
103 * This function forwards all payloads received in M2D messages. |
|
104 * Adaptation layer could show this information to user. |
|
105 * This is always syncronous call. |
|
106 */ |
|
107 virtual eap_status_e received_registrar_information( |
|
108 EAP_TEMPLATE_CONST eap_array_c<simple_config_payloads_c> * const M2D_payloads) = 0; |
|
109 |
|
110 /** |
|
111 * This function cancels query_network_and_device_parameters() query. |
|
112 * After this call AM must not complete related query. |
|
113 */ |
|
114 virtual eap_status_e cancel_query_network_and_device_parameters() = 0; |
|
115 |
|
116 //-------------------------------------------------- |
|
117 }; // class simple_config_am_services_c |
|
118 |
|
119 |
|
120 /** @file */ |
|
121 |
|
122 /** |
|
123 * This function creates a new instance of adaptation module of SIMPLE_CONFIG. |
|
124 * @param tools is pointer to the abs_eap_am_tools class created by the adaptation module. |
|
125 * Adaptation module of SIMPLE_CONFIG will callback caller using the partner pointer. |
|
126 */ |
|
127 EAP_C_FUNC_IMPORT simple_config_am_services_c *new_simple_config_am_services( |
|
128 abs_eap_am_tools_c * const tools); |
|
129 |
|
130 |
|
131 #endif //#if !defined(_SIMPLE_CONFIG_AM_SERVICES_H_) |
|
132 |
|
133 //-------------------------------------------------- |
|
134 |
|
135 |
|
136 |
|
137 // End. |