|
1 /* |
|
2 * Copyright (c) 2005-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 requesting RCPI values for roaming. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CORE_OPERATION_CHECK_RCPI_H |
|
20 #define CORE_OPERATION_CHECK_RCPI_H |
|
21 |
|
22 #include "core_operation_base.h" |
|
23 |
|
24 /** |
|
25 * Statemachine for requesting RCPI values for roaming. |
|
26 * |
|
27 * @lib wlmserversrv.lib |
|
28 * @since S60 v3.1 |
|
29 */ |
|
30 NONSHARABLE_CLASS( core_operation_check_rcpi_c ) : public core_operation_base_c |
|
31 { |
|
32 |
|
33 public: |
|
34 |
|
35 enum core_state_e |
|
36 { |
|
37 core_state_init = core_base_state_next, |
|
38 core_state_rcpi_received, |
|
39 core_state_scan_start, |
|
40 core_state_scan_complete, |
|
41 core_state_connect_success, |
|
42 core_state_connect_failure, |
|
43 core_state_rcpi_trigger, |
|
44 core_state_MAX |
|
45 }; |
|
46 |
|
47 /** |
|
48 * Defines the possible reasons for running the RCPI check operation. |
|
49 */ |
|
50 enum core_rcpi_check_reason_e |
|
51 { |
|
52 /** The operation has been triggered by a polling timer. */ |
|
53 core_rcpi_check_reason_timer, |
|
54 /** The operation has been triggered by an RCPI trigger indication. */ |
|
55 core_rcpi_check_reason_rcpi_trigger, |
|
56 /** The operation has been triggered by a signal loss prediction indication. */ |
|
57 core_rcpi_check_reason_signal_loss_prediction |
|
58 }; |
|
59 |
|
60 core_operation_check_rcpi_c( |
|
61 u32_t request_id, |
|
62 core_server_c* server, |
|
63 abs_core_driverif_c* drivers, |
|
64 abs_core_server_callback_c* adaptation, |
|
65 core_rcpi_check_reason_e reason ); |
|
66 |
|
67 virtual ~core_operation_check_rcpi_c(); |
|
68 |
|
69 protected: |
|
70 |
|
71 /** |
|
72 * This method is called when a pending request has been completed |
|
73 * and so sub-operations are pending. |
|
74 * |
|
75 * @since S60 v3.1 |
|
76 * @return status of the operation: |
|
77 * core_error_request_pending if the operation is not finished, |
|
78 * otherwise the status code of the finished operation |
|
79 */ |
|
80 core_error_e next_state(); |
|
81 |
|
82 /** |
|
83 * This method is called when the operation needs to be canceled. |
|
84 * |
|
85 * @since S60 v3.1 |
|
86 * @return status of the operation: |
|
87 * core_error_request_pending if the operation is not finished, |
|
88 * otherwise the status code of the finished operation |
|
89 */ |
|
90 core_error_e cancel(); |
|
91 |
|
92 private: // data |
|
93 |
|
94 /** |
|
95 * The reason the operation was started. |
|
96 */ |
|
97 core_rcpi_check_reason_e reason_m; |
|
98 |
|
99 /** |
|
100 * Current RCPI value. |
|
101 */ |
|
102 u32_t current_rcpi_m; |
|
103 |
|
104 /** |
|
105 * Whether we are still connected to the AP after the roam attempt. |
|
106 */ |
|
107 bool_t is_connected_m; |
|
108 |
|
109 }; |
|
110 |
|
111 #endif // CORE_OPERATION_CHECK_RCPI_H |