From: Kichan Kwon Date: Fri, 11 Aug 2017 05:07:56 +0000 (+0900) Subject: Enable Wi-Fi status X-Git-Tag: submit/tizen_4.0/20180207.021142^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_4.0_unified;p=platform%2Fcore%2Fapi%2Fruntime-info.git Enable Wi-Fi status - For backward-compatibility - Notice : this key is deprecated. Do not use this key Change-Id: I4322da7b3cbc5759146c47fe7286c8ddc268ddec Signed-off-by: Kichan Kwon --- diff --git a/include/runtime_info_private.h b/include/runtime_info_private.h index f46ad3a..17f6c28 100644 --- a/include/runtime_info_private.h +++ b/include/runtime_info_private.h @@ -38,6 +38,8 @@ extern "C" #define _D(fmt, arg...) LOGD("[%s,%d] "fmt, __FUNCTION__, __LINE__, ##arg) #define _I(fmt, arg...) LOGI("[%s,%d] "fmt, __FUNCTION__, __LINE__, ##arg) +#define RUNTIME_INFO_INTERNAL_KEY_WIFI_STATUS 1 + typedef enum { RUNTIME_INFO_DATA_TYPE_STRING, RUNTIME_INFO_DATA_TYPE_INT, diff --git a/src/runtime_info.c b/src/runtime_info.c index 237895b..e654397 100644 --- a/src/runtime_info.c +++ b/src/runtime_info.c @@ -53,6 +53,15 @@ typedef runtime_info_item_s * runtime_info_item_h; runtime_info_item_s runtime_info_item_table[] = { +{ + RUNTIME_INFO_INTERNAL_KEY_WIFI_STATUS, /**i = RUNTIME_INFO_WIFI_STATUS_DISABLED; + break; + + case VCONFKEY_WIFI_UNCONNECTED: + value->i = RUNTIME_INFO_WIFI_STATUS_UNCONNECTED; + break; + + case VCONFKEY_WIFI_CONNECTED: + case VCONFKEY_WIFI_TRANSFER: + value->i = RUNTIME_INFO_WIFI_STATUS_CONNECTED; + break; + + default: + return RUNTIME_INFO_ERROR_IO_ERROR; + } + + return ret; +} + +int runtime_info_wifi_status_set_event_cb() +{ + return runtime_info_vconf_set_event_cb(VCONF_WIFI_STATUS, RUNTIME_INFO_INTERNAL_KEY_WIFI_STATUS, 0); +} + +void runtime_info_wifi_status_unset_event_cb() +{ + runtime_info_vconf_unset_event_cb(VCONF_WIFI_STATUS, 0); +} + int runtime_info_bt_enabled_get_value(runtime_info_value_h value) { int vconf_value;