ap

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: GPL-3.0 Imports: 27 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAccesspointClosed = errors.New("accesspoint closed")

Functions

This section is empty.

Types

type Accesspoint

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

func NewAccesspoint

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

func (*Accesspoint) Close

func (ap *Accesspoint) Close()

func (*Accesspoint) Connect

func (ap *Accesspoint) Connect(ctx context.Context, creds *pb.LoginCredentials) error

func (*Accesspoint) ConnectBlob

func (ap *Accesspoint) ConnectBlob(ctx context.Context, username string, encryptedBlob64 []byte) error

func (*Accesspoint) ConnectSpotifyToken

func (ap *Accesspoint) ConnectSpotifyToken(ctx context.Context, username, token string) error

func (*Accesspoint) ConnectStored

func (ap *Accesspoint) ConnectStored(ctx context.Context, username string, data []byte) error

func (*Accesspoint) Done added in v0.7.2

func (ap *Accesspoint) Done() <-chan struct{}

func (*Accesspoint) Receive

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

func (*Accesspoint) Send

func (ap *Accesspoint) Send(ctx context.Context, pktType PacketType, payload []byte) error

func (*Accesspoint) StoredCredentials

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

func (*Accesspoint) Username

func (ap *Accesspoint) Username() string

type AccesspointLoginError added in v0.2.0

type AccesspointLoginError struct {
	Message *pb.APLoginFailed
}

func (*AccesspointLoginError) Error added in v0.2.0

func (e *AccesspointLoginError) Error() 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