aboutsummaryrefslogtreecommitdiffstats
path: root/src/Stats.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-10-02Stats: don't include glib.h in headerMax Kellermann1-0/+2
Use forward declaration instead.
2013-10-02Stats: rename stats.h to Stats.hxxMax Kellermann1-5/+1
2013-10-02Log: new logging library APIMax Kellermann1-1/+2
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-09-04util/Error: new error passing libraryMax Kellermann1-4/+4
Replaces GLib's GError.
2013-01-20PlayerControl: move functions into the classMax Kellermann1-1/+1
2013-01-04player_control.h: convert header to C++Max Kellermann1-1/+1
2013-01-03Client: rename the struct client to class ClientMax Kellermann1-1/+1
2013-01-03client: convert to C++Max Kellermann1-3/+2
2013-01-03database.h: rename to DatabaseSimple.hxxMax Kellermann1-1/+1
2012-08-29Stats: stats_print() returns voidMax Kellermann1-3/+2
2012-08-15DatabasePlugin: add method GetStats()Max Kellermann1-63/+18
Optimize the ProxyDatabase by invoking "stats" on the peer, instead of visiting all songs.
2012-08-08DatabaseGlue: add function db_is_simple()Max Kellermann1-4/+8
Preparing for non-"simple" database plugins.
2012-08-07db_selection: rename to DatabaseSelectionMax Kellermann1-3/+2
2012-08-07Database{Plugin,Visitor}: pass referencesMax Kellermann1-4/+4
2012-08-02stats: convert to C++Max Kellermann1-26/+31
2011-11-27stats: explicitly cast "time_t" to "long"Max Kellermann1-1/+1
Fixes warning on mingw32.
2011-09-13database: don't allow uri==NULLMax Kellermann1-1/+1
Add nonnull attributes and fix all callers.
2011-09-13database: add struct db_visitorMax Kellermann1-4/+10
Use this struct for db_walk().
2011-01-29copyright year 2011Max Kellermann1-1/+1
2011-01-10player_control: removed the global variable "pc"Max Kellermann1-1/+2
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-11-12include config.h in all sourcesMax Kellermann1-0/+1
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-10-13tag: removed the "_ITEM_" suffix from the enum namesMax Kellermann1-2/+2
2009-10-08player_control: no CamelCaseMax Kellermann1-1/+1
2009-03-13all: Update copyright header.Avuton Olrich1-7/+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-27tag: no CamelCaseMax Kellermann1-1/+1
Renamed numOfItems to num_items.
2009-01-18stats: use GTimer instead of time(NULL)Max Kellermann1-2/+7
time(NULL) shows the wrong results when the machine's clock is changed.
2009-01-18stats: use one db_walk() to obtain statsMax Kellermann1-30/+44
Don't use dbUtils.h functions. This reduces 4 full database walks to just one.
2009-01-18stats: added num_artists, num_albumsMax Kellermann1-8/+10
Don't recalculate the number of artists and albums each time a client requests statistics. Calculate that once in stats_update().
2009-01-18stats: no CamelCaseMax Kellermann1-11/+11
Renamed functions and types.
2009-01-04stats: added stats_update()Max Kellermann1-0/+7
2008-12-29removed os_compat.hMax Kellermann1-2/+0
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
2008-10-08database: renamed functions, "db_" prefix and no CamelCaseMax Kellermann1-2/+2
Yet another CamelCase removal patch.
2008-10-08directory: moved code to database.cMax Kellermann1-1/+1
Taming the directory.c monster, part II: move the database management stuff to database. directory.c should only contain code which works on directory objects.
2008-10-08song: converted typedef Song to struct songMax Kellermann1-1/+3
Again, a data type which can be forward-declared.
2008-09-08use strset.h instead of tagTracker.hMax Kellermann1-3/+41
With a large music database, the linear string collection in tagTracker.c becomes very slow. We implemented that in a quick'n'dirty fashion when we removed tree.c, and now we rewrite it using the fast hashed string set.
2008-09-07stats: don't pass "fd" to printStats()Max Kellermann1-10/+17
Pass the client struct instead of the raw file descriptor.
2008-09-06include cleanupMax Kellermann1-0/+1
As usual, include only headers which are really needed.
2008-08-26renamed player.c to player_control.cMax Kellermann1-1/+1
Give player.c a better name, meaning that the code is used to control the player thread.
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-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-2/+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-07-30commandError() cleanups, fixup gcc checksEric Wong1-2/+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-8/+8
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-9/+12
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-17sparse: ANSI-fy function declarationsEric Wong1-1/+1
These are just warnings from sparse, but it makes the output easier to read. I ran this through a quick perl script, but of course verified the output by looking at the diff and making sure the thing still compiles. here's the quick perl script I wrote to generate this patch: ----------- 8< ----------- use Tie::File; defined(my $pid = open my $fh, '-|') or die $!; if (!$pid) { open STDERR, '>&STDOUT' or die $!; exec 'sparse', @ARGV or die $!; } my $na = 'warning: non-ANSI function declaration of function'; while (<$fh>) { print STDERR $_; if (/^(.+?\.[ch]):(\d+):(\d+): $na '(\w+)'/o) { my ($f, $l, $pos, $func) = ($1, $2, $3, $4); $l--; tie my @x, 'Tie::File', $f or die "$!: $f"; print '-', $x[$l], "\n"; $x[$l] =~ s/\b($func\s*)\(\s*\)/$1(void)/; print '+', $x[$l], "\n"; untie @x; } } git-svn-id: https://svn.musicpd.org/mpd/trunk@4378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15[CLEANUP] Remove unused codeAvuton Olrich1-3/+0
Cleanup whitespace->tabs git-svn-id: https://svn.musicpd.org/mpd/trunk@4347 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-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-11-10merge changes from metadata-rewrite branchWarren Dukes1-3/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@2589 09075e82-0dd4-0310-85a5-a0d7c8717e4f