diff options
author | June McEnroe <june@causal.agency> | 2020-10-27 19:47:07 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-10-27 19:47:07 -0400 |
commit | 78653936498babc06894526bd1fde36fc672f9ed (patch) | |
tree | 55ae126a7c92c0238a622f241f29385c2b968603 /imap.h | |
parent | Rewrite compat and add configure script (diff) | |
download | notemap-78653936498babc06894526bd1fde36fc672f9ed.tar.gz notemap-78653936498babc06894526bd1fde36fc672f9ed.zip |
Refactor IMAP struct
Diffstat (limited to '')
-rw-r--r-- | imap.h | 13 |
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 */ |