Documentation ¶
Overview ¶
Package dbus implements a D-Bus interface to Audacious.
Index ¶
- func Advance(ctx context.Context) error
- func BusConnect() error
- func GetPlaylistLength(ctx context.Context) (length int32, err error)
- func GetPlaylistName(ctx context.Context) (name string, err error)
- func GetPlaylistPosition(ctx context.Context) (position uint32, err error)
- func GetRepeat(ctx context.Context) (repeat bool, err error)
- func GetShuffle(ctx context.Context) (shuffle bool, err error)
- func GetSongAlbum(ctx context.Context, entry uint32) (album string, err error)
- func GetSongArtist(ctx context.Context, entry uint32) (artist string, err error)
- func GetSongFilename(ctx context.Context, entry uint32) (filename string, err error)
- func GetSongLength(ctx context.Context, entry uint32) (length int32, err error)
- func GetSongName(ctx context.Context, entry uint32) (title string, err error)
- func GetSongTitle(ctx context.Context, entry uint32) (title string, err error)
- func GetSongYear(ctx context.Context, entry uint32) (year int32, err error)
- func GetVolume(ctx context.Context) (volume int32, err error)
- func IsUnknownServiceError(err error) bool
- func Play(ctx context.Context) error
- func PlayPause(ctx context.Context) error
- func PlaylistJump(ctx context.Context, pos uint32) error
- func Reverse(ctx context.Context) error
- func SetVolume(ctx context.Context, volume int32) error
- func Stop(ctx context.Context) error
- func ToggleRepeat(ctx context.Context) error
- func ToggleShuffle(ctx context.Context) error
- func WaitForAudacious() (waitStarted func(), isRunning func() bool, err error)
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BusConnect ¶
func BusConnect() error
BusConnect starts the dbus connection, it should only be called once.
func GetPlaylistLength ¶
GetPlaylistLength returns the number of songs in the active playlist.
func GetPlaylistName ¶
GetPlaylistName returns the name of the active playlist.
func GetPlaylistPosition ¶
GetPlaylistPosition returns the currently selected song in the active playlist.
func GetShuffle ¶
GetShuffle toggles the value of the shuffle button.
func GetSongAlbum ¶
GetSongAlbum returns the album of the given song in the active playlist.
func GetSongArtist ¶
GetSongArtist returns the artist of the given song in the active playlist.
func GetSongFilename ¶
GetSongFilename returns the filename of the given song in the active playlist.
func GetSongLength ¶
GetSongLength returns the length, in seconds, of the given song in the active playlist.
func GetSongName ¶
GetSongName returns the unformatted title of the given song in the active playlist.
func GetSongTitle ¶
GetSongTitle returns the formatted title of the given song in the active playlist.
func GetSongYear ¶
GetSongYear returns the year of the given song in the active playlist.
func IsUnknownServiceError ¶
IsUnknownServiceError returns true if the error represents an org.freedesktop.DBus.Error.ServiceUnknown error. An error of this type will be returned if Audacious is closed.
func PlayPause ¶
PlayPause either starts playback of the currently selected song or pauses playback of the currently playing song.
func PlaylistJump ¶
PlaylistJump switches the currently selected song in the active playlist.
func ToggleRepeat ¶
ToggleRepeat toggles the value of the repeat button.
func ToggleShuffle ¶
ToggleShuffle toggles the value of the shuffle button.
func WaitForAudacious ¶
WaitForAudacious monitors the running state of Audacious. It returns two funcs, the first of which waits until Audacious has started, and the second of which can be used to query it's running state.
Neither func will ever be nil, even in the case of err being non-nil.