trivial, email change -- not affecting code
[lwes-dotnet/github-mirror.git] / Org.Lwes / Emitter / IEventEmitter.cs
blobbbb8f6ab6579ce902d7a2aaf53b528a55ee97279
1 //
2 // This file is part of the LWES .NET Binding (LWES.net)
3 //
4 // COPYRIGHT© 2009, Phillip Clark (phillip[at*flitbit[dot*org)
5 // original .NET implementation
6 //
7 // LWES.net is free software: you can redistribute it and/or modify
8 // it under the terms of the Lesser GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // LWES.net is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // Lesser GNU General Public License for more details.
17 // You should have received a copy of the Lesser GNU General Public License
18 // along with LWES.net. If not, see <http://www.gnu.org/licenses/>.
20 namespace Org.Lwes.Emitter
22 using System;
23 using System.IO;
24 using System.Text;
26 using Org.Lwes.DB;
28 /// <summary>
29 /// Interface for classes that emit Events into the light-weight event system.
30 /// </summary>
31 /// <remarks>
32 /// This interface makes the use of the IDisposable pattern explicit; implementations
33 /// must guarantee that cleanup occured before returning from Dispose.
34 /// </remarks>
35 public interface IEventEmitter : IDisposable
37 /// <summary>
38 /// The character encoding used when performing event IO.
39 /// </summary>
40 Encoding Encoding
42 get;
45 /// <summary>
46 /// Indicates whether the emitter has been initialized.
47 /// </summary>
48 bool IsInitialized
50 get;
53 /// <summary>
54 /// The event template database used by the emitter.
55 /// </summary>
56 IEventTemplateDB TemplateDB
58 get;
61 /// <summary>
62 /// Indicates whether events issued from the emitter will validate
63 /// when they are written to.
64 /// </summary>
65 bool Validate
67 get;
70 /// <summary>
71 /// Creates an event type identified by the event name.
72 /// </summary>
73 /// <param name="eventName">the event type's name</param>
74 /// <returns>a new LWES event instance</returns>
75 Event CreateEvent(string eventName);
77 /// <summary>
78 /// Creates an event type identified by the event name.
79 /// </summary>
80 /// <param name="eventName">the event type's name</param>
81 /// <param name="enc">encoding used when performing IO on the event</param>
82 /// <returns>a new LWES event instance</returns>
83 Event CreateEvent(string eventName, SupportedEncoding enc);
85 /// <summary>
86 /// Creates an event type identified by the event name.
87 /// </summary>
88 /// <param name="eventName">the event type's name</param>
89 /// <param name="validate">whether the event is validated</param>
90 /// <returns>a new LWES event instance</returns>
91 Event CreateEvent(string eventName, bool validate);
93 /// <summary>
94 /// Creates an event type identified by the event name.
95 /// </summary>
96 /// <param name="eventName">the event type's name</param>
97 /// <param name="validate">whether the event is validated</param>
98 /// <param name="enc">encoding used when performing IO on the event</param>
99 /// <returns>a new LWES event instance</returns>
100 Event CreateEvent(string eventName, bool validate, SupportedEncoding enc);
102 /// <summary>
103 /// Emits an event to the event system.
104 /// </summary>
105 /// <param name="evt">the event being emitted</param>
106 void Emit(Event evt);