summary refs log tree commit diff
path: root/imap.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-10-27 19:47:07 -0400
committerJune McEnroe <june@causal.agency>2020-10-29 11:29:30 -0400
commit525648f0200230ca4fface61dac5b99c37a27e61 (patch)
tree48ed8540eb0f6630b5a6231c1c97936b6cfb6db2 /imap.h
parentRemove local from shell script (diff)
downloadimbox-525648f0200230ca4fface61dac5b99c37a27e61.tar.gz
imbox-525648f0200230ca4fface61dac5b99c37a27e61.zip
Refactor IMAP struct
Diffstat (limited to '')
-rw-r--r--imap.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/imap.h b/imap.h
index c2b7af1..0af96ff 100644
--- a/imap.h
+++ b/imap.h
@@ -163,7 +163,16 @@ static inline void respFree(struct Resp resp) {
 }
 
 extern bool imapVerbose;
-void imapOpen(FILE **read, FILE **write, const char *host, const char *port);
-struct Resp imapResp(FILE *imapRead);
+
+struct IMAP {
+	FILE *r;
+	FILE *w;
+	size_t cap;
+	char *buf;
+	char *ptr;
+};
+
+struct IMAP imapOpen(const char *host, const char *port);
+struct Resp imapResp(struct IMAP *imap);
 
 #endif /* IMAP_H */