mm_sync_status_get_dbname()

Get the name of the database used in a specific synchronization

Synopsis:

#include <mmsync/mmsyncclient.h>
int mm_sync_status_get_dbname( mmsync_hdl_t *hdl, 
                               uint32_t id, 
                               char *dbname, 
                               size_t dbname_sz, 
                               uint32_t flags )

Arguments:

hdl
The mm-sync connection handle pointer.
id
The operation ID of the synchronization for which the database name is being retrieved.
dbname
A buffer to store the database name.
dbname_sz
The buffer size.
flags
Reserved for future use, must be 0.

Library:

mmsyncclient

Description:

Get the name of the database used in the synchronization with the operation ID matching id. The database name is copied into the dbname buffer, with at most dbname_sz bytes being written. If there's no active synchronization with this operation ID (e.g., the synchronization has already finished), nothing is written to the buffer.

If you need to know how much memory to allocate for the buffer, call mm_sync_status_get_dbname() with dbname set to NULL and dbname_sz set to 0. The function then returns the number of bytes needed to store the database name.

Returns:

On success, the required buffer size for storing the database name. On failure, -1 is returned.