diff options
| author | Barry Warsaw | 2016-03-25 10:13:48 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2016-03-25 10:13:48 -0400 |
| commit | a681354cadf48394127796eb111c2904283c9288 (patch) | |
| tree | 87377966491672f981d6567d78debd384004d11b /src/mailman/interfaces/chain.py | |
| parent | b9c06627e46ff1e9f09965228ab3b48f217109af (diff) | |
| download | mailman-a681354cadf48394127796eb111c2904283c9288.tar.gz mailman-a681354cadf48394127796eb111c2904283c9288.tar.zst mailman-a681354cadf48394127796eb111c2904283c9288.zip | |
Diffstat (limited to 'src/mailman/interfaces/chain.py')
| -rw-r--r-- | src/mailman/interfaces/chain.py | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/src/mailman/interfaces/chain.py b/src/mailman/interfaces/chain.py index ac5868465..3fccb4090 100644 --- a/src/mailman/interfaces/chain.py +++ b/src/mailman/interfaces/chain.py @@ -17,26 +17,12 @@ """Interfaces describing the basics of chains and links.""" -__all__ = [ - 'AcceptEvent', - 'AcceptOwnerEvent', - 'ChainEvent', - 'DiscardEvent', - 'HoldEvent', - 'IChain', - 'IChainIterator', - 'IChainLink', - 'IMutableChain', - 'LinkAction', - 'RejectEvent', - ] - - from enum import Enum +from mailman import public from zope.interface import Interface, Attribute - +@public class ChainEvent: """Base class for chain notification events.""" @@ -47,27 +33,32 @@ class ChainEvent: self.chain = chain +@public class AcceptEvent(ChainEvent): """A notification event signaling that a message is being accepted.""" +@public class AcceptOwnerEvent(ChainEvent): """An event signaling that a message is accepted to the -owner address.""" +@public class DiscardEvent(ChainEvent): """A notification event signaling that a message is being discarded.""" +@public class HoldEvent(ChainEvent): """A notification event signaling that a message is being held.""" +@public class RejectEvent(ChainEvent): """A notification event signaling that a message is being rejected.""" - +@public class LinkAction(Enum): # Jump to another chain. jump = 0 @@ -82,7 +73,7 @@ class LinkAction(Enum): run = 4 - +@public class IChainLink(Interface): """A link in the chain.""" @@ -102,7 +93,7 @@ class IChainLink(Interface): """) - +@public class IChain(Interface): """A chain of rules.""" @@ -119,7 +110,7 @@ class IChain(Interface): """ - +@public class IChainIterator(Interface): """An iterator over chain rules.""" @@ -130,7 +121,7 @@ class IChainIterator(Interface): """ - +@public class IMutableChain(IChain): """Like `IChain` but can be mutated.""" |
