DLog macro is changed
authorKim Gibyoung <lastkgb.kim@samsung.com>
Tue, 18 Dec 2012 10:45:14 +0000 (19:45 +0900)
committerKim Gibyoung <lastkgb.kim@samsung.com>
Tue, 18 Dec 2012 11:40:35 +0000 (20:40 +0900)
Change-Id: I1a51fa83335851bb7e4c0c265a6ad9883e274146

19 files changed:
debian/changelog
packaging/libug-setting-wifidirect-efl.spec
popup-wifidirect/CMakeLists.txt
popup-wifidirect/include/wfd-app-util.h
popup-wifidirect/src/wfd-app-client.c
popup-wifidirect/src/wfd-app-main.c
popup-wifidirect/src/wfd-app-popup-view.c
ug-wifidirect/CMakeLists.txt
ug-wifidirect/include/wfd_ug.h
ug-wifidirect/src/wfd_client.c
ug-wifidirect/src/wfd_ug.c
ug-wifidirect/src/wfd_ug_about_view.c [changed mode: 0644->0755]
ug-wifidirect/src/wfd_ug_genlist.c
ug-wifidirect/src/wfd_ug_main_view.c
ug-wifidirect/src/wfd_ug_multiconnect_view.c
ug-wifidirect/src/wfd_ug_popup.c
ugapp-wifidirect/CMakeLists.txt
ugapp-wifidirect/include/wfd-ugapp-util.h
ugapp-wifidirect/src/wfd-ugapp-main.c

index 818dbf3..cde7af4 100755 (executable)
@@ -1,3 +1,11 @@
+ug-setting-wifidirect-efl (1.0.2) precise; urgency=low
+
+  * DLog macro is changed
+  * Git: rsa/apps/home/ug-wifi-direct
+  * Tag: libug-setting-wifidirect-efl_1.0.2
+
+ -- Gibyoung Kim <laskgb.kim@samsung.com>  Tue, 18 Dec 2012 19:41:03 +0900
+
 ug-setting-wifidirect-efl (1.0.1) precise; urgency=low
 
   * Applied EFL code and winset changes
index 200dc20..85b4bb6 100755 (executable)
@@ -3,7 +3,7 @@
 
 Name:       libug-setting-wifidirect-efl
 Summary:    Wi-Fi Direct setting UI gadget 
-Version:    1.0.1
+Version:    1.0.2
 Release:    1
 Group:      TO_BE_FILLED
 License:    Samsung Proprietary License
index 9a81a60..d2654ec 100755 (executable)
@@ -18,8 +18,7 @@ SET(SRCS
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
-
-SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -DVITA_FEATURE")
+SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -DUSE_DLOG")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_C_FLAGS_RELEASE "-O2")
 
index bff8201..e2f6d2f 100755 (executable)
 
 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
-
-#ifdef VITA_FEATURE
-#include <dlog.h>
-
-#define WIFI_DIRECT_APP_MID            "wfd-app"
-
-#define WFD_APP_LOG_LOW                LOG_VERBOSE
-#define WFD_APP_LOG_HIGH               LOG_INFO
-#define WFD_APP_LOG_ERROR              LOG_ERROR
-#define WFD_APP_LOG_WARN               LOG_WARN
-#define WFD_APP_LOG_ASSERT             LOG_FATAL
-#define WFD_APP_LOG_EXCEPTION  LOG_FATAL
 #define WFD_MAX_SIZE            128
 #define WFD_MAC_ADDRESS_SIZE    18
 
-char *wfd_app_trim_path(const char *filewithpath);
-int wfd_app_gettid();
-
-#define WFD_APP_LOG(log_level, format, args...) \
-       LOG(log_level, WIFI_DIRECT_APP_MID, "[%s:%04d,%d] " format, wfd_app_trim_path(__FILE__),  __LINE__, wfd_app_gettid(), ##args)
-#define __WFD_APP_FUNC_ENTER__ LOG(LOG_VERBOSE,  WIFI_DIRECT_APP_MID, "[%s:%04d,%d] Enter: %s()\n", wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), __func__)
-#define __WFD_APP_FUNC_EXIT__  LOG(LOG_VERBOSE,  WIFI_DIRECT_APP_MID, "[%s:%04d,%d] Quit: %s()\n", wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), __func__)
-
-#else /** _DLOG_UTIL */
-
-#define WFD_APP_LOG(log_level, format, args...) printf("[%s:%04d,%d] " format, wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), ##args)
-#define __WFD_APP_FUNC_ENTER__ printf("[%s:%04d,%d] Entering: %s()\n", wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), __func__)
-#define __WFD_APP_FUNC_EXIT__  printf("[%s:%04d,%d] Quit: %s()\n", wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), __func__)
+#ifdef USE_DLOG
+#include <dlog.h>
 
-#endif /** _USE_DLOG_UTIL */
+#undef LOG_TAG
+#define LOG_TAG "WIFI_DIRECT_POPUP"
 
+#define WDPOP_LOGV(format, args...) LOGV(format, ##args)
+#define WDPOP_LOGD(format, args...) LOGD(format, ##args)
+#define WDPOP_LOGI(format, args...) LOGI(format, ##args)
+#define WDPOP_LOGW(format, args...) LOGW(format, ##args)
+#define WDPOP_LOGE(format, args...) LOGE(format, ##args)
+#define WDPOP_LOGF(format, args...) LOGF(format, ##args)
 
+#define __WDPOP_LOG_FUNC_ENTER__ LOGV("Enter")
+#define __WDPOP_LOG_FUNC_EXIT__ LOGV("Quit")
 
-#define assertm_if(expr, fmt, arg...) do { \
+#define assertm_if(expr, fmt, args...) do { \
        if (expr) { \
-         WFD_APP_LOG(WFD_APP_LOG_ASSERT, " ##(%s) -> %s() assert!!## "fmt, #expr, __FUNCTION__, ##arg); \
+         WDPOP_LOGF(" ##(%s) -> assert!!## "fmt, #expr, ##args); \
                 exit(1); \
        } \
 } while (0)
 
+#else /** _DLOG_UTIL */
 
+#define WDPOP_LOGV(format, args...) \
+       printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDPOP_LOGD(format, args...) \
+       printf("[D/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDPOP_LOGI(format, args...) \
+       printf("[I/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDPOP_LOGW(format, args...) \
+       printf("[W/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDPOP_LOGE(format, args...) \
+       printf("[E/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDPOP_LOGF(format, args...) \
+       printf("[F/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+
+#define __WDPOP_LOG_FUNC_ENTER__ \
+       printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> Enter", __FILE__, __FUNCTION__, __LINE__)
+#define __WDPOP_LOG_FUNC_EXIT__ \
+       printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> Exit", __FILE__, __FUNCTION__, __LINE__)
+
+#endif /** _DLOG_UTIL */
 
 #endif /* __WFD_APP_UTIL_H__ */
index c198110..41e258b 100755 (executable)
  */
 bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        wfd_appdata_t *ad = (wfd_appdata_t *) user_data;
        if (NULL == ad || NULL == peer || NULL == peer->device_name || NULL == peer->mac_address) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "NULL parameters.\n");
+               WDPOP_LOGD( "NULL parameters.\n");
                return FALSE;
        }
 
        int peer_cnt = ad->raw_connected_peer_cnt;
-       WFD_APP_LOG(WFD_APP_LOG_LOW, "%dth connected peer. [%s]\n", peer_cnt, peer->device_name);
+       WDPOP_LOGD( "%dth connected peer. [%s]\n", peer_cnt, peer->device_name);
 
        strncpy(ad->raw_connected_peers[peer_cnt].ssid, peer->device_name, sizeof(ad->raw_connected_peers[peer_cnt].ssid));
        strncpy(ad->raw_connected_peers[peer_cnt].mac_address, peer->mac_address, WFD_MAC_ADDRESS_SIZE);
-       WFD_APP_LOG(WFD_APP_LOG_LOW, "\tSSID: [%s]\n", ad->raw_connected_peers[peer_cnt].ssid);
+       WDPOP_LOGD( "\tSSID: [%s]\n", ad->raw_connected_peers[peer_cnt].ssid);
        ad->raw_connected_peer_cnt++;
 
        free(peer->device_name);
        free(peer->mac_address);
        free(peer);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return TRUE;
 }
 
@@ -72,11 +72,11 @@ bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_
  */
 int _wfd_app_get_connected_peers(void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        wfd_appdata_t *ad = (wfd_appdata_t *) user_data;
        if (NULL == ad) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "NULL parameters.\n");
+               WDPOP_LOGD( "NULL parameters.\n");
                return -1;
        }
 
@@ -86,10 +86,10 @@ int _wfd_app_get_connected_peers(void *user_data)
        res = wifi_direct_foreach_connected_peers(_wfd_connected_peer_cb, (void *)ad);
        if (res != WIFI_DIRECT_ERROR_NONE) {
                ad->raw_connected_peer_cnt = 0;
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Get connected peer failed: %d\n", res);
+               WDPOP_LOGD( "Get connected peer failed: %d\n", res);
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -99,17 +99,17 @@ int _wfd_app_get_connected_peers(void *user_data)
  */
 void _del_wfd_notification()
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        /* delete the notification */
        notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
        noti_err  = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_delete_all_by_type.(%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_delete_all_by_type.(%d)\n", noti_err);
                return;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -119,11 +119,11 @@ void _del_wfd_notification()
  */
 void _add_wfd_peers_connected_notification(void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        wfd_appdata_t *ad = (wfd_appdata_t *) user_data;
        if (NULL == ad || NULL == ad->noti) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "NULL parameters.\n");
+               WDPOP_LOGD( "NULL parameters.\n");
                return;
        }
 
@@ -136,7 +136,7 @@ void _add_wfd_peers_connected_notification(void *user_data)
        /* set the icon */
        noti_err = notification_set_image(ad->noti, NOTIFICATION_IMAGE_TYPE_ICON,  RESDIR"/images/A09_notification_icon.png");
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_set_image. (%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_set_image. (%d)\n", noti_err);
                return;
        }
 
@@ -145,14 +145,14 @@ void _add_wfd_peers_connected_notification(void *user_data)
        snprintf(msg, WFD_MAX_SIZE, "Connected with %d devices via Wi-Fi Direct", ad->raw_connected_peer_cnt);
        noti_err = notification_set_text(ad->noti, NOTIFICATION_TEXT_TYPE_TITLE, msg, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_set_text. (%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_set_text. (%d)\n", noti_err);
                return;
        }
 
        noti_err = notification_set_text(ad->noti, NOTIFICATION_TEXT_TYPE_CONTENT,
                "Tap to change settings", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_set_text. (%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_set_text. (%d)\n", noti_err);
                return;
        }
 
@@ -164,7 +164,7 @@ void _add_wfd_peers_connected_notification(void *user_data)
        int res = NOTIFICATION_ERROR_NONE;
        res = notification_set_execute_option(ad->noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, /*Button Text*/NULL, NULL, b);
        if (res != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Failed to notification_set_execute_option. [%d]", res);
+               WDPOP_LOGD( "Failed to notification_set_execute_option. [%d]", res);
                return;
        }
 
@@ -173,18 +173,18 @@ void _add_wfd_peers_connected_notification(void *user_data)
        /* set display application list */
        noti_err = notification_set_display_applist(ad->noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_set_display_applist : %d\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_set_display_applist : %d\n", noti_err);
                return;
        }
 
        /* notify the quick panel */
        noti_err = notification_insert(ad->noti, NULL);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_insert.(%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_insert.(%d)\n", noti_err);
                return;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -194,11 +194,11 @@ void _add_wfd_peers_connected_notification(void *user_data)
  */
 void _add_wfd_turn_off_notification(void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        wfd_appdata_t *ad = (wfd_appdata_t *) user_data;
        if (NULL == ad || NULL == ad->noti) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "NULL parameters.\n");
+               WDPOP_LOGD( "NULL parameters.\n");
                return;
        }
 
@@ -210,7 +210,7 @@ void _add_wfd_turn_off_notification(void *user_data)
        /* set the icon */
        noti_err = notification_set_image(ad->noti, NOTIFICATION_IMAGE_TYPE_ICON,  RESDIR"/images/A09_notification_icon.png");
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_set_image. (%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_set_image. (%d)\n", noti_err);
                return;
        }
 
@@ -218,14 +218,14 @@ void _add_wfd_turn_off_notification(void *user_data)
        noti_err = notification_set_text(ad->noti, NOTIFICATION_TEXT_TYPE_TITLE,
                "Disable Wi-Fi Direct after use", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_set_text. (%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_set_text. (%d)\n", noti_err);
                return;
        }
 
        noti_err = notification_set_text(ad->noti, NOTIFICATION_TEXT_TYPE_CONTENT,
                "Disable Wi-Fi Direct after use to save battery", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_set_text. (%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_set_text. (%d)\n", noti_err);
                return;
        }
 
@@ -237,7 +237,7 @@ void _add_wfd_turn_off_notification(void *user_data)
        int res = NOTIFICATION_ERROR_NONE;
        res = notification_set_execute_option(ad->noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, /*Button Text*/NULL, NULL, b);
        if (res != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Failed to notification_set_execute_option. [%d]", res);
+               WDPOP_LOGD( "Failed to notification_set_execute_option. [%d]", res);
                return;
        }
 
@@ -246,18 +246,18 @@ void _add_wfd_turn_off_notification(void *user_data)
        /* set display application list */
        noti_err = notification_set_display_applist(ad->noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_set_display_applist : %d\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_set_display_applist : %d\n", noti_err);
                return;
        }
 
        /* notify the quick panel */
        noti_err = notification_insert(ad->noti, NULL);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_insert.(%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_insert.(%d)\n", noti_err);
                return;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -272,7 +272,7 @@ static Eina_Bool _wfd_automatic_deactivated_for_connection_cb(void *user_data)
        wfd_appdata_t *ad = (wfd_appdata_t *)user_data;
 
        if (NULL == ad) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "NULL parameters.\n");
+               WDPOP_LOGD( "NULL parameters.\n");
                return ECORE_CALLBACK_CANCEL;
        }
 
@@ -284,17 +284,17 @@ static Eina_Bool _wfd_automatic_deactivated_for_connection_cb(void *user_data)
 
        /* get transfer state */
        if (vconf_get_int(VCONFKEY_WIFI_DIRECT_TRANSFER_STATE, &wfd_transfer_state) < 0) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Error reading vconf (%s)\n",
+               WDPOP_LOGD( "Error reading vconf (%s)\n",
                        VCONFKEY_WIFI_DIRECT_TRANSFER_STATE);
                return ECORE_CALLBACK_CANCEL;
        }
 
        /* show tickernoti*/
        if (wfd_transfer_state > VCONFKEY_WIFI_DIRECT_TRANSFER_START) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "No RX/TX packet, turn off WFD automatically.\n");
+               WDPOP_LOGD( "No RX/TX packet, turn off WFD automatically.\n");
                _add_wfd_turn_off_notification(ad);
        } else {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Has RX/TX packet, restart.\n");
+               WDPOP_LOGD( "Has RX/TX packet, restart.\n");
                ad->last_wfd_transmit_time = time(NULL);
                return ECORE_CALLBACK_RENEW;
        }
@@ -311,17 +311,17 @@ static Eina_Bool _wfd_automatic_deactivated_for_connection_cb(void *user_data)
  */
 void _cb_activation(int error_code, wifi_direct_device_state_e device_state, void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = (wfd_appdata_t *)user_data;
 
        switch (device_state) {
        case WIFI_DIRECT_DEVICE_STATE_ACTIVATED:
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_DEVICE_STATE_ACTIVATED\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_DEVICE_STATE_ACTIVATED\n");
                break;
 
        case WIFI_DIRECT_DEVICE_STATE_DEACTIVATED:
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_DEVICE_STATE_DEACTIVATED\n");
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Termination process of wifi-direct popup begins...\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_DEVICE_STATE_DEACTIVATED\n");
+               WDPOP_LOGD( "Termination process of wifi-direct popup begins...\n");
 
                /* when deactivated, stop the timer */
                if (ad->transmit_timer) {
@@ -336,7 +336,7 @@ void _cb_activation(int error_code, wifi_direct_device_state_e device_state, voi
                break;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -347,28 +347,28 @@ void _cb_activation(int error_code, wifi_direct_device_state_e device_state, voi
  */
 static wfd_device_info_t *_wfd_app_find_peer_by_mac_address(void *data, const char *mac_address)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = (wfd_appdata_t *) data;
        int i;
 
        if (ad == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Incorrect parameter(NULL)\n");
+               WDPOP_LOGD( "Incorrect parameter(NULL)\n");
                return NULL;
        }
 
-       WFD_APP_LOG(WFD_APP_LOG_LOW, "find peer by MAC [%s] \n", mac_address);
+       WDPOP_LOGD( "find peer by MAC [%s] \n", mac_address);
 
        for (i = 0; i < ad->discovered_peer_count; i++) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "check %dth peer\n", i);
+               WDPOP_LOGD( "check %dth peer\n", i);
 
                if (!strncmp(mac_address, (const char *) ad->discovered_peers[i].mac_address, 18)) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "found peer. [%d]\n", i);
-                       __WFD_APP_FUNC_EXIT__;
+                       WDPOP_LOGD( "found peer. [%d]\n", i);
+                       __WDPOP_LOG_FUNC_EXIT__;
                        return &ad->discovered_peers[i];
                }
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -380,26 +380,26 @@ static wfd_device_info_t *_wfd_app_find_peer_by_mac_address(void *data, const ch
  */
 bool _wfd_app_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = (wfd_appdata_t *) user_data;
 
        if (NULL != peer->device_name) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "discovered peer ssid[%s]\n", peer->device_name);
+               WDPOP_LOGD( "discovered peer ssid[%s]\n", peer->device_name);
                strncpy(ad->discovered_peers[ad->discovered_peer_count].ssid, peer->device_name, 32);
        } else {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "peer's device name is NULL\n");
+               WDPOP_LOGD( "peer's device name is NULL\n");
        }
 
        if (NULL != peer->mac_address) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "discovered peer mac[%s]\n", peer->mac_address);
+               WDPOP_LOGD( "discovered peer mac[%s]\n", peer->mac_address);
                strncpy(ad->discovered_peers[ad->discovered_peer_count].mac_address, peer->mac_address, 18);
        } else {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "peer's mac is NULL\n");
+               WDPOP_LOGD( "peer's mac is NULL\n");
        }
 
        ad->discovered_peer_count++;
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return TRUE;
 
 }
@@ -413,25 +413,25 @@ bool _wfd_app_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *
  */
 void _cb_discover(int error_code, wifi_direct_discovery_state_e discovery_state, void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = (wfd_appdata_t *)user_data;
        int ret;
 
        switch (discovery_state) {
        case WIFI_DIRECT_DISCOVERY_STARTED:
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_DISCOVERY_STARTED\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_DISCOVERY_STARTED\n");
                break;
 
        case WIFI_DIRECT_ONLY_LISTEN_STARTED:
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_ONLY_LISTEN_STARTED\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_ONLY_LISTEN_STARTED\n");
                break;
 
        case WIFI_DIRECT_DISCOVERY_FINISHED:
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_DISCOVERY_FINISHED\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_DISCOVERY_FINISHED\n");
                break;
 
        case WIFI_DIRECT_DISCOVERY_FOUND:
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_DISCOVERY_FOUND\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_DISCOVERY_FOUND\n");
 
                if (NULL != ad->discovered_peers) {
                        free(ad->discovered_peers);
@@ -443,7 +443,7 @@ void _cb_discover(int error_code, wifi_direct_discovery_state_e discovery_state,
 
                ret = wifi_direct_foreach_discovered_peers(_wfd_app_discoverd_peer_cb, (void *) ad);
                if (ret != WIFI_DIRECT_ERROR_NONE) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "get discovery result failed: %d\n", ret);
+                       WDPOP_LOGD( "get discovery result failed: %d\n", ret);
                }
                break;
 
@@ -451,7 +451,7 @@ void _cb_discover(int error_code, wifi_direct_discovery_state_e discovery_state,
                break;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -464,7 +464,7 @@ void _cb_discover(int error_code, wifi_direct_discovery_state_e discovery_state,
  */
 void _cb_connection(int error_code, wifi_direct_connection_state_e connection_state, const char *mac_address, void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        wfd_appdata_t *ad = (wfd_appdata_t *)user_data;
        int result = -1;
@@ -473,7 +473,7 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
 
        /* find the peer's name by the mac address */
        if (NULL == mac_address) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "ERROR : mac address is NULL !!\n");
+               WDPOP_LOGE("ERROR : mac address is NULL !!\n");
                return;
        }
 
@@ -485,11 +485,11 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
                peer_info = _wfd_app_find_peer_by_mac_address(ad, mac_address);
 
                if (NULL == peer_info) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "peer_info is NULL !!\n");
+                       WDPOP_LOGD( "peer_info is NULL !!\n");
                } else if (0 == strlen(peer_info->ssid)) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "SSID from connection is invalid !!\n");
+                       WDPOP_LOGD( "SSID from connection is invalid !!\n");
                } else {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "SSID from connection is %s.\n", peer_info->ssid);
+                       WDPOP_LOGD( "SSID from connection is %s.\n", peer_info->ssid);
                        strncpy(ad->peer_name, peer_info->ssid, strlen(peer_info->ssid));
                }
 
@@ -501,11 +501,11 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
        switch (connection_state) {
        case WIFI_DIRECT_CONNECTION_RSP:
        {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_CONNECTION_RSP\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_CONNECTION_RSP\n");
                wfd_destroy_popup();
 
                if (error_code == WIFI_DIRECT_ERROR_NONE) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "Link Complete!\n");
+                       WDPOP_LOGD( "Link Complete!\n");
 
                        /* add connected notification */
                        _add_wfd_peers_connected_notification(ad);
@@ -515,13 +515,13 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
                        wfd_tickernoti_popup(msg);
                } else {
                        if (error_code == WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT) {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW,
+                               WDPOP_LOGD(
                                                "Error Code - WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT\n");
                        } else if (error_code == WIFI_DIRECT_ERROR_AUTH_FAILED) {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW,
+                               WDPOP_LOGD(
                                                "Error Code - WIFI_DIRECT_ERROR_AUTH_FAILED\n");
                        } else if (error_code == WIFI_DIRECT_ERROR_CONNECTION_FAILED) {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW,
+                               WDPOP_LOGD(
                                                "Error Code - WIFI_DIRECT_ERROR_CONNECTION_FAILED\n");
                        }
 
@@ -538,26 +538,26 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
 
                memcpy(ad->peer_mac, mac_address, sizeof(ad->peer_mac));
 
-               WFD_APP_LOG(WFD_APP_LOG_LOW,
+               WDPOP_LOGD(
                                "event ------------------ WIFI_DIRECT_CONNECTION_WPS_REQ\n");
                result = wifi_direct_get_wps_type(&wps_mode);
-               WFD_APP_LOG(WFD_APP_LOG_LOW,
+               WDPOP_LOGD(
                                "wifi_direct_get_wps_type() result=[%d]\n", result);
 
                if (wps_mode == WIFI_DIRECT_WPS_TYPE_PBC) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW,
+                       WDPOP_LOGD(
                                        "wps_config is WIFI_DIRECT_WPS_TYPE_PBC. Ignore it..\n");
                } else if (wps_mode == WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD) {
                        char *pin;
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "wps_config is WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD\n");
+                       WDPOP_LOGD( "wps_config is WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD\n");
 
                        if (wifi_direct_generate_wps_pin() != WIFI_DIRECT_ERROR_NONE) {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW, "wifi_direct_generate_wps_pin() is failed\n");
+                               WDPOP_LOGD( "wifi_direct_generate_wps_pin() is failed\n");
                                return;
                        }
 
                        if (wifi_direct_get_wps_pin(&pin) != WIFI_DIRECT_ERROR_NONE) {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW, "wifi_direct_generate_wps_pin() is failed\n");
+                               WDPOP_LOGD( "wifi_direct_generate_wps_pin() is failed\n");
                                return;
                        }
 
