general

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Lingos struct {
	RequestIdentify                `id:"0x00"`
	ACK                            `id:"0x02"`
	ACKPending                     `id:"0x02"`
	ACKDataDropped                 `id:"0x02"`
	RequestRemoteUIMode            `id:"0x03"`
	ReturnRemoteUIMode             `id:"0x04"`
	EnterRemoteUIMode              `id:"0x05"`
	ExitRemoteUIMode               `id:"0x06"`
	RequestiPodName                `id:"0x07"`
	ReturniPodName                 `id:"0x08"`
	RequestiPodSoftwareVersion     `id:"0x09"`
	ReturniPodSoftwareVersion      `id:"0x0A"`
	RequestiPodSerialNum           `id:"0x0B"`
	ReturniPodSerialNum            `id:"0x0C"`
	RequestiPodModelNum            `id:"0x0D"`
	ReturniPodModelNum             `id:"0x0E"`
	RequestLingoProtocolVersion    `id:"0x0F"`
	ReturnLingoProtocolVersion     `id:"0x10"`
	RequestTransportMaxPayloadSize `id:"0x11"`
	ReturnTransportMaxPayloadSize  `id:"0x12"`
	IdentifyDeviceLingoes          `id:"0x13"`
	GetDevAuthenticationInfo       `id:"0x14"`
	//RetDevAuthenticationInfoV1      `id:"0x15"`
	//RetDevAuthenticationInfoV2      `id:"0x15"`
	RetDevAuthenticationInfo        `id:"0x15"`
	AckDevAuthenticationInfo        `id:"0x16"`
	GetDevAuthenticationSignatureV1 `id:"0x17"`
	GetDevAuthenticationSignatureV2 `id:"0x17"`
	//RetDevAuthenticationSignatureV1 `id:"0x18"`
	//RetDevAuthenticationSignatureV2 `id:"0x18"`
	RetDevAuthenticationSignature  `id:"0x18"`
	AckDevAuthenticationStatus     `id:"0x19"`
	GetiPodAuthenticationInfo      `id:"0x1A"`
	RetiPodAuthenticationInfo      `id:"0x1B"`
	AckiPodAuthenticationInfo      `id:"0x1C"`
	GetiPodAuthenticationSignature `id:"0x1D"`
	RetiPodAuthenticationSignature `id:"0x1E"`
	AckiPodAuthenticationStatus    `id:"0x1F"`
	NotifyiPodStateChange          `id:"0x23"`
	GetiPodOptions                 `id:"0x24"`
	RetiPodOptions                 `id:"0x25"`
	GetAccessoryInfo               `id:"0x27"`
	RetAccessoryInfo               `id:"0x28"`
	GetiPodPreferences             `id:"0x29"`
	RetiPodPreferences             `id:"0x2A"`
	SetiPodPreferences             `id:"0x2B"`
	GetUIMode                      `id:"0x35"`
	RetUIMode                      `id:"0x36"`
	SetUIMode                      `id:"0x37"`
	StartIDPS                      `id:"0x38"`
	SetFIDTokenValues              `id:"0x39"`
	RetFIDTokenValueACKs           `id:"0x3A"`
	EndIDPS                        `id:"0x3B"`
	IDPSStatus                     `id:"0x3C"`
	OpenDataSessionForProtocol     `id:"0x3F"`
	CloseDataSession               `id:"0x40"`
	DevACK                         `id:"0x41"`
	DevDataTransfer                `id:"0x42"`
	IPodDataTransfer               `id:"0x43"`
	SetAccStatusNotification       `id:"0x46"`
	RetAccStatusNotification       `id:"0x47"`
	AccessoryStatusNotification    `id:"0x48"`
	SetEventNotification           `id:"0x49"`
	IPodNotification               `id:"0x4A"`
	GetiPodOptionsForLingo         `id:"0x4B"`
	RetiPodOptionsForLingo         `id:"0x4C"`
	GetEventNotification           `id:"0x4D"`
	RetEventNotification           `id:"0x4E"`
	GetSupportedEventNotification  `id:"0x4F"`
	CancelCommand                  `id:"0x50"`
	RetSupportedEventNotification  `id:"0x51"`
	SetAvailableCurrent            `id:"0x54"`
	RequestApplicationLaunch       `id:"0x64"`
	GetNowPlayingFocusApp          `id:"0x65"`
	RetNowPlayingFocusApp          `id:"0x66"`
}

