Configuration constants

Constants for defining mm-sync configuration values


#include <mmsync/config.h>

General configuration settings:

#define CONF_DFLT_DEVICE_PATH "/dev/mmsync"
Default device path of mm-sync resource manager. All control contexts are created under this path.
Default verbosity level for mm-sync initialization log messages.

Event settings:

#define CONF_NTFY_QUEUE_MAX (80)
Maximum number of event notifications that can be queued at a time.
Default emission control of folder synchronization events, which is trimonly.
Number of playlist entries that can be updated before the MMSYNC_EVENT_PLAYLIST_ENTRIES_UPDATE event is sent.
Default maximum number of MS_SYNC_FIRST_EXISTING_FID events sent during synchronization.

Thread resource management settings:

Default maximum number of synchronization records that can be stored in buffers shared between foreground and background synchronization threads.
Default maximum number of foreground synchronization threads permitted to run at a time.
Default synchronization thread priority (0 means priority is inherited from main mm-sync thread).
Default priority adjustment for merge thread. This value is added to the original synchronization thread priority, so it's a relative value.

Limits on files that get synchronized:

Default maximum directory depth to recursively visit when synchronizing a mediastore. This setting also applies to priority folders.
Maximum number of distinct mediastores for which you can define a limit on the number of media items read. This setting basically restricts how many <MaxMediaStoreItems> tags will be read from the configuration file.
Default maximum number of media items that can be synchronized in a folder before mm-sync skips the remaining items and moves onto another folder. This limit excludes "." and ".." filesystem entries but includes any items whose filenames match the name pattern for files to skip from synchronization (which is specified in the <SyncFileMask> tag).
Here, media items refers to media files as defined in the configuration file. Individual tracks, playlists, and folders can be considered media items.
When this setting is 0, all media items in a folder get synchronized. If the number of folder entries is greater than this configured limit, the subset of items that gets synchronized depends on the system.
Default maximum number of nonmedia items allowed in a folder before the folder is determined to not contain media items (0 means unlimited).
Default maximum number of items to examine in a folder when prescanning for nonmedia content. All items—media and nonmedia—count towards the prescan limit.
When this setting is 0, mm-sync keeps scanning the folder until all of its items have been examined or the limit of nonmedia items is reached.
Minimum size that a discovered file must have to be treated as a new media file during synchronization (0 means any size).

Playlist limits

Maximum number of lines that can be read from a playlist file. Each line names one playlist entry, so this setting limits the allowable playlist length. This value is used by some playlist session synchronizers (PLSSes).

Limits on lengths of string parameters:

#define CONF_MAX_PATH 4000
Maximum allowable length of any filename (including its path) given as a synchronization parameter.
#define CONF_MAX_SQL 8000
Maximum size of any message sent to the database resource manager; the message could be an SQL statement or something else.
#define CONF_MAX_EXT_LEN (30)
Maximum length of a file extension that can be specified in a filename given to mm-sync.
#define CONF_MAX_EXTS 200
Maximum number of distinct file extensions that can be synchronized. This setting is applied separately for the extensions of media files and the extensions of playlists.
#define CONF_MAX_MS_NAME_LEN (128)
Maximum allowable length for a volume name referring to an attached mediastore. The length of the volume name passed into mm-sync by the client can't exceed this configured limit; otherwise, the synchronization fails.
Maximum length of a mediastore synchronizer name that can be given in extended options to mm_sync_start().

Database settings:

Default maximum size for the database, in kilobytes. If the database exceeds this size, the synchronization aborts. A size of 0 means no limit on the database size.
Number of files to synchronize before checking the database size. Larger values mean faster synchronizations but also that the maximum database size can be exceeded by a greater margin before the synchronization aborts. If this setting is 0, mm-sync doesn't check the database size during synchronization.
Default timeout value for database accesses, in milliseconds.
#define CONF_UTF8_CHAR_SIZE (4)
Number of characters used in specifying maximum string lengths for metadata. This value is used for copying metadata to the database.
Size limit of metadata strings written to the database. This limit is the number of characters in the metadata strings copied from metadata providers into database fields.
Default type to use for truncating the metadata. The type can be either characters (the default) or bytes.