com.dt.iTunesController
Interface iTunesEventsInterface


public interface iTunesEventsInterface

Interface for receiving iTunes events.


Method Summary
 void onAboutToPromptUserToQuitEvent()
          The ITEventAboutToPromptUserToQuit event is fired when iTunes is about prompt the user to quit.
 void onCOMCallsDisabledEvent(ITCOMDisabledReason reason)
          The ITEventCOMCallsDisabled event is fired when calls to the iTunes COM interface will be deferred.
 void onCOMCallsEnabledEvent()
          The ITEventCOMCallsEnabled event is fired when calls to the iTunes COM interface will no longer be deferred.
 void onDatabaseChangedEvent(int[][] deletedObjectIDs, int[][] changedObjectIDs)
          Not currently implemented.
 void onPlayerPlayEvent(ITTrack iTrack)
          The ITEventPlayerPlay event is fired when a track begins playing.
 void onPlayerPlayingTrackChangedEvent(ITTrack iTrack)
          The ITEventPlayerPlayingTrackChanged event is fired when information about the currently playing track has changed.
 void onPlayerStopEvent(ITTrack iTrack)
          The ITEventPlayerStop event is fired when a track stops playing.
 void onQuittingEvent()
          The ITEventQuitting event is fired when iTunes is about to quit.
 void onSoundVolumeChangedEvent(int newVolume)
          The ITEventSoundVolumeChanged event is fired when the sound output volume has changed.
 

Method Detail

onDatabaseChangedEvent

void onDatabaseChangedEvent(int[][] deletedObjectIDs,
                            int[][] changedObjectIDs)
Not currently implemented. The ITEventDatabaseChanged event is fired when the iTunes database is changed. Each parameter is a two-dimensional array of integers. The first dimension is the number of objects. The second dimension is always 4 and specifies each of the 4 ITObject IDs, where index 0 is the source ID, index 1 is the playlist ID, index 2 is the track ID, and index 3 is the track database ID. For more information on object IDs, see ITObject. Note that you can use iTunes.getITObjectByID() to retrieve changed ITObject, but not for deleted objects (since they no longer exist).

Parameters:
deletedObjectIDs -
changedObjectIDs -

onPlayerPlayEvent

void onPlayerPlayEvent(ITTrack iTrack)
The ITEventPlayerPlay event is fired when a track begins playing.

Parameters:
iTrack - An ITTrack object corresponding to the track that has started playing.

onPlayerStopEvent

void onPlayerStopEvent(ITTrack iTrack)
The ITEventPlayerStop event is fired when a track stops playing.

Parameters:
iTrack - An ITTrack object corresponding to the track that has stopped playing.

onPlayerPlayingTrackChangedEvent

void onPlayerPlayingTrackChangedEvent(ITTrack iTrack)
The ITEventPlayerPlayingTrackChanged event is fired when information about the currently playing track has changed. This event is fired when the user changes information about the currently playing track (e.g. the name of the track). This event is also fired when iTunes plays the next joined CD track in a CD playlist, since joined CD tracks are treated as a single track.

Parameters:
iTrack - An ITTrack object corresponding to the track that is now playing.

onCOMCallsDisabledEvent

void onCOMCallsDisabledEvent(ITCOMDisabledReason reason)
The ITEventCOMCallsDisabled event is fired when calls to the iTunes COM interface will be deferred. Typically, iTunes will defer COM calls when any modal dialog is being displayed. When the user dismisses the last modal dialog, COM calls will be enabled again, and any deferred COM calls will be executed. You can use this event to avoid making a COM call which will be deferred.

Parameters:
reason - The reason the COM interface is being disabled. This is typically ITCOMDisabledReasonDialog.

onCOMCallsEnabledEvent

void onCOMCallsEnabledEvent()
The ITEventCOMCallsEnabled event is fired when calls to the iTunes COM interface will no longer be deferred. Typically, iTunes will defer COM calls when any modal dialog is being displayed. When the user dismisses the last modal dialog, COM calls will be enabled again, and any deferred COM calls will be executed.


onQuittingEvent

void onQuittingEvent()
The ITEventQuitting event is fired when iTunes is about to quit. If the user attempts to quit iTunes while a client still has outstanding iTunes COM objects instantiated, iTunes will display a warning dialog. The user can still choose to quit iTunes anyway, in which case this event will be fired. After this event is fired, any existing iTunes COM objects will no longer be valid. This event is only used to notify clients that iTunes is quitting, clients cannot prevent this from happening.


onAboutToPromptUserToQuitEvent

void onAboutToPromptUserToQuitEvent()
The ITEventAboutToPromptUserToQuit event is fired when iTunes is about prompt the user to quit. This event gives clients the opportunity to prevent the warning dialog prompt from occurring. If the user attempts to quit iTunes while a client still has outstanding iTunes COM objects instantiated, iTunes will display a warning dialog. This event is fired just before the warning dialog is shown. iTunes will then wait up to 5 seconds for clients to release any outstanding iTunes COM objects. If all objects are released during this time, the warning dialog will not be shown and iTunes will quit immediately. Otherwise, the warning dialog will be shown. If the user chooses to quit iTunes anyway, the ITEventQuitting event is fired. See iTunesEventsInterface.onQuittingEvent() for more details.


onSoundVolumeChangedEvent

void onSoundVolumeChangedEvent(int newVolume)
The ITEventSoundVolumeChanged event is fired when the sound output volume has changed.

Parameters:
newVolume - The new sound output volume (0 = minimum, 100 = maximum).