mm_sync_control()

Send commands to a synchronization in progress

Synopsis:

#include <mmsync/mmsyncclient.h>
int mm_sync_control(mmsync_hdl_t *hdl,
                    uint32_t op_id,
                    strm_dict_t *extended_options,
                    uint32_t flags)

Arguments:

hdl
The mm-sync connection handle pointer.
op_id
The operation ID of the synchronization being controlled.
extended_options

A dictionary containing synchronization control options defined as key-value pairs; for details about using dictionaries, see the Dictionary Object API reference.

The action key is mandatory, and names the command to send to the synchronization. Currently, priority_folder_set is the only action defined. For this action, you must also name the folder selected for the priority synchronization, in either the folderid or folder_path key. You can also define dynamic_folder to enable or disable keeping the file IDs constant.

flags
Reserved for future use, must be 0.

Library:

mmsyncclient

Description:

Send commands to a synchronization in progress. Currently, the only command supported is priority_folder_set, which initiates a priority folder synchronization.

The command is applied to the synchronization identified by op_id.

The extended_options field configures options for the command, and supports these settings:
Key Value Description
action Currently, only one action is supported: priority_folder_set The action to perform on the synchronization.
folderid An integer storing the ID of a mediastore folder. The folder the action is performed on. Either this field or folder_path must be defined for actions such as priority_folder_set that affect a particular folder.
folder_path A string storing the path of a mediastore folder. The path is relative to the mediastore's filesystem (e.g., / refers to the mediastore's root folder). The folder the action is performed on. Either this field or folderid must be defined for actions such as priority_folder_set that affect a particular folder.
dynamic_folder enable or disable

Enable or disable the dynamic setting for the folder referred to by folderid or folder_path. This option applies to the priority_folder_set action. By default, this setting is disabled.

When this setting is enabled, the file IDs (fids) and playlist IDs (plids) for items in this folder remain constant. The setting is nonrecursive, so the only files affected are those in the top-level folder in the synchronization path named in the operation op_id; files in subfolders aren't affected.

For details on how synchronization is impacted, see Maintaining constant IDs for updated files and playlists.

Returns:

0 on success, -1 on failure.