Jerome Quelin > POE-Component-Client-MPD-0.9.0 > POE::Component::Client::MPD

Download:
POE-Component-Client-MPD-0.9.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.9.0   Source   Latest Release: POE-Component-Client-MPD-0.9.6

NAME ^

POE::Component::Client::MPD - a full-blown mpd client library

SYNOPSIS ^

    use POE qw{ Component::Client::MPD };
    POE::Component::Client::MPD->spawn( {
        host     => 'localhost',
        port     => 6600,
        password => 's3kr3t',  # mpd password
        alias    => 'mpd',     # poe alias
    } );

    # ... later on ...
    $_[KERNEL]->post( 'mpd', 'next' );

DESCRIPTION ^

POCOCM gives a clear message-passing interface (sitting on top of POE) for talking to and controlling MPD (Music Player Daemon) servers. A connection to the MPD server is established as soon as a new POCOCM object is created.

Commands are then sent to the server as messages are passed.

PUBLIC PACKAGE METHODS ^

my $id = POCOCM->spawn( \%params )

This method will create a POE session responsible for communicating with mpd. It will return the poe id of the session newly created.

You can tune the pococm by passing some arguments as a hash reference, where the hash keys are:

PUBLIC EVENTS ACCEPTED ^

POCOCM accepts two types of events: some are used to drive the mpd server, others will change the pococm status.

MPD-related events

The goal of a POCOCM session is to drive a remote MPD server. This can be achieved by a lot of events. Due to their sheer number, they have been regrouped logically in modules.

However, note that to use those events, you need to send them to the POCOCM session that you created with spawn() (see above). Indeed, the logical split is only internal: you are to use the same peer.

For a list of public events that update and/or query MPD, see embedded pod in:

POCOCM-related events

Those events allow to drive the POCOCM session.

PUBLIC EVENTS FIRED ^

A POCOCM session will fire events, either to answer an incoming event, or to inform about some changes regarding the remote MPD server.

Answer events

For each incoming event received by the POCOCM session, it will fire back one of the following answers:

Auto-generated events

To be written.

BUGS ^

Please report any bugs or feature requests to bug-poe-component-client-mpd at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-Client-MPD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SEE ALSO ^

You can find more information on the mpd project on its homepage at http://www.musicpd.org, or its wiki http://mpd.wikia.com.

POE::Component::Client::MPD development takes place on <audio-mpd at googlegroups.com>: feel free to join us. (use http://groups.google.com/group/audio-mpd to sign in). Our git repository is located at git://repo.or.cz/poe-component-client-mpd.git, and can be browsed at http://repo.or.cz/w/poe-component-client-mpd.git.

You can also look for information on this module at:

AUTHOR ^

Jerome Quelin, <jquelin@cpan.org>

COPYRIGHT & LICENSE ^

Copyright (c) 2007-2008 Jerome Quelin, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.