Functions

func HandleGeneral

func HandleGeneral(req *ipod.Command, tr ipod.CommandWriter, dev DeviceGeneral) error

Types

type ACK

type ACK struct {
	Status ACKStatus
	CmdID  uint8
}

type ACKDataDropped

type ACKDataDropped struct {
	Status          ACKStatus
	CmdID           uint8
	SessionID       uint16
	NumBytesDropped uint32
}

type ACKPending

type ACKPending struct {
	Status  ACKStatus
	CmdID   uint8
	MaxWait uint32
}

type ACKStatus

type ACKStatus uint8
const (
	ACKStatusSuccess  ACKStatus = 0x00
	ACKStatusFailed   ACKStatus = 0x02
	ACKStatusUnkownID ACKStatus = 0x05
	ACKStatusPending  ACKStatus = 0x06
)

type AccCapBit

type AccCapBit uint32
const (
	AccCapAnalogLineOut AccCapBit = 1 << iota
	AccCapAnalogLineIn
	AccCapAnalogVideoOut

	AccCapUSBAudio

	AccCapAppComm

	AccCapCheckVolume
)

func (AccCapBit) String

func (i AccCapBit) String() string

type AccEndIDPSStatus

type AccEndIDPSStatus uint8
const (
	AccEndIDPSStatusContinue AccEndIDPSStatus = 0x00
	AccEndIDPSStatusReset    AccEndIDPSStatus = 0x01
	AccEndIDPSStatusAbandon  AccEndIDPSStatus = 0x02
	AccEndIDPSStatusNewLink  AccEndIDPSStatus = 0x03
)

type AccInfoType

type AccInfoType uint8
const (
	AccInfoName       AccInfoType = 0x01
	AccInfoFirmware   AccInfoType = 0x04
	AccInfoHardware   AccInfoType = 0x05
	AccInfoMfr        AccInfoType = 0x06
	AccInfoModel      AccInfoType = 0x07
	AccInfoSerial     AccInfoType = 0x08
	AccInfoMaxPayload AccInfoType = 0x09
)

func (AccInfoType) String

func (i AccInfoType) String() string

type AccessoryStatusNotification

type AccessoryStatusNotification struct {
	StatusType   byte
	StatusParams []byte
}

type AckDevAuthenticationInfo

type AckDevAuthenticationInfo struct {
	Status DevAuthInfoStatus
}

type AckDevAuthenticationStatus

type AckDevAuthenticationStatus struct {
	Status DevAuthStatus
}

type AckiPodAuthenticationInfo

type AckiPodAuthenticationInfo struct {
	Status byte
}

type AckiPodAuthenticationStatus

type AckiPodAuthenticationStatus struct {
	Status byte
}

type CancelCommand

type CancelCommand struct {
	LingoID       byte
	CmdID         uint16
	TransactionID uint16
}

type CloseDataSession

type CloseDataSession struct {
	SessionID uint16
}

type DevACK

type DevACK struct {
	AckStatus byte
	CmdID     byte
}

type DevAuthInfoStatus

type DevAuthInfoStatus uint8
const (
	DevAuthInfoStatusSupported DevAuthInfoStatus = 0x00
)

type DevAuthStatus

type DevAuthStatus uint8
const (
	DevAuthStatusPassed DevAuthStatus = 0x00
	DevAuthStatusFailed DevAuthStatus = 0x01
)

type DevDataTransfer

type DevDataTransfer struct {
	SessionID uint16
	Data      []byte
}

type DeviceGeneral

type DeviceGeneral interface {
	UIMode() UIMode
	SetUIMode(UIMode)
	Name() string
	SoftwareVersion() (major, minor, rev uint8)
	SerialNum() string

	LingoProtocolVersion(lingo uint8) (major, minor uint8)
	LingoOptions(ling uint8) uint64

	PrefSettingID(classID uint8) uint8
	SetPrefSettingID(classID, settingID uint8, restoreOnExit bool)

	StartIDPS()
	EndIDPS(status AccEndIDPSStatus)
	SetToken(token FIDTokenValue) error
	AccAuthCert(cert []byte)

	SetEventNotificationMask(mask uint64)
	EventNotificationMask() uint64
	SupportedEventNotificationMask() uint64

	CancelCommand(lingo uint8, cmd uint16, transaction uint16)

	MaxPayload() uint16
}

type EndIDPS

