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_node_delete(bt_uuid_t *network,
53 uint16_t unicast, uint16_t num_elements);
55 bt_status_t _bt_hal_mesh_network_scan(bt_uuid_t *net_uuid,
56 bt_hal_mesh_scan_param_t *param);
58 bt_status_t _bt_hal_mesh_network_scan_cancel(bt_uuid_t *net_uuid);
60 bt_status_t _bt_hal_mesh_network_set_caps(bt_uuid_t *net_uuid,
61 bt_hal_mesh_prov_caps_t *caps);
63 bt_status_t _bt_hal_mesh_provision_device(bt_uuid_t *net_uuid,
66 bt_status_t _bt_hal_mesh_send_provision_data(bt_uuid_t *net_uuid,
67 uint16_t netkey_idx, uint16_t unicast);
69 bt_status_t _bt_hal_mesh_attach_network(void);
71 bt_status_t _bt_hal_mesh_auth_reply(bt_hal_mesh_auth_variant_e auth_type,
72 const char *auth_value);
74 bt_status_t _bt_hal_mesh_network_subnet_execute(bt_uuid_t *net_uuid,
75 bt_mesh_key_op_e op, uint16_t netkey_idx);
77 bt_status_t _bt_hal_mesh_network_appkey_execute(bt_uuid_t *net_uuid,
78 bt_mesh_key_op_e op, uint16_t netkey_idx, uint16_t appkey_idx);
80 bt_status_t _bt_hal_mesh_send_configuration_message(bt_uuid_t *network, uint16_t dest,
81 bool is_dev_key, uint16_t netkey_idx,
82 uint8_t *buf, int len);
84 bt_status_t _bt_hal_mesh_model_execute_message(bt_uuid_t *network, uint16_t dest,
85 uint16_t appkey_idx, uint8_t *buf, int len);
87 bt_status_t _bt_hal_mesh_send_key_config_message(bt_uuid_t *network, uint16_t dest,
88 bool is_netkey, bool is_update, uint16_t key_idx, uint16_t netkey_idx);
92 #endif /* __cplusplus */
93 #endif /* _BT_HAL_MESH_DBUS_HANDLER_H_ */