2 * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef __NETCONFIG_UNITTEST_H__
17 #define __NETCONFIG_UNITTEST_H__
25 #define GMAINTIMEOUT 20000
26 #define MAX_AP_LENGTH 33
27 #define MAX_KEY_LENGTH 64
28 #define MAX_PATH_LENGTH 256
30 #define FEATURE_WIFI "http://tizen.org/feature/network.wifi"
31 #define FEATURE_WIFIDIRECT "http://tizen.org/feature/network.wifi.direct"
32 #define FEATURE_SOFTAP "http://tizen.org/feature/network.wifi.softap"
34 #define WIFI_ADDRESS_PATH "/sys/class/net/wlan0/address"
35 #define WIFI_ADDRESS_PATH_PREFIX "/sys/class/net/"
36 #define WIFI_P2P_PATH "/sys/class/net/p2p0/address"
37 #define WIFI_P2P_CONFIG_PATH "/etc/wifi-direct/wifi-direct-manager.conf"
38 #define WFD_CONF_GROUP_NAME "wfd-manager"
40 GMainLoop *g_pMainLoop;
44 bool g_bFeatureSoftap;
46 #define RUN_GMAIN_LOOP(callback) {\
47 g_pMainLoop = g_main_loop_new(NULL, false);\
48 g_nTimeoutId = g_timeout_add(GMAINTIMEOUT, callback, g_pMainLoop);\
49 g_main_loop_run(g_pMainLoop);\
50 g_source_remove(g_nTimeoutId);\
54 #define QUIT_GMAIN_LOOP {\
56 g_main_loop_quit(g_pMainLoop);\
59 #define SKIP_NOT_SUPPORTED(bFeature) {\
61 printf("Feature is not support\n");\
70 #endif /* __NETCONFIG_UNITTEST_H__ */