mpd

package
v0.0.0-...-14371b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2013 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ack

type Ack int
const (
	ACK_ERROR_NOT_LIST   Ack = 1
	ACK_ERROR_ARG        Ack = 2
	ACK_ERROR_PASSWORD   Ack = 3
	ACK_ERROR_PERMISSION Ack = 4
	ACK_ERROR_UNKNOWN    Ack = 5

	ACK_ERROR_NO_EXIST       Ack = 50
	ACK_ERROR_PLAYLIST_MAX   Ack = 51
	ACK_ERROR_SYSTEM         Ack = 52
	ACK_ERROR_PLAYLIST_LOAD  Ack = 53
	ACK_ERROR_UPDATE_ALREADY Ack = 54
	ACK_ERROR_PLAYER_SYNC    Ack = 55
	ACK_ERROR_EXIST          Ack = 56
)

type AckError

type AckError struct {
	// contains filtered or unexported fields
}

AckError represents an error returned by MPD.

func (*AckError) CurrentCommand

func (err *AckError) CurrentCommand() string

func (*AckError) Error

func (err *AckError) Error() string

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

Conn represents a connection to the MPD server.

func Connect

func Connect(addr string) (conn *Conn, err error)

Connect() connects to a running MPD instance.

func (*Conn) Close

func (conn *Conn) Close() error

func (*Conn) Ping

func (conn *Conn) Ping() error

func (*Conn) Send

func (conn *Conn) Send(cmd string) (*list.List, error)

Send() is a low-level function for sending a raw command to the MPD server. It should not end in a newline. This method should only be used if none of the other methods will do what you want.

func (*Conn) SendList

func (conn *Conn) SendList(cmds []string) (*list.List, error)

SendList() is like Send(), but sends all of the commands at once between command_list_begin and command_list_end.

func (*Conn) SetConsume

func (conn *Conn) SetConsume(consume bool) error

func (*Conn) SetCrossfade

func (conn *Conn) SetCrossfade(seconds int64) error

TODO: support floats?

func (*Conn) SetRandom

func (conn *Conn) SetRandom(random bool) error

func (*Conn) SetRepeat

func (conn *Conn) SetRepeat(repeat bool) error

func (*Conn) SetReplayGainMode

func (conn *Conn) SetReplayGainMode(mode ReplayGainMode) error

func (*Conn) SetSingle

func (conn *Conn) SetSingle(single bool) error

func (*Conn) SetVolume

func (conn *Conn) SetVolume(vol int64) error

func (*Conn) Version

func (conn *Conn) Version() string

Version() returns the version of the protocol that was returned when the connection was initially made.

type ReplayGainMode

type ReplayGainMode int
const (
	ReplayGainOff ReplayGainMode = iota
	ReplayGainTrack
	ReplayGainAlbum
	ReplayGainAuto
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL