libmpdclient: mpd/stats.h Source File

libmpdclient 2.9

- Main Page
- Classes
- Files

- File List
- File Members

stats.h
Go to the documentation of this file.
1 /* libmpdclient
2 (c) 2003-2010 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 <mpd/compiler.h>
43
44 #include <stdbool.h>
45
46 struct mpd_connection;
47 struct mpd_pair;
48
55 struct mpd_stats;
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
66 bool
67 mpd_send_stats(struct mpd_connection *connection);
68
76 mpd_malloc
77 struct mpd_stats *
78 mpd_stats_begin(void);
79
84 void
85 mpd_stats_feed(struct mpd_stats *status, const struct mpd_pair *pair);
86
92 mpd_malloc
93 struct mpd_stats *
94 mpd_recv_stats(struct mpd_connection *connection);
95
99 mpd_malloc
100 struct mpd_stats *
101 mpd_run_stats(struct mpd_connection *connection);
102
106 void mpd_stats_free(struct mpd_stats * stats);
107
112 mpd_pure
113 unsigned
114 mpd_stats_get_number_of_artists(const struct mpd_stats * stats);
115
120 mpd_pure
121 unsigned
122 mpd_stats_get_number_of_albums(const struct mpd_stats * stats);
123
128 mpd_pure
129 unsigned
130 mpd_stats_get_number_of_songs(const struct mpd_stats * stats);
131
135 mpd_pure
136 unsigned long mpd_stats_get_uptime(const struct mpd_stats * stats);
137
142 mpd_pure
143 unsigned long mpd_stats_get_db_update_time(const struct mpd_stats * stats);
144
149 mpd_pure
150 unsigned long mpd_stats_get_play_time(const struct mpd_stats * stats);
151
156 mpd_pure
157 unsigned long mpd_stats_get_db_play_time(const struct mpd_stats * stats);
158
159 #ifdef __cplusplus
160 }
161 #endif
162
163 #endif
mpd_stats_begin
mpd_malloc struct mpd_stats * mpd_stats_begin(void)
mpd_stats_get_number_of_songs
mpd_pure unsigned mpd_stats_get_number_of_songs(const struct mpd_stats *stats)
mpd_stats_free
void mpd_stats_free(struct mpd_stats *stats)
mpd_stats_get_db_update_time
mpd_pure unsigned long mpd_stats_get_db_update_time(const struct mpd_stats *stats)
compiler.h
Compiler specific definitions.
mpd_stats_get_play_time
mpd_pure unsigned long mpd_stats_get_play_time(const struct mpd_stats *stats)
mpd_stats_get_number_of_albums
mpd_pure unsigned mpd_stats_get_number_of_albums(const struct mpd_stats *stats)
mpd_run_stats
mpd_malloc struct mpd_stats * mpd_run_stats(struct mpd_connection *connection)
mpd_recv_stats
mpd_malloc struct mpd_stats * mpd_recv_stats(struct mpd_connection *connection)
mpd_stats_get_db_play_time
mpd_pure unsigned long mpd_stats_get_db_play_time(const struct mpd_stats *stats)
mpd_connection
Definition: connection.h:48
mpd_stats_get_uptime
mpd_pure unsigned long mpd_stats_get_uptime(const struct mpd_stats *stats)
mpd_stats
Definition: stats.h:47
mpd_send_stats
bool mpd_send_stats(struct mpd_connection *connection)
mpd_stats_get_number_of_artists
mpd_pure unsigned mpd_stats_get_number_of_artists(const struct mpd_stats *stats)
mpd_pair
Definition: pair.h:41
mpd_stats_feed
void mpd_stats_feed(struct mpd_stats *status, const struct mpd_pair *pair)