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