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 ID of the synchronization operation 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 operation that has an ID matching id. The database name is copied into the dbname buffer, with at most dbname_sz bytes written. If there's no active synchronization with this ID (e.g., if 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 buffer size needed for the database name or number of bytes written. On failure, -1.