/[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

revision 51 by william, Fri Mar 8 06:39:56 2013 UTC revision 81 by william, Sat Mar 9 12:23:27 2013 UTC
# Line 5  using System.Text; Line 5  using System.Text;
5  using System.IO;  using System.IO;
6  using System.Xml.Linq;  using System.Xml.Linq;
7  using libxmltv.Core;  using libxmltv.Core;
8    using System.ComponentModel;
9    
10  namespace libxmltv.Interfaces  namespace libxmltv.Interfaces
11  {  {
12      public interface IXMLTVLoader      //public interface IXMLTVLoader
13      {      //{
14          FileInfo XmlFile { get; }      //    FileInfo XmlFile { get; }
15          string XmlDoc { get; }      //    string XmlDoc { get; }
16      }      //}
17      public interface IXMLTVParser      //public interface IXMLTVParser
18      {      //{
19          //IXMLTV_LOADER XMLTV_LOADER { get; }      //    IXMLTVSource Source { get; }
20          //void TestParse();      //    Dictionary<string, IXMLTVChannel> Channels { get; }
21          IXMLTVSource Source { get; }      //    Dictionary<int, IXMLTVProgram> Programs { get; }
22          Dictionary<string, IXMLTVChannel> Channels { get; }      //}
         Dictionary<int, IXMLTVProgram> Programs { get; }  
     }  
23    
24      public interface IXMLTVSource      public interface IXMLTVSource
25      {      {
# Line 36  namespace libxmltv.Interfaces Line 35  namespace libxmltv.Interfaces
35          string CallSign { get; }          string CallSign { get; }
36          string Name { get; }          string Name { get; }
37          string ToString();          string ToString();
38      }          }
39      public interface IXMLTVProgram      public interface IXMLTVProgram
40      {      {
41          int Id { get; }          int Id { get; }
# Line 48  namespace libxmltv.Interfaces Line 47  namespace libxmltv.Interfaces
47          string Description { get; }          string Description { get; }
48          string ToString();          string ToString();
49      }      }
     public interface IXMLTVRuntimeInstance : IXMLTVLoader, IXMLTVParser  
     {  
         //bool IsDisposing { get; }  
         //IXMLTVSerializer<IXMLTVRuntimeInstance> Serializer { get; }  
     }  
50    
51        public interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }
52        public interface IXMLTVChannelCollection : IXMLTVDictionaryCollection<string, IXMLTVChannel> { }
53        public interface IXMLTVDictionaryCollection<TKey, TValue> { Dictionary<TKey, TValue> Collection { get; } }
54        public interface IXMLTVListCollection<TValue> { List<TValue> Collection { get; } }
55    
56        public interface IXMLTVHandler : IXMLTVHandler<object> { }
57        public interface IXMLTVHandler<T> { T Handler { get; } }
58    
59        //public interface IXMLTVBase : IXMLTVBase<object> { }
60        public interface IXMLTVBase<T> : IGetInstance<T>, IXMLTVHandler { }
61        public interface IXMLTVRuntimeInstance : IOnInstanceCreated
62        {
63            bool IsAborting { get; }
64            //FileInfo XmlFile { get; }
65            string XmlFile_Name { get; }
66            string XmlFile_FullName { get; }
67            string XmlDoc { get; }
68            IXMLTVSource Source { get; }
69            List<IXMLTVChannel> Channels { get; }
70            List<IXMLTVProgram> Programs { get; }
71            
72        }
73        public interface IXMLTVSerializer : IXMLTVSerializer<object> { }
74      public interface IXMLTVSerializer<T>      public interface IXMLTVSerializer<T>
75      {      {
76          bool Serialize(string file);          bool Serialize(string file);
# Line 61  namespace libxmltv.Interfaces Line 78  namespace libxmltv.Interfaces
78          T DeSerialize(string file, out bool status);          T DeSerialize(string file, out bool status);
79          T DeSerialize(Stream stream, out bool status);          T DeSerialize(Stream stream, out bool status);
80      }      }
81        public interface IXMLTV<INTERFACE, CLASS> : IXMLTV<INTERFACE, CLASS, EventArgs> where CLASS : class,INTERFACE { }
82      public interface IXMLTV<INTERFACE, CLASS> : IXMLTVSerializer<INTERFACE>      public interface IXMLTV<INTERFACE, CLASS, INSTANCECREATED_EVENTAGS> : IXMLTVSerializer<INTERFACE>, IDestroyInstance, IOnInstanceCreated, IGetInstance<INTERFACE>
83          where CLASS : class,INTERFACE          where CLASS : class,INTERFACE
84      {          where INSTANCECREATED_EVENTAGS : EventArgs { }
85          IXMLTVSerializer<CLASS> CreateSerializer();  
86          INTERFACE GetInstance();      public interface IInstance : IInstance<object> { }
87          //CLASS GetInternalInstance();      public interface IInstance<T> { T Instance { get; set; } }
88      }      public interface ICreateSerializer : ICreateSerializer<object> { }
89      public interface ISerializer<T>      public interface ICreateSerializer<CLASS> { IXMLTVSerializer<CLASS> CreateSerializer(); }
90      {  
91          IXMLTVSerializer<T> Serializer { get; }      //public interface IGetInstanceT : IGetInstanceT<object> { }
92      }      //public interface IGetInstanceT<T> { T GetInstance<T>();  }
93        public interface IGetInstance : IGetInstance<object> { }
94        public interface IGetInstance<T> { T GetInstance();    }
95    
96        public interface IOnInstanceCreated : IOnInstanceCreated<EventArgs> { }
97        public interface IOnInstanceCreated<T> where T : EventArgs { EventHandler<T> OnInstanceCreated { get; set; } }
98        public interface ISerializer<T> { IXMLTVSerializer<T> Serializer { get; } }
99        public interface IDestroyInstance { void DestroyInstance();    }
100        public interface IGetCreatedInstanceEvent : IGetCreatedInstanceEvent<EventArgs> { }
101        public interface IGetCreatedInstanceEvent<T> where T : EventArgs { EventHandler<T> GetOnInstanceCreated();    }
102        public interface ISetCreatedInstanceEvent : ISetCreatedInstanceEvent<EventArgs> { }
103        public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance);    }
104        public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }
105        public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance);    }
106  }  }

Legend:
Removed from v.51  
changed lines
  Added in v.81

  ViewVC Help
Powered by ViewVC 1.1.22