systemvolume

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package systemvolume implements the KDE Connect System Volume plugin. It allows the phone to query and control the PC's audio volume.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SinkInfo

type SinkInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Volume      int    `json:"volume"`
	Muted       bool   `json:"muted"`
	MaxVolume   int    `json:"maxVolume"`
}

type SystemVolumePlugin

type SystemVolumePlugin struct {
	// contains filtered or unexported fields
}

SystemVolumePlugin handles volume control packets from the phone.

func NewSystemVolumePlugin

func NewSystemVolumePlugin(logger *zap.Logger) *SystemVolumePlugin

func (*SystemVolumePlugin) Handle

func (p *SystemVolumePlugin) Handle(ctx context.Context, dev device.Sender, pkt *protocol.Packet) error

func (*SystemVolumePlugin) IncomingTypes

func (p *SystemVolumePlugin) IncomingTypes() []string

func (*SystemVolumePlugin) Name

func (p *SystemVolumePlugin) Name() string

func (*SystemVolumePlugin) OnConnect

func (p *SystemVolumePlugin) OnConnect(dev device.Sender)

func (*SystemVolumePlugin) OnDisconnect

func (p *SystemVolumePlugin) OnDisconnect(dev device.Sender)

func (*SystemVolumePlugin) OutgoingTypes

func (p *SystemVolumePlugin) OutgoingTypes() []string

func (*SystemVolumePlugin) Timeout

func (p *SystemVolumePlugin) Timeout() time.Duration

type VolumeBody

type VolumeBody struct {
	RequestSinks bool   `json:"requestSinks,omitempty"`
	Name         string `json:"name,omitempty"`
	Volume       int    `json:"volume,omitempty"`
	Muted        bool   `json:"muted,omitempty"`
	MaxVolume    int    `json:"maxVolume,omitempty"`
}

Jump to

Keyboard shortcuts

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