bf21e155323340e8eb5477a1728a2006b8018b44
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-mesh-dbus-handler.h
1 /* Bluetooth-frwk
2  *
3  * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
4  *
5  * @author: Anupam Roy <anupam.r@samsung.com>
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *              http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21
22 #ifndef _BT_HAL_MESH_DBUS_HANDLER_H_
23 #define _BT_HAL_MESH_DBUS_HANDLER_H_
24
25 #include <glib.h>
26 #include <sys/types.h>
27
28 #include "bt-hal.h"
29 #include "bt-hal-log.h"
30 #include "bt-hal-msg.h"
31 #include "bt_mesh.h"
32
33 #include "bt-hal-event-receiver.h"
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 void _bt_hal_mesh_register_dbus_handler_cb(handle_stack_msg cb);
40
41 void _bt_hal_mesh_unregister_dbus_handler_cb(void);
42
43 bool _bt_hal_mesh_stack_init(void);
44
45 bt_status_t _bt_hal_mesh_create_network(bt_hal_mesh_node_t *node,
46                 GSList *models, bool is_prov);
47
48 bt_status_t _bt_hal_mesh_network_scan(bt_uuid_t *net_uuid,
49                 bt_hal_mesh_scan_param_t *param);
50
51 bt_status_t _bt_hal_mesh_network_scan_cancel(bt_uuid_t *net_uuid);
52
53 bt_status_t _bt_hal_mesh_network_set_caps(bt_uuid_t *net_uuid,
54                 bt_hal_mesh_prov_caps_t *caps);
55
56 bt_status_t _bt_hal_mesh_provision_device(bt_uuid_t *net_uuid,
57                 bt_uuid_t *dev_uuid);
58
59 bt_status_t _bt_hal_mesh_send_provision_data(bt_uuid_t *net_uuid,
60                 uint16_t netkey_idx, uint16_t unicast);
61
62 bt_status_t _bt_hal_mesh_attach_network(void);
63
64 bt_status_t _bt_hal_mesh_auth_reply(bt_hal_mesh_auth_variant_e auth_type,
65                 const char *auth_value);
66
67 bt_status_t _bt_hal_mesh_network_subnet_execute(bt_uuid_t *net_uuid,
68                 bt_mesh_key_op_e op, uint16_t netkey_idx);
69
70 bt_status_t _bt_hal_mesh_network_appkey_execute(bt_uuid_t *net_uuid,
71                 bt_mesh_key_op_e op, uint16_t netkey_idx, uint16_t appkey_idx);
72
73 bt_status_t _bt_hal_mesh_send_configuration_message(bt_uuid_t *network, uint16_t dest,
74                 bool is_dev_key, uint16_t netkey_idx,
75                         uint8_t *buf, int len);
76
77 bt_status_t _bt_hal_mesh_model_execute_message(bt_uuid_t *network, uint16_t dest,
78                 uint16_t appkey_idx, uint8_t *buf, int len);
79
80 bt_status_t _bt_hal_mesh_send_key_config_message(bt_uuid_t *network, uint16_t dest,
81                 bool is_netkey, bool is_update, uint16_t key_idx, uint16_t netkey_idx);
82
83 #ifdef __cplusplus
84 }
85 #endif /* __cplusplus */
86 #endif /* _BT_HAL_MESH_DBUS_HANDLER_H_ */