3 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
5 * @author: Anupam Roy <anupam.r@samsung.com>
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef _BT_HAL_MESH_DBUS_HANDLER_H_
23 #define _BT_HAL_MESH_DBUS_HANDLER_H_
26 #include <sys/types.h>
29 #include "bt-hal-log.h"
30 #include "bt-hal-msg.h"
33 #include "bt-hal-event-receiver.h"
39 void _bt_hal_mesh_register_dbus_handler_cb(handle_stack_msg cb);
41 void _bt_hal_mesh_unregister_dbus_handler_cb(void);
43 bool _bt_hal_mesh_stack_init(void);
45 void _bt_hal_mesh_stack_deinit(void);
47 bt_status_t _bt_hal_mesh_create_network(bt_hal_mesh_node_t *node,
48 GSList *models, bool is_prov);
50 bt_status_t _bt_hal_mesh_network_destroy(bt_uuid_t *net_uuid);
52 bt_status_t _bt_hal_mesh_join_network(bt_hal_mesh_node_t *node,
55 bt_status_t _bt_hal_mesh_join_cancel(bt_uuid_t *node_uuid);
57 bt_status_t _bt_hal_mesh_network_release(bt_uuid_t *net_uuid);
59 bt_status_t _bt_hal_mesh_node_delete(bt_uuid_t *network,
60 uint16_t unicast, uint16_t num_elements);
62 bt_status_t _bt_hal_mesh_network_scan(bt_uuid_t *net_uuid,
63 bt_hal_mesh_scan_param_t *param);
65 bt_status_t _bt_hal_mesh_network_scan_cancel(bt_uuid_t *net_uuid);
67 bt_status_t _bt_hal_mesh_network_set_caps(bt_uuid_t *net_uuid,
68 bt_hal_mesh_prov_caps_t *caps);
70 bt_status_t _bt_hal_mesh_provision_device(bt_uuid_t *net_uuid,
73 bt_status_t _bt_hal_mesh_send_provision_data(bt_uuid_t *net_uuid,
74 uint16_t netkey_idx, uint16_t unicast);
76 bt_status_t _bt_hal_mesh_attach_network(void);
78 bt_status_t _bt_hal_mesh_auth_reply(bt_hal_mesh_auth_variant_e auth_type,
79 const char *auth_value);
81 bt_status_t _bt_hal_mesh_network_subnet_execute(bt_uuid_t *net_uuid,
82 bt_mesh_key_op_e op, uint16_t netkey_idx);
84 bt_status_t _bt_hal_mesh_network_appkey_execute(bt_uuid_t *net_uuid,
85 bt_mesh_key_op_e op, uint16_t netkey_idx, uint16_t appkey_idx);
87 bt_status_t _bt_hal_mesh_send_configuration_message(bt_uuid_t *network, uint16_t dest,
88 bool is_dev_key, uint16_t netkey_idx,
89 uint8_t *buf, int len);
91 bt_status_t _bt_hal_mesh_model_execute_message(bt_uuid_t *network, uint16_t dest,
92 uint16_t appkey_idx, uint8_t *buf, int len);
94 bt_status_t _bt_hal_mesh_send_key_config_message(bt_uuid_t *network, uint16_t dest,
95 bool is_netkey, bool is_update, uint16_t key_idx, uint16_t netkey_idx);
99 #endif /* __cplusplus */
100 #endif /* _BT_HAL_MESH_DBUS_HANDLER_H_ */