swu_update_notifications_t

Structure containing notification callbacks and their context pointers

Synopsis:

typedef struct {

    void (*progress)
                ( swu_update_t update, 
                  swu_progress_t percent, 
                  void *progress_context );

    void *progress_context;

    void (*state_changed)
                ( swu_update_t update, 
                  swu_update_state_t state, 
                  void *state_changed_context );

    swu_update_state_mask_t state_mask;

    void *state_changed_context;

} swu_update_notifications_t;

Data:

void (*progress) ( swu_update_t update, swu_progress_t percent, void *progress_context )
Callback function for processing notifications of progress in the update installation or verification.
void *progress_context
Pointer to user-supplied data that will be passed to the progress function.
void (*state_changed) ( swu_update_t update, swu_update_state_t state, void *state_changed_context )
Callback function for processing notifications of update state changes.
The state_changed function is called for the first time when the notifications structure is registered in a call to swu_update_register_notifications().
swu_update_state_mask_t state_mask
Mask specifying which update states to be notified of when the update transitions to one of those states.
void *state_changed_context
Pointer to user-supplied data that will be passed to the state_changed function.

Library:

libswu-core

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

Description:

The swu_update_notifications_t structure defines the notification callbacks for handling progress updates or update state changes as well as the context pointers to pass to those callbacks. Setting a notification callback pointer to NULL prevents that notification from being sent. Setting a context pointer to NULL means no user-supplied data will be passed to the corresponding callback function.

You must register the callbacks specified in the swu_update_notification_t structure by calling swu_update_register_notifications(), to ensure they will run in response to progress updates or update state changes. When you no longer need to run the callbacks, you should unregister them by calling swu_update_unregister_notifications().