chiark / gitweb /
protogen: a bit more generated docs tidying
[disorder] / lib / client-stubs.h
CommitLineData
ff75e16e
RK
1/*
2 * Automatically generated file, see scripts/protocol
3 *
4 * DO NOT EDIT.
5 */
7788b7c7
RK
6/*
7 * This file is part of DisOrder.
ff75e16e 8 * Copyright (C) 2010-11 Richard Kettlewell
7788b7c7
RK
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 */
23#ifndef CLIENT_STUBS_H
24#define CLIENT_STUBS_H
d0f01ef6
RK
25/** @file lib/client-stubs.h
26 * @brief Generated client API
27 *
28 * Don't include this file directly - use @ref client.h instead.
29 */
7788b7c7
RK
30
31/** @brief Adopt a track
32 *
33 * Makes the calling user owner of a randomly picked track.
34 *
08af2413 35 * @param c Client
7788b7c7
RK
36 * @param id Track ID
37 * @return 0 on success, non-0 on error
38 */
39int disorder_adopt(disorder_client *c, const char *id);
40
41/** @brief Create a user
42 *
43 * Create a new user. Requires the 'admin' right. Email addresses etc must be filled in in separate commands.
44 *
08af2413 45 * @param c Client
7788b7c7
RK
46 * @param user New username
47 * @param password Initial password
48 * @param rights Initial rights (optional)
49 * @return 0 on success, non-0 on error
50 */
51int disorder_adduser(disorder_client *c, const char *user, const char *password, const char *rights);
52
3680ef53
RK
53/** @brief List files and directories in a directory
54 *
55 * See 'files' and 'dirs' for more specific lists.
56 *
08af2413 57 * @param c Client
3680ef53
RK
58 * @param dir Directory to list (optional)
59 * @param re Regexp that results must match (optional)
60 * @param filesp List of matching files and directories
61 * @param nfilesp Number of elements in filesp
62 * @return 0 on success, non-0 on error
63 */
64int disorder_allfiles(disorder_client *c, const char *dir, const char *re, char ***filesp, int *nfilesp);
65
7788b7c7
RK
66/** @brief Confirm registration
67 *
68 * The confirmation string must have been created with 'register'. The username is returned so the caller knows who they are.
69 *
f4522fa7 70 * @param c Client
7788b7c7
RK
71 * @param confirmation Confirmation string
72 * @return 0 on success, non-0 on error
73 */
74int disorder_confirm(disorder_client *c, const char *confirmation);
f4522fa7 75
7788b7c7
RK
76/** @brief Log in with a cookie
77 *
78 * The cookie must have been created with 'make-cookie'. The username is returned so the caller knows who they are.
79 *
f4522fa7 80 * @param c Client
7788b7c7
RK
81 * @param cookie Cookie string
82 * @return 0 on success, non-0 on error
83 */
84int disorder_cookie(disorder_client *c, const char *cookie);
f4522fa7 85
7788b7c7
RK
86/** @brief Delete user
87 *
88 * Requires the 'admin' right.
89 *
08af2413 90 * @param c Client
7788b7c7
RK
91 * @param user User to delete
92 * @return 0 on success, non-0 on error
93 */
94int disorder_deluser(disorder_client *c, const char *user);
95
3680ef53
RK
96/** @brief List directories in a directory
97 *
98 *
99 *
08af2413 100 * @param c Client
3680ef53
RK
101 * @param dir Directory to list (optional)
102 * @param re Regexp that results must match (optional)
103 * @param filesp List of matching directories
104 * @param nfilesp Number of elements in filesp
105 * @return 0 on success, non-0 on error
106 */
107int disorder_dirs(disorder_client *c, const char *dir, const char *re, char ***filesp, int *nfilesp);
108
7788b7c7
RK
109/** @brief Disable play
110 *
111 * Play will stop at the end of the current track, if one is playing. Requires the 'global prefs' right.
112 *
08af2413 113 * @param c Client
7788b7c7
RK
114 * @return 0 on success, non-0 on error
115 */
116int disorder_disable(disorder_client *c);
117
118/** @brief Set a user property
119 *
120 * With the 'admin' right you can do anything. Otherwise you need the 'userinfo' right and can only set 'email' and 'password'.
121 *
08af2413 122 * @param c Client
7788b7c7
RK
123 * @param username User to modify
124 * @param property Property name
125 * @param value New property value
126 * @return 0 on success, non-0 on error
127 */
128int disorder_edituser(disorder_client *c, const char *username, const char *property, const char *value);
129
130/** @brief Enable play
131 *
132 * Requires the 'global prefs' right.
133 *
08af2413 134 * @param c Client
7788b7c7
RK
135 * @return 0 on success, non-0 on error
136 */
137int disorder_enable(disorder_client *c);
138
139/** @brief Detect whether play is enabled
140 *
141 *
142 *
08af2413 143 * @param c Client
7788b7c7
RK
144 * @param enabledp 1 if play is enabled and 0 otherwise
145 * @return 0 on success, non-0 on error
146 */
147int disorder_enabled(disorder_client *c, int *enabledp);
148
149/** @brief Test whether a track exists
150 *
151 *
152 *
08af2413 153 * @param c Client
7788b7c7
RK
154 * @param track Track name
155 * @param existsp 1 if the track exists and 0 otherwise
156 * @return 0 on success, non-0 on error
157 */
158int disorder_exists(disorder_client *c, const char *track, int *existsp);
159
3680ef53
RK
160/** @brief List files in a directory
161 *
162 *
163 *
08af2413 164 * @param c Client
3680ef53
RK
165 * @param dir Directory to list (optional)
166 * @param re Regexp that results must match (optional)
167 * @param filesp List of matching files
168 * @param nfilesp Number of elements in filesp
169 * @return 0 on success, non-0 on error
170 */
171int disorder_files(disorder_client *c, const char *dir, const char *re, char ***filesp, int *nfilesp);
172
7788b7c7
RK
173/** @brief Get a track preference
174 *
175 * If the track does not exist that is an error. If the track exists but the preference does not then a null value is returned.
176 *
08af2413 177 * @param c Client
7788b7c7
RK
178 * @param track Track name
179 * @param pref Preference name
180 * @param valuep Preference value
181 * @return 0 on success, non-0 on error
182 */
183int disorder_get(disorder_client *c, const char *track, const char *pref, char **valuep);
184
185/** @brief Get a global preference
186 *
187 * If the preference does exist not then a null value is returned.
188 *
08af2413 189 * @param c Client
7788b7c7
RK
190 * @param pref Global preference name
191 * @param valuep Preference value
192 * @return 0 on success, non-0 on error
193 */
194int disorder_get_global(disorder_client *c, const char *pref, char **valuep);
195
711a4497
RK
196/** @brief Get a track's length
197 *
198 * If the track does not exist an error is returned.
199 *
08af2413 200 * @param c Client
711a4497
RK
201 * @param track Track name
202 * @param lengthp Track length in seconds
203 * @return 0 on success, non-0 on error
204 */
205int disorder_length(disorder_client *c, const char *track, long *lengthp);
206
7788b7c7
RK
207/** @brief Create a login cookie for this user
208 *
209 * The cookie may be redeemed via the 'cookie' command
210 *
08af2413 211 * @param c Client
7788b7c7
RK
212 * @param cookiep Newly created cookie
213 * @return 0 on success, non-0 on error
214 */
215int disorder_make_cookie(disorder_client *c, char **cookiep);
216
0bc1d67c
RK
217/** @brief Move a track
218 *
219 * Requires one of the 'move mine', 'move random' or 'move any' rights depending on how the track came to be added to the queue.
220 *
221 * @param c Client
222 * @param track Track ID or name
223 * @param delta How far to move the track towards the head of the queue
224 * @return 0 on success, non-0 on error
225 */
226int disorder_move(disorder_client *c, const char *track, long delta);
227
228/** @brief Move multiple tracks
229 *
230 * Requires one of the 'move mine', 'move random' or 'move any' rights depending on how the track came to be added to the queue.
231 *
232 * @param c Client
233 * @param target Move after this track, or to head if ""
234 * @param ids List of tracks to move by ID
235 * @param nids Length of ids
236 * @return 0 on success, non-0 on error
237 */
238int disorder_moveafter(disorder_client *c, const char *target, char **ids, int nids);
239
ff75e16e
RK
240/** @brief List recently added tracks
241 *
242 *
243 *
244 * @param c Client
245 * @param max Maximum tracks to fetch, or 0 for all available
246 * @param tracksp Recently added tracks
247 * @param ntracksp Number of elements in tracksp
248 * @return 0 on success, non-0 on error
249 */
250int disorder_new_tracks(disorder_client *c, long max, char ***tracksp, int *ntracksp);
251
7788b7c7
RK
252/** @brief Do nothing
253 *
254 * Used as a keepalive. No authentication required.
255 *
08af2413 256 * @param c Client
7788b7c7
RK
257 * @return 0 on success, non-0 on error
258 */
259int disorder_nop(disorder_client *c);
260
261/** @brief Get a track name part
262 *
263 * If the name part cannot be constructed an empty string is returned.
264 *
08af2413 265 * @param c Client
7788b7c7
RK
266 * @param track Track name
267 * @param context Context ("sort" or "display")
268 * @param part Name part ("artist", "album" or "title")
269 * @param partp Value of name part
270 * @return 0 on success, non-0 on error
271 */
272int disorder_part(disorder_client *c, const char *track, const char *context, const char *part, char **partp);
273
274/** @brief Pause the currently playing track
275 *
276 * Requires the 'pause' right.
277 *
08af2413 278 * @param c Client
7788b7c7
RK
279 * @return 0 on success, non-0 on error
280 */
281int disorder_pause(disorder_client *c);
282
00861dcb
RK
283/** @brief Play a track
284 *
285 * Requires the 'play' right.
286 *
08af2413 287 * @param c Client
00861dcb
RK
288 * @param track Track to play
289 * @param idp Queue ID of new track
290 * @return 0 on success, non-0 on error
291 */
292int disorder_play(disorder_client *c, const char *track, char **idp);
293
0bc1d67c
RK
294/** @brief Play multiple tracks
295 *
296 * Requires the 'play' right.
297 *
298 * @param c Client
299 * @param target Insert into queue after this track, or at head if ""
300 * @param tracks List of track names to play
301 * @param ntracks Length of tracks
302 * @return 0 on success, non-0 on error
303 */
304int disorder_playafter(disorder_client *c, const char *target, char **tracks, int ntracks);
305
ec9c0462
RK
306/** @brief Retrieve the playing track
307 *
308 *
309 *
310 * @param c Client
311 * @param playingp Details of the playing track
312 * @return 0 on success, non-0 on error
313 */
314int disorder_playing(disorder_client *c, struct queue_entry **playingp);
315
7788b7c7
RK
316/** @brief Delete a playlist
317 *
318 * Requires the 'play' right and permission to modify the playlist.
319 *
08af2413 320 * @param c Client
7788b7c7
RK
321 * @param playlist Playlist to delete
322 * @return 0 on success, non-0 on error
323 */
324int disorder_playlist_delete(disorder_client *c, const char *playlist);
325
3680ef53 326/** @brief List the contents of a playlist
7788b7c7 327 *
3680ef53 328 * Requires the 'read' right and oermission to read the playlist.
7788b7c7 329 *
08af2413 330 * @param c Client
3680ef53
RK
331 * @param playlist Playlist name
332 * @param tracksp List of tracks in playlist
333 * @param ntracksp Number of elements in tracksp
7788b7c7
RK
334 * @return 0 on success, non-0 on error
335 */
3680ef53 336int disorder_playlist_get(disorder_client *c, const char *playlist, char ***tracksp, int *ntracksp);
7788b7c7
RK
337
338/** @brief Get a playlist's sharing status
339 *
340 * Requires the 'read' right and permission to read the playlist.
341 *
08af2413 342 * @param c Client
7788b7c7
RK
343 * @param playlist Playlist to read
344 * @param sharep Sharing status ("public", "private" or "shared")
345 * @return 0 on success, non-0 on error
346 */
347int disorder_playlist_get_share(disorder_client *c, const char *playlist, char **sharep);
348
3680ef53
RK
349/** @brief Lock a playlist
350 *
351 * Requires the 'play' right and permission to modify the playlist. A given connection may lock at most one playlist.
352 *
08af2413 353 * @param c Client
3680ef53
RK
354 * @param playlist Playlist to delete
355 * @return 0 on success, non-0 on error
356 */
357int disorder_playlist_lock(disorder_client *c, const char *playlist);
358
08af2413
RK
359/** @brief Set the contents of a playlist
360 *
361 * Requires the 'play' right and permission to modify the playlist, which must be locked.
362 *
363 * @param c Client
364 * @param playlist Playlist to modify
365 * @param tracks New list of tracks for playlist
366 * @param ntracks Length of tracks
367 * @return 0 on success, non-0 on error
368 */
369int disorder_playlist_set(disorder_client *c, const char *playlist, char **tracks, int ntracks);
370
7788b7c7
RK
371/** @brief Set a playlist's sharing status
372 *
373 * Requires the 'play' right and permission to modify the playlist.
374 *
08af2413 375 * @param c Client
7788b7c7
RK
376 * @param playlist Playlist to modify
377 * @param share New sharing status ("public", "private" or "shared")
378 * @return 0 on success, non-0 on error
379 */
380int disorder_playlist_set_share(disorder_client *c, const char *playlist, const char *share);
381
382/** @brief Unlock the locked playlist playlist
383 *
384 * The playlist to unlock is implicit in the connection.
385 *
08af2413 386 * @param c Client
7788b7c7
RK
387 * @return 0 on success, non-0 on error
388 */
389int disorder_playlist_unlock(disorder_client *c);
390
3680ef53
RK
391/** @brief List playlists
392 *
393 * Requires the 'read' right. Only playlists that you have permission to read are returned.
394 *
08af2413 395 * @param c Client
3680ef53
RK
396 * @param playlistsp Playlist names
397 * @param nplaylistsp Number of elements in playlistsp
398 * @return 0 on success, non-0 on error
399 */
400int disorder_playlists(disorder_client *c, char ***playlistsp, int *nplaylistsp);
401
5dc19ffd
RK
402/** @brief Get all the preferences for a track
403 *
404 *
405 *
406 * @param c Client
407 * @param track Track name
408 * @param prefsp Track preferences
409 * @return 0 on success, non-0 on error
410 */
411int disorder_prefs(disorder_client *c, const char *track, struct kvp **prefsp);
412
08af2413
RK
413/** @brief List the queue
414 *
415 *
416 *
417 * @param c Client
418 * @param queuep Current queue contents
419 * @return 0 on success, non-0 on error
420 */
421int disorder_queue(disorder_client *c, struct queue_entry **queuep);
422
7788b7c7
RK
423/** @brief Disable random play
424 *
425 * Requires the 'global prefs' right.
426 *
08af2413 427 * @param c Client
7788b7c7
RK
428 * @return 0 on success, non-0 on error
429 */
430int disorder_random_disable(disorder_client *c);
431
432/** @brief Enable random play
433 *
434 * Requires the 'global prefs' right.
435 *
08af2413 436 * @param c Client
7788b7c7
RK
437 * @return 0 on success, non-0 on error
438 */
439int disorder_random_enable(disorder_client *c);
440
441/** @brief Detect whether random play is enabled
442 *
443 * Random play counts as enabled even if play is disabled.
444 *
08af2413 445 * @param c Client
7788b7c7
RK
446 * @param enabledp 1 if random play is enabled and 0 otherwise
447 * @return 0 on success, non-0 on error
448 */
449int disorder_random_enabled(disorder_client *c, int *enabledp);
450
08af2413
RK
451/** @brief List recently played tracks
452 *
453 *
454 *
455 * @param c Client
456 * @param recentp Recently played tracks
457 * @return 0 on success, non-0 on error
458 */
459int disorder_recent(disorder_client *c, struct queue_entry **recentp);
460
7788b7c7
RK
461/** @brief Re-read configuraiton file.
462 *
463 * Requires the 'admin' right.
464 *
08af2413 465 * @param c Client
7788b7c7
RK
466 * @return 0 on success, non-0 on error
467 */
468int disorder_reconfigure(disorder_client *c);
469
470/** @brief Register a new user
471 *
472 * Requires the 'register' right which is usually only available to the 'guest' user. Redeem the confirmation string via 'confirm' to complete registration.
473 *
08af2413 474 * @param c Client
7788b7c7
RK
475 * @param username Requested new username
476 * @param password Requested initial password
477 * @param email New user's email address
478 * @param confirmationp Confirmation string
479 * @return 0 on success, non-0 on error
480 */
481int disorder_register(disorder_client *c, const char *username, const char *password, const char *email, char **confirmationp);
482
483/** @brief Send a password reminder.
484 *
485 * If the user has no valid email address, or no password, or a reminder has been sent too recently, then no reminder will be sent.
486 *
08af2413 487 * @param c Client
7788b7c7
RK
488 * @param username User to remind
489 * @return 0 on success, non-0 on error
490 */
491int disorder_reminder(disorder_client *c, const char *username);
492
493/** @brief Remove a track form the queue.
494 *
495 * Requires one of the 'remove mine', 'remove random' or 'remove any' rights depending on how the track came to be added to the queue.
496 *
08af2413 497 * @param c Client
7788b7c7
RK
498 * @param id Track ID
499 * @return 0 on success, non-0 on error
500 */
501int disorder_remove(disorder_client *c, const char *id);
502
503/** @brief Rescan all collections for new or obsolete tracks.
504 *
505 * Requires the 'rescan' right.
506 *
08af2413 507 * @param c Client
7788b7c7
RK
508 * @return 0 on success, non-0 on error
509 */
510int disorder_rescan(disorder_client *c);
511
512/** @brief Resolve a track name
513 *
514 * Converts aliases to non-alias track names
515 *
08af2413 516 * @param c Client
7788b7c7
RK
517 * @param track Track name (might be an alias)
518 * @param resolvedp Resolve track name (definitely not an alias)
519 * @return 0 on success, non-0 on error
520 */
521int disorder_resolve(disorder_client *c, const char *track, char **resolvedp);
522
523/** @brief Resume the currently playing track
524 *
525 * Requires the 'pause' right.
526 *
08af2413 527 * @param c Client
7788b7c7
RK
528 * @return 0 on success, non-0 on error
529 */
530int disorder_resume(disorder_client *c);
531
532/** @brief Revoke a cookie.
533 *
534 * It will not subsequently be possible to log in with the cookie.
535 *
08af2413 536 * @param c Client
7788b7c7
RK
537 * @return 0 on success, non-0 on error
538 */
539int disorder_revoke(disorder_client *c);
540
c12575c6
RK
541/** @brief Get the server's RTP address information
542 *
543 *
544 *
545 * @param c Client
546 * @param addressp Where to store hostname or address
1f60835b 547 * @param portp Where to store service name or port number
c12575c6
RK
548 * @return 0 on success, non-0 on error
549 */
550int disorder_rtp_address(disorder_client *c, char **addressp, char **portp);
551
7788b7c7
RK
552/** @brief Terminate the playing track.
553 *
554 * Requires one of the 'scratch mine', 'scratch random' or 'scratch any' rights depending on how the track came to be added to the queue.
555 *
08af2413 556 * @param c Client
7788b7c7
RK
557 * @param id Track ID (optional)
558 * @return 0 on success, non-0 on error
559 */
560int disorder_scratch(disorder_client *c, const char *id);
561
4d80373d
RK
562/** @brief Schedule a track to play in the future
563 *
564 *
565 *
566 * @param c Client
567 * @param when When to play the track
568 * @param priority Event priority ("normal" or "junk")
569 * @param track Track to play
570 * @return 0 on success, non-0 on error
571 */
572int disorder_schedule_add_play(disorder_client *c, time_t when, const char *priority, const char *track);
573
574/** @brief Schedule a global setting to be changed in the future
575 *
576 *
577 *
578 * @param c Client
579 * @param when When to change the setting
580 * @param priority Event priority ("normal" or "junk")
581 * @param pref Global preference to set
582 * @param value New value of global preference
583 * @return 0 on success, non-0 on error
584 */
585int disorder_schedule_add_set_global(disorder_client *c, time_t when, const char *priority, const char *pref, const char *value);
586
587/** @brief Schedule a global setting to be unset in the future
588 *
589 *
590 *
591 * @param c Client
592 * @param when When to change the setting
593 * @param priority Event priority ("normal" or "junk")
594 * @param pref Global preference to set
595 * @return 0 on success, non-0 on error
596 */
597int disorder_schedule_add_unset_global(disorder_client *c, time_t when, const char *priority, const char *pref);
598
7788b7c7
RK
599/** @brief Delete a scheduled event.
600 *
601 * Users can always delete their own scheduled events; with the admin right you can delete any event.
602 *
08af2413 603 * @param c Client
7788b7c7
RK
604 * @param event ID of event to delete
605 * @return 0 on success, non-0 on error
606 */
607int disorder_schedule_del(disorder_client *c, const char *event);
608
5dc19ffd
RK
609/** @brief Get the details of scheduled event
610 *
611 *
612 *
613 * @param c Client
614 * @param id Event ID
615 * @param actiondatap Details of event
616 * @return 0 on success, non-0 on error
617 */
618int disorder_schedule_get(disorder_client *c, const char *id, struct kvp **actiondatap);
619
3680ef53
RK
620/** @brief List scheduled events
621 *
622 * This just lists IDs. Use 'schedule-get' to retrieve more detail
623 *
08af2413 624 * @param c Client
3680ef53
RK
625 * @param idsp List of event IDs
626 * @param nidsp Number of elements in idsp
627 * @return 0 on success, non-0 on error
628 */
629int disorder_schedule_list(disorder_client *c, char ***idsp, int *nidsp);
630
631/** @brief Search for tracks
632 *
633 * Terms are either keywords or tags formatted as 'tag:TAG-NAME'.
634 *
08af2413 635 * @param c Client
3680ef53
RK
636 * @param terms List of search terms
637 * @param tracksp List of matching tracks
638 * @param ntracksp Number of elements in tracksp
639 * @return 0 on success, non-0 on error
640 */
641int disorder_search(disorder_client *c, const char *terms, char ***tracksp, int *ntracksp);
642
7788b7c7
RK
643/** @brief Set a track preference
644 *
645 * Requires the 'prefs' right.
646 *
08af2413 647 * @param c Client
7788b7c7
RK
648 * @param track Track name
649 * @param pref Preference name
650 * @param value New value
651 * @return 0 on success, non-0 on error
652 */
653int disorder_set(disorder_client *c, const char *track, const char *pref, const char *value);
654
655/** @brief Set a global preference
656 *
657 * Requires the 'global prefs' right.
658 *
08af2413 659 * @param c Client
7788b7c7
RK
660 * @param pref Preference name
661 * @param value New value
662 * @return 0 on success, non-0 on error
663 */
664int disorder_set_global(disorder_client *c, const char *pref, const char *value);
665
eea34c08
RK
666/** @brief Request server shutdown
667 *
668 * Requires the 'admin' right.
669 *
08af2413 670 * @param c Client
eea34c08
RK
671 * @return 0 on success, non-0 on error
672 */
673int disorder_shutdown(disorder_client *c);
674
3680ef53
RK
675/** @brief Get server statistics
676 *
c12575c6 677 * The details of what the server reports are not really defined. The returned strings are intended to be printed out one to a line.
3680ef53 678 *
08af2413 679 * @param c Client
3680ef53
RK
680 * @param statsp List of server information strings.
681 * @param nstatsp Number of elements in statsp
682 * @return 0 on success, non-0 on error
683 */
684int disorder_stats(disorder_client *c, char ***statsp, int *nstatsp);
685
686/** @brief Get a list of known tags
687 *
688 * Only tags which apply to at least one track are returned.
689 *
08af2413 690 * @param c Client
3680ef53
RK
691 * @param tagsp List of tags
692 * @param ntagsp Number of elements in tagsp
693 * @return 0 on success, non-0 on error
694 */
695int disorder_tags(disorder_client *c, char ***tagsp, int *ntagsp);
696
7788b7c7
RK
697/** @brief Unset a track preference
698 *
699 * Requires the 'prefs' right.
700 *
08af2413 701 * @param c Client
7788b7c7
RK
702 * @param track Track name
703 * @param pref Preference name
704 * @return 0 on success, non-0 on error
705 */
706int disorder_unset(disorder_client *c, const char *track, const char *pref);
707
708/** @brief Set a global preference
709 *
710 * Requires the 'global prefs' right.
711 *
08af2413 712 * @param c Client
7788b7c7
RK
713 * @param pref Preference name
714 * @return 0 on success, non-0 on error
715 */
716int disorder_unset_global(disorder_client *c, const char *pref);
717
718/** @brief Get a user property.
719 *
720 * If the user does not exist an error is returned, if the user exists but the property does not then a null value is returned.
721 *
08af2413 722 * @param c Client
7788b7c7
RK
723 * @param username User to read
724 * @param property Property to read
725 * @param valuep Value of property
726 * @return 0 on success, non-0 on error
727 */
728int disorder_userinfo(disorder_client *c, const char *username, const char *property, char **valuep);
729
3680ef53
RK
730/** @brief Get a list of users
731 *
732 *
733 *
08af2413 734 * @param c Client
3680ef53
RK
735 * @param usersp List of users
736 * @param nusersp Number of elements in usersp
737 * @return 0 on success, non-0 on error
738 */
739int disorder_users(disorder_client *c, char ***usersp, int *nusersp);
740
7788b7c7
RK
741/** @brief Get the server version
742 *
743 *
744 *
08af2413 745 * @param c Client
7788b7c7
RK
746 * @param versionp Server version string
747 * @return 0 on success, non-0 on error
748 */
749int disorder_version(disorder_client *c, char **versionp);
750
c12575c6
RK
751/** @brief Set the volume
752 *
753 *
754 *
755 * @param c Client
756 * @param left Left channel volume
757 * @param right Right channel volume
758 * @return 0 on success, non-0 on error
759 */
760int disorder_set_volume(disorder_client *c, long left, long right);
761
762/** @brief Get the volume
763 *
764 *
765 *
766 * @param c Client
767 * @param leftp Left channel volume
1f60835b 768 * @param rightp Right channel volume
c12575c6
RK
769 * @return 0 on success, non-0 on error
770 */
771int disorder_get_volume(disorder_client *c, long *leftp, long *rightp);
772
7788b7c7 773#endif