about 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-27 19:47:07 -0400
commit78653936498babc06894526bd1fde36fc672f9ed (patch)
tree55ae126a7c92c0238a622f241f29385c2b968603 /imap.h
parentRewrite compat and add configure script (diff)
downloadnotemap-78653936498babc06894526bd1fde36fc672f9ed.tar.gz
notemap-78653936498babc06894526bd1fde36fc672f9ed.zip
Refactor IMAP struct
Diffstat (limited to 'imap.h')
-rw-r--r--imap.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/imap.h b/imap.h
index 186cc55..7cd52e6 100644
--- a/imap.h
+++ b/imap.h
@@ -160,7 +160,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 */