Merge "Rectify gvariant type for frequency" into tizen
[platform/core/connectivity/net-config.git] / include / wifi-scan.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
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 #ifndef __NETCONFIG_SCAN_H__
21 #define __NETCONFIG_SCAN_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include "wifi.h"
28
29 #if defined TIZEN_WEARABLE
30 #define SCAN_PERIODIC_DELAY             15
31 #define SCAN_PERIODIC_DELAY_MIN 5
32 #define SCAN_PERIODIC_DELAY_MAX 120
33 #define SCAN_EXPONENTIAL_MIN    5
34 #define SCAN_EXPONENTIAL_MAX    320
35 #else
36 #define SCAN_PERIODIC_DELAY             10
37 #define SCAN_PERIODIC_DELAY_MIN 5
38 #define SCAN_PERIODIC_DELAY_MAX 120
39 #define SCAN_EXPONENTIAL_MIN    4
40 #define SCAN_EXPONENTIAL_MAX    128
41 #endif
42
43 enum {
44         WIFI_BGSCAN_MODE_EXPONENTIAL = 0x00,
45         WIFI_BGSCAN_MODE_PERIODIC,
46         WIFI_BGSCAN_MODE_MAX,
47 };
48
49 void netconfig_wifi_scan_set_scanning(const char *interface_name, gboolean scanning);
50 guint netconfig_wifi_scan_get_scanning(const char *interface_name);
51
52 gboolean netconfig_wifi_bgscan_set_mode(const char *interface_name, guint mode);
53 guint netconfig_wifi_bgscan_get_mode(const char *interface_name);
54 gboolean netconfig_wifi_bgscan_set_periodic_interval(const char *interface_name, guint interval);
55 guint netconfig_wifi_bgscan_get_periodic_interval(const char *interface_name);
56 void netconfig_wifi_bgscan_set_timer_id(const char *interface_name, guint timer_id);
57 guint netconfig_wifi_bgscan_get_timer_id(const char *interface_name);
58 gboolean netconfig_wifi_bgscan_set_exp_interval(const char *interface_name, guint interval);
59 guint netconfig_wifi_bgscan_get_exp_interval(const char *interface_name);
60 void netconfig_wifi_bgscan_set_pause(const char *interface_name, gboolean pause);
61 gboolean netconfig_wifi_bgscan_is_paused(const char *interface_name);
62 void netconfig_wifi_bgscan_start_timer(const char *interface_name, gboolean immediate_scan);
63 void netconfig_wifi_bgscan_stop_timer(const char *interface_name);
64
65 void netconfig_wifi_bssidscan_set_mode(const char *interface_name, gboolean enable);
66 gboolean netconfig_wifi_bssidscan_get_mode(const char *interface_name);
67 void netconfig_wifi_bssidscan_set_aborted(const char *interface_name, gboolean abort);
68 gboolean netconfig_wifi_bssidscan_get_aborted(const char *interface_name);
69 void netconfig_wifi_bssidscan_set_scanning(const char *interface_name, gboolean scanning);
70 guint netconfig_wifi_bssidscan_get_scanning(const char *interface_name);
71
72 #ifdef __cplusplus
73 }
74 #endif
75
76 #endif /* __NETCONFIG_SCAN_H__ */