!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Haskell 98alphabsinclai@turing.une.edu.au Haskell 98alphabsinclai@turing.une.edu.au9Container for MPD status. A percentage (0-100) 9A value that is incremented by the server every time the  playlist changes. -The number of items in the current playlist.  Current song's position in the playlist.  Current song's playlist ID.  Time elapsed/ total time. <Bitrate (in kilobytes per second) of playing song (if any). Crossfade time.  Samplerate/bits/&channels for the chosen output device  (see mpd.conf). -Job ID of currently running update (if any). Last error message (if any). Represents a single song item. Length in seconds Year  Track number/ total tracks Position in set/ total in set #Container for database statistics. !Number of artists. "Number of albums. #Number of songs. $Daemon uptime in seconds. %Total playing time. &$Total play time of all the songs in  the database. '#Last database update in UNIX time. (Represents an output device. )*Output' s ID number +Output's name as defined in the MPD  configuration file ,-!Represents the result of running count. ./#Number of songs matching the query 0"Total play time of matching songs 1*Represents the different playback states. 2345Represents a song's playlist index. 6(A playlist ID number that more robustly  identifies a song. 7,A playlist position index (starting from 0) 89  !"#$%&'()*+,-./0123456789   !"#$%&' !"#$%&'()*+,)*+,-./0./01432234576678+not Haskell 98 (uses MultiParamTypeClasses)alphabsinclai@turing.une.edu.au%94The MPD monad is basically a reader and error monad  combined. To use the error throwing/catching capabilities:   import Control.Monad.Error (To run IO actions within the MPD monad:  import Control.Monad.Trans :A response is either an H or some result. ;+Represents various MPD errors (aka. ACKs). <An unknown ACK (aka. bug) =File already exists (ACK 56) > An operation requiring playback  got interrupted (ACK 55) ? Update already running (ACK 54) @!Playlist loading failed (ACK 53) AA system error (ACK 52) B"Playlist at maximum size (ACK 51) C$File or directory not found ACK 50) DUnknown command (ACK 5) E Authentication required (ACK 4) F"Invalid password supplied (ACK 3) G Invalid argument passed (ACK 2) HBThe MPDError type is used to signal errors, both from the MPD and  otherwise. I ACK type and a message from the  server JUsed for misc. errors K%MPD returned an unexpected response. ) This is a bug, either in the library or  in MPD itself. LThe connection timed out MMPD not responding NRefresh a connection. O<Kill the server. Obviously, the connection is then invalid. PClose an MPD connection. 1Send a command to the MPD and return the result. !9:;<=>?@ABCDEFGHIJKLMNOP!9:; GFEDCBA@?>=<<=>?@ABCDEFGHMLKJIIJKLMNOP Haskell 98alphabsinclai@turing.une.edu.auQ$Run an MPD action against a server.  Host name.  Port number. #An action that supplies passwords. The action to run. QQ Haskell 98alphabsinclai@turing.une.edu.au Builds a .- instance from an assoc. list. Builds a list of )( instances from an assoc. list  Builds a   instance from an assoc. list.  Builds a  instance from an assoc. list.  Builds a  instance from an assoc. list. *Run a parser and lift the result into the 9 monad ?A helper that runs a parser on a string and, depending, on the C outcome, either returns the result of some command applied to the 2 result, or fails. Used when building structures. DA helper for running a parser returning Maybe on a pair of strings. L Returns Just if both strings where parsed successfully, Nothing otherwise. 8unportable (uses PatternGuards and TypeSynonymInstances)alphabsinclai@turing.une.edu.auqR-A query comprises a list of Match predicates S2When searching for specific items in a collection @ of songs, we need a reliable way to build predicates. Match is  one way of achieving this. J Each Match is a clause, and by putting matches together in lists, we can  compose queries. <For example, to match any song where the value of artist is "Foo" , we use:   Match Artist "Foo" KIn composite matches (queries), all clauses must be satisfied, which means G that each additional clause narrows the search. For example, to match ' any song where the value of artist is "Foo" AND the value of album is  "Bar" , we use:  ) [Match Artist "Foo", Match Album "Bar"] JBy adding additional clauses we can narrow the search even more, but this  is usually not necessary. TUAvailable metadata types/(scope modifiers, used for searching the 4 database for entries with certain metadata values. VWXYZ[\]^_`ab<Used for commands which require a path within the database. " If empty, the root path is used. c1Used for commands which require a playlist name. ) If empty, the current playlist is used. def*Groups together arguments to getResponse. BConverts a command name and a string of arguments into the string  to hand to getResponse. gTurn off an output device. hTurn on an output device. i-Retrieve information for all output devices. jUpdate the server' s database. 3 If no paths are given, all paths will be scanned. 8 Unreadable or non-existent paths are silently ignored. k%List all metadata of metadata (sic). Metadata to list l;Non-recursively list the contents of a database directory. mGList the songs (without metadata) in a database directory recursively. n Recursive l. o:Search the database for entries exactly matching a query. p5Search the database using case insensitive matching. q.Count the number of entries matching a query. rLike s, but returns a playlist id. sLike t( but returns a list of the files added. t1Add a song (or a whole directory) to a playlist. . Adds to current if no playlist is specified. I Will create a new playlist if the one specified does not already exist. uGClear a playlist. Clears current playlist if no playlist is specified. ? If the specified playlist does not exist, it will be created. vRemove a song from a playlist. 8 If no playlist is specified, current playlist is used.  Note that a playlist position (7 ) is required when operating on # playlists other than the current. wLoad an existing playlist. x!Move a song to a given position.  Note that a playlist position (7 ) is required when operating on # playlists other than the current. yDelete existing playlist. zRename an existing playlist. Original playlist New playlist name {Save the current playlist. |!Swap the positions of two songs. ? Note that the positions must be of the same type, i.e. mixing 7 and 6  will result in a no-op. }Shuffle the playlist. ~5Retrieve metadata for songs in the current playlist. 1Retrieve metadata for files in a given playlist. .Retrieve a list of files in a given playlist. DRetrieve file paths and positions of songs in the current playlist. B Note that this command is only included for completeness sake; it's < deprecated and likely to disappear at any time, please use ~  instead. ARetrieve a list of changed songs currently in the playlist since  a given playlist version. Like % but only returns positions and ids. ?Search for songs in the current playlist with strict matching. @Search case-insensitively with partial matches for songs in the  current playlist.  Get the currently playing song. Set crossfading between songs. Begin/continue playing. Pause playing. Stop playing. Play the next song. Play the previous song. Seek to some point in a song. 0 Seeks in current song if no position is given. Set random playing. Set repeating.  Set the volume (0-100 percent). 5Increase or decrease volume by a given percent, e.g.  ' volume 10'/ will increase the volume by 10 percent, while  ' volume (-10)'& will decrease it by the same amount. C Note that this command is only included for completeness sake ; it's 6 deprecated and may disappear at any time, please use  instead. +Clear the current error message in status. 'Retrieve a list of available commands. FRetrieve a list of unavailable (due to access restrictions) commands. ,Retrieve a list of available song metadata. *Retrieve a list of supported urlhandlers. 1Send password to server to authenticate session. ! Password is sent as plain text. +Check that the server is still responding. Get server statistics. Get the server' s status. Like j!, but returns the update job id.  Toggles play/pause. Plays if stopped. Add a list of songs/folders to a playlist. ' Should be more efficient than running s many times. (Delete a list of songs from a playlist. C If there is a duplicate then no further songs will be deleted, so  take care to avoid them (see  for this). ?Returns all songs and directories that match the given partial  path name. Crop playlist.  The bounds are inclusive.  If  or 67 is passed the cropping will leave your playlist alone  on that side. #Remove duplicate playlist entries. "List directories non-recursively. List files non-recursively. List all playlists. 5Search the database for songs relating to an artist. 4Search the database for songs relating to an album. 8Search the database for songs relating to a song title. "List the artists in the database. =List the albums in the database, optionally matching a given  artist. +List the songs in an album of some artist. :Search the database for songs relating to an artist using p. 9Search the database for songs relating to an album using p. 8Search the database for songs relating to a song title. Retrieve the current playlist.  Equivalent to playlistinfo Nothing.   !"#$%&'()*+,-./012345678NOPRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]RSTTU a`_^]\[ZYXWVVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Haskell 98alphabsinclai@turing.une.edu.auA wrapper for Q) that uses localhost:6600 as the default K host:port, or whatever is found in the environment variables MPD_HOST and & MPD_PORT. If MPD_HOST is of the form "password@host" the password  will be supplied as well.  Examples:  withMPD $ play Nothing 9 withMPD $ add_ "" "tool" >> play Nothing >> currentSong ?Create an action that produces passwords for a connection. You  can pass these to Q' and it will use them to get passwords ? to send to the server until one works or it runs out of them. 4 do gen <- mkPasswordGen ["password1", "password2"] / withMPDEx "localhost" 6600 gen (update [])   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~9HMLKJI;GFEDCBA@?>=<:QfedcbUa`_^]\[ZYXWVSTR85761432-./0()*+, !"#$%&' ghOijokmnlpqstruvwx~yz{}|PN      !"#$%%&'()*+,--./01123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVVWXYZ[\]^_`abcdeabcfghijklmnopqrstuvwxyz{|}~<S libmpd-0.3.0 Network.MPDNetwork.MPD.UtilsNetwork.MPD.TypesNetwork.MPD.CoreNetwork.MPD.SocketConnNetwork.MPD.ParseNetwork.MPD.CommandsStatusstStatestVolumestRepeatstRandomstPlaylistVersionstPlaylistLength stSongPosstSongIDstTime stBitrate stXFadeWidthstAudio stUpdatingDbstErrorSongsgArtistsgAlbumsgTitle sgFilePathsgGenresgName sgComposer sgPerformersgLengthsgDatesgTracksgDiscsgIndexStats stsArtists stsAlbumsstsSongs stsUptime stsPlaytime stsDbPlaytime stsDbUpdateDevice dOutputID dOutputNamedOutputEnabledCountcSongs cPlaytimeStatePausedStoppedPlayingPLIndexIDPosSecondsMPDResponseACKType UnknownACK FileExists NotPlayingBusy PlaylistLoadSystem PlaylistMax FileNotFoundUnknownCommandAuthInvalidPasswordInvalidArgumentMPDErrorACKCustom UnexpectedTimedOutNoMPD reconnectkillclose withMPDExQueryMatchMetaFilenameAnyDisc PerformerComposerDateGenreNameTrackTitleAlbumArtistPath PlaylistName disableOutput enableOutputoutputsupdatelistlsInfolistAll listAllInfofindsearchcountaddIdaddadd_cleardeleteloadmovermrenamesaveswapshuffle playlistInfolistPlaylistInfo listPlaylistplaylist plChangesplChangesPosId playlistFindplaylistSearch currentSong crossfadeplaypausestopnextpreviousseekrandomrepeat setVolumevolume clearErrorcommands notCommandstagTypes urlHandlerspasswordpingstatsstatusupdateIdtoggleaddMany deleteManycompletecropprunelsDirslsFiles lsPlaylists findArtist findAlbum findTitle listArtists listAlbums listAlbum searchArtist searchAlbum searchTitle getPlaylistwithMPD breakChar parseDateparseNumshowBool parseBooltoAssoc splitGroupsrunMPDConncOpencClosecSendcGetPW getResponse tryPassword parseResponseparseAcksplitAckopensendwhenEOF safeConnectTo checkConn parseCount parseOutputs parseStats parseSong parseStatus runParserparsepair EntryTypeDirEntryPLEntry SongEntryMPDArgprepArgs<++><$>lsInfo'base Data.MaybeNothingfindDuplicates getResponse_ getResponses failOnEmpty getResponse1 takeValues takeEntriesextractEntries takeSongs mkPasswordGen