10#ifndef ANJAY_INCLUDE_ANJAY_SW_MGMT_H
11#define ANJAY_INCLUDE_ANJAY_SW_MGMT_H
50#define ANJAY_SW_MGMT_ERR_NOT_ENOUGH_SPACE \
51 (-(int) ANJAY_SW_MGMT_UPDATE_RESULT_NOT_ENOUGH_SPACE)
52#define ANJAY_SW_MGMT_ERR_OUT_OF_MEMORY \
53 (-(int) ANJAY_SW_MGMT_UPDATE_RESULT_OUT_OF_MEMORY)
54#define ANJAY_SW_MGMT_ERR_INTEGRITY_FAILURE \
55 (-(int) ANJAY_SW_MGMT_UPDATE_RESULT_INTEGRITY_FAILURE)
56#define ANJAY_SW_MGMT_ERR_UNSUPPORTED_PACKAGE_TYPE \
57 (-(int) ANJAY_SW_MGMT_UPDATE_RESULT_UNSUPPORTED_PACKAGE_TYPE)
577#ifdef ANJAY_WITH_DOWNLOADER
663 const char *download_uri,
689typedef avs_coap_udp_tx_params_t
693 const char *download_uri);
722typedef avs_time_duration_t
726 const char *download_uri);
806 void **out_inst_ctx);
888#ifdef ANJAY_WITH_DOWNLOADER
897# ifdef ANJAY_WITH_COAP_DOWNLOAD
935#if defined(ANJAY_WITH_DOWNLOADER)
uint16_t anjay_iid_t
Definition core.h:1185
struct anjay_struct anjay_t
Definition core.h:45
anjay_sw_mgmt_stream_finish_t * stream_finish
Definition sw_mgmt.h:853
anjay_sw_mgmt_get_name_t * get_name
Definition sw_mgmt.h:865
anjay_sw_mgmt_pkg_uninstall_t * pkg_uninstall
Definition sw_mgmt.h:876
anjay_sw_mgmt_remove_handler_t * remove_handler
Definition sw_mgmt.h:910
anjay_sw_mgmt_get_version_t * get_version
Definition sw_mgmt.h:869
anjay_sw_mgmt_activate_t * activate
Definition sw_mgmt.h:883
anjay_sw_mgmt_pkg_install_t * pkg_install
Definition sw_mgmt.h:873
anjay_sw_mgmt_stream_open_t * stream_open
Definition sw_mgmt.h:846
anjay_sw_mgmt_get_tcp_request_timeout_t * get_tcp_request_timeout
Definition sw_mgmt.h:895
anjay_sw_mgmt_get_coap_tx_params_t * get_coap_tx_params
Definition sw_mgmt.h:900
anjay_sw_mgmt_get_security_config_t * get_security_config
Definition sw_mgmt.h:891
anjay_sw_mgmt_stream_write_t * stream_write
Definition sw_mgmt.h:850
anjay_sw_mgmt_deactivate_t * deactivate
Definition sw_mgmt.h:886
anjay_sw_mgmt_prepare_for_update_t * prepare_for_update
Definition sw_mgmt.h:880
anjay_sw_mgmt_reset_t * reset
Definition sw_mgmt.h:861
anjay_sw_mgmt_add_handler_t * add_handler
Definition sw_mgmt.h:906
anjay_sw_mgmt_check_integrity_t * check_integrity
Definition sw_mgmt.h:857
anjay_iid_t iid
Definition sw_mgmt.h:143
void * inst_ctx
Definition sw_mgmt.h:148
anjay_sw_mgmt_initial_state_t initial_state
Definition sw_mgmt.h:136
const anjay_sw_mgmt_handlers_t * handlers
Definition sw_mgmt.h:927
bool prefer_same_socket_downloads
Definition sw_mgmt.h:941
void * obj_ctx
Definition sw_mgmt.h:933
int anjay_sw_mgmt_install(anjay_t *anjay, const anjay_sw_mgmt_settings_t *settings)
anjay_sw_mgmt_initial_state_t
Definition sw_mgmt.h:67
@ ANJAY_SW_MGMT_INITIAL_STATE_INSTALLED_DEACTIVATED
Definition sw_mgmt.h:114
@ ANJAY_SW_MGMT_INITIAL_STATE_INSTALLING
Definition sw_mgmt.h:107
@ ANJAY_SW_MGMT_INITIAL_STATE_IDLE
Definition sw_mgmt.h:82
@ ANJAY_SW_MGMT_INITIAL_STATE_INSTALLED_ACTIVATED
Definition sw_mgmt.h:121
@ ANJAY_SW_MGMT_INITIAL_STATE_DELIVERED
Definition sw_mgmt.h:98
@ ANJAY_SW_MGMT_INITIAL_STATE_DOWNLOADED
Definition sw_mgmt.h:90
int anjay_sw_mgmt_deactivate_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:575
int anjay_sw_mgmt_remove_handler_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:837
int anjay_sw_mgmt_check_integrity_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:285
anjay_sw_mgmt_update_result_t
Definition sw_mgmt.h:24
@ ANJAY_SW_MGMT_UPDATE_RESULT_UPDATE_ERROR
Definition sw_mgmt.h:35
@ ANJAY_SW_MGMT_UPDATE_RESULT_INSTALLATION_FAILURE
Definition sw_mgmt.h:36
@ ANJAY_SW_MGMT_UPDATE_RESULT_DOWNLOADED_VERIFIED
Definition sw_mgmt.h:28
@ ANJAY_SW_MGMT_UPDATE_RESULT_INSTALLED
Definition sw_mgmt.h:27
@ ANJAY_SW_MGMT_UPDATE_RESULT_CONNECTION_LOST
Definition sw_mgmt.h:31
@ ANJAY_SW_MGMT_UPDATE_RESULT_NOT_ENOUGH_SPACE
Definition sw_mgmt.h:29
@ ANJAY_SW_MGMT_UPDATE_RESULT_INVALID_URI
Definition sw_mgmt.h:34
@ ANJAY_SW_MGMT_UPDATE_RESULT_UNINSTALLATION_FAILURE
Definition sw_mgmt.h:37
@ ANJAY_SW_MGMT_UPDATE_RESULT_DOWNLOADING
Definition sw_mgmt.h:26
@ ANJAY_SW_MGMT_UPDATE_RESULT_OUT_OF_MEMORY
Definition sw_mgmt.h:30
@ ANJAY_SW_MGMT_UPDATE_RESULT_INTEGRITY_FAILURE
Definition sw_mgmt.h:32
@ ANJAY_SW_MGMT_UPDATE_RESULT_INITIAL
Definition sw_mgmt.h:25
@ ANJAY_SW_MGMT_UPDATE_RESULT_UNSUPPORTED_PACKAGE_TYPE
Definition sw_mgmt.h:33
int anjay_sw_mgmt_add_handler_t(void *obj_ctx, anjay_iid_t iid, void **out_inst_ctx)
Definition sw_mgmt.h:804
int anjay_sw_mgmt_prepare_for_update_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:499
int anjay_sw_mgmt_stream_write_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx, const void *data, size_t length)
Definition sw_mgmt.h:213
avs_coap_udp_tx_params_t anjay_sw_mgmt_get_coap_tx_params_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx, const char *download_uri)
Definition sw_mgmt.h:690
int anjay_sw_mgmt_pkg_install_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:432
const char * anjay_sw_mgmt_get_version_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:383
int anjay_sw_mgmt_pull_reconnect(anjay_t *anjay)
int anjay_sw_mgmt_activate_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:538
int anjay_sw_mgmt_add_instance(anjay_t *anjay, const anjay_sw_mgmt_instance_initializer_t *instance_initializer)
int anjay_sw_mgmt_remove_instance(anjay_t *anjay, anjay_iid_t iid)
int anjay_sw_mgmt_get_activation_state(anjay_t *anjay, anjay_iid_t iid, bool *out_state)
anjay_sw_mgmt_finish_pkg_install_result_t
Definition sw_mgmt.h:1003
@ ANJAY_SW_MGMT_FINISH_PKG_INSTALL_SUCCESS_INACTIVE
Definition sw_mgmt.h:1008
@ ANJAY_SW_MGMT_FINISH_PKG_INSTALL_SUCCESS_ACTIVE
Definition sw_mgmt.h:1018
@ ANJAY_SW_MGMT_FINISH_PKG_INSTALL_FAILURE
Definition sw_mgmt.h:1023
const char * anjay_sw_mgmt_get_name_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:347
int anjay_sw_mgmt_stream_finish_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:256
avs_time_duration_t anjay_sw_mgmt_get_tcp_request_timeout_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx, const char *download_uri)
Definition sw_mgmt.h:723
int anjay_sw_mgmt_stream_open_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:181
int anjay_sw_mgmt_pkg_uninstall_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:467
void anjay_sw_mgmt_reset_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:311
int anjay_sw_mgmt_get_security_config_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx, const char *download_uri, anjay_security_config_t *out_security_info)
Definition sw_mgmt.h:660
void anjay_sw_mgmt_pull_suspend(anjay_t *anjay)
int anjay_sw_mgmt_finish_pkg_install(anjay_t *anjay, anjay_iid_t iid, anjay_sw_mgmt_finish_pkg_install_result_t pkg_install_result)