322a7d7e08fb97066264b5498347e8ef6c1cbc54
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / services / mesh / bt-service-mesh-network.h
1 /*
2  * Bluetooth-frwk
3  *
4  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
5  *
6  * @author: Anupam Roy <anupam.r@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *              http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef BT_SERVICE_MESH_NETWORK_H_
23 #define BT_SERVICE_MESH_NETWORK_H_
24
25 #include <glib.h>
26 #include <sys/types.h>
27 #include "bluetooth-api.h"
28 #include "bluetooth-mesh-api.h"
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 int _bt_mesh_network_create(const char *app_key,
35                 const char *sender, const char *network_name,
36                         bluetooth_mesh_node_t *node, GSList *model_list);
37
38 int _bt_mesh_network_create_cdb(int result,
39                 const char *sender, const char *app_creds,
40                         uint8_t uuid[16], uint8_t token[8],
41                                 const char *network);
42
43 int _bt_mesh_network_request_provisioning_data_request(
44                 uint8_t net_uuid[], uint8_t count);
45
46 int _bt_mesh_network_scan(const char *app_cred, const char *sender,
47                 bluetooth_mesh_network_t *network,
48                         bluetooth_mesh_scan_param_t *param);
49
50 int _bt_mesh_network_scan_cancel(const char *app_cred,
51                 const char *sender, bluetooth_mesh_network_t *network);
52
53 bool _bt_mesh_is_scanning(void);
54
55 void _bt_mesh_set_scanning_state(bool state);
56
57 bool _bt_mesh_is_provisioning(void);
58
59 void _bt_mesh_set_provisioning_state(bool state);
60
61 int _bt_mesh_network_set_provisioner_caps(const char *app_cred,
62                 const char *sender, bluetooth_mesh_network_t *network,
63                         bluetooth_mesh_provisioner_caps_t *caps);
64
65 int _bt_mesh_network_provision_device(const char *app_cred,
66                 const char *sender,
67                         bluetooth_mesh_provisioning_request_t *req);
68
69 int _bt_mesh_authentication_reply(int auth_type,
70                 const char *auth_value, gboolean reply);
71
72 #ifdef __cplusplus
73 }
74 #endif /* __cplusplus */
75 #endif /* BT_MESH_NETWORK_H_ */