@@ -565,14 +565,14 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
                        free(pin);
                        pin = NULL;
 
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "pin=[%s]\n", ad->pin_number);
+                       WDPOP_LOGD( "pin=[%s]\n", ad->pin_number);
 
                        wfd_prepare_popup(WFD_POP_PROG_CONNECT_WITH_PIN, NULL);
                } else if (wps_mode == WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "wps_config is WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY\n");
+                       WDPOP_LOGD( "wps_config is WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY\n");
                        wfd_prepare_popup(WFD_POP_PROG_CONNECT_WITH_KEYPAD, (void *) NULL);
                } else {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "wps_config is unkown!\n");
+                       WDPOP_LOGD( "wps_config is unkown!\n");
 
                }
        }
@@ -580,32 +580,32 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
 
        case WIFI_DIRECT_CONNECTION_REQ:
        {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_CONNECTION_REQ\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_CONNECTION_REQ\n");
 
                wifi_direct_wps_type_e wps_mode;
                bool auto_connection_mode;
 
                result = wifi_direct_get_wps_type(&wps_mode);
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "wifi_direct_get_wps_type() result=[%d]\n", result);
+               WDPOP_LOGD( "wifi_direct_get_wps_type() result=[%d]\n", result);
 
                result = wifi_direct_is_autoconnection_mode(&auto_connection_mode);
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "wifi_direct_is_autoconnection_mode() result=[%d]\n", result);
+               WDPOP_LOGD( "wifi_direct_is_autoconnection_mode() result=[%d]\n", result);
 
                if (auto_connection_mode == TRUE) {
                        result = wifi_direct_accept_connection(ad->peer_mac);
                        printf("wifi_direct_accept_connection() result=[%d]\n", result);
                } else {
                        if (wps_mode == WIFI_DIRECT_WPS_TYPE_PBC) {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW, "wps_config is WIFI_DIRECT_WPS_TYPE_PBC\n");
+                               WDPOP_LOGD( "wps_config is WIFI_DIRECT_WPS_TYPE_PBC\n");
                                wfd_prepare_popup(WFD_POP_APRV_CONNECTION_WPS_PUSHBUTTON_REQ, NULL);
                        } else if (wps_mode == WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY) {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW, "wps_config is WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY\n");
+                               WDPOP_LOGD( "wps_config is WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY\n");
                                wfd_prepare_popup(WFD_POP_APRV_CONNECTION_WPS_DISPLAY_REQ, NULL);
                        } else if (wps_mode == WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD) {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW, "wps_config is WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD\n");
+                               WDPOP_LOGD( "wps_config is WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD\n");
                                wfd_prepare_popup(WFD_POP_APRV_CONNECTION_WPS_KEYPAD_REQ, (void *) NULL);
                        } else {
-                               WFD_APP_LOG(WFD_APP_LOG_LOW, "wps_config is unkown!\n");
+                               WDPOP_LOGD( "wps_config is unkown!\n");
                        }
                }
        }
@@ -614,10 +614,10 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
        case WIFI_DIRECT_DISCONNECTION_IND:
        {
                _del_wfd_notification();
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_DISCONNECTION_IND\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_DISCONNECTION_IND\n");
 
                result = wifi_direct_set_autoconnection_mode(false);
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "wifi_direct_set_autoconnection_mode() result=[%d]\n", result);
+               WDPOP_LOGD( "wifi_direct_set_autoconnection_mode() result=[%d]\n", result);
 
                /* tickernoti popup */
                snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_DISCONNECTED, ad->peer_name);
@@ -631,7 +631,7 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
                wfd_destroy_popup();
 
                result = wifi_direct_set_autoconnection_mode(false);
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "wifi_direct_set_autoconnection_mode() result=[%d]\n", result);
+               WDPOP_LOGD( "wifi_direct_set_autoconnection_mode() result=[%d]\n", result);
 
                /* tickernoti popup */
                snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_DISCONNECTED, ad->peer_name);
@@ -640,7 +640,7 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
        break;
        case WIFI_DIRECT_CONNECTION_IN_PROGRESS:
        {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "event ------------------ WIFI_DIRECT_CONNECTION_IN_PROGRESS\n");
+               WDPOP_LOGD( "event ------------------ WIFI_DIRECT_CONNECTION_IN_PROGRESS\n");
                /* tickernoti popup */
                wfd_tickernoti_popup(_("IDS_WFD_POP_CONNECTING"));
        }
@@ -651,7 +651,7 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
 
        /* if connected, start the transmit timer */
        wifi_direct_get_state(&ad->wfd_status);
-       WFD_APP_LOG(WFD_APP_LOG_LOW, "status: %d", ad->wfd_status);
+       WDPOP_LOGD( "status: %d", ad->wfd_status);
 
        if (ad->wfd_status < WIFI_DIRECT_STATE_CONNECTED) {
            if (ad->transmit_timer) {
@@ -660,14 +660,14 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
            }
        } else {
                if (NULL == ad->transmit_timer) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "start the transmit timer\n");
+                       WDPOP_LOGD( "start the transmit timer\n");
                        ad->last_wfd_transmit_time = time(NULL);
                        ad->transmit_timer = ecore_timer_add(5.0,
                                (Ecore_Task_Cb)_wfd_automatic_deactivated_for_connection_cb, ad);
                }
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -678,31 +678,31 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
  */
 static void _wfd_flight_mode_changed(keynode_t *node, void *user_data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        int res = -1;
        int flight_mode = 0;
        wfd_appdata_t *ad = (wfd_appdata_t *)user_data;
 
        if (NULL == ad) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "NULL parameters.\n");
+               WDPOP_LOGE("NULL parameters.\n");
                return;
        }
 
        res = vconf_get_bool(VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, &flight_mode);
        if (res != 0) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get flight state from vconf. [%d]\n", res);
+               WDPOP_LOGE("Failed to get flight state from vconf. [%d]\n", res);
                return;
        }
 
        if (flight_mode == FALSE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Flight mode is off\n");
+               WDPOP_LOGD( "Flight mode is off\n");
                return;
        }
 
        /* If flight mode is on, turn off WFD */
        wifi_direct_get_state(&ad->wfd_status);
        if (WIFI_DIRECT_STATE_DEACTIVATED == ad->wfd_status) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Wi-Fi Direct is deactivated.\n");
+               WDPOP_LOGD( "Wi-Fi Direct is deactivated.\n");
                return;
        }
 
@@ -710,18 +710,18 @@ static void _wfd_flight_mode_changed(keynode_t *node, void *user_data)
        if (WIFI_DIRECT_STATE_CONNECTED == ad->wfd_status) {
                res = wifi_direct_disconnect_all();
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to send disconnection request to all. [%d]\n", res);
+                       WDPOP_LOGE("Failed to send disconnection request to all. [%d]\n", res);
                        return;
                }
        }
 
        res = wifi_direct_deactivate();
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to deactivate Wi-Fi Direct. error code = [%d]\n", res);
+               WDPOP_LOGE("Failed to deactivate Wi-Fi Direct. error code = [%d]\n", res);
                return;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -731,10 +731,10 @@ static void _wfd_flight_mode_changed(keynode_t *node, void *user_data)
  */
 int init_wfd_popup_client(wfd_appdata_t *ad)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        if (NULL == ad) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "NULL parameters.\n");
+               WDPOP_LOGD( "NULL parameters.\n");
                return FALSE;
        }
 
@@ -742,32 +742,32 @@ int init_wfd_popup_client(wfd_appdata_t *ad)
 
        ret = wifi_direct_initialize();
        if (ret != WIFI_DIRECT_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to initialize Wi-Fi Direct. error code = [%d]\n", ret);
+               WDPOP_LOGE("Failed to initialize Wi-Fi Direct. error code = [%d]\n", ret);
                return FALSE;
        }
 
        ret = wifi_direct_set_device_state_changed_cb(_cb_activation, (void *)ad);
        if (ret != WIFI_DIRECT_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to register _cb_activation. error code = [%d]\n", ret);
+               WDPOP_LOGE("Failed to register _cb_activation. error code = [%d]\n", ret);
                return FALSE;
        }
 
        ret = wifi_direct_set_discovery_state_changed_cb(_cb_discover, (void *)ad);
        if (ret != WIFI_DIRECT_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to register _cb_discover. error code = [%d]\n", ret);
+               WDPOP_LOGE("Failed to register _cb_discover. error code = [%d]\n", ret);
                return FALSE;
        }
 
        ret = wifi_direct_set_connection_state_changed_cb(_cb_connection, (void *)ad);
        if (ret != WIFI_DIRECT_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to register _cb_connection. error code = [%d]\n", ret);
+               WDPOP_LOGE("Failed to register _cb_connection. error code = [%d]\n", ret);
                return FALSE;
        }
 
        /* initialize notification */
        ad->noti = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
        if (NULL == ad->noti) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "notification_new failed.\n");
+               WDPOP_LOGD( "notification_new failed.\n");
                return FALSE;
        }
 
@@ -775,11 +775,11 @@ int init_wfd_popup_client(wfd_appdata_t *ad)
        int result = -1;
        result = vconf_notify_key_changed(VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, _wfd_flight_mode_changed, ad);
        if (result == -1) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to register vconf callback for flight mode\n");
+               WDPOP_LOGE("Failed to register vconf callback for flight mode\n");
                return FALSE;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 
        if (ret == WIFI_DIRECT_ERROR_NONE) {
                return TRUE;
@@ -795,10 +795,10 @@ int init_wfd_popup_client(wfd_appdata_t *ad)
  */
 int deinit_wfd_popup_client(wfd_appdata_t *ad)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        if (NULL == ad || NULL == ad->noti) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "NULL parameters.\n");
+               WDPOP_LOGD( "NULL parameters.\n");
                return FALSE;
        }
 
@@ -810,7 +810,7 @@ int deinit_wfd_popup_client(wfd_appdata_t *ad)
        notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
        noti_err = notification_free(ad->noti);
        if (noti_err != NOTIFICATION_ERROR_NONE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to notification_free.(%d)\n", noti_err);
+               WDPOP_LOGD( "Fail to notification_free.(%d)\n", noti_err);
                ret = WIFI_DIRECT_ERROR_RESOURCE_BUSY;
        }
 
@@ -818,7 +818,7 @@ int deinit_wfd_popup_client(wfd_appdata_t *ad)
        int result = -1;
        result = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wfd_flight_mode_changed);
        if (result == -1) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for flight mode\n");
+               WDPOP_LOGE("Failed to ignore vconf key callback for flight mode\n");
        }
 
        if (ad->transmit_timer) {
@@ -826,7 +826,7 @@ int deinit_wfd_popup_client(wfd_appdata_t *ad)
                ad->transmit_timer = NULL;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 
        if (ret == WIFI_DIRECT_ERROR_NONE) {
                return TRUE;
index d14fa1c..7d84f44 100755 (executable)
@@ -68,11 +68,11 @@ static Evas_Object *_create_win(Evas_Object *parent, const char *name)
 
 static int _app_create(void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = wfd_get_appdata();
 
        if (data == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Incorrect parameter\n");
+               WDPOP_LOGD( "Incorrect parameter\n");
                return -1;
        }
 
@@ -80,7 +80,7 @@ static int _app_create(void *data)
 
        ad->popup_data = (wfd_popup_t *) malloc(sizeof(wfd_popup_t));
        if (!ad->popup_data) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "malloc failed\n");
+               WDPOP_LOGE("malloc failed\n");
                return -1;
        }
 
@@ -96,32 +96,32 @@ static int _app_create(void *data)
 
        r = appcore_set_i18n(PACKAGE, NULL);
        if (r != 0) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "appcore_set_i18n error\n");
+               WDPOP_LOGD( "appcore_set_i18n error\n");
                return -1;
        }
 
        if (init_wfd_popup_client(ad) == FALSE) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "init_wfd_popup_client error\n");
+               WDPOP_LOGE("init_wfd_popup_client error\n");
                wfd_prepare_popup(WFD_POP_FAIL_INIT, NULL);
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return 0;
 }
 
 static int _app_terminate(void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        if (data == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Incorrect parameter\n");
+               WDPOP_LOGE("Incorrect parameter\n");
                return -1;
        }
 
        wfd_appdata_t *ad = (wfd_appdata_t *) data;
 
        if (deinit_wfd_popup_client(ad) == FALSE) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "deinit_wfd_popup_client error\n");
+               WDPOP_LOGE("deinit_wfd_popup_client error\n");
        } else {
                if (ad->popup) {
                        evas_object_del(ad->popup);
@@ -137,30 +137,30 @@ static int _app_terminate(void *data)
                }
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return 0;
 }
 
 static int _app_pause(void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return 0;
 }
 
 static int _app_resume(void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return 0;
 }
 
 static int _app_reset(bundle *b, void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        if (b == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Bundle is NULL");
+               WDPOP_LOGD( "Bundle is NULL");
                return -1;
        }
 
@@ -169,13 +169,13 @@ static int _app_reset(bundle *b, void *data)
        noti_type = (char *)appsvc_get_data(b, NOTIFICATION_BUNDLE_PARAM);
 
        if (noti_type == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Notification type is wrong.");
+               WDPOP_LOGD( "Notification type is wrong.");
                return -1;
        }
 
-       WFD_APP_LOG(WFD_APP_LOG_LOW, "Notification type is [%s]", noti_type);
+       WDPOP_LOGD( "Notification type is [%s]", noti_type);
        if (strncmp(noti_type, NOTIFICATION_BUNDLE_VALUE, strlen(NOTIFICATION_BUNDLE_PARAM)) == 0) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Launch wifidirect-ugapp");
+               WDPOP_LOGD( "Launch wifidirect-ugapp");
                service_h service;
                service_create(&service);
                service_set_operation(service, SERVICE_OPERATION_DEFAULT);
@@ -184,7 +184,7 @@ static int _app_reset(bundle *b, void *data)
                service_destroy(service);
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return 0;
 }
 
index 624c806..a754170 100755 (executable)
@@ -50,30 +50,30 @@ void wfd_tickernoti_popup(char *msg);
  */
 static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = wfd_get_appdata();
        int result = -1;
        int resp = (int) data;
        char msg[WFD_POP_STR_MAX_LEN] = {0};
 
