aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2011-01-29client_idle: add header client_idle.hMax Kellermann1-13/+0
2011-01-29copyright year 2011Max Kellermann1-1/+1
2011-01-10player_control: removed the global variable "pc"Max Kellermann1-1/+3
Allocate a player_control object where needed, and pass it around. Each "client" object is associated with a "player_control" instance. This prepares multi-player support.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-03-30client: client_write() does not necessary for export.Avuton Olrich1-5/+0
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
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.
2009-02-28client: use sockaddr_to_string()Max Kellermann1-1/+1
Removed the sockaddr_to_tmp_string() hack, use the new function sockaddr_to_string() instead.
2008-12-31client: run client_manager_expire() in an idle eventMax Kellermann1-1/+0
With the GLib main loop, the client manager can install its own event in case a client is expired. No need for main.c to call client_manager_expire() manually.
2008-12-30main: use the GLib main loopMax Kellermann1-1/+0
This is a rather huge patch, which unfortunately cannot be splitted. Instead of using our custom ioops.h library, convert everything to use the GLib main loop.
2008-12-29client: include winsock headers on WIN32Max Kellermann1-1/+1
On Windows, socket declarations reside in winsock.h and ws2tcpip.h. The POSIX headers sys/socket.h etc. are not available.
2008-12-02replaced mpd_printf etc by G_GNUC_PRINTFThomas Jansen1-3/+2
We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF macros.
2008-11-22command: allow clients to subscribe to specific idle eventsMarc Pavot1-1/+1
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.
2008-10-31client: use boolMax Kellermann1-1/+1
Return bool instead of int.
2008-10-31added prefix to header macrosMax Kellermann1-2/+2
"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.
2008-10-17client: converted permissions to unsignedMax Kellermann1-2/+2
client->permission is a bit set, and should be unsigned.
2008-10-15listen, client: enable SO_PASSCRED, get client's uidMax Kellermann1-1/+7
Enable authentication over unix sockets. Store the client's uid in the client struct.
2008-10-14command: added command "idle"Max Kellermann1-0/+14
"idle" waits until something noteworthy happens on the server, e.g. song change, playlist modified, database updated. This allows clients to keep up to date without polling.
2008-10-08don't include os_compat.hMax Kellermann1-1/+4
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-09-07client: added client_[gs]et_permission()Max Kellermann1-0/+4
The code in command.c shouldn't mess with a pointer to client->permission. Provide an API for accessing this value.
2008-09-07removed fdprintf() and client_print()Max Kellermann1-2/+0
All callers of fdprintf() have been converted to client_printf() or fprintf(); it is time to remove this clumsy hack now. We can also remove client_print() which took a file descriptor as parameter.
2008-09-07client: removed client_get_fd()Max Kellermann1-7/+0
Now that we have removed all invocations of client_get_fd(), we can safely remove this transitional function. All access to the file descriptor is now hidden behind the interface declared in client.h.
2008-09-07client: added client_printf()Max Kellermann1-0/+11
Based on client_puts(), client_printf() is the successor of fdprintf(). As soon as all fdprintf() callers have been rewritten to use client_printf(), we can remove fdprintf().
2008-09-07client: added client_write() and client_puts()Max Kellermann1-0/+10
client_write() writes a buffer to the client and buffers it if required. client_puts() does the same for a C string. The next patch will add more tools which will replace fdprintf() later.
2008-08-29export the function client_is_expired()Max Kellermann1-0/+2
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-0/+9
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-08-29client: reorder function declarationsMax Kellermann1-3/+4
Change the order of function declarations in client.h, to make it well arranged and readable.
2008-08-28client: renamed all public functionsMax Kellermann1-6/+6
Functions which operate on the whole client list are prefixed with "client_manager_", and functions which handle just one client just get "client_".
2008-08-28renamed interface.c to client.cMax Kellermann1-0/+0
I don't believe "interface" is a good name for something like "connection by a client to MPD", let's call it "client". This is the first patch in the series which changes the name, beginning with the file name.
2008-08-28const pointersMax Kellermann1-2/+2
The usual bunch of pointer arguments which should be const.
2008-04-12clean up CPP includesMax Kellermann1-1/+0
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-03-26use size_tMax Kellermann1-1/+1
When dealing with in-memory lengths, the standard type "size_t" should be used. Missing one can be quite dangerous, because an attacker could provoke an integer under-/overflow, which may provide an attack vector. git-svn-id: https://svn.musicpd.org/mpd/trunk@7205 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-5/+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
2006-08-20Fix warnings for -Wmissing-prototypesAvuton Olrich1-4/+4
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-07-20Add mpd-indent.shAvuton Olrich1-2/+2
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-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 unused codeAvuton Olrich1-3/+0
Static what makes sense git-svn-id: https://svn.musicpd.org/mpd/trunk@4327 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
2004-06-21todo updateWarren Dukes1-1/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@1593 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-15fix C99 stuff for commandErrorWarren Dukes1-1/+1
also some slight optimizations to interfacePrintWithFD() and myfprintf() git-svn-id: https://svn.musicpd.org/mpd/trunk@1503 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-03-18bunch of autotool cleanupsWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@271 09075e82-0dd4-0310-85a5-a0d7c8717e4f