/[xmltv_parser]/trunk/libxmltv/Interfaces/Interfaces.cs
ViewVC logotype

Diff of /trunk/libxmltv/Interfaces/Interfaces.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libxmltv/Interfaces/Interfaces.cs	2013/03/10 17:10:47	117
+++ trunk/libxmltv/Interfaces/Interfaces.cs	2013/05/18 02:45:35	256
@@ -23,33 +23,81 @@
     //    Dictionary<int, IXMLTVProgram> Programs { get; }
     //}
 
-    internal interface IXMLTVSource
+    public interface IXMLTVSource : IDataSourceBindable
     {
         string SourceName { get; }
         string GeneratorName { get; }
         string GeneratorUrl { get; }
         string ToString();
     }
-    internal interface IXMLTVChannel
+
+    public interface IRawDataSource : IRawDataSource<object> { }
+    public interface IRawDataSource<T> {
+         [Browsable(false)]
+        T RawDataSource { get; } }
+    public interface IProgramDefinitionList : IList<IProgramDefinition>, IDataSourceSortable, IDataSourceFilterable { } //, IRawDataSource<IProgramDefinitionList> { }
+    public interface IChannelDefintionList : IList<IChannelDefintion>, IDataSourceSortable, IDataSourceFilterable { }//, IRawDataSource<IChannelDefintionList> { }
+
+
+    public interface IChannelDefintion : IEquatable<IChannelDefintion>, IRawDataSource<IXMLTVChannel>
+    {
+        string ChannelId { get; }
+        string ChannelName { get; }
+        string ToString();
+    }
+    public interface IProgramDefinition : IEquatable<IProgramDefinition>, IRawDataSource<IXMLTVProgram>
+    {
+        //string ChannelId { get;  }
+        int ChannelNumber { get; } // column index: 0
+        string ChannelName { get; }// column index: 1
+        string Start { get; }// column index: 2
+        string Stop { get; }// column index: 3
+        string Title { get; }// column index: 4
+        string SubTitle { get; }// column index: 5
+        string Description { get; }// column index: 6
+        string Rating { get; }// column index: 7
+        string ToString();
+    }
+    public interface IXMLTVChannel
     {
         string Id { get; }
         //int Number { get; }
         //string CallSign { get; }
         //string Name { get; }    
-        PropertyList MetaData { get; }
+        IPropertyList MetaData { get; }
         string ToString();
     }
-    internal interface IXMLTVProgram
+    public interface IXMLTVProgram 
     {
-        PropertyDictionary MetaData { get; }
+        IPropertyDictionary MetaData { get; }
         List<IExtraMetaData> GetExtraMetaData();
     }
 
-    internal interface IExtraMetaData : IExtraMetaData<string, string> { }
-    internal interface IExtraMetaData<TKey, TValue> : IPropertyValuePair<TKey, TValue> 
+    public interface IExtraMetaData : IExtraMetaData<string, string> { }
+    public interface IExtraMetaData<TKey, TValue> : IPropertyValuePair<TKey, TValue> 
     {
         XElement AsXElement();
     }
+
+    //public interface IDataConverter { object ConvertObjectData(object source); }
+    //public interface IDataConverter<T>
+    //{
+    //    T ConvertData(object source);
+    //}
+    public interface IDataSourceBindable //: IDataConverter
+    {
+        object CreateBindableDataSource(out Type type);
+    }
+
+    public interface IDataSourceFilterable
+    {
+        void Filter(ref object source, params string[] args);
+    }
+    public interface IDataSourceSortable
+    {
+        void Sort(ref object source, bool descending, params string[] args);
+    }
+
     internal interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }
     internal interface IXMLTVChannelCollection : IXMLTVDictionaryCollection<string, IXMLTVChannel> { }
     internal interface IXMLTVDictionaryCollection<TKey, TValue> { Dictionary<TKey, TValue> Collection { get; } }
@@ -68,9 +116,9 @@
         string XmlFile_FullName { get; }
         string XmlDoc { get; }
         IXMLTVSource Source { get; }
-        List<IXMLTVChannel> Channels { get; }
-        List<IXMLTVProgram> Programs { get; }
-        List<IExtraMetaData> ExtraEntries { get; }
+        ChannelList Channels { get; }
+        ProgramList Programs { get; }
+       ExtraList ExtraEntries { get; }
     }
     internal interface IXMLTVSerializer : IXMLTVSerializer<object> { }
     internal interface IXMLTVSerializer<T>
@@ -111,7 +159,7 @@
 
 
 #region Property Dictionary support
-    public interface IPropertyDictionary : IPropertyDictionary<string,object> { }
+    public interface IPropertyDictionary : IPropertyDictionary<string, object> { }
     public interface IPropertyDictionary<TKey, TValue> : IPropertyCollection<IPropertyValuePair<TKey, TValue>>, IEnumerable<IPropertyValuePair<TKey, TValue>>, IEnumerable
     {
         IPropertyCollection<TKey> PropertyKeys { get; }
@@ -153,8 +201,7 @@
 
     #region PropertyValuePair support
 
-    public interface IPropertyValuePair : IPropertyValuePair<string,object>    {
-    }
+    public interface IPropertyValuePair : IPropertyValuePair<string, object>    {    }
     public interface IPropertyValuePair<TKey, TValue>
     {
         TKey Name { get; }

 

  ViewVC Help
Powered by ViewVC 1.1.22