iTunes COM Interface: IITPlaylist Interface Reference

iTunes COM

IITPlaylist Interface Reference

Inheritance diagram for IITPlaylist:

IITObject IITAudioCDPlaylist IITLibraryPlaylist IITUserPlaylist List of all members.

Detailed Description

Represents a playlist.

A playlist is always associated with an IITSource.

You can retrieve all the playlists defined for a source using IITSource::Playlists().

For convenience, you can retrieve the main library playlist using IiTunes::LibraryPlaylist().

You can create a new playlist using IiTunes::CreatePlaylist().

Public Member Functions

Methods
HRESULT Delete ()
 Delete this playlist.
HRESULT PlayFirstTrack ()
 Start playing the first track in this playlist.
HRESULT Print ([in] VARIANT_BOOL showPrintDialog,[in] ITPlaylistPrintKind printKind,[in] BSTR theme)
 Print this playlist.
HRESULT Search ([in] BSTR searchText,[in] ITPlaylistSearchField searchFields,[out, retval] IITTrackCollection **iTrackCollection)
 Returns a collection containing the tracks with the specified text.
Properties
HRESULT Kind ([out, retval] ITPlaylistKind *kind)
 Returns the kind of the playlist.
HRESULT Source ([out, retval] IITSource **iSource)
 Returns an IITSource object corresponding to the source that contains the playlist.
HRESULT Duration ([out, retval] long *duration)
 Returns the total length of all songs in the playlist (in seconds).
HRESULT Shuffle ([out, retval] VARIANT_BOOL *isShuffle)
 Returns true if songs in the playlist are played in random order.
HRESULT Shuffle ([in] VARIANT_BOOL shouldShuffle)
 Set whether songs in the playlist should be played in random order.
HRESULT Size ([out, retval] double *size)
 Returns the total size of all songs in the playlist (in bytes).
HRESULT SongRepeat ([out, retval] ITPlaylistRepeatMode *repeatMode)
 Returns the playback repeat mode.
HRESULT SongRepeat ([in] ITPlaylistRepeatMode repeatMode)
 Sets the playback repeat mode.
HRESULT Time ([out, retval] BSTR *time)
 Returns the total length of all songs in the playlist (in MM:SS format).
HRESULT Visible ([out, retval] VARIANT_BOOL *isVisible)
 Returns true if the playlist is visible in the Source list.
HRESULT Tracks ([out, retval] IITTrackCollection **iTrackCollection)
 Returns a collection containing the tracks in this playlist.

Member Function Documentation

HRESULT IITPlaylist::Delete  ) 
 

Delete this playlist.

Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTDELETED This playlist has been deleted already.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Duration [out, retval] long *  duration  ) 
 

Returns the total length of all songs in the playlist (in seconds).

Parameters:
duration Returns the total length of all songs in the playlist (in seconds).
Return values:
S_OK The operation was successful.
S_FALSE The playlist does not have a total duration.
E_POINTER duration is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Kind [out, retval] ITPlaylistKind kind  ) 
 

Returns the kind of the playlist.

Parameters:
kind Returns the kind of the playlist.
Return values:
S_OK The operation was successful.
E_POINTER kind is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::PlayFirstTrack  ) 
 

Start playing the first track in this playlist.

Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Print [in] VARIANT_BOOL  showPrintDialog,
[in] ITPlaylistPrintKind  printKind,
[in] BSTR  theme
 

Print this playlist.

Parameters:
showPrintDialog If true, display the print dialog.
printKind The printout kind.
theme The name of the theme to use. This corresponds to the name of a Theme combo box item in the print dialog for the specified printKind (e.g. "Track length").
This string cannot be longer than 255 characters, but it may be NULL or empty.
Return values:
S_OK The operation was successful.
ITUNES_E_USERCANCEL The operation was canceled by the user.
E_INVALIDARG printKind is invalid or theme is too long.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Search [in] BSTR  searchText,
[in] ITPlaylistSearchField  searchFields,
[out, retval] IITTrackCollection **  iTrackCollection
 

Returns a collection containing the tracks with the specified text.

If searchFields is ITPlaylistSearchFieldVisible , this is identical to the list of tracks displayed if the user enters the search text in the Search edit field in iTunes when this playlist is being displayed.

Parameters:
searchText The text to search for. This string cannot be longer than 255 characters.
searchFields Specifies which fields of each track should be searched for searchText.
iTrackCollection Collection of IITTrack objects. This will be NULL if no tracks meet the search criteria.
Return values:
S_OK The operation was successful.
E_POINTER iTrackCollection is NULL.
E_INVALIDARG searchFields is invalid, or searchText is empty or too long.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Shuffle [in] VARIANT_BOOL  shouldShuffle  ) 
 

Set whether songs in the playlist should be played in random order.

Parameters:
shouldShuffle True if songs in the playlist should be played in random order.
Return values:
S_OK The operation was successful.
S_FALSE This playlist does not support shuffle mode.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Shuffle [out, retval] VARIANT_BOOL *  isShuffle  ) 
 

Returns true if songs in the playlist are played in random order.

Parameters:
isShuffle Returns true if songs in the playlist are played in random order.
Return values:
S_OK The operation was successful.
E_POINTER isShuffle is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Size [out, retval] double *  size  ) 
 

Returns the total size of all songs in the playlist (in bytes).

Parameters:
size Returns the total size of all songs in the playlist (in bytes).
Return values:
S_OK The operation was successful.
S_FALSE The playlist does not have a total size.
E_POINTER size is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::SongRepeat [in] ITPlaylistRepeatMode  repeatMode  ) 
 

Sets the playback repeat mode.

Parameters:
repeatMode The new playback repeat mode.
Return values:
S_OK The operation was successful.
S_FALSE This playlist does not support repeat mode.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::SongRepeat [out, retval] ITPlaylistRepeatMode repeatMode  ) 
 

Returns the playback repeat mode.

Parameters:
repeatMode Returns the playback repeat mode.
Return values:
S_OK The operation was successful.
E_POINTER repeatMode is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Source [out, retval] IITSource **  iSource  ) 
 

Returns an IITSource object corresponding to the source that contains the playlist.

Parameters:
iSource Returns an IITSource object corresponding to the source that contains the playlist.
Return values:
S_OK The operation was successful.
E_POINTER iSource is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Time [out, retval] BSTR *  time  ) 
 

Returns the total length of all songs in the playlist (in MM:SS format).

Parameters:
time Returns the total length of all songs in the playlist (in MM:SS format).
Return values:
S_OK The operation was successful.
E_POINTER time is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Tracks [out, retval] IITTrackCollection **  iTrackCollection  ) 
 

Returns a collection containing the tracks in this playlist.

Parameters:
iTrackCollection Collection of IITTrack objects.
Return values:
S_OK The operation was successful.
E_POINTER iTrackCollection is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITPlaylist::Visible [out, retval] VARIANT_BOOL *  isVisible  ) 
 

Returns true if the playlist is visible in the Source list.

Parameters:
isVisible Returns true if the playlist is visible in the Source list.
Return values:
S_OK The operation was successful.
E_POINTER isVisible is NULL.
ITUNES_E_OBJECTDELETED This playlist has been deleted.
E_FAIL An unexpected error occurred.


Generated on Fri Mar 13 12:50:54 2009 for iTunes 8.1.0.52
©2004-2007 Apple Computer, Inc.