Client interface

The mm-sync service provides a client interface that allows applications to connect to the service, start and monitor synchronizations, and set debugging levels.

The client interface defines functions for synchronizing specific media content on a device and for suspending, cancelling, or resuming a synchronization. This API section also defines synchronization option flags and data types used as function parameters.

Before you can synchronize any content, you must connect to mm-sync by calling mm_sync_connect(). This function returns a connection handle (as an mmsync_hdl_t value) that must be used in subsequent API calls to refer to the same connection. For example, you can start synchronizations by calling mm_sync_start(), passing in that connection handle along with the mountpoint of the device and the path containing the content that you want to synchronize.

When you're finished synchronizing media content, you can disconnect from mm-sync by calling mm_sync_disconnect().

There's also a function for setting the debugging and verbosity levels (mm_sync_debug_set()) so you can see useful troubleshooting information in the stderr file stream and sloginfo logging utility.