Remove WPA2 and WPA3 service together
[platform/upstream/connman.git] / include / technology.h
1 /*
2  *
3  *  Connection Manager
4  *
5  *  Copyright (C) 2007-2013  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifndef __CONNMAN_TECHNOLOGY_H
23 #define __CONNMAN_TECHNOLOGY_H
24
25 #include <connman/service.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /**
32  * SECTION:technology
33  * @title: technology premitives
34  * @short_description: Functions for handling technology details
35  */
36
37 #if defined TIZEN_EXT
38 typedef enum {
39         CONNMAN_MULTI_SCAN_SSID = 0x01,
40         CONNMAN_MULTI_SCAN_FREQ,
41         CONNMAN_MULTI_SCAN_SSID_FREQ,
42 } connman_multi_scan_type_e;
43
44 typedef enum {
45         CONNMAN_SCAN_TYPE_FULL_CHANNEL = 0x00,
46         CONNMAN_SCAN_TYPE_SPECIFIC_AP,
47         CONNMAN_SCAN_TYPE_MULTI_AP,
48         CONNMAN_SCAN_TYPE_WPA_SUPPLICANT,
49         CONNMAN_SCAN_TYPE_UNKNOWN,
50 } connman_scan_type_e;
51
52 typedef struct {
53         char str[128];
54         gboolean flag;
55 } connman_multi_scan_ap_s;
56 #endif
57
58 struct connman_technology;
59
60 int connman_technology_tethering_notify(struct connman_technology *technology,
61                                                         bool enabled);
62 int connman_technology_set_regdom(const char *alpha2);
63 void connman_technology_regdom_notify(struct connman_technology *technology,
64                                                         const char *alpha2);
65
66 enum connman_service_type connman_technology_get_type
67                                 (struct connman_technology *technology);
68
69 bool connman_technology_get_wifi_tethering(const struct connman_technology *technology,
70                                         const char **ssid, const char **psk, int *freq);
71
72 bool connman_technology_is_tethering_allowed(enum connman_service_type type);
73
74 struct connman_technology_driver {
75         const char *name;
76         enum connman_service_type type;
77         int priority;
78         int (*probe) (struct connman_technology *technology);
79         void (*remove) (struct connman_technology *technology);
80         void (*add_interface) (struct connman_technology *technology,
81                                                 int index, const char *name,
82                                                         const char *ident);
83         void (*remove_interface) (struct connman_technology *technology,
84                                                                 int index);
85         int (*set_tethering) (struct connman_technology *technology,
86                                 const char *bridge, bool enabled);
87         int (*set_regdom) (struct connman_technology *technology,
88                                                 const char *alpha2);
89 };
90
91 int connman_technology_driver_register(struct connman_technology_driver *driver);
92 void connman_technology_driver_unregister(struct connman_technology_driver *driver);
93 #if defined TIZEN_EXT
94 const char *connman_techonology_get_path(enum connman_service_type type);
95 void __connman_technology_notify_scan_done(const char *ifname, int val);
96 void __connman_technology_append_interfaces(DBusMessageIter *array,
97                                 enum connman_service_type type, const char *ifname);
98 void __connman_technology_notify_device_detected_by_device(
99                 struct connman_device *device, const char *ifname, bool val);
100 void __connman_technology_notify_roaming_state(const char *ifname,
101                 const char *state, const char *cur_bssid, const char *dst_bssid);
102 #endif
103
104 #ifdef __cplusplus
105 }
106 #endif
107
108 #endif /* __CONNMAN_TECHNOLOGY_H */