Change the calling order mesh_gdbus_set_mesh_gate and mesh_request_set_mesh_gate...
[platform/core/connectivity/wifi-mesh-manager.git] / include / mesh-gdbus.h
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __MESH_GDBUS_H__
18 #define __MESH_GDBUS_H__
19
20 #include "mesh.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /* DBus object paths of connman */
27 #define CONNMAN_SERVER_NAME "net.connman"
28 #define CONNMAN_OBJECT_PATH "/"
29 #define CONNMAN_OBJECT_PATH_MESH "/net/connman/mesh"
30 #define CONNMAN_OBJECT_PATH_TECH_MESH "/net/connman/technology/mesh"
31
32 /* DBus interfaces of connman */
33 #define CONNMAN_INTERFACE_MANAGER "net.connman.Manager"
34 #define CONNMAN_INTERFACE_MESH "net.connman.Mesh"
35 #define CONNMAN_INTERFACE_TECH "net.connman.Technology"
36
37 #define MESH_DBUS_PROXY_TIMEOUT ((9.5 + 2) * 1000) /**< default timeout for GDBus */
38
39 int meshd_dbus_start(mesh_service *service);
40 int meshd_dbus_stop(mesh_service *service);
41
42 int mesh_gdbus_create_mesh_interface(mesh_service *service);
43 int mesh_gdbus_remove_mesh_interface(mesh_service *service);
44 int mesh_gdbus_mesh_scan(mesh_service *service);
45 int mesh_gdbus_mesh_specific_scan(mesh_service *service, gchar *mesh_id,
46                 gint channel);
47 int mesh_gdbus_mesh_cancel_scan(mesh_service *service);
48 int mesh_gdbus_get_mesh_networks(mesh_service *service);
49 int mesh_gdbus_get_joined_mesh_network(mesh_service *service);
50 int mesh_gdbus_get_connected_peers(mesh_service *service);
51
52 int mesh_gdbus_create_network(mesh_service *service, gchar *mesh_id,
53                 gint channel, meshd_security_type_e sec);
54 int mesh_gdbus_set_passphrase(mesh_service *service, mesh_scan_result_s *info,
55                 gchar *passphrase);
56 int mesh_gdbus_connect_network(mesh_service *service, mesh_scan_result_s *info);
57 int mesh_gdbus_disconnect_network(mesh_service *service, mesh_scan_result_s *info);
58 int mesh_gdbus_remove_network(mesh_service *service, mesh_scan_result_s *info);
59 int mesh_gdbus_enable_ethernet_interface(mesh_service *service, bool state);
60 int mesh_gdbus_set_mesh_gate(mesh_service *service);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif /** __MESH_GDBUS_H__ */