itunes_com/sys/
com_interfaces.rs

1#![allow(non_snake_case)]
2
3// These types are in the public API.
4// We'd rather use the re-exported versions, so that they are available to our users.
5use super::HRESULT;
6use super::BSTR;
7use super::VARIANT_BOOL;
8use super::IEnumVARIANT;
9
10use windows::Win32::System::Com::IDispatch;
11use windows::Win32::System::Com::IDispatch_Impl;
12use windows::Win32::System::Com::IDispatch_Vtbl;
13
14use windows::Win32::System::Com::VARIANT;
15
16use super::com_enums::*;
17
18type DATE = f64; // This type must be a joke. https://learn.microsoft.com/en-us/cpp/atl-mfc-shared/date-type?view=msvc-170
19type LONG = i32;
20type DOUBLE = f64;
21
22/// IITObject Interface
23///
24/// See the generated [`IITObject_Impl`] trait for more documentation about each function.
25#[windows::core::interface("9FAB0E27-70D7-4E3A-9965-B0C8B8869BB6")]
26pub unsafe trait IITObject : IDispatch {
27    /// Returns the four IDs that uniquely identify this object.
28    pub unsafe fn GetITObjectIDs(&self, sourceID: *mut LONG, playlistID: *mut LONG, trackID: *mut LONG, databaseID: *mut LONG) -> HRESULT;
29    /// The name of the object.
30    pub unsafe fn Name(&self, Name: *mut BSTR) -> HRESULT;
31    /// The name of the object.
32    pub unsafe fn set_Name(&self, Name: BSTR) -> HRESULT;
33    /// The index of the object in internal application order (1-based).
34    pub unsafe fn Index(&self, Index: *mut LONG) -> HRESULT;
35    /// The source ID of the object.
36    pub unsafe fn sourceID(&self, sourceID: *mut LONG) -> HRESULT;
37    /// The playlist ID of the object.
38    pub unsafe fn playlistID(&self, playlistID: *mut LONG) -> HRESULT;
39    /// The track ID of the object.
40    pub unsafe fn trackID(&self, trackID: *mut LONG) -> HRESULT;
41    /// The track database ID of the object.
42    pub unsafe fn TrackDatabaseID(&self, databaseID: *mut LONG) -> HRESULT;
43}
44
45/// IITSource Interface
46///
47/// See the generated [`IITSource_Impl`] trait for more documentation about each function.
48#[windows::core::interface("AEC1C4D3-AEF1-4255-B892-3E3D13ADFDF9")]
49pub unsafe trait IITSource : IITObject {
50    /// The source kind.
51    pub unsafe fn Kind(&self, Kind: *mut ITSourceKind) -> HRESULT;
52    /// The total size of the source, if it has a fixed size.
53    pub unsafe fn Capacity(&self, Capacity: *mut DOUBLE) -> HRESULT;
54    /// The free space on the source, if it has a fixed size.
55    pub unsafe fn FreeSpace(&self, FreeSpace: *mut DOUBLE) -> HRESULT;
56    /// Returns a collection of playlists.
57    pub unsafe fn Playlists(&self, iPlaylistCollection: *mut Option<IITPlaylistCollection>) -> HRESULT;
58}
59
60/// IITPlaylistCollection Interface
61///
62/// See the generated [`IITPlaylistCollection_Impl`] trait for more documentation about each function.
63#[windows::core::interface("FF194254-909D-4437-9C50-3AAC2AE6305C")]
64pub unsafe trait IITPlaylistCollection : IDispatch {
65    /// Returns the number of playlists in the collection.
66    pub unsafe fn Count(&self, Count: *mut LONG) -> HRESULT;
67    /// Returns an IITPlaylist object corresponding to the given index (1-based).
68    pub unsafe fn Item(&self, Index: LONG, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
69    /// Returns an IITPlaylist object with the specified name.
70    pub unsafe fn ItemByName(&self, Name: BSTR, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
71    /// Returns an IEnumVARIANT object which can enumerate the collection.
72    ///
73    /// Note: I have not figured out how to use it (calling `.Skip(1)` on the returned `IEnumVARIANT` causes a `STATUS_ACCESS_VIOLATION`).<br/>
74    /// Feel free to open an issue or a pull request to fix this.
75    pub unsafe fn _NewEnum(&self, iEnumerator: *mut Option<IEnumVARIANT>) -> HRESULT;
76    /// Returns an IITPlaylist object with the specified persistent ID.
77    pub unsafe fn ItemByPersistentID(&self, highID: LONG, lowID: LONG, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
78}
79
80/// IITPlaylist Interface
81///
82/// See the generated [`IITPlaylist_Impl`] trait for more documentation about each function.
83#[windows::core::interface("3D5E072F-2A77-4B17-9E73-E03B77CCCCA9")]
84pub unsafe trait IITPlaylist : IITObject {
85    /// Delete this playlist.
86    pub unsafe fn Delete(&self) -> HRESULT;
87    /// Start playing the first track in this playlist.
88    pub unsafe fn PlayFirstTrack(&self) -> HRESULT;
89    /// Print this playlist.
90    pub unsafe fn Print(&self, showPrintDialog: VARIANT_BOOL, printKind: ITPlaylistPrintKind, theme: BSTR) -> HRESULT;
91    /// Search tracks in this playlist for the specified string.
92    pub unsafe fn Search(&self, searchText: BSTR, searchFields: ITPlaylistSearchField, iTrackCollection: *mut Option<IITTrackCollection>) -> HRESULT;
93    /// The playlist kind.
94    pub unsafe fn Kind(&self, Kind: *mut ITPlaylistKind) -> HRESULT;
95    /// The source that contains this playlist.
96    pub unsafe fn Source(&self, iSource: *mut Option<IITSource>) -> HRESULT;
97    /// The total length of all songs in the playlist (in seconds).
98    pub unsafe fn Duration(&self, Duration: *mut LONG) -> HRESULT;
99    /// True if songs in the playlist are played in random order.
100    pub unsafe fn Shuffle(&self, isShuffle: *mut VARIANT_BOOL) -> HRESULT;
101    /// True if songs in the playlist are played in random order.
102    pub unsafe fn set_Shuffle(&self, isShuffle: VARIANT_BOOL) -> HRESULT;
103    /// The total size of all songs in the playlist (in bytes).
104    pub unsafe fn Size(&self, Size: *mut DOUBLE) -> HRESULT;
105    /// The playback repeat mode.
106    pub unsafe fn SongRepeat(&self, repeatMode: *mut ITPlaylistRepeatMode) -> HRESULT;
107    /// The playback repeat mode.
108    pub unsafe fn set_SongRepeat(&self, repeatMode: ITPlaylistRepeatMode) -> HRESULT;
109    /// The total length of all songs in the playlist (in MM:SS format).
110    pub unsafe fn Time(&self, Time: *mut BSTR) -> HRESULT;
111    /// True if the playlist is visible in the Source list.
112    pub unsafe fn Visible(&self, isVisible: *mut VARIANT_BOOL) -> HRESULT;
113    /// Returns a collection of tracks in this playlist.
114    pub unsafe fn Tracks(&self, iTrackCollection: *mut Option<IITTrackCollection>) -> HRESULT;
115}
116
117/// IITTrackCollection Interface
118///
119/// See the generated [`IITTrackCollection_Impl`] trait for more documentation about each function.
120#[windows::core::interface("755D76F1-6B85-4CE4-8F5F-F88D9743DCD8")]
121pub unsafe trait IITTrackCollection : IDispatch {
122    /// Returns the number of tracks in the collection.
123    pub unsafe fn Count(&self, Count: *mut LONG) -> HRESULT;
124    /// Returns an IITTrack object corresponding to the given fixed index, where the index is independent of the play order (1-based).
125    pub unsafe fn Item(&self, Index: LONG, iTrack: *mut Option<IITTrack>) -> HRESULT;
126    /// Returns an IITTrack object corresponding to the given index, where the index is defined by the play order of the playlist containing the track collection (1-based).
127    pub unsafe fn ItemByPlayOrder(&self, Index: LONG, iTrack: *mut Option<IITTrack>) -> HRESULT;
128    /// Returns an IITTrack object with the specified name.
129    pub unsafe fn ItemByName(&self, Name: BSTR, iTrack: *mut Option<IITTrack>) -> HRESULT;
130    /// Returns an IEnumVARIANT object which can enumerate the collection.
131    ///
132    /// Note: I have not figured out how to use it (calling `.Skip(1)` on the returned `IEnumVARIANT` causes a `STATUS_ACCESS_VIOLATION`).<br/>
133    /// Feel free to open an issue or a pull request to fix this.
134    pub unsafe fn _NewEnum(&self, iEnumerator: *mut Option<IEnumVARIANT>) -> HRESULT;
135    /// Returns an IITTrack object with the specified persistent ID.
136    pub unsafe fn ItemByPersistentID(&self, highID: LONG, lowID: LONG, iTrack: *mut Option<IITTrack>) -> HRESULT;
137}
138
139/// IITTrack Interface
140///
141/// See the generated [`IITTrack_Impl`] trait for more documentation about each function.
142#[windows::core::interface("4CB0915D-1E54-4727-BAF3-CE6CC9A225A1")]
143pub unsafe trait IITTrack : IITObject {
144    /// Delete this track.
145    pub unsafe fn Delete(&self) -> HRESULT;
146    /// Start playing this track.
147    pub unsafe fn Play(&self) -> HRESULT;
148    /// Add artwork from an image file to this track.
149    pub unsafe fn AddArtworkFromFile(&self, filePath: BSTR, iArtwork: *mut Option<IITArtwork>) -> HRESULT;
150    /// The track kind.
151    pub unsafe fn Kind(&self, Kind: *mut ITTrackKind) -> HRESULT;
152    /// The playlist that contains this track.
153    pub unsafe fn Playlist(&self, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
154    /// The album containing the track.
155    pub unsafe fn Album(&self, Album: *mut BSTR) -> HRESULT;
156    /// The album containing the track.
157    pub unsafe fn set_Album(&self, Album: BSTR) -> HRESULT;
158    /// The artist/source of the track.
159    pub unsafe fn Artist(&self, Artist: *mut BSTR) -> HRESULT;
160    /// The artist/source of the track.
161    pub unsafe fn set_Artist(&self, Artist: BSTR) -> HRESULT;
162    /// The bit rate of the track (in kbps).
163    pub unsafe fn BitRate(&self, BitRate: *mut LONG) -> HRESULT;
164    /// The tempo of the track (in beats per minute).
165    pub unsafe fn BPM(&self, beatsPerMinute: *mut LONG) -> HRESULT;
166    /// The tempo of the track (in beats per minute).
167    pub unsafe fn set_BPM(&self, beatsPerMinute: LONG) -> HRESULT;
168    /// Freeform notes about the track.
169    pub unsafe fn Comment(&self, Comment: *mut BSTR) -> HRESULT;
170    /// Freeform notes about the track.
171    pub unsafe fn set_Comment(&self, Comment: BSTR) -> HRESULT;
172    /// True if this track is from a compilation album.
173    pub unsafe fn Compilation(&self, isCompilation: *mut VARIANT_BOOL) -> HRESULT;
174    /// True if this track is from a compilation album.
175    pub unsafe fn set_Compilation(&self, isCompilation: VARIANT_BOOL) -> HRESULT;
176    /// The composer of the track.
177    pub unsafe fn Composer(&self, Composer: *mut BSTR) -> HRESULT;
178    /// The composer of the track.
179    pub unsafe fn set_Composer(&self, Composer: BSTR) -> HRESULT;
180    /// The date the track was added to the playlist.
181    pub unsafe fn DateAdded(&self, DateAdded: *mut DATE) -> HRESULT;
182    /// The total number of discs in the source album.
183    pub unsafe fn DiscCount(&self, DiscCount: *mut LONG) -> HRESULT;
184    /// The total number of discs in the source album.
185    pub unsafe fn set_DiscCount(&self, DiscCount: LONG) -> HRESULT;
186    /// The index of the disc containing the track on the source album.
187    pub unsafe fn DiscNumber(&self, DiscNumber: *mut LONG) -> HRESULT;
188    /// The index of the disc containing the track on the source album.
189    pub unsafe fn set_DiscNumber(&self, DiscNumber: LONG) -> HRESULT;
190    /// The length of the track (in seconds).
191    pub unsafe fn Duration(&self, Duration: *mut LONG) -> HRESULT;
192    /// True if the track is checked for playback.
193    pub unsafe fn Enabled(&self, isEnabled: *mut VARIANT_BOOL) -> HRESULT;
194    /// True if the track is checked for playback.
195    pub unsafe fn set_Enabled(&self, isEnabled: VARIANT_BOOL) -> HRESULT;
196    /// The name of the EQ preset of the track.
197    pub unsafe fn EQ(&self, EQ: *mut BSTR) -> HRESULT;
198    /// The name of the EQ preset of the track.
199    pub unsafe fn set_EQ(&self, EQ: BSTR) -> HRESULT;
200    /// The stop time of the track (in seconds).
201    pub unsafe fn set_Finish(&self, Finish: LONG) -> HRESULT;
202    /// The stop time of the track (in seconds).
203    pub unsafe fn Finish(&self, Finish: *mut LONG) -> HRESULT;
204    /// The music/audio genre (category) of the track.
205    pub unsafe fn Genre(&self, Genre: *mut BSTR) -> HRESULT;
206    /// The music/audio genre (category) of the track.
207    pub unsafe fn set_Genre(&self, Genre: BSTR) -> HRESULT;
208    /// The grouping (piece) of the track.  Generally used to denote movements within classical work.
209    pub unsafe fn Grouping(&self, Grouping: *mut BSTR) -> HRESULT;
210    /// The grouping (piece) of the track.  Generally used to denote movements within classical work.
211    pub unsafe fn set_Grouping(&self, Grouping: BSTR) -> HRESULT;
212    /// A text description of the track.
213    pub unsafe fn KindAsString(&self, Kind: *mut BSTR) -> HRESULT;
214    /// The modification date of the content of the track.
215    pub unsafe fn ModificationDate(&self, dateModified: *mut DATE) -> HRESULT;
216    /// The number of times the track has been played.
217    pub unsafe fn PlayedCount(&self, PlayedCount: *mut LONG) -> HRESULT;
218    /// The number of times the track has been played.
219    pub unsafe fn set_PlayedCount(&self, PlayedCount: LONG) -> HRESULT;
220    /// The date and time the track was last played.  A value of zero means no played date.
221    pub unsafe fn PlayedDate(&self, PlayedDate: *mut DATE) -> HRESULT;
222    /// The date and time the track was last played.  A value of zero means no played date.
223    pub unsafe fn set_PlayedDate(&self, PlayedDate: DATE) -> HRESULT;
224    /// The play order index of the track in the owner playlist (1-based).
225    pub unsafe fn PlayOrderIndex(&self, Index: *mut LONG) -> HRESULT;
226    /// The rating of the track (0 to 100).
227    pub unsafe fn Rating(&self, Rating: *mut LONG) -> HRESULT;
228    /// The rating of the track (0 to 100).
229    pub unsafe fn set_Rating(&self, Rating: LONG) -> HRESULT;
230    /// The sample rate of the track (in Hz).
231    pub unsafe fn SampleRate(&self, SampleRate: *mut LONG) -> HRESULT;
232    /// The size of the track (in bytes).
233    pub unsafe fn Size(&self, Size: *mut LONG) -> HRESULT;
234    /// The start time of the track (in seconds).
235    pub unsafe fn Start(&self, Start: *mut LONG) -> HRESULT;
236    /// The start time of the track (in seconds).
237    pub unsafe fn set_Start(&self, Start: LONG) -> HRESULT;
238    /// The length of the track (in MM:SS format).
239    pub unsafe fn Time(&self, Time: *mut BSTR) -> HRESULT;
240    /// The total number of tracks on the source album.
241    pub unsafe fn TrackCount(&self, TrackCount: *mut LONG) -> HRESULT;
242    /// The total number of tracks on the source album.
243    pub unsafe fn set_TrackCount(&self, TrackCount: LONG) -> HRESULT;
244    /// The index of the track on the source album.
245    pub unsafe fn TrackNumber(&self, TrackNumber: *mut LONG) -> HRESULT;
246    /// The index of the track on the source album.
247    pub unsafe fn set_TrackNumber(&self, TrackNumber: LONG) -> HRESULT;
248    /// The relative volume adjustment of the track (-100% to 100%).
249    pub unsafe fn VolumeAdjustment(&self, VolumeAdjustment: *mut LONG) -> HRESULT;
250    /// The relative volume adjustment of the track (-100% to 100%).
251    pub unsafe fn set_VolumeAdjustment(&self, VolumeAdjustment: LONG) -> HRESULT;
252    /// The year the track was recorded/released.
253    pub unsafe fn Year(&self, Year: *mut LONG) -> HRESULT;
254    /// The year the track was recorded/released.
255    pub unsafe fn set_Year(&self, Year: LONG) -> HRESULT;
256    /// Returns a collection of artwork.
257    pub unsafe fn Artwork(&self, iArtworkCollection: *mut Option<IITArtworkCollection>) -> HRESULT;
258}
259
260/// IITArtwork Interface
261///
262/// See the generated [`IITArtwork_Impl`] trait for more documentation about each function.
263#[windows::core::interface("D0A6C1F8-BF3D-4CD8-AC47-FE32BDD17257")]
264pub unsafe trait IITArtwork : IDispatch {
265    /// Delete this piece of artwork from the track.
266    pub unsafe fn Delete(&self) -> HRESULT;
267    /// Replace existing artwork data with new artwork from an image file.
268    pub unsafe fn SetArtworkFromFile(&self, filePath: BSTR) -> HRESULT;
269    /// Save artwork data to an image file.
270    pub unsafe fn SaveArtworkToFile(&self, filePath: BSTR) -> HRESULT;
271    /// The format of the artwork.
272    pub unsafe fn Format(&self, Format: *mut ITArtworkFormat) -> HRESULT;
273    /// True if the artwork was downloaded by iTunes.
274    pub unsafe fn IsDownloadedArtwork(&self, IsDownloadedArtwork: *mut VARIANT_BOOL) -> HRESULT;
275    /// The description for the artwork.
276    pub unsafe fn Description(&self, Description: *mut BSTR) -> HRESULT;
277    /// The description for the artwork.
278    pub unsafe fn set_Description(&self, Description: BSTR) -> HRESULT;
279}
280
281/// IITArtworkCollection Interface
282///
283/// See the generated [`IITArtworkCollection_Impl`] trait for more documentation about each function.
284#[windows::core::interface("BF2742D7-418C-4858-9AF9-2981B062D23E")]
285pub unsafe trait IITArtworkCollection : IDispatch {
286    /// Returns the number of pieces of artwork in the collection.
287    pub unsafe fn Count(&self, Count: *mut LONG) -> HRESULT;
288    /// Returns an IITArtwork object corresponding to the given index (1-based).
289    pub unsafe fn Item(&self, Index: LONG, iArtwork: *mut Option<IITArtwork>) -> HRESULT;
290    /// Returns an IEnumVARIANT object which can enumerate the collection.
291    ///
292    /// Note: I have not figured out how to use it (calling `.Skip(1)` on the returned `IEnumVARIANT` causes a `STATUS_ACCESS_VIOLATION`).<br/>
293    /// Feel free to open an issue or a pull request to fix this.
294    pub unsafe fn _NewEnum(&self, iEnumerator: *mut Option<IEnumVARIANT>) -> HRESULT;
295}
296
297/// IITSourceCollection Interface
298///
299/// See the generated [`IITSourceCollection_Impl`] trait for more documentation about each function.
300#[windows::core::interface("2FF6CE20-FF87-4183-B0B3-F323D047AF41")]
301pub unsafe trait IITSourceCollection : IDispatch {
302    /// Returns the number of sources in the collection.
303    pub unsafe fn Count(&self, Count: *mut LONG) -> HRESULT;
304    /// Returns an IITSource object corresponding to the given index (1-based).
305    pub unsafe fn Item(&self, Index: LONG, iSource: *mut Option<IITSource>) -> HRESULT;
306    /// Returns an IITSource object with the specified name.
307    pub unsafe fn ItemByName(&self, Name: BSTR, iSource: *mut Option<IITSource>) -> HRESULT;
308    /// Returns an IEnumVARIANT object which can enumerate the collection.
309    ///
310    /// Note: I have not figured out how to use it (calling `.Skip(1)` on the returned `IEnumVARIANT` causes a `STATUS_ACCESS_VIOLATION`).<br/>
311    /// Feel free to open an issue or a pull request to fix this.
312    pub unsafe fn _NewEnum(&self, iEnumerator: *mut Option<IEnumVARIANT>) -> HRESULT;
313    /// Returns an IITSource object with the specified persistent ID.
314    pub unsafe fn ItemByPersistentID(&self, highID: LONG, lowID: LONG, iSource: *mut Option<IITSource>) -> HRESULT;
315}
316
317/// IITEncoder Interface
318///
319/// See the generated [`IITEncoder_Impl`] trait for more documentation about each function.
320#[windows::core::interface("1CF95A1C-55FE-4F45-A2D3-85AC6C504A73")]
321pub unsafe trait IITEncoder : IDispatch {
322    /// The name of the the encoder.
323    pub unsafe fn Name(&self, Name: *mut BSTR) -> HRESULT;
324    /// The data format created by the encoder.
325    pub unsafe fn Format(&self, Format: *mut BSTR) -> HRESULT;
326}
327
328/// IITEncoderCollection Interface
329///
330/// See the generated [`IITEncoderCollection_Impl`] trait for more documentation about each function.
331#[windows::core::interface("8862BCA9-168D-4549-A9D5-ADB35E553BA6")]
332pub unsafe trait IITEncoderCollection : IDispatch {
333    /// Returns the number of encoders in the collection.
334    pub unsafe fn Count(&self, Count: *mut LONG) -> HRESULT;
335    /// Returns an IITEncoder object corresponding to the given index (1-based).
336    pub unsafe fn Item(&self, Index: LONG, iEncoder: *mut Option<IITEncoder>) -> HRESULT;
337    /// Returns an IITEncoder object with the specified name.
338    pub unsafe fn ItemByName(&self, Name: BSTR, iEncoder: *mut Option<IITEncoder>) -> HRESULT;
339    /// Returns an IEnumVARIANT object which can enumerate the collection.
340    ///
341    /// Note: I have not figured out how to use it (calling `.Skip(1)` on the returned `IEnumVARIANT` causes a `STATUS_ACCESS_VIOLATION`).<br/>
342    /// Feel free to open an issue or a pull request to fix this.
343    pub unsafe fn _NewEnum(&self, iEnumerator: *mut Option<IEnumVARIANT>) -> HRESULT;
344}
345
346/// IITEQPreset Interface
347///
348/// See the generated [`IITEQPreset_Impl`] trait for more documentation about each function.
349#[windows::core::interface("5BE75F4F-68FA-4212-ACB7-BE44EA569759")]
350pub unsafe trait IITEQPreset : IDispatch {
351    /// The name of the the EQ preset.
352    pub unsafe fn Name(&self, Name: *mut BSTR) -> HRESULT;
353    /// True if this EQ preset can be modified.
354    pub unsafe fn Modifiable(&self, isModifiable: *mut VARIANT_BOOL) -> HRESULT;
355    /// The equalizer preamp level (-12.0 db to +12.0 db).
356    pub unsafe fn Preamp(&self, level: *mut DOUBLE) -> HRESULT;
357    /// The equalizer preamp level (-12.0 db to +12.0 db).
358    pub unsafe fn set_Preamp(&self, level: DOUBLE) -> HRESULT;
359    /// The equalizer 32Hz band level (-12.0 db to +12.0 db).
360    pub unsafe fn Band1(&self, level: *mut DOUBLE) -> HRESULT;
361    /// The equalizer 32Hz band level (-12.0 db to +12.0 db).
362    pub unsafe fn set_Band1(&self, level: DOUBLE) -> HRESULT;
363    /// The equalizer 64Hz band level (-12.0 db to +12.0 db).
364    pub unsafe fn Band2(&self, level: *mut DOUBLE) -> HRESULT;
365    /// The equalizer 64Hz band level (-12.0 db to +12.0 db).
366    pub unsafe fn set_Band2(&self, level: DOUBLE) -> HRESULT;
367    /// The equalizer 125Hz band level (-12.0 db to +12.0 db).
368    pub unsafe fn Band3(&self, level: *mut DOUBLE) -> HRESULT;
369    /// The equalizer 125Hz band level (-12.0 db to +12.0 db).
370    pub unsafe fn set_Band3(&self, level: DOUBLE) -> HRESULT;
371    /// The equalizer 250Hz band level (-12.0 db to +12.0 db).
372    pub unsafe fn Band4(&self, level: *mut DOUBLE) -> HRESULT;
373    /// The equalizer 250Hz band level (-12.0 db to +12.0 db).
374    pub unsafe fn set_Band4(&self, level: DOUBLE) -> HRESULT;
375    /// The equalizer 500Hz band level (-12.0 db to +12.0 db).
376    pub unsafe fn Band5(&self, level: *mut DOUBLE) -> HRESULT;
377    /// The equalizer 500Hz band level (-12.0 db to +12.0 db).
378    pub unsafe fn set_Band5(&self, level: DOUBLE) -> HRESULT;
379    /// The equalizer 1KHz band level (-12.0 db to +12.0 db).
380    pub unsafe fn Band6(&self, level: *mut DOUBLE) -> HRESULT;
381    /// The equalizer 1KHz band level (-12.0 db to +12.0 db).
382    pub unsafe fn set_Band6(&self, level: DOUBLE) -> HRESULT;
383    /// The equalizer 2KHz band level (-12.0 db to +12.0 db).
384    pub unsafe fn Band7(&self, level: *mut DOUBLE) -> HRESULT;
385    /// The equalizer 2KHz band level (-12.0 db to +12.0 db).
386    pub unsafe fn set_Band7(&self, level: DOUBLE) -> HRESULT;
387    /// The equalizer 4KHz band level (-12.0 db to +12.0 db).
388    pub unsafe fn Band8(&self, level: *mut DOUBLE) -> HRESULT;
389    /// The equalizer 4KHz band level (-12.0 db to +12.0 db).
390    pub unsafe fn set_Band8(&self, level: DOUBLE) -> HRESULT;
391    /// The equalizer 8KHz band level (-12.0 db to +12.0 db).
392    pub unsafe fn Band9(&self, level: *mut DOUBLE) -> HRESULT;
393    /// The equalizer 8KHz band level (-12.0 db to +12.0 db).
394    pub unsafe fn set_Band9(&self, level: DOUBLE) -> HRESULT;
395    /// The equalizer 16KHz band level (-12.0 db to +12.0 db).
396    pub unsafe fn Band10(&self, level: *mut DOUBLE) -> HRESULT;
397    /// The equalizer 16KHz band level (-12.0 db to +12.0 db).
398    pub unsafe fn set_Band10(&self, level: DOUBLE) -> HRESULT;
399    /// Delete this EQ preset.
400    pub unsafe fn Delete(&self, updateAllTracks: VARIANT_BOOL) -> HRESULT;
401    /// Rename this EQ preset.
402    pub unsafe fn Rename(&self, newName: BSTR, updateAllTracks: VARIANT_BOOL) -> HRESULT;
403}
404
405/// IITEQPresetCollection Interface
406///
407/// See the generated [`IITEQPresetCollection_Impl`] trait for more documentation about each function.
408#[windows::core::interface("AEF4D111-3331-48DA-B0C2-B468D5D61D08")]
409pub unsafe trait IITEQPresetCollection : IDispatch {
410    /// Returns the number of EQ presets in the collection.
411    pub unsafe fn Count(&self, Count: *mut LONG) -> HRESULT;
412    /// Returns an IITEQPreset object corresponding to the given index (1-based).
413    pub unsafe fn Item(&self, Index: LONG, iEQPreset: *mut Option<IITEQPreset>) -> HRESULT;
414    /// Returns an IITEQPreset object with the specified name.
415    pub unsafe fn ItemByName(&self, Name: BSTR, iEQPreset: *mut Option<IITEQPreset>) -> HRESULT;
416    /// Returns an IEnumVARIANT object which can enumerate the collection.
417    ///
418    /// Note: I have not figured out how to use it (calling `.Skip(1)` on the returned `IEnumVARIANT` causes a `STATUS_ACCESS_VIOLATION`).<br/>
419    /// Feel free to open an issue or a pull request to fix this.
420    pub unsafe fn _NewEnum(&self, iEnumerator: *mut Option<IEnumVARIANT>) -> HRESULT;
421}
422
423/// IITOperationStatus Interface
424///
425/// See the generated [`IITOperationStatus_Impl`] trait for more documentation about each function.
426#[windows::core::interface("206479C9-FE32-4F9B-A18A-475AC939B479")]
427pub unsafe trait IITOperationStatus : IDispatch {
428    /// True if the operation is still in progress.
429    pub unsafe fn InProgress(&self, isInProgress: *mut VARIANT_BOOL) -> HRESULT;
430    /// Returns a collection containing the tracks that were generated by the operation.
431    pub unsafe fn Tracks(&self, iTrackCollection: *mut Option<IITTrackCollection>) -> HRESULT;
432}
433
434/// IITConvertOperationStatus Interface
435///
436/// See the generated [`IITConvertOperationStatus_Impl`] trait for more documentation about each function.
437#[windows::core::interface("7063AAF6-ABA0-493B-B4FC-920A9F105875")]
438pub unsafe trait IITConvertOperationStatus : IITOperationStatus {
439    /// Returns the current conversion status.
440    pub unsafe fn GetConversionStatus(&self, trackName: *mut BSTR, progressValue: *mut LONG, maxProgressValue: *mut LONG) -> HRESULT;
441    /// Stops the current conversion operation.
442    pub unsafe fn StopConversion(&self) -> HRESULT;
443    /// Returns the name of the track currently being converted.
444    pub unsafe fn trackName(&self, trackName: *mut BSTR) -> HRESULT;
445    /// Returns the current progress value for the track being converted.
446    pub unsafe fn progressValue(&self, progressValue: *mut LONG) -> HRESULT;
447    /// Returns the maximum progress value for the track being converted.
448    pub unsafe fn maxProgressValue(&self, maxProgressValue: *mut LONG) -> HRESULT;
449}
450
451/// IITLibraryPlaylist Interface
452///
453/// See the generated [`IITLibraryPlaylist_Impl`] trait for more documentation about each function.
454#[windows::core::interface("53AE1704-491C-4289-94A0-958815675A3D")]
455pub unsafe trait IITLibraryPlaylist : IITPlaylist {
456    /// Add the specified file path to the library.
457    pub unsafe fn AddFile(&self, filePath: BSTR, iStatus: *mut Option<IITOperationStatus>) -> HRESULT;
458    /// Add the specified array of file paths to the library. filePaths can be of type VT_ARRAY|VT_VARIANT, where each entry is a VT_BSTR, or VT_ARRAY|VT_BSTR.  You can also pass a JScript Array object.
459    pub unsafe fn AddFiles(&self, filePaths: *const VARIANT, iStatus: *mut Option<IITOperationStatus>) -> HRESULT;
460    /// Add the specified streaming audio URL to the library.
461    pub unsafe fn AddURL(&self, URL: BSTR, iURLTrack: *mut Option<IITURLTrack>) -> HRESULT;
462    /// Add the specified track to the library.  iTrackToAdd is a VARIANT of type VT_DISPATCH that points to an IITTrack.
463    pub unsafe fn AddTrack(&self, iTrackToAdd: *const VARIANT, iAddedTrack: *mut Option<IITTrack>) -> HRESULT;
464}
465
466/// IITURLTrack Interface
467///
468/// See the generated [`IITURLTrack_Impl`] trait for more documentation about each function.
469#[windows::core::interface("1116E3B5-29FD-4393-A7BD-454E5E327900")]
470pub unsafe trait IITURLTrack : IITTrack {
471    /// The URL of the stream represented by this track.
472    pub unsafe fn URL(&self, URL: *mut BSTR) -> HRESULT;
473    /// The URL of the stream represented by this track.
474    pub unsafe fn set_URL(&self, URL: BSTR) -> HRESULT;
475    /// True if this is a podcast track.
476    pub unsafe fn Podcast(&self, isPodcast: *mut VARIANT_BOOL) -> HRESULT;
477    /// Update the podcast feed for this track.
478    pub unsafe fn UpdatePodcastFeed(&self) -> HRESULT;
479    /// Start downloading the podcast episode that corresponds to this track.
480    pub unsafe fn DownloadPodcastEpisode(&self) -> HRESULT;
481    /// Category for the track.
482    pub unsafe fn Category(&self, Category: *mut BSTR) -> HRESULT;
483    /// Category for the track.
484    pub unsafe fn set_Category(&self, Category: BSTR) -> HRESULT;
485    /// Description for the track.
486    pub unsafe fn Description(&self, Description: *mut BSTR) -> HRESULT;
487    /// Description for the track.
488    pub unsafe fn set_Description(&self, Description: BSTR) -> HRESULT;
489    /// Long description for the track.
490    pub unsafe fn LongDescription(&self, LongDescription: *mut BSTR) -> HRESULT;
491    /// Long description for the track.
492    pub unsafe fn set_LongDescription(&self, LongDescription: BSTR) -> HRESULT;
493    /// Reveal the track in the main browser window.
494    pub unsafe fn Reveal(&self) -> HRESULT;
495    /// The user or computed rating of the album that this track belongs to (0 to 100).
496    pub unsafe fn AlbumRating(&self, Rating: *mut LONG) -> HRESULT;
497    /// The user or computed rating of the album that this track belongs to (0 to 100).
498    pub unsafe fn set_AlbumRating(&self, Rating: LONG) -> HRESULT;
499    /// The album rating kind.
500    pub unsafe fn AlbumRatingKind(&self, ratingKind: *mut ITRatingKind) -> HRESULT;
501    /// The track rating kind.
502    pub unsafe fn ratingKind(&self, ratingKind: *mut ITRatingKind) -> HRESULT;
503    /// Returns a collection of playlists that contain the song that this track represents.
504    pub unsafe fn Playlists(&self, iPlaylistCollection: *mut Option<IITPlaylistCollection>) -> HRESULT;
505}
506
507/// IITUserPlaylist Interface
508///
509/// See the generated [`IITUserPlaylist_Impl`] trait for more documentation about each function.
510#[windows::core::interface("0A504DED-A0B5-465A-8A94-50E20D7DF692")]
511pub unsafe trait IITUserPlaylist : IITPlaylist {
512    /// Add the specified file path to the user playlist.
513    pub unsafe fn AddFile(&self, filePath: BSTR, iStatus: *mut Option<IITOperationStatus>) -> HRESULT;
514    /// Add the specified array of file paths to the user playlist. filePaths can be of type VT_ARRAY|VT_VARIANT, where each entry is a VT_BSTR, or VT_ARRAY|VT_BSTR.  You can also pass a JScript Array object.
515    pub unsafe fn AddFiles(&self, filePaths: *const VARIANT, iStatus: *mut Option<IITOperationStatus>) -> HRESULT;
516    /// Add the specified streaming audio URL to the user playlist.
517    pub unsafe fn AddURL(&self, URL: BSTR, iURLTrack: *mut Option<IITURLTrack>) -> HRESULT;
518    /// Add the specified track to the user playlist.  iTrackToAdd is a VARIANT of type VT_DISPATCH that points to an IITTrack.
519    pub unsafe fn AddTrack(&self, iTrackToAdd: *const VARIANT, iAddedTrack: *mut Option<IITTrack>) -> HRESULT;
520    /// True if the user playlist is being shared.
521    pub unsafe fn Shared(&self, isShared: *mut VARIANT_BOOL) -> HRESULT;
522    /// True if the user playlist is being shared.
523    pub unsafe fn set_Shared(&self, isShared: VARIANT_BOOL) -> HRESULT;
524    /// True if this is a smart playlist.
525    pub unsafe fn Smart(&self, isSmart: *mut VARIANT_BOOL) -> HRESULT;
526    /// The playlist special kind.
527    pub unsafe fn SpecialKind(&self, SpecialKind: *mut ITUserPlaylistSpecialKind) -> HRESULT;
528    /// The parent of this playlist.
529    pub unsafe fn Parent(&self, iParentPlayList: *mut Option<IITUserPlaylist>) -> HRESULT;
530    /// Creates a new playlist in a folder playlist.
531    pub unsafe fn CreatePlaylist(&self, playlistName: BSTR, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
532    /// Creates a new folder in a folder playlist.
533    pub unsafe fn CreateFolder(&self, folderName: BSTR, iFolder: *mut Option<IITPlaylist>) -> HRESULT;
534    /// The parent of this playlist.
535    pub unsafe fn set_Parent(&self, iParentPlayList: *const VARIANT) -> HRESULT;
536    /// Reveal the user playlist in the main browser window.
537    pub unsafe fn Reveal(&self) -> HRESULT;
538}
539
540/// IITVisual Interface
541///
542/// See the generated [`IITVisual_Impl`] trait for more documentation about each function.
543#[windows::core::interface("340F3315-ED72-4C09-9ACF-21EB4BDF9931")]
544pub unsafe trait IITVisual : IDispatch {
545    /// The name of the the visual plug-in.
546    pub unsafe fn Name(&self, Name: *mut BSTR) -> HRESULT;
547}
548
549/// IITVisualCollection Interface
550///
551/// See the generated [`IITVisualCollection_Impl`] trait for more documentation about each function.
552#[windows::core::interface("88A4CCDD-114F-4043-B69B-84D4E6274957")]
553pub unsafe trait IITVisualCollection : IDispatch {
554    /// Returns the number of visual plug-ins in the collection.
555    pub unsafe fn Count(&self, Count: *mut LONG) -> HRESULT;
556    /// Returns an IITVisual object corresponding to the given index (1-based).
557    pub unsafe fn Item(&self, Index: LONG, iVisual: *mut Option<IITVisual>) -> HRESULT;
558    /// Returns an IITVisual object with the specified name.
559    pub unsafe fn ItemByName(&self, Name: BSTR, iVisual: *mut Option<IITVisual>) -> HRESULT;
560    /// Returns an IEnumVARIANT object which can enumerate the collection.
561    ///
562    /// Note: I have not figured out how to use it (calling `.Skip(1)` on the returned `IEnumVARIANT` causes a `STATUS_ACCESS_VIOLATION`).<br/>
563    /// Feel free to open an issue or a pull request to fix this.
564    pub unsafe fn _NewEnum(&self, iEnumerator: *mut Option<IEnumVARIANT>) -> HRESULT;
565}
566
567/// IITWindow Interface
568///
569/// See the generated [`IITWindow_Impl`] trait for more documentation about each function.
570#[windows::core::interface("370D7BE0-3A89-4A42-B902-C75FC138BE09")]
571pub unsafe trait IITWindow : IDispatch {
572    /// The title of the window.
573    pub unsafe fn Name(&self, Name: *mut BSTR) -> HRESULT;
574    /// The window kind.
575    pub unsafe fn Kind(&self, Kind: *mut ITWindowKind) -> HRESULT;
576    /// True if the window is visible. Note that the main browser window cannot be hidden.
577    pub unsafe fn Visible(&self, isVisible: *mut VARIANT_BOOL) -> HRESULT;
578    /// True if the window is visible. Note that the main browser window cannot be hidden.
579    pub unsafe fn set_Visible(&self, isVisible: VARIANT_BOOL) -> HRESULT;
580    /// True if the window is resizable.
581    pub unsafe fn Resizable(&self, isResizable: *mut VARIANT_BOOL) -> HRESULT;
582    /// True if the window is minimized.
583    pub unsafe fn Minimized(&self, isMinimized: *mut VARIANT_BOOL) -> HRESULT;
584    /// True if the window is minimized.
585    pub unsafe fn set_Minimized(&self, isMinimized: VARIANT_BOOL) -> HRESULT;
586    /// True if the window is maximizable.
587    pub unsafe fn Maximizable(&self, isMaximizable: *mut VARIANT_BOOL) -> HRESULT;
588    /// True if the window is maximized.
589    pub unsafe fn Maximized(&self, isMaximized: *mut VARIANT_BOOL) -> HRESULT;
590    /// True if the window is maximized.
591    pub unsafe fn set_Maximized(&self, isMaximized: VARIANT_BOOL) -> HRESULT;
592    /// True if the window is zoomable.
593    pub unsafe fn Zoomable(&self, isZoomable: *mut VARIANT_BOOL) -> HRESULT;
594    /// True if the window is zoomed.
595    pub unsafe fn Zoomed(&self, isZoomed: *mut VARIANT_BOOL) -> HRESULT;
596    /// True if the window is zoomed.
597    pub unsafe fn set_Zoomed(&self, isZoomed: VARIANT_BOOL) -> HRESULT;
598    /// The screen coordinate of the top edge of the window.
599    pub unsafe fn Top(&self, Top: *mut LONG) -> HRESULT;
600    /// The screen coordinate of the top edge of the window.
601    pub unsafe fn set_Top(&self, Top: LONG) -> HRESULT;
602    /// The screen coordinate of the left edge of the window.
603    pub unsafe fn Left(&self, Left: *mut LONG) -> HRESULT;
604    /// The screen coordinate of the left edge of the window.
605    pub unsafe fn set_Left(&self, Left: LONG) -> HRESULT;
606    /// The screen coordinate of the bottom edge of the window.
607    pub unsafe fn Bottom(&self, Bottom: *mut LONG) -> HRESULT;
608    /// The screen coordinate of the bottom edge of the window.
609    pub unsafe fn set_Bottom(&self, Bottom: LONG) -> HRESULT;
610    /// The screen coordinate of the right edge of the window.
611    pub unsafe fn Right(&self, Right: *mut LONG) -> HRESULT;
612    /// The screen coordinate of the right edge of the window.
613    pub unsafe fn set_Right(&self, Right: LONG) -> HRESULT;
614    /// The width of the window.
615    pub unsafe fn Width(&self, Width: *mut LONG) -> HRESULT;
616    /// The width of the window.
617    pub unsafe fn set_Width(&self, Width: LONG) -> HRESULT;
618    /// The height of the window.
619    pub unsafe fn Height(&self, Height: *mut LONG) -> HRESULT;
620    /// The height of the window.
621    pub unsafe fn set_Height(&self, Height: LONG) -> HRESULT;
622}
623
624/// IITBrowserWindow Interface
625///
626/// See the generated [`IITBrowserWindow_Impl`] trait for more documentation about each function.
627#[windows::core::interface("C999F455-C4D5-4AA4-8277-F99753699974")]
628pub unsafe trait IITBrowserWindow : IITWindow {
629    /// True if window is in MiniPlayer mode.
630    pub unsafe fn MiniPlayer(&self, isMiniPlayer: *mut VARIANT_BOOL) -> HRESULT;
631    /// True if window is in MiniPlayer mode.
632    pub unsafe fn set_MiniPlayer(&self, isMiniPlayer: VARIANT_BOOL) -> HRESULT;
633    /// Returns a collection containing the currently selected track or tracks.
634    pub unsafe fn SelectedTracks(&self, iTrackCollection: *mut Option<IITTrackCollection>) -> HRESULT;
635    /// The currently selected playlist in the Source list.
636    pub unsafe fn SelectedPlaylist(&self, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
637    /// The currently selected playlist in the Source list.
638    pub unsafe fn set_SelectedPlaylist(&self, iPlaylist: *const VARIANT) -> HRESULT;
639}
640
641/// IITWindowCollection Interface
642///
643/// See the generated [`IITWindowCollection_Impl`] trait for more documentation about each function.
644#[windows::core::interface("3D8DE381-6C0E-481F-A865-E2385F59FA43")]
645pub unsafe trait IITWindowCollection : IDispatch {
646    /// Returns the number of windows in the collection.
647    pub unsafe fn Count(&self, Count: *mut LONG) -> HRESULT;
648    /// Returns an IITWindow object corresponding to the given index (1-based).
649    pub unsafe fn Item(&self, Index: LONG, iWindow: *mut Option<IITWindow>) -> HRESULT;
650    /// Returns an IITWindow object with the specified name.
651    pub unsafe fn ItemByName(&self, Name: BSTR, iWindow: *mut Option<IITWindow>) -> HRESULT;
652    /// Returns an IEnumVARIANT object which can enumerate the collection.
653    ///
654    /// Note: I have not figured out how to use it (calling `.Skip(1)` on the returned `IEnumVARIANT` causes a `STATUS_ACCESS_VIOLATION`).<br/>
655    /// Feel free to open an issue or a pull request to fix this.
656    pub unsafe fn _NewEnum(&self, iEnumerator: *mut Option<IEnumVARIANT>) -> HRESULT;
657}
658
659/// IiTunes Interface
660///
661/// See the generated [`IiTunes_Impl`] trait for more documentation about each function.
662#[windows::core::interface("9DD6680B-3EDC-40DB-A771-E6FE4832E34A")]
663pub unsafe trait IiTunes : IDispatch {
664    /// Reposition to the beginning of the current track or go to the previous track if already at start of current track.
665    pub unsafe fn BackTrack(&self) -> HRESULT;
666    /// Skip forward in a playing track.
667    pub unsafe fn FastForward(&self) -> HRESULT;
668    /// Advance to the next track in the current playlist.
669    pub unsafe fn NextTrack(&self) -> HRESULT;
670    /// Pause playback.
671    pub unsafe fn Pause(&self) -> HRESULT;
672    /// Play the currently targeted track.
673    pub unsafe fn Play(&self) -> HRESULT;
674    /// Play the specified file path, adding it to the library if not already present.
675    pub unsafe fn PlayFile(&self, filePath: BSTR) -> HRESULT;
676    /// Toggle the playing/paused state of the current track.
677    pub unsafe fn PlayPause(&self) -> HRESULT;
678    /// Return to the previous track in the current playlist.
679    pub unsafe fn PreviousTrack(&self) -> HRESULT;
680    /// Disable fast forward/rewind and resume playback, if playing.
681    pub unsafe fn Resume(&self) -> HRESULT;
682    /// Skip backwards in a playing track.
683    pub unsafe fn Rewind(&self) -> HRESULT;
684    /// Stop playback.
685    pub unsafe fn Stop(&self) -> HRESULT;
686    /// Start converting the specified file path.
687    pub unsafe fn ConvertFile(&self, filePath: BSTR, iStatus: *mut Option<IITOperationStatus>) -> HRESULT;
688    /// Start converting the specified array of file paths. filePaths can be of type VT_ARRAY|VT_VARIANT, where each entry is a VT_BSTR, or VT_ARRAY|VT_BSTR.  You can also pass a JScript Array object.
689    pub unsafe fn ConvertFiles(&self, filePaths: *const VARIANT, iStatus: *mut Option<IITOperationStatus>) -> HRESULT;
690    /// Start converting the specified track.  iTrackToConvert is a VARIANT of type VT_DISPATCH that points to an IITTrack.
691    pub unsafe fn ConvertTrack(&self, iTrackToConvert: *const VARIANT, iStatus: *mut Option<IITOperationStatus>) -> HRESULT;
692    /// Start converting the specified tracks.  iTracksToConvert is a VARIANT of type VT_DISPATCH that points to an IITTrackCollection.
693    pub unsafe fn ConvertTracks(&self, iTracksToConvert: *const VARIANT, iStatus: *mut Option<IITOperationStatus>) -> HRESULT;
694    /// Returns true if this version of the iTunes type library is compatible with the specified version.
695    pub unsafe fn CheckVersion(&self, majorVersion: LONG, minorVersion: LONG, isCompatible: *mut VARIANT_BOOL) -> HRESULT;
696    /// Returns an IITObject corresponding to the specified IDs.
697    pub unsafe fn GetITObjectByID(&self, sourceID: LONG, playlistID: LONG, trackID: LONG, databaseID: LONG, iObject: *mut Option<IITObject>) -> HRESULT;
698    /// Creates a new playlist in the main library.
699    pub unsafe fn CreatePlaylist(&self, playlistName: BSTR, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
700    /// Open the specified iTunes Store or streaming audio URL.
701    pub unsafe fn OpenURL(&self, URL: BSTR) -> HRESULT;
702    /// Go to the iTunes Store home page.
703    pub unsafe fn GotoMusicStoreHomePage(&self) -> HRESULT;
704    /// Update the contents of the iPod.
705    pub unsafe fn UpdateIPod(&self) -> HRESULT;
706    /// [id(0x60020015)]
707    /// (no other documentation provided)
708    pub unsafe fn Authorize(&self, numElems: LONG, data: *const VARIANT, names: *const BSTR) -> HRESULT;
709    /// Exits the iTunes application.
710    pub unsafe fn Quit(&self) -> HRESULT;
711    /// Returns a collection of music sources (music library, CD, device, etc.).
712    pub unsafe fn Sources(&self, iSourceCollection: *mut Option<IITSourceCollection>) -> HRESULT;
713    /// Returns a collection of encoders.
714    pub unsafe fn Encoders(&self, iEncoderCollection: *mut Option<IITEncoderCollection>) -> HRESULT;
715    /// Returns a collection of EQ presets.
716    pub unsafe fn EQPresets(&self, iEQPresetCollection: *mut Option<IITEQPresetCollection>) -> HRESULT;
717    /// Returns a collection of visual plug-ins.
718    pub unsafe fn Visuals(&self, iVisualCollection: *mut Option<IITVisualCollection>) -> HRESULT;
719    /// Returns a collection of windows.
720    pub unsafe fn Windows(&self, iWindowCollection: *mut Option<IITWindowCollection>) -> HRESULT;
721    /// Returns the sound output volume (0 = minimum, 100 = maximum).
722    pub unsafe fn SoundVolume(&self, volume: *mut LONG) -> HRESULT;
723    /// Returns the sound output volume (0 = minimum, 100 = maximum).
724    pub unsafe fn set_SoundVolume(&self, volume: LONG) -> HRESULT;
725    /// True if sound output is muted.
726    pub unsafe fn Mute(&self, isMuted: *mut VARIANT_BOOL) -> HRESULT;
727    /// True if sound output is muted.
728    pub unsafe fn set_Mute(&self, isMuted: VARIANT_BOOL) -> HRESULT;
729    /// Returns the current player state.
730    pub unsafe fn PlayerState(&self, PlayerState: *mut ITPlayerState) -> HRESULT;
731    /// Returns the player's position within the currently playing track in seconds.
732    pub unsafe fn PlayerPosition(&self, playerPos: *mut LONG) -> HRESULT;
733    /// Returns the player's position within the currently playing track in seconds.
734    pub unsafe fn set_PlayerPosition(&self, playerPos: LONG) -> HRESULT;
735    /// Returns the currently selected encoder (AAC, MP3, AIFF, WAV, etc.).
736    pub unsafe fn CurrentEncoder(&self, iEncoder: *mut Option<IITEncoder>) -> HRESULT;
737    /// Returns the currently selected encoder (AAC, MP3, AIFF, WAV, etc.).
738    pub unsafe fn set_CurrentEncoder(&self, iEncoder: *const IITEncoder) -> HRESULT;
739    /// True if visuals are currently being displayed.
740    pub unsafe fn VisualsEnabled(&self, isEnabled: *mut VARIANT_BOOL) -> HRESULT;
741    /// True if visuals are currently being displayed.
742    pub unsafe fn set_VisualsEnabled(&self, isEnabled: VARIANT_BOOL) -> HRESULT;
743    /// True if the visuals are displayed using the entire screen.
744    pub unsafe fn FullScreenVisuals(&self, isFullScreen: *mut VARIANT_BOOL) -> HRESULT;
745    /// True if the visuals are displayed using the entire screen.
746    pub unsafe fn set_FullScreenVisuals(&self, isFullScreen: VARIANT_BOOL) -> HRESULT;
747    /// Returns the size of the displayed visual.
748    pub unsafe fn VisualSize(&self, VisualSize: *mut ITVisualSize) -> HRESULT;
749    /// Returns the size of the displayed visual.
750    pub unsafe fn set_VisualSize(&self, VisualSize: ITVisualSize) -> HRESULT;
751    /// Returns the currently selected visual plug-in.
752    pub unsafe fn CurrentVisual(&self, iVisual: *mut Option<IITVisual>) -> HRESULT;
753    /// Returns the currently selected visual plug-in.
754    pub unsafe fn set_CurrentVisual(&self, iVisual: *const IITVisual) -> HRESULT;
755    /// True if the equalizer is enabled.
756    pub unsafe fn EQEnabled(&self, isEnabled: *mut VARIANT_BOOL) -> HRESULT;
757    /// True if the equalizer is enabled.
758    pub unsafe fn set_EQEnabled(&self, isEnabled: VARIANT_BOOL) -> HRESULT;
759    /// Returns the currently selected EQ preset.
760    pub unsafe fn CurrentEQPreset(&self, iEQPreset: *mut Option<IITEQPreset>) -> HRESULT;
761    /// Returns the currently selected EQ preset.
762    pub unsafe fn set_CurrentEQPreset(&self, iEQPreset: *const IITEQPreset) -> HRESULT;
763    /// The name of the current song in the playing stream (provided by streaming server).
764    pub unsafe fn CurrentStreamTitle(&self, streamTitle: *mut BSTR) -> HRESULT;
765    /// The URL of the playing stream or streaming web site (provided by streaming server).
766    pub unsafe fn set_CurrentStreamURL(&self, streamURL: *mut BSTR) -> HRESULT;
767    /// Returns the main iTunes browser window.
768    pub unsafe fn BrowserWindow(&self, iBrowserWindow: *mut Option<IITBrowserWindow>) -> HRESULT;
769    /// Returns the EQ window.
770    pub unsafe fn EQWindow(&self, iEQWindow: *mut Option<IITWindow>) -> HRESULT;
771    /// Returns the source that represents the main library.
772    pub unsafe fn LibrarySource(&self, iLibrarySource: *mut Option<IITSource>) -> HRESULT;
773    /// Returns the main library playlist in the main library source.
774    pub unsafe fn LibraryPlaylist(&self, iLibraryPlaylist: *mut Option<IITLibraryPlaylist>) -> HRESULT;
775    /// Returns the currently targeted track.
776    pub unsafe fn CurrentTrack(&self, iTrack: *mut Option<IITTrack>) -> HRESULT;
777    /// Returns the playlist containing the currently targeted track.
778    pub unsafe fn CurrentPlaylist(&self, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
779    /// Returns a collection containing the currently selected track or tracks.
780    pub unsafe fn SelectedTracks(&self, iTrackCollection: *mut Option<IITTrackCollection>) -> HRESULT;
781    /// Returns the version of the iTunes application.
782    pub unsafe fn Version(&self, Version: *mut BSTR) -> HRESULT;
783    /// [id(0x6002003b)]
784    /// (no other documentation provided)
785    pub unsafe fn SetOptions(&self, options: LONG) -> HRESULT;
786    /// Start converting the specified file path.
787    pub unsafe fn ConvertFile2(&self, filePath: BSTR, iStatus: *mut Option<IITConvertOperationStatus>) -> HRESULT;
788    /// Start converting the specified array of file paths. filePaths can be of type VT_ARRAY|VT_VARIANT, where each entry is a VT_BSTR, or VT_ARRAY|VT_BSTR.  You can also pass a JScript Array object.
789    pub unsafe fn ConvertFiles2(&self, filePaths: *const VARIANT, iStatus: *mut Option<IITConvertOperationStatus>) -> HRESULT;
790    /// Start converting the specified track.  iTrackToConvert is a VARIANT of type VT_DISPATCH that points to an IITTrack.
791    pub unsafe fn ConvertTrack2(&self, iTrackToConvert: *const VARIANT, iStatus: *mut Option<IITConvertOperationStatus>) -> HRESULT;
792    /// Start converting the specified tracks.  iTracksToConvert is a VARIANT of type VT_DISPATCH that points to an IITTrackCollection.
793    pub unsafe fn ConvertTracks2(&self, iTracksToConvert: *const VARIANT, iStatus: *mut Option<IITConvertOperationStatus>) -> HRESULT;
794    /// True if iTunes will process APPCOMMAND Windows messages.
795    pub unsafe fn AppCommandMessageProcessingEnabled(&self, isEnabled: *mut VARIANT_BOOL) -> HRESULT;
796    /// True if iTunes will process APPCOMMAND Windows messages.
797    pub unsafe fn set_AppCommandMessageProcessingEnabled(&self, isEnabled: VARIANT_BOOL) -> HRESULT;
798    /// True if iTunes will force itself to be the foreground application when it displays a dialog.
799    pub unsafe fn ForceToForegroundOnDialog(&self, ForceToForegroundOnDialog: *mut VARIANT_BOOL) -> HRESULT;
800    /// True if iTunes will force itself to be the foreground application when it displays a dialog.
801    pub unsafe fn set_ForceToForegroundOnDialog(&self, ForceToForegroundOnDialog: VARIANT_BOOL) -> HRESULT;
802    /// Create a new EQ preset.
803    pub unsafe fn CreateEQPreset(&self, eqPresetName: BSTR, iEQPreset: *mut Option<IITEQPreset>) -> HRESULT;
804    /// Creates a new playlist in an existing source.
805    pub unsafe fn CreatePlaylistInSource(&self, playlistName: BSTR, iSource: *const VARIANT, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
806    /// Retrieves the current state of the player buttons.
807    pub unsafe fn GetPlayerButtonsState(&self, previousEnabled: *mut VARIANT_BOOL, playPauseStopState: *mut ITPlayButtonState, nextEnabled: *mut VARIANT_BOOL) -> HRESULT;
808    /// Simulate click on a player control button.
809    pub unsafe fn PlayerButtonClicked(&self, playerButton: ITPlayerButton, playerButtonModifierKeys: LONG) -> HRESULT;
810    /// True if the Shuffle property is writable for the specified playlist.
811    pub unsafe fn CanSetShuffle(&self, iPlaylist: *const VARIANT, CanSetShuffle: *mut VARIANT_BOOL) -> HRESULT;
812    /// True if the SongRepeat property is writable for the specified playlist.
813    pub unsafe fn CanSetSongRepeat(&self, iPlaylist: *const VARIANT, CanSetSongRepeat: *mut VARIANT_BOOL) -> HRESULT;
814    /// Returns an IITConvertOperationStatus object if there is currently a conversion in progress.
815    pub unsafe fn ConvertOperationStatus(&self, iStatus: *mut Option<IITConvertOperationStatus>) -> HRESULT;
816    /// Subscribe to the specified podcast feed URL.
817    pub unsafe fn SubscribeToPodcast(&self, URL: BSTR) -> HRESULT;
818    /// Update all podcast feeds.
819    pub unsafe fn UpdatePodcastFeeds(&self) -> HRESULT;
820    /// Creates a new folder in the main library.
821    pub unsafe fn CreateFolder(&self, folderName: BSTR, iFolder: *mut Option<IITPlaylist>) -> HRESULT;
822    /// Creates a new folder in an existing source.
823    pub unsafe fn CreateFolderInSource(&self, folderName: BSTR, iSource: *const VARIANT, iFolder: *mut Option<IITPlaylist>) -> HRESULT;
824    /// True if the sound volume control is enabled.
825    pub unsafe fn SoundVolumeControlEnabled(&self, isEnabled: *mut VARIANT_BOOL) -> HRESULT;
826    /// The full path to the current iTunes library XML file.
827    pub unsafe fn LibraryXMLPath(&self, filePath: *mut BSTR) -> HRESULT;
828    /// Returns the high 32 bits of the persistent ID of the specified IITObject.
829    pub unsafe fn ITObjectPersistentIDHigh(&self, iObject: *const VARIANT, highID: *mut LONG) -> HRESULT;
830    /// Returns the low 32 bits of the persistent ID of the specified IITObject.
831    pub unsafe fn ITObjectPersistentIDLow(&self, iObject: *const VARIANT, lowID: *mut LONG) -> HRESULT;
832    /// Returns the high and low 32 bits of the persistent ID of the specified IITObject.
833    pub unsafe fn GetITObjectPersistentIDs(&self, iObject: *const VARIANT, highID: *mut LONG, lowID: *mut LONG) -> HRESULT;
834    /// Returns the player's position within the currently playing track in milliseconds.
835    pub unsafe fn PlayerPositionMS(&self, playerPos: *mut LONG) -> HRESULT;
836    /// Returns the player's position within the currently playing track in milliseconds.
837    pub unsafe fn set_PlayerPositionMS(&self, playerPos: LONG) -> HRESULT;
838}
839
840/// IITAudioCDPlaylist Interface
841///
842/// See the generated [`IITAudioCDPlaylist_Impl`] trait for more documentation about each function.
843#[windows::core::interface("CF496DF3-0FED-4D7D-9BD8-529B6E8A082E")]
844pub unsafe trait IITAudioCDPlaylist : IITPlaylist {
845    /// The artist of the CD.
846    pub unsafe fn Artist(&self, Artist: *mut BSTR) -> HRESULT;
847    /// True if this CD is a compilation album.
848    pub unsafe fn Compilation(&self, isCompiliation: *mut VARIANT_BOOL) -> HRESULT;
849    /// The composer of the CD.
850    pub unsafe fn Composer(&self, Composer: *mut BSTR) -> HRESULT;
851    /// The total number of discs in this CD's album.
852    pub unsafe fn DiscCount(&self, DiscCount: *mut LONG) -> HRESULT;
853    /// The index of the CD disc in the source album.
854    pub unsafe fn DiscNumber(&self, DiscNumber: *mut LONG) -> HRESULT;
855    /// The genre of the CD.
856    pub unsafe fn Genre(&self, Genre: *mut BSTR) -> HRESULT;
857    /// The year the album was recorded/released.
858    pub unsafe fn Year(&self, Year: *mut LONG) -> HRESULT;
859    /// Reveal the CD playlist in the main browser window.
860    pub unsafe fn Reveal(&self) -> HRESULT;
861}
862
863/// IITIPodSource Interface
864///
865/// See the generated [`IITIPodSource_Impl`] trait for more documentation about each function.
866#[windows::core::interface("CF4D8ACE-1720-4FB9-B0AE-9877249E89B0")]
867pub unsafe trait IITIPodSource : IITSource {
868    /// Update the contents of the iPod.
869    pub unsafe fn UpdateIPod(&self) -> HRESULT;
870    /// Eject the iPod.
871    pub unsafe fn EjectIPod(&self) -> HRESULT;
872    /// The iPod software version.
873    pub unsafe fn SoftwareVersion(&self, SoftwareVersion: *mut BSTR) -> HRESULT;
874}
875
876/// IITFileOrCDTrack Interface
877///
878/// See the generated [`IITFileOrCDTrack_Impl`] trait for more documentation about each function.
879#[windows::core::interface("00D7FE99-7868-4CC7-AD9E-ACFD70D09566")]
880pub unsafe trait IITFileOrCDTrack : IITTrack {
881    /// The full path to the file represented by this track.
882    pub unsafe fn Location(&self, Location: *mut BSTR) -> HRESULT;
883    /// Update this track's information with the information stored in its file.
884    pub unsafe fn UpdateInfoFromFile(&self) -> HRESULT;
885    /// True if this is a podcast track.
886    pub unsafe fn Podcast(&self, isPodcast: *mut VARIANT_BOOL) -> HRESULT;
887    /// Update the podcast feed for this track.
888    pub unsafe fn UpdatePodcastFeed(&self) -> HRESULT;
889    /// True if playback position is remembered.
890    pub unsafe fn RememberBookmark(&self, RememberBookmark: *mut VARIANT_BOOL) -> HRESULT;
891    /// True if playback position is remembered.
892    pub unsafe fn set_RememberBookmark(&self, RememberBookmark: VARIANT_BOOL) -> HRESULT;
893    /// True if track is skipped when shuffling.
894    pub unsafe fn ExcludeFromShuffle(&self, ExcludeFromShuffle: *mut VARIANT_BOOL) -> HRESULT;
895    /// True if track is skipped when shuffling.
896    pub unsafe fn set_ExcludeFromShuffle(&self, ExcludeFromShuffle: VARIANT_BOOL) -> HRESULT;
897    /// Lyrics for the track.
898    pub unsafe fn Lyrics(&self, Lyrics: *mut BSTR) -> HRESULT;
899    /// Lyrics for the track.
900    pub unsafe fn set_Lyrics(&self, Lyrics: BSTR) -> HRESULT;
901    /// Category for the track.
902    pub unsafe fn Category(&self, Category: *mut BSTR) -> HRESULT;
903    /// Category for the track.
904    pub unsafe fn set_Category(&self, Category: BSTR) -> HRESULT;
905    /// Description for the track.
906    pub unsafe fn Description(&self, Description: *mut BSTR) -> HRESULT;
907    /// Description for the track.
908    pub unsafe fn set_Description(&self, Description: BSTR) -> HRESULT;
909    /// Long description for the track.
910    pub unsafe fn LongDescription(&self, LongDescription: *mut BSTR) -> HRESULT;
911    /// Long description for the track.
912    pub unsafe fn set_LongDescription(&self, LongDescription: BSTR) -> HRESULT;
913    /// The bookmark time of the track (in seconds).
914    pub unsafe fn BookmarkTime(&self, BookmarkTime: *mut LONG) -> HRESULT;
915    /// The bookmark time of the track (in seconds).
916    pub unsafe fn set_BookmarkTime(&self, BookmarkTime: LONG) -> HRESULT;
917    /// The video track kind.
918    pub unsafe fn VideoKind(&self, VideoKind: *mut ITVideoKind) -> HRESULT;
919    /// The video track kind.
920    pub unsafe fn set_VideoKind(&self, VideoKind: ITVideoKind) -> HRESULT;
921    /// The number of times the track has been skipped.
922    pub unsafe fn SkippedCount(&self, SkippedCount: *mut LONG) -> HRESULT;
923    /// The number of times the track has been skipped.
924    pub unsafe fn set_SkippedCount(&self, SkippedCount: LONG) -> HRESULT;
925    /// The date and time the track was last skipped.  A value of zero means no skipped date.
926    pub unsafe fn SkippedDate(&self, SkippedDate: *mut DATE) -> HRESULT;
927    /// The date and time the track was last skipped.  A value of zero means no skipped date.
928    pub unsafe fn set_SkippedDate(&self, SkippedDate: DATE) -> HRESULT;
929    /// True if track is part of a gapless album.
930    pub unsafe fn PartOfGaplessAlbum(&self, PartOfGaplessAlbum: *mut VARIANT_BOOL) -> HRESULT;
931    /// True if track is part of a gapless album.
932    pub unsafe fn set_PartOfGaplessAlbum(&self, PartOfGaplessAlbum: VARIANT_BOOL) -> HRESULT;
933    /// The album artist of the track.
934    pub unsafe fn AlbumArtist(&self, AlbumArtist: *mut BSTR) -> HRESULT;
935    /// The album artist of the track.
936    pub unsafe fn set_AlbumArtist(&self, AlbumArtist: BSTR) -> HRESULT;
937    /// The show name of the track.
938    pub unsafe fn Show(&self, showName: *mut BSTR) -> HRESULT;
939    /// The show name of the track.
940    pub unsafe fn set_Show(&self, showName: BSTR) -> HRESULT;
941    /// The season number of the track.
942    pub unsafe fn SeasonNumber(&self, SeasonNumber: *mut LONG) -> HRESULT;
943    /// The season number of the track.
944    pub unsafe fn set_SeasonNumber(&self, SeasonNumber: LONG) -> HRESULT;
945    /// The episode ID of the track.
946    pub unsafe fn EpisodeID(&self, EpisodeID: *mut BSTR) -> HRESULT;
947    /// The episode ID of the track.
948    pub unsafe fn set_EpisodeID(&self, EpisodeID: BSTR) -> HRESULT;
949    /// The episode number of the track.
950    pub unsafe fn EpisodeNumber(&self, EpisodeNumber: *mut LONG) -> HRESULT;
951    /// The episode number of the track.
952    pub unsafe fn set_EpisodeNumber(&self, EpisodeNumber: LONG) -> HRESULT;
953    /// The high 32-bits of the size of the track (in bytes).
954    pub unsafe fn Size64High(&self, sizeHigh: *mut LONG) -> HRESULT;
955    /// The low 32-bits of the size of the track (in bytes).
956    pub unsafe fn Size64Low(&self, sizeLow: *mut LONG) -> HRESULT;
957    /// True if track has not been played.
958    pub unsafe fn Unplayed(&self, isUnplayed: *mut VARIANT_BOOL) -> HRESULT;
959    /// True if track has not been played.
960    pub unsafe fn set_Unplayed(&self, isUnplayed: VARIANT_BOOL) -> HRESULT;
961    /// The album used for sorting.
962    pub unsafe fn SortAlbum(&self, Album: *mut BSTR) -> HRESULT;
963    /// The album used for sorting.
964    pub unsafe fn set_SortAlbum(&self, Album: BSTR) -> HRESULT;
965    /// The album artist used for sorting.
966    pub unsafe fn SortAlbumArtist(&self, AlbumArtist: *mut BSTR) -> HRESULT;
967    /// The album artist used for sorting.
968    pub unsafe fn set_SortAlbumArtist(&self, AlbumArtist: BSTR) -> HRESULT;
969    /// The artist used for sorting.
970    pub unsafe fn SortArtist(&self, Artist: *mut BSTR) -> HRESULT;
971    /// The artist used for sorting.
972    pub unsafe fn set_SortArtist(&self, Artist: BSTR) -> HRESULT;
973    /// The composer used for sorting.
974    pub unsafe fn SortComposer(&self, Composer: *mut BSTR) -> HRESULT;
975    /// The composer used for sorting.
976    pub unsafe fn set_SortComposer(&self, Composer: BSTR) -> HRESULT;
977    /// The track name used for sorting.
978    pub unsafe fn SortName(&self, Name: *mut BSTR) -> HRESULT;
979    /// The track name used for sorting.
980    pub unsafe fn set_SortName(&self, Name: BSTR) -> HRESULT;
981    /// The show name used for sorting.
982    pub unsafe fn SortShow(&self, showName: *mut BSTR) -> HRESULT;
983    /// The show name used for sorting.
984    pub unsafe fn set_SortShow(&self, showName: BSTR) -> HRESULT;
985    /// Reveal the track in the main browser window.
986    pub unsafe fn Reveal(&self) -> HRESULT;
987    /// The user or computed rating of the album that this track belongs to (0 to 100).
988    pub unsafe fn AlbumRating(&self, Rating: *mut LONG) -> HRESULT;
989    /// The user or computed rating of the album that this track belongs to (0 to 100).
990    pub unsafe fn set_AlbumRating(&self, Rating: LONG) -> HRESULT;
991    /// The album rating kind.
992    pub unsafe fn AlbumRatingKind(&self, ratingKind: *mut ITRatingKind) -> HRESULT;
993    /// The track rating kind.
994    pub unsafe fn ratingKind(&self, ratingKind: *mut ITRatingKind) -> HRESULT;
995    /// Returns a collection of playlists that contain the song that this track represents.
996    pub unsafe fn Playlists(&self, iPlaylistCollection: *mut Option<IITPlaylistCollection>) -> HRESULT;
997    /// The full path to the file represented by this track.
998    pub unsafe fn set_Location(&self, Location: BSTR) -> HRESULT;
999    /// The release date of the track.  A value of zero means no release date.
1000    pub unsafe fn ReleaseDate(&self, ReleaseDate: *mut DATE) -> HRESULT;
1001}
1002
1003/// IITPlaylistWindow Interface
1004///
1005/// See the generated [`IITPlaylistWindow_Impl`] trait for more documentation about each function.
1006#[windows::core::interface("349CBB45-2E5A-4822-8E4A-A75555A186F7")]
1007pub unsafe trait IITPlaylistWindow : IITWindow {
1008    /// Returns a collection containing the currently selected track or tracks.
1009    pub unsafe fn SelectedTracks(&self, iTrackCollection: *mut Option<IITTrackCollection>) -> HRESULT;
1010    /// The playlist displayed in the window.
1011    pub unsafe fn Playlist(&self, iPlaylist: *mut Option<IITPlaylist>) -> HRESULT;
1012}