libmpdclient  2.23
stats.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: BSD-3-Clause
2 // Copyright The Music Player Daemon Project
3 
10 #ifndef MPD_STATS_H
11 #define MPD_STATS_H
12 
13 #include "compiler.h"
14 
15 #include <stdbool.h>
16 
17 struct mpd_connection;
18 struct mpd_pair;
19 
26 struct mpd_stats;
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
37 bool
38 mpd_send_stats(struct mpd_connection *connection);
39 
47 mpd_malloc
48 struct mpd_stats *
49 mpd_stats_begin(void);
50 
55 void
56 mpd_stats_feed(struct mpd_stats *stats, const struct mpd_pair *pair);
57 
63 mpd_malloc
64 struct mpd_stats *
65 mpd_recv_stats(struct mpd_connection *connection);
66 
70 mpd_malloc
71 struct mpd_stats *
72 mpd_run_stats(struct mpd_connection *connection);
73 
77 void mpd_stats_free(struct mpd_stats *stats);
78 
83 mpd_pure
84 unsigned
85 mpd_stats_get_number_of_artists(const struct mpd_stats *stats);
86 
91 mpd_pure
92 unsigned
93 mpd_stats_get_number_of_albums(const struct mpd_stats *stats);
94 
99 mpd_pure
100 unsigned
101 mpd_stats_get_number_of_songs(const struct mpd_stats *stats);
102 
106 mpd_pure
107 unsigned long mpd_stats_get_uptime(const struct mpd_stats *stats);
108 
113 mpd_pure
114 unsigned long mpd_stats_get_db_update_time(const struct mpd_stats *stats);
115 
120 mpd_pure
121 unsigned long mpd_stats_get_play_time(const struct mpd_stats *stats);
122 
127 mpd_pure
128 unsigned long mpd_stats_get_db_play_time(const struct mpd_stats *stats);
129 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 #endif
unsigned mpd_stats_get_number_of_artists(const struct mpd_stats *stats)
struct mpd_stats * mpd_run_stats(struct mpd_connection *connection)
void mpd_stats_free(struct mpd_stats *stats)
unsigned long mpd_stats_get_db_update_time(const struct mpd_stats *stats)
unsigned long mpd_stats_get_uptime(const struct mpd_stats *stats)
void mpd_stats_feed(struct mpd_stats *stats, const struct mpd_pair *pair)
unsigned mpd_stats_get_number_of_songs(const struct mpd_stats *stats)
unsigned long mpd_stats_get_db_play_time(const struct mpd_stats *stats)
struct mpd_stats * mpd_stats_begin(void)
unsigned mpd_stats_get_number_of_albums(const struct mpd_stats *stats)
unsigned long mpd_stats_get_play_time(const struct mpd_stats *stats)
bool mpd_send_stats(struct mpd_connection *connection)
struct mpd_stats * mpd_recv_stats(struct mpd_connection *connection)
Definition: pair.h:16