/[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 56 - (show annotations) (download)
Fri Mar 8 12:05:33 2013 UTC (6 years, 9 months ago) by william
File size: 2655 byte(s)

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 //IXMLTV_LOADER XMLTV_LOADER { get; }
20 //void TestParse();
21 IXMLTVSource Source { get; }
22 Dictionary<string, IXMLTVChannel> Channels { get; }
23 Dictionary<int, IXMLTVProgram> Programs { get; }
24 }
25
26 public interface IXMLTVSource
27 {
28 string SourceName { get; }
29 string GeneratorName { get; }
30 string GeneratorUrl { get; }
31 string ToString();
32 }
33 public interface IXMLTVChannel
34 {
35 string Id { get; }
36 int Number { get; }
37 string CallSign { get; }
38 string Name { get; }
39 string ToString();
40 }
41 public interface IXMLTVProgram
42 {
43 int Id { get; }
44 DateTime Start { get; }
45 DateTime Stop { get; }
46 IXMLTVChannel Channel { get; }
47 string Title { get; }
48 string SubTitle { get; }
49 string Description { get; }
50 string ToString();
51 }
52 public interface IXMLTVRuntimeInstance : IXMLTVLoader, IXMLTVParser
53 {
54 //bool IsDisposing { get; }
55 //IXMLTVSerializer<IXMLTVRuntimeInstance> Serializer { get; }
56 }
57
58 public interface IXMLTVSerializer<T>
59 {
60 bool Serialize(string file);
61 bool Serialize(Stream stream);
62 T DeSerialize(string file, out bool status);
63 T DeSerialize(Stream stream, out bool status);
64 }
65
66 public interface IXMLTV<INTERFACE, CLASS> : IXMLTVSerializer<INTERFACE>, IDestroyInstance
67 where CLASS : class,INTERFACE
68 {
69 IXMLTVSerializer<CLASS> CreateSerializer();
70 INTERFACE GetInstance();
71 //CLASS GetInternalInstance();
72 EventHandler<EventArgs> OnInstanceCreated { get; set; }
73 }
74 public interface ISerializer<T>
75 {
76 IXMLTVSerializer<T> Serializer { get; }
77 }
78 public interface IDestroyInstance
79 {
80 void DestroyInstance();
81 }
82 public interface IGetCreatedInstanceEvent
83 {
84 EventHandler<EventArgs> GetOnInstanceCreated();
85 }
86 public interface ISetCreatedInstanceEvent
87 {
88 void SetOnInstanceCreated(EventHandler<EventArgs> event_instance);
89 }
90 public interface IRuntimeInstanceLoader<T>
91 {
92 T LoadFromInstance(T instance);
93 }
94 }

  ViewVC Help
Powered by ViewVC 1.1.22