Change the calling order mesh_gdbus_set_mesh_gate and mesh_request_set_mesh_gate...
[platform/core/connectivity/wifi-mesh-manager.git] / include / mesh-request.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2017 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 #ifndef __MESH_REQUEST_H__
20 #define __MESH_REQUEST_H__
21
22 /* Newly functions */
23 int mesh_request_enable_network(mesh_service *service);
24 int mesh_request_disable_network(mesh_service *service);
25 int mesh_request_scan(mesh_service *service);
26 int mesh_request_specific_scan(mesh_service *service, gchar *mesh_id,
27                 gint channel);
28 int mesh_request_cancel_scan(mesh_service *service);
29 int mesh_request_get_networks(mesh_service *service);
30 int mesh_request_get_joined_network(mesh_service *service);
31 int mesh_request_get_connected_peers(mesh_service *service);
32
33 int mesh_request_create_mesh_network(mesh_service *service, gchar *mesh_id,
34                 gint channel, meshd_security_type_e sec);
35 int mesh_request_connect_mesh_network(mesh_service *service, gchar *mesh_id,
36                 gint channel, meshd_security_type_e sec, gchar *passphrase);
37 int mesh_request_disconnect_mesh_network(mesh_service *service,
38                 gchar *mesh_id, gint channel, meshd_security_type_e sec);
39 int mesh_request_remove_mesh_network(mesh_service *service,
40                 gchar *mesh_id, gint channel, meshd_security_type_e sec);
41
42 int mesh_request_set_mesh_gate(const char* bridge_interface,
43                 const char* mesh_interface, const char* external_interface);
44 int mesh_request_unset_mesh_gate(const char* bridge_interface,
45                 const char* mesh_interface, const char* external_interface);
46
47
48 /* Bridge network */
49 int mesh_request_add_bridge_interface(const char* bridge_interface,
50                 const char* interface);
51 int mesh_request_remove_bridge_interface(const char* bridge_interface,
52                 const char* interface);
53
54 /* Soft AP */
55 int mesh_request_set_softap_config(const char* softap_interface,
56                 const char *ssid, const char* mode, int channel, int visibility,
57                 int max_sta, int security, const char* passphrase);
58 int mesh_request_enable_softap(
59                 const char* bridge_interface, const char* softap_interface);
60 int mesh_request_disable_softap(
61                 const char* bridge_interface, const char* softap_interface);
62
63 /* Mesh Station & path */
64 int mesh_request_get_station_info(const char* mesh_interface, GList **station_list);
65 int mesh_request_get_mpath_info(const char* mesh_interface, GList **mpath_list);
66
67 int mesh_request_register_event_handler();
68 int mesh_request_unregister_event_handler();
69
70 /* Notifications */
71 void mesh_notify_scan_done();
72 void mesh_notify_connection_state(const char* mesh_id, const char* bssid,
73                 int channel, meshd_security_type_e sec, meshd_connection_state_e state);
74 void mesh_notify_station_joined(const char* bssid);
75 void mesh_notify_station_left(const char* bssid);
76
77 #endif /* __MESH_REQUEST_H__ */