1 /*
2  * Copyright (c) 2022 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFD_SRV_INTERNAL_H__
8 #define ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFD_SRV_INTERNAL_H__
9 
10 #include <zephyr/bluetooth/mesh.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 struct bt_mesh_dfd_start_params {
17 	uint16_t app_idx, timeout_base, slot_idx, group;
18 	enum bt_mesh_blob_xfer_mode xfer_mode;
19 	uint8_t ttl;
20 	bool apply;
21 };
22 
23 enum bt_mesh_dfd_status bt_mesh_dfd_srv_receiver_add(struct bt_mesh_dfd_srv *srv, uint16_t addr,
24 						     uint8_t img_idx);
25 
26 enum bt_mesh_dfd_status bt_mesh_dfd_srv_receivers_delete_all(struct bt_mesh_dfd_srv *srv);
27 
28 enum bt_mesh_dfd_status bt_mesh_dfd_srv_start(struct bt_mesh_dfd_srv *srv,
29 					      struct bt_mesh_dfd_start_params *params);
30 
31 enum bt_mesh_dfd_status bt_mesh_dfd_srv_suspend(struct bt_mesh_dfd_srv *srv);
32 
33 enum bt_mesh_dfd_status bt_mesh_dfd_srv_cancel(struct bt_mesh_dfd_srv *srv,
34 					       struct bt_mesh_msg_ctx *ctx);
35 
36 enum bt_mesh_dfd_status bt_mesh_dfd_srv_apply(struct bt_mesh_dfd_srv *srv);
37 
38 enum bt_mesh_dfd_status bt_mesh_dfd_srv_fw_delete(struct bt_mesh_dfd_srv *srv, size_t *fwid_len,
39 						  const uint8_t **fwid);
40 
41 enum bt_mesh_dfd_status bt_mesh_dfd_srv_fw_delete_all(struct bt_mesh_dfd_srv *srv);
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif /* ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFD_SRV_INTERNAL_H__ */
48