aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* locate: added struct locate_item_listMax Kellermann2009-01-241-48/+53
| | | | | Instead of passing two parameters around (number of items, array of items), combine both in a variable size struct.
* locate: no CamelCaseMax Kellermann2009-01-241-14/+14
| | | | Renamed functions and variables.
* playlist: removed locate functions to queue_print.cMax Kellermann2009-01-241-2/+2
| | | | Now playlist.c does not contain any protocol specific code anymore.
* locate: renamed LocateTagItem to "struct locate_item"Max Kellermann2009-01-241-9/+7
| | | | No CamelCase and no typedefs.
* command: use queue_print_*()Max Kellermann2009-01-241-15/+43
| | | | | Replaced several wrapper functions from playlist.c, and make command.c use the queue print functions directly.
* command: eliminate gcc warningLaszlo Ashin2009-01-241-1/+1
| | | | | Argument cmd of function command_available() is not used if mpd was configured without sqlite.
* commands: don't advertise "sticker" unless configuredMax Kellermann2009-01-231-1/+13
| | | | | In the return value of the "commands" command, don't list the "sticker" command if no sticker file is configured.
* playlist: moved PlaylistInfo() to playlist_print.cMax Kellermann2009-01-231-0/+1
| | | | | | PlaylistInfo() (notice the capital 'P') sends a stored playlist to the client. Move it to a separate library, where all the code which glues the playlist and the MPD protocol together will live.
* playlist: removed stopOnError flag from playPlaylist()Max Kellermann2009-01-231-2/+2
| | | | All callers pass false. Don't bother to collect that parameter.
* command: don't restart player in the "status" commandMax Kellermann2009-01-211-1/+0
| | | | | | Don't attempt to restart the player if it was stopped, but there were still songs left on the playlist. This looks like it has been a workaround for a bug which has been fixed long time ago.
* Add space after sticker: to make it consistent.Qball Cow2009-01-201-1/+1
|
* command: added "sticker" commandMax Kellermann2009-01-191-0/+72
| | | | | | | The "sticker" command allows clients to query or manipulate the sticker database. This patch implements the sub-commands "get" and "set"; more will follow soon (enumeration), as well as extended "lsinfo" / "playlistinfo" versions.
* mapper: make the playlist directory optionalMax Kellermann2009-01-181-0/+5
|
* stats: no CamelCaseMax Kellermann2009-01-181-1/+1
| | | | Renamed functions and types.
* command: restore the "playlistinfo -1" behaviorMax Kellermann2009-01-111-0/+8
| | | | | If a range is "-1", display the whole list. This behavior is undocumented, but some clients rely on it.
* playlist: pass unsigned integers to playlistInfo()Max Kellermann2009-01-101-10/+26
| | | | | A song index cannot be negative. Also require the second parameter to be valid.
* playlist: exclude end of rangeMax Kellermann2009-01-101-1/+1
| | | | | In a range "start:end", "end" itself should not be included. Use the same semantics as other languages implementing ranges, e.g. Python.
* command: playlistinfo now uses a range argument rather than just a song idThomas Jansen2009-01-101-4/+5
| | | | | | | | | | | | | Loosely based on a patch provided by lesion in bug #1766. The playlistinfo command can now retrieve ranges of the playlist. The new argument indicates which entry is the last one that will be displayed. The number of displayed entries may be smaller than expected if the end of the playlist is reached. Previous usage: playlistinfo [start] New usage: playlistinfo [start[:end]]
* command: add a parser for range argumentsThomas Jansen2009-01-101-0/+48
| | | | | A range argument looks like start[:end] and is used to specify the entries of a list that should be returned (rather than the whole list).
* added missing explicit config.h includesMax Kellermann2009-01-081-0/+1
|
* playlist: log errors during loadPlaylist()Max Kellermann2009-01-041-1/+1
| | | | | | Don't call command_error() if loading a song from the playlist fails. This may result in assertion failures, since command_error() may be called more than once.
* ls: renamed functions, no CamelCaseMax Kellermann2009-01-041-4/+4
|
* command: check URI scheme in "addid"Max Kellermann2009-01-041-12/+22
| | | | | Check if the URI scheme is supported by MPD, and print an error message if not. Optimize the checks in "add" and "playlistadd".
* command: added variable "uri" to command handlersMax Kellermann2009-01-041-20/+24
| | | | Don't work with argv[1], give it the better name "uri".
* don't include utils.h when it isn't usedMax Kellermann2009-01-031-1/+2
|
* command: fix adding local files on !WIN32Max Kellermann2009-01-031-1/+5
| | | | | | Due to a typo, adding local files was always denied. Disable the second playlist_append_file() invocation on WIN32.
* Moving mixers to audio outputsViliam Mateicka2008-12-311-3/+3
|
* command: don't allow adding local files on WIN32Max Kellermann2008-12-301-0/+4
| | | | | | There are no unix sockets on WIN32, and therefore no authentication. WIN32 might have similar capabilities, but until we implement them, disable that MPD feature.
* removed os_compat.hMax Kellermann2008-12-291-1/+3
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* command: use gmtime() on WIN32Max Kellermann2008-12-291-1/+8
| | | | gmtime_r() is not available.
* command: reject unsupported URI schemesMax Kellermann2008-12-161-1/+11
| | | | | | When a client-specified URI has a scheme which is not supported, do not try to open it as a local file, but provide a meaningful error message.
* ls: make printRemoteUrlHandlers() return voidMax Kellermann2008-12-161-1/+2
| | | | | printRemoteUrlHandlers() cannot fail, and does not need a return value.
* replaced mpd_printf etc by G_GNUC_PRINTFThomas Jansen2008-12-021-4/+4
| | | | | We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF macros.
* command.c: replaced mpd_unused by G_GNUC_UNUSEDThomas Jansen2008-11-241-63/+63
|
* command: format strerror() with "%s"Max Kellermann2008-11-221-1/+1
| | | | We shouldn't pass strerror() where a format string is expected.
* command: allow clients to subscribe to specific idle eventsMarc Pavot2008-11-221-2/+23
| | | | | | The client may provide the names of idle events as arguments to the "idle" command to inform MPD that it is only interested in these events.
* path: removed sanitizePathDup()Max Kellermann2008-10-311-4/+2
| | | | | We don't need to sanitize the path, because the mapper already checks for malformed paths.
* client: use GSList instead of struct strnode for command listsMax Kellermann2008-10-311-7/+6
| | | | Replace a custom data structure with a GLib one.
* command: removed range check from check_bool()Max Kellermann2008-10-261-6/+0
| | | | check_bool() accepts only "0" or "1". The range check is superfluous.
* command: fix boolean value parserMax Kellermann2008-10-231-1/+1
| | | | | Due to a logic error, no value was valid for the boolean value parser. Replace "||" with "&&".
* stored_playlist: renamed and moved spl_delete() to stored_playlist.cMax Kellermann2008-10-231-1/+1
| | | | The function deletePlaylist() shouldn't be in playlist.c.
* command: check over/underflows in check_int()Max Kellermann2008-10-231-2/+13
| | | | | The "long" result of strtol() was implicitly casted down to a 32 bit integer. Add some range checking instead.
* command: added check_unsigned() / check_bool()Max Kellermann2008-10-231-13/+57
| | | | | | | Many command arguments must not be negative; add a separate parser/checker function for that. For the same reason, add check_bool(). This eliminates two strange special cases handlers from check_int().
* playlist: unsigned integersMax Kellermann2008-10-231-3/+3
| | | | | | There are some integers which have a "magic" -1 value which means "undefined" or "nothing". All others can be converted to unsigned, since they must not contain a negative number.
* command: use the bool datatype instead of intMax Kellermann2008-10-221-50/+51
| | | | | Instead of returning 0 for success and -1 for failure, return true or false. This seems more natural.
* command: converted COMMAND_RETURN_* macros to enumMax Kellermann2008-10-221-163/+165
| | | | | | | | Also add names for "error" and "ok". I don't like passing anonymous integer codes around. This is not yet complete: lots of functions (e.g. in playlist.c) follow the same convention of -1/0, and these have to be adapted, too.
* command: replaced "goto" with "break"Max Kellermann2008-10-221-2/+2
| | | | http://xkcd.com/292/
* command: no CamelCaseMax Kellermann2008-10-221-227/+247
| | | | Eliminate CamelCase in all public and static functions.
* command: removed CommandHandlerFunction typedefMax Kellermann2008-10-221-3/+1
| | | | | The typedef CommandHandlerFunction is only used once. Move its type into the command struct.
* ack: converted ACK_ERROR_* macros to enumMax Kellermann2008-10-221-2/+2
|