about summary refs log tree commit diff
path: root/imap.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-11-28 20:43:28 -0500
committerJune McEnroe <june@causal.agency>2020-11-28 20:43:28 -0500
commitb07b342d93ea5720cbbc0c347bf610aeaa1c1e92 (patch)
tree628cfc6b18becf10e2535eb413160394e6aef0eb /imap.h
parentSay OpenSSL in additional permission notices (diff)
downloadbubger-b07b342d93ea5720cbbc0c347bf610aeaa1c1e92.tar.gz
bubger-b07b342d93ea5720cbbc0c347bf610aeaa1c1e92.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 0f034c0..b744bcc 100644
--- a/imap.h
+++ b/imap.h
@@ -168,7 +168,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 */