| 1 | using System;
|
|---|
| 2 | using Clovery.iTunesHelper.COMWrap.Interfaces;
|
|---|
| 3 |
|
|---|
| 4 | namespace Clovery.iTunesHelper.COMWrap.Interfaces
|
|---|
| 5 | {
|
|---|
| 6 | /// <summary>
|
|---|
| 7 | /// Represents the status of an asynchronous add or convert operation.
|
|---|
| 8 | /// </summary>
|
|---|
| 9 | public interface IOperationStatus : IITFactory
|
|---|
| 10 | {
|
|---|
| 11 | /// <summary>
|
|---|
| 12 | /// Returns true if the operation is still in progress.
|
|---|
| 13 | /// </summary>
|
|---|
| 14 | /// <remarks>
|
|---|
| 15 | /// You cannot retrieve the <see cref="Tracks"/> property until the operation completes.
|
|---|
| 16 | /// </remarks>
|
|---|
| 17 | bool InProgress { get; }
|
|---|
| 18 |
|
|---|
| 19 | /// <summary>
|
|---|
| 20 | /// Returns a collection containing the tracks that were generated by the operation.
|
|---|
| 21 | /// </summary>
|
|---|
| 22 | /// <remarks>
|
|---|
| 23 | /// You cannot retrieve this property until <see cref="InProgress"/> returns false.
|
|---|
| 24 | /// </remarks>
|
|---|
| 25 | ITrackCollection Tracks { get; }
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | /// <summary>
|
|---|
| 29 | /// Represents the status of an asynchronous convert operation.
|
|---|
| 30 | /// </summary>
|
|---|
| 31 | /// <remarks>
|
|---|
| 32 | /// Note: This interface is available in iTunes 4.6 and later (iTunes type library 1.1 and later).
|
|---|
| 33 | /// </remarks>
|
|---|
| 34 | public interface IConvertOperationStatus : IOperationStatus
|
|---|
| 35 | {
|
|---|
| 36 | /// <summary>
|
|---|
| 37 | /// Returns status about the track currently being converted.
|
|---|
| 38 | /// </summary>
|
|---|
| 39 | /// <param name="trackName">Returns the name of the track currently being converted.
|
|---|
| 40 | /// May return NULL if no track is currently being converted. </param>
|
|---|
| 41 | /// <param name="progressValue">Returns the conversion progress value for the track currently being converted.
|
|---|
| 42 | /// This number will always be in the range 0 through maxProgressValue. </param>
|
|---|
| 43 | /// <param name="maxProgressValue">Returns the maximum conversion progress value for the track currently being converted.
|
|---|
| 44 | /// The conversion of the current track is complete when progressValue reaches maxProgressValue.
|
|---|
| 45 | /// Note that maxProgressValue will be different for each track being converted.</param>
|
|---|
| 46 | void GetConversionStatus(out string trackName, out int progressValue, out int maxProgressValue);
|
|---|
| 47 |
|
|---|
| 48 | /// <summary>
|
|---|
| 49 | /// Returns the maximum conversion progress value for the track currently being converted.
|
|---|
| 50 | /// </summary>
|
|---|
| 51 | int maxProgressValue { get; }
|
|---|
| 52 |
|
|---|
| 53 | /// <summary>
|
|---|
| 54 | /// Returns the conversion progress value for the track currently being converted.
|
|---|
| 55 | /// </summary>
|
|---|
| 56 | int progressValue { get; }
|
|---|
| 57 |
|
|---|
| 58 | /// <summary>
|
|---|
| 59 | /// Returns the name of the track currently being converted.
|
|---|
| 60 | /// </summary>
|
|---|
| 61 | string trackName { get; }
|
|---|
| 62 |
|
|---|
| 63 | /// <summary>
|
|---|
| 64 | /// Stops the current conversion operation.
|
|---|
| 65 | /// </summary>
|
|---|
| 66 | void StopConversion();
|
|---|
| 67 | }
|
|---|
| 68 |
|
|---|
| 69 | /// <summary>
|
|---|
| 70 | /// Represents the status of an asynchronous convert operation with events.
|
|---|
| 71 | /// </summary>
|
|---|
| 72 | public interface IConvertOperationStatusWithEvents : IConvertOperationStatus
|
|---|
| 73 | {
|
|---|
| 74 | bool EventAttached { get; }
|
|---|
| 75 | event EventHandler<ConvertOperationStatusChangedEventArgs> ConvertOperationStatusChangedEvent;
|
|---|
| 76 | event EventHandler<EventArgs> ConvertOperationCompleteEvent;
|
|---|
| 77 | void AttachEvents();
|
|---|
| 78 | void DetachEvents();
|
|---|
| 79 | event EventHandler<EventAttachStatusChangedEventArgs> EventAttachStatusChangedEvent;
|
|---|
| 80 | }
|
|---|
| 81 | } |
|---|