mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-21 20:30:55 +00:00
docstrings added to remote
This commit is contained in:
parent
1efac19b12
commit
14264d0818
11
remote.go
11
remote.go
@ -38,10 +38,12 @@ func (r *Remote) Logout() {
|
|||||||
logout()
|
logout()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type returns the type of Voicemeeter (basic, banana, potato)
|
||||||
func (r *Remote) Type() string {
|
func (r *Remote) Type() string {
|
||||||
return getVMType()
|
return getVMType()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Version returns the version of Voicemeeter as a string
|
||||||
func (r *Remote) Version() string {
|
func (r *Remote) Version() string {
|
||||||
return getVersion()
|
return getVersion()
|
||||||
}
|
}
|
||||||
@ -56,6 +58,7 @@ func (r *Remote) Mdirty() bool {
|
|||||||
return mdirty()
|
return mdirty()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SendText sets multiple parameters by script
|
||||||
func (r *Remote) SendText(script string) {
|
func (r *Remote) SendText(script string) {
|
||||||
setParametersMulti(script)
|
setParametersMulti(script)
|
||||||
}
|
}
|
||||||
@ -65,11 +68,12 @@ func (r *Remote) Register(o observer) {
|
|||||||
r.pooler.Register(o)
|
r.pooler.Register(o)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register forwards the deregister method to Pooler
|
// Deregister forwards the deregister method to Pooler
|
||||||
func (r *Remote) Deregister(o observer) {
|
func (r *Remote) Deregister(o observer) {
|
||||||
r.pooler.Deregister(o)
|
r.pooler.Deregister(o)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remoteBuilder defines the interface builder types must satisfy
|
||||||
type remoteBuilder interface {
|
type remoteBuilder interface {
|
||||||
setKind() remoteBuilder
|
setKind() remoteBuilder
|
||||||
makeStrip() remoteBuilder
|
makeStrip() remoteBuilder
|
||||||
@ -103,11 +107,13 @@ func (d *director) Get() *Remote {
|
|||||||
return d.builder.Get()
|
return d.builder.Get()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// genericBuilder represents a generic builder type
|
||||||
type genericBuilder struct {
|
type genericBuilder struct {
|
||||||
k *kind
|
k *kind
|
||||||
r Remote
|
r Remote
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// setKind sets the kind for a builder of a kind
|
||||||
func (b *genericBuilder) setKind() remoteBuilder {
|
func (b *genericBuilder) setKind() remoteBuilder {
|
||||||
b.r.kind = b.k
|
b.r.kind = b.k
|
||||||
return b
|
return b
|
||||||
@ -189,6 +195,7 @@ func (b *genericBuilder) Get() *Remote {
|
|||||||
return &b.r
|
return &b.r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// basicBuilder represents a builder specific to basic type
|
||||||
type basicBuilder struct {
|
type basicBuilder struct {
|
||||||
genericBuilder
|
genericBuilder
|
||||||
}
|
}
|
||||||
@ -198,6 +205,7 @@ func (basb *genericBuilder) Build() remoteBuilder {
|
|||||||
return basb.setKind().makeStrip().makeBus().makeButton().makeCommand().makeVban().makeDevice()
|
return basb.setKind().makeStrip().makeBus().makeButton().makeCommand().makeVban().makeDevice()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bananaBuilder represents a builder specific to banana type
|
||||||
type bananaBuilder struct {
|
type bananaBuilder struct {
|
||||||
genericBuilder
|
genericBuilder
|
||||||
}
|
}
|
||||||
@ -207,6 +215,7 @@ func (banb *bananaBuilder) Build() remoteBuilder {
|
|||||||
return banb.setKind().makeStrip().makeBus().makeButton().makeCommand().makeVban().makeDevice().makeRecorder()
|
return banb.setKind().makeStrip().makeBus().makeButton().makeCommand().makeVban().makeDevice().makeRecorder()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// potatoBuilder represents a builder specific to potato type
|
||||||
type potatoBuilder struct {
|
type potatoBuilder struct {
|
||||||
genericBuilder
|
genericBuilder
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user