The DBSC_Event Structure

The DBSC_Event structure contains information about a synchronization that has been requested. The structure is defined as follows:

typedef struct {
    DBSC_SyncHdl	hdl;		
    DBSC_EventType	type;
    const char 		*str1;
    const char		*str2;
    long int		val1;
    long int		val2;
    void			*data;
} DBSC_Event;

The hdl field identifies the synchronization request for which the structure contains information. This value matches the handle returned by the Sync method.

The type field identifies the type of event being reported.

The remaining fields contain additional data, the nature of which depends on the value of the type field. Following is a list of the possible type values and the meaning of the remaining fields associated with each:

Value Description
DBSC_EVENTTYPE_ERROR_MSG

An error was generated by the synchronization and str1 points to the text of the error.

DBSC_EVENTTYPE_WARNING_MSG

A warning was generated by the synchronization and str1 points to the text of the warning.

DBSC_EVENTTYPE_INFO_MSG

An information message was generated by the synchronization and str1 points to the text of the message.

DBSC_EVENTTYPE_PROGRESS_INDEX

Provides information for updating a progress bar. val1 contains the new progress value. The percent done can be calculated by dividing val1 by 1000.

DBSC_EVENTTYPE_PROGRESS_TEXT

The text associated with the progress bar has been updated and the new value is pointed to by str1.

DBSC_EVENTTYPE_TITLE

The title for the synchronization window/control has changed and the new title is pointed to by str1.

DBSC_EVENTTYPE_SYNC_START

The synchronization has begun. There is no additional information associated with this event.

DBSC_EVENTTYPE_SYNC_DONE

The synchronization is complete and val1 contains the exit code from the synchronization. A 0 value indicates success. A non-zero value indicates that the synchronization failed.