Made callback types public

pull/1/head
Wijnand Modderman-Lenstra 9 years ago
parent 6ee0b6657f
commit b88438b925

@ -84,7 +84,7 @@ func (r *RepeaterConfiguration) String() string {
return b return b
} }
type configFunc func() *RepeaterConfiguration type ConfigFunc func() *RepeaterConfiguration
// CallType reflects the DMR data frame call type. // CallType reflects the DMR data frame call type.
type CallType byte type CallType byte
@ -150,7 +150,7 @@ func ParseFrame(data []byte) (*Frame, error) {
return f, nil return f, nil
} }
type streamFunc func(*Frame) type StreamFunc func(*Frame)
type authStatus byte type authStatus byte
@ -171,8 +171,8 @@ type Network struct {
type Link struct { type Link struct {
Dump bool Dump bool
config configFunc config ConfigFunc
stream streamFunc stream StreamFunc
network *Network network *Network
conn *net.UDPConn conn *net.UDPConn
authKey []byte authKey []byte
@ -193,7 +193,7 @@ type Link struct {
} }
// New starts a new DMR repeater using the Home Brew protocol. // New starts a new DMR repeater using the Home Brew protocol.
func New(network *Network, cf configFunc, sf streamFunc) (*Link, error) { func New(network *Network, cf ConfigFunc, sf StreamFunc) (*Link, error) {
if cf == nil { if cf == nil {
return nil, errors.New("config func can't be nil") return nil, errors.New("config func can't be nil")
} }

Loading…
Cancel
Save