/[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/08 06:39:56	51
+++ trunk/libxmltv/Interfaces/Interfaces.cs	2013/03/09 12:23:27	81
@@ -5,22 +5,21 @@
 using System.IO;
 using System.Xml.Linq;
 using libxmltv.Core;
+using System.ComponentModel;
 
 namespace libxmltv.Interfaces
 {
-    public interface IXMLTVLoader
-    {
-        FileInfo XmlFile { get; }
-        string XmlDoc { get; }
-    }
-    public interface IXMLTVParser
-    {
-        //IXMLTV_LOADER XMLTV_LOADER { get; }
-        //void TestParse();
-        IXMLTVSource Source { get; }
-        Dictionary<string, IXMLTVChannel> Channels { get; }
-        Dictionary<int, IXMLTVProgram> Programs { get; }
-    }
+    //public interface IXMLTVLoader
+    //{
+    //    FileInfo XmlFile { get; }
+    //    string XmlDoc { get; }
+    //}
+    //public interface IXMLTVParser
+    //{
+    //    IXMLTVSource Source { get; }
+    //    Dictionary<string, IXMLTVChannel> Channels { get; }
+    //    Dictionary<int, IXMLTVProgram> Programs { get; }
+    //}
 
     public interface IXMLTVSource
     {
@@ -36,7 +35,7 @@
         string CallSign { get; }
         string Name { get; }
         string ToString();
-    }    
+    }
     public interface IXMLTVProgram
     {
         int Id { get; }
@@ -48,12 +47,30 @@
         string Description { get; }
         string ToString();
     }
-    public interface IXMLTVRuntimeInstance : IXMLTVLoader, IXMLTVParser 
-    {
-        //bool IsDisposing { get; }
-        //IXMLTVSerializer<IXMLTVRuntimeInstance> Serializer { get; }
-    }
 
+    public interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }
+    public interface IXMLTVChannelCollection : IXMLTVDictionaryCollection<string, IXMLTVChannel> { }
+    public interface IXMLTVDictionaryCollection<TKey, TValue> { Dictionary<TKey, TValue> Collection { get; } }
+    public interface IXMLTVListCollection<TValue> { List<TValue> Collection { get; } }
+
+    public interface IXMLTVHandler : IXMLTVHandler<object> { }
+    public interface IXMLTVHandler<T> { T Handler { get; } }
+
+    //public interface IXMLTVBase : IXMLTVBase<object> { }
+    public interface IXMLTVBase<T> : IGetInstance<T>, IXMLTVHandler { }
+    public interface IXMLTVRuntimeInstance : IOnInstanceCreated
+    {
+        bool IsAborting { get; } 
+        //FileInfo XmlFile { get; }
+        string XmlFile_Name { get; }
+        string XmlFile_FullName { get; }
+        string XmlDoc { get; }
+        IXMLTVSource Source { get; }
+        List<IXMLTVChannel> Channels { get; }
+        List<IXMLTVProgram> Programs { get; }
+        
+    }
+    public interface IXMLTVSerializer : IXMLTVSerializer<object> { }
     public interface IXMLTVSerializer<T>
     {
         bool Serialize(string file);
@@ -61,16 +78,29 @@
         T DeSerialize(string file, out bool status);
         T DeSerialize(Stream stream, out bool status);
     }
-
-    public interface IXMLTV<INTERFACE, CLASS> : IXMLTVSerializer<INTERFACE>
+    public interface IXMLTV<INTERFACE, CLASS> : IXMLTV<INTERFACE, CLASS, EventArgs> where CLASS : class,INTERFACE { }
+    public interface IXMLTV<INTERFACE, CLASS, INSTANCECREATED_EVENTAGS> : IXMLTVSerializer<INTERFACE>, IDestroyInstance, IOnInstanceCreated, IGetInstance<INTERFACE>
         where CLASS : class,INTERFACE
-    {
-        IXMLTVSerializer<CLASS> CreateSerializer();
-        INTERFACE GetInstance();
-        //CLASS GetInternalInstance();
-    }
-    public interface ISerializer<T>
-    {
-        IXMLTVSerializer<T> Serializer { get; }
-    }
+        where INSTANCECREATED_EVENTAGS : EventArgs { }
+
+    public interface IInstance : IInstance<object> { }
+    public interface IInstance<T> { T Instance { get; set; } }
+    public interface ICreateSerializer : ICreateSerializer<object> { }
+    public interface ICreateSerializer<CLASS> { IXMLTVSerializer<CLASS> CreateSerializer(); }
+
+    //public interface IGetInstanceT : IGetInstanceT<object> { }
+    //public interface IGetInstanceT<T> { T GetInstance<T>();  }
+    public interface IGetInstance : IGetInstance<object> { }
+    public interface IGetInstance<T> { T GetInstance();    }
+
+    public interface IOnInstanceCreated : IOnInstanceCreated<EventArgs> { }
+    public interface IOnInstanceCreated<T> where T : EventArgs { EventHandler<T> OnInstanceCreated { get; set; } }
+    public interface ISerializer<T> { IXMLTVSerializer<T> Serializer { get; } }
+    public interface IDestroyInstance { void DestroyInstance();    }
+    public interface IGetCreatedInstanceEvent : IGetCreatedInstanceEvent<EventArgs> { }
+    public interface IGetCreatedInstanceEvent<T> where T : EventArgs { EventHandler<T> GetOnInstanceCreated();    }
+    public interface ISetCreatedInstanceEvent : ISetCreatedInstanceEvent<EventArgs> { }
+    public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance);    }
+    public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }
+    public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance);    }
 }
\ No newline at end of file

 

  ViewVC Help
Powered by ViewVC 1.1.22