[project @ 6098]
[poe-component-client-mpd.git] / DESIGN
blob8ab0e8f0d35ae06b227ba9aeb79ee1a8635a9e2d
1 Poe::Component::Client::MPD is a poe component to interact with mpd (Music
2 Player Daemon) servers.
4 it can be created with the following:
5     POE::Component::Client::MPD->spawn;
8 upon creation, it will spawn two things:
9  - a poe::session that will act as a dispatcher for your client
10  - a private poe::component::client::tcp that will handle the communication
11    with the mpd server
13 you aren't allowed, under any circumstance, to try to communicate with the
14 private component.
17 The poe session is acting as a dispatcher. it will receive all the messages
18 and will reroute them to:
19  - either a pococ-mpd-collection object,
20  - or a pococ-mpd-playlist object
24 regarding naming scheme:
25  - since there's no public subs / methods to be called, all subs will begin
26    with an underscore ('_'). this will have the added benefit that tests for
27    pod coverage will be happy. ;)
28  - events that are internal to pococ-mpd (ie, sent from within the same poco)
29    are referred to as private.
30         event:   _<event_name>
31         hanlder: _onpriv_<event_name>()
32  - events that travel between pococ-mpd and pococ-tcp are refered to as
33    protected.
34         event:   _<event_name>
35         hanlder: _onprot_<event_name>()
36  - events that form the api of pococ-mpd are so-called public events.
37         even:    <event_name>
38         handler: _onpub_<event_name>()