libmpdclient 2.22
stats.h
Go to the documentation of this file.
1/* libmpdclient
2 (c) 2003-2019 The Music Player Daemon Project
3 This project's homepage is: http://www.musicpd.org
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8
9 - Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11
12 - Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15
16 - Neither the name of the Music Player Daemon nor the names of its
17 contributors may be used to endorse or promote products derived from
18 this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*/
32
39#ifndef MPD_STATS_H
40#define MPD_STATS_H
41
42#include "compiler.h"
43
44#include <stdbool.h>
45
46struct mpd_connection;
47struct mpd_pair;
48
55struct mpd_stats;
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
66bool
67mpd_send_stats(struct mpd_connection *connection);
68
76mpd_malloc
77struct mpd_stats *
79
84void
85mpd_stats_feed(struct mpd_stats *stats, const struct mpd_pair *pair);
86
92mpd_malloc
93struct mpd_stats *
94mpd_recv_stats(struct mpd_connection *connection);
95
99mpd_malloc
100struct mpd_stats *
101mpd_run_stats(struct mpd_connection *connection);
102
106void mpd_stats_free(struct mpd_stats *stats);
107
112mpd_pure
113unsigned
115
120mpd_pure
121unsigned
123
128mpd_pure
129unsigned
131
135mpd_pure
136unsigned long mpd_stats_get_uptime(const struct mpd_stats *stats);
137
142mpd_pure
143unsigned long mpd_stats_get_db_update_time(const struct mpd_stats *stats);
144
149mpd_pure
150unsigned long mpd_stats_get_play_time(const struct mpd_stats *stats);
151
156mpd_pure
157unsigned long mpd_stats_get_db_play_time(const struct mpd_stats *stats);
158
159#ifdef __cplusplus
160}
161#endif
162
163#endif
unsigned mpd_stats_get_number_of_artists(const struct mpd_stats *stats)
struct mpd_stats * mpd_stats_begin(void)
unsigned long mpd_stats_get_db_play_time(const struct mpd_stats *stats)
unsigned long mpd_stats_get_uptime(const struct mpd_stats *stats)
unsigned long mpd_stats_get_play_time(const struct mpd_stats *stats)
unsigned long mpd_stats_get_db_update_time(const struct mpd_stats *stats)
void mpd_stats_feed(struct mpd_stats *stats, const struct mpd_pair *pair)
struct mpd_stats * mpd_recv_stats(struct mpd_connection *connection)
bool mpd_send_stats(struct mpd_connection *connection)
struct mpd_stats * mpd_run_stats(struct mpd_connection *connection)
void mpd_stats_free(struct mpd_stats *stats)
unsigned mpd_stats_get_number_of_songs(const struct mpd_stats *stats)
unsigned mpd_stats_get_number_of_albums(const struct mpd_stats *stats)
Definition: pair.h:41