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

Annotation of /trunk/libxmltv/Interfaces/Interfaces.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (hide annotations) (download)
Sat Mar 9 09:29:40 2013 UTC (6 years, 9 months ago) by william
File size: 4291 byte(s)

1 william 10 using System;
2     using System.Collections.Generic;
3     using System.Linq;
4     using System.Text;
5 william 11 using System.IO;
6 william 22 using System.Xml.Linq;
7 william 26 using libxmltv.Core;
8 william 54 using System.ComponentModel;
9 william 10
10     namespace libxmltv.Interfaces
11     {
12 william 72 //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 william 25
24     public interface IXMLTVSource
25     {
26     string SourceName { get; }
27     string GeneratorName { get; }
28     string GeneratorUrl { get; }
29     string ToString();
30     }
31 william 26 public interface IXMLTVChannel
32     {
33 william 28 string Id { get; }
34     int Number { get; }
35     string CallSign { get; }
36     string Name { get; }
37     string ToString();
38 william 64 }
39 william 27 public interface IXMLTVProgram
40     {
41 william 28 int Id { get; }
42     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 william 27 }
50 william 72
51     public interface IXMLTVProgramCollection : IXMLTVCollection<int, IXMLTVProgram> { }
52     public interface IXMLTVChannelCollection : IXMLTVCollection<string, IXMLTVChannel> { }
53     public interface IXMLTVCollection<TKey, TValue> { Dictionary<TKey, TValue> Collection { get; } }
54    
55     //public interface IXMLTVBase : IXMLTVBase<object> { }
56     public interface IXMLTVBase<T> : IGetInstance<T> { }
57     public interface IXMLTVRuntimeInstance : IOnInstanceCreated
58     {
59     bool IsAborting { get; }
60     //FileInfo XmlFile { get; }
61     string XmlFile_Name { get; }
62     string XmlFile_FullName { get; }
63     string XmlDoc { get; }
64     IXMLTVSource Source { get; }
65     Dictionary<string, IXMLTVChannel> Channels { get; }
66     Dictionary<int, IXMLTVProgram> Programs { get; }
67    
68     }
69 william 64 public interface IXMLTVSerializer : IXMLTVSerializer<object> { }
70 william 49 public interface IXMLTVSerializer<T>
71     {
72     bool Serialize(string file);
73     bool Serialize(Stream stream);
74 william 50 T DeSerialize(string file, out bool status);
75     T DeSerialize(Stream stream, out bool status);
76 william 49 }
77 william 64 public interface IXMLTV<INTERFACE, CLASS> : IXMLTV<INTERFACE, CLASS, EventArgs> where CLASS : class,INTERFACE { }
78     public interface IXMLTV<INTERFACE, CLASS, INSTANCECREATED_EVENTAGS> : IXMLTVSerializer<INTERFACE>, IDestroyInstance, IOnInstanceCreated, IGetInstance<INTERFACE>
79 william 50 where CLASS : class,INTERFACE
80 william 64 where INSTANCECREATED_EVENTAGS : EventArgs { }
81 william 72
82     public interface IInstance : IInstance<object> { }
83     public interface IInstance<T> { T Instance { get; set; } }
84 william 64 public interface ICreateSerializer : ICreateSerializer<object> { }
85     public interface ICreateSerializer<CLASS> { IXMLTVSerializer<CLASS> CreateSerializer(); }
86 william 72
87     //public interface IGetInstanceT : IGetInstanceT<object> { }
88     //public interface IGetInstanceT<T> { T GetInstance<T>(); }
89 william 64 public interface IGetInstance : IGetInstance<object> { }
90     public interface IGetInstance<T> { T GetInstance(); }
91 william 72
92 william 64 public interface IOnInstanceCreated : IOnInstanceCreated<EventArgs> { }
93     public interface IOnInstanceCreated<T> where T : EventArgs { EventHandler<T> OnInstanceCreated { get; set; } }
94     public interface ISerializer<T> { IXMLTVSerializer<T> Serializer { get; } }
95     public interface IDestroyInstance { void DestroyInstance(); }
96     public interface IGetCreatedInstanceEvent : IGetCreatedInstanceEvent<EventArgs> { }
97     public interface IGetCreatedInstanceEvent<T> where T : EventArgs { EventHandler<T> GetOnInstanceCreated(); }
98     public interface ISetCreatedInstanceEvent : ISetCreatedInstanceEvent<EventArgs> { }
99     public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance); }
100     public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }
101     public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance); }
102 william 28 }

  ViewVC Help
Powered by ViewVC 1.1.22