|
| Network.MPD.Core | | Stability | alpha | | Maintainer | Joachim Fasting <joachim.fasting@gmail.com> |
|
|
|
|
|
| Description |
| The core datatypes and operations are defined here, including the
primary instance of the MonadMPD class, MPD.
|
|
| Synopsis |
|
|
|
|
| Classes
|
|
|
| A typeclass to allow for multiple implementations of a connection
to an MPD server.
| | | Methods | | | Open (or re-open) a connection to the MPD server.
| | | | Close the connection.
| | | | Send a string to the server and return its response.
| | | | Produce a password to send to the server should it ask for
one.
|
| | Instances | |
|
|
| Data types
|
|
|
The main implementation of an MPD client. It actually connects
to a server and interacts with it.
To use the error throwing/catching capabilities:
import Control.Monad.Error (throwError, catchError)
To run IO actions within the MPD monad:
import Control.Monad.Trans (liftIO)
| Instances | |
|
|
|
| The MPDError type is used to signal errors, both from the MPD and
otherwise.
| | Constructors | | NoMPD | MPD not responding
| | TimedOut | The connection timed out
| | Unexpected String | MPD returned an unexpected response.
This is a bug, either in the library or
in MPD itself.
| | Custom String | Used for misc. errors
| | ACK ACKType String | ACK type and a message from the
server
|
| Instances | |
|
|
|
| Represents various MPD errors (aka. ACKs).
| | Constructors | | InvalidArgument | Invalid argument passed (ACK 2)
| | InvalidPassword | Invalid password supplied (ACK 3)
| | Auth | Authentication required (ACK 4)
| | UnknownCommand | Unknown command (ACK 5)
| | FileNotFound | File or directory not found ACK 50)
| | PlaylistMax | Playlist at maximum size (ACK 51)
| | System | A system error (ACK 52)
| | PlaylistLoad | Playlist loading failed (ACK 53)
| | Busy | Update already running (ACK 54)
| | NotPlaying | An operation requiring playback
got interrupted (ACK 55)
| | FileExists | File already exists (ACK 56)
| | UnknownACK | An unknown ACK (aka. bug)
|
| Instances | |
|
|
|
| A response is either an MPDError or some result.
|
|
|
|
|
|
|
|
| Running
|
|
|
| The most configurable API for running an MPD action.
|
|
| Interacting
|
|
|
| Send a command to the MPD server and return the result.
|
|
|
| Kill the server. Obviously, the connection is then invalid.
|
|
| Produced by Haddock version 2.6.1 |