apis

package
v0.0.0-...-f09d291 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VK_NUMLOCK            = 0x90
	KEYEVENTF_EXTENDEDKEY = 0x1
	KEYEVENTF_KEYUP       = 0x2
)
View Source
const (
	FoobarStateOffline = "offline"
	FoobarStateStopped = "stopped"
	FoobarStatePlaying = "playing"
	FoobarStatePaused  = "paused"
)
View Source
const (
	TubeRemoteStateOffline = "offline"
	TubeRemoteStateStopped = "stopped"
	TubeRemoteStatePlaying = "playing"
	TubeRemoteStatePaused  = "paused"
)

Variables

View Source
var (
	IID_IPolicyConfigVista  = ole.NewGUID("568b9108-44bf-40b4-9006-86afe5b5a620")
	CLSID_PolicyConfigVista = ole.NewGUID("294935CE-F637-4E7C-A41B-AB255460B862")
)

Functions

func FoobarAdjustVolume

func FoobarAdjustVolume(state FoobarPlayerInfo, delta float64, credentials HTTPCredentials) (newVolume float64, isMin, isMax bool, err error)

func FoobarNext

func FoobarNext(credentials HTTPCredentials) error

func FoobarSeekRelative

func FoobarSeekRelative(delta int, credentials HTTPCredentials) error

func FoobarStop

func FoobarStop(credentials HTTPCredentials) error

func FoobarTogglePause

func FoobarTogglePause(state FoobarPlayerInfo, credentials HTTPCredentials) error

func LockDesktop

func LockDesktop()

func RunTubeRemote

func RunTubeRemote(port int) <-chan TubeRemoteState

func SetNextDefaultEndpoint

func SetNextDefaultEndpoint() (err error)

func SetNumLock

func SetNumLock(enabled bool)

func SubscribeFoobarState

func SubscribeFoobarState(credentials HTTPCredentials) <-chan FoobarPlayerInfo

func SubscribeMattermostState

func SubscribeMattermostState(settings MattermostSettings) <-chan MattermostState

func SubscribeNotHubState

func SubscribeNotHubState(credentials HTTPCredentials) <-chan NotHubState

func TubeRemoteAdjustVolume

func TubeRemoteAdjustVolume(delta int)

func TubeRemoteSeek

func TubeRemoteSeek(delta int)

func TubeRemoteStop

func TubeRemoteStop()

func TubeRemoteTogglePause

func TubeRemoteTogglePause()

Types

type FoobarPlayerInfo

type FoobarPlayerInfo struct {
	State  string `json:"playbackState"`
	Volume struct {
		Min     float64 `json:"min"`
		Max     float64 `json:"max"`
		Current float64 `json:"value"`
	} `json:"volume"`
}

type HTTPCredentials

type HTTPCredentials struct {
	BaseURL  string `yaml:"url"`
	Username string
	Password string
}

type IPolicyConfigVista

type IPolicyConfigVista struct {
	ole.IUnknown
}

func (*IPolicyConfigVista) SetDefaultEndpoint

func (v *IPolicyConfigVista) SetDefaultEndpoint(deviceID string, eRole wca.ERole) (err error)

func (*IPolicyConfigVista) VTable

type IPolicyConfigVistaVtbl

type IPolicyConfigVistaVtbl struct {
	ole.IUnknownVtbl
	GetMixFormat          uintptr
	GetDeviceFormat       uintptr
	SetDeviceFormat       uintptr
	GetProcessingPeriod   uintptr
	SetProcessingPeriod   uintptr
	GetShareMode          uintptr
	SetShareMode          uintptr
	GetPropertyValue      uintptr
	SetPropertyValue      uintptr
	SetDefaultEndpoint    uintptr
	SetEndpointVisibility uintptr
}

type MattermostSettings

type MattermostSettings struct {
	ServerURL   string `yaml:"url"`
	AccessToken string `yaml:"token"`
	TeamName    string `yaml:"team"`
	ChannelName string `yaml:"channel"`
}

type MattermostState

type MattermostState struct {
	HasMessages bool
	HasMentions bool
}

type NotHubState

type NotHubState struct {
	ChanHL  bool
	ChanMsg bool
	Commit  bool
	PrivMsg bool
}

type TubeRemoteState

type TubeRemoteState struct {
	State        string
	Volume       int
	ActionFailed bool
}

func (*TubeRemoteState) Offline

func (s *TubeRemoteState) Offline() bool

func (*TubeRemoteState) Playing

func (s *TubeRemoteState) Playing() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL