Configuration constants

These macro constants define configuration settings for different mm-sync synchronization functions.

Synopsis:

#include <mmsync/config.h>

General settings

These constants define general mm-sync settings.

Defines:

#define CONF_DFLT_DEVICE_PATH "/dev/mmsync"

Default device path of mm-sync resource manager. All control contexts are created under this path.

#define CONF_DFLT_VERBOSITY_LEVEL 2

Default verbosity level for mm-sync initialization log messages.

Event settings

These constants control how events are queued and when certain events are sent.

Defines:

#define CONF_DFLT_SYNC_MAX_FIRST_FID (1)

Default maximum number of MS_SYNC_FIRST_EXISTING_FID events sent during synchronization.

#define CONF_NTFY_QUEUE_MAX (80)

Maximum number of event notifications that can be queued at a time.

#define CONF_EVENT_NUM_PL_ENTRIES_SYNC (0)

Number of playlist entries that can be updated before the MMSYNC_EVENT_PLAYLIST_ENTRIES_UPDATE event is sent.

#define CONF_DFLT_SYNC_FOLDER_EVENTS 2

Default emission control of folder synchronization events, which is trimonly.

Thread resource management settings

These constants define resource management settings that affect mm-sync threads.

Defines:

#define CONF_DFLT_SYNC_BUFFER (250)

Default maximum number of synchronization records that can be stored in buffers shared between foreground and background synchronization threads.

#define CONF_DFLT_SYNC_THREADS_MAX (8)

Default maximum number of foreground synchronization threads permitted to run at a time.

#define CONF_DFLT_SYNC_THREAD_PRIORITY 0

Default synchronization thread priority (0 means priority is inherited from main mm-sync thread).

#define CONF_DFLT_MERGE_THREAD_PRIORITY_ADJ 1

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

These constants control how many mediastores, directory depths, and files per directory mm-sync can examine during synchronization, and affect how mm-sync decides whether a directory or file contains media content.

Defines:

#define CONF_DFLT_SYNC_MAX_RECURSE (8)

Default maximum directory depth to recursively visit when synchronizing a mediastore. This setting also applies to priority folders.

#define CONF_MAX_MAXMEDIASTOREITEMS (100)

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.

#define CONF_DFLT_NONMEDIAITEMS_MAXITEMS (0)

Default maximum number of nonmedia items allowed in a folder before the folder is determined to not contain media items (0 means unlimited).

#define CONF_DFLT_MEDIAITEMS_MAXITEMS (0)

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.

#define CONF_DFLT_MEDIAITEMS_SIZEMIN (0)

Minimum size that a discovered file must have to be treated as a new media file during synchronization (0 means any size).

#define CONF_DFLT_NONMEDIAITEMS_PRESCANLIMIT (0)

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.

Playlist limits

This constant limits how much playlist information can be read.

Defines:

#define CONF_MAX_PLAYLIST_LINES (5000)

Maximum number of lines to 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 string parameter lengths

These constants specify length limits on string parameters used in synchronization, such as filenames, database message sizes, and names of mediastores and synchronizers. They also limit the number of media file extensions allowed by mm-sync.

Defines:

#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 a mediastore. The length of the volume name passed into mm-sync by the client can't exceed this limit; otherwise, the synchronization fails.

#define CONF_MAX_MSSNAME_LEN (20)

Maximum length of a mediastore synchronizer name that can be given in extended options to mm_sync_start().

Database settings

These constants define database settings such as size limits, the timeout for database accesses, and how metadata strings are written and truncated.

Defines:

#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.

#define CONF_MAX_METADATA_CHARS (256)

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.

#define CONF_DFLT_MAX_DATABASE_SIZE 0

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.

#define CONF_DFLT_SYNC_INTERVAL 0

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.

#define CONF_DFLT_DATABASE_TIMEOUT_MS (0)

Default timeout value for database accesses, in milliseconds.

#define CONF_DFLT_TYPE_CHARS (1)

Default type to use for truncating the metadata. The type can be either characters (the default) or bytes.