Commit Graph
166 Commits
Author SHA1 Message Date
David Evans cb0ebcf4e0 Rename IMailboxReference to EncodedMailboxUIDValidity (#529)
* Rename to EncodedMailboxUIDValidity

* Soundness

* More renaming

* Fix compile

* Remove Encoded

* Soundness

* Rename
2021-04-07 17:38:31 +01:00
David Evans 0654d550e5 Fix continuation request state tracking to disambiguate idle and authentication (#526)
* Fix state tracking

* Soundness

* Fix tests

* Fix auth encoding

* Make state private

* Add reentrancy test

* Add asserts

* Better error types

* Soundness

* Use "real" example base64

* Soundness

* PR review

* Soundness

* Fix rebase
2021-04-07 13:41:52 +01:00
David Evans 38b4ceda9a More performance improvements (#515)
* parseTaggedResponseState

* parseUntaggedResponseStatus

* parseMessageAttribute

* Fix

* Soundness

* Uncomment tests

* Soundness
2021-04-07 11:50:14 +01:00
David Evans b29c33abab Rename IMessageList to EncodedSearchQuery (#532) 2021-04-07 11:46:46 +01:00
David Evans 3b5a174042 Rename to IMAPURLAuthenticationMechanism (#531) 2021-04-06 19:14:30 +01:00
David Evans bf0ca765df Rename UserInfo (#523)
* Rename UserInfo

* Remove all userInfo references
2021-04-06 14:32:26 +01:00
David Evans 919d6d0be4 Use KeyValues<String, String?> for ID data (#521) 2021-04-06 12:55:49 +01:00
David Evans ac16a9e9b5 Rename to IMAPCalendarDay (#524) 2021-04-01 13:18:35 +01:00
David Evans f3db4a1d18 Rename to ServerMessageDate (#525) 2021-04-01 13:18:19 +01:00
David Evans 22b38c56ed Parser cleanup (implement shortcut methods, use new parse oneOf) (#509) 2021-03-31 11:21:34 +01:00
David EvansandJohannes Weiss 9d9ae535a4 Sample fuzzing target with tests (#511)
* Add fuzzing target

* Quick and easy sample fuzzing

* More fixes

* Try to consume all bytes

* Soundness

* Update Sources/Fuzzer/main.swift

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>

* Rename files

* PR comments

* Fix

* While true

* Remove redundant throw

* Remove fuzzing test target

* Soundness

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
2021-03-26 13:38:01 +00:00
David Evans 94e3fb42f5 Update dependencies (#493)
* Update packages

* Run swift format

* Update
2021-03-23 17:21:41 +00:00
8b9c01a6ba Servers now can send authentication challenges (#505)
* Servers now can send authentication challenges

* Soundness

* Fix tests

* Change to use Response

* Docs

* Soundness

* work around SR-14394

* Update Sources/NIOIMAPCore/Grammar/Response/Response.swift

Co-authored-by: Daniel Eggert <daniel.eggert@hoerbuch.dk>

* Fix compile on 5.2

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
Co-authored-by: Daniel Eggert <daniel.eggert@hoerbuch.dk>
2021-03-23 16:33:36 +00:00
David Evans 53c2eefe72 Disable modification on protected fields after initialisation (#495)
* Use lets

* Fix warnings

* Warnings
2021-03-23 12:31:17 +00:00
David Evans f1e7faa75f Propagate command tag on parsing error (#500)
* Propagate command tag on parsing error

* Soundness

* Docs

* Fix tests
2021-03-23 10:04:16 +00:00
David Evans 80a2910e63 Implement table parser with commands example (#437)
* Performance structure

* More tests

* Add more tests

* Remove dups

* More performance test cases

* Parse it all

* Fix sanity

* Use NIO perf tooling

* Change perf target name

* New table parser

* Fix quota parsers

* Fix ID parsers

* Human readable

* Cleanup

* Soundness

* Fix tests

* Minor refactor to use suffixes

* Tests

* Make parsing table non-global

* Rebase

* Soundness

* Tests

* More tests

* Soundness

* Fix compile

* Condense

* Maybe fix
2021-03-22 09:25:17 +00:00
David Evans a719f935b6 Use AuthenticationKind in Command.authenticate (#491)
* Make authentication kind it's own thing

* Make auth kind var non-public

* Fix compile

* Rebase
2021-03-18 11:45:35 +00:00
David Evans a486ea30d4 Support parsing an extra space after flags (#481)
* Support parsing an extra space

* Move to parseFixedString

* Soundness

* Oops, wrong place

* Rename space

* Soundness
2021-03-16 13:18:11 +00:00
David Evans 238caca684 Skip parsing if the ByteBuffer is empty (#478)
* Don't attempt parsing if 0 bytes

* Soundness

* undo

* Update CommandParser+Tests.swift
2021-03-16 11:53:52 +00:00
Johannes Weiss be9c737a29 restore separation of parser & parser library (#468) 2021-03-11 16:56:08 +00:00
David Evans 3bdebc12bd Address API review comments part 1 (#474)
* Rename Date to IMAPDate

* Rename all esearch types to extended search

* Rename Address to EmailAddress

* Rename genUrlAuth

* Rename Auth to Authorization

* Rename IServer

* Rename IUserInfo

* Soundness
2021-03-11 11:31:52 +00:00
Matt Diephouse bd5a183b21 Change FetchResponse.start(Int) to take a SequenceNumber (#472) 2021-03-10 17:06:28 +00:00
David Evans 1e0f89fd11 Non empty UID set (#448)
* Convert UIDSet to LastCommandSet

* Soundness

* Define UIDSetNonEmpty

* Use UIDSetNonEmpty

* Soundness

* Fix tests

* Soundness

* Convenience funcs

* Soundness

* Fix compile

* Use parseOneOf

* Soundness
2021-03-05 17:48:42 +00:00
David Evans 8feaf32520 Remove string initialisers from MailboxName (#462)
* Remove string initialisers

* Add comment

* Refactor assertion

* Readonly

* Private modified utf7

* Fix tests

* Soundness

* PR comments

* Remove isBufferValid

* PR comments

* Soundness
2021-03-05 12:16:38 +00:00
David Evans 6191061fb4 Create generic type to wrap a set or IMAP "last result" (#463)
* Define last command set type

* Replace SequenceSet

* Docs

* Soundness

* Update dates

* Rename last command set

* Cleanup

* Update docs
2021-03-04 14:45:12 +00:00
David Evans 1dad108844 Make struct init parameter names match the members (#458)
* Fix field names

* Soundness
2021-03-03 14:25:06 +00:00
David Evans 368a8f14cf Create a wrapper for body disposition kind (#454)
* Implement disposition

* Add statics

* Soundness

* soundness

* Soundness
2021-02-23 15:29:52 +00:00
David Evans faec217ef9 Define message ID (#451) 2021-02-23 10:36:01 +00:00
Matt Diephouse 4e5b90366b Make MessageData.expunge take a SequenceNumber (#449) 2021-02-18 19:13:32 +00:00
David Evans e23b49269c Add internet message date (#444)
* Add internet message date

* Soundness
2021-02-16 10:03:04 +00:00
David Evans e82dcbfe61 Vendor base64 (#443)
* Vendor base64

* Soundness

* Fix notices file

* Fix compile warning

* Soundness

* Exclude headers from chromium
2021-02-12 12:08:41 +00:00
David EvansandJohannes Weiss 668ba3ac17 Refactor initial client response (#433)
* Refactor initial client response

* Fix soundness

* Bike shed

* Update Sources/NIOIMAPCore/Grammar/InitialClientResponse.swift

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
2021-02-11 11:52:49 +00:00
David Evans 10646bf210 Fix parse flags (#436)
* Fix parsing

* Fix soundness
2021-02-05 14:26:26 +00:00
David Evans 62ab137117 Support iCloud response text non-conformance (#435)
* Support iCloud

* Soundness
2021-02-05 12:17:35 +00:00
David Evans 33d6060046 Final key value refactor (#432)
* Remove a load of parameter types

* Remove NameSpaceResponseExtension

* Remove SearchModificationSequenceExtension

* Remove SearchReturnDataExtension

* Remove SearchReturnOptionExtension

* Soundness
2021-02-05 12:09:00 +00:00
David Evans 41c363048b Remove ParameterPair and replace with KeyValues<String, String> (#429)
* Remove ParameterPair

* Soundness
2021-02-04 12:04:24 +00:00
David Evans df5074856c Remove all minor Key/Value types (#430)
* Define basic KeyValue type

* Remove TaggedExtension

* Replace Parameter

* Remove ParameterPair

* Remove EntryValue

* Remove OptionExtension

* Soudness

* Docs

* Inline

* Soundness

* PR comments
2021-02-04 11:03:41 +00:00
David Evans 4e47a216f3 Add support for mailbox groups (#426)
* Address Group

* Support for groups

* Docs

* Fix soundness

* Remove throws

* Remove MailboxName

* Fix compile

* Rename AddressOrGroup

* Remove recursion

* Fix soundness
2021-02-03 16:03:26 +00:00
David Evans f056b14fa6 Refactor out ID parameter and replace with new KeyValues type (#424)
* Add conveniences

* Make iteratable

* Add ID example

* Add docs

* Converting backing to KeyValue struct

* Fix soundness
2021-02-01 18:12:12 +00:00
David Evans 621bb7ce2c Rename address fields (#422) 2021-01-29 12:45:16 +00:00
David Evans 1c0ea188b7 Add missing fetch attribute case (#413)
* Add missing case

* Fix sanity
2021-01-22 10:30:58 +00:00
Daniel Eggert 2f409effef Conform to CustomDebugStringConvertible (#408)
…instead of CustomStringConvertible
2021-01-21 13:34:19 +00:00
David Evans 4f0f4bab42 Reorganise parser and parser tests into smaller files (#407)
* Move grammar parser

* Extract parse command

* Extract parse body

* Extract parse date

* Extract parse fetch

* Extract parse list

* Extract parse mailbox

* Extract parse response

* Extrace parse search

* Extract parse entry

* Extract parse UID

* Extract parse append

* Extract parse envelope/addresses

* Extract parse message

* Extract parse sequence

* Fix sanity

* Fix

* Fix
2021-01-19 20:33:58 +00:00
David Evans 23f0a211da Kill raw representable (#406)
* Fix up UID

* Fix up Encoding

* Fix up MediaSubtype

* Fix up Flag

* Fix up BasicKind

* Fix up GmailLabel

* Fix up SequenceNumber

* Fix up attritbute flag

* Cleanup UIDShiftWrapper

* Cleanup SequenceRange

* Cleanup UIDRange

* Cleanup UIDValidity

* Cleanup MetadataValue

* Cleanup SectionSpecPart

* Cleanup UAuthMechanism

* Cleanup UseAttribute

* Protect access

* Fix sanity
2021-01-18 14:12:56 +00:00
David Evans 51dbd0f492 Refactor streaming to include all body and RFC822 (#403) 2021-01-14 21:18:06 +00:00
Matt Diephouse 2118f38e9b Use a SequenceNumber for ResponseTextCode.unseen (#404) 2021-01-14 15:23:23 +00:00
David Evans 3f6aa71643 Fix InternalDate sanity checking (#399)
* Gix sanity checks

* Refactor

* Fix sanity

* Docs

* Fix linux compile issues

* Fix sanity
2021-01-11 13:29:20 +00:00
David Evans cb4d16ed07 Convert UIDCOPY to use UIDRanges (#398)
* Convert to using UIDRanges

* Fix sanity

* Update docs
2021-01-11 09:23:03 +00:00
David EvansandDaniel Eggert 7d6997edcf Enable custom continuation handling (#372)
* Client handler outputs responseorcontinuations

* Finish implementation

* Remove BB array from authenticate

* Fix sanity

* Refactor

* Fix sanity

* Apply suggestions from code review

Co-authored-by: Daniel Eggert <daniel.eggert@hoerbuch.dk>

* Rename to continuation response

* Fix compile

* Fix tests

* Fix sanity

* PR comments

* Fix sanity

Co-authored-by: Daniel Eggert <daniel.eggert@hoerbuch.dk>
2021-01-05 17:21:38 +00:00
David Evans c418cdcd2a Rename URL Rump mechanism (#395) 2021-01-05 16:06:41 +00:00