|
1 /* |
|
2 * Copyright (c) 2006-2009 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: Statemachine for handling received neighbor response. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CORE_OPERATION_HANDLE_NEIGHBOR_RESPONSE_H |
|
20 #define CORE_OPERATION_HANDLE_NEIGHBOR_RESPONSE_H |
|
21 |
|
22 #include "core_operation_base.h" |
|
23 #include "core_type_list.h" |
|
24 #include "core_frame_nr_ie.h" |
|
25 #include "core_frame_mgmt_ie.h" |
|
26 |
|
27 // forward declarations |
|
28 class core_frame_action_nr_c; |
|
29 class core_frame_dot11_ie_c; |
|
30 class core_frame_action_c; |
|
31 |
|
32 /** |
|
33 * Statemachine for handling received neighbor response. |
|
34 * |
|
35 * @lib wlmserversrv.lib |
|
36 * @since S60 v5.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS( core_operation_handle_neighbor_response_c ) : public core_operation_base_c |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * The possible states of the operation. |
|
45 */ |
|
46 enum core_state_e |
|
47 { |
|
48 core_state_init = core_base_state_next, |
|
49 core_state_ies_stored, |
|
50 core_state_return_erroneous_frame, |
|
51 core_state_get_next_ie, |
|
52 core_state_process_current_ie, |
|
53 core_state_operation_finished, |
|
54 core_base_state_parameters_set, |
|
55 core_state_MAX |
|
56 }; |
|
57 |
|
58 /** |
|
59 * Constructor. |
|
60 */ |
|
61 core_operation_handle_neighbor_response_c( |
|
62 u32_t request_id, |
|
63 core_server_c* server, |
|
64 abs_core_driverif_c* drivers, |
|
65 abs_core_server_callback_c* adaptation, |
|
66 core_frame_action_nr_c* neighbor_response ); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 virtual ~core_operation_handle_neighbor_response_c(); |
|
72 |
|
73 protected: |
|
74 |
|
75 /** |
|
76 * This method is called when a pending request has been completed |
|
77 * and so sub-operations are pending. |
|
78 * |
|
79 * @since S60 v5.2 |
|
80 * @return status of the operation: |
|
81 * core_error_request_pending if the operation is not finished, |
|
82 * otherwise the status code of the finished operation |
|
83 */ |
|
84 core_error_e next_state(); |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * This method parses the received neighbor response IE. |
|
90 * |
|
91 * @since S60 v5.2 |
|
92 * @param ie Reference to the received neighbor response IE |
|
93 */ |
|
94 void parse( core_frame_dot11_ie_c* ie ); |
|
95 |
|
96 private: // data |
|
97 |
|
98 /** |
|
99 * The received Neighbor Response frame. |
|
100 */ |
|
101 core_frame_action_nr_c* neighbor_response_m; |
|
102 |
|
103 /** |
|
104 * List of IEs included in the received Neighbor Response |
|
105 */ |
|
106 core_type_list_c<core_frame_dot11_ie_c> ie_list_m; |
|
107 |
|
108 /** |
|
109 * Reference to IE currently under processing. |
|
110 */ |
|
111 core_frame_dot11_ie_c* current_ie_m; |
|
112 |
|
113 /** Parser for Neighbor Response IE. */ |
|
114 core_frame_nr_ie_c* neighbor_resp_parser_m; |
|
115 |
|
116 }; |
|
117 |
|
118 #endif // CORE_OPERATION_HANDLE_NEIGHBOR_RESPONSE_H |