Documentation
¶
Index ¶
- Constants
- Variables
- func ReadObject(r io.Reader, offset int) (int, interface{}, error)
- type Album
- type AlbumInner
- type AlbumList
- type AlbumListInner
- type ApplicationVersion
- type Artist
- type ArtistInner
- type ArtistList
- type ArtistListInner
- type BomaSubType
- type BookDataObject
- type DataObject
- type DataObjectInner
- type Envelope
- type EnvelopeInner
- type GeniusInfoDataObject
- type LibraryMaster
- type LibraryMasterInner
- type Loader
- type LongHeaderDataObject
- type NumericDataObject
- type ObjectSignature
- type Playlist
- type PlaylistInner
- type PlaylistItemDataObject
- type PlaylistKind
- type PlaylistList
- type PlaylistListInner
- type ReadableObject
- type SectionBoundary
- type SectionBoundaryInner
- type ShortHeaderDataObject
- type Sized
- type StandardObject
- func (o *StandardObject) Buffer() *bytes.Buffer
- func (o *StandardObject) CreateSubObject() ReadableObject
- func (o *StandardObject) GetData() []byte
- func (o *StandardObject) GetOffset() int
- func (o *StandardObject) GetSize() int
- func (o *StandardObject) GetType() string
- func (o *StandardObject) Parse(x interface{}) error
- type Time
- type TimestampsDataObject
- type Track
- type TrackInner
- type TrackList
- type TrackListInner
- type Unhandled
- type VideoInfoDataObject
- type WideCharDataObject
Constants ¶
View Source
const ( BomaTypeNumeric = iota BomaTypeWideChar BomaTypeShortHeader BomaTypeLongHeader BomaTypeBook BomaTypePlaylistItem BomaTypeVideoInfo BomaTypeUnknown BomaTypeTimestamps BomaTypeGeniusInfo )
Variables ¶
View Source
var ErrInvalidHeader = errors.New("invalid library header")
View Source
var ErrTooBig = errors.New("object bigger than encoded size")
View Source
var ErrUnexpectedObject = errors.New("unexpected object")
View Source
var PLAYLIST_KIND_TYPE = map[uint32]string{}
var COLUMN_TYPE = map[uint32]string{}
View Source
var SORT_FIELD_TYPE = map[uint32]string{}
var UTF16_TYPES = map[uint32]bool{} var DATA_TYPE = map[uint32]string{} var DATASET_TYPE = map[uint32]string{}
Functions ¶
Types ¶
type Album ¶
type Album struct {
*StandardObject
Parsed *AlbumInner
PersistentID pid.PersistentID
DataObjectCount int
AlbumRating uint8
}
type AlbumInner ¶
type AlbumList ¶
type AlbumList struct {
*StandardObject
Parsed *AlbumListInner
AlbumCount int
}
type AlbumListInner ¶
type AlbumListInner struct {
Type ObjectSignature
Size uint32
AlbumCount uint32
Unknown [4]byte
}
type ApplicationVersion ¶
type ApplicationVersion [32]byte
func (ApplicationVersion) MarshalJSON ¶
func (v ApplicationVersion) MarshalJSON() ([]byte, error)
func (ApplicationVersion) String ¶
func (v ApplicationVersion) String() string
type Artist ¶
type Artist struct {
*StandardObject
Parsed *ArtistInner
PersistentID pid.PersistentID
DataObjectCount int
}
type ArtistInner ¶
type ArtistInner struct {
Type ObjectSignature
Size uint32
SectionsLength uint32
DataObjectCount uint32
PersistentID pid.PersistentID
}
type ArtistList ¶
type ArtistList struct {
*StandardObject
Parsed *ArtistListInner
ArtistCount int
}
func (*ArtistList) Read ¶
func (o *ArtistList) Read() error
type ArtistListInner ¶
type ArtistListInner struct {
Type ObjectSignature
Size uint32
ArtistCount uint32
}
type BomaSubType ¶
type BomaSubType uint32
func (BomaSubType) Kind ¶
func (b BomaSubType) Kind() int
func (BomaSubType) MarshalJSON ¶
func (b BomaSubType) MarshalJSON() ([]byte, error)
func (BomaSubType) String ¶
func (b BomaSubType) String() string
type BookDataObject ¶
type DataObject ¶
type DataObject struct {
*StandardObject
Parsed *DataObjectInner
Raw []byte
Nums []uint32
Key string
NumericData *NumericDataObject `json:"NumericData,omitempty"`
WideCharData *WideCharDataObject `json:"WideCharData,omitempty"`
ShortHeaderData *ShortHeaderDataObject `json:"ShortHeaderData,omitempty"`
LongHeaderData *LongHeaderDataObject `json:"LongHeaderData,omitempty"`
PlaylistItemData *PlaylistItemDataObject `json:"PlaylistItemData,omitempty"`
VideoInfoData *VideoInfoDataObject `json:"VideoInfoData,omitempty"`
BookData *BookDataObject `json:"BookData,omitempty"`
TimestampsData *TimestampsDataObject `json:"TimestampsData,omitempty"`
GeniusInfoData *GeniusInfoDataObject `json:"GeniusInfoData,omitempty"`
}
func (*DataObject) Read ¶
func (o *DataObject) Read() error
type DataObjectInner ¶
type DataObjectInner struct {
Type ObjectSignature
Unknown uint32
Size uint32
Subtype BomaSubType
}
type Envelope ¶
type Envelope struct {
*StandardObject
Parsed *EnvelopeInner
PersistentID pid.PersistentID
ApplicationVersion ApplicationVersion
MajorVersion int
MinorVersion int
MaxCryptSize int
ItemCount int
PlaylistCount int
TZOffset int
}
type EnvelopeInner ¶
type EnvelopeInner struct {
Type ObjectSignature
Size uint32
FileLength uint32
MajorVersion uint16
MinorVersion uint16
ApplicationVersion ApplicationVersion
PersistentID pid.PersistentID
FileTypeID uint32
Unknown1 [2]uint32
ItemCount uint32
PlaylistCount uint32
CollectionCount uint32
ArtistCount uint32
MaxCryptSize uint32
TZOffset int32
AppleStoreID pid.PersistentID
LibraryDate Time
Unknown3 uint32
ITunesLibraryPersistentID pid.PersistentID
}
type GeniusInfoDataObject ¶
type GeniusInfoDataObject struct {
Unknown1 uint32
GeniusTrackID pid.PersistentID
}
type LibraryMaster ¶
type LibraryMaster struct {
*StandardObject
Parsed *LibraryMasterInner
PersistentID pid.PersistentID
DataObjectCount int
}
func (*LibraryMaster) Read ¶
func (o *LibraryMaster) Read() error
type LibraryMasterInner ¶
type Loader ¶
type Loader struct {
*loader.BaseLoader
// contains filtered or unexported fields
}
func (*Loader) Decrypt ¶
func (l *Loader) Decrypt(f io.ReadCloser) (io.ReadCloser, error)
func (*Loader) Load ¶
func (l *Loader) Load(f io.ReadCloser)
type LongHeaderDataObject ¶
type NumericDataObject ¶
type NumericDataObject struct {
Unknown1 [16]uint32
SampleRate float32
Unknown2 uint32
FileType uint32
FileFolderCount int16
LibraryFolderCount int16
Unknown3 [3]uint32
BitRate uint32
DateAdded Time
Unknown4 [8]uint32
DateModified Time
Normalization uint32
DatePurchased Time
ReleaseDate Time
Unknown5 [3]uint32
Duration uint32
Unknown6 [34]uint32
FileSize uint32
}
type ObjectSignature ¶
type ObjectSignature [4]byte
func (ObjectSignature) MarshalJSON ¶
func (v ObjectSignature) MarshalJSON() ([]byte, error)
func (ObjectSignature) String ¶
func (v ObjectSignature) String() string
type Playlist ¶
type Playlist struct {
*StandardObject
Parsed *PlaylistInner
PersistentID pid.PersistentID
ParentPersistentID pid.PersistentID
DataObjectCount int
TrackCount int
DateAdded time.Time
DateModified time.Time
Folder bool
DistinguishedKind PlaylistKind
}
type PlaylistInner ¶
type PlaylistInner struct {
Type ObjectSignature // 0
Size uint32 // 4
SectionsLength uint32 // 8
DataObjectCount uint32 // 12
TrackCount uint32 // 16
SortField uint16 // 20
DateAdded Time // 22
Unknown2 uint16 // 26
Unknown3 uint16 // 28
PersistentID pid.PersistentID // 30
Unknown4 [2]uint32 // 38
Unknown5 [3]byte // 46
Folder uint8 // 49
ParentPersistentID pid.PersistentID // 50
Unknown6 [5]uint32 // 58
SortDescending byte // 78
PlaylistKind uint8 // 79
Unknown8 [2]byte // 80
Unknown9 [14]uint32 // 82
DateModified Time // 138
}
type PlaylistItemDataObject ¶
type PlaylistKind ¶
type PlaylistKind uint32
func (PlaylistKind) MarshalJSON ¶
func (k PlaylistKind) MarshalJSON() ([]byte, error)
func (PlaylistKind) String ¶
func (k PlaylistKind) String() string
type PlaylistList ¶
type PlaylistList struct {
*StandardObject
Parsed *PlaylistListInner
PlaylistCount int
}
func (*PlaylistList) Read ¶
func (o *PlaylistList) Read() error
type PlaylistListInner ¶
type PlaylistListInner struct {
Type ObjectSignature
Size uint32
PlaylistCount uint32
}
type ReadableObject ¶
type ReadableObject interface {
Read() error
}
type SectionBoundary ¶
type SectionBoundary struct {
*StandardObject
Parsed *SectionBoundaryInner
SubType int
SectionsLength int
}
func (*SectionBoundary) Read ¶
func (o *SectionBoundary) Read() error
type SectionBoundaryInner ¶
type SectionBoundaryInner struct {
Type ObjectSignature
Size uint32
SectionsLength uint32
SubType uint32
}
type ShortHeaderDataObject ¶
type StandardObject ¶
func NewStandardObject ¶
func (*StandardObject) Buffer ¶
func (o *StandardObject) Buffer() *bytes.Buffer
func (*StandardObject) CreateSubObject ¶
func (o *StandardObject) CreateSubObject() ReadableObject
func (*StandardObject) GetData ¶
func (o *StandardObject) GetData() []byte
func (*StandardObject) GetOffset ¶
func (o *StandardObject) GetOffset() int
func (*StandardObject) GetSize ¶
func (o *StandardObject) GetSize() int
func (*StandardObject) GetType ¶
func (o *StandardObject) GetType() string
func (*StandardObject) Parse ¶
func (o *StandardObject) Parse(x interface{}) error
type TimestampsDataObject ¶
type Track ¶
type TrackInner ¶
type TrackInner struct {
Type ObjectSignature // 0
Size uint32 // 4
Unknown1 uint32 // 8
DataObjectCount uint32 // 12
PersistentID pid.PersistentID // 16
Unknown2 [4]uint32 // 24
Unknown3 uint16 // 40
Disabled uint16 // 42
Unknown4 [4]uint32 // 44
Unknown5 uint16 // 60
Love uint16 // 62
Unknown6 uint8 // 64
Stars uint8 // 65
Unknown7 [4]uint32 // 66
Unknown8 uint16 // 82
DiscNumber uint16 // 84
MovementCount uint16 // 86
MovementNumber uint16 // 88
DiscCount uint16 // 90
Unknown9 uint16 // 92
Unknown10 [5]uint32 // 94
Unknown11 uint16 // 114
TrackCount uint16 // 116
Unknown12 [10]uint32 // 118
Unknown13 uint16 // 158
TrackNumber uint16 // 162
Unknown14 uint16 // 164
Unknown15 uint32 // 166
Year uint16 // 170
Unknown16 uint16 // 172
AlbumID pid.PersistentID // 174
ArtistID pid.PersistentID // 182
Unknown17 [21]uint32 // 190
PersistentID2 pid.PersistentID // 274
}
type TrackList ¶
type TrackList struct {
*StandardObject
Parsed *TrackListInner
TrackCount int
}
type TrackListInner ¶
type TrackListInner struct {
Type ObjectSignature
Size uint32
TrackCount uint32
}
type Unhandled ¶
type Unhandled struct {
*StandardObject
}
Click to show internal directories.
Click to hide internal directories.