/usr/share/perl5/Audio/MPD/Common/Status.pm is in libaudio-mpd-common-perl 2.003-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | #
# This file is part of Audio-MPD-Common
#
# This software is copyright (c) 2007 by Jerome Quelin.
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#
use 5.008;
use strict;
use warnings;
package Audio::MPD::Common::Status;
# ABSTRACT: class representing MPD status
$Audio::MPD::Common::Status::VERSION = '2.003';
use Moose;
use MooseX::Has::Sugar;
use MooseX::Types::Moose qw{ Bool Int Str };
use Audio::MPD::Common::Time;
use Audio::MPD::Common::Types;
# -- public attributes
has audio => ( ro, isa=>Str );
has bitrate => ( ro, isa=>Int );
has error => ( ro, isa=>Str );
has playlist => ( ro, isa=>Int );
has playlistlength => ( ro, isa=>Int );
has random => ( ro, isa=>Bool );
has repeat => ( ro, isa=>Bool );
has songid => ( ro, isa=>Int );
has song => ( ro, isa=>Int );
has state => ( ro, isa=>'State' );
has time => ( ro, isa=>'Audio::MPD::Common::Time', coerce );
has updating_db => ( ro, isa=>Int );
has volume => ( ro, isa=>Int );
has xfade => ( ro, isa=>Int, default=>0 );
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Audio::MPD::Common::Status - class representing MPD status
=head1 VERSION
version 2.003
=head1 DESCRIPTION
The MPD server maintains some information on its current state. Those
information can be queried with mpd modules. Some of those information
are served to you as an L<Audio::MPD::Common::Status> object.
An L<Audio::MPD::Common::Status> object does B<not> update itself
regularly, and thus should be used immediately.
Note: one should B<never> ever instantiate an L<Audio::MPD::Common::Status>
object directly - use the mpd modules instead.
=head1 ATTRIBUTES
=head2 $status->audio;
A string with the sample rate of the song currently playing, number of
bits of the output and number of channels (2 for stereo) - separated
by a colon.
=head2 $status->bitrate;
The instantaneous bitrate in kbps.
=head2 $status->error;
May appear in special error cases, such as when disabling output.
=head2 $status->playlist;
The playlist version number, that changes every time the playlist
is updated.
=head2 $status->playlistlength;
The number of songs in the playlist.
=head2 $status->random;
Whether the playlist is read randomly or not.
=head2 $status->repeat;
Whether the song is repeated or not.
=head2 $status->song;
The offset of the song currently played in the playlist.
=head2 $status->songid;
The song id (MPD id) of the song currently played.
=head2 $status->state;
The state of MPD server. Either C<play>, C<stop> or C<pause>.
=head2 $status->time;
An L<Audio::MPD::Common::Time> object, representing the time elapsed /
remainging and total. See the associated pod for more details.
=head2 $status->updating_db;
An integer, representing the current update job.
=head2 $status->volume;
The current MPD volume - an integer between 0 and 100.
=head2 $status->xfade;
The crossfade in seconds.
=head1 AUTHOR
Jerome Quelin
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
|