19 #ifndef __FOTA_CANDIDATE_H_ 20 #define __FOTA_CANDIDATE_H_ 22 #include "fota/fota_base.h" 24 #if defined(MBED_CLOUD_CLIENT_FOTA_ENABLE) 26 #include "fota/fota_header_info.h" 27 #include "fota/fota_crypto_defs.h" 28 #include "fota/fota_comp_callbacks.h" 35 typedef uint16_t fota_candidate_block_checksum_t;
48 fota_candidate_iterate_status status;
52 fota_header_info_t *header_info;
54 } fota_candidate_iterate_callback_info;
64 size_t storage_start_addr;
65 } fota_candidate_config_t;
73 void fota_candidate_set_config(fota_candidate_config_t *in_fota_candidate_config);
80 const fota_candidate_config_t *fota_candidate_get_config(
void);
89 fota_deprecated
typedef int (*fota_candidate_iterate_handler_t)(fota_candidate_iterate_callback_info *info);
91 #define FOTA_CANDIDATE_SKIP_VALIDATION 0x27 103 int fota_candidate_iterate_image_backward_support(uint8_t validate,
bool force_encrypt,
const char *expected_comp_name,
104 uint32_t install_alignment, fota_candidate_iterate_handler_t handler);
117 int fota_candidate_iterate_image(uint8_t validate,
bool force_encrypt,
const char *expected_comp_name,
118 uint32_t install_alignment, fota_candidate_iterate_handler_t handler, fota_comp_install_cb_t component_install_cb);
129 int fota_candidate_read_candidate_ready_header(
size_t *addr, uint32_t bd_read_size, uint32_t bd_prog_size,
130 fota_candidate_ready_header_t *header);
141 int fota_candidate_read_header(
size_t *addr, uint32_t bd_read_size, uint32_t bd_prog_size, fota_header_info_t *header);
148 int fota_candidate_erase(
void);
154 #endif // defined(MBED_CLOUD_CLIENT_FOTA_ENABLE) 156 #endif // __FOTA_CANDIDATE_H_