|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.axelwernicke.mypod.ipod.ITunesDB
An iTunes Database object is related to an database file on an Apple iPod. The database contains references to all music files on an iPod, as well as meta information about the songs. Further all information about playlists on the iPod. All information are stored in a binary file, and is contained in tags. The set of tags contains
mhbd - root tag of a database
mhsd - list holder, contains song lists or playlists
mhlt - song list header contains song items
mhit - song item, stores song meta information and is followed by one or more
mhod - song item content - stores one strings like artist, filetype, path etc.
mhlp - playlist header, contains one or more playlist items
mhyp - playlist item holds the playlist in paires of
mhip - playlist index and mhod
an ITunesDB object stores the informations from the 'mhbd' tag and has references to the content of all other tags.
for more details
Constructor Summary | |
ITunesDB()
Creates a new instance of an iTunesDB. |
|
ITunesDB(java.lang.String iPodName)
Constructs a new iTunesDB object. |
Method Summary | |
void |
addClip(int fileIndex,
MP3MetaV2 meta)
Adds a clip to song list and master playlist |
void |
createPlaylist(java.lang.String name,
java.util.Vector fileIdc)
Creates a new playlist on iPod containing all the songs in the Vector. |
java.lang.String |
getFilename(long fileIndex)
Gets the filename for a song from its file index. |
long |
getFilesize(long fileIndex)
Gets the filesize for a song from the file index. |
int |
getNextAvailableSongIndex(int fileIndex)
Determines the next available file index. |
de.axelwernicke.mypod.ipod.ITunesDBPlaylistHeader |
getPlaylistHeader()
Getter for property playlistHeader. |
de.axelwernicke.mypod.ipod.ITunesDBListHolder |
getPlaylistHolder()
Getter for property playlistHolder. |
int |
getRecordSize()
Getter for property recordSize. |
de.axelwernicke.mypod.ipod.ITunesDBSonglistHeader |
getSonglistHeader()
Gets the songlist header record |
de.axelwernicke.mypod.ipod.ITunesDBListHolder |
getSonglistHolder()
Gets the songlist holder record. |
int |
getTagSize()
Getter for property tagSize. |
long |
getTotalFilesize()
Gets the summarized size of all songs on the iPod |
long |
getTotalFilesize(java.util.Vector fileIdc)
Gets the summarized size of all songs. |
int |
getUnknown3()
Getter for property unknown3. |
int |
getUnknown4()
Getter for property unknown4. |
int |
getUnknown5()
Getter for property unknown5. |
void |
initPlaylistHeader(java.lang.String iPodName)
Initializes playlist header record. |
void |
initPlaylistHolder()
initializes the playlist holder record. |
void |
initSonglistHeader()
initializes songlist header record. |
void |
initSonglistHolder()
Initializes the songlist holder record of the database. |
void |
removeClip(long fileIndex)
removes a song from the song list and all playlists. |
void |
removeEmptyPlaylists()
iterates over all playlists and removes them, if not a masterplaylist, but empty. |
void |
setMasterPlaylistName(java.lang.String name)
Sets the name of the masterplaylist of the db |
void |
setPlaylistHeader(de.axelwernicke.mypod.ipod.ITunesDBPlaylistHeader playlistHeader)
Setter for property playlistHeader. |
void |
setPlaylistHolder(de.axelwernicke.mypod.ipod.ITunesDBListHolder playlistHolder)
Setter for property playlistHolder. |
void |
setRecordSize(int recordSize)
Setter for property recordSize. |
void |
setSonglistHeader(de.axelwernicke.mypod.ipod.ITunesDBSonglistHeader songlistHeader)
Setter for property songlistHeader. |
void |
setSonglistHolder(de.axelwernicke.mypod.ipod.ITunesDBListHolder songlistHolder)
Setter for property songlistHolder. |
void |
setTagSize(int tagSize)
Setter for property tagSize. |
void |
setUnknown3(int unknown3)
Setter for property unknown3. |
void |
setUnknown4(int unknown4)
Setter for property unknown4. |
void |
setUnknown5(int unknown5)
Setter for property unknown5. |
java.lang.String |
toString()
generates a string that represents the current object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ITunesDB()
public ITunesDB(java.lang.String iPodName)
iPodName
- , used as name of the masterplaylistMethod Detail |
public void initSonglistHolder()
public void initSonglistHeader()
public void initPlaylistHolder()
public void initPlaylistHeader(java.lang.String iPodName)
iPodName
- name of the master playlist (equals name of the iPod)public de.axelwernicke.mypod.ipod.ITunesDBListHolder getSonglistHolder()
public de.axelwernicke.mypod.ipod.ITunesDBSonglistHeader getSonglistHeader()
public long getTotalFilesize()
public long getTotalFilesize(java.util.Vector fileIdc)
fileIdc
- vector containing file indices to summarize size
public java.lang.String getFilename(long fileIndex)
fileIndex
- of the song
public long getFilesize(long fileIndex)
fileIndex
- fileindex of the song
public void removeClip(long fileIndex)
fileIndex
- of the song to removepublic void addClip(int fileIndex, MP3MetaV2 meta)
fileIndex
- of the song on the iPodmeta
- information about the songpublic int getNextAvailableSongIndex(int fileIndex)
fileIndex
- recently used file index or 0
public void removeEmptyPlaylists()
public void createPlaylist(java.lang.String name, java.util.Vector fileIdc)
name
- of the playlistfileIdc
- Vector of fileindices to include in the playlistpublic java.lang.String toString()
public int getTagSize()
public void setTagSize(int tagSize)
tagSize
- New value of property tagSize.public int getRecordSize()
public void setRecordSize(int recordSize)
recordSize
- New value of property recordSize.public int getUnknown3()
public void setUnknown3(int unknown3)
unknown3
- New value of property unknown3.public int getUnknown4()
public void setUnknown4(int unknown4)
unknown4
- New value of property unknown4.public int getUnknown5()
public void setUnknown5(int unknown5)
unknown5
- New value of property unknown5.public void setSonglistHolder(de.axelwernicke.mypod.ipod.ITunesDBListHolder songlistHolder)
songlistHolder
- New value of property songlistHolder.public void setSonglistHeader(de.axelwernicke.mypod.ipod.ITunesDBSonglistHeader songlistHeader)
songlistHeader
- New value of property songlistHeader.public de.axelwernicke.mypod.ipod.ITunesDBListHolder getPlaylistHolder()
public void setPlaylistHolder(de.axelwernicke.mypod.ipod.ITunesDBListHolder playlistHolder)
playlistHolder
- New value of property playlistHolder.public de.axelwernicke.mypod.ipod.ITunesDBPlaylistHeader getPlaylistHeader()
public void setPlaylistHeader(de.axelwernicke.mypod.ipod.ITunesDBPlaylistHeader playlistHeader)
playlistHeader
- New value of property playlistHeader.public void setMasterPlaylistName(java.lang.String name)
name
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |