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 WIFIDIRECT_FEATURE "http://tizen.org/feature/network.wifi.direct"
33 #define WIFI_ADDRESS_PATH "/sys/class/net/wlan0/address"
34 #define WIFI_P2P_PATH "/sys/class/net/p2p0/address"
35 #define WIFI_P2P_CONFIG_PATH "/etc/wifi-direct/wifi-direct-manager.conf"
36 #define WFD_CONF_GROUP_NAME "wfd-manager"
38 GMainLoop *g_pMainLoop;
43 #define RUN_GMAIN_LOOP(callback) {\
44 g_pMainLoop = g_main_loop_new(NULL, false);\
45 g_nTimeoutId = g_timeout_add(GMAINTIMEOUT, callback, g_pMainLoop);\
46 g_main_loop_run(g_pMainLoop);\
47 g_source_remove(g_nTimeoutId);\
51 #define QUIT_GMAIN_LOOP {\
53 g_main_loop_quit(g_pMainLoop);\
60 #endif /* __NETCONFIG_UNITTEST_H__ */