Go to the documentation of this file.
51 #include <global-hal.h>
58 namespace VirgilIoTKit {
70 typedef struct __attribute__((__packed__)) {
101 #define VS_UPDATE_DEFAULT_DESC_BUF_SZ (49)
117 #define VS_UPDATE_FILE_VERSION_STR_STATIC(VER_PTR) vs_update_file_version_str(VER_PTR, NULL, 0)
133 #define VS_UPDATE_FILE_TYPE_STR_STATIC(TYPE_PTR) vs_update_file_type_str(TYPE_PTR, NULL, 0)
311 #endif // VS_UPDATE_H
vs_update_get_header_cb_t get_header
Get header.
Definition: update.h:290
vs_update_set_header_cb_t set_header
Set header.
Definition: update.h:294
File type information.
Definition: update.h:70
vs_update_delete_object_cb_t delete_object
Delete item.
Definition: update.h:298
vs_status_e(* vs_update_set_data_cb_t)(void *context, vs_update_file_type_t *file_type, const void *file_header, const void *file_data, uint32_t data_size, uint32_t data_offset)
Set data.
Definition: update.h:242
vs_status_e vs_update_compare_version(const vs_file_version_t *update_ver, const vs_file_version_t *current_ver)
Compare two files versions.
vs_update_set_data_cb_t set_data
Set data.
Definition: update.h:295
vs_storage_op_ctx_t * storage_context
Storage context.
Definition: update.h:302
vs_update_get_header_size_cb_t get_header_size
Get header.
Definition: update.h:285
File information.
Definition: provision-structs.h:225
vs_update_has_footer_cb_t has_footer
Has footer.
Definition: update.h:287
vs_status_e
Status code.
Definition: status_code.h:77
vs_status_e(* vs_update_verify_object_cb_t)(void *context, vs_update_file_type_t *file_type)
Verify object of defined type.
Definition: update.h:274
vs_status_e(* vs_update_get_data_cb_t)(void *context, vs_update_file_type_t *file_type, const void *file_header, void *data_buffer, uint32_t buffer_size, uint32_t *data_size, uint32_t data_offset)
Get file data.
Definition: update.h:204
bool vs_update_equal_file_type(vs_update_file_type_t *file_type, const vs_update_file_type_t *unknown_file_type)
Compare two files types.
void(* vs_update_free_item_cb_t)(void *context, vs_update_file_type_t *file_type)
Free item during update destruction.
Definition: update.h:281
File version information.
Definition: provision-structs.h:216
vs_status_e(* vs_update_set_footer_cb_t)(void *context, vs_update_file_type_t *file_type, const void *file_header, const void *file_footer, uint32_t footer_size)
Set footer.
Definition: update.h:254
vs_status_e(* vs_update_set_header_cb_t)(void *context, vs_update_file_type_t *file_type, const void *file_header, uint32_t header_size, uint32_t *file_size)
Set header.
Definition: update.h:229
@ VS_UPDATE_FIRMWARE
Firmware files for different manufactures and device types.
Definition: update.h:64
void(* vs_update_delete_object_cb_t)(void *context, vs_update_file_type_t *file_type)
Delete object of defined type.
Definition: update.h:264
vs_update_get_footer_cb_t get_footer
Get footer.
Definition: update.h:292
vs_status_e(* vs_update_get_footer_cb_t)(void *context, vs_update_file_type_t *file_type, const void *file_header, void *footer_buffer, uint32_t buffer_size, uint32_t *footer_size)
Get footer.
Definition: update.h:217
vs_status_e(* vs_update_get_file_size_cb_t)(void *context, vs_update_file_type_t *file_type, const void *file_header, uint32_t *file_size)
Get file size.
Definition: update.h:154
Status codes and macroses.
vs_update_verify_object_cb_t verify_object
Verify item.
Definition: update.h:299
vs_update_file_type_id_t
File types.
Definition: update.h:63
vs_update_get_file_size_cb_t get_file_size
Get file size.
Definition: update.h:286
vs_status_e(* vs_update_inc_data_offset_cb_t)(void *context, vs_update_file_type_t *file_type, uint32_t current_offset, uint32_t loaded_data_size, uint32_t *next_offset)
Increment data offset.
Definition: update.h:178
const char * vs_update_file_type_str(const vs_update_file_type_t *file_type, char *opt_buf, size_t buf_sz)
Print file type description into memory buffer.
vs_update_get_data_cb_t get_data
Get data.
Definition: update.h:291
@ VS_UPDATE_TRUST_LIST
Trust List files.
Definition: update.h:65
Storage element context.
Definition: storage_hal.h:221
vs_update_free_item_cb_t free_item
Free item.
Definition: update.h:300
vs_file_info_t info
Additional file information.
Definition: update.h:72
vs_update_inc_data_offset_cb_t inc_data_offset
Increment data offstet.
Definition: update.h:288
const char * vs_update_file_version_str(const vs_file_version_t *version, char *opt_buf, size_t buf_sz)
Print file version into memory buffer.
vs_status_e(* vs_update_get_header_size_cb_t)(void *context, vs_update_file_type_t *file_type, uint32_t *header_size)
Get file type header size.
Definition: update.h:143
Update interface context.
Definition: update.h:284
vs_status_e(* vs_update_get_header_cb_t)(void *context, vs_update_file_type_t *file_type, void *header_buffer, uint32_t buffer_size, uint32_t *header_size)
Get file header.
Definition: update.h:190
vs_update_set_footer_cb_t set_footer
Set footer.
Definition: update.h:296
uint16_t type
vs_update_file_type_id_t
Definition: update.h:71
@ VS_UPDATE_USER_FILES
User file types must have an identifier that is not lower than this code.
Definition: update.h:66
vs_status_e(* vs_update_has_footer_cb_t)(void *context, vs_update_file_type_t *file_type, bool *has_footer)
Checks that such file type has footer.
Definition: update.h:164