-       WFD_APP_LOG(WFD_APP_LOG_HIGH, "popup resp : %d\n", resp);
+       WDPOP_LOGI( "popup resp : %d\n", resp);
 
        switch (resp) {
        case /* MT */ WFD_POP_RESP_APRV_CONNECT_PBC_YES:
        {
-               WFD_APP_LOG(WFD_APP_LOG_HIGH,
+               WDPOP_LOGI(
                                "WFD_POP_RESP_APRV_CONNECT_PBC_YES\n");
                wfd_destroy_popup();
 
                result = wifi_direct_accept_connection(ad->peer_mac);
-               WFD_APP_LOG(WFD_APP_LOG_LOW,
+               WDPOP_LOGD(
                                "wifi_direct_accept_connection() result=[%d]\n",
                                result);
                if (result == WIFI_DIRECT_ERROR_NONE) {
                        /* tickernoti popup */
                        wfd_tickernoti_popup(_("IDS_WFD_POP_CONNECTING"));
                } else {
-                       WFD_APP_LOG(WFD_APP_LOG_ERROR,
+                       WDPOP_LOGE(
                                        "wifi_direct_accept_connection() FAILED!!\n");
                        evas_object_hide(ad->win);
 
@@ -88,30 +88,30 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
        {
                char *pin = NULL;
 
-               WFD_APP_LOG(WFD_APP_LOG_HIGH,
+               WDPOP_LOGI(
                                "WFD_POP_RESP_APRV_CONNECT_DISPLAY_OK\n");
                wfd_destroy_popup();
 
                if (wifi_direct_generate_wps_pin() != WIFI_DIRECT_ERROR_NONE) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "wifi_direct_generate_wps_pin() is failed\n");
+                       WDPOP_LOGD( "wifi_direct_generate_wps_pin() is failed\n");
                        return;
                }
 
                if (wifi_direct_get_wps_pin(&pin) != WIFI_DIRECT_ERROR_NONE) {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "wifi_direct_generate_wps_pin() is failed\n");
+                       WDPOP_LOGD( "wifi_direct_generate_wps_pin() is failed\n");
                        return;
                }
 
                strncpy(ad->pin_number, pin, 64);
                free(pin);
                pin = NULL;
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "button ok: pin [%s]", ad->pin_number);
+               WDPOP_LOGD( "button ok: pin [%s]", ad->pin_number);
 
                result = wifi_direct_accept_connection(ad->peer_mac);
                if (result == WIFI_DIRECT_ERROR_NONE) {
                        wfd_prepare_popup(WFD_POP_PROG_CONNECT_WITH_PIN, NULL);
                } else {
-                       WFD_APP_LOG(WFD_APP_LOG_LOW,
+                       WDPOP_LOGD(
                                "wifi_direct_accept_connection() failed. result=[%d]\n", result);
                        /* tickernoti popup */
                        wfd_tickernoti_popup(IDS_WFD_POP_CONNECT_FAILED);
@@ -121,17 +121,17 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
 
        case /* MO */ WFD_POP_RESP_PROG_CONNECT_KEYPAD_OK:
        {
-               WFD_APP_LOG(WFD_APP_LOG_HIGH,
+               WDPOP_LOGI(
                                "WFD_POP_RESP_PROG_CONNECT_KEYPAD_OK\n");
 
                wfd_destroy_popup();
 
                int len = strlen(ad->pin_number);
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "button ok: pin [%s]", ad->pin_number);
+               WDPOP_LOGD( "button ok: pin [%s]", ad->pin_number);
 
                if (len > 7 && len < 64) {
                        int result = 0;
-                       WFD_APP_LOG(WFD_APP_LOG_LOW, "pin=[%s]\n", ad->pin_number);
+                       WDPOP_LOGD( "pin=[%s]\n", ad->pin_number);
 
                        result = wifi_direct_set_wps_pin(ad->pin_number);
                        if (result != WIFI_DIRECT_ERROR_NONE) {
@@ -143,11 +143,11 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
 
                        //result = wifi_direct_activate_pushbutton();
                        result = wifi_direct_accept_connection(ad->peer_mac);
-                       WFD_APP_LOG(WFD_APP_LOG_LOW,
+                       WDPOP_LOGD(
                                        "wifi_direct_accept_connection(%s) result=[%d]\n",
                                        ad->peer_mac, result);
                        if (result != WIFI_DIRECT_ERROR_NONE) {
-                               WFD_APP_LOG(WFD_APP_LOG_ERROR,
+                               WDPOP_LOGE(
                                                "wifi_direct_accept_connection() FAILED!!\n");
                                evas_object_hide(ad->win);
 
@@ -156,7 +156,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
                                wfd_tickernoti_popup(msg);
                        }
                } else {
-                       WFD_APP_LOG(WFD_APP_LOG_ERROR, "Error, Incorrect PIN!!\n");
+                       WDPOP_LOGE( "Error, Incorrect PIN!!\n");
 
                        /* tickernoti popup */
                        wfd_tickernoti_popup(_("IDS_WFD_POP_PIN_INVALID"));
@@ -175,7 +175,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
 
        case /* MT */ WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES:
        {
-               WFD_APP_LOG(WFD_APP_LOG_HIGH,
+               WDPOP_LOGI(
                                "WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES\n");
                wfd_destroy_popup();
                if (pb_timer) {
@@ -189,7 +189,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
 
        case /* MT */ WFD_POP_RESP_APRV_CONNECT_NO:
        {
-               WFD_APP_LOG(WFD_APP_LOG_HIGH,
+               WDPOP_LOGI(
                                "WFD_POP_RESP_APRV_CONNECT_NO: destroy_popup...\n");
 
                wfd_destroy_popup();
@@ -199,7 +199,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
                }
 
                result = wifi_direct_disconnect(ad->peer_mac);
-               WFD_APP_LOG(WFD_APP_LOG_LOW,
+               WDPOP_LOGD(
                                "wifi_direct_disconnect[%s] result=[%d]\n",
                                ad->peer_mac, result);
        }
@@ -207,13 +207,13 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
 
        default:
        {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Unknown respone\n");
+               WDPOP_LOGE( "Unknown respone\n");
                evas_object_hide(ad->win);
        }
        break;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -223,11 +223,11 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
  */
 void wfd_destroy_popup()
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = wfd_get_appdata();
 
        if (ad == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "ad is NULL\n");
+               WDPOP_LOGE( "ad is NULL\n");
                return;
        }
 
@@ -243,7 +243,7 @@ void wfd_destroy_popup()
 
        evas_object_hide(ad->win);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -255,7 +255,7 @@ void wfd_destroy_popup()
  */
 static Evas_Object *wfd_draw_pop_type_a(Evas_Object * win, wfd_popup_t * pop)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        Evas_Object *popup;
 
        popup = elm_popup_add(win);
@@ -265,7 +265,7 @@ static Evas_Object *wfd_draw_pop_type_a(Evas_Object * win, wfd_popup_t * pop)
        evas_object_show(popup);
        evas_object_show(win);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return popup;
 }
 
@@ -277,7 +277,7 @@ static Evas_Object *wfd_draw_pop_type_a(Evas_Object * win, wfd_popup_t * pop)
  */
 static Evas_Object *wfd_draw_pop_type_b(Evas_Object * win, wfd_popup_t * pop)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        Evas_Object *popup = NULL;
        Evas_Object *btn = NULL;
 
@@ -294,7 +294,7 @@ static Evas_Object *wfd_draw_pop_type_b(Evas_Object * win, wfd_popup_t * pop)
        evas_object_show(popup);
        evas_object_show(win);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return popup;
 }
 
@@ -306,7 +306,7 @@ static Evas_Object *wfd_draw_pop_type_b(Evas_Object * win, wfd_popup_t * pop)
  */
 static Evas_Object *wfd_draw_pop_type_c(Evas_Object * win, wfd_popup_t * pop)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        Evas_Object *popup = NULL;
        Evas_Object *btn1 = NULL, *btn2 = NULL;
 
@@ -331,7 +331,7 @@ static Evas_Object *wfd_draw_pop_type_c(Evas_Object * win, wfd_popup_t * pop)
        evas_object_show(popup);
        evas_object_show(win);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return popup;
 }
 
@@ -344,26 +344,26 @@ static Evas_Object *wfd_draw_pop_type_c(Evas_Object * win, wfd_popup_t * pop)
  */
 static void _smart_ime_cb(void *data, Evas_Object * obj, void *event_info)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = wfd_get_appdata();
 
        Ecore_IMF_Context *imf_context = NULL;
        imf_context = (Ecore_IMF_Context *) ad->pin_entry;
 
        if (NULL == imf_context) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Error!!! Ecore_IMF_Context is NULL!!");
+               WDPOP_LOGE( "Error!!! Ecore_IMF_Context is NULL!!");
                return;
        }
 
        const char *txt = elm_entry_markup_to_utf8(elm_entry_entry_get((const Evas_Object *) imf_context));
        if (NULL != txt) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "* text [%s], len=[%d]", txt, strlen(txt));
+               WDPOP_LOGD( "* text [%s], len=[%d]", txt, strlen(txt));
                strncpy(ad->pin_number, txt, sizeof(ad->pin_number));
        } else {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Err!");
+               WDPOP_LOGD( "Err!");
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -398,7 +398,7 @@ static Eina_Bool _fn_pb_timer(void *data)
        wfd_wps_display_popup_t *wps_display_popup = (wfd_wps_display_popup_t *) data;
 
        if (NULL == wps_display_popup) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Param is NULL.\n");
+               WDPOP_LOGE( "Param is NULL.\n");
                return ECORE_CALLBACK_CANCEL;
        }
 
@@ -410,7 +410,7 @@ static Eina_Bool _fn_pb_timer(void *data)
        value = elm_progressbar_value_get(progressbar);
 
        if (value >= 1.0) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Progress end.\n");
+               WDPOP_LOGE( "Progress end.\n");
                if (pb_timer) {
                        ecore_timer_del(pb_timer);
                        pb_timer = NULL;
@@ -423,7 +423,7 @@ static Eina_Bool _fn_pb_timer(void *data)
        step = wps_display_popup->step;
        value = ((double)step) / WFD_POP_TIMER_120;
        elm_progressbar_value_set(progressbar, value);
-       WFD_APP_LOG(WFD_APP_LOG_LOW, "step: %d, value: %f\n", wps_display_popup->step, value);
+       WDPOP_LOGD( "step: %d, value: %f\n", wps_display_popup->step, value);
 
        /* show the time label */
        if (step < 60) {
@@ -495,7 +495,7 @@ static Evas_Object *_add_edit_field(Evas_Object *parent, const char *title, cons
  */
 Evas_Object *wfd_draw_pop_type_display(Evas_Object * win, wfd_popup_t * pop)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        Evas_Object *popup = NULL;
        Evas_Object *label = NULL;
@@ -579,7 +579,7 @@ Evas_Object *wfd_draw_pop_type_display(Evas_Object * win, wfd_popup_t * pop)
        evas_object_show(popup);
        evas_object_show(win);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return popup;
 }
 
@@ -591,7 +591,7 @@ Evas_Object *wfd_draw_pop_type_display(Evas_Object * win, wfd_popup_t * pop)
  */
 Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = wfd_get_appdata();
 
        Evas_Object *conformant = NULL;
@@ -687,7 +687,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
        evas_object_show(win);
        elm_object_focus_set(ad->pin_entry, EINA_TRUE);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return pinpopup;
 }
 
@@ -699,7 +699,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
  */
 void wfd_prepare_popup(int type, void *userdata)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = wfd_get_appdata();
        wfd_popup_t *pop = ad->popup_data;
 
@@ -786,7 +786,7 @@ void wfd_prepare_popup(int type, void *userdata)
                break;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -797,21 +797,21 @@ void wfd_prepare_popup(int type, void *userdata)
  */
 void wfd_tickernoti_popup(char *msg)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDPOP_LOG_FUNC_ENTER__;
 
        int ret = -1;
        bundle *b = NULL;
 
        b = bundle_create();
        if (!b) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "FAIL: bundle_create()\n");
+               WDPOP_LOGD( "FAIL: bundle_create()\n");
                return;
        }
 
        /* tickernoti style */
        ret = bundle_add(b, "0", "info");
        if (ret) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to add tickernoti style\n");
+               WDPOP_LOGD( "Fail to add tickernoti style\n");
                bundle_free(b);
                return;
        }
@@ -819,7 +819,7 @@ void wfd_tickernoti_popup(char *msg)
        /* popup text */
        ret = bundle_add(b, "1", msg);
        if (ret) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to add popup text\n");
+               WDPOP_LOGD( "Fail to add popup text\n");
                bundle_free(b);
                return;
        }
@@ -827,7 +827,7 @@ void wfd_tickernoti_popup(char *msg)
        /* orientation of tickernoti */
        ret = bundle_add(b, "2", "0");
        if (ret) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to add orientation of tickernoti\n");
+               WDPOP_LOGD( "Fail to add orientation of tickernoti\n");
                bundle_free(b);
                return;
        }
@@ -835,7 +835,7 @@ void wfd_tickernoti_popup(char *msg)
        /* timeout(second) of tickernoti */
        ret = bundle_add(b, "3", "3");
        if (ret) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to add timeout of tickernoti\n");
+               WDPOP_LOGD( "Fail to add timeout of tickernoti\n");
                bundle_free(b);
                return;
        }
@@ -843,10 +843,10 @@ void wfd_tickernoti_popup(char *msg)
        /* launch tickernoti */
        ret = syspopup_launch(TICKERNOTI_SYSPOPUP, b);
        if (ret) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Fail to launch syspopup\n");
+               WDPOP_LOGD( "Fail to launch syspopup\n");
        }
 
        bundle_free(b);
-       __WFD_APP_FUNC_EXIT__;
+       __WDPOP_LOG_FUNC_EXIT__;
 }
 
index ac65829..012896b 100755 (executable)
@@ -27,6 +27,7 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2")
 
 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
 ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
+ADD_DEFINITIONS("-DUSE_DLOG")
 
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
index bf6d3f0..ff16f49 100755 (executable)
 #ifndef __WFD_UG_H__
 #define __WFD_UG_H__
 
-#include <dlog.h>
 #include <ui-gadget-module.h>
 #include <tethering.h>
 #include <wifi-direct.h>
 
 #define PACKAGE "ug-setting-wifidirect-efl"
 #define LOCALEDIR "/usr/ug/res/locale"
+#define VCONF_WFD_APNAME "db/setting/device_name"
+
+#ifdef USE_DLOG
+#include <dlog.h>
 
-#define DIRECT_TAG  "wfd_ug"
-#define DBG(log_level, format, args...) \
-       LOG(log_level, DIRECT_TAG, "[%s()][%d] " format, __FUNCTION__, __LINE__, ##args)
+#undef LOG_TAG
+#define LOG_TAG "UG_WIFI_DIRECT"
 
-#define __FUNC_ENTER__  DBG(LOG_VERBOSE, "+\n")
-#define __FUNC_EXIT__   DBG(LOG_VERBOSE, "-\n")
+#define WDUG_LOGV(format, args...) LOGV(format, ##args)
+#define WDUG_LOGD(format, args...) LOGD(format, ##args)
+#define WDUG_LOGI(format, args...) LOGI(format, ##args)
+#define WDUG_LOGW(format, args...) LOGW(format, ##args)
+#define WDUG_LOGE(format, args...) LOGE(format, ##args)
+#define WDUG_LOGF(format, args...) LOGF(format, ##args)
 
-#define VCONF_WFD_APNAME                       "db/setting/device_name"
+#define __WDUG_LOG_FUNC_ENTER__ LOGV("Enter")
+#define __WDUG_LOG_FUNC_EXIT__ LOGV("Quit")
 
-#define assertm_if(expr, fmt, arg...) do { \
+#define assertm_if(expr, fmt, args...) do { \
        if (expr) { \
-         DBG(LOG_VERBOSE, " ##(%s) -> %s() assert!!## "fmt, #expr, __FUNCTION__, ##arg); \
+         WDUG_LOGF(" ##(%s) -> assert!!## "fmt, #expr, ##args); \
                 assert(1); \
        } \
 } while (0)
 
+#else /** _DLOG_UTIL */
+
+#define WDUG_LOGV(format, args...) \
+       printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGD(format, args...) \
+       printf("[D/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGI(format, args...) \
+       printf("[I/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGW(format, args...) \
+       printf("[W/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGE(format, args...) \
+       printf("[E/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUG_LOGF(format, args...) \
+       printf("[F/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+
+#define __WDUG_LOG_FUNC_ENTER__ \
+       printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> Enter", __FILE__, __FUNCTION__, __LINE__)
+#define __WDUG_LOG_FUNC_EXIT__ \
+       printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> Exit", __FILE__, __FUNCTION__, __LINE__)
+
+#endif /** _DLOG_UTIL */
+
 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
 
index 3176804..b344cb3 100755 (executable)
  */
 static void _wifi_state_cb(keynode_t *key, void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
        int wifi_state;
 
        res = vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state);
        if (res != 0) {
-               DBG(LOG_ERROR, "Failed to get wifi state from vconf. [%d]\n", res);
+               WDUG_LOGE("Failed to get wifi state from vconf. [%d]\n", res);
                return;
        }
 
        if (wifi_state == VCONFKEY_WIFI_OFF) {
-               DBG(LOG_VERBOSE, "WiFi is turned off\n");
+               WDUG_LOGI("WiFi is turned off\n");
                wfd_client_swtch_force(ugd, TRUE);
        } else {
-               DBG(LOG_VERBOSE, "WiFi is turned on\n");
+               WDUG_LOGI("WiFi is turned on\n");
        }
 
        res = net_deregister_client();
        if (res != NET_ERR_NONE) {
-               DBG(LOG_ERROR, "Failed to deregister network client. [%d]\n", res);
+               WDUG_LOGE("Failed to deregister network client. [%d]\n", res);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -75,9 +75,9 @@ static void _wifi_state_cb(keynode_t *key, void *data)
  */
 static void _network_event_cb(net_event_info_t *event_info, void *user_data)
 {
-       __FUNC_ENTER__;
-       DBG(LOG_VERBOSE, "Event from network. [%d]\n", event_info->Event);
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_ENTER__;
+       WDUG_LOGI("Event from network. [%d]\n", event_info->Event);
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -87,35 +87,35 @@ static void _network_event_cb(net_event_info_t *event_info, void *user_data)
  */
 int wfd_wifi_off(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
 
        res = vconf_notify_key_changed(VCONFKEY_WIFI_STATE, _wifi_state_cb, ugd);
        if (res == -1) {
-               DBG(LOG_ERROR, "Failed to register vconf callback\n");
+               WDUG_LOGE("Failed to register vconf callback\n");
                return -1;
        }
 
-       DBG(LOG_VERBOSE, "Vconf key callback is registered\n");
+       WDUG_LOGI("Vconf key callback is registered\n");
 
        res = net_register_client((net_event_cb_t) _network_event_cb, NULL);
        if (res != NET_ERR_NONE) {
-               DBG(LOG_ERROR, "Failed to register network client. [%d]\n", res);
+               WDUG_LOGE("Failed to register network client. [%d]\n", res);
                return -1;
        }
 
-       DBG(LOG_VERBOSE, "Network client is registered\n");
+       WDUG_LOGI("Network client is registered\n");
 
        res = net_wifi_power_off();
        if (res != NET_ERR_NONE) {
-               DBG(LOG_ERROR, "Failed to turn off wifi. [%d]\n", res);
+               WDUG_LOGE("Failed to turn off wifi. [%d]\n", res);
                return -1;
        }
 
-       DBG(LOG_VERBOSE, "WiFi power off\n");
+       WDUG_LOGI("WiFi power off\n");
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -127,7 +127,7 @@ int wfd_wifi_off(void *data)
  */
 static void _enable_hotspot_state_cb(keynode_t *key, void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
        int hotspot_mode;
@@ -136,12 +136,12 @@ static void _enable_hotspot_state_cb(keynode_t *key, void *data)
 
        res = vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_mode);
        if (res != 0) {
-               DBG(LOG_ERROR, "Failed to get mobile hotspot state from vconf. [%d]\n", res);
+               WDUG_LOGE("Failed to get mobile hotspot state from vconf. [%d]\n", res);
                return;
        }
 
        if (hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI) {
-               DBG(LOG_VERBOSE, " Mobile hotspot is activated\n");
+               WDUG_LOGI(" Mobile hotspot is activated\n");
        }
 
        th = ugd->hotspot_handle;
@@ -150,19 +150,19 @@ static void _enable_hotspot_state_cb(keynode_t *key, void *data)
                /* Deregister cbs */
                ret = tethering_unset_enabled_cb(th, TETHERING_TYPE_WIFI);
                if (ret != TETHERING_ERROR_NONE) {
-                       DBG(LOG_ERROR, "tethering_unset_enabled_cb is failed(%d)\n", ret);
+                       WDUG_LOGE("tethering_unset_enabled_cb is failed(%d)\n", ret);
                }
 
                /* Destroy tethering handle */
                ret = tethering_destroy(th);
                if (ret != TETHERING_ERROR_NONE) {
-                       DBG(LOG_ERROR, "tethering_destroy is failed(%d)\n", ret);
+                       WDUG_LOGE("tethering_destroy is failed(%d)\n", ret);
                }
 
                ugd->hotspot_handle = NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -173,7 +173,7 @@ static void _enable_hotspot_state_cb(keynode_t *key, void *data)
  */
 static void _disable_hotspot_state_cb(keynode_t *key, void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
        int hotspot_mode;
@@ -182,12 +182,12 @@ static void _disable_hotspot_state_cb(keynode_t *key, void *data)
 
        res = vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_mode);
        if (res != 0) {
-               DBG(LOG_ERROR, "Failed to get mobile hotspot state from vconf. [%d]\n", res);
+               WDUG_LOGE("Failed to get mobile hotspot state from vconf. [%d]\n", res);
                return;
        }
 
        if (!(hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI)) {
-               DBG(LOG_VERBOSE, " Mobile hotspot is deactivated\n");
+               WDUG_LOGI(" Mobile hotspot is deactivated\n");
                wfd_client_swtch_force(ugd, TRUE);
        }
 
@@ -197,19 +197,19 @@ static void _disable_hotspot_state_cb(keynode_t *key, void *data)
                /* Deregister cbs */
                ret = tethering_unset_disabled_cb(th, TETHERING_TYPE_WIFI);
                if (ret != TETHERING_ERROR_NONE) {
-                       DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret);
+                       WDUG_LOGE("tethering_unset_disabled_cb is failed(%d)\n", ret);
                }
 
                /* Destroy tethering handle */
                ret = tethering_destroy(th);
                if (ret != TETHERING_ERROR_NONE) {
-                       DBG(LOG_ERROR, "tethering_destroy is failed(%d)\n", ret);
+                       WDUG_LOGE("tethering_destroy is failed(%d)\n", ret);
                }
 
                ugd->hotspot_handle = NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -222,20 +222,20 @@ static void _disable_hotspot_state_cb(keynode_t *key, void *data)
  */
 static void __enabled_cb(tethering_error_e error, tethering_type_e type, bool is_requested, void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (error != TETHERING_ERROR_NONE) {
                if (is_requested != TRUE) {
                        return;
                }
 
-               DBG(LOG_ERROR, "error !!! TETHERING is not enabled.\n");
+               WDUG_LOGE("error !!! TETHERING is not enabled.\n");
                return;
        }
 
-       DBG(LOG_VERBOSE, "TETHERING is enabled.\n");
+       WDUG_LOGI("TETHERING is enabled.\n");
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -249,20 +249,20 @@ static void __enabled_cb(tethering_error_e error, tethering_type_e type, bool is
  */
 static void __disabled_cb(tethering_error_e error, tethering_type_e type, tethering_disabled_cause_e code, void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (error != TETHERING_ERROR_NONE) {
                if (code != TETHERING_DISABLED_BY_REQUEST) {
                        return;
                }
 
-               DBG(LOG_ERROR, "error !!! TETHERING is not disabled.\n");
+               WDUG_LOGE("error !!! TETHERING is not disabled.\n");
                return;
        }
 
-       DBG(LOG_VERBOSE, "TETHERING is disabled.\n");
+       WDUG_LOGI("TETHERING is disabled.\n");
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -273,7 +273,7 @@ static void __disabled_cb(tethering_error_e error, tethering_type_e type, tether
  */
 int wfd_mobile_ap_on(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
        tethering_error_e ret = TETHERING_ERROR_NONE;
@@ -281,39 +281,39 @@ int wfd_mobile_ap_on(void *data)
 
        res = vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _enable_hotspot_state_cb, ugd);
        if (res == -1) {
-               DBG(LOG_ERROR, "Failed to register vconf callback\n");
+               WDUG_LOGE("Failed to register vconf callback\n");
                return -1;
        }
 
        /* Create tethering handle */
        ret = tethering_create(&th);
        if (ret != TETHERING_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to tethering_create() [%d]\n", ret);
+               WDUG_LOGE("Failed to tethering_create() [%d]\n", ret);
                return -1;
        } else {
-               DBG(LOG_VERBOSE, "Succeeded to tethering_create()\n");
+               WDUG_LOGI("Succeeded to tethering_create()\n");
        }
 
        /* Register cbs */
        ret = tethering_set_enabled_cb(th, TETHERING_TYPE_WIFI, __enabled_cb, NULL);
        if (ret != TETHERING_ERROR_NONE) {
-               DBG(LOG_ERROR, "tethering_set_enabled_cb is failed\n", ret);
+               WDUG_LOGE("tethering_set_enabled_cb is failed\n", ret);
                return -1;
        }
 
        /* Enable tethering */
        ret = tethering_enable(th, TETHERING_TYPE_WIFI);
        if (ret != TETHERING_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to turn on mobile hotspot. [%d]\n", ret);
+               WDUG_LOGE("Failed to turn on mobile hotspot. [%d]\n", ret);
                return -1;
        } else {
-               DBG(LOG_VERBOSE, "Succeeded to turn on mobile hotspot\n");
+               WDUG_LOGI("Succeeded to turn on mobile hotspot\n");
        }
 
        ugd->hotspot_handle = th;
        ugd->is_hotspot_off = FALSE;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -324,7 +324,7 @@ int wfd_mobile_ap_on(void *data)
  */
 int wfd_mobile_ap_off(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
        tethering_error_e ret = TETHERING_ERROR_NONE;
@@ -332,39 +332,39 @@ int wfd_mobile_ap_off(void *data)
 
        res = vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _disable_hotspot_state_cb, ugd);
        if (res == -1) {
-               DBG(LOG_ERROR, "Failed to register vconf callback\n");
+               WDUG_LOGE("Failed to register vconf callback\n");
                return -1;
        }
 
        /* Create tethering handle */
        ret = tethering_create(&th);
        if (ret != TETHERING_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to tethering_create() [%d]\n", ret);
+               WDUG_LOGE("Failed to tethering_create() [%d]\n", ret);
                return -1;
        } else {
-               DBG(LOG_VERBOSE, "Succeeded to tethering_create()\n");
+               WDUG_LOGI("Succeeded to tethering_create()\n");
        }
 
        /* Register cbs */
        ret = tethering_set_disabled_cb(th, TETHERING_TYPE_WIFI, __disabled_cb, NULL);
        if (ret != TETHERING_ERROR_NONE) {
-               DBG(LOG_ERROR, "tethering_set_disabled_cb is failed\n", ret);
+               WDUG_LOGE("tethering_set_disabled_cb is failed\n", ret);
                return -1;
        }
 
        /* Disable tethering */
        ret = tethering_disable(th, TETHERING_TYPE_WIFI);
        if (ret != TETHERING_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to turn off mobile hotspot. [%d]\n", ret);
+               WDUG_LOGE("Failed to turn off mobile hotspot. [%d]\n", ret);
                return -1;
        } else {
-               DBG(LOG_VERBOSE, "Succeeded to turn off mobile hotspot\n");
+               WDUG_LOGI("Succeeded to turn off mobile hotspot\n");
        }
 
        ugd->hotspot_handle = th;
        ugd->is_hotspot_off = TRUE;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -376,36 +376,36 @@ int wfd_mobile_ap_off(void *data)
  */
 static device_type_s *wfd_client_find_peer_by_mac(void *data, const char *mac_addr)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int i;
 
        if (ugd == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
        if (ugd->multi_connect_mode != WFD_MULTI_CONNECT_MODE_NONE) {
                for (i = 0; i < ugd->raw_multi_selected_peer_cnt; i++) {
-                       DBG(LOG_VERBOSE, "[Multi Connect] check %dth peer\n", i);
+                       WDUG_LOGI("[Multi Connect] check %dth peer\n", i);
                        if (!strncmp(mac_addr, (const char *)ugd->raw_multi_selected_peers[i].mac_addr, MAC_LENGTH)) {
-                               DBG(LOG_VERBOSE, "selected found peer. [%d]\n", i);
-                               __FUNC_EXIT__;
+                               WDUG_LOGI("selected found peer. [%d]\n", i);
+                               __WDUG_LOG_FUNC_EXIT__;
                                return &ugd->raw_multi_selected_peers[i];
                        }
                }
        } else {
                for (i = 0; i < ugd->raw_discovered_peer_cnt; i++) {
-                       DBG(LOG_VERBOSE, "check %dth peer\n", i);
+                       WDUG_LOGI("check %dth peer\n", i);
                        if (!strncmp(mac_addr, (const char *)ugd->raw_discovered_peers[i].mac_addr, MAC_LENGTH)) {
-                               DBG(LOG_VERBOSE, "found peer. [%d]\n", i);
-                               __FUNC_EXIT__;
+                               WDUG_LOGI("found peer. [%d]\n", i);
+                               __WDUG_LOG_FUNC_EXIT__;
                                return &ugd->raw_discovered_peers[i];
                        }
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -418,7 +418,7 @@ static device_type_s *wfd_client_find_peer_by_mac(void *data, const char *mac_ad
  */
 void _activation_cb(int error_code, wifi_direct_device_state_e device_state, void *user_data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res = -1;
        struct ug_data *ugd = (struct ug_data *)user_data;
 
@@ -426,9 +426,9 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
 
        switch (device_state) {
        case WIFI_DIRECT_DEVICE_STATE_ACTIVATED:
-               DBG(LOG_VERBOSE, "WIFI_DIRECT_DEVICE_STATE_ACTIVATED\n");
+               WDUG_LOGI("WIFI_DIRECT_DEVICE_STATE_ACTIVATED\n");
                if (error_code != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Error in Activation/Deactivation [%d]\n", error_code);
+                       WDUG_LOGE("Error in Activation/Deactivation [%d]\n", error_code);
                        wfd_ug_warn_popup(ugd, _("IDS_WFD_POP_ACTIVATE_FAIL"), POPUP_TYPE_ACTIVATE_FAIL);
 
                        ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
@@ -445,29 +445,29 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
 
                res = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wifi_state_cb);
                if (res == -1) {
-                       DBG(LOG_ERROR, "Failed to ignore vconf key callback for wifi state\n");
+                       WDUG_LOGE("Failed to ignore vconf key callback for wifi state\n");
                }
 
                res = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _disable_hotspot_state_cb);
                if (res == -1) {
-                       DBG(LOG_ERROR, "Failed to ignore vconf key callback for hotspot state\n");
+                       WDUG_LOGE("Failed to ignore vconf key callback for hotspot state\n");
                }
 
                res = wifi_direct_start_discovery(FALSE, MAX_SCAN_TIME_OUT);
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to start discovery. [%d]\n", res);
+                       WDUG_LOGE("Failed to start discovery. [%d]\n", res);
                        ugd->is_re_discover = TRUE;
                        wifi_direct_cancel_discovery();
                } else {
-                       DBG(LOG_VERBOSE, "Discovery is started\n");
+                       WDUG_LOGI("Discovery is started\n");
                        ugd->is_re_discover = FALSE;
                }
 
                break;
        case WIFI_DIRECT_DEVICE_STATE_DEACTIVATED:
-               DBG(LOG_VERBOSE, "WIFI_DIRECT_DEVICE_STATE_DEACTIVATED\n");
+               WDUG_LOGI("WIFI_DIRECT_DEVICE_STATE_DEACTIVATED\n");
                if (error_code != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Error in Activation/Deactivation [%d]\n", error_code);
+                       WDUG_LOGE("Error in Activation/Deactivation [%d]\n", error_code);
                        wfd_ug_warn_popup(ugd, _("IDS_WFD_POP_DEACTIVATE_FAIL"), POPUP_TYPE_DEACTIVATE_FAIL);
                        ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
                        ugd->wfd_onoff = 1;
@@ -498,7 +498,7 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
                /* remove the callback for hotspot */
                res = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _enable_hotspot_state_cb);
                if (res == -1) {
-                       DBG(LOG_ERROR, "Failed to ignore vconf key callback for hotspot state\n");
+                       WDUG_LOGE("Failed to ignore vconf key callback for hotspot state\n");
                }
 
                /* when deactivated, stop the timer */
@@ -525,7 +525,7 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
                elm_object_disabled_set(ugd->back_btn, FALSE);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -537,17 +537,17 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi
  */
 bool _wfd_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *user_data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        if (NULL == peer || NULL == user_data) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
-               __FUNC_EXIT__;
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
+               __WDUG_LOG_FUNC_EXIT__;
                return FALSE;
        }
 
        struct ug_data *ugd = (struct ug_data *)user_data;
        int peer_cnt = ugd->raw_discovered_peer_cnt;
 
-       DBG(LOG_VERBOSE, "%dth discovered peer. [%s] [%s]\n", peer_cnt, peer->device_name, peer->mac_address);
+       WDUG_LOGI("%dth discovered peer. [%s] [%s]\n", peer_cnt, peer->device_name, peer->mac_address);
 
        strncpy(ugd->raw_discovered_peers[peer_cnt].ssid, peer->device_name, sizeof(ugd->raw_discovered_peers[peer_cnt].ssid));
        ugd->raw_discovered_peers[peer_cnt].category = peer->primary_device_type;
@@ -563,9 +563,9 @@ bool _wfd_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *user
                ugd->raw_discovered_peers[peer_cnt].conn_status = PEER_CONN_STATUS_DISCONNECTED;
        }
 
-       DBG(LOG_VERBOSE, "\tSSID: [%s]\n", ugd->raw_discovered_peers[peer_cnt].ssid);
-       DBG(LOG_VERBOSE, "\tPeer category [%d] -> [%d]\n", peer->primary_device_type, ugd->raw_discovered_peers[peer_cnt].category);
-       DBG(LOG_VERBOSE, "\tStatus: [%d]\n", ugd->raw_discovered_peers[peer_cnt].conn_status);
+       WDUG_LOGI("\tSSID: [%s]\n", ugd->raw_discovered_peers[peer_cnt].ssid);
+       WDUG_LOGI("\tPeer category [%d] -> [%d]\n", peer->primary_device_type, ugd->raw_discovered_peers[peer_cnt].category);
+       WDUG_LOGI("\tStatus: [%d]\n", ugd->raw_discovered_peers[peer_cnt].conn_status);
 
        ugd->raw_discovered_peer_cnt++;
 
@@ -574,7 +574,7 @@ bool _wfd_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *user
        free(peer->interface_address);
        free(peer);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return TRUE;
 }
 
@@ -586,17 +586,17 @@ bool _wfd_discoverd_peer_cb(wifi_direct_discovered_peer_info_s *peer, void *user
  */
 bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        if (NULL == peer || NULL == user_data) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
-               __FUNC_EXIT__;
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
+               __WDUG_LOG_FUNC_EXIT__;
                return FALSE;
        }
 
        struct ug_data *ugd = (struct ug_data *)user_data;
        int peer_cnt = ugd->raw_connected_peer_cnt;
 
-       DBG(LOG_VERBOSE, "%dth connected peer. [%s] [%s]\n", peer_cnt, peer->device_name, peer->mac_address);
+       WDUG_LOGI("%dth connected peer. [%s] [%s]\n", peer_cnt, peer->device_name, peer->mac_address);
 
        strncpy(ugd->raw_connected_peers[peer_cnt].ssid, peer->device_name, sizeof(ugd->raw_connected_peers[peer_cnt].ssid));
        ugd->raw_connected_peers[peer_cnt].category = peer->primary_device_type;
@@ -604,9 +604,9 @@ bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_
        strncpy(ugd->raw_connected_peers[peer_cnt].if_addr, peer->interface_address, MAC_LENGTH);
        ugd->raw_connected_peers[peer_cnt].conn_status = PEER_CONN_STATUS_CONNECTED;
 
-       DBG(LOG_VERBOSE, "\tStatus: [%d]\n", ugd->raw_connected_peers[peer_cnt].conn_status);
-       DBG(LOG_VERBOSE, "\tCategory: [%d]\n", ugd->raw_connected_peers[peer_cnt].category);
-       DBG(LOG_VERBOSE, "\tSSID: [%s]\n", ugd->raw_connected_peers[peer_cnt].ssid);
+       WDUG_LOGI("\tStatus: [%d]\n", ugd->raw_connected_peers[peer_cnt].conn_status);
+       WDUG_LOGI("\tCategory: [%d]\n", ugd->raw_connected_peers[peer_cnt].category);
+       WDUG_LOGI("\tSSID: [%s]\n", ugd->raw_connected_peers[peer_cnt].ssid);
 
        ugd->raw_connected_peer_cnt++;
 
@@ -615,7 +615,7 @@ bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_
        free(peer->interface_address);
        free(peer);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return TRUE;
 }
 
@@ -626,7 +626,7 @@ bool _wfd_connected_peer_cb(wifi_direct_connected_peer_info_s *peer, void *user_
  */
 int wfd_ug_get_discovered_peers(struct ug_data *ugd)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res = 0;
 
        if (ugd == NULL) {
@@ -637,10 +637,10 @@ int wfd_ug_get_discovered_peers(struct ug_data *ugd)
        res = wifi_direct_foreach_discovered_peers(_wfd_discoverd_peer_cb, (void *)ugd);
        if (res != WIFI_DIRECT_ERROR_NONE) {
                ugd->raw_discovered_peer_cnt = 0;
-               DBG(LOG_ERROR, "Get discovery result failed: %d\n", res);
+               WDUG_LOGE("Get discovery result failed: %d\n", res);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -651,7 +651,7 @@ int wfd_ug_get_discovered_peers(struct ug_data *ugd)
  */
 int wfd_ug_get_connected_peers(struct ug_data *ugd)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res = 0;
 
        if (ugd == NULL) {
@@ -662,10 +662,10 @@ int wfd_ug_get_connected_peers(struct ug_data *ugd)
        res = wifi_direct_foreach_connected_peers(_wfd_connected_peer_cb, (void *)ugd);
        if (res != WIFI_DIRECT_ERROR_NONE) {
                ugd->raw_connected_peer_cnt = 0;
-               DBG(LOG_ERROR, "Get connected peer failed: %d\n", res);
+               WDUG_LOGE("Get connected peer failed: %d\n", res);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -681,19 +681,19 @@ static Eina_Bool _wfd_automatic_deactivated_for_no_connection_cb(void *user_data
        struct ug_data *ugd = (struct ug_data *)user_data;
 
        if (NULL == ugd) {
-               DBG(LOG_ERROR, "NULL parameters.\n");
+               WDUG_LOGE("NULL parameters.\n");
                return ECORE_CALLBACK_CANCEL;
        }
 
        /* check the action, if action is exist, keep the cb */
        res = wifi_direct_get_state(&ugd->wfd_status);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to get link status. [%d]\n", res);
+               WDUG_LOGE("Failed to get link status. [%d]\n", res);
                return ECORE_CALLBACK_CANCEL;
        }
 
        if (ugd->last_wfd_status != ugd->wfd_status) {
-               DBG(LOG_ERROR, "Action is exist, last status: %d\n",
+               WDUG_LOGE("Action is exist, last status: %d\n",
                        ugd->last_wfd_status);
                ugd->last_wfd_status = ugd->wfd_status;
                ugd->last_wfd_time = time(NULL);
@@ -709,7 +709,7 @@ static Eina_Bool _wfd_automatic_deactivated_for_no_connection_cb(void *user_data
        /* turn off the Wi-Fi Direct */
        wifi_direct_get_state(&ugd->wfd_status);
        if (ugd->wfd_status < WIFI_DIRECT_STATE_ACTIVATING) {
-               DBG(LOG_ERROR, "Wi-Fi Direct is already deactivated\n");
+               WDUG_LOGE("Wi-Fi Direct is already deactivated\n");
        } else {
                wfd_ug_warn_popup(ugd, IDS_WFD_POP_AUTOMATIC_TURN_OFF, POP_TYPE_AUTOMATIC_TURN_OFF);
        }
@@ -726,18 +726,18 @@ static Eina_Bool _wfd_automatic_deactivated_for_no_connection_cb(void *user_data
  */
 void _discover_cb(int error_code, wifi_direct_discovery_state_e discovery_state, void *user_data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)user_data;
 
        if (ugd == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return;
        }
 
-       DBG(LOG_VERBOSE, "Discovery event [%d], error_code [%d]\n", discovery_state, error_code);
+       WDUG_LOGI("Discovery event [%d], error_code [%d]\n", discovery_state, error_code);
 
        if (discovery_state == WIFI_DIRECT_ONLY_LISTEN_STARTED) {
-               __FUNC_EXIT__;
+               __WDUG_LOG_FUNC_EXIT__;
                return;
        } else if (discovery_state == WIFI_DIRECT_DISCOVERY_STARTED) {
                ugd->head_text_mode = HEAD_TEXT_TYPE_SCANING;
@@ -785,7 +785,7 @@ void _discover_cb(int error_code, wifi_direct_discovery_state_e discovery_state,
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -799,17 +799,17 @@ void _discover_cb(int error_code, wifi_direct_discovery_state_e discovery_state,
  */
 void _connection_cb(int error_code, wifi_direct_connection_state_e connection_state, const char *mac_address, void *user_data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)user_data;
        device_type_s *peer = NULL;
        bool owner = FALSE;
        int res = 0;
 
-       DBG(LOG_VERBOSE, "Connection event [%d], error_code [%d], multi_connect_mode [%d]\n",
+       WDUG_LOGI("Connection event [%d], error_code [%d], multi_connect_mode [%d]\n",
                connection_state, error_code, ugd->multi_connect_mode);
 
        if (mac_address == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(peer mac is NULL)\n");
+               WDUG_LOGE("Incorrect parameter(peer mac is NULL)\n");
                return;
        }
 
@@ -818,7 +818,7 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                peer = wfd_client_find_peer_by_mac(ugd, mac_address);
 
                if (NULL == peer || '\0' == peer->ssid[0]) {
-                       DBG(LOG_ERROR, "invalid peer from connection !!\n");
+                       WDUG_LOGE("invalid peer from connection !!\n");
                        goto refresh_button;
                }
        }
@@ -826,7 +826,7 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
        if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_IN_PROGRESS) {
                switch (connection_state) {
                case WIFI_DIRECT_CONNECTION_RSP:
-                       DBG(LOG_VERBOSE, "MULTI: WIFI_DIRECT_CONNECTION_RSP\n");
+                       WDUG_LOGI("MULTI: WIFI_DIRECT_CONNECTION_RSP\n");
 
                        if (error_code == WIFI_DIRECT_ERROR_NONE) {
                                peer->conn_status = PEER_CONN_STATUS_CONNECTED;
@@ -841,12 +841,12 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        ugd->g_source_multi_connect_next = g_timeout_add(1000, wfd_multi_connect_next_cb, ugd);
                        break;
                case WIFI_DIRECT_CONNECTION_IN_PROGRESS:
-                       DBG(LOG_VERBOSE, "MULTI: WIFI_DIRECT_CONNECTION_IN_PROGRESS\n");
+                       WDUG_LOGI("MULTI: WIFI_DIRECT_CONNECTION_IN_PROGRESS\n");
                        peer->conn_status = PEER_CONN_STATUS_CONNECTING;
                        wfd_ug_view_update_peers(ugd);
                        break;
                case WIFI_DIRECT_GROUP_CREATED:
-                       DBG(LOG_VERBOSE, "MULTI: WIFI_DIRECT_GROUP_CREATED\n");
+                       WDUG_LOGI("MULTI: WIFI_DIRECT_GROUP_CREATED\n");
                        wfd_multi_connect_next_cb(ugd);
                        break;
                default:
@@ -855,7 +855,7 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
        } else {
                switch (connection_state) {
                case WIFI_DIRECT_CONNECTION_RSP:
-                       DBG(LOG_VERBOSE, "WIFI_DIRECT_CONNECTION_RSP\n");
+                       WDUG_LOGI("WIFI_DIRECT_CONNECTION_RSP\n");
 
                        if (error_code == WIFI_DIRECT_ERROR_NONE) {
                                peer->conn_status = PEER_CONN_STATUS_CONNECTED;
@@ -867,7 +867,7 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        wfd_ug_view_update_peers(ugd);
                        break;
                case WIFI_DIRECT_DISASSOCIATION_IND:
-                       DBG(LOG_VERBOSE, "WIFI_DIRECT_DISASSOCIATION_IND\n");
+                       WDUG_LOGI("WIFI_DIRECT_DISASSOCIATION_IND\n");
                        /* change the multi connection mode, it can be connected now */
                        if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_COMPLETED) {
                                ugd->multi_connect_mode = WFD_MULTI_CONNECT_MODE_IN_PROGRESS;
@@ -880,7 +880,7 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        break;
                case WIFI_DIRECT_DISCONNECTION_RSP:
                case WIFI_DIRECT_DISCONNECTION_IND:
-                       DBG(LOG_VERBOSE, "WIFI_DIRECT_DISCONNECTION_X\n");
+                       WDUG_LOGI("WIFI_DIRECT_DISCONNECTION_X\n");
 
                        /* when disconnection, clear all the connected peers */
                        if (ugd->raw_connected_peer_cnt > 0) {
@@ -892,23 +892,23 @@ void _connection_cb(int error_code, wifi_direct_connection_state_e connection_st
                        /* start discovery again */
                        res = wifi_direct_start_discovery(FALSE, MAX_SCAN_TIME_OUT);
                        if (res != WIFI_DIRECT_ERROR_NONE) {
-                               DBG(LOG_ERROR, "Failed to start discovery. [%d]\n", res);
+                               WDUG_LOGE("Failed to start discovery. [%d]\n", res);
                                ugd->is_re_discover = TRUE;
                                wifi_direct_cancel_discovery();
                        } else {
-                               DBG(LOG_VERBOSE, "Discovery is started\n");
+                               WDUG_LOGI("Discovery is started\n");
                                ugd->is_re_discover = FALSE;
                        }
 
                        break;
                case WIFI_DIRECT_CONNECTION_IN_PROGRESS:
-                       DBG(LOG_VERBOSE, "WIFI_DIRECT_CONNECTION_IN_PROGRESS\n");
+                       WDUG_LOGI("WIFI_DIRECT_CONNECTION_IN_PROGRESS\n");
                        peer->conn_status = PEER_CONN_STATUS_CONNECTING;
                        wfd_ug_view_update_peers(ugd);
                        break;
                case WIFI_DIRECT_CONNECTION_REQ:
                case WIFI_DIRECT_CONNECTION_WPS_REQ:
-                       DBG(LOG_VERBOSE, "WIFI_DIRECT_CLI_EVENT_CONNECTION_REQ\n");
+                       WDUG_LOGI("WIFI_DIRECT_CLI_EVENT_CONNECTION_REQ\n");
                        break;
                default:
                        break;
@@ -938,7 +938,7 @@ refresh_button:
                                }
                        }
                } else {
-                   DBG(LOG_ERROR, "Failed to get whether client is group owner. [%d]\n", res);
+                   WDUG_LOGE("Failed to get whether client is group owner. [%d]\n", res);
                }
        } else {
                if (ugd->scan_btn) {
@@ -952,7 +952,7 @@ refresh_button:
 
        /* if no connection, start the monitor timer */
        wifi_direct_get_state(&ugd->wfd_status);
-       DBG(LOG_VERBOSE, "status: %d", ugd->wfd_status);
+       WDUG_LOGI("status: %d", ugd->wfd_status);
 
        if (ugd->wfd_status >= WIFI_DIRECT_STATE_CONNECTED) {
                if (ugd->monitor_timer) {
@@ -961,14 +961,14 @@ refresh_button:
                }
        } else {
                if (NULL == ugd->monitor_timer) {
-                       DBG(LOG_VERBOSE, "start the monitor timer\n");
+                       WDUG_LOGI("start the monitor timer\n");
                        ugd->last_wfd_time = time(NULL);
                        ugd->monitor_timer = ecore_timer_add(5.0,
                                (Ecore_Task_Cb)_wfd_automatic_deactivated_for_no_connection_cb, ugd);
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -979,14 +979,14 @@ refresh_button:
  */
 int wfd_get_vconf_status(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        char *dev_name;
        int wifi_direct_state = 0;
 
        /* get wifi direct status from vconf */
        if (vconf_get_int(VCONFKEY_WIFI_DIRECT_STATE, &wifi_direct_state) < 0) {
-               DBG(LOG_ERROR, "Error reading vconf (%s)\n", VCONFKEY_WIFI_DIRECT_STATE);
+               WDUG_LOGE("Error reading vconf (%s)\n", VCONFKEY_WIFI_DIRECT_STATE);
                return -1;
        }
 
@@ -996,13 +996,13 @@ int wfd_get_vconf_status(void *data)
        dev_name = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR);
        if (dev_name == NULL) {
                ugd->dev_name = strdup(DEFAULT_DEV_NAME);
-               DBG(LOG_ERROR, "The AP name is NULL(setting default value)\n");
+               WDUG_LOGE("The AP name is NULL(setting default value)\n");
        } else {
                ugd->dev_name = strdup(dev_name);
                free(dev_name);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1013,21 +1013,21 @@ int wfd_get_vconf_status(void *data)
  */
 int wfd_refresh_wifi_direct_state(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
        wifi_direct_state_e wfd_status;
 
        res = wifi_direct_get_state(&wfd_status);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to get link status. [%d]\n", res);
+               WDUG_LOGE("Failed to get link status. [%d]\n", res);
                return -1;
        }
 
-       DBG(LOG_VERBOSE, "WFD status [%d]", wfd_status);
+       WDUG_LOGI("WFD status [%d]", wfd_status);
        ugd->wfd_status = wfd_status;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1038,37 +1038,37 @@ int wfd_refresh_wifi_direct_state(void *data)
  */
 int init_wfd_client(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res = 0;
 
        res = wifi_direct_initialize();
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to initialize wifi direct. [%d]\n", res);
+               WDUG_LOGE("Failed to initialize wifi direct. [%d]\n", res);
                return -1;
        }
 
        res = wifi_direct_initialize();
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to initialize Wi-Fi Direct. error code = [%d]\n", res);
+               WDUG_LOGE("Failed to initialize Wi-Fi Direct. error code = [%d]\n", res);
                return -1;
        }
 
        res = wifi_direct_set_device_state_changed_cb(_activation_cb, (void *)ugd);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to register _cb_activation. error code = [%d]\n", res);
+               WDUG_LOGE("Failed to register _cb_activation. error code = [%d]\n", res);
                return -1;
        }
 
        res = wifi_direct_set_discovery_state_changed_cb(_discover_cb, (void *)ugd);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to register _cb_discover. error code = [%d]\n", res);
+               WDUG_LOGE("Failed to register _cb_discover. error code = [%d]\n", res);
                return -1;
        }
 
        res = wifi_direct_set_connection_state_changed_cb(_connection_cb, (void *)ugd);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to register _cb_connection. error code = [%d]\n", res);
+               WDUG_LOGE("Failed to register _cb_connection. error code = [%d]\n", res);
                return -1;
        }
 
@@ -1080,7 +1080,7 @@ int init_wfd_client(void *data)
                ugd->wfd_onoff = 0;
        }
 
-       DBG(LOG_VERBOSE, "WFD link status. [%d]\n", ugd->wfd_status);
+       WDUG_LOGI("WFD link status. [%d]\n", ugd->wfd_status);
 
        /* start the monitor timer */
        ugd->last_wfd_time = time(NULL);
@@ -1089,7 +1089,7 @@ int init_wfd_client(void *data)
 
        ugd->is_re_discover = FALSE;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1100,7 +1100,7 @@ int init_wfd_client(void *data)
  */
 int deinit_wfd_client(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res = 0;
        tethering_error_e ret = TETHERING_ERROR_NONE;
@@ -1109,13 +1109,13 @@ int deinit_wfd_client(void *data)
        wfd_refresh_wifi_direct_state(ugd);
 
        if (ugd->wfd_status == WIFI_DIRECT_STATE_DISCOVERING) {
-               DBG(LOG_VERBOSE, "Stop discovery before deregister client\n");
+               WDUG_LOGI("Stop discovery before deregister client\n");
                wifi_direct_cancel_discovery();
        }
 
        res = wifi_direct_deinitialize();
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to deregister client. [%d]\n", res);
+               WDUG_LOGE("Failed to deregister client. [%d]\n", res);
        }
 
        /* release monitor timer */
@@ -1127,22 +1127,22 @@ int deinit_wfd_client(void *data)
        /* release vconf, hotspot..  */
        res = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wifi_state_cb);
        if (res == -1) {
-               DBG(LOG_ERROR, "Failed to ignore vconf key callback for wifi state\n");
+               WDUG_LOGE("Failed to ignore vconf key callback for wifi state\n");
        }
 
        res = net_deregister_client();
        if (res != NET_ERR_NONE) {
-               DBG(LOG_ERROR, "Failed to deregister network client. [%d]\n", res);
+               WDUG_LOGE("Failed to deregister network client. [%d]\n", res);
        }
 
        res = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _enable_hotspot_state_cb);
        if (res == -1) {
-               DBG(LOG_ERROR, "Failed to ignore vconf key callback for hotspot state\n");
+               WDUG_LOGE("Failed to ignore vconf key callback for hotspot state\n");
        }
 
        res = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _disable_hotspot_state_cb);
        if (res == -1) {
-               DBG(LOG_ERROR, "Failed to ignore vconf key callback for hotspot state\n");
+               WDUG_LOGE("Failed to ignore vconf key callback for hotspot state\n");
        }
 
        th = ugd->hotspot_handle;
@@ -1151,24 +1151,24 @@ int deinit_wfd_client(void *data)
                /* Deregister cbs */
                ret = tethering_unset_enabled_cb(th, TETHERING_TYPE_WIFI);
                if (ret != TETHERING_ERROR_NONE) {
-                       DBG(LOG_ERROR, "tethering_unset_enabled_cb is failed(%d)\n", ret);
+                       WDUG_LOGE("tethering_unset_enabled_cb is failed(%d)\n", ret);
                }
 
                ret = tethering_unset_disabled_cb(th, TETHERING_TYPE_WIFI);
                if (ret != TETHERING_ERROR_NONE) {
-                       DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret);
+                       WDUG_LOGE("tethering_unset_disabled_cb is failed(%d)\n", ret);
                }
 
                /* Destroy tethering handle */
                ret = tethering_destroy(th);
                if (ret != TETHERING_ERROR_NONE) {
-                       DBG(LOG_ERROR, "tethering_destroy is failed(%d)\n", ret);
+                       WDUG_LOGE("tethering_destroy is failed(%d)\n", ret);
                }
 
                ugd->hotspot_handle = NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1179,38 +1179,38 @@ int deinit_wfd_client(void *data)
  */
 int wfd_client_switch_on(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
 
        wfd_refresh_wifi_direct_state(ugd);
-       DBG(LOG_VERBOSE, "WFD status [%d]\n", ugd->wfd_status);
+       WDUG_LOGI("WFD status [%d]\n", ugd->wfd_status);
 
        if (ugd->wfd_status < WIFI_DIRECT_STATE_ACTIVATING) {
                int wifi_state;
                res = vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state);
                if (res != 0) {
-                       DBG(LOG_ERROR, "Failed to get wifi state from vconf. [%d]\n", res);
+                       WDUG_LOGE("Failed to get wifi state from vconf. [%d]\n", res);
                        return -1;
                }
 
                int hotspot_mode;
                res = vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_mode);
                if (res != 0) {
-                       DBG(LOG_ERROR, "Failed to get mobile hotspot state from vconf. [%d]\n", res);
+                       WDUG_LOGE("Failed to get mobile hotspot state from vconf. [%d]\n", res);
                        return -1;
                }
 
                if (wifi_state > VCONFKEY_WIFI_OFF) {
-                       DBG(LOG_VERBOSE, "WiFi is connected, so have to turn off WiFi");
+                       WDUG_LOGI("WiFi is connected, so have to turn off WiFi");
                        wfd_ug_act_popup(ugd, _("IDS_WFD_POP_WIFI_OFF"), POPUP_TYPE_WIFI_OFF);
                } else if (hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI) {
-                       DBG(LOG_VERBOSE, "WiFi is connected, so have to turn off WiFi");
+                       WDUG_LOGI("WiFi is connected, so have to turn off WiFi");
                        wfd_ug_act_popup(ugd, _("IDS_WFD_POP_HOTSPOT_OFF"), POPUP_TYPE_HOTSPOT_OFF);
                } else {
                        res = wifi_direct_activate();
                        if (res != WIFI_DIRECT_ERROR_NONE) {
-                               DBG(LOG_ERROR, "Failed to activate Wi-Fi Direct. error code = [%d]\n", res);
+                               WDUG_LOGE("Failed to activate Wi-Fi Direct. error code = [%d]\n", res);
                                wfd_ug_warn_popup(ugd, _("IDS_WFD_POP_ACTIVATE_FAIL"), POPUP_TYPE_TERMINATE);
 
                                ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
@@ -1236,10 +1236,10 @@ int wfd_client_switch_on(void *data)
                        }
                }
        } else {
-               DBG(LOG_VERBOSE, "Wi-Fi Direct is already activated\n");
+               WDUG_LOGI("Wi-Fi Direct is already activated\n");
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1250,28 +1250,28 @@ int wfd_client_switch_on(void *data)
  */
 int wfd_client_switch_off(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
 
        wfd_refresh_wifi_direct_state(ugd);
-       DBG(LOG_VERBOSE, "WFD status [%d]\n", ugd->wfd_status);
+       WDUG_LOGI("WFD status [%d]\n", ugd->wfd_status);
 
        if (ugd->wfd_status < WIFI_DIRECT_STATE_ACTIVATING) {
-               DBG(LOG_VERBOSE, "Wi-Fi Direct is already deactivated\n");
+               WDUG_LOGI("Wi-Fi Direct is already deactivated\n");
        } else {
                /*if connected, disconnect all devices*/
                if (WIFI_DIRECT_STATE_CONNECTED == ugd->wfd_status) {
                        res = wifi_direct_disconnect_all();
                        if (res != WIFI_DIRECT_ERROR_NONE) {
-                               DBG(LOG_ERROR, "Failed to send disconnection request to all. [%d]\n", res);
+                               WDUG_LOGE("Failed to send disconnection request to all. [%d]\n", res);
                                return -1;
                        }
                }
 
                res = wifi_direct_deactivate();
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to deactivate Wi-Fi Direct. error code = [%d]\n", res);
+                       WDUG_LOGE("Failed to deactivate Wi-Fi Direct. error code = [%d]\n", res);
                        wfd_ug_warn_popup(ugd, _("IDS_WFD_POP_DEACTIVATE_FAIL"), POPUP_TYPE_TERMINATE);
 
                        ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
@@ -1297,7 +1297,7 @@ int wfd_client_switch_off(void *data)
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1309,14 +1309,14 @@ int wfd_client_switch_off(void *data)
  */
 int wfd_client_swtch_force(void *data, int onoff)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
 
        if (onoff) {
                res = wifi_direct_activate();
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to activate Wi-Fi Direct. error code = [%d]\n", res);
+                       WDUG_LOGE("Failed to activate Wi-Fi Direct. error code = [%d]\n", res);
                        wfd_ug_warn_popup(ugd, _("IDS_WFD_POP_ACTIVATE_FAIL"), POPUP_TYPE_TERMINATE);
 
                        ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
@@ -1326,7 +1326,7 @@ int wfd_client_swtch_force(void *data, int onoff)
        } else {
                res = wifi_direct_deactivate();
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to deactivate Wi-Fi Direct. error code = [%d]\n", res);
+                       WDUG_LOGE("Failed to deactivate Wi-Fi Direct. error code = [%d]\n", res);
                        wfd_ug_warn_popup(ugd, _("IDS_WFD_POP_DEACTIVATE_FAIL"), POPUP_TYPE_TERMINATE);
 
                        ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
@@ -1335,7 +1335,7 @@ int wfd_client_swtch_force(void *data, int onoff)
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1345,17 +1345,17 @@ int wfd_client_swtch_force(void *data, int onoff)
  */
 int wfd_client_group_add()
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res;
 
        res = wifi_direct_create_group();
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to add group");
-               __FUNC_EXIT__;
+               WDUG_LOGE("Failed to add group");
+               __WDUG_LOG_FUNC_EXIT__;
                return -1;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1366,17 +1366,17 @@ int wfd_client_group_add()
  */
 int wfd_client_connect(const char *mac_addr)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res;
 
-       DBG(LOG_ERROR, "connect to peer=[%s]\n", mac_addr);
+       WDUG_LOGE("connect to peer=[%s]\n", mac_addr);
        res = wifi_direct_connect(mac_addr);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to send connection request. [%d]\n", res);
+               WDUG_LOGE("Failed to send connection request. [%d]\n", res);
                return -1;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1387,24 +1387,24 @@ int wfd_client_connect(const char *mac_addr)
  */
 int wfd_client_disconnect(const char *mac_addr)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res;
 
        if (mac_addr == NULL) {
                res = wifi_direct_disconnect_all();
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to send disconnection request to all. [%d]\n", res);
+                       WDUG_LOGE("Failed to send disconnection request to all. [%d]\n", res);
                        return -1;
                }
        } else {
                res = wifi_direct_disconnect(mac_addr);
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to send disconnection request. [%d]\n", res);
+                       WDUG_LOGE("Failed to send disconnection request. [%d]\n", res);
                        return -1;
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -1415,15 +1415,15 @@ int wfd_client_disconnect(const char *mac_addr)
  */
 int wfd_client_set_p2p_group_owner_intent(int go_intent)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res;
 
        res = wifi_direct_set_group_owner_intent(go_intent);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to wifi_direct_set_go_intent(%d). [%d]\n", go_intent, res);
+               WDUG_LOGE("Failed to wifi_direct_set_go_intent(%d). [%d]\n", go_intent, res);
                return -1;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
index 0105f0a..18dcb67 100755 (executable)
@@ -53,7 +53,7 @@ struct ug_data *wfd_get_ug_data()
  */
 static Evas_Object *_create_bg(Evas_Object *parent, char *style)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        Evas_Object *bg;
 
        bg = elm_bg_add(parent);
@@ -62,7 +62,7 @@ static Evas_Object *_create_bg(Evas_Object *parent, char *style)
        elm_win_resize_object_add(parent, bg);
        evas_object_show(bg);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return bg;
 }
 
@@ -74,18 +74,18 @@ static Evas_Object *_create_bg(Evas_Object *parent, char *style)
  */
 static Evas_Object *_create_fullview(Evas_Object *parent, struct ug_data *ugd)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        Evas_Object *base;
 
        if (parent == NULL) {
-               DBG(LOG_ERROR, "Incorrenct parameter");
+               WDUG_LOGE( "Incorrenct parameter");
                return NULL;
        }
 
        /* Create Full view */
        base = elm_layout_add(parent);
        if (!base) {
-               DBG(LOG_ERROR, "Failed to add layout");
+               WDUG_LOGE( "Failed to add layout");
                return NULL;
        }
 
@@ -93,7 +93,7 @@ static Evas_Object *_create_fullview(Evas_Object *parent, struct ug_data *ugd)
        evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(base, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return base;
 }
 
@@ -105,18 +105,18 @@ static Evas_Object *_create_fullview(Evas_Object *parent, struct ug_data *ugd)
  */
 static Evas_Object *_create_frameview(Evas_Object *parent, struct ug_data *ugd)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        Evas_Object *base;
 
        if (parent == NULL) {
-               DBG(LOG_ERROR, "Incorrenct parameter");
+               WDUG_LOGE( "Incorrenct parameter");
                return NULL;
        }
 
        /* Create Frame view */
        base = elm_layout_add(parent);
        if (!base) {
-               DBG(LOG_ERROR, "Failed to add layout");
+               WDUG_LOGE( "Failed to add layout");
                return NULL;
        }
 
@@ -124,7 +124,7 @@ static Evas_Object *_create_frameview(Evas_Object *parent, struct ug_data *ugd)
        evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(base, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return base;
 }
 
@@ -135,7 +135,7 @@ static Evas_Object *_create_frameview(Evas_Object *parent, struct ug_data *ugd)
  */
 void destroy_wfd_ug_view(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (ugd->genlist) {
@@ -148,7 +148,7 @@ void destroy_wfd_ug_view(void *data)
                ugd->naviframe = NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -158,25 +158,25 @@ void destroy_wfd_ug_view(void *data)
  */
 gboolean _wfd_init_cb(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res = -1;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (ugd->wfd_status == WIFI_DIRECT_STATE_DEACTIVATED) {
                res = init_wfd_client(ugd);
                if (res != 0) {
-                       DBG(LOG_ERROR, "Failed to initialize WFD client library\n");
+                       WDUG_LOGE( "Failed to initialize WFD client library\n");
                        return true;
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return false;
 }
 
 static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, void *priv)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd;
        int res = 0;
 
@@ -204,7 +204,7 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, voi
                ugd->bg = _create_bg(ugd->win, "group_list");
                elm_object_part_content_set(ugd->base, "elm.swallow.bg", ugd->bg);
        } else {
-               DBG(LOG_ERROR, "Failed to create base layout\n");
+               WDUG_LOGE( "Failed to create base layout\n");
                return NULL;
        }
 
@@ -218,7 +218,7 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, voi
        if (ugd->wfd_status > WIFI_DIRECT_STATE_DEACTIVATED || service) {
                res = init_wfd_client(ugd);
                if (res != 0) {
-                       DBG(LOG_ERROR, "Failed to initialize WFD client library\n");
+                       WDUG_LOGE( "Failed to initialize WFD client library\n");
                }
 
                if (service) {
@@ -259,11 +259,11 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, voi
                /* start discovery */
                res = wifi_direct_start_discovery(FALSE, MAX_SCAN_TIME_OUT);
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to start discovery. [%d]\n", res);
+                       WDUG_LOGE( "Failed to start discovery. [%d]\n", res);
                        ugd->is_re_discover = TRUE;
                        wifi_direct_cancel_discovery();
                } else {
-                       DBG(LOG_VERBOSE, "Discovery is started\n");
+                       WDUG_LOGI("Discovery is started\n");
                        ugd->is_re_discover = FALSE;
                }
        }
@@ -275,13 +275,13 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, voi
 
        evas_object_show(ugd->base);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return ugd->base;
 }
 
 static void on_start(ui_gadget_h ug, service_h service, void *priv)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd;
        int res;
 
@@ -294,147 +294,147 @@ static void on_start(ui_gadget_h ug, service_h service, void *priv)
        struct utsname kernel_info;
        res = uname(&kernel_info);
        if (res != 0) {
-               DBG(LOG_ERROR, "Failed to detect target type\n");
+               WDUG_LOGE( "Failed to detect target type\n");
        } else {
-               DBG(LOG_VERBOSE, "HW ID of this device [%s]\n", kernel_info.machine);
+               WDUG_LOGI("HW ID of this device [%s]\n", kernel_info.machine);
                if (strncmp(kernel_info.machine, "arm", 3) != 0) {
                        wfd_ug_warn_popup(ugd, _("IDS_WFD_POP_NOT_SUPPORTED_DEVICE"), POPUP_TYPE_TERMINATE);
                        return;
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 static void on_pause(ui_gadget_h ug, service_h service, void *priv)
 {
-       __FUNC_ENTER__;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_ENTER__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 static void on_resume(ui_gadget_h ug, service_h service, void *priv)
 {
-       __FUNC_ENTER__;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_ENTER__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 static void on_destroy(ui_gadget_h ug, service_h service, void *priv)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (!ug || !priv) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE( "The param is NULL\n");
                return;
        }
 
        struct ug_data *ugd = priv;
        if (ugd == NULL || ugd->base == NULL) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE( "The param is NULL\n");
                return;
        }
 
        deinit_wfd_client(ugd);
-       DBG(LOG_VERBOSE, "WFD client deregistered");
+       WDUG_LOGI("WFD client deregistered");
 
        destroy_wfd_ug_view(ugd);
-       DBG(LOG_VERBOSE, "Destroying About item");
+       WDUG_LOGI("Destroying About item");
 
        wfd_ug_view_free_peers(ugd);
 
-       DBG(LOG_VERBOSE, "WFD client deregistered");
+       WDUG_LOGI("WFD client deregistered");
        if (ugd->bg) {
                evas_object_del(ugd->bg);
                ugd->bg = NULL;
        }
-       DBG(LOG_VERBOSE, "WFD client deregistered");
+       WDUG_LOGI("WFD client deregistered");
 
        if (ugd->base) {
                evas_object_del(ugd->base);
                ugd->base = NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
 static void on_message(ui_gadget_h ug, service_h msg, service_h service, void *priv)
 {
-       __FUNC_ENTER__;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_ENTER__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 static void on_event(ui_gadget_h ug, enum ug_event event, service_h service, void *priv)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (!ug || !priv) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE( "The param is NULL\n");
                return;
        }
 
        switch (event) {
        case UG_EVENT_LOW_MEMORY:
-               DBG(LOG_VERBOSE, "UG_EVENT_LOW_MEMORY\n");
+               WDUG_LOGI("UG_EVENT_LOW_MEMORY\n");
                break;
        case UG_EVENT_LOW_BATTERY:
-               DBG(LOG_VERBOSE, "UG_EVENT_LOW_BATTERY\n");
+               WDUG_LOGI("UG_EVENT_LOW_BATTERY\n");
                break;
        case UG_EVENT_LANG_CHANGE:
-               DBG(LOG_VERBOSE, "UG_EVENT_LANG_CHANGE\n");
+               WDUG_LOGI("UG_EVENT_LANG_CHANGE\n");
                break;
        case UG_EVENT_ROTATE_PORTRAIT:
-               DBG(LOG_VERBOSE, "UG_EVENT_ROTATE_PORTRAIT\n");
+               WDUG_LOGI("UG_EVENT_ROTATE_PORTRAIT\n");
                break;
        case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
-               DBG(LOG_VERBOSE, "UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN\n");
+               WDUG_LOGI("UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN\n");
                break;
        case UG_EVENT_ROTATE_LANDSCAPE:
-               DBG(LOG_VERBOSE, "UG_EVENT_ROTATE_LANDSCAPE\n");
+               WDUG_LOGI("UG_EVENT_ROTATE_LANDSCAPE\n");
                break;
        case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
-               DBG(LOG_VERBOSE, "UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN\n");
+               WDUG_LOGI("UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN\n");
                break;
        default:
-               DBG(LOG_VERBOSE, "default\n");
+               WDUG_LOGI("default\n");
                break;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 static void on_key_event(ui_gadget_h ug, enum ug_key_event event, service_h service, void *priv)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (!ug || !priv) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE( "The param is NULL\n");
                return;
        }
 
        switch (event) {
        case UG_KEY_EVENT_END:
-               DBG(LOG_VERBOSE, "UG_KEY_EVENT_END\n");
+               WDUG_LOGI("UG_KEY_EVENT_END\n");
                break;
        default:
                break;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd;
 
        if (!ops) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE( "The param is NULL\n");
                return -1;
        }
 
        ugd = calloc(1, sizeof(struct ug_data));
        if (ugd == NULL) {
-               DBG(LOG_ERROR, "Failed to allocate memory for UG data\n");
+               WDUG_LOGE( "Failed to allocate memory for UG data\n");
                return -1;
        }
 
@@ -451,18 +451,18 @@ UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
        ops->priv = ugd;
        ops->opt = UG_OPT_INDICATOR_ENABLE;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
 UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        struct ug_data *ugd;
 
        if (!ops) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE( "The param is NULL\n");
                return;
        }
 
@@ -472,53 +472,53 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
                free(ugd);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 UG_MODULE_API int setting_plugin_reset(service_h service, void *priv)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int res = -1;
        wifi_direct_state_e state;
 
        res = wifi_direct_initialize();
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to initialize wifi direct. [%d]\n", res);
+               WDUG_LOGE( "Failed to initialize wifi direct. [%d]\n", res);
                return -1;
        }
 
        res = wifi_direct_get_state(&state);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to get link status. [%d]\n", res);
+               WDUG_LOGE( "Failed to get link status. [%d]\n", res);
                return -1;
        }
 
        if (state < WIFI_DIRECT_STATE_ACTIVATING) {
-               DBG(LOG_VERBOSE, "No need to reset Wi-Fi Direct.\n");
+               WDUG_LOGI("No need to reset Wi-Fi Direct.\n");
        } else {
                /*if connected, disconnect all devices*/
                if (WIFI_DIRECT_STATE_CONNECTED == state) {
                        res = wifi_direct_disconnect_all();
                        if (res != WIFI_DIRECT_ERROR_NONE) {
-                               DBG(LOG_ERROR, "Failed to send disconnection request to all. [%d]\n", res);
+                               WDUG_LOGE( "Failed to send disconnection request to all. [%d]\n", res);
                                return -1;
                        }
                }
 
                res = wifi_direct_deactivate();
                if (res != WIFI_DIRECT_ERROR_NONE) {
-                       DBG(LOG_ERROR, "Failed to reset Wi-Fi Direct. [%d]\n", res);
+                       WDUG_LOGE( "Failed to reset Wi-Fi Direct. [%d]\n", res);
                        return -1;
                }
        }
 
        res = wifi_direct_deinitialize();
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to deinitialize wifi direct. [%d]\n", res);
+               WDUG_LOGE( "Failed to deinitialize wifi direct. [%d]\n", res);
                return -1;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index e290e15..44774b9
@@ -54,17 +54,17 @@ static char *_wfd_gl_label_help_dialogue_get(void *data, Evas_Object *obj, const
  */
 void _about_view_back_btn_cb(void *data, Evas_Object * obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (!ugd) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE("The param is NULL\n");
                return;
        }
 
        elm_naviframe_item_pop(ugd->naviframe);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -75,7 +75,7 @@ void _about_view_back_btn_cb(void *data, Evas_Object * obj, void *event_info)
  */
 void _wifid_create_about_view(struct ug_data *ugd)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        Evas_Object *back_btn = NULL;
        Elm_Object_Item *navi_item = NULL;
@@ -83,13 +83,13 @@ void _wifid_create_about_view(struct ug_data *ugd)
        Elm_Object_Item *item = NULL;
 
        if (ugd == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)");
+               WDUG_LOGE("Incorrect parameter(NULL)");
                return;
        }
 
        genlist = elm_genlist_add(ugd->naviframe);
        if (NULL == genlist) {
-               DBG(LOG_ERROR, "Create genlist failed\n");
+               WDUG_LOGE("Create genlist failed\n");
                return;
        }
 
@@ -112,5 +112,5 @@ void _wifid_create_about_view(struct ug_data *ugd)
 
        navi_item = elm_naviframe_item_push(ugd->naviframe, IDS_WFD_TITLE_ABOUT_WIFI_DIRECT, back_btn, NULL, genlist, NULL);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
index dae010d..bb2345c 100755 (executable)
@@ -59,17 +59,17 @@ Elm_Gen_Item_Class peer_conn_failed_itc;
  */
 static char *_gl_header_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
-       DBG(LOG_VERBOSE, "%s", part);
+       WDUG_LOGI("%s", part);
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
        if (!strcmp(part, "elm.text.1")) {
-               DBG(LOG_VERBOSE, "Current text mode [%d]\n", ugd->head_text_mode);
+               WDUG_LOGI("Current text mode [%d]\n", ugd->head_text_mode);
                switch (ugd->head_text_mode) {
                case HEAD_TEXT_TYPE_DIRECT:
                case HEAD_TEXT_TYPE_ACTIVATED:
@@ -91,7 +91,7 @@ static char *_gl_header_label_get(void *data, Evas_Object *obj, const char *part
                return strdup(ugd->dev_name);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -104,12 +104,12 @@ static char *_gl_header_label_get(void *data, Evas_Object *obj, const char *part
  */
 static Evas_Object *_gl_header_icon_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
        Evas_Object *onoff = NULL;
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
@@ -125,7 +125,7 @@ static Evas_Object *_gl_header_icon_get(void *data, Evas_Object *obj, const char
                evas_object_show(onoff);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return onoff;
 }
 
@@ -138,15 +138,15 @@ static Evas_Object *_gl_header_icon_get(void *data, Evas_Object *obj, const char
  */
 static char *_gl_name_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
-       DBG(LOG_VERBOSE, "%s", part);
+       WDUG_LOGI("%s", part);
 
        if (!strcmp(part, "elm.text")) {
                return strdup(IDS_WFD_TITLE_ABOUT_WIFI_DIRECT);
@@ -154,7 +154,7 @@ static char *_gl_name_label_get(void *data, Evas_Object *obj, const char *part)
                return strdup(ugd->dev_name);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -167,11 +167,11 @@ static char *_gl_name_label_get(void *data, Evas_Object *obj, const char *part)
  */
 static char *_gl_title_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
@@ -193,7 +193,7 @@ static char *_gl_title_label_get(void *data, Evas_Object *obj, const char *part)
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -210,7 +210,7 @@ static Evas_Object *_gl_title_content_get(void *data, Evas_Object *obj, const ch
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (data == NULL) {
-           DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+           WDUG_LOGE("Incorrect parameter(NULL)\n");
            return NULL;
        }
 
@@ -238,20 +238,20 @@ static Evas_Object *_gl_title_content_get(void *data, Evas_Object *obj, const ch
  */
 static char *_gl_peer_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        assertm_if(NULL == obj, "NULL!!");
        assertm_if(NULL == part, "NULL!!");
        device_type_s *peer = (device_type_s *) data;
        char buf[WFD_GLOBALIZATION_STR_LENGTH] = { 0, };
-       DBG(LOG_VERBOSE, "%s", part);
+       WDUG_LOGI("%s", part);
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
        if (!strcmp(part, "elm.text.1")) {
-               __FUNC_EXIT__;
+               __WDUG_LOG_FUNC_EXIT__;
                return strdup(peer->ssid);
        } else if (!strcmp(part, "elm.text.2")) {
                switch (peer->conn_status) {
@@ -279,11 +279,11 @@ static char *_gl_peer_label_get(void *data, Evas_Object *obj, const char *part)
                        break;
                }
        } else {
-               __FUNC_EXIT__;
+               __WDUG_LOG_FUNC_EXIT__;
                return NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return strdup(buf);
 }
 
@@ -296,7 +296,7 @@ static char *_gl_peer_label_get(void *data, Evas_Object *obj, const char *part)
  */
 static Evas_Object *_gl_peer_icon_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        assertm_if(NULL == obj, "NULL!!");
        assertm_if(NULL == part, "NULL!!");
        device_type_s *peer = (device_type_s *) data;
@@ -304,12 +304,12 @@ static Evas_Object *_gl_peer_icon_get(void *data, Evas_Object *obj, const char *
        struct ug_data *ugd = wfd_get_ug_data();
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
        if (!strcmp(part, "elm.icon.2")) {
-               DBG(LOG_VERBOSE, "elm.icon.2 - connection status [%d]\n", peer->conn_status);
+               WDUG_LOGI("elm.icon.2 - connection status [%d]\n", peer->conn_status);
                if (peer->conn_status == PEER_CONN_STATUS_CONNECTING) {
                        icon = elm_progressbar_add(obj);
                        elm_object_style_set(icon, "list_process");
@@ -322,7 +322,7 @@ static Evas_Object *_gl_peer_icon_get(void *data, Evas_Object *obj, const char *
                elm_icon_resizable_set(icon, 1, 1);
                evas_object_show(icon);
        } else if (!strcmp(part, "elm.icon.1")) {
-               DBG(LOG_VERBOSE, "elm.icon.1 - category [%d]\n", peer->category);
+               WDUG_LOGI("elm.icon.1 - category [%d]\n", peer->category);
                char *img_path = NULL;
                int status = -1;
 
@@ -430,7 +430,7 @@ static Evas_Object *_gl_peer_icon_get(void *data, Evas_Object *obj, const char *
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return icon;
 }
 
@@ -443,14 +443,14 @@ static Evas_Object *_gl_peer_icon_get(void *data, Evas_Object *obj, const char *
  */
 static char *_gl_noitem_text_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return strdup(_("IDS_WFD_NOCONTENT"));
 }
 
@@ -463,33 +463,33 @@ static char *_gl_noitem_text_get(void *data, Evas_Object *obj, const char *part)
  */
 static Evas_Object *_gl_button_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
-       DBG(LOG_VERBOSE, "%s", part);
+       WDUG_LOGI("%s", part);
        ugd->multi_btn = elm_button_add(obj);
        wfd_refresh_wifi_direct_state(ugd);
 
        if (ugd->wfd_status == WIFI_DIRECT_STATE_CONNECTING) {
                elm_object_text_set(ugd->multi_btn, _("IDS_WFD_BUTTON_CANCEL"));
-               DBG(LOG_VERBOSE, "button: Cancel connect\n");
+               WDUG_LOGI("button: Cancel connect\n");
        } else {
                if (ugd->gl_connected_peer_cnt > 1) {
                        elm_object_text_set(ugd->multi_btn, _("IDS_WFD_BUTTON_DISCONNECT_ALL"));
-                       DBG(LOG_VERBOSE, "button: Disconnect All\n");
+                       WDUG_LOGI("button: Disconnect All\n");
                } else if (ugd->gl_connected_peer_cnt == 1) {
                        elm_object_text_set(ugd->multi_btn, _("IDS_WFD_BUTTON_DISCONNECT"));
-                       DBG(LOG_VERBOSE, "button: Disconnect\n");
+                       WDUG_LOGI("button: Disconnect\n");
                } else {
                        elm_object_text_set(ugd->multi_btn, _("IDS_WFD_BUTTON_MULTI"));
-                       DBG(LOG_VERBOSE, "button: Multi connect\n");
+                       WDUG_LOGI("button: Multi connect\n");
                }
        }
 
        evas_object_smart_callback_add(ugd->multi_btn, "clicked", _wifid_create_multibutton_cb, ugd);
        evas_object_show(ugd->multi_btn);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return ugd->multi_btn;
 }
 
@@ -502,10 +502,10 @@ static Evas_Object *_gl_button_get(void *data, Evas_Object *obj, const char *par
  */
 static char *_gl_conn_dev_title_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
@@ -513,7 +513,7 @@ static char *_gl_conn_dev_title_label_get(void *data, Evas_Object *obj, const ch
                return strdup(_("IDS_WFD_BODY_CONNECTED_DEVICES"));
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -526,15 +526,15 @@ static char *_gl_conn_dev_title_label_get(void *data, Evas_Object *obj, const ch
  */
 static char *_gl_peer_conn_dev_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        assertm_if(NULL == obj, "NULL!!");
        assertm_if(NULL == part, "NULL!!");
        device_type_s *peer = (device_type_s *) data;
        char buf[WFD_GLOBALIZATION_STR_LENGTH] = { 0, };
-       DBG(LOG_VERBOSE, "%s", part);
+       WDUG_LOGI("%s", part);
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
@@ -542,7 +542,7 @@ static char *_gl_peer_conn_dev_label_get(void *data, Evas_Object *obj, const cha
                return strdup(peer->ssid);
        } else {
                g_strlcpy(buf, _("IDS_WFD_CONNECTED"), WFD_GLOBALIZATION_STR_LENGTH);
-               __FUNC_EXIT__;
+               __WDUG_LOG_FUNC_EXIT__;
                return strdup(buf);
        }
 }
@@ -557,10 +557,10 @@ static char *_gl_peer_conn_dev_label_get(void *data, Evas_Object *obj, const cha
 static char *_gl_conn_failed_dev_title_label_get(void *data, Evas_Object *obj,
                const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
@@ -568,7 +568,7 @@ static char *_gl_conn_failed_dev_title_label_get(void *data, Evas_Object *obj,
                return strdup(IDS_WFD_BODY_FAILED_DEVICES);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -581,15 +581,15 @@ static char *_gl_conn_failed_dev_title_label_get(void *data, Evas_Object *obj,
  */
 static char *_gl_peer_conn_failed_dev_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        assertm_if(NULL == obj, "NULL!!");
        assertm_if(NULL == part, "NULL!!");
        device_type_s *peer = (device_type_s *) data;
        char buf[WFD_GLOBALIZATION_STR_LENGTH] = { 0, };
-       DBG(LOG_VERBOSE, "%s", part);
+       WDUG_LOGI("%s", part);
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
@@ -597,7 +597,7 @@ static char *_gl_peer_conn_failed_dev_label_get(void *data, Evas_Object *obj, co
                return strdup(peer->ssid);
        } else {
                g_strlcpy(buf, _("IDS_WFD_FAILED_TO_CONNECT"), WFD_GLOBALIZATION_STR_LENGTH);
-               __FUNC_EXIT__;
+               __WDUG_LOG_FUNC_EXIT__;
                return strdup(buf);
        }
 }
@@ -611,11 +611,11 @@ static char *_gl_peer_conn_failed_dev_label_get(void *data, Evas_Object *obj, co
  */
 static char *_gl_multi_connect_dev_title_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = wfd_get_ug_data();
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
@@ -627,7 +627,7 @@ static char *_gl_multi_connect_dev_title_label_get(void *data, Evas_Object *obj,
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -641,10 +641,10 @@ static char *_gl_multi_connect_dev_title_label_get(void *data, Evas_Object *obj,
 static char *_gl_busy_dev_title_label_get(void *data, Evas_Object *obj,
                const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
@@ -652,7 +652,7 @@ static char *_gl_busy_dev_title_label_get(void *data, Evas_Object *obj,
                return strdup(_("IDS_WFD_BODY_BUSY_DEVICES"));
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return NULL;
 }
 
@@ -665,25 +665,25 @@ static char *_gl_busy_dev_title_label_get(void *data, Evas_Object *obj,
  */
 static char *_gl_peer_busy_dev_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        assertm_if(NULL == obj, "NULL!!");
        assertm_if(NULL == part, "NULL!!");
        device_type_s *peer = (device_type_s *) data;
        char buf[WFD_GLOBALIZATION_STR_LENGTH] = { 0, };
-       DBG(LOG_VERBOSE, "%s", part);
+       WDUG_LOGI("%s", part);
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return NULL;
        }
 
-       DBG(LOG_VERBOSE, "peer->ssid = %s", peer->ssid);
+       WDUG_LOGI("peer->ssid = %s", peer->ssid);
 
        if (!strcmp(part, "elm.text.1")) {
                return strdup(peer->ssid);
        } else {
                g_strlcpy(buf, _("IDS_WFD_CONNECTED_WITH_OTHER_DEVICE"), WFD_GLOBALIZATION_STR_LENGTH);
-               __FUNC_EXIT__;
+               __WDUG_LOG_FUNC_EXIT__;
                return strdup(buf);
        }
 }
@@ -696,11 +696,11 @@ static char *_gl_peer_busy_dev_label_get(void *data, Evas_Object *obj, const cha
  */
 static void _gl_peer_del(void *data, Evas_Object *obj)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        assertm_if(NULL == obj, "NULL!!");
        assertm_if(NULL == data, "NULL!!");
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -710,7 +710,7 @@ static void _gl_peer_del(void *data, Evas_Object *obj)
  */
 void initialize_gen_item_class()
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        head_itc.item_style = "dialogue/2text.1icon.10";
        head_itc.func.text_get = _gl_header_label_get;
        head_itc.func.content_get = _gl_header_icon_get;
@@ -788,6 +788,6 @@ void initialize_gen_item_class()
        title_multi_connect_itc.func.state_get = NULL;
        title_multi_connect_itc.func.del = NULL;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 
 }
index b4089ec..59c2439 100755 (executable)
  */
 void _back_btn_cb(void *data, Evas_Object * obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (!ugd) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE("The param is NULL\n");
                return;
        }
 
@@ -55,7 +55,7 @@ void _back_btn_cb(void *data, Evas_Object * obj, void *event_info)
        service_h service = NULL;
        ret = service_create(&service);
        if (ret) {
-               DBG(LOG_ERROR, "Failed to create service");
+               WDUG_LOGE("Failed to create service");
                return;
        }
 
@@ -70,7 +70,7 @@ void _back_btn_cb(void *data, Evas_Object * obj, void *event_info)
        service_destroy(service);
        ug_destroy_me(ugd->ug);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -83,47 +83,47 @@ void _back_btn_cb(void *data, Evas_Object * obj, void *event_info)
  */
 void _scan_btn_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        struct ug_data *ugd = (struct ug_data *) data;
        int ret = -1;
        char *btn_text = NULL;
 
        if (NULL == ugd) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return;
        }
 
        btn_text = (char *)elm_object_text_get(obj);
        if (NULL == btn_text) {
-               DBG(LOG_ERROR, "Incorrect button text(NULL)\n");
+               WDUG_LOGE("Incorrect button text(NULL)\n");
                return;
        }
 
        if (0 == strcmp(btn_text, _("IDS_WFD_BUTTON_SCAN"))) {
                wfd_refresh_wifi_direct_state(ugd);
-               DBG(LOG_VERBOSE, "Start discovery again, status: %d\n", ugd->wfd_status);
+               WDUG_LOGD("Start discovery again, status: %d\n", ugd->wfd_status);
 
                /* if connected, show the popup*/
                if (ugd->wfd_status >= WIFI_DIRECT_STATE_CONNECTED) {
                        wfd_ug_act_popup(ugd, IDS_WFD_POP_SCAN_AGAIN, POP_TYPE_SCAN_AGAIN);
                } else if (WIFI_DIRECT_STATE_DEACTIVATED == ugd->wfd_status) {
                        wfd_client_switch_on(ugd);
-                       __FUNC_EXIT__;
+                       __WDUG_LOG_FUNC_EXIT__;
                        return;
                } else {
                        ret = wifi_direct_start_discovery(FALSE, MAX_SCAN_TIME_OUT);
                        if (ret != WIFI_DIRECT_ERROR_NONE) {
-                               DBG(LOG_ERROR, "Failed to start discovery. [%d]\n", ret);
+                               WDUG_LOGE("Failed to start discovery. [%d]\n", ret);
                                ugd->is_re_discover = TRUE;
                                wifi_direct_cancel_discovery();
                        } else {
-                               DBG(LOG_VERBOSE, "Discovery is started\n");
+                               WDUG_LOGD("Discovery is started\n");
                                ugd->is_re_discover = FALSE;
                        }
                }
        } else if (0 == strcmp(btn_text, _("IDS_WFD_BUTTON_STOPSCAN"))) {
-               DBG(LOG_VERBOSE, "Stop discoverying.\n");
+               WDUG_LOGD("Stop discoverying.\n");
                ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
                wfd_ug_view_refresh_glitem(ugd->head);
 
@@ -132,7 +132,7 @@ void _scan_btn_cb(void *data, Evas_Object *obj, void *event_info)
                wifi_direct_cancel_discovery();
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -145,10 +145,10 @@ void _scan_btn_cb(void *data, Evas_Object *obj, void *event_info)
  */
 static void _gl_header_sel(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        if (NULL == data) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
-               __FUNC_EXIT__;
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
+               __WDUG_LOG_FUNC_EXIT__;
                return;
        }
 
@@ -161,14 +161,14 @@ static void _gl_header_sel(void *data, Evas_Object *obj, void *event_info)
 
        /* turn on/off wfd */
        if (!ugd->wfd_onoff) {
-               DBG(LOG_VERBOSE, "wifi-direct switch on\n");
+               WDUG_LOGD("wifi-direct switch on\n");
                wfd_client_switch_on(ugd);
        } else {
-               DBG(LOG_VERBOSE, "wifi-direct switch off\n");
+               WDUG_LOGD("wifi-direct switch off\n");
                wfd_client_switch_off(ugd);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -180,7 +180,7 @@ static void _gl_header_sel(void *data, Evas_Object *obj, void *event_info)
  */
 static void _gl_peer_sel(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        assertm_if(NULL == obj, "NULL!!");
        assertm_if(NULL == data, "NULL!!");
        device_type_s *peer = (device_type_s *) data;
@@ -188,7 +188,7 @@ static void _gl_peer_sel(void *data, Evas_Object *obj, void *event_info)
        int res;
 
        if (data == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return;
        }
 
@@ -197,21 +197,21 @@ static void _gl_peer_sel(void *data, Evas_Object *obj, void *event_info)
        }
 
        if (peer->conn_status == PEER_CONN_STATUS_DISCONNECTED || peer->is_group_owner == TRUE) {
-               DBG(LOG_VERBOSE, "Connect with peer [%s]\n", peer->mac_addr);
+               WDUG_LOGD("Connect with peer [%s]\n", peer->mac_addr);
                res = wfd_client_connect((const char *) peer->mac_addr);
                if (res != 0) {
-                       DBG(LOG_ERROR, "Failed to send connection request. [%d]\n", res);
+                       WDUG_LOGE("Failed to send connection request. [%d]\n", res);
                        return;
                }
        } else {
                res = wfd_client_disconnect((const char *)peer->mac_addr);
                if (res != 0) {
-                       DBG(LOG_ERROR, "Failed to send disconnection request. [%d]\n", res);
+                       WDUG_LOGE("Failed to send disconnection request. [%d]\n", res);
                        return;
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -224,14 +224,14 @@ static void _gl_peer_sel(void *data, Evas_Object *obj, void *event_info)
  */
 static void _gl_busy_peer_sel(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-       DBG(LOG_VERBOSE, "Busy device is clicked");
+       WDUG_LOGD("Busy device is clicked");
        wfd_ug_warn_popup(ugd, IDS_WFD_POP_WARN_BUSY_DEVICE, POP_TYPE_BUSY_DEVICE_POPUP);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -243,14 +243,14 @@ static void _gl_busy_peer_sel(void *data, Evas_Object *obj, void *event_info)
  */
 static void _gl_about_wifi_sel(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
-       DBG(LOG_VERBOSE, "About wifi clicked");
+       WDUG_LOGD("About wifi clicked");
        _wifid_create_about_view(ugd);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -262,19 +262,19 @@ static void _gl_about_wifi_sel(void *data, Evas_Object *obj, void *event_info)
  */
 void _wifid_create_multibutton_cb(void *data, Evas_Object * obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
        const char *text_lbl = NULL;
 
        text_lbl = elm_object_text_get(ugd->multi_btn);
-       DBG(LOG_VERBOSE, "text_lbl = %s", text_lbl);
+       WDUG_LOGD("text_lbl = %s", text_lbl);
 
        if (ugd->multi_connect_mode == WFD_MULTI_CONNECT_MODE_IN_PROGRESS) {
                ugd->multi_connect_mode = WFD_MULTI_CONNECT_MODE_NONE;
                if (0 == strcmp(_("IDS_WFD_BUTTON_CANCEL"), text_lbl)) {
                        wfd_ug_act_popup(ugd, _("IDS_WFD_POP_CANCEL_CONNECT"), POP_TYPE_DISCONNECT_ALL);
                } else {
-                       DBG(LOG_VERBOSE, "Invalid Case\n");
+                       WDUG_LOGD("Invalid Case\n");
                }
        } else {
                if (0 == strcmp(_("IDS_WFD_BUTTON_MULTI"), text_lbl)) {
@@ -286,11 +286,11 @@ void _wifid_create_multibutton_cb(void *data, Evas_Object * obj, void *event_inf
                } else if (0 == strcmp(_("IDS_WFD_BUTTON_DISCONNECT"), text_lbl)) {
                        wfd_ug_act_popup(ugd, _("IDS_WFD_POP_DISCONNECT"), POP_TYPE_DISCONNECT);
                } else {
-                       DBG(LOG_VERBOSE, "Invalid Case\n");
+                       WDUG_LOGD("Invalid Case\n");
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -300,7 +300,7 @@ void _wifid_create_multibutton_cb(void *data, Evas_Object * obj, void *event_inf
  */
 int _change_multi_button_title(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (ugd->multi_button_item == NULL) {
@@ -321,7 +321,7 @@ int _change_multi_button_title(void *data)
        }
 
        evas_object_show(ugd->multi_btn);
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 
        return 0;
 }
@@ -333,9 +333,9 @@ int _change_multi_button_title(void *data)
  */
 void wfd_ug_view_refresh_glitem(void *obj)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        elm_genlist_item_update(obj);
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -347,18 +347,18 @@ void wfd_ug_view_refresh_glitem(void *obj)
  */
 void wfd_ug_view_refresh_button(void *obj, const char *text, int enable)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (NULL == obj || NULL == text) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return;
        }
 
-       DBG(LOG_VERBOSE, "Set the attributes of button: text[%s], enabled[%d]\n", text, enable);
+       WDUG_LOGD("Set the attributes of button: text[%s], enabled[%d]\n", text, enable);
        elm_object_text_set(obj, text);
        elm_object_disabled_set(obj, !enable);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -369,7 +369,7 @@ void wfd_ug_view_refresh_button(void *obj, const char *text, int enable)
  */
 static bool __wfd_is_device_connected_with_me(struct ug_data *ugd, device_type_s *dev)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int i = 0;
 
        for (i = 0; i < ugd->raw_connected_peer_cnt; i++) {
@@ -379,7 +379,7 @@ static bool __wfd_is_device_connected_with_me(struct ug_data *ugd, device_type_s
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return FALSE;
 }
 
@@ -391,7 +391,7 @@ static bool __wfd_is_device_connected_with_me(struct ug_data *ugd, device_type_s
  */
 static bool __wfd_is_device_busy(struct ug_data *ugd, device_type_s *dev)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        if (ugd->I_am_group_owner == TRUE) {
                if (dev->is_connected || dev->is_group_owner) {
@@ -413,7 +413,7 @@ static bool __wfd_is_device_busy(struct ug_data *ugd, device_type_s *dev)
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return FALSE;
 }
 
@@ -425,7 +425,7 @@ static bool __wfd_is_device_busy(struct ug_data *ugd, device_type_s *dev)
  */
 static bool __wfd_is_any_device_available(struct ug_data *ugd, int* no_of_available_dev)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int i = 0;
 
        for (i = 0; i < ugd->raw_discovered_peer_cnt; i++) {
@@ -439,7 +439,7 @@ static bool __wfd_is_any_device_available(struct ug_data *ugd, int* no_of_availa
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return TRUE;
 }
 
@@ -451,7 +451,7 @@ static bool __wfd_is_any_device_available(struct ug_data *ugd, int* no_of_availa
  */
 static bool __wfd_is_any_device_busy(struct ug_data *ugd, int* no_of_busy_dev)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int i = 0;
 
        for (i = 0; i < ugd->raw_discovered_peer_cnt; i++) {
@@ -464,7 +464,7 @@ static bool __wfd_is_any_device_busy(struct ug_data *ugd, int* no_of_busy_dev)
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return TRUE;
 }
 
@@ -476,7 +476,7 @@ static bool __wfd_is_any_device_busy(struct ug_data *ugd, int* no_of_busy_dev)
  */
 static bool __wfd_is_any_device_connect_failed(struct ug_data *ugd, int* no_of_connect_failed_dev)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int i = 0;
 
        for (i = 0; i < ugd->raw_discovered_peer_cnt; i++) {
@@ -491,7 +491,7 @@ static bool __wfd_is_any_device_connect_failed(struct ug_data *ugd, int* no_of_c
 
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return TRUE;
 }
 
@@ -503,20 +503,20 @@ static bool __wfd_is_any_device_connect_failed(struct ug_data *ugd, int* no_of_c
  */
 int wfd_get_device_status(void *data, device_type_s *device)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int ret = -1;
        int status = -1;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (ugd == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)");
+               WDUG_LOGE("Incorrect parameter(NULL)");
                return -1;
        }
 
        /* check whether it is connected device  */
        ret = __wfd_is_device_connected_with_me(ugd, device);
        if (ret) {
-               DBG(LOG_VERBOSE, "This is connected device");
+               WDUG_LOGD("This is connected device");
                status = 1;
                goto err_exit;
        }
@@ -524,22 +524,22 @@ int wfd_get_device_status(void *data, device_type_s *device)
        /* check whether it is busy device  */
        ret = __wfd_is_device_busy(ugd, device);
        if (ret) {
-               DBG(LOG_VERBOSE, "This is busy device");
+               WDUG_LOGD("This is busy device");
                status = 2;
                goto err_exit;
        }
 
        /* check whether it is available device  */
        if (device->conn_status != PEER_CONN_STATUS_FAILED_TO_CONNECT) {
-               DBG(LOG_VERBOSE, "This is available device");
+               WDUG_LOGD("This is available device");
                status = 0;
        } else {
-               DBG(LOG_VERBOSE, "This is connected failed device");
+               WDUG_LOGD("This is connected failed device");
                status = 3;
        }
 
 err_exit:
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return status;
 }
 
@@ -551,7 +551,7 @@ err_exit:
  */
 static void __wfd_separator_del(void *data, Evas_Object *obj)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        elm_genlist_item_class_free(data);
        return;
 }
@@ -564,7 +564,7 @@ static void __wfd_separator_del(void *data, Evas_Object *obj)
  */
 Elm_Object_Item *wfd_add_dialogue_separator(Evas_Object *genlist, const char *separator_style)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        assertm_if(NULL == genlist, "NULL!!");
 
        static Elm_Genlist_Item_Class *separator_itc;
@@ -588,7 +588,7 @@ Elm_Object_Item *wfd_add_dialogue_separator(Evas_Object *genlist, const char *se
 
        elm_genlist_item_select_mode_set(sep, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return sep;
 }
 
@@ -599,7 +599,7 @@ Elm_Object_Item *wfd_add_dialogue_separator(Evas_Object *genlist, const char *se
  */
 static Evas_Object *_create_basic_genlist(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
        Evas_Object *genlist;
 
@@ -608,7 +608,7 @@ static Evas_Object *_create_basic_genlist(void *data)
        ugd->head = elm_genlist_item_append(genlist, &head_itc, ugd, NULL,
                ELM_GENLIST_ITEM_NONE, _gl_header_sel, (void *)ugd);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return genlist;
 }
 
@@ -619,7 +619,7 @@ static Evas_Object *_create_basic_genlist(void *data)
  */
 static Evas_Object *_create_about_genlist(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->about_wfd_sep_high_item = wfd_add_dialogue_separator(ugd->genlist, "dialogue/separator");
@@ -627,7 +627,7 @@ static Evas_Object *_create_about_genlist(void *data)
                ELM_GENLIST_ITEM_NONE, _gl_about_wifi_sel, (void *)ugd);
        ugd->about_wfd_sep_low_item = wfd_add_dialogue_separator(ugd->genlist, "dialogue/separator/end");
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return ugd->genlist;
 }
 
@@ -638,7 +638,7 @@ static Evas_Object *_create_about_genlist(void *data)
  */
 static Evas_Object *_create_no_device_genlist(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->nodevice_title_item = elm_genlist_item_append(ugd->genlist, &title_itc, (void *)ugd, NULL,
@@ -647,7 +647,7 @@ static Evas_Object *_create_no_device_genlist(void *data)
                ELM_GENLIST_ITEM_NONE, NULL, NULL);
        elm_genlist_item_select_mode_set(ugd->nodevice_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return ugd->genlist;
 }
 
@@ -658,7 +658,7 @@ static Evas_Object *_create_no_device_genlist(void *data)
  */
 int _create_multi_button_genlist(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        wfd_refresh_wifi_direct_state(ugd);
@@ -682,7 +682,7 @@ int _create_multi_button_genlist(void *data)
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -693,14 +693,14 @@ int _create_multi_button_genlist(void *data)
  */
 int _create_busy_dev_list(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->busy_wfd_item = elm_genlist_item_append(ugd->genlist, &title_busy_itc, (void *)ugd, NULL,
                ELM_GENLIST_ITEM_NONE, NULL, NULL);
        elm_genlist_item_select_mode_set(ugd->busy_wfd_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -711,13 +711,13 @@ int _create_busy_dev_list(void *data)
  */
 static int _create_available_dev_genlist(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->avlbl_wfd_item = elm_genlist_item_append(ugd->genlist, &title_itc, (void *)ugd, NULL,
                ELM_GENLIST_ITEM_NONE, NULL, NULL);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -728,13 +728,13 @@ static int _create_available_dev_genlist(void *data)
  */
 static int _create_multi_connect_dev_genlist(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->multi_connect_wfd_item = elm_genlist_item_append(ugd->genlist, &title_multi_connect_itc, (void *)ugd, NULL,
                ELM_GENLIST_ITEM_NONE, NULL, NULL);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -745,14 +745,14 @@ static int _create_multi_connect_dev_genlist(void *data)
  */
 int _create_connected_dev_genlist(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->conn_wfd_item = elm_genlist_item_append(ugd->genlist, &title_conn_itc, (void *)ugd, NULL,
                ELM_GENLIST_ITEM_NONE, NULL, NULL);
        elm_genlist_item_select_mode_set(ugd->conn_wfd_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -763,14 +763,14 @@ int _create_connected_dev_genlist(void *data)
  */
 int _create_connected_failed_dev_genlist(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->conn_failed_wfd_item = elm_genlist_item_append(ugd->genlist, &title_conn_failed_itc, (void *)ugd, NULL,
                ELM_GENLIST_ITEM_NONE, NULL, NULL);
        elm_genlist_item_select_mode_set(ugd->conn_failed_wfd_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -786,7 +786,7 @@ static Eina_Bool _connect_failed_peers_display_cb(void *user_data)
        struct ug_data *ugd = (struct ug_data *) user_data;
 
        if (NULL == ugd) {
-               DBG(LOG_ERROR, "NULL parameters.\n");
+               WDUG_LOGE("NULL parameters.\n");
                return ECORE_CALLBACK_CANCEL;
        }
 
@@ -799,11 +799,11 @@ static Eina_Bool _connect_failed_peers_display_cb(void *user_data)
        /* start discovery again */
        res = wifi_direct_start_discovery(FALSE, MAX_SCAN_TIME_OUT);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_ERROR, "Failed to start discovery. [%d]\n", res);
+               WDUG_LOGE("Failed to start discovery. [%d]\n", res);
                ugd->is_re_discover = TRUE;
                wifi_direct_cancel_discovery();
        } else {
-               DBG(LOG_VERBOSE, "Discovery is started\n");
+               WDUG_LOGD("Discovery is started\n");
                ugd->is_re_discover = FALSE;
        }
 
@@ -817,60 +817,60 @@ static Eina_Bool _connect_failed_peers_display_cb(void *user_data)
  */
 void wfd_ug_view_free_peers(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
        int i = 0;
 
        for (i = 0; i < ugd->gl_connected_peer_cnt; i++) {
-               DBG(LOG_VERBOSE, "%dth connected peer = %x is deleted\n", i, ugd->gl_connected_peers[i]);
+               WDUG_LOGD("%dth connected peer = %x is deleted\n", i, ugd->gl_connected_peers[i]);
                if (ugd->gl_connected_peers[i].gl_item != NULL) {
                        elm_object_item_del(ugd->gl_connected_peers[i].gl_item);
                        ugd->gl_connected_peers[i].gl_item = NULL;
-                       DBG(LOG_VERBOSE, "Deleted item\n");
+                       WDUG_LOGD("Deleted item\n");
                }
        }
 
        ugd->gl_connected_peer_cnt = 0;
 
        for (i = 0; i < ugd->gl_connected_failed_peer_cnt; i++) {
-               DBG(LOG_VERBOSE, "%dth connected failed peer = %x is deleted\n", i, ugd->gl_connected_failed_peers[i]);
+               WDUG_LOGD("%dth connected failed peer = %x is deleted\n", i, ugd->gl_connected_failed_peers[i]);
                if (ugd->gl_connected_failed_peers[i].gl_item != NULL) {
                    elm_object_item_del(ugd->gl_connected_failed_peers[i].gl_item);
                    ugd->gl_connected_failed_peers[i].gl_item = NULL;
-                   DBG(LOG_VERBOSE, "Deleted item\n");
+                   WDUG_LOGD("Deleted item\n");
                }
        }
 
        ugd->gl_connected_failed_peer_cnt = 0;
 
        for (i = 0; i < ugd->gl_available_peer_cnt; i++) {
-               DBG(LOG_VERBOSE, "%dth discovered peer = %x is deleted\n", i, ugd->gl_available_peers[i]);
+               WDUG_LOGD("%dth discovered peer = %x is deleted\n", i, ugd->gl_available_peers[i]);
                if (ugd->gl_available_peers[i].gl_item != NULL) {
                        elm_object_item_del(ugd->gl_available_peers[i].gl_item);
                        ugd->gl_available_peers[i].gl_item = NULL;
-                       DBG(LOG_VERBOSE, "Deleted item\n");
+                       WDUG_LOGD("Deleted item\n");
                }
        }
 
        ugd->gl_available_peer_cnt = 0;
 
        for (i = 0; i < ugd->gl_busy_peer_cnt; i++) {
-               DBG(LOG_VERBOSE, "%dth busy peer = %x is deleted\n", i, ugd->gl_busy_peers[i]);
+               WDUG_LOGD("%dth busy peer = %x is deleted\n", i, ugd->gl_busy_peers[i]);
                if (ugd->gl_busy_peers[i].gl_item != NULL) {
                        elm_object_item_del(ugd->gl_busy_peers[i].gl_item);
                        ugd->gl_busy_peers[i].gl_item = NULL;
-                       DBG(LOG_VERBOSE, "Deleted item\n");
+                       WDUG_LOGD("Deleted item\n");
                }
        }
 
        ugd->gl_busy_peer_cnt = 0;
 
        for (i = 0; i < ugd->gl_multi_connect_peer_cnt; i++) {
-               DBG(LOG_VERBOSE, "%dth multi connect peer = %x is deleted\n", i, ugd->gl_multi_connect_peers[i]);
+               WDUG_LOGD("%dth multi connect peer = %x is deleted\n", i, ugd->gl_multi_connect_peers[i]);
                if (ugd->gl_multi_connect_peers[i].gl_item != NULL) {
                        elm_object_item_del(ugd->gl_multi_connect_peers[i].gl_item);
                        ugd->gl_multi_connect_peers[i].gl_item = NULL;
-                       DBG(LOG_VERBOSE, "Deleted item\n");
+                       WDUG_LOGD("Deleted item\n");
                }
        }
 
@@ -941,7 +941,7 @@ void wfd_ug_view_free_peers(void *data)
                ugd->multi_button_sep_item = NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -951,7 +951,7 @@ void wfd_ug_view_free_peers(void *data)
  */
 void wfd_ug_view_update_peers(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
        int no_of_busy_dev = 0;
        int no_of_available_dev = 0;
@@ -965,14 +965,14 @@ void wfd_ug_view_update_peers(void *data)
        wfd_ug_view_free_peers(ugd);
 
        if (ugd->wfd_status == WIFI_DIRECT_STATE_DEACTIVATED) {
-               DBG(LOG_VERBOSE, "Device is deactivated, no need to update UI.");
+               WDUG_LOGD("Device is deactivated, no need to update UI.");
                _create_about_genlist(ugd);
                return;
        }
 
        res = wifi_direct_is_group_owner(&is_group_owner);
        if (res != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_VERBOSE, "Fail to get group_owner_state. ret=[%d]", res);
+               WDUG_LOGD("Fail to get group_owner_state. ret=[%d]", res);
                ugd->I_am_group_owner = FALSE;
        } else {
                ugd->I_am_group_owner = is_group_owner;
@@ -988,12 +988,12 @@ void wfd_ug_view_update_peers(void *data)
        ugd->gl_connected_failed_peer_cnt = no_of_conn_failed_dev;
        ugd->gl_busy_peer_cnt = no_of_busy_dev;
 
-       DBG(LOG_VERBOSE, "conn_dev=[%d], conn_failed_dev=[%d], avail_dev=[%d], busy_dev=[%d], GO=[%d]\n",
+       WDUG_LOGD("conn_dev=[%d], conn_failed_dev=[%d], avail_dev=[%d], busy_dev=[%d], GO=[%d]\n",
                no_of_conn_dev, no_of_conn_failed_dev, no_of_available_dev, no_of_busy_dev, is_group_owner);
 
        if (no_of_conn_dev == 0 && no_of_conn_failed_dev == 0 &&
                no_of_available_dev == 0 && no_of_busy_dev == 0) {
-               DBG(LOG_ERROR, "There are No peers\n");
+               WDUG_LOGE("There are No peers\n");
                _create_no_device_genlist(ugd);
                _create_about_genlist(ugd);
                return;
@@ -1138,7 +1138,7 @@ void wfd_ug_view_update_peers(void *data)
        }
        _create_about_genlist(ugd);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -1148,12 +1148,12 @@ void wfd_ug_view_update_peers(void *data)
  */
 void create_wfd_ug_view(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
        Elm_Object_Item *navi_item = NULL;
 
        if (ugd == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)");
+               WDUG_LOGE("Incorrect parameter(NULL)");
                return;
        }
 
@@ -1168,7 +1168,7 @@ void create_wfd_ug_view(void *data)
 
        ugd->genlist = _create_basic_genlist(ugd);
        if (ugd->genlist == NULL) {
-               DBG(LOG_ERROR, "Failed to create basic genlist");
+               WDUG_LOGE("Failed to create basic genlist");
                return;
        }
 
@@ -1186,5 +1186,5 @@ void create_wfd_ug_view(void *data)
        evas_object_smart_callback_add(ugd->scan_btn, "clicked", _scan_btn_cb, (void *)ugd);
        elm_object_item_part_content_set(navi_item, "toolbar_button1", ugd->scan_btn);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
index 680179a..4b21c9a 100755 (executable)
@@ -43,18 +43,18 @@ Elm_Gen_Item_Class device_itc;
  */
 void _multiconnect_view_back_btn_cb(void *data, Evas_Object * obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
 
        if (!ugd) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE("The param is NULL\n");
                return;
        }
 
        ugd->multiconn_view_genlist = NULL;
        elm_naviframe_item_pop(ugd->naviframe);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -65,7 +65,7 @@ void _multiconnect_view_back_btn_cb(void *data, Evas_Object * obj, void *event_i
  */
 gboolean __wfd_multi_connect_reset_cb(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int i = 0;
        struct ug_data *ugd = (struct ug_data *)data;
 
@@ -79,7 +79,7 @@ gboolean __wfd_multi_connect_reset_cb(void *data)
 
        wfd_ug_view_update_peers(ugd);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return false;
 }
 
@@ -90,7 +90,7 @@ gboolean __wfd_multi_connect_reset_cb(void *data)
  */
 void wfd_free_multi_selected_peers(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int i = 0;
        struct ug_data *ugd = (struct ug_data *)data;
 
@@ -105,7 +105,7 @@ void wfd_free_multi_selected_peers(void *data)
        ugd->raw_multi_selected_peer_cnt = 0;
        ugd->multi_connect_mode = WFD_MULTI_CONNECT_MODE_NONE;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 
 }
 
@@ -116,7 +116,7 @@ void wfd_free_multi_selected_peers(void *data)
  */
 int wfd_stop_multi_connect(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
 
        /* change the title of failed peers */
@@ -128,7 +128,7 @@ int wfd_stop_multi_connect(void *data)
        /* after 30s, remove the failed peers */
        g_timeout_add(30000 /*ms*/, __wfd_multi_connect_reset_cb, ugd);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -139,7 +139,7 @@ int wfd_stop_multi_connect(void *data)
  */
 int wfd_start_multi_connect(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int res;
 
@@ -148,19 +148,19 @@ int wfd_start_multi_connect(void *data)
 
                res = wfd_client_group_add();
                if (res == -1) {
-                       DBG(LOG_ERROR, "Failed to add group");
+                       WDUG_LOGE("Failed to add group");
                        wfd_free_multi_selected_peers(ugd);
 
-                       __FUNC_EXIT__;
+                       __WDUG_LOG_FUNC_EXIT__;
                        return -1;
                }
 
        } else {
-               DBG(LOG_VERBOSE, "No selected peers.\n");
+               WDUG_LOGD("No selected peers.\n");
                return -1;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -171,7 +171,7 @@ int wfd_start_multi_connect(void *data)
  */
 gboolean wfd_multi_connect_next_cb(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int i;
        int res;
@@ -185,7 +185,7 @@ gboolean wfd_multi_connect_next_cb(void *data)
                        if (ugd->raw_multi_selected_peers[i].conn_status == PEER_CONN_STATUS_WAIT_FOR_CONNECT) {
                                res = wfd_client_connect(ugd->raw_multi_selected_peers[i].mac_addr);
                                if (res == -1) {
-                                       DBG(LOG_VERBOSE, "Failed to connect [%s].\n", ugd->raw_multi_selected_peers[i].ssid);
+                                       WDUG_LOGD("Failed to connect [%s].\n", ugd->raw_multi_selected_peers[i].ssid);
                                        ugd->raw_multi_selected_peers[i].conn_status = PEER_CONN_STATUS_FAILED_TO_CONNECT;
                                } else {
                                        ugd->raw_multi_selected_peers[i].conn_status = PEER_CONN_STATUS_CONNECTING;
@@ -196,15 +196,15 @@ gboolean wfd_multi_connect_next_cb(void *data)
 
                if (i >= ugd->raw_multi_selected_peer_cnt) {
                        // All selected peers are touched.
-                       DBG(LOG_VERBOSE, "Stop Multi Connect...\n");
+                       WDUG_LOGD("Stop Multi Connect...\n");
                        wfd_stop_multi_connect(ugd);
                }
        } else {
-               DBG(LOG_VERBOSE, "No selected peers.\n");
+               WDUG_LOGD("No selected peers.\n");
                return -1;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return false;
 }
 
@@ -217,16 +217,16 @@ gboolean wfd_multi_connect_next_cb(void *data)
  */
 void _connect_btn_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
        int i = 0;
        int count = 0;
        char popup_text[MAX_POPUP_TEXT_SIZE] = {0};
-       DBG(LOG_VERBOSE, "_connect_btn_cb \n");
+       WDUG_LOGD("_connect_btn_cb \n");
 
        for (i = 0; i < ugd->gl_available_peer_cnt ; i++) {
                if (TRUE == ugd->multi_conn_dev_list[i].dev_sel_state) {
-                       DBG(LOG_VERBOSE, "ugd->peers[i].mac_addr = %s, i = %d\n", ugd->multi_conn_dev_list[i].peer.mac_addr, i);
+                       WDUG_LOGD("ugd->peers[i].mac_addr = %s, i = %d\n", ugd->multi_conn_dev_list[i].peer.mac_addr, i);
 
                        memcpy(&ugd->raw_multi_selected_peers[count], &ugd->multi_conn_dev_list[i].peer, sizeof(device_type_s));
                        ugd->raw_multi_selected_peers[count].conn_status = PEER_CONN_STATUS_WAIT_FOR_CONNECT;
@@ -251,7 +251,7 @@ void _connect_btn_cb(void *data, Evas_Object *obj, void *event_info)
        ugd->multiconn_view_genlist = NULL;
        _change_multi_button_title(ugd);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -262,11 +262,11 @@ void _connect_btn_cb(void *data, Evas_Object *obj, void *event_info)
  */
 static void _wfd_multi_del_select_info_label(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *)data;
 
        if (NULL == ugd) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE("The param is NULL\n");
                return;
        }
 
@@ -280,7 +280,7 @@ static void _wfd_multi_del_select_info_label(void *data)
                ugd->notify_layout = NULL;
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -292,13 +292,13 @@ static void _wfd_multi_del_select_info_label(void *data)
  */
 static void _wfd_multi_add_select_info_label(void *data, int count)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        char select_lablel[MAX_POPUP_TEXT_SIZE] = {0};
        struct ug_data *ugd = (struct ug_data *)data;
 
        if (NULL == ugd || count <= 0) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE("The param is NULL\n");
                return;
        }
 
@@ -308,7 +308,7 @@ static void _wfd_multi_add_select_info_label(void *data, int count)
        /* add notify */
        ugd->notify = elm_notify_add(ugd->base);
        if (NULL == ugd->notify) {
-               DBG(LOG_ERROR, "Add notify failed\n");
+               WDUG_LOGE("Add notify failed\n");
                return;
        }
 
@@ -330,7 +330,7 @@ static void _wfd_multi_add_select_info_label(void *data, int count)
        elm_notify_timeout_set(ugd->notify, 3);
        evas_object_show(ugd->notify);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return;
 }
 
@@ -343,7 +343,7 @@ static void _wfd_multi_add_select_info_label(void *data, int count)
  */
 static void _wfd_gl_multi_sel_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        int i = 0;
        int index = 0;
@@ -357,26 +357,26 @@ static void _wfd_gl_multi_sel_cb(void *data, Evas_Object *obj, void *event_info)
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
 
        if (NULL == ugd || NULL == item) {
-               DBG(LOG_ERROR, "The param is NULL\n");
+               WDUG_LOGE("The param is NULL\n");
                return;
        }
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
        index = elm_genlist_item_index_get(item) - 3; /* subtract the previous items */
-       DBG(LOG_VERBOSE, "selected index = %d \n", index);
+       WDUG_LOGD("selected index = %d \n", index);
        if (index < 0) {
-               DBG(LOG_ERROR, "The index is invalid.\n");
+               WDUG_LOGE("The index is invalid.\n");
                return;
        }
 
        chk_box = elm_object_item_part_content_get((Elm_Object_Item *)event_info, "elm.icon.1");
        state = elm_check_state_get(chk_box);
-       DBG(LOG_VERBOSE, "state = %d \n", state);
+       WDUG_LOGD("state = %d \n", state);
        elm_check_state_set(chk_box, !state);
 
        ugd->multi_conn_dev_list[index].dev_sel_state = !state;
-       DBG(LOG_VERBOSE, "ptr->dev_sel_state = %d \n", ugd->multi_conn_dev_list[index].dev_sel_state);
-       DBG(LOG_VERBOSE, "ptr->peer.mac_addr = %s \n", ugd->multi_conn_dev_list[index].peer.mac_addr);
+       WDUG_LOGD("ptr->dev_sel_state = %d \n", ugd->multi_conn_dev_list[index].dev_sel_state);
+       WDUG_LOGD("ptr->peer.mac_addr = %s \n", ugd->multi_conn_dev_list[index].peer.mac_addr);
 
        /* update the checkbox and button */
        for (; i < ugd->gl_available_dev_cnt_at_multiconn_view; i++) {
@@ -402,7 +402,7 @@ static void _wfd_gl_multi_sel_cb(void *data, Evas_Object *obj, void *event_info)
                _wfd_multi_del_select_info_label(ugd);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -421,13 +421,13 @@ static void _wfd_gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
 
        if (NULL == ugd || NULL == obj) {
-               DBG(LOG_ERROR, "NULL parameters.\n");
+               WDUG_LOGE("NULL parameters.\n");
                return;
        }
 
        Evas_Object *sel_chkbox = elm_object_item_part_content_get(ugd->mcview_select_all_item, "elm.icon");
        if (sel_chkbox == NULL) {
-               DBG(LOG_VERBOSE, "select-all chkbox is NULL\n");
+               WDUG_LOGD("select-all chkbox is NULL\n");
                return;
        }
 
@@ -439,7 +439,7 @@ static void _wfd_gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
        }
 
        elm_check_state_set(sel_chkbox, state);
-       DBG(LOG_VERBOSE, "state = %d \n", state);
+       WDUG_LOGD("state = %d \n", state);
 
        int i = 0;
        bool is_sel = FALSE;
@@ -482,7 +482,7 @@ static void _wfd_gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
  */
 static char *_wfd_gl_device_label_get(void *data, Evas_Object *obj, const char *part)
 {
-       DBG(LOG_VERBOSE, "part %s", part);
+       WDUG_LOGD("part %s", part);
        device_type_s *peer = (device_type_s *)data;
 
        if (NULL == peer) {
@@ -557,13 +557,13 @@ static char *__wfd_get_device_icon_path(device_type_s *peer)
 static void _wfd_check_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        if (NULL == obj) {
-               DBG(LOG_ERROR, "NULL parameters.\n");
+               WDUG_LOGE("NULL parameters.\n");
                return;
        }
 
        Eina_Bool state = elm_check_state_get(obj);
        elm_check_state_set(obj, !state);
-       DBG(LOG_VERBOSE, "state = %d \n", state);
+       WDUG_LOGD("state = %d \n", state);
 }
 
 /**
@@ -579,10 +579,10 @@ static Evas_Object *_wfd_gl_device_icon_get(void *data, Evas_Object *obj, const
        device_type_s *peer = (device_type_s *) data;
        Evas_Object *icon = NULL;
 
-       DBG(LOG_VERBOSE, "Part %s", part);
+       WDUG_LOGD("Part %s", part);
 
        if (!strcmp(part, "elm.icon.1")) {
-               DBG(LOG_VERBOSE, "Part %s", part);
+               WDUG_LOGD("Part %s", part);
                icon = elm_check_add(obj);
                elm_check_state_set(icon, EINA_FALSE);
                evas_object_smart_callback_add(icon, "changed", _wfd_check_clicked_cb, (void *)data);
@@ -608,7 +608,7 @@ static Evas_Object *_wfd_gl_device_icon_get(void *data, Evas_Object *obj, const
 static char *_wfd_gl_select_all_label_get(void *data, Evas_Object *obj, const char *part)
 {
        if (!strcmp(part, "elm.text")) {
-               DBG(LOG_VERBOSE, "Adding text %s", part);
+               WDUG_LOGD("Adding text %s", part);
                return strdup("Select all");
        }
        return NULL;
@@ -626,7 +626,7 @@ static Evas_Object *_wfd_gl_select_all_icon_get(void *data, Evas_Object *obj, co
        Evas_Object *icon = NULL;
 
        if (!strcmp(part, "elm.icon")) {
-               DBG(LOG_VERBOSE, "Part %s", part);
+               WDUG_LOGD("Part %s", part);
                icon = elm_check_add(obj);
                elm_check_state_set(icon, EINA_FALSE);
                evas_object_smart_callback_add(icon, "changed", _wfd_check_clicked_cb, (void *)data);
@@ -642,7 +642,7 @@ static Evas_Object *_wfd_gl_select_all_icon_get(void *data, Evas_Object *obj, co
  */
 int wfd_free_multiconnect_device(struct ug_data *ugd)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        int i = 0;
 
@@ -673,7 +673,7 @@ int wfd_free_multiconnect_device(struct ug_data *ugd)
        }
        ugd->gl_available_dev_cnt_at_multiconn_view = 0;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -684,7 +684,7 @@ int wfd_free_multiconnect_device(struct ug_data *ugd)
  */
 int wfd_update_multiconnect_device(struct ug_data *ugd)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        int count = 0;
        device_type_s *device = NULL;
@@ -708,7 +708,7 @@ int wfd_update_multiconnect_device(struct ug_data *ugd)
        ugd->gl_available_dev_cnt_at_multiconn_view = count;
 
        if (ugd->gl_available_dev_cnt_at_multiconn_view == 0) {
-               DBG(LOG_ERROR, "There are No peers\n");
+               WDUG_LOGE("There are No peers\n");
                ugd->mcview_title_item = elm_genlist_item_append(genlist, &title_itc, ugd, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
                elm_genlist_item_select_mode_set(ugd->mcview_title_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
                ugd->mcview_nodevice_item = elm_genlist_item_append(genlist, &noitem_itc, (void *)ugd, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
@@ -722,7 +722,7 @@ int wfd_update_multiconnect_device(struct ug_data *ugd)
                for (i = 0; i < ugd->raw_discovered_peer_cnt; i++) {
                        device = &ugd->raw_discovered_peers[i];
                        if (device->is_connected == FALSE) {
-                               DBG(LOG_VERBOSE, "%dth peer being added on genlist\n", i);
+                               WDUG_LOGD("%dth peer being added on genlist\n", i);
 
                                if (ugd->multi_conn_dev_list[count].peer.gl_item != NULL) {
                                        elm_object_item_del(ugd->multi_conn_dev_list[count].peer.gl_item);
@@ -738,7 +738,7 @@ int wfd_update_multiconnect_device(struct ug_data *ugd)
                }
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
        return 0;
 }
 
@@ -749,14 +749,14 @@ int wfd_update_multiconnect_device(struct ug_data *ugd)
  */
 void wfd_create_multiconnect_view(struct ug_data *ugd)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        Evas_Object *back_btn = NULL;
        Evas_Object *genlist = NULL;
        Elm_Object_Item *navi_item = NULL;
 
        if (ugd == NULL) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)");
+               WDUG_LOGE("Incorrect parameter(NULL)");
                return;
        }
 
@@ -772,7 +772,7 @@ void wfd_create_multiconnect_view(struct ug_data *ugd)
        device_itc.func.state_get = NULL;
        device_itc.func.del = NULL;
 
-       DBG(LOG_VERBOSE, "_wifid_create_multiconnect_view");
+       WDUG_LOGD("_wifid_create_multiconnect_view");
        back_btn = elm_button_add(ugd->naviframe);
        elm_object_style_set(back_btn, "naviframe/back_btn/default");
        evas_object_smart_callback_add(back_btn, "clicked", _multiconnect_view_back_btn_cb, (void *)ugd);
@@ -803,5 +803,5 @@ void wfd_create_multiconnect_view(struct ug_data *ugd)
        elm_object_disabled_set(ugd->multi_connect_btn, EINA_TRUE);
        elm_object_item_part_content_set(navi_item, "toolbar_button2", ugd->multi_connect_btn);
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
index 1c1e890..b7778b3 100755 (executable)
@@ -40,7 +40,7 @@
  */
 static void _wfd_ug_act_popup_hotspot_ok_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int result = -1;
        struct ug_data *ugd = (struct ug_data *) data;
 
@@ -66,7 +66,7 @@ static void _wfd_ug_act_popup_hotspot_ok_cb(void *data, Evas_Object *obj, void *
 
        evas_object_del(ugd->act_popup);
        ugd->act_popup = NULL;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -78,7 +78,7 @@ static void _wfd_ug_act_popup_hotspot_ok_cb(void *data, Evas_Object *obj, void *
  */
 static void _wfd_ug_act_popup_hotspot_cancel_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
@@ -86,7 +86,7 @@ static void _wfd_ug_act_popup_hotspot_cancel_cb(void *data, Evas_Object *obj, vo
 
        evas_object_del(ugd->act_popup);
        ugd->act_popup = NULL;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -98,7 +98,7 @@ static void _wfd_ug_act_popup_hotspot_cancel_cb(void *data, Evas_Object *obj, vo
  */
 static void _wfd_ug_act_popup_wifi_ok_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int result = -1;
        struct ug_data *ugd = (struct ug_data *) data;
 
@@ -124,7 +124,7 @@ static void _wfd_ug_act_popup_wifi_ok_cb(void *data, Evas_Object *obj, void *eve
 
        evas_object_del(ugd->act_popup);
        ugd->act_popup = NULL;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -136,7 +136,7 @@ static void _wfd_ug_act_popup_wifi_ok_cb(void *data, Evas_Object *obj, void *eve
  */
 static void _wfd_ug_act_popup_wifi_cancel_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT;
@@ -144,7 +144,7 @@ static void _wfd_ug_act_popup_wifi_cancel_cb(void *data, Evas_Object *obj, void
 
        evas_object_del(ugd->act_popup);
        ugd->act_popup = NULL;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -156,11 +156,11 @@ static void _wfd_ug_act_popup_wifi_cancel_cb(void *data, Evas_Object *obj, void
  */
 static void _wfd_ug_act_popup_disconnect_all_ok_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        int i = 0;
        struct ug_data *ugd = (struct ug_data *) data;
        if (NULL == ugd) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return;
        }
 
@@ -179,7 +179,7 @@ static void _wfd_ug_act_popup_disconnect_all_ok_cb(void *data, Evas_Object *obj,
        evas_object_del(ugd->act_popup);
        ugd->act_popup = NULL;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -191,18 +191,18 @@ static void _wfd_ug_act_popup_disconnect_all_ok_cb(void *data, Evas_Object *obj,
  */
 static void _wfd_ug_act_popup_disconnect_all_cancel_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
 
        struct ug_data *ugd = (struct ug_data *) data;
        if (NULL == ugd) {
-               DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
+               WDUG_LOGE("Incorrect parameter(NULL)\n");
                return;
        }
 
        evas_object_del(ugd->act_popup);
        ugd->act_popup = NULL;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -214,7 +214,7 @@ static void _wfd_ug_act_popup_disconnect_all_cancel_cb(void *data, Evas_Object *
  */
 void wfd_ug_act_popup(void *data, const char *message, int popup_type)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
        Evas_Object *popup = NULL;
        Evas_Object *btn1 = NULL, *btn2 = NULL;
@@ -256,7 +256,7 @@ void wfd_ug_act_popup(void *data, const char *message, int popup_type)
 
        evas_object_show(popup);
        ugd->act_popup = popup;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -266,14 +266,14 @@ void wfd_ug_act_popup(void *data, const char *message, int popup_type)
  */
 void wfg_ug_act_popup_remove(void *data)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        if (ugd->act_popup) {
                evas_object_del(ugd->act_popup);
                ugd->act_popup = NULL;
        }
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -285,7 +285,7 @@ void wfg_ug_act_popup_remove(void *data)
  */
 static void _wfd_ug_terminate_popup_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        evas_object_del(ugd->warn_popup);
@@ -294,7 +294,7 @@ static void _wfd_ug_terminate_popup_cb(void *data, Evas_Object *obj, void *event
        wfd_ug_view_free_peers(ugd);
 
        ug_destroy_me(ugd->ug);
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -306,7 +306,7 @@ static void _wfd_ug_terminate_popup_cb(void *data, Evas_Object *obj, void *event
  */
 static void _wfd_ug_automatic_turn_off_popup_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        evas_object_del(ugd->warn_popup);
@@ -320,7 +320,7 @@ static void _wfd_ug_automatic_turn_off_popup_cb(void *data, Evas_Object *obj, vo
                wfd_mobile_ap_on(ugd);
        }
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -332,13 +332,13 @@ static void _wfd_ug_automatic_turn_off_popup_cb(void *data, Evas_Object *obj, vo
  */
 static void _wfd_ug_warn_popup_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
 
        evas_object_del(ugd->warn_popup);
        ugd->warn_popup = NULL;
 
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
 /**
@@ -350,7 +350,7 @@ static void _wfd_ug_warn_popup_cb(void *data, Evas_Object *obj, void *event_info
  */
 void wfd_ug_warn_popup(void *data, const char *message, int popup_type)
 {
-       __FUNC_ENTER__;
+       __WDUG_LOG_FUNC_ENTER__;
        struct ug_data *ugd = (struct ug_data *) data;
        Evas_Object *popup = NULL;
        Evas_Object *btn = NULL;
@@ -374,6 +374,6 @@ void wfd_ug_warn_popup(void *data, const char *message, int popup_type)
 
        evas_object_show(popup);
        ugd->warn_popup = popup;
-       __FUNC_EXIT__;
+       __WDUG_LOG_FUNC_EXIT__;
 }
 
index ff12a67..7c4b390 100755 (executable)
@@ -17,7 +17,7 @@ SET(SRCS
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
 
-SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -DVITA_FEATURE")
+SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -DUSE_DLOG")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_C_FLAGS_RELEASE "-O2")
 
index f07d6c1..7139e9a 100755 (executable)
  * @version 0.1
  */
 
-
 #ifndef __WFD_APP_UTIL_H__
 #define __WFD_APP_UTIL_H__
 
-
 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
 
-#ifdef VITA_FEATURE
+#ifdef USE_DLOG
 #include <dlog.h>
 
-#define WIFI_DIRECT_APP_MID            "wfd-ugapp"
-
-#define WFD_APP_LOG_LOW        LOG_VERBOSE
-#define WFD_APP_LOG_HIGH       LOG_INFO
-#define WFD_APP_LOG_ERROR      LOG_ERROR
-#define WFD_APP_LOG_WARN       LOG_WARN
-#define WFD_APP_LOG_ASSERT     LOG_FATAL
-#define WFD_APP_LOG_EXCEPTION  LOG_FATAL
-#define WFD_MAX_SIZE            128
-#define WFD_MAC_ADDRESS_SIZE    18
-
-char *wfd_app_trim_path(const char *filewithpath);
-int wfd_app_gettid();
-
-#define WFD_APP_LOG(log_level, format, args...) \
-       LOG(log_level, WIFI_DIRECT_APP_MID, "[%s:%04d,%d] " format, wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), ##args)
-#define __WFD_APP_FUNC_ENTER__ LOG(LOG_VERBOSE,  WIFI_DIRECT_APP_MID, "[%s:%04d,%d] Enter: %s()\n", wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), __func__)
-#define __WFD_APP_FUNC_EXIT__  LOG(LOG_VERBOSE,  WIFI_DIRECT_APP_MID, "[%s:%04d,%d] Quit: %s()\n", wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), __func__)
+#undef LOG_TAG
+#define LOG_TAG "WIFI_DIRECT_UGAPP"
 
-#else /** _DLOG_UTIL */
-
-#define WFD_APP_LOG(log_level, format, args...) printf("[%s:%04d,%d] " format, wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), ##args)
-#define __WFD_APP_FUNC_ENTER__ printf("[%s:%04d,%d] Entering: %s()\n", wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), __func__)
-#define __WFD_APP_FUNC_EXIT__  printf("[%s:%04d,%d] Quit: %s()\n", wfd_app_trim_path(__FILE__), __LINE__, wfd_app_gettid(), __func__)
-
-#endif /** _USE_DLOG_UTIL */
+#define WDUA_LOGV(format, args...) LOGV(format, ##args)
+#define WDUA_LOGD(format, args...) LOGD(format, ##args)
+#define WDUA_LOGI(format, args...) LOGI(format, ##args)
+#define WDUA_LOGW(format, args...) LOGW(format, ##args)
+#define WDUA_LOGE(format, args...) LOGE(format, ##args)
+#define WDUA_LOGF(format, args...) LOGF(format, ##args)
 
+#define __WDUA_LOG_FUNC_ENTER__ LOGV("Enter")
+#define __WDUA_LOG_FUNC_EXIT__ LOGV("Quit")
 
-
-#define assertm_if(expr, fmt, arg...) do { \
+#define assertm_if(expr, fmt, args...) do { \
        if (expr) { \
-         WFD_APP_LOG(WFD_APP_LOG_ASSERT, " ##(%s) -> %s() assert!!## "fmt, #expr, __FUNCTION__, ##arg); \
-                exit(1); \
+               WDUA_LOGF(" ##(%s) -> assert!!## "fmt, #expr, ##args); \
+               exit(1); \
        } \
 } while (0)
 
+#else /** _DLOG_UTIL */
+#define WDUA_LOGV(format, args...) \
+       printf("[V/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUA_LOGD(format, args...) \
+       printf("[D/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUA_LOGI(format, args...) \
+       printf("[I/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUA_LOGW(format, args...) \
+       printf("[W/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUA_LOGE(format, args...) \
+       printf("[E/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUA_LOGF(format, args...) \
+       printf("[F/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+
+#define __WDUA_LOG_FUNC_ENTER__\
+       printf("[V/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> Enter", __FILE__, __FUNCTION__, __LINE__)
+#define __WDUA_LOG_FUNC_EXIT__ \
+       printf("[V/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> Exit", __FILE__, __FUNCTION__, __LINE__)
+
+#endif /** _DLOG_UTIL */
 
 #endif /* __WFD_APP_UTIL_H__ */
index 14f326a..c9f0b1e 100755 (executable)
@@ -42,14 +42,15 @@ wfd_appdata_t *wfd_get_appdata()
 
 void _ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        Evas_Object *base = NULL;
        base = ug_get_layout(ug);
 
        if (!base) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "ug_get_layout failed!");
+               WDUA_LOGE("ug_get_layout failed!");
                ug_destroy(ug);
+               __WDUA_LOG_FUNC_EXIT__;
                return;
        }
 
@@ -62,11 +63,13 @@ void _ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv)
        default:
                break;
        }
+
+       __WDUA_LOG_FUNC_EXIT__;
 }
 
 void _ug_destroy_cb(ui_gadget_h ug, void *priv)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        // TODO: free all memory allocation
 
@@ -76,15 +79,16 @@ void _ug_destroy_cb(ui_gadget_h ug, void *priv)
 
 void ug_result_cb(ui_gadget_h ug, service_h service, void *priv)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        // TODO: free all memory allocation
 
+       __WDUA_LOG_FUNC_EXIT__;
 }
 
 static int load_wifi_direct_ug(ui_gadget_h parent_ug, void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
        wfd_appdata_t *ugd = (wfd_appdata_t *)data;
        service_h handle = NULL;
 
@@ -99,10 +103,14 @@ static int load_wifi_direct_ug(ui_gadget_h parent_ug, void *data)
 
        ugd->wifi_direct_ug = ug_create(parent_ug, "setting-wifidirect-efl", UG_MODE_FULLVIEW, handle, &wifi_direct_cbs);
        if (ugd->wifi_direct_ug) {
+               __WDUA_LOG_FUNC_EXIT__;
                return TRUE;
        } else {
+               __WDUA_LOG_FUNC_EXIT__;
                return FALSE;
        }
+
+       __WDUA_LOG_FUNC_EXIT__;
 }
 
 
@@ -132,28 +140,28 @@ static Evas_Object *_create_win(Evas_Object * parent, const char *name)
 
 static Evas_Object* _set_win_icon(wfd_appdata_t *ad)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        Evas_Object *icon = evas_object_image_add(evas_object_evas_get(ad->win));
        evas_object_image_file_set(icon, DESKTOP_ICON, NULL);
        elm_win_icon_object_set(ad->win, icon);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_EXIT__;
        return icon;
 }
 
 static Evas_Object *_create_bg(Evas_Object *parent)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        if (NULL == parent) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Incorrect parameter\n");
+               WDUA_LOGE("Incorrect parameter\n");
                return NULL;
        }
 
        Evas_Object *bg = elm_bg_add(parent);
        if (NULL == bg) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Create background failed\n");
+               WDUA_LOGE("Create background failed\n");
                return NULL;
        }
 
@@ -161,22 +169,22 @@ static Evas_Object *_create_bg(Evas_Object *parent)
        elm_win_resize_object_add(parent, bg);
        evas_object_show(bg);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_EXIT__;
        return bg;
 }
 
 static Evas_Object *_create_layout_main(Evas_Object *parent)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        if (NULL == parent) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Incorrect parameter\n");
+               WDUA_LOGE("Incorrect parameter\n");
                return NULL;
        }
 
        Evas_Object *layout = elm_layout_add(parent);
        if (NULL == layout) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Create layout failed\n");
+               WDUA_LOGE("Create layout failed\n");
                return NULL;
        }
 
@@ -191,16 +199,16 @@ static Evas_Object *_create_layout_main(Evas_Object *parent)
        elm_object_content_set(parent, layout);
        evas_object_show(layout);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_EXIT__;
        return layout;
 }
 
 static void _win_profile_changed_cb(void *data, Evas_Object * obj, void *event_info)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        if (data == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Incorrect parameter\n");
+               WDUA_LOGE("Incorrect parameter\n");
                return -1;
        }
 
@@ -221,16 +229,16 @@ static void _win_profile_changed_cb(void *data, Evas_Object * obj, void *event_i
                elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW);
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_EXIT__;
 }
 
 static int _app_create(void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
        wfd_appdata_t *ad = wfd_get_appdata();
 
        if (data == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "Incorrect parameter\n");
+               WDUA_LOGE("Incorrect parameter\n");
                return -1;
        }
 
@@ -242,13 +250,13 @@ static int _app_create(void *data)
        /*Add conformat for indicator */
        ad->bg = _create_bg(ad->win);
        if (ad->bg == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to create background");
+               WDUA_LOGE("Failed to create background");
                return -1;
        }
 
        ad->conform = elm_conformant_add(ad->win);
        if (ad->conform == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to create elm conformant");
+               WDUA_LOGE("Failed to create elm conformant");
                return -1;
        }
 
@@ -258,7 +266,7 @@ static int _app_create(void *data)
 
        ad->top_layout = _create_layout_main(ad->conform);
        if (ad->top_layout == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to create top layout");
+               WDUA_LOGE("Failed to create top layout");
                return -1;
        }
 
@@ -272,20 +280,20 @@ static int _app_create(void *data)
 
        r = appcore_set_i18n(PACKAGE, NULL);
        if (r != 0) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "appcore_set_i18n error\n");
+               WDUA_LOGE("appcore_set_i18n error\n");
                return -1;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_EXIT__;
        return 0;
 }
 
 static int _app_terminate(void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        if (data == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Incorrect parameter\n");
+               WDUA_LOGE("Incorrect parameter\n");
                return -1;
        }
 
@@ -316,32 +324,32 @@ static int _app_terminate(void *data)
                ad->icon = NULL;
        }
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_EXIT__;
        return 0;
 }
 
 static int _app_pause(void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_EXIT__;
        return 0;
 }
 
 static int _app_resume(void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_EXIT__;
        return 0;
 }
 
 static int _app_reset(bundle *b, void *data)
 {
-       __WFD_APP_FUNC_ENTER__;
+       __WDUA_LOG_FUNC_ENTER__;
 
        wfd_appdata_t *ad = wfd_get_appdata();
        load_wifi_direct_ug(NULL, ad);
 
-       __WFD_APP_FUNC_EXIT__;
+       __WDUA_LOG_FUNC_EXIT__;
        return 0;
 }