
Methods and Signals
-------------------

method ListConfigs
method GetConfig config-name
method SetConfig config-name configdata


method CreateConfig config-name subvolume fstype template-name
method DeleteConfig config-name

signal ConfigCreated config-name
signal ConfigModified config-name
signal ConfigDeleted config-name


method LockConfig config-name
method UnlockConfig config-name

Locking disallows other clients to delete the config and delete snapshots for
the config but not to create new snapshots for the config. Several clients can
lock the same config.


method ListSnapshots config-name
method GetSnapshot config-name number
method SetSnapshot config-name number description cleanup userdata

method CreateSingleSnapshot config-name description cleanup userdata -> number
method CreateSingleSnapshotV2 config-name parent-number read-only description cleanup userdata -> number
method CreateSingleSnapshotOfDefault config-name read-only description cleanup userdata -> number
method CreatePreSnapshot config-name description cleanup userdata -> number
method CreatePostSnapshot config-name pre-number description cleanup userdata -> number
method DeleteSnapshots config-name list(numbers)

signal SnapshotCreated config-name number
signal SnapshotModified config-name number
signal SnapshotsDeleted config-name list(numbers)

method IsSnapshotReadOnly config-name number -> bool
method SetSnapshotReadOnly config-name number read-only

method GetDefaultSnapshot config-name -> bool number
method GetActiveSnapshot config-name -> bool number

method CalculateUsedSpace config-name (experimental)
method GetUsedSpace config-name number -> number (experimental)

method MountSnapshot config-name number user-request -> path
method UmountSnapshot config-name number user-request
method GetMountPoint config-name number -> path

Snapshots mounted with user-request set to false will be unmounted (delayed)
after the client disconnects.

method Sync config-name


method CreateComparison config-name number1 number2 -> num-files
method DeleteComparison config-name number1 number2

The following two commands require a successful CreateComparison in advance.

method GetFiles config-name number1 number2 -> list(filename status)
method GetFilesByPipe config-name number1 number2 -> fd

Filenames do not include the subvolume.

GetFilesByPipe returns a file descriptor from which the client can
read the file list. This avoids the problem of GetFiles with exceeding
the allowed DBus message size. GetFiles is deprecated.

The file descriptor returned by GetFilesByPipe has one entry per file
with two fields (separated by spaces), first the filename and second
the status as an integer. Additional fields must be ignored by
clients.


Intentionally not documented are SetupQuota, PrepareQuota, QueryQuota
and QueryFreeSpace.


Encoding and Escaping
---------------------

Strings passed via DBus are UTF-8. Other characters (e.g. in
filenames) must be encoded hexadecimal as "\x??". As a consequence,
"\" is encoded as "\\".

In strings passed via pipe the newline and space are escaped as
"\x??". As a consequence, "\" is encoded as "\\".

In general any character can be escaped as "\x??".


Sorting
-------

Sorting for files is undefined, esp. since server and client can use
different locales.


Misc Notes
----------

Due to security concerns there are no methods to get, compare or revert
files. This can be done in the client.


Some snapshots cannot be deleted (current, default and active). Delete
requests for these are ignored.
