itunes-com 0.2.0

Bindings over iTunes COM API
Documentation
// Copied-and-pasted from https://www.joshkunz.com/iTunesControl/main.html
// Note: they lack a few values for PlaylistSpecialKind (that are visible in oleview.exe)

enum ITArtworkFormat
Specifies the artwork format.

Enumeration values:
ITArtworkFormatUnknown 	(0) Unknown artwork format.
ITArtworkFormatJPEG 	(1) JPEG image.
ITArtworkFormatPNG 	(2) PNG image.
ITArtworkFormatBMP 	(3) BMP image.


enum ITErrors
iTunes-specific HRESULT error codes.

Enumeration values:
ITUNES_E_USERCANCEL 	(0xA0040201) user canceled the operation

Note that Microsoft defines ERROR_CANCELLED, but this is a positive value. We need to use a negative value to force this to be treated as an exception.
ITUNES_E_OBJECTDELETED 	(0xA0040202) the entity referenced by this COM object has been deleted
ITUNES_E_OBJECTLOCKED 	(0xA0040203) attempt to modify a locked property
ITUNES_E_CONVERSIONINPROGRESS 	(0xA0040204) attempt to start a conversion while a previous conversion is still in progress
ITUNES_E_MUSICSTOREDISABLED 	(0xA0040205) access to the iTunes Store is disabled in the preferences
ITUNES_E_OBJECTEXISTS 	(0xA0040206) an object with the same name already exists (added in iTunes type library 1.2)
ITUNES_E_PODCASTSDISABLED 	(0xA0040207) access to podcasts is disabled in the preferences (added in iTunes type library 1.5)


enum ITVersion
The major and minor version of the iTunes type library. Use these constants with CheckVersion().

Enumeration values:
kITTypeLibrary_MajorVersion 	(1) iTunes type library major version
kITTypeLibrary_MinorVersion 	(4) iTunes type library minor version (0 for iTunes 4.5, 1 for iTunes 4.6, 2 for iTunes 4.7 and 4.7.1, 3 for iTunes 4.8 and 4.8.1, 4 for iTunes 4.9, 5 for iTunes 5.0, 6 for iTunes 6.0, 7 for iTunes 6.0.2, 8 for iTunes 7.0, 9 for iTunes 7.1, 10 for iTunes 7.4, 11 for iTunes 7.7, 12 for iTunes 8.1)


enum ITCOMDisabledReason
Specifies the reason the COM interface is being disabled.

Enumeration values:
ITCOMDisabledReasonOther 	(0) COM interface is being disabled for some other reason.
ITCOMDisabledReasonDialog 	(1) COM interface is being disabled because a modal dialog is being displayed.
ITCOMDisabledReasonQuitting 	(2) COM interface is being disabled because iTunes is quitting.


enum ITConvertOperationStatusEvent
Events generated by IITConvertOperationStatus.

Enumeration values:
ITConvertOperationStatusChanged 	(1) status about the conversion operation has changed
ITConvertOperationComplete 	(2) the conversion operation has completed


enum ITEvent
Events generated by IiTunes.

Enumeration values:
ITEventDatabaseChanged 	(1) iTunes database has changed
ITEventPlayerPlay 	(2) a track has started playing
ITEventPlayerStop 	(3) a track has stopped playing
ITEventPlayerPlayingTrackChanged 	(4) information about the currently playing track has changed
ITEventCOMCallsDisabled 	(6) calls to the iTunes COM interface will be deferred (typically because a modal dialog is displayed)
ITEventCOMCallsEnabled 	(7) calls to the iTunes COM interface will no longer be deferred (typically because the last modal dialog has been dismissed)
ITEventQuitting 	(8) iTunes is about to quit, existing iTunes COM objects will no longer be valid
ITEventAboutToPromptUserToQuit 	(9) iTunes is about to prompt the user to quit, you should release iTunes COM objects if you want to avoid the dialog
ITEventSoundVolumeChanged 	(10) the sound output volume has changed


enum ITPlayButtonState
Specifies the state of the play/pause/stop button.

Enumeration values:
ITPlayButtonStatePlayDisabled 	(0) Disabled play button.
ITPlayButtonStatePlayEnabled 	(1) Enabled play button.
ITPlayButtonStatePauseEnabled 	(2) Enabled pause button.
ITPlayButtonStatePauseDisabled 	(3) Disabled pause button.
ITPlayButtonStateStopEnabled 	(4) Enabled stop button.
ITPlayButtonStateStopDisabled 	(5) Disabled stop button.


enum ITPlayerButton
Specifies a player button.

Enumeration values:
ITPlayerButtonPrevious 	(0) Previous/rewind button.
ITPlayerButtonPlay 	(1) Play button.
ITPlayerButtonNext 	(2) Next/fast forward button.


enum ITPlayerButtonModifierKey
Player button modifier key flags.

Enumeration values:
ITPlayerButtonModifierKeyNone 	(0) No modifiers.
ITPlayerButtonModifierKeyShift 	(1) Shift key down.
ITPlayerButtonModifierKeyControl 	(2) Control key down.
ITPlayerButtonModifierKeyAlt 	(4) Alt key down.
ITPlayerButtonModifierKeyCapsLock 	(8) Caps Lock key toggled.


enum ITPlayerState
Specifies the state of the player.

Enumeration values:
ITPlayerStateStopped 	(0) Player is stopped.
ITPlayerStatePlaying 	(1) Player is playing.
ITPlayerStateFastForward 	(2) Player is fast forwarding.
ITPlayerStateRewind 	(3) Player is rewinding.


