com.dt.iTunesController
Class ITObject

java.lang.Object
  extended by com.dt.iTunesController.ITObject
Direct Known Subclasses:
ITArtwork, ITPlaylist, ITSource, ITTrack

public class ITObject
extends java.lang.Object

Defines a source, playlist or track. An ITObject uniquely identifies a source, playlist, or track in iTunes using four separate IDs. These are runtime IDs, they are only valid while the current instance of iTunes is running. As of iTunes 7.7, you can also identify an ITObject using a 64-bit persistent ID, which is valid across multiple invocations of iTunes. The main use of the ITObject interface is to allow clients to track iTunes database changes using iTunesEventsInterface.onDatabaseChangedEvent(). You can retrieve an ITObject with a specified runtime ID using iTunes.getITObjectByID(). An ITObject will always have a valid, non-zero source ID. An ITObject corresponding to a playlist or track will always have a valid playlist ID. The playlist ID will be zero for a source. An ITObject corresponding to a track will always have a valid track and track database ID. These IDs will be zero for a source or playlist. A track ID is unique within the track's playlist. A track database ID is unique across all playlists. For example, if the same music file is in two different playlists, each of the tracks could have different track IDs, but they will have the same track database ID. An ITObject also has a 64-bit persistent ID which can be used to identify the ITObject across multiple invocations of iTunes.


Field Summary
protected  com.jacob.com.Dispatch object
           
 
Constructor Summary
ITObject(com.jacob.com.Dispatch d)
           
 
Method Summary
 com.jacob.com.Dispatch fetchDispatch()
          Returns the JACOB Dispatch object for this object.
 int getIndex()
          Returns the index of the object in internal application order.
 java.lang.String getName()
          Returns the name of the object.
 int getPlaylistID()
          Returns the ID that identifies the playlist.
 int getSourceID()
          Returns the ID that identifies the source.
 int getTrackDatabaseID()
          Returns the ID that identifies the track, independent of its playlist.
 int getTrackID()
          Returns the ID that identifies the track within the playlist.
 void setName(java.lang.String name)
          Set the name of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

object

protected com.jacob.com.Dispatch object
Constructor Detail

ITObject

public ITObject(com.jacob.com.Dispatch d)
Method Detail

fetchDispatch

public com.jacob.com.Dispatch fetchDispatch()
Returns the JACOB Dispatch object for this object.

Returns:
Returns the JACOB Dispatch object for this object.

setName

public void setName(java.lang.String name)
Set the name of the object.

Parameters:
name - The new name of the object.

getName

public java.lang.String getName()
Returns the name of the object.

Returns:
Returns the name of the object.

getIndex

public int getIndex()
Returns the index of the object in internal application order.

Returns:
The index of the object in internal application order.

getSourceID

public int getSourceID()
Returns the ID that identifies the source.

Returns:
Returns the ID that identifies the source.

getPlaylistID

public int getPlaylistID()
Returns the ID that identifies the playlist.

Returns:
Returns the ID that identifies the playlist.

getTrackID

public int getTrackID()
Returns the ID that identifies the track within the playlist.

Returns:
Returns the ID that identifies the track within the playlist.

getTrackDatabaseID

public int getTrackDatabaseID()
Returns the ID that identifies the track, independent of its playlist.

Returns:
Returns the ID that identifies the track, independent of its playlist.