Fixed the licensing statements - I had erroneously marked the files as covered by...
[lwes-dotnet/github-mirror.git] / Org.Lwes / Listener / Enums.cs
blob6d529d907ba9e029dfd7d5dc40f5110b31f78c77
1 //
2 // This file is part of the LWES .NET Binding (LWES.net)
3 //
4 // COPYRIGHT (C) 2009, Phillip Clark (cerebralkungfu[at*g mail[dot*com)
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 // 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.Listener
22 using System;
23 using System.Collections.Generic;
24 using System.Linq;
25 using System.Text;
27 #region Enumerations
29 /// <summary>
30 /// Represents the state of an event sink.
31 /// </summary>
32 public enum EventSinkStatus
34 /// <summary>
35 /// Indicates the event sink has been suspended and should not receive
36 /// events until activated. This is the initial state for new IEventSinkRegistrationKeys.
37 /// </summary>
38 Suspended = 0,
39 /// <summary>
40 /// Indicates the event sink is active and may be notified of events
41 /// at any time.
42 /// </summary>
43 Active = 1,
44 /// <summary>
45 /// For event sinks that are not thread-safe, indicates that the sink
46 /// is currently being invoked.
47 /// </summary>
48 Notifying = 2,
49 /// <summary>
50 /// Indicates the event sink has been canceled.
51 /// </summary>
52 Canceled = 3
55 /// <summary>
56 /// Strategies to be taken when garbage data arrives from an endpoint.
57 /// </summary>
58 public enum GarbageHandlingVote
60 /// <summary>
61 /// No opinion on garbage handling. Continue as normal.
62 /// </summary>
63 None,
64 /// <summary>
65 /// Causes all traffic from an endpoint to be handled by the event
66 /// sink's HandleGarbageData.
67 /// </summary>
68 TreatTrafficFromEndpointAsGarbage,
69 /// <summary>
70 /// Causes any data received from the endpoint to be discarded as soon
71 /// as possible.
72 /// </summary>
73 IgnoreAllTrafficFromEndpoint,
74 /// <summary>
75 /// The default strategy. Same as None
76 /// </summary>
77 Default = None
80 /// <summary>
81 /// Enumeration for garbage handling strategy employed by Listeners.
82 /// </summary>
83 public enum ListenerGarbageHandling
85 /// <summary>
86 /// Indicates the listener should silently handle garbage data
87 /// but continue to accept data from all endpoints.
88 /// </summary>
89 FailSilently = 0,
90 /// <summary>
91 /// Indicates the listener should ignore data from endpoints
92 /// from which garbage has been received.
93 /// </summary>
94 IgnoreEndpointsThatSendGarbage = 1,
95 /// <summary>
96 /// Indicates the listener should ask the event sinks to vote
97 /// on the strategy on a per-endpoint basis.
98 /// </summary>
99 /// <see cref="Org.Lwes.Listener.IEventSink"/>
100 AskEventSinksToVoteOnStrategy = 2,
101 /// <summary>
102 /// The default value: FailSilently
103 /// </summary>
104 Default = FailSilently
107 #endregion Enumerations