This repository has been archived on 2019-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
mumbledj/interfaces/queue.go

30 lines
639 B
Go
Raw Normal View History

2016-06-21 02:16:05 +02:00
/*
* MumbleDJ
* By Matthieu Grieger
* interfaces/queue.go
* Copyright (c) 2016 Matthieu Grieger (MIT License)
*/
package interfaces
// Queue is the interface which should be interacted with for queue operations.
// Using the Queue interface ensures thread safety.
type Queue interface {
Length() int
Reset()
AppendTrack(Track) error
InsertTrack(int, Track) error
CurrentTrack() (Track, error)
GetTrack(int) Track
PeekNextTrack() (Track, error)
Traverse(func(int, Track))
ShuffleTracks()
RandomNextTrack(bool)
Skip()
SkipPlaylist()
PlayCurrent() error
PauseCurrent() error
ResumeCurrent() error
StopCurrent() error
}