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

Contents of /trunk/libxmltv/Interfaces/Interfaces.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 64 - (show annotations) (download)
Sat Mar 9 00:59:05 2013 UTC (6 years, 9 months ago) by william
File size: 3253 byte(s)
+ update intefaces with generic versions

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.IO;
6 using System.Xml.Linq;
7 using libxmltv.Core;
8 using System.ComponentModel;
9
10 namespace libxmltv.Interfaces
11 {
12 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 string Id { get; }
34 int Number { get; }
35 string CallSign { get; }
36 string Name { get; }
37 string ToString();
38 }
39 public interface IXMLTVProgram
40 {
41 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 }
50 public interface IXMLTVRuntimeInstance : IXMLTVLoader, IXMLTVParser { }
51 public interface IXMLTVSerializer : IXMLTVSerializer<object> { }
52 public interface IXMLTVSerializer<T>
53 {
54 bool Serialize(string file);
55 bool Serialize(Stream stream);
56 T DeSerialize(string file, out bool status);
57 T DeSerialize(Stream stream, out bool status);
58 }
59 public interface IXMLTV<INTERFACE, CLASS> : IXMLTV<INTERFACE, CLASS, EventArgs> where CLASS : class,INTERFACE { }
60 public interface IXMLTV<INTERFACE, CLASS, INSTANCECREATED_EVENTAGS> : IXMLTVSerializer<INTERFACE>, IDestroyInstance, IOnInstanceCreated, IGetInstance<INTERFACE>
61 where CLASS : class,INTERFACE
62 where INSTANCECREATED_EVENTAGS : EventArgs { }
63 public interface ICreateSerializer : ICreateSerializer<object> { }
64 public interface ICreateSerializer<CLASS> { IXMLTVSerializer<CLASS> CreateSerializer(); }
65 public interface IGetInstance : IGetInstance<object> { }
66 public interface IGetInstance<T> { T GetInstance(); }
67 public interface IOnInstanceCreated : IOnInstanceCreated<EventArgs> { }
68 public interface IOnInstanceCreated<T> where T : EventArgs { EventHandler<T> OnInstanceCreated { get; set; } }
69 public interface ISerializer<T> { IXMLTVSerializer<T> Serializer { get; } }
70 public interface IDestroyInstance { void DestroyInstance(); }
71 public interface IGetCreatedInstanceEvent : IGetCreatedInstanceEvent<EventArgs> { }
72 public interface IGetCreatedInstanceEvent<T> where T : EventArgs { EventHandler<T> GetOnInstanceCreated(); }
73 public interface ISetCreatedInstanceEvent : ISetCreatedInstanceEvent<EventArgs> { }
74 public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance); }
75 public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }
76 public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance); }
77 }

  ViewVC Help
Powered by ViewVC 1.1.22