aboutsummaryrefslogtreecommitdiff
path: root/src/command.h
Commit message (Collapse)AuthorAge
* command.h: move function prototypes to AllCommands.hMax Kellermann2012-09-25
|
* command.h: remove obsolete command_success() prototypeMax Kellermann2012-09-25
| | | | This lives in protocol/result.h now.
* command: add COMMAND_RETURN_IDLEMax Kellermann2012-09-25
| | | | Eliminate the hack in handle_idle().
* command: add documentation for "enum command_return"Max Kellermann2012-09-25
|
* command: remove enum integer valuesMax Kellermann2012-09-25
| | | | Just use the values assigned by the compiler.
* command: move print_error() to CommandError.cxxMax Kellermann2012-08-07
| | | | Prepare for splitting command.c.
* gcc.h: re-add gcc_const and gcc_pureMax Kellermann2012-08-02
| | | | Remove GLib dependency from some headers.
* copyright year 2011Max Kellermann2011-01-29
|
* Update copyright notices.Avuton Olrich2009-12-31
|
* command: moved command_process_list() to client.cMax Kellermann2009-07-29
|
* command: command_error() is not necessary for export.Avuton Olrich2009-03-30
|
* all: Update copyright header.Avuton Olrich2009-03-13
| | | | | | | | This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
* replaced mpd_printf etc by G_GNUC_PRINTFThomas Jansen2008-12-02
| | | | | We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF macros.
* added prefix to header macrosMax Kellermann2008-10-31
| | | | | | | "LOG_H" is a macro which is also used by ffmpeg/log.h. This is ffmpeg's fault, because short macros should be reserved for applications, but since it's always a good idea to choose prefixed macro names, even for applications, we are going to do that in MPD.
* client: use GSList instead of struct strnode for command listsMax Kellermann2008-10-31
| | | | Replace a custom data structure with a GLib one.
* command: use the bool datatype instead of intMax Kellermann2008-10-22
| | | | | 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-22
| | | | | | | | 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: no CamelCaseMax Kellermann2008-10-22
| | | | Eliminate CamelCase in all public and static functions.
* ack: converted ACK_ERROR_* macros to enumMax Kellermann2008-10-22
|
* don't include os_compat.hMax Kellermann2008-10-08
| | | | | When there are standardized headers, use these instead of the bloated os_compat.h.
* command: use client_[gs]et_permission()Max Kellermann2008-09-07
| | | | | | Don't pass a pointer to client->permission to processCommand(), better let the code in command.c use the new permission getter/setter functions.
* command: removed commandError()Max Kellermann2008-09-07
| | | | | commandError() has been superseded by command_error(), and is not being used anymore. Remove it.
* command: added command_success() and command_error()Max Kellermann2008-09-07
| | | | | | | These two functions take a client struct instead of the file descriptor. We will now begin passing the client struct around instead of a raw file descriptor (which needed a linear lookup in the client list to be useful).
* include cleanupMax Kellermann2008-09-06
| | | | As usual, include only headers which are really needed.
* export the function client_is_expired()Max Kellermann2008-08-29
| | | | | | | Instead of passing the pointer to the "expired" flag to processListOfCommands(), this function should use the client API to check this flag. We can now remove the "global_expired" hack introduced recently.
* client: pass the client struct to processCommand()Max Kellermann2008-08-29
| | | | | | | | Start exporting the client struct as an opaque struct. For now, pass it only to processCommand() and processListOfCommands(), and provide a function to extract the socket handle. Later, we will propagate the pointer to all command implementations, and of course to client_print() etc.
* command.h: include sllist.h which defines struct strnodeEric Wong2008-04-12
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* clean up CPP includesMax Kellermann2008-04-12
| | | | | | | | | Try to only include headers which are really needed. We should particularly check all "headers including other headers". The long-term goal is to have a manageable, small API for plugins (decoders, output) without so many mpd internals cluttering the namespace. git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-03
| | | | | | | | | | | | | This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* The massive copyright updateAvuton Olrich2007-04-05
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Closing some parenthesis around shank's email address in copyright headers.J. Alexander Treuman2007-02-18
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5376 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix warnings for -Wmissing-prototypesAvuton Olrich2006-08-20
| | | | | | Add -Wmissing-prototypes if compiling with gcc Static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* command: static-fication since commandError is no longer a macroEric Wong2006-08-07
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4593 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* commandError() cleanups, fixup gcc checksEric Wong2006-07-30
| | | | | | | stripped binary size reduced by 9k on my machine from making commandError a function. We'll print out error messages slightly slower before, but the smaller binary is more than worth it. git-svn-id: https://svn.musicpd.org/mpd/trunk@4488 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* interface/connection malloc reductions from mpd-keEric Wong2006-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch massively reduces the amount of heap allocations at the interface/command layer. Most commands with minimal output should not allocate memory from the heap at all. Things like repeatedly polling status, currentsong, and volume changes should be faster as a result, and more importantly, not a source of memory fragmentation. These changes should be safe in that there's no way for a remote-client to corrupt memory or otherwise do bad stuff to MPD, but an extra set of eyes to review would be good. Of course there's never any warranty :) No longer do we use FILE * structures in the interface, which means we don't have to allocate any new memory for most connections. Now, before you go on about losing the buffering that FILE * +implies+, remember that myfprintf() never took advantage of any of the stdio buffering features. To reduce the diff and make bugs easier to spot in the diff, I've kept myfprintf in places where we write to files (and not network interfaces). Expect myfprintf to go away entirely soon (we'll use fprintf for writing regular files). git-svn-id: https://svn.musicpd.org/mpd/trunk@4483 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-20
| | | | | | Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* some quick hacks to avoid signedness warnings with gcc4Warren Dukes2006-07-17
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4387 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Change shank's email addressJ. Alexander Treuman2006-07-14
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* [CLEANUP] Remove unnecessary includes, staticAvuton Olrich2006-07-14
| | | | | | functions that don't need to be exported, rename misspelled function git-svn-id: https://svn.musicpd.org/mpd/trunk@4325 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Huge header update, update the copyright and addAvuton Olrich2006-07-13
| | | | | the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* DJWLindenaar's fix race condition and some memory leaks patchQball Cow2005-11-18
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3681 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix C99 stuff for commandErrorWarren Dukes2004-06-15
| | | | | also some slight optimizations to interfacePrintWithFD() and myfprintf() git-svn-id: https://svn.musicpd.org/mpd/trunk@1503 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* implement list_OK/command_list_ok_beginWarren Dukes2004-06-05
| | | | | update COMMANDS git-svn-id: https://svn.musicpd.org/mpd/trunk@1344 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* new command, plchanges, and also add Num: to songinfo of playlistinfoWarren Dukes2004-06-05
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1339 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add ack.h and change format of error againWarren Dukes2004-06-04
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1327 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* change format of error stuffWarren Dukes2004-06-04
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1326 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* finish ack error codesWarren Dukes2004-06-04
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1325 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* work on ACK error codesWarren Dukes2004-06-04
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1324 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* clean up ACK error coding a little bitWarren Dukes2004-06-04
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1321 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add vim shiznit to end of all source filesWarren Dukes2004-04-14
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f