Documentation
¶
Overview ¶
Package api provides data model interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // Db returns the PMS database. Db() *db.Instance // Library returns the current MPD library, or nil if it has not been retrieved yet. Library() *songlist.Library // ListChanged notifies the UI that the current songlist has changed. ListChanged() // OptionChanged notifies that an option has been changed. OptionChanged(string) // Message sends a message to the user through the statusbar. Message(string, ...interface{}) // MpdClient returns the current MPD client, which is confirmed to be alive. If the MPD connection is not working, nil is returned. MpdClient() *mpd.Client // Multibar returns the Multibar widget. Multibar() MultibarWidget // Options returns PMS' global options. Options() *options.Options // PlayerStatus returns the current MPD player status. PlayerStatus() pms_mpd.PlayerStatus // Queue returns MPD's song queue. Queue() *songlist.Queue // Quit shuts down PMS. Quit() // Sequencer returns a pointer to the key sequencer that receives key events. Sequencer() *keys.Sequencer // Song returns the currently playing song, or nil if no song is loaded. // Note that the song might be stopped, and the play/pause/stop status should // be checked using PlayerStatus(). Song() *song.Song // Songlist returns the visible songlist. Songlist() songlist.Songlist // SonglistWidget returns the songlist widget. SonglistWidget() SonglistWidget // Styles returns the current stylesheet. Styles() style.Stylesheet // UI returns the global UI object. UI() UI }
API defines a set of commands that should be available to commands run through the command-line interface.
func BaseAPI ¶
func BaseAPI( db func() *db.Instance, eventList chan int, eventMessage chan message.Message, eventOption chan string, library func() *songlist.Library, mpdClient func() *mpd.Client, multibar func() MultibarWidget, options *options.Options, playerStatus func() pms_mpd.PlayerStatus, queue func() *songlist.Queue, quitSignal chan int, sequencer *keys.Sequencer, song func() *song.Song, songlistWidget func() SonglistWidget, styles style.Stylesheet, ui func() UI, ) API
func NewTestAPI ¶
func NewTestAPI() API
type Collection ¶
type MultibarWidget ¶
type SonglistWidget ¶
Click to show internal directories.
Click to hide internal directories.