swu_update_get_grace_period()

Get the grace period for accepting a software update

Synopsis:

#include <swu/Update.h>

swu_result_t swu_update_get_grace_period( 
                                swu_update_t update, 
                                swu_timestamp_t *period )

Arguments:

update
Handle of the Update.
period
Pointer to the swu_timestamp_t to store the version.

Library:

libswu-core

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

Description:

Get the grace period for accepting the software update referenced in update. This function retrieves the grace period specified when the Update was created and stores it in period. Note that the grace period can't be changed after the Update has been created.

If you didn't set a grace period for this specific Update, the default value will be used. The library defines a default grace period of seven days, but this can be overridden in the manifest file. Furthermore, you can call swu_client_configuration_set_update_grace_period() to change the default grace period after the library is initialized. The value specified with this client configuration function will then become the default for all updates, overriding any value set by the library or manifest file.

Note: In this release, the grace period has no impact on how the SWU library handles updates. The grace period is just kept as metadata describing an update (because this value can be set in the manifest file).

Returns:

One of the following swu_result_t values:

SWU_RESULT_SUCCESS
The operation succeeded.
SWU_RESULT_INVALID_ARGUMENT
One of the arguments is invalid.