subsonic-tui/vendor/github.com/quarckster/go-mpris-server/pkg/events/common.go
Sagi Dayan a3923cf42c initial commit
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
2024-03-29 17:56:39 +03:00

23 lines
604 B
Go

package events
import (
"errors"
"github.com/quarckster/go-mpris-server/pkg/server"
"github.com/quarckster/go-mpris-server/pkg/types"
)
var (
errNoConnection = errors.New("no dbus connection")
)
func NewEventHandler(mpris *server.Server) *EventHandler {
rootEventHandler := newOrgMprisMediaPlayer2EventHandler(mpris)
playerEventHandler := newOrgMprisMediaPlayer2PlayerEventHandler(mpris)
return &EventHandler{Root: rootEventHandler, Player: playerEventHandler}
}
type EventHandler struct {
Root types.OrgMprisMediaPlayer2EventHandler
Player types.OrgMprisMediaPlayer2PlayerEventHandler
}