Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion lingo-extremote/extremote.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ var Lingos struct {
RetArtworkFormats `id:"0x000F"`
GetTrackArtworkData `id:"0x0010"`
RetTrackArtworkData `id:"0x0011"`
RequestiPodName `id:"0x0014"`
ReturniPodName `id:"0x0015"`
ResetDBSelection `id:"0x0016"`
SelectDBRecord `id:"0x0017"`
GetNumberCategorizedDBRecords `id:"0x0018"`
Expand Down Expand Up @@ -249,7 +251,23 @@ type RetTrackArtworkData struct {
Data []byte
}

//ack
type RequestiPodName struct{}

type ReturniPodName struct {
Name []byte
}

func (s ReturniPodName) MarshalBinary() ([]byte, error) {
return s.Name, nil
}

func (s *ReturniPodName) UnmarshalBinary(data []byte) error {
s.Name = make([]byte, len(data))
copy(s.Name, data)
return nil
}

// ack
type ResetDBSelection struct {
}

Expand Down
2 changes: 2 additions & 0 deletions lingo-extremote/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func HandleExtRemote(req *ipod.Command, tr ipod.CommandWriter, dev DeviceExtRemo
Status: ACKStatusFailed,
CmdID: req.ID.CmdID(),
})
case *RequestiPodName:
ipod.Respond(req, tr, &ReturniPodName{Name: ipod.StringToBytes("iPod")})
case *ResetDBSelection:
ipod.Respond(req, tr, ackSuccess(req))
case *SelectDBRecord:
Expand Down