Change the manifest and remove rule files
[apps/native/ug-wifi-direct.git] / ugapp-wifidirect / include / wfd-ugapp-util.h
1 /*
2 *  WiFi-Direct UG
3 *
4 * Copyright 2012 Samsung Electronics Co., Ltd
5
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
9
10 * http://floralicense.org/license
11
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.
17 *
18 */
19
20 /**
21  * This file declares wifi direct application util functions.
22  *
23  * @file    wfd-app-util.h
24  * @author  Sungsik Jang (sungsik.jang@samsung.com)
25  * @version 0.1
26  */
27
28 #ifndef __WFD_APP_UTIL_H__
29 #define __WFD_APP_UTIL_H__
30
31 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
32 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
33
34 #ifdef USE_DLOG
35 #include <dlog.h>
36
37 #undef LOG_TAG
38 #define LOG_TAG "WIFI_DIRECT_UGAPP"
39
40 #define WDUA_LOGV(format, args...) LOGV(format, ##args)
41 #define WDUA_LOGD(format, args...) LOGD(format, ##args)
42 #define WDUA_LOGI(format, args...) LOGI(format, ##args)
43 #define WDUA_LOGW(format, args...) LOGW(format, ##args)
44 #define WDUA_LOGE(format, args...) LOGE(format, ##args)
45 #define WDUA_LOGF(format, args...) LOGF(format, ##args)
46
47 #define __WDUA_LOG_FUNC_ENTER__ LOGV("Enter")
48 #define __WDUA_LOG_FUNC_EXIT__ LOGV("Quit")
49
50 #define assertm_if(expr, fmt, args...) do { \
51         if (expr) { \
52                 WDUA_LOGF(" ##(%s) -> assert!!## "fmt, #expr, ##args); \
53                 exit(1); \
54         } \
55 } while (0)
56
57 #else /** _DLOG_UTIL */
58 #define WDUA_LOGV(format, args...)
59 #define WDUA_LOGD(format, args...)
60 #define WDUA_LOGI(format, args...)
61 #define WDUA_LOGW(format, args...)
62 #define WDUA_LOGE(format, args...)
63 #define WDUA_LOGF(format, args...)
64
65 #define __WDUA_LOG_FUNC_ENTER__
66 #define __WDUA_LOG_FUNC_EXIT__
67
68 #endif /** _DLOG_UTIL */
69
70 #endif /* __WFD_APP_UTIL_H__ */