mm_sync_status_get()

Get the statuses of active synchronizations

Synopsis:

#include <mmsync/mmsyncclient.h>
int mm_sync_status_get( mmsync_hdl_t *hdl, 
                        mmsync_status_t *status, 
                        size_t max_num_status, 
                        uint32_t flags )

Arguments:

hdl
The mm-sync connection handle pointer.
status
A pointer to an array of structures to hold the statuses.
max_num_status
The array size.
flags
Reserved for future use, must be 0.

Library:

mmsyncclient

Description:

Get the statuses of active synchronizations, including those started before your application connected to mm-sync.

This function writes the statuses of individual synchronizations into separate mmsync_status_t structures. Note that max_num_status is the maximum number of structures that mm-sync will write to, not the size of the mmsync_status_t data type. So, you must provide a buffer of sizeof(mmsync_status_t) * max_num_status bytes in status.

If you want to get information about all active synchronizations, you can first call mm_sync_status_get() with max_num_status to 0 and status to NULL. The function will return the total number of synchronizations in progress or pending, which you can use to calculate the amount of buffer space needed. You can then call this function again and mm-sync will write the statuses of all synchronizations into the sufficiently large buffer.

Returns:

On success, a value greater than 0 indicating the number of synchronizations in progress or pending. This value may be greater than max_num_status but only the minimum of this return value or max_num_status statuses are available. On failure, -1 is returned.