aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.hxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-01-01Copyright year 2015Max Kellermann1-1/+1
2014-01-13copyright year 2014Max Kellermann1-1/+1
2013-12-29ls: add "pure" attributeMax Kellermann1-0/+3
2013-10-19*: use references instead of pointersMax Kellermann1-1/+1
2013-01-03Client: rename the struct client to class ClientMax Kellermann1-3/+2
2013-01-03ls.h: rename to ls.hxxMax Kellermann1-3/+3
2011-01-29copyright year 2011Max Kellermann1-1/+1
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
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-03-03cmdline: Print available protocols when --version is run.Avuton Olrich1-0/+6
2009-02-25ls: moved generic URI utilities to uri.cMax Kellermann1-8/+0
"ls" is a bad name for a library which parses URIs. We'll move the rest of the "ls" library later.
2009-01-04ls: renamed functions, no CamelCaseMax Kellermann1-5/+13
2009-01-04ls: removed hasMusicSuffix() and get_archive_by_suffix()Max Kellermann1-6/+0
Determine the suffix manually, and use decoder_plugin_from_suffix() and archive_plugin_from_suffix() instead. This way, song_file_update_inarchive() can be optimized: it does not have to translate its path.
2009-01-04ls: include cleanupMax Kellermann1-3/+0
Don't include headers which are not used. Fix some includes in decoder_thread.c.
2008-12-16ls: adding get_archive_by_suffix() functionViliam Mateicka1-0/+4
2008-12-16ls: added uri_has_scheme()Max Kellermann1-0/+6
uri_has_scheme() checks if an URI contains the sub string "://", which makes MPD assume that it is a remote URI.
2008-12-16ls: use boolMax Kellermann1-1/+3
Use the C99 "bool" data type instead of "int".
2008-12-16ls: make printRemoteUrlHandlers() return voidMax Kellermann1-1/+1
printRemoteUrlHandlers() cannot fail, and does not need a return value.
2008-12-16ls: removed isValidRemoteUtf8Url()Max Kellermann1-2/+0
The function didn't do anything useful, it was just several lines obfuscating that it was only forwarding isRemoteUrl()'s return value.
2008-12-16ls: don't include time.hMax Kellermann1-2/+0
ls.h does not need time.h, do not include it.
2008-11-01decoder: return const decoder_plugin structsMax Kellermann1-1/+2
The decoder_plugin structs must never change. Don't work with non-const pointers.
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-22command: added print_spl_list()Max Kellermann1-2/+0
The function print_spl_list() replaces the old function lsPlaylists() from ls.c.
2008-10-14ls: removed myStat(), isFile(), isDir()Max Kellermann1-6/+0
The mapper code has replaced these functions.
2008-10-13song: stat file in song_file_update(), don't use isMusic()Max Kellermann1-3/+0
isMusic() used to be a very inefficient function: with every invocation, it did another stat() on the specified file. There is only one caller, do the stat() there manually and use hasMusicSuffix() instead of isMusic().
2008-10-13playlist: don't use isPlaylist() in deletePlaylist()Max Kellermann1-2/+0
The only caller of deletePlaylist() appends PLAYLIST_FILE_SUFFIX, so we can be sure it's already there. We don't need to stat the file, since unlink() does all the checking.
2008-10-08don't include os_compat.hMax Kellermann1-0/+3
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-09-07ls: don't pass "fd" to lsPlaylists(), printRemoteUrlHandlers()Max Kellermann1-2/+4
Pass the client struct instead of the raw file descriptor.
2008-08-29pass constant pointersMax Kellermann1-2/+2
And again, convert arguments to const.
2008-08-26renamed inputPlugin.* to decoder_list.*Max Kellermann1-1/+1
Since inputPlugin.c manages the list of registered decoders, we should rename the source file.
2008-08-26renamed InputPlugin to struct decoder_pluginMax Kellermann1-2/+3
"decoder plugin" is a better name than "input plugin", since the plugin does not actually do the input - InputStream does. Also don't use typedef, so we can forward-declare it if required.
2008-04-12clean up CPP includesMax Kellermann1-3/+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-02-05fix -Wconst warningsMax Kellermann1-8/+8
[ew: cleaned up the dirty union hack a bit] Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-6/+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-12-28Merge branches/ew r7104Eric Wong1-0/+2
thread-safety work in preparation for rewrite to use pthreads Expect no regressions against trunk (r7078), possibly minor performance improvements in update (due to fewer heap allocations), but increased stack usage. Applied the following patches: * maxpath_str for reentrancy (temporary fix, reverted) * path: start working on thread-safe variants of these methods * Re-entrancy work on path/character-set conversions * directory.c: exploreDirectory() use reentrant functions here * directory/update: more use of reentrant functions + cleanups * string_toupper: a strdup-less version of strDupToUpper * get_song_url: a static-variable-free version of getSongUrl() * Use reentrant/thread-safe get_song_url everywhere * replace rmp2amp with the reentrant version, rmp2amp_r * Get rid of the non-reentrant/non-thread-safe rpp2app, too. * buffer2array: assert strdup() returns a usable value in unit tests * replace utf8ToFsCharset and fsCharsetToUtf8 with thread-safe variants * fix storing playlists w/o absolute paths * parent_path(), a reentrant version of parentPath() * parentPath => parent_path for reentrancy and thread-safety * allow "make test" to automatically run embedded unit tests * remove convStrDup() and maxpath_str() * use MPD_PATH_MAX everywhere instead of MAXPATHLEN * path: get rid of appendSlash, pfx_path and just use pfx_dir * get_song_url: fix the ability to play songs in the top-level music_directory git-svn-id: https://svn.musicpd.org/mpd/trunk@7106 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-07-30interface/connection malloc reductions from mpd-keEric Wong1-2/+2
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-10/+10
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 'extern int errno;'Avuton Olrich1-4/+0
Remove unexported functions from the header Static what makes sense git-svn-id: https://svn.musicpd.org/mpd/trunk@4326 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
2006-03-16merge with mpd/trunk up to r3925Eric Wong1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@3926 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-21todo updateWarren Dukes1-1/+7
git-svn-id: https://svn.musicpd.org/mpd/trunk@1597 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-02add urlhandlers command, but prolly not neededWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@1307 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-02validate url's before adding to playlistWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@1289 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-31mp3 and ogg plugin stuffWarren Dukes1-13/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@1245 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-13redimentary addition of url's to playlistWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@1000 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-16remove directory mtime from db!Warren Dukes1-1/+1
also, only reReadDB and write DB on update if something was actually updated git-svn-id: https://svn.musicpd.org/mpd/trunk@780 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-31lets cleanup some file type detection and not call stat() so muchWarren Dukes1-9/+11
git-svn-id: https://svn.musicpd.org/mpd/trunk@575 09075e82-0dd4-0310-85a5-a0d7c8717e4f