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