type EndIDPS struct {
	AccEndIDPSStatus AccEndIDPSStatus
}

type EnterRemoteUIMode

type EnterRemoteUIMode struct{}

type ExitRemoteUIMode

type ExitRemoteUIMode struct{}

type FIDAccCapsToken

type FIDAccCapsToken struct {
	AccCapsBitmask uint64
}

func (*FIDAccCapsToken) UnmarshalBinary

func (t *FIDAccCapsToken) UnmarshalBinary(data []byte) error

type FIDAccInfoToken

type FIDAccInfoToken struct {
	AccInfoType byte
	Value       interface{}
}

func (*FIDAccInfoToken) UnmarshalBinary

func (t *FIDAccInfoToken) UnmarshalBinary(data []byte) error

type FIDBundleSeedIDPrefToken

type FIDBundleSeedIDPrefToken struct {
	BundleSeedIDString [11]byte
}

type FIDEAProtocolMetadataToken

type FIDEAProtocolMetadataToken struct {
	ProtocolIndex byte
	MetadataType  byte
}

type FIDEAProtocolToken

type FIDEAProtocolToken struct {
	ProtocolIndex  byte
	ProtocolString []byte
}

func (*FIDEAProtocolToken) UnmarshalBinary

func (t *FIDEAProtocolToken) UnmarshalBinary(data []byte) error

type FIDIdentifyToken

type FIDIdentifyToken struct {
	AccLingoes    []uint8
	DeviceOptions uint32
	DeviceID      uint32
}

func (*FIDIdentifyToken) MarshalBinary

func (t *FIDIdentifyToken) MarshalBinary() ([]byte, error)

func (*FIDIdentifyToken) UnmarshalBinary

func (t *FIDIdentifyToken) UnmarshalBinary(data []byte) error

type FIDMicrophoneCapsToken

type FIDMicrophoneCapsToken struct {
	MicCapsBitmask uint32
}

type FIDScreenInfoToken

type FIDScreenInfoToken struct {
	ScreenWidthInches  uint16
	ScreenHeightInches uint16
	ScreenWidthPixels  uint16
	ScreenHeightPixels uint16

	IpodScreenWidthPixels  uint16
	IpodScreenHeightPixels uint16

	ScreenFeaturesMask byte
	ScreenGammaValue   byte
}

type FIDTokenValue

type FIDTokenValue struct {
	ID    TokenID
	Token interface{}
}

func (*FIDTokenValue) MarshalBinary

func (v *FIDTokenValue) MarshalBinary() ([]byte, error)

func (*FIDTokenValue) UnmarshalBinary

func (v *FIDTokenValue) UnmarshalBinary(data []byte) error

type FIDTokenValueACK

type FIDTokenValueACK struct {
	ID  TokenID
	ACK interface{}
}

func (*FIDTokenValueACK) MarshalBinary

func (v *FIDTokenValueACK) MarshalBinary() ([]byte, error)

func (*FIDTokenValueACK) UnmarshalBinary

func (v *FIDTokenValueACK) UnmarshalBinary(data []byte) error

type FIDiPodPreferenceToken

type FIDiPodPreferenceToken struct {
	PrefClass        byte
	PrefClassSetting byte
	RestoreOnExit    byte
}

type GetAccessoryInfo

type GetAccessoryInfo struct {
	InfoType byte
}

type GetAccessoryInfo2

type GetAccessoryInfo2 struct {
	InfoType byte
	ModelID  uint32
	Major    byte
	Minor    byte
	Rev      byte
}

type GetAccessoryInfo3

type GetAccessoryInfo3 struct {
	InfoType byte
	LingoID  byte
}

type GetDevAuthenticationInfo

type GetDevAuthenticationInfo struct{}

type GetDevAuthenticationSignatureV1

type GetDevAuthenticationSignatureV1 struct {
	Challenge [16]byte
	Counter   byte
}

type GetDevAuthenticationSignatureV2

type GetDevAuthenticationSignatureV2 struct {
	Challenge [20]byte
	Counter   byte
}

type GetEventNotification

type GetEventNotification struct{}

type GetNowPlayingFocusApp

type GetNowPlayingFocusApp struct{}

type GetSupportedEventNotification

type GetSupportedEventNotification struct{}

type GetUIMode

type GetUIMode struct{}

type GetiPodAuthenticationInfo

type GetiPodAuthenticationInfo struct{}

