ap

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accesspoint

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

func NewAccesspoint

func NewAccesspoint(addr librespot.GetAddressFunc, deviceId string) *Accesspoint

func (*Accesspoint) Close

func (ap *Accesspoint) Close()

func (*Accesspoint) Connect

func (ap *Accesspoint) Connect(creds *pb.LoginCredentials) error

func (*Accesspoint) ConnectBlob

func (ap *Accesspoint) ConnectBlob(username string, encryptedBlob64 []byte) error

func (*Accesspoint) ConnectSpotifyToken

func (ap *Accesspoint) ConnectSpotifyToken(username, token string) error

func (*Accesspoint) ConnectStored

func (ap *Accesspoint) ConnectStored(username string, data []byte) error

func (*Accesspoint) Receive

func (ap *Accesspoint) Receive(types ...PacketType) <-chan Packet

func (*Accesspoint) Send

func (ap *Accesspoint) Send(pktType PacketType, payload []byte) error

func (*Accesspoint) StoredCredentials

func (ap *Accesspoint) StoredCredentials() []byte

func (*Accesspoint) Username

func (ap *Accesspoint) Username() string

type Packet

type Packet struct {
	Type    PacketType
	Payload []byte
}

type PacketType

type PacketType byte
const (
	PacketTypeSecretBlock     PacketType = 0x02
	PacketTypePing            PacketType = 0x04
	PacketTypeStreamChunk     PacketType = 0x08
	PacketTypeStreamChunkRes  PacketType = 0x09
	PacketTypeChannelError    PacketType = 0x0a
	PacketTypeChannelAbort    PacketType = 0x0b
	PacketTypeRequestKey      PacketType = 0x0c
	PacketTypeAesKey          PacketType = 0x0d
	PacketTypeAesKeyError     PacketType = 0x0e
	PacketTypeImage           PacketType = 0x19
	PacketTypeCountryCode     PacketType = 0x1b
	PacketTypePong            PacketType = 0x49
	PacketTypePongAck         PacketType = 0x4a
	PacketTypePause           PacketType = 0x4b
	PacketTypeProductInfo     PacketType = 0x50
	PacketTypeLegacyWelcome   PacketType = 0x69
	PacketTypeLicenseVersion  PacketType = 0x76
	PacketTypeLogin           PacketType = 0xab
	PacketTypeAPWelcome       PacketType = 0xac
	PacketTypeAuthFailure     PacketType = 0xad
	PacketTypeMercuryReq      PacketType = 0xb2
	PacketTypeMercurySub      PacketType = 0xb3
	PacketTypeMercuryUnsub    PacketType = 0xb4
	PacketTypeMercuryEvent    PacketType = 0xb5
	PacketTypeTrackEndedTime  PacketType = 0x82
	PacketTypePreferredLocale PacketType = 0x74
	PacketTypeUnknown1f       PacketType = 0x1f
	PacketTypeUnknown4f       PacketType = 0x4f
	PacketTypeUnknown0f       PacketType = 0x0f
	PacketTypeUnknown10       PacketType = 0x10
)

func (PacketType) String

func (i PacketType) String() string

Jump to

Keyboard shortcuts

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