MPD
0.20.15
db
Stats.hxx
Go to the documentation of this file.
1
/*
2
* Copyright 2003-2017 The Music Player Daemon Project
3
* http://www.musicpd.org
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
*/
19
20
#ifndef MPD_DATABASE_STATS_HXX
21
#define MPD_DATABASE_STATS_HXX
22
23
#include "
Chrono.hxx
"
24
25
struct
DatabaseStats
{
29
unsigned
song_count
;
30
34
std::chrono::duration<std::uint64_t, SongTime::period>
total_duration
;
35
39
unsigned
artist_count
;
40
44
unsigned
album_count
;
45
46
void
Clear
() {
47
song_count
= 0;
48
total_duration
=
total_duration
.zero();
49
artist_count
=
album_count
= 0;
50
}
51
};
52
53
#endif
Chrono.hxx
DatabaseStats::total_duration
std::chrono::duration< std::uint64_t, SongTime::period > total_duration
Total duration of all songs (in seconds).
Definition:
Stats.hxx:34
DatabaseStats::Clear
void Clear()
Definition:
Stats.hxx:46
DatabaseStats
Definition:
Stats.hxx:25
DatabaseStats::album_count
unsigned album_count
Number of distinct album names.
Definition:
Stats.hxx:44
DatabaseStats::artist_count
unsigned artist_count
Number of distinct artist names.
Definition:
Stats.hxx:39
DatabaseStats::song_count
unsigned song_count
Number of songs.
Definition:
Stats.hxx:29
Generated on Thu Jan 11 2018 20:53:12 for MPD by
1.8.14