2 * Network Configuration Module
4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __NETCONFIG_WIFI_STATE_H__
21 #define __NETCONFIG_WIFI_STATE_H__
30 NETCONFIG_WIFI_UNKNOWN = 0x00,
31 NETCONFIG_WIFI_IDLE = 0x01,
32 NETCONFIG_WIFI_ASSOCIATION = 0x02,
33 NETCONFIG_WIFI_CONFIGURATION = 0x03,
34 NETCONFIG_WIFI_CONNECTED = 0x04,
35 NETCONFIG_WIFI_FAILURE = 0x05,
36 } wifi_service_state_e;
39 NETCONFIG_WIFI_TECH_UNKNOWN = 0x00,
40 NETCONFIG_WIFI_TECH_OFF = 0x01,
41 NETCONFIG_WIFI_TECH_WPS_ONLY = 0x02,
42 NETCONFIG_WIFI_TECH_POWERED = 0x03,
43 NETCONFIG_WIFI_TECH_CONNECTED = 0x04,
44 NETCONFIG_WIFI_TECH_TETHERED = 0x05,
48 void (*wifi_state_changed)(wifi_service_state_e, void *user_data);
50 } wifi_state_notifier;
52 #define VCONF_WIFI_LAST_POWER_STATE "file/private/wifi/last_power_state"
54 void wifi_state_update_power_state(gboolean powered);
55 void wifi_state_emit_power_completed(gboolean power_on);
56 void wifi_state_emit_power_failed(void);
58 char *wifi_get_favorite_service(void);
59 void wifi_start_timer_network_notification(void);
61 void wifi_state_notifier_register(wifi_state_notifier *notifier);
62 void wifi_state_notifier_unregister(wifi_state_notifier *notifier);
63 void wifi_state_notifier_cleanup(void);
65 void wifi_state_set_bss_found(gboolean found);
66 gboolean wifi_state_is_bss_found(void);
68 void wifi_state_set_service_state(wifi_service_state_e new_state);
69 wifi_service_state_e wifi_state_get_service_state(void);
71 void wifi_state_set_tech_state(wifi_tech_state_e new_state);
72 wifi_tech_state_e wifi_state_get_technology_state(void);
73 gboolean wifi_state_is_technology_available(void);
75 void wifi_state_set_connected_essid(void);
76 void wifi_state_get_connected_essid(gchar **essid);
78 gboolean handle_get_wifi_state(Wifi *wifi, GDBusMethodInvocation *context);
80 char *_convert_wifi_technology_state_to_string(wifi_tech_state_e wifi_tech_state_type);
81 char *_convert_wifi_service_state_to_string(wifi_service_state_e wifi_service_state_type);
88 #endif /* __NETCONFIG_WIFI_STATE_H__ */