diff options
| author | Barry Warsaw | 2007-10-09 22:18:14 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-10-09 22:18:14 -0400 |
| commit | 28f41bc768390f11cf817534cca67a1683f235a7 (patch) | |
| tree | fadc3a93de6c87bfca0ad3276cdc81f257a7a221 /Mailman/interfaces | |
| parent | e335c771c9e4bf0c108dd6ef9b8d210dce9c0221 (diff) | |
| download | mailman-28f41bc768390f11cf817534cca67a1683f235a7.tar.gz mailman-28f41bc768390f11cf817534cca67a1683f235a7.tar.zst mailman-28f41bc768390f11cf817534cca67a1683f235a7.zip | |
Reorganize the enums so that they live in the most appropriate interface. The
only constant left in Mailman.constants is now actually a constant.
Diffstat (limited to 'Mailman/interfaces')
| -rw-r--r-- | Mailman/interfaces/action.py | 31 | ||||
| -rw-r--r-- | Mailman/interfaces/mailinglist.py | 16 | ||||
| -rw-r--r-- | Mailman/interfaces/member.py | 41 |
3 files changed, 88 insertions, 0 deletions
diff --git a/Mailman/interfaces/action.py b/Mailman/interfaces/action.py new file mode 100644 index 000000000..ea8b01d6e --- /dev/null +++ b/Mailman/interfaces/action.py @@ -0,0 +1,31 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +__all__ = [ + 'Action', + ] + +from munepy import Enum + + + +class Action(Enum): + hold = 0 + reject = 1 + discard = 2 + accept = 3 + defer = 4 diff --git a/Mailman/interfaces/mailinglist.py b/Mailman/interfaces/mailinglist.py index 0bb176b96..d52a6f7b5 100644 --- a/Mailman/interfaces/mailinglist.py +++ b/Mailman/interfaces/mailinglist.py @@ -17,10 +17,26 @@ """Interface for a mailing list.""" +__all__ = [ + 'IMailingList', + 'ReplyToMunging', + ] + +from munepy import Enum from zope.interface import Interface, Attribute +class ReplyToMunging(Enum): + # The Reply-To header is passed through untouched + no_munging = 0 + # The mailing list's posting address is appended to the Reply-To header + point_to_list = 1 + # An explicit Reply-To header is added + explicit_header = 2 + + + class IMailingList(Interface): """A mailing list.""" diff --git a/Mailman/interfaces/member.py b/Mailman/interfaces/member.py index 9921f7dab..18f0b034e 100644 --- a/Mailman/interfaces/member.py +++ b/Mailman/interfaces/member.py @@ -18,8 +18,49 @@ """Interface describing the basics of a member.""" +from munepy import Enum from zope.interface import Interface, Attribute +__all__ = [ + 'DeliveryMode', + 'DeliveryStatus', + 'IMember', + 'MemberRole', + ] + + + +class DeliveryMode(Enum): + # Regular (i.e. non-digest) delivery + regular = 1 + # Plain text digest delivery + plaintext_digests = 2 + # MIME digest delivery + mime_digests = 3 + # Summary digests + summary_digests = 4 + + + +class DeliveryStatus(Enum): + # Delivery is enabled + enabled = 1 + # Delivery was disabled by the user + by_user = 2 + # Delivery was disabled due to bouncing addresses + by_bounces = 3 + # Delivery was disabled by an administrator or moderator + by_moderator = 4 + # Disabled for unknown reasons. + unknown = 5 + + + +class MemberRole(Enum): + member = 1 + owner = 2 + moderator = 3 + class IMember(Interface): |
