summaryrefslogtreecommitdiffstats
path: root/pigeonhole/src/testsuite/testsuite-smtp.h
diff options
context:
space:
mode:
Diffstat (limited to 'pigeonhole/src/testsuite/testsuite-smtp.h')
-rw-r--r--pigeonhole/src/testsuite/testsuite-smtp.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/pigeonhole/src/testsuite/testsuite-smtp.h b/pigeonhole/src/testsuite/testsuite-smtp.h
new file mode 100644
index 0000000..0b120b2
--- /dev/null
+++ b/pigeonhole/src/testsuite/testsuite-smtp.h
@@ -0,0 +1,35 @@
+#ifndef TESTSUITE_SMTP_H
+#define TESTSUITE_SMTP_H
+
+void testsuite_smtp_init(void);
+void testsuite_smtp_deinit(void);
+void testsuite_smtp_reset(void);
+
+/*
+ * Simulated SMTP out
+ */
+
+void *testsuite_smtp_start
+ (const struct sieve_script_env *senv ATTR_UNUSED,
+ const struct smtp_address *mail_from);
+void testsuite_smtp_add_rcpt
+ (const struct sieve_script_env *senv ATTR_UNUSED,
+ void *handle, const struct smtp_address *rcpt_to);
+struct ostream *testsuite_smtp_send
+ (const struct sieve_script_env *senv ATTR_UNUSED,
+ void *handle);
+void testsuite_smtp_abort
+ (const struct sieve_script_env *senv ATTR_UNUSED,
+ void *handle);
+int testsuite_smtp_finish
+ (const struct sieve_script_env *senv ATTR_UNUSED,
+ void *handle, const char **error_r);
+
+/*
+ * Access
+ */
+
+bool testsuite_smtp_get
+ (const struct sieve_runtime_env *renv, unsigned int index);
+
+#endif