4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.tizenopensource.org/license
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * This file declares wifi direct application util functions.
23 * @file wfd-app-util.h
24 * @author Sungsik Jang (sungsik.jang@samsung.com)
29 #ifndef __WFD_APP_UTIL_H__
30 #define __WFD_APP_UTIL_H__
33 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
34 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
35 #define WFD_MAX_SIZE 128
36 #define WFD_MAC_ADDRESS_SIZE 18
42 #define LOG_TAG "WIFI_DIRECT_POPUP"
44 #define WDPOP_LOGV(format, args...) LOGV(format, ##args)
45 #define WDPOP_LOGD(format, args...) LOGD(format, ##args)
46 #define WDPOP_LOGI(format, args...) LOGI(format, ##args)
47 #define WDPOP_LOGW(format, args...) LOGW(format, ##args)
48 #define WDPOP_LOGE(format, args...) LOGE(format, ##args)
49 #define WDPOP_LOGF(format, args...) LOGF(format, ##args)
51 #define __WDPOP_LOG_FUNC_ENTER__ LOGV("Enter")
52 #define __WDPOP_LOG_FUNC_EXIT__ LOGV("Quit")
54 #define assertm_if(expr, fmt, args...) do { \
56 WDPOP_LOGF(" ##(%s) -> assert!!## "fmt, #expr, ##args); \
61 #else /** _DLOG_UTIL */
63 #define WDPOP_LOGV(format, args...) \
64 printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
65 #define WDPOP_LOGD(format, args...) \
66 printf("[D/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
67 #define WDPOP_LOGI(format, args...) \
68 printf("[I/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
69 #define WDPOP_LOGW(format, args...) \
70 printf("[W/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
71 #define WDPOP_LOGE(format, args...) \
72 printf("[E/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
73 #define WDPOP_LOGF(format, args...) \
74 printf("[F/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
76 #define __WDPOP_LOG_FUNC_ENTER__ \
77 printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> Enter", __FILE__, __FUNCTION__, __LINE__)
78 #define __WDPOP_LOG_FUNC_EXIT__ \
79 printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> Exit", __FILE__, __FUNCTION__, __LINE__)
81 #endif /** _DLOG_UTIL */
83 #endif /* __WFD_APP_UTIL_H__ */