GetEvent method

As the dbmlsync server runs a synchronization it generates a series of events that contain information about the progress of the synchronization. These events are sent from the server to the DbmlsyncClient class, which queues them. When the GetEvent method is called, the next event in the queue is returned if there is one waiting.

Syntax
DBSC_GetEventRet GetEvent( DBSC_Event **event, unsigned timeout )
Remarks

If there are no events waiting in the queue, this method waits until an event is available or until the specified timeout has expired before returning.

The types of event that are generated for a synchronization can be controlled using properties. See SetProperty method.

Parameters
  • event   If the return value is DBSC_GETEVENT_OK then the event is filled in with a pointer to a DBSC_Event structure containing information about the event that has been retrieved. See The DBSC_Event Structure. When you are finished with the event structure you must call the FreeEventInfo method to free memory associated with it.

  • timeout   Specifies the maximum number of milliseconds to wait if no event is immediately available to return.

Return value

Returns one of the following:

Return value Description
DBSC_GETEVENT_OK

Indicates that an event was successfully retrieved.

DBSC_GETEVENT_TIMED_OUT

Indicates that the timeout expired without any event being available to return.

DBSC_GETEVENT_FAILED

Indicates that no event was returned because of an error condition. When DBSC_GETEVENT_FAILED is returned, you can call the GetErrorInfo method to find out more about why the method failed. See GetErrorInfo method.