Function anjay_sw_mgmt_finish_pkg_install
Defined in File sw_mgmt.h
Function Documentation
-
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)
Marks delivered software package as installed and optionally activated, making transition to Installed state or reports installation error.
WARNING: Calling this function is only valid in Delivered state, directly in the anjay_sw_mgmt_pkg_install_t handler, or in some later point of time, possibly after a reboot, as explained in anjay_sw_mgmt_pkg_install_t .
NOTE: Setting activation state with this function does NOT mean that activation ( anjay_sw_mgmt_activate_t ) or deactivation ( anjay_sw_mgmt_deactivate_t ) software package handler will be called. Setting activation state to true after installation breaks the specifications, but there are known cases when this behavior is required.
NOTE: If this function is called inside anjay_sw_mgmt_pkg_install_t handler with
pkg_install_resultset to ANJAY_SW_MGMT_FINISH_PKG_INSTALL_SUCCESS_INACTIVE or ANJAY_SW_MGMT_FINISH_PKG_INSTALL_SUCCESS_ACTIVE , the handler is expected to return 0. Otherwise, returning nonzero value will cause the result set by this function being overwritten.- Parameters:
anjay – Anjay object for which the Software Management Object is installed.
iid – ID of Software Management object instance.
pkg_install_result – Result of the installation process.
- Returns:
0 on success, or a negative value in case of error.