Adjust dbus interface between API and connman
[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_ipc_create_mesh_interface(mesh_service *service);
43 int mesh_ipc_remove_mesh_interface(mesh_service *service);
44 int mesh_ipc_mesh_scan(mesh_service *service);
45 int mesh_ipc_mesh_specific_scan(mesh_service *service, gchar *mesh_id,
46         gint channel);
47 int mesh_ipc_mesh_cancel_scan(mesh_service *service);
48 int mesh_ipc_get_mesh_peers(mesh_service *service);
49 int mesh_ipc_get_joined_mesh_network(mesh_service *service);
50
51 int mesh_ipc_create_network(mesh_service *service, gchar *mesh_id, gint channel,
52         gint security);
53 int mesh_ipc_connect_network(mesh_service *service, mesh_scan_result_s *info);
54 int mesh_ipc_disconnect_network(mesh_service *service, mesh_scan_result_s *info);
55 int mesh_ipc_remove_network(mesh_service *service, mesh_scan_result_s *info);
56
57 #ifdef __cplusplus
58 }
59 #endif
60
61 #endif /** __MESH_GDBUS_H__ */