4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.1 (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://floralicense.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 #define WDPOP_LOGD(format, args...)
65 #define WDPOP_LOGI(format, args...)
66 #define WDPOP_LOGW(format, args...)
67 #define WDPOP_LOGE(format, args...)
68 #define WDPOP_LOGF(format, args...)
70 #define __WDPOP_LOG_FUNC_ENTER__
71 #define __WDPOP_LOG_FUNC_EXIT__
73 #endif /** _DLOG_UTIL */
75 #endif /* __WFD_APP_UTIL_H__ */