Archive / / / / PlaySource.cs
2008-11-13 23:43:52 UTC
previous next
// IPlaySource.cs is part of Echo Media Player // Copyright (C) 2008 Shane O'Connell // // [ The original file includes a copyright header in this location describing // the file as being released under the terms of the GNU General Public // License. It has been removed in order to display the file as part of the // archive. ] // using System; using Echo; namespace Echo { public interface IPlaySource { int NumTracks { get; } Track GetTrack(int index); event EventHandler<TrackEventArgs> TrackRemoved; event EventHandler<TrackEventArgs> TrackInserted; event EventHandler<TrackEventArgs> TrackChanged; } public interface IModPlaySource : IPlaySource { void InsertTrack(int index, Track track); void RemoveTrack(int index); void MoveTrack(int old_index, int new_index); } public class TrackEventArgs : EventArgs { public readonly int Index; public TrackEventArgs(int index) { this.Index = index; } } public class Track { public readonly string Title; public readonly string Artist; public readonly string Album; public readonly int TrackNumber; public readonly string URI; public Track(string title, string artist, string album, int track_number, string uri) { this.Title = title; this.Artist = artist; this.Album = album; this.TrackNumber = track_number; this.URI = uri; } } }