Commit fbe3b5d57abcc6d3e155354267fccfd454c61b83

Thomas de Grivel 2024-11-30T01:09:33

headers for smtp

diff --git a/kc3_smtp.h b/kc3_smtp.h
new file mode 100644
index 0000000..21918c4
--- /dev/null
+++ b/kc3_smtp.h
@@ -0,0 +1,27 @@
+/* kc3
+ * Copyright 2022,2023,2024 kmx.io <contact@kmx.io>
+ *
+ * Permission is hereby granted to use this software granted the above
+ * copyright notice and this permission paragraph are included in all
+ * copies and substantial portions of this software.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+ * PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+ * AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+#ifndef KC3_SMTP_H
+#define KC3_SMTP_H
+
+#include "types.h"
+
+/* Heap-allocation functions, call kc3_smtp_close after use. */
+sw      kc3_smtp_close (u_ptr *smtp);
+u_ptr * kc3_smtp_open (const s_str *server, const s_str *port,
+                       const s_sym * const *security,
+                       const s_sym * const *flags,
+                       const s_str *cafile, u_ptr *dest);
+
+/* Operators. */
+
+#endif /* SMTP_H */
diff --git a/types.h b/types.h
new file mode 100644
index 0000000..00e3f24
--- /dev/null
+++ b/types.h
@@ -0,0 +1,18 @@
+/* kc3
+ * Copyright 2022,2023,2024 kmx.io <contact@kmx.io>
+ *
+ * Permission is hereby granted to use this software granted the above
+ * copyright notice and this permission paragraph are included in all
+ * copies and substantial portions of this software.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+ * PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+ * AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+#ifndef SMTP_TYPES_H
+#define SMTP_TYPES_H
+
+#include <libkc3/types.h>
+
+#endif /* SMTP_TYPES_H */