1#
2# This file is part of Audio-MPD-Common
3#
4# This software is copyright (c) 2007 by Jerome Quelin.
5#
6# This is free software; you can redistribute it and/or modify it under
7# the same terms as the Perl 5 programming language system itself.
8#
9use 5.008;
10use strict;
11use warnings;
12
13package Audio::MPD::Common::Stats;
14# ABSTRACT: class representing MPD stats
15$Audio::MPD::Common::Stats::VERSION = '2.003';
16use Moose;
17use MooseX::Has::Sugar;
18use MooseX::Types::Moose qw{ Int };
19
20
21# -- public attributes
22
23
24has artists     => ( ro, isa=>Int, required );
25has albums      => ( ro, isa=>Int, required );
26has songs       => ( ro, isa=>Int, required );
27has uptime      => ( ro, isa=>Int, required );
28has playtime    => ( ro, isa=>Int, required );
29has db_playtime => ( ro, isa=>Int, required );
30has db_update   => ( ro, isa=>Int, required );
31
32
331;
34
35__END__
36
37=pod
38
39=encoding UTF-8
40
41=head1 NAME
42
43Audio::MPD::Common::Stats - class representing MPD stats
44
45=head1 VERSION
46
47version 2.003
48
49=head1 DESCRIPTION
50
51The MPD server maintains some general information. Those information can
52be queried with the mpd modules. Some of those information are served to
53you as an L<Audio::MPD::Common::Stats> object.
54
55An L<Audio::MPD::Common::Stats> object does B<not> update itself
56regularly, and thus should be used immediately.
57
58Note: one should B<never> ever instantiate an L<Audio::MPD::Common::Stats>
59object directly - use the mpd modules instead.
60
61=head1 ATTRIBUTES
62
63=head2 $stats->artists;
64
65Number of artists in the music database.
66
67=head2 $stats->albums;
68
69Number of albums in the music database.
70
71=head2 $stats->songs;
72
73Number of songs in the music database.
74
75=head2 $stats->uptime;
76
77Daemon uptime (time since last startup) in seconds.
78
79=head2 $stats->playtime;
80
81Time length of music played.
82
83=head2 $stats->db_playtime;
84
85Sum of all song times in the music database.
86
87=head2 $stats->db_update;
88
89Last database update in UNIX time.
90
91=head1 AUTHOR
92
93Jerome Quelin
94
95=head1 COPYRIGHT AND LICENSE
96
97This software is copyright (c) 2007 by Jerome Quelin.
98
99This is free software; you can redistribute it and/or modify it under
100the same terms as the Perl 5 programming language system itself.
101
102=cut
103