iTunes COM Interface: IITOperationStatus Interface Reference

iTunes COM

IITOperationStatus Interface Reference

Inheritance diagram for IITOperationStatus:

IITConvertOperationStatus List of all members.

Detailed Description

Represents the status of an asynchronous add or convert operation.

When a track is added using IITLibraryPlaylist::AddFile(), IITLibraryPlaylist::AddFiles(), IITUserPlaylist::AddFile(), or IITUserPlaylist::AddFiles(), the add may not complete immediately if iTunes needs to make a copy of the file.

Similarly, when converting or importing a file or track using IiTunes::ConvertFile(), IiTunes::ConvertFiles(), IiTunes::ConvertTrack() or IiTunes::ConvertTracks(), the conversion will never complete immediately.

These methods return an IITOperationStatus object, which can be polled to determine when the operation is done. This object will also return the collection of newly added or converted tracks.

As of version 1.1 of the iTunes type library, you should use IiTunes::ConvertFile2(), IiTunes::ConvertFiles2(), IiTunes::ConvertTrack2() or IiTunes::ConvertTracks2() instead of the original convert methods. These new methods return an IITConvertOperationStatus object to allow clients to retrieve additional conversion progress information.

Public Member Functions

Properties
HRESULT InProgress ([out, retval] VARIANT_BOOL *isInProgress)
 Returns true if the operation is still in progress.
HRESULT Tracks ([out, retval] IITTrackCollection **iTrackCollection)
 Returns a collection containing the tracks that were generated by the operation.

Member Function Documentation

HRESULT IITOperationStatus::InProgress [out, retval] VARIANT_BOOL *  isInProgress  ) 
 

Returns true if the operation is still in progress.

You cannot retrieve the IITOperationStatus::Tracks() property until the operation completes.

Parameters:
isInProgress Returns true if the operation is still in progress.
Return values:
S_OK The operation was successful.
E_POINTER isInProgress is NULL.
ITUNES_E_OBJECTDELETED The playlist containing the tracks has been deleted.
E_FAIL An unexpected error occurred.

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

Returns a collection containing the tracks that were generated by the operation.

You cannot retrieve this property until IITOperationStatus::InProgress() returns false

Parameters:
iTrackCollection Returns a collection containing the tracks that were generated by the operation.
Return values:
S_OK The operation was successful.
E_POINTER iTrackCollection is NULL.
S_FALSE The operation is still in progress, or no tracks were generated. This can happen, for example, if the user cancels a convert operation.
ITUNES_E_OBJECTDELETED The playlist containing the tracks 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.