/[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 56 by william, Fri Mar 8 12:05:33 2013 UTC revision 86 by william, Sat Mar 9 13:51:58 2013 UTC
# Line 9  using System.ComponentModel; Line 9  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 37  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();
     }      
     public interface IXMLTVProgram  
     {  
         int Id { get; }  
         DateTime Start { get; }  
         DateTime Stop { get; }  
         IXMLTVChannel Channel { get; }  
         string Title { get; }  
         string SubTitle { get; }  
         string Description { get; }  
         string ToString();  
38      }      }
39      public interface IXMLTVRuntimeInstance : IXMLTVLoader, IXMLTVParser  
40        public interface IPropertyDictionary : IPropertyDictionary<string, object>    {    }
41        public interface IPropertyDictionary<TKey,TValue>
42      {      {
43          //bool IsDisposing { get; }          Dictionary<TKey, TValue> Properties { get; }
44          //IXMLTVSerializer<IXMLTVRuntimeInstance> Serializer { get; }          TValue GetProperty(TKey name);
45            void SetProperty(TKey name, TValue value);
46        }
47        public interface IXMLTVProgram : IPropertyDictionary
48        {
49            //int Id { get; }
50            //DateTime Start { get; }
51            //DateTime Stop { get; }
52            //IXMLTVChannel Channel { get; }
53            //string Title { get; }
54            //string SubTitle { get; }
55            //string Description { get; }
56            //string ToString();
57            
58      }      }
59    
60        public interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }
61        public interface IXMLTVChannelCollection : IXMLTVDictionaryCollection<string, IXMLTVChannel> { }
62        public interface IXMLTVDictionaryCollection<TKey, TValue> { Dictionary<TKey, TValue> Collection { get; } }
63        public interface IXMLTVListCollection<TValue> { List<TValue> Collection { get; } }
64    
65        public interface IXMLTVHandler : IXMLTVHandler<object> { }
66        public interface IXMLTVHandler<T> { T Handler { get; } }
67    
68        //public interface IXMLTVBase : IXMLTVBase<object> { }
69        public interface IXMLTVBase<T> : IGetInstance<T>, IXMLTVHandler { }
70        public interface IXMLTVRuntimeInstance : IOnInstanceCreated
71        {
72            bool IsAborting { get; }
73            //FileInfo XmlFile { get; }
74            string XmlFile_Name { get; }
75            string XmlFile_FullName { get; }
76            string XmlDoc { get; }
77            IXMLTVSource Source { get; }
78            List<IXMLTVChannel> Channels { get; }
79            List<IXMLTVProgram> Programs { get; }
80            
81        }
82        public interface IXMLTVSerializer : IXMLTVSerializer<object> { }
83      public interface IXMLTVSerializer<T>      public interface IXMLTVSerializer<T>
84      {      {
85          bool Serialize(string file);          bool Serialize(string file);
# Line 62  namespace libxmltv.Interfaces Line 87  namespace libxmltv.Interfaces
87          T DeSerialize(string file, out bool status);          T DeSerialize(string file, out bool status);
88          T DeSerialize(Stream stream, out bool status);          T DeSerialize(Stream stream, out bool status);
89      }      }
90        public interface IXMLTV<INTERFACE, CLASS> : IXMLTV<INTERFACE, CLASS, EventArgs> where CLASS : class,INTERFACE { }
91      public interface IXMLTV<INTERFACE, CLASS> : IXMLTVSerializer<INTERFACE>, IDestroyInstance      public interface IXMLTV<INTERFACE, CLASS, INSTANCECREATED_EVENTAGS> : IXMLTVSerializer<INTERFACE>, IDestroyInstance, IOnInstanceCreated, IGetInstance<INTERFACE>
92          where CLASS : class,INTERFACE          where CLASS : class,INTERFACE
93      {          where INSTANCECREATED_EVENTAGS : EventArgs { }
94          IXMLTVSerializer<CLASS> CreateSerializer();  
95          INTERFACE GetInstance();      public interface IInstance : IInstance<object> { }
96          //CLASS GetInternalInstance();      public interface IInstance<T> { T Instance { get; set; } }
97          EventHandler<EventArgs> OnInstanceCreated { get; set; }      public interface ICreateSerializer : ICreateSerializer<object> { }
98      }      public interface ICreateSerializer<CLASS> { IXMLTVSerializer<CLASS> CreateSerializer(); }
99      public interface ISerializer<T>  
100      {      //public interface IGetInstanceT : IGetInstanceT<object> { }
101          IXMLTVSerializer<T> Serializer { get; }      //public interface IGetInstanceT<T> { T GetInstance<T>();  }
102      }      public interface IGetInstance : IGetInstance<object> { }
103      public interface IDestroyInstance      public interface IGetInstance<T> { T GetInstance();    }
104      {  
105          void DestroyInstance();      public interface IOnInstanceCreated : IOnInstanceCreated<EventArgs> { }
106      }      public interface IOnInstanceCreated<T> where T : EventArgs { EventHandler<T> OnInstanceCreated { get; set; } }
107      public interface IGetCreatedInstanceEvent      public interface ISerializer<T> { IXMLTVSerializer<T> Serializer { get; } }
108      {      public interface IDestroyInstance { void DestroyInstance();    }
109          EventHandler<EventArgs> GetOnInstanceCreated();      public interface IGetCreatedInstanceEvent : IGetCreatedInstanceEvent<EventArgs> { }
110      }      public interface IGetCreatedInstanceEvent<T> where T : EventArgs { EventHandler<T> GetOnInstanceCreated();    }
111      public interface ISetCreatedInstanceEvent      public interface ISetCreatedInstanceEvent : ISetCreatedInstanceEvent<EventArgs> { }
112      {      public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance);    }
113          void SetOnInstanceCreated(EventHandler<EventArgs> event_instance);      public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }
114      }      public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance);    }
     public interface IRuntimeInstanceLoader<T>  
     {  
         T LoadFromInstance(T instance);  
     }  
115  }  }

Legend:
Removed from v.56  
changed lines
  Added in v.86

  ViewVC Help
Powered by ViewVC 1.1.22