pair

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PairingTimeout is how long we wait for a pairing response
	PairingTimeout = 30 * time.Second
	// AllowedTimestampDiff is the maximum allowed time difference for pairing timestamps (30 min)
	AllowedTimestampDiff = 1800
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PairPlugin

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

PairPlugin handles KDE Connect pairing protocol.

func NewPairPlugin

func NewPairPlugin(devices *device.Registry, localCert *x509.Certificate, autoAccept bool, onStateChanged func(), bus *events.Bus, logger *zap.Logger) *PairPlugin

NewPairPlugin creates a new pairing plugin.

func (*PairPlugin) AcceptPairing

func (p *PairPlugin) AcceptPairing(dev *device.Device) error

AcceptPairing accepts an incoming pair request.

func (*PairPlugin) Handle

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

func (*PairPlugin) IncomingTypes

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

func (*PairPlugin) Name

func (p *PairPlugin) Name() string

func (*PairPlugin) OnConnect

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

func (*PairPlugin) OnDisconnect

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

func (*PairPlugin) OutgoingTypes

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

func (*PairPlugin) RejectPairing

func (p *PairPlugin) RejectPairing(dev *device.Device) error

RejectPairing rejects an incoming pair request.

func (*PairPlugin) RequestPairing

func (p *PairPlugin) RequestPairing(dev *device.Device) error

RequestPairing initiates a pairing request to a device.

func (*PairPlugin) Timeout

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

func (*PairPlugin) Unpair

func (p *PairPlugin) Unpair(dev *device.Device) error

Unpair removes pairing with a device.

Jump to

Keyboard shortcuts

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