chiark / gitweb /
Add SHELL=bash debian/rules for benefit of systems with rubbish default
[disorder] / doc / disorder_protocol.5.in
CommitLineData
460b9539 1.\"
964e027d 2.\" Copyright (C) 2004-2008 Richard Kettlewell
460b9539 3.\"
e7eb3a27 4.\" This program is free software: you can redistribute it and/or modify
460b9539 5.\" it under the terms of the GNU General Public License as published by
e7eb3a27 6.\" the Free Software Foundation, either version 3 of the License, or
460b9539 7.\" (at your option) any later version.
e7eb3a27
RK
8.\"
9.\" This program is distributed in the hope that it will be useful,
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details.
13.\"
460b9539 14.\" You should have received a copy of the GNU General Public License
e7eb3a27 15.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
460b9539 16.\"
17.TH disorder_protocol 5
18.SH NAME
19disorder_protocol \- DisOrder communication protocol
20.SH DESCRIPTION
21The DisOrder client and server communicate via the protocol described
22in this man page.
23.PP
c0c23a60
RK
24The protocol is liable to change without notice.
25You are recommended to check the implementation before believing this document.
460b9539 26.SH "GENERAL SYNTAX"
c0c23a60
RK
27Everything is encoded using UTF-8.
28See
f9635e06
RK
29.B "CHARACTER ENCODING"
30below for more detail on character encoding issues.
460b9539 31.PP
f9635e06
RK
32Commands and responses consist of a line perhaps followed (depending on the
33command or response) by a body.
460b9539 34.PP
35The line syntax is the same as described in \fBdisorder_config\fR(5) except
36that comments are prohibited.
37.PP
38Bodies borrow their syntax from RFC821; they consist of zero or more ordinary
39lines, with any initial full stop doubled up, and are terminated by a line
40consisting of a full stop and a line feed.
41.SH COMMANDS
42Commands always have a command name as the first field of the line; responses
c0c23a60
RK
43always have a 3-digit response code as the first field.
44See below for more details about this field.
460b9539 45.PP
46All commands require the connection to have been already authenticated unless
c0c23a60
RK
47stated otherwise.
48If not stated otherwise, the \fBread\fR right is sufficient to execute
49the command.
460b9539 50.PP
51Neither commands nor responses have a body unless stated otherwise.
52.TP
0f55e905 53.B adduser \fIUSERNAME PASSWORD \fR[\fIRIGHTS\fR]
c0c23a60
RK
54Create a new user with the given username and password.
55The new user's rights list can be specified; if it is not
56then the \fBdefault_rights\fR setting applies instead.
57Requires the \fBadmin\fR right, and only works on local
0f55e905 58connections.
eb5dc014 59.TP
d42e98ca
RK
60.B adopt \fIID\fR
61Adopts a randomly picked track, leaving it in a similar state to if it was
62picked by this user. Requires the \fBplay\fR right.
63.TP
460b9539 64.B allfiles \fIDIRECTORY\fR [\fIREGEXP\fR]
5818980a 65List all the files and directories in \fIDIRECTORY\fR in a response body.
460b9539 66If \fIREGEXP\fR is present only matching files and directories are returned.
67.TP
ba39faf6 68.B confirm \fICONFIRMATION
c0c23a60
RK
69Confirm user registration.
70\fICONFIRMATION\fR is as returned from \fBregister\fR below.
71This command can be used without logging in.
ba39faf6 72.TP
eb5dc014 73.B cookie \fICOOKIE
0d350ff0 74Log a user back in using a cookie created with \fBmake\-cookie\fR.
c0c23a60 75The response contains the username.
eb5dc014
RK
76.TP
77.B deluser \fIUSERNAME
c0c23a60
RK
78Delete the named user.
79Requires the \fBadmin\fR right, and only works on local connections.
460b9539 80.TP
81.B dirs \fIDIRECTORY\fR [\fIREGEXP\fR]
5818980a 82List all the directories in \fIDIRECTORY\fR in a response body.
460b9539 83If \fIREGEXP\fR is present only matching directories are returned.
84.TP
85.B disable \fR[\fBnow\fR]
c0c23a60
RK
86Disable further playing.
87If the optional \fBnow\fR argument is present then the current track
88is stopped.
89Requires the \fBglobal prefs\fR right.
eb5dc014
RK
90.TP
91.B edituser \fIUSERNAME PROPERTY VALUE
c0c23a60
RK
92Set a user property.
93With the \fBadmin\fR right any username and property may be specified.
94Otherwise the \fBuserinfo\fR right is required and only the
eb5dc014 95\fBemail\fR and \fBpassword\fR properties may be set.
0517868c
RK
96.IP
97User properties are syntax-checked before setting. For instance \fBemail\fR
98must contain an "@" sign or you will get an error. (Setting an empty value for
99\fBemail\fR is allowed and removes the property.)
460b9539 100.TP
101.B enable
c0c23a60
RK
102Re-enable further playing, and is the opposite of \fBdisable\fR.
103Requires the \fBglobal prefs\fR right.
460b9539 104.TP
105.B enabled
c0c23a60
RK
106Report whether playing is enabled.
107The second field of the response line will be \fByes\fR or \fBno\fR.
460b9539 108.TP
109.B exists \fITRACK\fR
c0c23a60
RK
110Report whether the named track exists.
111The second field of the response line will be \fByes\fR or \fBno\fR.
460b9539 112.TP
113.B files \fIDIRECTORY\fR [\fIREGEXP\fR]
5818980a 114List all the files in \fIDIRECTORY\fR in a response body.
460b9539 115If \fIREGEXP\fR is present only matching files are returned.
116.TP
117.B get \fITRACK\fR \fIPREF\fR
c0c23a60
RK
118Getsa preference value.
119On success the second field of the response line will have the value.
fb1bc1f5
RK
120.IP
121If the track or preference do not exist then the response code is 555.
460b9539 122.TP
0d350ff0 123.B get\-global \fIKEY\fR
460b9539 124Get a global preference.
fb1bc1f5
RK
125.IP
126If the preference does not exist then the response code is 555.
460b9539 127.TP
128.B length \fITRACK\fR
c0c23a60
RK
129Get the length of the track in seconds.
130On success the second field of the response line will have the value.
460b9539 131.TP
132.B log
c0c23a60
RK
133Send event log messages in a response body.
134The command will never terminate.
135Any further data sent to the server will be discarded (explicitly;
136i.e. it will not accumulate in a buffer somewhere).
460b9539 137.IP
138See \fBEVENT LOG\fR below for more details.
139.TP
0d350ff0 140.B make\-cookie
eb5dc014
RK
141Returns an opaque string that can be used by the \fBcookie\fR command to log
142this user back in on another connection (until the cookie expires).
143.TP
460b9539 144.B move \fITRACK\fR \fIDELTA\fR
c0c23a60
RK
145Move a track in the queue.
146The track may be identified by ID (preferred) or name (which might cause
147confusion if it's there twice).
148\fIDELTA\fR should be an negative or positive integer and indicates how
149many steps towards the head of the queue the track should be moved.
eb5dc014
RK
150.IP
151Requires one of the \fBmove mine\fR, \fBmove random\fR or \fBmove any\fR rights
152depending on how the track came to be added to the queue.
460b9539 153.TP
154.B moveafter \fITARGET\fR \fIID\fR ...
c0c23a60
RK
155Move all the tracks in the \fIID\fR list after ID \fITARGET\fR.
156If \fITARGET\fR is the empty string then the listed tracks are put
157at the head of the queue.
158If \fITARGET\fR is listed in the ID list then the tracks are moved
460b9539 159to just after the first non-listed track before it, or to the head if there is
160no such track.
eb5dc014
RK
161.IP
162Requires one of the \fBmove mine\fR, \fBmove random\fR or \fBmove any\fR rights
163depending on how the tracks came to be added to the queue.
460b9539 164.TP
2a10b70b 165.B new \fR[\fIMAX\fR]
c0c23a60
RK
166Send the most recently added \fIMAX\fR tracks in a response body.
167If the argument is ommitted, the \fBnew_max\fR most recent tracks are
168listed (see \fBdisorder_config\fR(5)).
2a10b70b 169.TP
7858930d 170.B nop
c0c23a60
RK
171Do nothing.
172Used by
7858930d 173.BR disobedience (1)
c0c23a60
RK
174as a keepalive measure.
175This command does not require authentication.
7858930d 176.TP
460b9539 177.B part \fITRACK\fR \fICONTEXT\fI \fIPART\fR
c0c23a60
RK
178Get a track name part.
179Returns an empty string if a name part cannot be constructed.
460b9539 180.IP
181.I CONTEXT
182is one of
183.B sort
184or
185.B display
186and
187.I PART
188is usually one of
189.BR artist ,
190.B album
191or
192.BR title .
193.TP
194.B pause
c0c23a60
RK
195Pause the current track.
196Requires the \fBpause\fR right.
460b9539 197.TP
198.B play \fITRACK\fR
c0c23a60
RK
199Add a track to the queue.
200The response contains the queue ID of the track.
eb5dc014 201Requires the \fBplay\fR right.
460b9539 202.TP
203.B playing
5818980a 204Report what track is playing.
460b9539 205.IP
206If the response is \fB252\fR then the rest of the response line consists of
207track information (see below).
208.IP
209If the response is \fB259\fR then nothing is playing.
210.TP
211.B prefs \fBTRACK\fR
5818980a 212Send back the preferences for \fITRACK\fR in a response body.
460b9539 213Each line of the response has the usual line syntax, the first field being the
214name of the pref and the second the value.
215.TP
216.B queue
5818980a 217Send back the current queue in a response body, one track to a line, the track
c0c23a60
RK
218at the head of the queue (i.e. next to be be played) first.
219See below for the track information syntax.
460b9539 220.TP
0d350ff0 221.B random\-disable
c0c23a60
RK
222Disable random play (but don't stop the current track).
223Requires the \fBglobal prefs\fR right.
460b9539 224.TP
0d350ff0 225.B random\-enable
c0c23a60
RK
226Enable random play.
227Requires the \fBglobal prefs\fR right.
460b9539 228.TP
0d350ff0 229.B random\-enabled
c0c23a60
RK
230Report whether random play is enabled.
231The second field of the response line will be \fByes\fR or \fBno\fR.
460b9539 232.TP
233.B recent
5818980a 234Send back the current recently-played list in a response body, one track to a
c0c23a60
RK
235line, the track most recently played last.
236See below for the track information syntax.
460b9539 237.TP
238.B reconfigure
c0c23a60
RK
239Request that DisOrder reconfigure itself.
240Requires the \fBadmin\fR right.
863c04fa
RK
241.IP
242Not all configuration options can be modified during the lifetime of the
243server; of those that can't, some will just be ignored if they change while
244others will cause the new configuration to be rejected.
245See \fBdisorder_config\fR(5) for details.
460b9539 246.TP
90ad6c6e 247.B register \fIUSERNAME PASSWORD EMAIL
c0c23a60
RK
248Register a new user.
249Requires the \fBregister\fR right.
250The result contains a confirmation string; the user will be be able
251to log in until this has been presented back to the server via the
252\fBconfirm\fR command.
ba39faf6 253.TP
90ad6c6e
RK
254.B reminder \fIUSERNAME\fR
255Send a password reminder to user \fIUSERNAME\fR.
c0c23a60
RK
256If the user has no valid email address, or no password, or a
257reminder has been sent too recently, then no reminder will be sent.
6207d2f3 258.TP
460b9539 259.B remove \fIID\fR
c0c23a60
RK
260Remove the track identified by \fIID\fR.
261Requires one of the \fBremove mine\fR, \fBremove random\fR or
262\fBremove any\fR rights depending on how the
eb5dc014 263track came to be added to the queue.
460b9539 264.TP
dd9af5cb 265.B rescan \fR[\fBwait\fR] \fR[\fBfresh\fR]
c0c23a60
RK
266Rescan all roots for new or obsolete tracks.
267Requires the \fBrescan\fR right.
dd9af5cb
RK
268.IP
269If the \fBwait\fR flag is present then the response is delayed until the rescan
270completes.
271Otherwise the response arrives immediately.
272This is primarily intended for testing.
273.IP
274If the \fBfresh\fR flag is present a rescan is already underway then a second
275rescan will be started when it completes.
276The default behavior is to piggyback on the existing rescan.
277.IP
278NB that \fBfresh\fR is currently disabled in the server source, so using this
279flag will just provoke an error.
460b9539 280.TP
281.B resolve \fITRACK\fR
282Resolve a track name, i.e. if this is an alias then return the real track name.
283.TP
284.B resume
c0c23a60
RK
285Resume the current track after a \fBpause\fR command.
286Requires the \fBpause\fR right.
eb5dc014
RK
287.TP
288.B revoke \fBcookie\fR
0d350ff0 289Revoke a cookie previously created with \fBmake\-cookie\fR.
c0c23a60 290It will not be possible to use this cookie in the future.
460b9539 291.TP
0d350ff0 292.B rtp\-address
5818980a 293Report the RTP broadcast (or multicast) address, in the form \fIADDRESS
c0c23a60
RK
294PORT\fR.
295This command does not require authentication.
ca831831 296.TP
460b9539 297.B scratch \fR[\fIID\fR]
298Remove the track identified by \fIID\fR, or the currently playing track if no
c0c23a60
RK
299\fIID\fR is specified.
300Requires one of the \fBscratch mine\fR, \fBscratch random\fR or
301\fBscratch any\fR rights depending on how the track came to be
eb5dc014 302added to the queue.
460b9539 303.TP
2b33c4cf
RK
304.B schedule-add \fIWHEN\fR \fIPRIORITY\fR \fIACTION\fR ...
305Schedule an event for the future.
306.IP
307.I WHEN
308is the time when it should happen, as \fBtime_t\fR value.
309It must refer to a time in the future.
310.IP
311.I PRIORITY
312is the event priority.
313This can be \fBnormal\fR, in which case the event will be run at startup if its
314time has past, or \fBjunk\fR in which case it will be discarded if it is found
315to be in the past at startup.
316The meaning of other values is not defined.
317.IP
318.I ACTION
319is the action to perform.
320The choice of action determines the meaning of the remaining arguments.
321Possible actions are:
322.RS
323.TP
324.B play
325Play a track.
326The next argument is the track name.
327Requires the \fBplay\fR right.
328.TP
329.B set-global
330Set a global preference.
331The next argument is the preference name and the final argument is the value to
332set it to (omit it to unset it).
333Requires the \fBglobal prefs\fR right.
334.RE
335.IP
336You need the right at the point you create the event.
337It is not possible to create scheduled events in expectation of a future change
338in rights.
339.TP
340.B schedule-del \fIEVENT\fR
341Deletes a scheduled event.
342Users can always delete their own scheduled events; with the \fBadmin\fR
343right you can delete any event.
344.TP
345.B schedule-get \fIEVENT\fR
346Sends the details of scheduled event \fIEVENT\fR in a response body.
347Each line is a pair of strings quoted in the usual way, the first being the key
348ane the second the value.
349No particular order is used.
350.IP
351Scheduled events are considered public information.
352Right \fBread\fR is sufficient to see details of all events.
353.TP
354.B schedule-list
355Sends the event IDs of all scheduled events in a response body, in no
356particular order.
357Use \fBschedule-get\fR to get the details of each event.
358.TP
460b9539 359.B search \fITERMS\fR
c0c23a60
RK
360Search for tracks matching the search terms.
361The results are put in a response body, one to a line.
460b9539 362.IP
363The search string is split in the usual way, with quoting supported, into a
c0c23a60
RK
364list of terms.
365Only tracks matching all terms are included in the results.
460b9539 366.IP
367Any terms of the form \fBtag:\fITAG\fR limits the search to tracks with that
368tag.
369.IP
370All other terms are interpreted as individual words which must be present in
371the track name.
372.IP
373Spaces in terms don't currently make sense, but may one day be interpreted to
374allow searching for phrases.
375.TP
376.B \fBset\fR \fITRACK\fR \fIPREF\fR \fIVALUE\fR
c0c23a60
RK
377Set a preference.
378Requires the \fBprefs\fR right.
460b9539 379.TP
0d350ff0 380.B set\-global \fIKEY\fR \fIVALUE\fR
c0c23a60
RK
381Set a global preference.
382Requires the \fBglobal prefs\fR right.
460b9539 383.TP
384.B stats
385Send server statistics in plain text in a response body.
386.TP
387.B \fBtags\fR
388Send the list of currently known tags in a response body.
389.TP
390.B \fBunset\fR \fITRACK\fR \fIPREF\fR
c0c23a60
RK
391Unset a preference.
392Requires the \fBprefs\fR right.
460b9539 393.TP
0d350ff0 394.B \fBunset\-global\fR \fIKEY\fR
c0c23a60
RK
395Unset a global preference.
396Requires the \fBglobal prefs\fR right.
460b9539 397.TP
90ad6c6e
RK
398.B user \fIUSERNAME\fR \fIRESPONSE\fR
399Authenticate as user \fIUSERNAME\fR.
c0c23a60 400See
5e3f9e08
RK
401.B AUTHENTICATION
402below.
460b9539 403.TP
90ad6c6e 404.B userinfo \fIUSERNAME PROPERTY
3e3566ad
RK
405Get a user property.
406.TP
eb5dc014 407.B users
5818980a 408Send the list of currently known users in a response body.
eb5dc014 409.TP
460b9539 410.B version
411Send back a response with the server version as the second field.
412.TP
413.B volume \fR[\fILEFT\fR [\fIRIGHT\fR]]
414Get or set the volume.
415.IP
416With zero parameters just gets the volume and reports the left and right sides
417as the 2nd and 3rd fields of the response.
418.IP
c0c23a60
RK
419With one parameter sets both sides to the same value.
420With two parameters sets each side independently.
421Setting the volume requires the \fBvolume\fR right.
460b9539 422.SH RESPONSES
c0c23a60
RK
423Responses are three-digit codes.
424The first digit distinguishes errors from succesful responses:
460b9539 425.TP
426.B 2
427Operation succeeded.
428.TP
429.B 5
430Operation failed.
431.PP
432The second digit breaks down the origin of the response:
433.TP
434.B 0
c0c23a60
RK
435Generic responses not specific to the handling of the command.
436Mostly this is parse errors.
460b9539 437.TP
b4a80f69 438.B 1
43951x errors indicate that the user had insufficient rights for the command.
440.TP
460b9539 441.B 3
442Authentication responses.
443.TP
444.B 5
445Responses specific to the handling of the command.
446.PP
447The third digit provides extra information about the response:
448.TP
449.B 0
450Text part is just commentary.
451.TP
452.B 1
453Text part is a constant result e.g. \fBversion\fR.
454.TP
455.B 2
456Text part is a potentially variable result.
457.TP
458.B 3
459Text part is just commentary; a dot-stuffed body follows.
460.TP
461.B 4
c0c23a60
RK
462Text part is just commentary; an indefinite dot-stuffed body follows.
463(Used for \fBlog\fR.)
460b9539 464.TP
fb1bc1f5 465.B 5
c0c23a60
RK
466Used with "normal" errors, for instance a preference not being found.
467The text part is commentary.
fb1bc1f5 468.TP
460b9539 469.B 9
470The text part is just commentary (but would normally be a response for this
471command) e.g. \fBplaying\fR.
7b32e917
RK
472.PP
473Result strings (not bodies) intended for machine parsing (i.e. xx1 and xx2
474responses) are quoted.
460b9539 475.SH AUTHENTICATION
5e3f9e08 476When a connection is made the server sends a \fB231\fR response before any
c0c23a60
RK
477command is received.
478This contains a protocol generation, an algorithm name and a
479challenge encoded in hex, all separated by whitespace.
7b32e917
RK
480.PP
481The current protocol generation is \fB2\fR.
5e3f9e08 482.PP
b3141726 483The possible algorithms are (currently) \fBsha1\fR, \fBsha256\fR, \fBsha384\fR
c0c23a60
RK
484and \fBsha512\fR.
485\fBSHA1\fR etc work as synonyms.
460b9539 486.PP
5e3f9e08
RK
487The \fBuser\fR response consists of the selected hash of the user's password
488concatenated with the challenge, encoded in hex.
460b9539 489.SH "TRACK INFORMATION"
490Track information is encoded in a line (i.e. using the usual line syntax) as
c0c23a60
RK
491pairs of fields.
492The first is a name, the second a value.
493The names have the following meanings:
460b9539 494.TP 12
495.B expected
496The time the track is expected to be played at.
497.TP
498.B id
499A string uniquely identifying this queue entry.
500.TP
501.B played
502The time the track was played at.
503.TP
504.B scratched
505The user that scratched the track.
506.TP
d42e98ca
RK
507.B origin
508The origin of the track. Valid origins are:
509.RS
510.TP 12
511.B adopted
512The track was originally randomly picked but has been adopted by a user.
513.TP
514.B picked
515The track was picked by a user.
516.TP
517.B random
518The track was randomly picked.
519.TP
520.B scheduled
521The track was played from a scheduled action.
522.TP
523.B scratch
524The track is a scratch sound.
525.RE
526.TP
460b9539 527.B state
c0c23a60
RK
528The current track state.
529Valid states are:
460b9539 530.RS
531.TP 12
532.B failed
533The player failed (exited with nonzero status but wasn't scratched).
534.TP
460b9539 535.B ok
536The track was played without any problems.
537.TP
538.B scratched
539The track was scratched.
540.TP
541.B started
542The track is currently playing.
543.TP
d42e98ca
RK
544.B paused
545Track is playing but paused.
546.TP
460b9539 547.B unplayed
548In the queue, hasn't been played yet.
549.TP
550.B quitting
551The track was terminated because the server is shutting down.
552.RE
553.TP
554.B submitter
555The user that submitted the track.
556.TP
557.B track
558The filename of the track.
559.TP
560.B when
561The time the track was added to the queue.
562.TP
563.B wstat
564The wait status of the player in decimal.
d42e98ca
RK
565.PP
566Note that \fBorigin\fR is new with DisOrder 4.3, and obsoletes some old
567\fBstate\fR values.
460b9539 568.SH NOTES
569Times are decimal integers using the server's \fBtime_t\fR.
570.PP
571For file listings, the regexp applies to the basename of the returned file, not
c0c23a60
RK
572the whole filename, and letter case is ignored.
573\fBpcrepattern\fR(3) describes the regexp syntax.
460b9539 574.PP
575Filenames are in UTF-8 even if the collection they come from uses some other
576encoding - if you want to access the real file (in such cases as the filenames
577actually correspond to a real file) you'll have to convert to whatever the
578right encoding is.
579.SH "EVENT LOG"
580The event log consists of lines starting with a hexadecimal timestamp and a
c0c23a60
RK
581keyword followed by (optionally) parameters.
582The parameters are quoted in the usual DisOrder way.
583Currently the following keywords are used:
460b9539 584.TP
d42e98ca
RK
585.B adopted \fIID\fR \fIUSERNAME\fR
586\fIUSERNAME\fR adopted track \fIID\fR.
587.TP
460b9539 588.B completed \fITRACK\fR
589Completed playing \fITRACK\fR
590.TP
591.B failed \fITRACK\fR \fIERROR\fR
592Completed playing \fITRACK\fR with an error status
593.TP
90ad6c6e
RK
594.B moved \fIUSERNAME\fR
595User \fIUSERNAME\fR moved some track(s).
c0c23a60 596Further details aren't included any more.
460b9539 597.TP
90ad6c6e 598.B playing \fITRACK\fR [\fIUSERNAME\fR]
460b9539 599Started playing \fITRACK\fR.
600.TP
601.B queue \fIQUEUE-ENTRY\fR...
602Added \fITRACK\fR to the queue.
603.TP
604.B recent_added \fIQUEUE-ENTRY\fR...
605Added \fIID\fR to the recently played list.
606.TP
607.B recent_removed \fIID\fR
608Removed \fIID\fR from the recently played list.
609.TP
90ad6c6e 610.B removed \fIID\fR [\fIUSERNAME\fR]
c0c23a60 611Queue entry \fIID\fR was removed.
90ad6c6e 612This is used both for explicit removal (when \fIUSERNAME\fR is present)
c0c23a60 613and when playing a track (when it is absent).
460b9539 614.TP
e025abff
RK
615.B rescanned
616A rescan completed.
617.TP
90ad6c6e
RK
618.B scratched \fITRACK\fR \fIUSERNAME\fR
619\fITRACK\fR was scratched by \fIUSERNAME\fR.
460b9539 620.TP
621.B state \fIKEYWORD\fR
c0c23a60
RK
622Some state change occurred.
623The current set of keywords is:
460b9539 624.RS
625.TP
5abe307a
RK
626.B completed
627The current track completed successfully.
628.TP
460b9539 629.B disable_play
630Playing was disabled.
631.TP
632.B disable_random
633Random play was disabled.
634.TP
635.B enable_play
636Playing was enabled.
637.TP
638.B enable_random
639Random play was enabled.
640.TP
5abe307a
RK
641.B failed
642The current track failed.
643.TP
460b9539 644.B pause
645The current track was paused.
646.TP
5abe307a
RK
647.B playing
648A track started playing.
649.TP
460b9539 650.B resume
651The current track was resumed.
5abe307a 652.TP
75e7b7c3 653.B rights_changed \fIRIGHTS\fR
ad492e00
RK
654User's rights were changed.
655.TP
5abe307a
RK
656.B scratched
657The current track was scratched.
658.PP
659To simplify client implementation, \fBstate\fR commands reflecting the current
660state are sent at the start of the log.
460b9539 661.RE
bb03d79d 662.TP
75e7b7c3 663.B user_add \fIUSERNAME\fR
58d2aad2
RK
664A user was created.
665.TP
75e7b7c3 666.B user_delete \fIUSERNAME\fR
58d2aad2
RK
667A user was deleted.
668.TP
75e7b7c3 669.B user_edit \fIUSERNAME\fR \fIPROPERTY\fR
58d2aad2
RK
670Some property of a user was edited.
671.TP
75e7b7c3 672.B user_confirm \fIUSERNAME\fR
58d2aad2 673A user's login was confirmed (via the web interface).
460b9539 674.TP
675.B volume \fILEFT\fR \fIRIGHT\fR
676The volume changed.
677.PP
678.IR QUEUE-ENTRY ...
679is as defined in
680.B "TRACK INFORMATION"
681above.
58d2aad2
RK
682.PP
683The \fBuser-*\fR messages are only sent to admin users, and are not sent over
684non-local connections unless \fBremote_userman\fR is enabled.
f9635e06 685.SH "CHARACTER ENCODING"
c0c23a60
RK
686All data sent by both server and client is encoded using UTF-8.
687Moreover it must be valid UTF-8, i.e. non-minimal sequences are not
688permitted, nor are surrogates, nor are code points outside the
689Unicode code space.
f9635e06
RK
690.PP
691There are no particular normalization requirements on either side of the
c0c23a60
RK
692protocol.
693The server currently converts internally to NFC, the client must
f9635e06
RK
694normalize the responses returned if it needs some normalized form for further
695processing.
696.PP
697The various characters which divide up lines may not be followed by combining
c0c23a60
RK
698characters.
699For instance all of the following are prohibited:
f9635e06
RK
700.TP
701.B o
c0c23a60
RK
702LINE FEED followed by a combining character.
703For example the sequence LINE FEED, COMBINING GRAVE ACCENT is never permitted.
f9635e06
RK
704.TP
705.B o
706APOSTROPHE or QUOTATION MARK followed by a combining character when used to
c0c23a60
RK
707delimit fields.
708For instance a line starting APOSTROPHE, COMBINING CEDILLA is prohibited.
f9635e06
RK
709.IP
710Note that such sequences are not prohibited when the quote character cannot be
c0c23a60
RK
711interpreted as a field delimiter.
712For instance APOSTROPHE, REVERSE SOLIDUS, APOSTROPHE, COMBINING CEDILLA,
713APOSTROPHE would be permitted.
f9635e06
RK
714.TP
715.B o
716REVERSE SOLIDUS (BACKSLASH) followed by a combining character in a quoted
c0c23a60
RK
717string when it is the first character of an escape sequence.
718For instance a line starting APOSTROPHE, REVERSE SOLIDUS, COMBINING TILDE
719is prohibited.
f9635e06
RK
720.IP
721As above such sequences are not prohibited when the character is not being used
c0c23a60
RK
722to start an escape sequence.
723For instance APOSTROPHE, REVERSE SOLIDUS, REVERSE SOLIDS, COMBINING TILDE,
724APOSTROPHE is permitted.
f9635e06
RK
725.TP
726.B o
727Any of the field-splitting whitespace characters followed by a combining
c0c23a60
RK
728character when not part of a quoted field.
729For instance a line starting COLON, SPACE, COMBINING CANDRABINDU is prohibited.
f9635e06
RK
730.IP
731As above non-delimiter uses are fine.
732.TP
733.B o
734The FULL STOP characters used to quote or delimit a body.
735.PP
736Furthermore none of these characters are permitted to appear in the context of
737a canonical decomposition (i.e. they must still be present when converted to
c0c23a60
RK
738NFC).
739In practice however this is not an issue in Unicode 5.0.
f9635e06
RK
740.PP
741These rules are consistent with the observation that the split() function is
c0c23a60
RK
742essentially a naive ASCII parser.
743The implication is not that these sequences never actually appear in
744the protocol, merely that the server is not required to honor them in
745any useful way nor be consistent between versions: in current
f9635e06
RK
746versions the result will be lines and fields that start with combining
747characters and are not necessarily split where you expect, but future versions
748may remove them, reject them or ignore some or all of the delimiters that have
749following combining characters, and no notice will be given of any change.
460b9539 750.SH "SEE ALSO"
751\fBdisorder\fR(1),
752\fBtime\fR(2),
753\fBdisorder\fR(3),
754\fBpcrepattern\fR(3)
755\fBdisorder_config\fR(5),
756\fBdisorderd\fR(8),
757\fButf8\fR(7)
758.\" Local Variables:
759.\" mode:nroff
760.\" fill-column:79
761.\" End: