swu_target_install_failed()

Report an update installation failure

Synopsis:

#include <swu/UpdateTargetInterface.h>
 
swu_result_t swu_target_install_failed(
                                swu_target_id_t id, 
                                swu_update_t update, 
                                swu_failure_reason_t reason, 
                                swu_failure_code_t code )

Arguments:

id
ID of the UpdateTarget that failed to install the update. This ID was assigned by the library in the call to swu_target_register().
update
Handle of an Update object representing the update that couldn't be installed on the target.
reason
Constant defined by the swu_failure_reason_t enumeration for indicating an installation failure (SWU_FAILURE_REASON_INSTALL_FAILED).
code
User-defined error code to help determine the issue that caused the update installation to fail. This value is only passed through and isn't used by the library, but logging this value can be handy for debugging.

Library:

libswu-core

Use the -l swu-core option with qcc to link against the SWU library. This library is usually included automatically.

Description:

Report an update installation failure. An UpdateTarget (which is referenced in id) calls this function to inform the UpdateClient that an error was encountered while installing the update specified in update. It's expected that the UpdateTarget call this function after returning from the install function referenced in its associated swu_target_interface_t structure.

Returns:

One of the following swu_result_t values:

SWU_RESULT_SUCCESS
The operation succeeded.
SWU_RESULT_INVALID_ARGUMENT
An invalid argument was given.
SWU_RESULT_ERROR
Another error occurred.