Inform the UpdateClient of a new UpdateTarget
Synopsis:
#include <swu/UpdateTargetInterface.h>
swu_result_t swu_target_register(
const char *vendor_id,
const char *hardware_id,
swu_target_interface_t *interface,
swu_target_id_t *id )
Arguments:
- vendor_id
- Constant string for the target's vendor ID, used with the value in hardware_id to uniquely
identify the UpdateTarget. The function makes its own copy of the string.
- hardware_id
- Constant string for the target's hardware ID, used with the value in vendor_id to uniquely
identify the UpdateTarget. The function makes its own copy of the string.
- interface
- Handle of the swu_target_interface_t
structure used by the UpdateClient to communicate with a specific UpdateTarget.
- id
- On output, the UpdateTarget ID assigned by the UpdateClient.
Library:
libswu-coreUse the -l swu-core option with
qcc to link against the SWU library. This library is usually included automatically.
Description:
Inform the UpdateClient of a new UpdateTarget.
The client assigns an ID to the target and uses that ID when communicating with the target. The function doesn't copy
the swu_target_interface_t structure, which is expected to be maintained by the caller.
Returns:
One of the following swu_result_t values:
- SWU_RESULT_SUCCESS
- The operation succeeded.
- SWU_RESULT_DUPLICATE_ENTRY
- An UpdateTarget with this Vendor ID and Hardware ID pair has already been registered.
- SWU_RESULT_INVALID_ARGUMENT
- An invalid argument was given.
- SWU_RESULT_ERROR
- Another error occurred.