From 8bfa1d1bd6d2b29c6a154858cf7a3970d0521b4a Mon Sep 17 00:00:00 2001 From: VG Date: Fri, 27 May 2016 18:19:29 +0200 Subject: Auto-commit on 6d1dbe8495b5fafbc5f50d80268d0ca5b7b097be --- climl/__init__.py | 2 ++ climl/hooks.py | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 climl/hooks.py diff --git a/climl/__init__.py b/climl/__init__.py index 8da9f80..e865254 100644 --- a/climl/__init__.py +++ b/climl/__init__.py @@ -2,6 +2,7 @@ from . import imap from . import interface from . import hooks + def on_email(content, hooks): print('on_email:', content) context = {} @@ -13,6 +14,7 @@ def on_email(content, hooks): print('now, raising exception') raise interface.HookAbortError() + def main(): # TODO: how to load hooks with a dependency tree and sort them accordingly # to generate hooks list ? diff --git a/climl/hooks.py b/climl/hooks.py new file mode 100644 index 0000000..f6e3844 --- /dev/null +++ b/climl/hooks.py @@ -0,0 +1,21 @@ +from . import interfaces + + +def hook_check_ml_restrictions(context, content): + pass + + +def hook_validate_poster(context, content): + pass + + +def hook_process_subscribe_queries(context, content): + pass + + +def hook_generate_rcpt_list(context, content): + pass + + +def hook_send_all(context, content): + pass -- cgit v1.2.3