elementary appcore-common appcore-efl
ui-gadget-1
capi-appfw-application capi-appfw-app-manager evas ecore
- tapi bluetooth-api json-glib-1.0 capi-system-info capi-system-system-settings capi-network-bluetooth)
+ tapi bluetooth-api json-glib-1.0 capi-system-info capi-system-system-settings capi-network-bluetooth capi-network-wifi)
FOREACH(flag ${pkgs_about_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
// #define SUPPORT_FOTA
-#define SETTING_ABOUT_MACINFO_PATH "/opt/etc/.mac.info"
#define SETTING_ABOUT_POWER_SUPPLY_PATH "/sys/class/power_supply"
#define SETTING_ABOUT_BD_ADDR_PATH "/opt/etc/.bd_addr"
#define SETTING_ABOUT_STAT_PATH "/proc/stat"
//#include <bluetooth-api.h>
#include <bluetooth.h>
+#include <wifi.h>
#include <app_manager.h>
#include <system_info.h>
setting_retm_if(str == NULL, "str parameter is NULL");
setting_retm_if(size < SETTING_ABOUT_WIFI_MAC_STR_LEN+1, "size parameter is wrong");
- FILE *p = fopen(SETTING_ABOUT_MACINFO_PATH, "r");
+ char* mac_addr = NULL;
+ int status = wifi_get_mac_address(&mac_addr);
- if (p) {
- int size = fread(str, sizeof(char), SETTING_ABOUT_WIFI_MAC_STR_LEN, p);
- if (size != SETTING_ABOUT_WIFI_MAC_STR_LEN) {
- SETTING_TRACE_ERROR("fail to call fread");
- }
- fclose(p);
- p = NULL;
- } else {
- perror("open failed!");
+ if (mac_addr) {
+ safeCopyStr(str, mac_addr, SETTING_ABOUT_WIFI_MAC_STR_LEN);
+ free(mac_addr);
}
SETTING_TRACE_DEBUG("get_wifi_mac_address : %s", str);
- int wifi_state = VCONFKEY_WIFI_OFF;
- vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state);
-
- if((safeStrLen(str) == 0) || (wifi_state == VCONFKEY_WIFI_OFF))
+ if ((status != WIFI_ERROR_NONE) || (safeStrLen(str) == 0))
snprintf(str, size, "%s (%s)", _("IDS_ST_HEADER_UNAVAILABLE"), _(SETTING_ABOUT_NEVER_TURN_WIFI_ON_STR));
}