/[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 23 by william, Thu Mar 7 11:08:48 2013 UTC revision 77 by william, Sat Mar 9 11:28:41 2013 UTC
# Line 4  using System.Linq; Line 4  using System.Linq;
4  using System.Text;  using System.Text;
5  using System.IO;  using System.IO;
6  using System.Xml.Linq;  using System.Xml.Linq;
7    using libxmltv.Core;
8    using System.ComponentModel;
9    
10  namespace libxmltv.Interfaces  namespace libxmltv.Interfaces
11  {  {
12      public interface IXMLTV_LOADER      //public interface IXMLTVLoader
13        //{
14        //    FileInfo XmlFile { get; }
15        //    string XmlDoc { get; }
16        //}
17        //public interface IXMLTVParser
18        //{
19        //    IXMLTVSource Source { get; }
20        //    Dictionary<string, IXMLTVChannel> Channels { get; }
21        //    Dictionary<int, IXMLTVProgram> Programs { get; }
22        //}
23    
24        public interface IXMLTVSource
25        {
26            string SourceName { get; }
27            string GeneratorName { get; }
28            string GeneratorUrl { get; }
29            string ToString();
30        }
31        public interface IXMLTVChannel
32      {      {
33          FileInfo XmlFile { get; }          string Id { get; }
34          XDocument XmlDoc { get; }          int Number { get; }
35            string CallSign { get; }
36            string Name { get; }
37            string ToString();
38      }      }
39      public interface IXMLTV_PARSER      public interface IXMLTVProgram
40      {      {
41          IXMLTV_LOADER XMLTV_LOADER { get; }          int Id { get; }
42          void TestParse();          DateTime Start { get; }
43            DateTime Stop { get; }
44            IXMLTVChannel Channel { get; }
45            string Title { get; }
46            string SubTitle { get; }
47            string Description { get; }
48            string ToString();
49      }      }
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<T> { T Handler { get; } }
57    
58        //public interface IXMLTVBase : IXMLTVBase<object> { }
59        public interface IXMLTVBase<T> : IGetInstance<T>, IXMLTVHandler<object> { }
60        public interface IXMLTVRuntimeInstance : IOnInstanceCreated
61        {
62            bool IsAborting { get; }
63            //FileInfo XmlFile { get; }
64            string XmlFile_Name { get; }
65            string XmlFile_FullName { get; }
66            string XmlDoc { get; }
67            IXMLTVSource Source { get; }
68            List<IXMLTVChannel> Channels { get; }
69            List<IXMLTVProgram> Programs { get; }
70            
71        }
72        public interface IXMLTVSerializer : IXMLTVSerializer<object> { }
73        public interface IXMLTVSerializer<T>
74        {
75            bool Serialize(string file);
76            bool Serialize(Stream stream);
77            T DeSerialize(string file, out bool status);
78            T DeSerialize(Stream stream, out bool status);
79        }
80        public interface IXMLTV<INTERFACE, CLASS> : IXMLTV<INTERFACE, CLASS, EventArgs> where CLASS : class,INTERFACE { }
81        public interface IXMLTV<INTERFACE, CLASS, INSTANCECREATED_EVENTAGS> : IXMLTVSerializer<INTERFACE>, IDestroyInstance, IOnInstanceCreated, IGetInstance<INTERFACE>
82            where CLASS : class,INTERFACE
83            where INSTANCECREATED_EVENTAGS : EventArgs { }
84    
85        public interface IInstance : IInstance<object> { }
86        public interface IInstance<T> { T Instance { get; set; } }
87        public interface ICreateSerializer : ICreateSerializer<object> { }
88        public interface ICreateSerializer<CLASS> { IXMLTVSerializer<CLASS> CreateSerializer(); }
89    
90        //public interface IGetInstanceT : IGetInstanceT<object> { }
91        //public interface IGetInstanceT<T> { T GetInstance<T>();  }
92        public interface IGetInstance : IGetInstance<object> { }
93        public interface IGetInstance<T> { T GetInstance();    }
94    
95        public interface IOnInstanceCreated : IOnInstanceCreated<EventArgs> { }
96        public interface IOnInstanceCreated<T> where T : EventArgs { EventHandler<T> OnInstanceCreated { get; set; } }
97        public interface ISerializer<T> { IXMLTVSerializer<T> Serializer { get; } }
98        public interface IDestroyInstance { void DestroyInstance();    }
99        public interface IGetCreatedInstanceEvent : IGetCreatedInstanceEvent<EventArgs> { }
100        public interface IGetCreatedInstanceEvent<T> where T : EventArgs { EventHandler<T> GetOnInstanceCreated();    }
101        public interface ISetCreatedInstanceEvent : ISetCreatedInstanceEvent<EventArgs> { }
102        public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance);    }
103        public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }
104        public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance);    }
105    }

Legend:
Removed from v.23  
changed lines
  Added in v.77

  ViewVC Help
Powered by ViewVC 1.1.22