type GetiPodAuthenticationSignature

type GetiPodAuthenticationSignature struct {
	Challenge [20]byte
	Counter   byte
}

type GetiPodOptions

type GetiPodOptions struct{}

type GetiPodOptionsForLingo

type GetiPodOptionsForLingo struct {
	LingoID byte
}

type GetiPodPreferences

type GetiPodPreferences struct {
	PrefClassID byte
}

type IDPSStatus

type IDPSStatus struct {
	Status IDPSStatusEnum
}

type IDPSStatusEnum

type IDPSStatusEnum uint8
const (
	IDPSStatusOK                   IDPSStatusEnum = 0x00
	IDPSStatusTimeLimitNotExceeded IDPSStatusEnum = 0x04
	IDPSStatusWillNotAccept        IDPSStatusEnum = 0x06
)

type IPodDataTransfer

type IPodDataTransfer struct {
	SessionID uint16
	Data      []byte
}

type IPodNotification

type IPodNotification struct {
	NotificationType byte
	Data             []byte
}

type IdentifyDeviceLingoes

type IdentifyDeviceLingoes struct {
	Lingos   LingoMask
	Options  uint32
	DeviceID uint32
}

type LingoBit

type LingoBit uint32
const (
	LingoGeneralBit       LingoBit = 1 << ipod.LingoGeneralID
	LingoSimpleRemoteBit  LingoBit = 1 << ipod.LingoSimpleRemoteID
	LingoDisplayRemoteBit LingoBit = 1 << ipod.LingoDisplayRemoteID
	LingoExtRemoteBit     LingoBit = 1 << ipod.LingoExtRemoteID
	LingoUSBHostBit       LingoBit = 1 << ipod.LingoUSBHostID
	LingoRFTunerBit       LingoBit = 1 << ipod.LingoRFTunerID
	LingoEqBit            LingoBit = 1 << ipod.LingoEqID
	LingoSportsBit        LingoBit = 1 << ipod.LingoSportsID
	LingoDigitalAudioBit  LingoBit = 1 << ipod.LingoDigitalAudioID
	LingoStorageBit       LingoBit = 1 << ipod.LingoStorageID
)

func (LingoBit) String

func (i LingoBit) String() string

type LingoMask

type LingoMask uint32

func (*LingoMask) String

func (m *LingoMask) String() string

type NotifyiPodStateChange

type NotifyiPodStateChange struct {
	StateChange byte
}

type OpenDataSessionForProtocol

type OpenDataSessionForProtocol struct {
	SessionID     uint16
	ProtocolIndex byte
}

type RequestApplicationLaunch

type RequestApplicationLaunch struct {
	Reserved0 byte
	Reserved1 byte
	Reserved2 byte
	AppID     []byte
}

func (*RequestApplicationLaunch) UnmarshalBinary

func (s *RequestApplicationLaunch) UnmarshalBinary(data []byte) error

type RequestIdentify

type RequestIdentify struct{}

type RequestLingoProtocolVersion

type RequestLingoProtocolVersion struct {
	Lingo byte
}

type RequestRemoteUIMode

type RequestRemoteUIMode struct{}

type RequestTransportMaxPayloadSize

type RequestTransportMaxPayloadSize struct{}

type RequestiPodModelNum

type RequestiPodModelNum struct {
}

type RequestiPodName

type RequestiPodName struct{}

type RequestiPodSerialNum

type RequestiPodSerialNum struct {
}

type RequestiPodSoftwareVersion

type RequestiPodSoftwareVersion struct{}

type RetAccStatusNotification

type RetAccStatusNotification struct {
	StatusMask uint32
}

type RetAccessoryInfo

type RetAccessoryInfo struct {
	InfoType byte
	Data     []byte
}

type RetDevAuthenticationInfo

type RetDevAuthenticationInfo struct {
	Major              byte
	Minor              byte
	CertCurrentSection byte
	CertMaxSection     byte
	CertData           []byte
}

func (*RetDevAuthenticationInfo) UnmarshalBinary

func (s *RetDevAuthenticationInfo) UnmarshalBinary(r []byte) error

type RetDevAuthenticationSignature

type RetDevAuthenticationSignature struct {
	Signature []byte
}

func (*RetDevAuthenticationSignature) UnmarshalBinary

func (s *RetDevAuthenticationSignature) UnmarshalBinary(r []byte) error

type RetEventNotification

