Documentation
¶
Index ¶
- Constants
- type PairPlugin
- func (p *PairPlugin) AcceptPairing(dev *device.Device) error
- func (p *PairPlugin) Handle(ctx context.Context, sender device.Sender, pkt *protocol.Packet) error
- func (p *PairPlugin) IncomingTypes() []string
- func (p *PairPlugin) Name() string
- func (p *PairPlugin) OnConnect(dev device.Sender)
- func (p *PairPlugin) OnDisconnect(dev device.Sender)
- func (p *PairPlugin) OutgoingTypes() []string
- func (p *PairPlugin) RejectPairing(dev *device.Device) error
- func (p *PairPlugin) RequestPairing(dev *device.Device) error
- func (p *PairPlugin) Timeout() time.Duration
- func (p *PairPlugin) Unpair(dev *device.Device) error
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) 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
Click to show internal directories.
Click to hide internal directories.