enum ITVisualSize
Specifies the size of the visuals.

Enumeration values:
ITVisualSizeSmall 	(0) Small size visuals.
ITVisualSizeMedium 	(1) Medium size visuals.
ITVisualSizeLarge 	(2) Large size visuals.


enum ITWindowKind
Specifies the window kind.

Enumeration values:
ITWindowKindUnknown 	(0) Unknown window kind.
ITWindowKindBrowser 	(1) Main browser window (IITBrowserWindow).
ITWindowKindPlaylist 	(2) Playlist window (IITPlaylistWindow).
ITWindowKindEQ 	(3) EQ window.
ITWindowKindArtwork 	(4) Artwork window.
ITWindowKindNowPlaying 	(5) Now Playing window.


enum ITSourceKind
Specifies the source kind.

Enumeration values:
ITSourceKindUnknown 	(0) Unknown source kind.
ITSourceKindLibrary 	(1) Library source.
ITSourceKindIPod 	(2) iPod source (IITIPodSource).
ITSourceKindAudioCD 	(3) Audio CD source.
ITSourceKindMP3CD 	(4) MP3 CD source.
ITSourceKindDevice 	(5) Device source.
ITSourceKindRadioTuner 	(6) Radio tuner source.
ITSourceKindSharedLibrary 	(7) Shared library source.


enum ITPlaylistKind
Specifies the playlist kind.

Enumeration values:
ITPlaylistKindUnknown 	(0) Unknown playlist kind.
ITPlaylistKindLibrary 	(1) Library playlist (IITLibraryPlaylist).
ITPlaylistKindUser 	(2) User playlist (IITUserPlaylist).
ITPlaylistKindCD 	(3) CD playlist (IITAudioCDPlaylist).
ITPlaylistKindDevice 	(4) Device playlist.
ITPlaylistKindRadioTuner 	(5) Radio tuner playlist.


enum ITPlaylistPrintKind
Specifies the kind of playlist printout.

Enumeration values:
ITPlaylistPrintKindPlaylist 	(0) Print a list of tracks in the playlist.
ITPlaylistPrintKindAlbumlist 	(1) Print a list of albums in the playlist.
ITPlaylistPrintKindInsert 	(2) Print a CD jewel case insert.


enum ITPlaylistRepeatMode
Specifies the playlist playback repeat mode.

Enumeration values:
ITPlaylistRepeatModeOff 	(0) Play playlist once.
ITPlaylistRepeatModeOne 	(1) Repeat song.
ITPlaylistRepeatModeAll 	(2) Repeat playlist.


enum ITPlaylistSearchField
Specifies the fields in each track that will be searched by IITPlaylist::Search().

Enumeration values:
ITPlaylistSearchFieldAll 	(0) Search all fields of each track.
ITPlaylistSearchFieldVisible 	(1) Search only the fields with columns that are currently visible in the display for the playlist.
Note that song name, artist, album, and composer will always be searched, even if these columns are not visible.
ITPlaylistSearchFieldArtists 	(2) Search only the artist field of each track (IITTrack::Artist).
ITPlaylistSearchFieldAlbums 	(3) Search only the album field of each track (IITTrack::Album).
ITPlaylistSearchFieldComposers 	(4) Search only the composer field of each track (IITTrack::Composer).
ITPlaylistSearchFieldSongNames 	(5) Search only the song name field of each track (IITTrack::Name).


enum ITUserPlaylistSpecialKind
Specifies the user playlist special kind.

Enumeration values:
ITUserPlaylistSpecialKindNone 	(0) No special kind.
ITUserPlaylistSpecialKindPurchasedMusic 	(1) Purchased Music playlist.
ITUserPlaylistSpecialKindPartyShuffle 	(2) Party Shuffle playlist.
ITUserPlaylistSpecialKindPodcasts 	(3) Podcasts playlist.
ITUserPlaylistSpecialKindFolder 	(4) Folder playlist.
ITUserPlaylistSpecialKindVideos 	(5) Videos playlist (added in iTunes type library 1.6).
ITUserPlaylistSpecialKindMusic 	(6) Music playlist (added in iTunes type library 1.8).
ITUserPlaylistSpecialKindMovies 	(7) Movies playlist (added in iTunes type library 1.8).
ITUserPlaylistSpecialKindTVShows 	(8) TV Shows playlist (added in iTunes type library 1.8).
ITUserPlaylistSpecialKindAudiobooks 	(9) Audiobooks playlist (added in iTunes type library 1.8).


enum ITRatingKind
Specifies the rating kind (added in iTunes type library 1.10).

Enumeration values:
ITRatingKindUser 	(0) User-specified rating.
ITRatingKindComputed 	(1) iTunes-computed rating.


enum ITTrackKind
Specifies the track kind.

Enumeration values:
ITTrackKindUnknown 	(0) Unknown track kind.
ITTrackKindFile 	(1) File track (IITFileOrCDTrack).
ITTrackKindCD 	(2) CD track (IITFileOrCDTrack).
ITTrackKindURL 	(3) URL track (IITURLTrack).
ITTrackKindDevice 	(4) Device track.
ITTrackKindSharedLibrary 	(5) Shared library track.


enum ITVideoKind
Specifies the video track kind (added in iTunes type library 1.8).

Enumeration values:
ITVideoKindNone 	(0) Not a video track, or unknown video track kind.
ITVideoKindMovie 	(1) Movie video track.
ITVideoKindMusicVideo 	(2) Music video track.
ITVideoKindTVShow 	(3) TV show video track.