type RetEventNotification struct {
	EventMask uint64
}

type RetFIDTokenValueACKs

type RetFIDTokenValueACKs struct {
	FIDTokenValueACKs []FIDTokenValueACK
}

func (RetFIDTokenValueACKs) MarshalBinary

func (s RetFIDTokenValueACKs) MarshalBinary() ([]byte, error)

func (*RetFIDTokenValueACKs) UnmarshalBinary

func (s *RetFIDTokenValueACKs) UnmarshalBinary(data []byte) error

type RetNowPlayingFocusApp

type RetNowPlayingFocusApp struct {
	AppID []byte
}

type RetSupportedEventNotification

type RetSupportedEventNotification struct {
	EventMask uint64
}

type RetUIMode

type RetUIMode struct {
	UIMode UIMode
}

type RetiPodAuthenticationInfo

type RetiPodAuthenticationInfo struct {
	Major              byte
	Minor              byte
	CertCurrentSection byte
	CertMaxSection     byte
	CertData           []byte
}

type RetiPodAuthenticationSignature

type RetiPodAuthenticationSignature struct {
	Signature [20]byte
}

type RetiPodOptions

type RetiPodOptions struct {
	Options uint64
}

type RetiPodOptionsForLingo

type RetiPodOptionsForLingo struct {
	LingoID byte
	Options uint64
}

type RetiPodPreferences

type RetiPodPreferences struct {
	PrefClassID        byte
	PrefClassSettingID byte
}

type ReturnLingoProtocolVersion

type ReturnLingoProtocolVersion struct {
	Lingo byte
	Major byte
	Minor byte
}

type ReturnRemoteUIMode

type ReturnRemoteUIMode struct {
	Mode byte
}

type ReturnTransportMaxPayloadSize

type ReturnTransportMaxPayloadSize struct {
	MaxPayload uint16
}

type ReturniPodModelNum

type ReturniPodModelNum struct {
	ModelID uint32
	Model   []byte
}

func (ReturniPodModelNum) MarshalBinary

func (s ReturniPodModelNum) MarshalBinary() ([]byte, error)

func (*ReturniPodModelNum) UnmarshalBinary

func (s *ReturniPodModelNum) UnmarshalBinary(data []byte) error

type ReturniPodName

type ReturniPodName struct {
	Name []byte
}

func (ReturniPodName) MarshalBinary

func (s ReturniPodName) MarshalBinary() ([]byte, error)

func (*ReturniPodName) UnmarshalBinary

func (s *ReturniPodName) UnmarshalBinary(data []byte) error

type ReturniPodSerialNum

type ReturniPodSerialNum struct {
	Serial []byte
}

func (ReturniPodSerialNum) MarshalBinary

func (s ReturniPodSerialNum) MarshalBinary() ([]byte, error)

func (*ReturniPodSerialNum) UnmarshalBinary

func (s *ReturniPodSerialNum) UnmarshalBinary(data []byte) error

type ReturniPodSoftwareVersion

type ReturniPodSoftwareVersion struct {
	Major byte
	Minor byte
	Rev   byte
}

type SetAccStatusNotification

type SetAccStatusNotification struct {
	StatusMask uint32
}

type SetAvailableCurrent

type SetAvailableCurrent struct {
	CurrentLimit uint16
}

type SetEventNotification

type SetEventNotification struct {
	EventMask uint64
}

type SetFIDTokenValues

type SetFIDTokenValues struct {
	FIDTokenValues []FIDTokenValue
}

func (*SetFIDTokenValues) MarshalBinary

func (s *SetFIDTokenValues) MarshalBinary() ([]byte, error)

func (*SetFIDTokenValues) UnmarshalBinary

func (s *SetFIDTokenValues) UnmarshalBinary(data []byte) error

type SetUIMode

type SetUIMode struct {
	UIMode UIMode
}

type SetiPodPreferences

type SetiPodPreferences struct {
	PrefClassID        byte
	PrefClassSettingID byte
	RestoreOnExit      byte
}

type StartIDPS

type StartIDPS struct{}

type TokenID

type TokenID struct {
	FIDType    byte
	FIDSubtype byte
}

type UIMode

type UIMode uint8
const (
	UIModeStandart UIMode = 0x00
	UIModeExtended UIMode = 0x01
	UIModeiPodOut  UIMode = 0x02
)

Jump to

Keyboard shortcuts

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