Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

poe::component::client::mpd::connection(3pm) [debian man page]

POE::Component::Client::MPD::Connection(3pm)		User Contributed Perl Documentation	      POE::Component::Client::MPD::Connection(3pm)

NAME
POE::Component::Client::MPD::Connection - module handling the tcp connection with mpd VERSION
version 1.121670 DESCRIPTION
This module will spawn a poe session responsible for low-level communication with mpd. It is written as a POE::Component::Client::TCP, which is taking care of everything needed. Note that you're not supposed to use this class directly: it's one of the helper class for POE::Component::Client::MPD. ATTRIBUTES
host The hostname of the mpd server. Mandatory, no default. port The port of the mpd server. Mandatory, no default. id The POE session id of the peer to dialog with. Mandatory, no default. max_retries How much time to attempt reconnection before giving up. Defaults to 5. retry_wait How much time to wait (in seconds) before attempting socket reconnection. Defaults to 2. METHODS
my $id = POE::Component::Client::MPD::Connection->spawn( \%params ); This method will create a POE::Component::Client::TCP session responsible for low-level communication with mpd. It will return the poe id of the session newly created. PUBLIC EVENTS ACCEPTED
disconnect( ) Request the pococm-connection to be shutdown. This does not shut down the MPD server. No argument. send( $message ) Request pococm-conn to send the $message over the wires. Note that this request is a POE::Component::Client::MPD::Message object properly filled up, and that the "_commands()" attribute should not be newline terminated. PUBLIC EVENTS FIRED
The following events are fired from the spawned session. mpd_connected( $version ) Fired when the session is connected to a mpd server. This event isn't fired when the socket connection takes place, but when the session has checked that remote peer is a real mpd server. $version is the advertised mpd server version. mpd_connect_error_fatal( $errstr ) Fired when the session encounters a fatal error. This happens either when the session is connected to a server which happens to be something else than a mpd server, or if there was more than "max_retries" (see "spawn()" params) connection retries in a row. $errstr will contain the problem encountered. No retries will be done. mpd_connect_error_retriable( $errstr ) Fired when the session has troubles connecting to the server. $errstr will point the faulty syscall that failed. Re-connection will be tried after $retry_wait seconds (see "spawn()" params). mpd_data( $msg ) Fired when $msg has been sent over the wires, and mpd server has answered with success. The actual output should be looked up in "$msg-"_data>. mpd_disconnected( ) Fired when the socket has been disconnected for whatever reason. Note that this event is not fired in the case of a programmed shutdown (see "disconnect()" event above). A reconnection will be automatically re-tried after $retry_wait (see "spawn()" params). mpd_error( $msg, $errstr ) Fired when $msg has been sent over the wires, and mpd server has answered with the error message $errstr. AUTHOR
Jerome Quelin 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. perl v5.14.2 2012-06-15 POE::Component::Client::MPD::Connection(3pm)

Check Out this Related Man Page

POE::Component::Client::MPD::Collection(3pm)		User Contributed Perl Documentation	      POE::Component::Client::MPD::Collection(3pm)

NAME
POE::Component::Client::MPD::Collection - module handling collection commands VERSION
version 1.121670 DESCRIPTION
POE::Component::Client::MPD::Collection is responsible for handling general purpose commands. They are in a dedicated module to achieve easier code maintenance. To achieve those commands, send the corresponding event to the POE::Component::Client::MPD 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. Read POE::Component::Client::MPD's pod to learn how to deal with answers from those commands. Following is a list of collection-related events accepted by POCOCM. RETRIEVING SONGS &; DIRECTORIES coll.all_items( [$path] ) Return all Audio::MPD::Common::Items (both songs & directories) currently known by mpd. If $path is supplied (relative to mpd root), restrict the retrieval to songs and dirs in this directory. coll.all_items_simple( [$path] ) Return all Audio::MPD::Common::Items (both songs & directories) currently known by mpd. If $path is supplied (relative to mpd root), restrict the retrieval to songs and dirs in this directory. /! Warning: the Audio::MPD::Common::Item::Song objects will only have their attribute file filled. Any other attribute will be empty, so don't use this sub for any other thing than a quick scan! coll.items_in_dir( [$path] ) Return the items in the given $path. If no $path supplied, do it on mpd's root directory. Note that this sub does not work recusrively on all directories. RETRIEVING THE WHOLE COLLECTION
coll.all_albums( ) Return the list of all albums (strings) currently known by mpd. coll.all_artists( ) Return the list of all artists (strings) currently known by mpd. coll.all_titles( ) Return the list of all titles (strings) currently known by mpd. coll.all_files( ) Return a mpd_result event with the list of all filenames (strings) currently known by mpd. PICKING A SONG
coll.song( $path ) Return the Audio::MPD::Common::Item::Song which correspond to $path. coll.songs_with_filename_partial( $string ) Return the Audio::MPD::Common::Item::Songs containing $string in their path. SONGS, ALBUMS &; ARTISTS RELATIONS coll.albums_by_artist( $artist ) Return all albums (strings) performed by $artist or where $artist participated. coll.songs_by_artist( $artist ) Return all Audio::MPD::Common::Item::Songs performed by $artist. coll.songs_by_artist_partial( $artist ) Return all Audio::MPD::Common::Item::Songs performed by $artist. coll.songs_from_album( $album ) Return all Audio::MPD::Common::Item::Songs appearing in $album. coll.songs_from_album_partial( $string ) Return all Audio::MPD::Common::Item::Songs appearing in album containing $string. coll.songs_with_title( $title ) Return all Audio::MPD::Common::Item::Songs which title is exactly $title. coll.songs_with_title_partial( $string ) Return all Audio::MPD::Common::Item::Songs where $string is part of the title. AUTHOR
Jerome Quelin 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. perl v5.14.2 2012-06-15 POE::Component::Client::MPD::Collection(3pm)
Man Page