.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "POE::Component::Client::MPD::Commands 3pm" .TH POE::Component::Client::MPD::Commands 3pm "2019-01-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" POE::Component::Client::MPD::Commands \- module handling basic mpd commands .SH "VERSION" .IX Header "VERSION" version 2.001 .SH "DESCRIPTION" .IX Header "DESCRIPTION" POE::Component::Client::MPD::Commands is responsible for handling general purpose commands. They are in a dedicated module to achieve easier code maintenance. .PP To achieve those commands, send the corresponding event to the \s-1POCOCM\s0 session you created: it will be responsible for dispatching the event where it is needed. Under no circumstance should you call directly subs or methods from this module directly. .PP Read \s-1POCOCM\s0's pod to learn how to deal with answers from those commands. .PP Following is a list of general purpose events accepted by \s-1POCOCM.\s0 .SH "CONTROLLING THE SERVER" .IX Header "CONTROLLING THE SERVER" .SS "version( )" .IX Subsection "version( )" Return mpd's version number as advertised during connection. Note that mpd returns \fBprotocol\fR version when connected. This protocol version can differ from the real mpd version. eg, mpd version 0.13.2 is \*(L"speaking\*(R" and thus advertising version 0.13.0. .ie n .SS "password( $password )" .el .SS "password( \f(CW$password\fP )" .IX Subsection "password( $password )" Sends a connection password to mpd. Used internally on connect, but can be called whenever if you're feeling like it. .SS "kill( )" .IX Subsection "kill( )" Kill the mpd server, and request the pococm to be shutdown. .SS "updatedb( [$path] )" .IX Subsection "updatedb( [$path] )" Force mpd to rescan its collection. If \f(CW$path\fR (relative to \s-1MPD\s0's music directory) is supplied, \s-1MPD\s0 will only scan it \- otherwise, \s-1MPD\s0 will rescan its whole collection. .SS "urlhandlers( )" .IX Subsection "urlhandlers( )" Return an array of supported \s-1URL\s0 schemes. .SH "HANDLING VOLUME & OUTPUT" .IX Header "HANDLING VOLUME & OUTPUT" .ie n .SS "volume( $volume )" .el .SS "volume( \f(CW$volume\fP )" .IX Subsection "volume( $volume )" Sets the audio output volume percentage to absolute \f(CW$volume\fR. If \&\f(CW$volume\fR is prefixed by '+' or '\-' then the volume is changed relatively by that value. .ie n .SS "output_enable( $output )" .el .SS "output_enable( \f(CW$output\fP )" .IX Subsection "output_enable( $output )" Enable the specified audio output. \f(CW$output\fR is the \s-1ID\s0 of the audio output. .ie n .SS "output_disable( $output )" .el .SS "output_disable( \f(CW$output\fP )" .IX Subsection "output_disable( $output )" Disable the specified audio output. \f(CW$output\fR is the \s-1ID\s0 of the audio output. .SH "RETRIEVING INFO FROM CURRENT STATE" .IX Header "RETRIEVING INFO FROM CURRENT STATE" .SS "stats( )" .IX Subsection "stats( )" Return an Audio::MPD::Common::Stats object with the current statistics of \s-1MPD.\s0 .SS "status( )" .IX Subsection "status( )" Return an Audio::MPD::Common::Status object with the current status of \s-1MPD.\s0 .SS "current( )" .IX Subsection "current( )" Return an Audio::MPD::Common::Item::Song representing the song currently playing. .SS "song( [$song] )" .IX Subsection "song( [$song] )" Return an Audio::MPD::Common::Item::Song representing the song number \&\f(CW$song\fR. If \f(CW$song\fR is not supplied, returns the current song. .SS "songid( [$songid] )" .IX Subsection "songid( [$songid] )" Return an Audio::MPD::Common::Item::Song representing the song id \&\f(CW$songid\fR. If \f(CW$songid\fR is not supplied, returns the current song. .SH "ALTERING MPD SETTINGS" .IX Header "ALTERING MPD SETTINGS" .SS "repeat( [$repeat] )" .IX Subsection "repeat( [$repeat] )" Set the repeat mode to \f(CW$repeat\fR (1 or 0). If \f(CW$repeat\fR is not specified then the repeat mode is toggled. .SS "fade( [$seconds] )" .IX Subsection "fade( [$seconds] )" Enable crossfading and set the duration of crossfade between songs. If \&\f(CW$seconds\fR is not specified or \f(CW$seconds\fR is 0, then crossfading is disabled. .SS "random( [$random] )" .IX Subsection "random( [$random] )" Set the random mode to \f(CW$random\fR (1 or 0). If \f(CW$random\fR is not specified then the random mode is toggled. .SH "CONTROLLING PLAYBACK" .IX Header "CONTROLLING PLAYBACK" .SS "play( [$song] )" .IX Subsection "play( [$song] )" Begin playing playlist at song number \f(CW$song\fR. If no argument supplied, resume playing. .SS "playid( [$song] )" .IX Subsection "playid( [$song] )" Begin playing playlist at song \s-1ID\s0 \f(CW$song\fR. If no argument supplied, resume playing. .SS "pause( [$sate] )" .IX Subsection "pause( [$sate] )" Pause playback. If \f(CW$state\fR is 0 then the current track is unpaused, if \&\f(CW$state\fR is 1 then the current track is paused. .PP Note that if \f(CW$state\fR is not given, pause state will be toggled. .SS "stop( )" .IX Subsection "stop( )" Stop playback. .SS "next( )" .IX Subsection "next( )" Play next song in playlist. .SS "prev( )" .IX Subsection "prev( )" Play previous song in playlist. .ie n .SS "seek( $time, [$song] )" .el .SS "seek( \f(CW$time\fP, [$song] )" .IX Subsection "seek( $time, [$song] )" Seek to \f(CW$time\fR seconds in song number \f(CW$song\fR. If \f(CW$song\fR number is not specified then the perl module will try and seek to \f(CW$time\fR in the current song. .ie n .SS "seekid( $time, [$songid] )" .el .SS "seekid( \f(CW$time\fP, [$songid] )" .IX Subsection "seekid( $time, [$songid] )" Seek to \f(CW$time\fR seconds in song \s-1ID\s0 \f(CW$songid\fR. If \f(CW$songid\fR number is not specified then the perl module will try and seek to \f(CW$time\fR in the current song. .SH "AUTHOR" .IX Header "AUTHOR" Jerome Quelin .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2007 by Jerome Quelin. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.