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)
535#ifdef ANJAY_WITH_DOWNLOADER
618 const char *download_uri,
641typedef avs_coap_udp_tx_params_t
645 const char *download_uri);
671typedef avs_time_duration_t
675 const char *download_uri);
746 void **out_inst_ctx);
821#ifdef ANJAY_WITH_DOWNLOADER
830# ifdef ANJAY_WITH_COAP_DOWNLOAD
865#if defined(ANJAY_WITH_DOWNLOADER)
uint16_t anjay_iid_t
Definition core.h:1299
struct anjay_struct anjay_t
Definition core.h:49
anjay_sw_mgmt_stream_finish_t * stream_finish
Definition sw_mgmt.h:786
anjay_sw_mgmt_get_name_t * get_name
Definition sw_mgmt.h:798
anjay_sw_mgmt_pkg_uninstall_t * pkg_uninstall
Definition sw_mgmt.h:809
anjay_sw_mgmt_remove_handler_t * remove_handler
Definition sw_mgmt.h:843
anjay_sw_mgmt_get_version_t * get_version
Definition sw_mgmt.h:802
anjay_sw_mgmt_activate_t * activate
Definition sw_mgmt.h:816
anjay_sw_mgmt_pkg_install_t * pkg_install
Definition sw_mgmt.h:806
anjay_sw_mgmt_stream_open_t * stream_open
Definition sw_mgmt.h:779
anjay_sw_mgmt_get_tcp_request_timeout_t * get_tcp_request_timeout
Definition sw_mgmt.h:828
anjay_sw_mgmt_get_coap_tx_params_t * get_coap_tx_params
Definition sw_mgmt.h:833
anjay_sw_mgmt_get_security_config_t * get_security_config
Definition sw_mgmt.h:824
anjay_sw_mgmt_stream_write_t * stream_write
Definition sw_mgmt.h:783
anjay_sw_mgmt_deactivate_t * deactivate
Definition sw_mgmt.h:819
anjay_sw_mgmt_prepare_for_update_t * prepare_for_update
Definition sw_mgmt.h:813
anjay_sw_mgmt_reset_t * reset
Definition sw_mgmt.h:794
anjay_sw_mgmt_add_handler_t * add_handler
Definition sw_mgmt.h:839
anjay_sw_mgmt_check_integrity_t * check_integrity
Definition sw_mgmt.h:790
anjay_iid_t iid
Definition sw_mgmt.h:137
void * inst_ctx
Definition sw_mgmt.h:142
anjay_sw_mgmt_initial_state_t initial_state
Definition sw_mgmt.h:130
const anjay_sw_mgmt_handlers_t * handlers
Definition sw_mgmt.h:857
bool prefer_same_socket_downloads
Definition sw_mgmt.h:871
void * obj_ctx
Definition sw_mgmt.h:863
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:64
@ ANJAY_SW_MGMT_INITIAL_STATE_INSTALLED_DEACTIVATED
Definition sw_mgmt.h:111
@ ANJAY_SW_MGMT_INITIAL_STATE_INSTALLING
Definition sw_mgmt.h:104
@ ANJAY_SW_MGMT_INITIAL_STATE_IDLE
Definition sw_mgmt.h:79
@ ANJAY_SW_MGMT_INITIAL_STATE_INSTALLED_ACTIVATED
Definition sw_mgmt.h:118
@ ANJAY_SW_MGMT_INITIAL_STATE_DELIVERED
Definition sw_mgmt.h:95
@ ANJAY_SW_MGMT_INITIAL_STATE_DOWNLOADED
Definition sw_mgmt.h:87
int anjay_sw_mgmt_deactivate_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:533
int anjay_sw_mgmt_remove_handler_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:774
int anjay_sw_mgmt_check_integrity_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:267
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:744
int anjay_sw_mgmt_prepare_for_update_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:463
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:201
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:642
int anjay_sw_mgmt_pkg_install_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:402
const char * anjay_sw_mgmt_get_version_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:356
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:499
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:924
@ ANJAY_SW_MGMT_FINISH_PKG_INSTALL_SUCCESS_INACTIVE
Definition sw_mgmt.h:929
@ ANJAY_SW_MGMT_FINISH_PKG_INSTALL_SUCCESS_ACTIVE
Definition sw_mgmt.h:939
@ ANJAY_SW_MGMT_FINISH_PKG_INSTALL_FAILURE
Definition sw_mgmt.h:944
const char * anjay_sw_mgmt_get_name_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:323
int anjay_sw_mgmt_stream_finish_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:241
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:672
int anjay_sw_mgmt_stream_open_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:172
int anjay_sw_mgmt_pkg_uninstall_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:434
void anjay_sw_mgmt_reset_t(void *obj_ctx, anjay_iid_t iid, void *inst_ctx)
Definition sw_mgmt.h:290
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:615
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)