From b3896476a0e6978c0d7f6fedfb64588934a78f1e Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 10 Mar 2019 23:45:00 -0400 Subject: Fetch valid UIDs from server after opening dir --- worker/types/messages.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'worker/types/messages.go') diff --git a/worker/types/messages.go b/worker/types/messages.go index 02a3119..d44624d 100644 --- a/worker/types/messages.go +++ b/worker/types/messages.go @@ -2,6 +2,10 @@ package types import ( "crypto/x509" + "net/mail" + "time" + + "github.com/emersion/go-imap" "git.sr.ht/~sircmpwn/aerc2/config" ) @@ -68,6 +72,20 @@ type OpenDirectory struct { Directory string } +type FetchDirectoryContents struct { + Message +} + +type FetchMessageHeaders struct { + Message + Uids imap.SeqSet +} + +type FetchMessageBodies struct { + Message + Uids imap.SeqSet +} + // Messages type CertificateApprovalRequest struct { @@ -89,3 +107,18 @@ type DirectoryInfo struct { Exists, Recent, Unseen int } + +type DirectoryContents struct { + Message + Uids []uint64 +} + +type MessageInfo struct { + Message + Envelope *imap.Envelope + Flags []string + InternalDate time.Time + Mail *mail.Message + Size uint32 + Uid uint64 +} -- cgit v1.2.3