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/service.go

40 lines
762 B
Go
Raw Permalink Normal View History

2015-04-09 03:44:22 +02:00
/*
* MumbleDJ
* By Matthieu Grieger
* service.go
2015-04-09 03:44:22 +02:00
* Copyright (c) 2014, 2015 Matthieu Grieger (MIT License)
*/
package main
2015-04-09 03:44:22 +02:00
2015-04-09 22:20:40 +02:00
// Song interface. Each service will implement these
2015-04-09 03:44:22 +02:00
// functions in their Song types.
2015-04-09 03:47:39 +02:00
type Song interface {
Download() error
2015-04-09 03:47:39 +02:00
Play()
Delete() error
AddSkip(string) error
RemoveSkip(string) error
SkipReached(int) bool
Submitter() string
Title() string
ID() string
Filename() string
Duration() string
Thumbnail() string
Playlist() Playlist
DontSkip() bool
SetDontSkip(bool)
2015-04-09 03:47:39 +02:00
}
2015-04-09 03:44:22 +02:00
2015-04-09 22:20:40 +02:00
// Playlist interface. Each service will implement these
2015-04-09 03:44:22 +02:00
// functions in their Playlist types.
2015-04-09 03:47:39 +02:00
type Playlist interface {
AddSkip(string) error
RemoveSkip(string) error
2015-04-09 03:47:39 +02:00
DeleteSkippers()
SkipReached(int) bool
ID() string
Title() string
2015-04-09 03:47:39 +02:00
}