summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/mailutils/mail.h
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-01-03 13:58:15 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2015-01-03 13:58:15 +0100
commit4aca87515a5083ae0e31ce3177189fd43b6d05ac (patch)
tree7b1d9a31393ca090757dc6f0d3859b4fcd93f271 /release/src/router/busybox/mailutils/mail.h
parent008d0be72b2f160382c6e880765e96b64a050c65 (diff)
downloadtomato-4aca87515a5083ae0e31ce3177189fd43b6d05ac.tar.gz
tomato-4aca87515a5083ae0e31ce3177189fd43b6d05ac.tar.bz2
patch to Vanilla Tomato 1.28
Diffstat (limited to 'release/src/router/busybox/mailutils/mail.h')
-rw-r--r--release/src/router/busybox/mailutils/mail.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/release/src/router/busybox/mailutils/mail.h b/release/src/router/busybox/mailutils/mail.h
new file mode 100644
index 00000000..bb747c4c
--- /dev/null
+++ b/release/src/router/busybox/mailutils/mail.h
@@ -0,0 +1,35 @@
+
+struct globals {
+ pid_t helper_pid;
+ unsigned timeout;
+ unsigned opts;
+ char *user;
+ char *pass;
+ FILE *fp0; // initial stdin
+ char *opt_charset;
+ char *content_type;
+};
+
+#define G (*ptr_to_globals)
+#define timeout (G.timeout )
+#define opts (G.opts )
+//#define user (G.user )
+//#define pass (G.pass )
+//#define fp0 (G.fp0 )
+//#define opt_charset (G.opt_charset)
+//#define content_type (G.content_type)
+#define INIT_G() do { \
+ SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
+ G.opt_charset = (char *)CONFIG_FEATURE_MIME_CHARSET; \
+ G.content_type = (char *)"text/plain"; \
+} while (0)
+
+//char FAST_FUNC *parse_url(char *url, char **user, char **pass);
+
+void FAST_FUNC launch_helper(const char **argv);
+void FAST_FUNC get_cred_or_die(int fd);
+
+const FAST_FUNC char *command(const char *fmt, const char *param);
+
+void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol);
+void FAST_FUNC decode_base64(FILE *src_stream, FILE *dst_stream);