aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-10-08don't include os_compat.hMax Kellermann1-1/+0
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-09-07command: use client_[gs]et_permission()Max Kellermann1-3/+2
Don't pass a pointer to client->permission to processCommand(), better let the code in command.c use the new permission getter/setter functions.
2008-09-07command: removed commandError()Max Kellermann1-2/+0
commandError() has been superseded by command_error(), and is not being used anymore. Remove it.
2008-09-07command: added command_success() and command_error()Max Kellermann1-3/+5
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).
2008-09-06include cleanupMax Kellermann1-0/+1
As usual, include only headers which are really needed.
2008-08-29export the function client_is_expired()Max Kellermann1-2/+1
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.
2008-08-29client: pass the client struct to processCommand()Max Kellermann1-2/+6
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.
2008-04-12command.h: include sllist.h which defines struct strnodeEric Wong1-2/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@7346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12clean up CPP includesMax Kellermann1-7/+3
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
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-3/+1
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
2007-04-05The massive copyright updateAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-02-18Closing some parenthesis around shank's email address in copyright headers.J. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5376 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20Fix warnings for -Wmissing-prototypesAvuton Olrich1-2/+2
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
2006-08-07command: static-fication since commandError is no longer a macroEric Wong1-3/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@4593 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30commandError() cleanups, fixup gcc checksEric Wong1-14/+2
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
2006-07-30interface/connection malloc reductions from mpd-keEric Wong1-10/+11
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
2006-07-20Add mpd-indent.shAvuton Olrich1-4/+4
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
2006-07-17some quick hacks to avoid signedness warnings with gcc4Warren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4387 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14[CLEANUP] Remove unnecessary includes, staticAvuton Olrich1-1/+1
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
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-1/+1
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-11-18DJWLindenaar's fix race condition and some memory leaks patchQball Cow1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@3681 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-15fix C99 stuff for commandErrorWarren Dukes1-2/+2
also some slight optimizations to interfacePrintWithFD() and myfprintf() git-svn-id: https://svn.musicpd.org/mpd/trunk@1503 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-05implement list_OK/command_list_ok_beginWarren Dukes1-1/+1
update COMMANDS git-svn-id: https://svn.musicpd.org/mpd/trunk@1344 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-05new command, plchanges, and also add Num: to songinfo of playlistinfoWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1339 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04add ack.h and change format of error againWarren Dukes1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@1327 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04change format of error stuffWarren Dukes1-5/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@1326 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04finish ack error codesWarren Dukes1-5/+8
git-svn-id: https://svn.musicpd.org/mpd/trunk@1325 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04work on ACK error codesWarren Dukes1-1/+16
git-svn-id: https://svn.musicpd.org/mpd/trunk@1324 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04clean up ACK error coding a little bitWarren Dukes1-4/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@1321 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14add vim shiznit to end of all source filesWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-12cleanup interface between interface.[ch] and command.[ch]Warren Dukes1-2/+4
primarily move all buffer2array stuff from interface.c to command.c and write a new command function explicitly for dealing with commandLists git-svn-id: https://svn.musicpd.org/mpd/trunk@701 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-11incremental updates and command-list/update kung fuWarren Dukes1-1/+3
this needs some serious cleaning up and testing git-svn-id: https://svn.musicpd.org/mpd/trunk@692 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-18bunch of autotool cleanupsWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@271 09075e82-0dd4-0310-85a5-a0d7c8717e4f