Commit Graph
250 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 EvansandJohannes Weiss 428b7b3488 Enable modifying IMAPClientHandler capabilities (#490)
* Add capabilities setting

* Tests

* Update Sources/NIOIMAP/Coders/IMAPClientHandler.swift

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

* Fix non-sync literal test

* Use assert methods

* Fix test

* Sanity

* Enable changing capabilities

* Refactor to inout

* Switch to using IDs

* Default closure

* Soundness

* Fix rebase

* Re-add test

* Cleanup

* Soundness

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
2021-04-06 15:04:14 +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 a33ea576e3 New API for IDLE (#508)
* Rename to ServerResponse

* Docs

* Rename to IDLE started

* Fix compile

* Fix refactor

* Remove server response

* Soundness

* Remove underscore

* Remove associated data

* Soundness

* Write a continuation

* Soundness
2021-03-26 12:31:46 +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
Matt Diephouse b8537d6361 Fix FETCH BODY streaming (#499)
* Fix FETCH BODY streaming

* Soundness
2021-03-22 18:02:01 +00:00
David Evans 1e43a90df4 Fix streaming FETCH responses (#496)
* Fix

* Soundness

* Discard read bytes

* Use clear and precondition
2021-03-22 14:28:26 +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
Matt Diephouse 3c2123857b Fix serialization of LIST responses (#494)
* Fix serialization of LIST responses

* Use writeNil()
2021-03-18 22:02:39 +00:00
David Evans 5b23a7685b Add AppendOptions default values and none convenience (#492)
* Add empty append options init

* Use `none`

* Soundness
2021-03-18 12:13:15 +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 81c8e9158d Underscore EncodeBuffer (#479)
* Underscore

* Underscore everything

* Add soundness self insert
2021-03-18 11:25:05 +00:00
David Evans e24152c87c Make field public (#488) 2021-03-17 21:09:19 +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
David Evans 7806fd192e Don't auto-add capabilities (#477)
* Don't always add IMAP4

* Remove IMAP4 rev1
2021-03-15 11:59:48 +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
Matt Diephouse 8296db95dd Make Capability and its subtypes Hashable (#473) 2021-03-10 17:06:03 +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 c0bc6ce80e Add comment (#469) 2021-03-05 17:39:55 +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 7ad4256ad2 Throw if creating a sub mailbox where path separator is nil (#461)
* Throw if path separator is nil

* Soundness
2021-03-03 14:50:11 +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
Matt Diephouse ac9b9d35d2 Make init public (#456) 2021-03-02 21:42:48 +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
David Evans 0e2b6d368f Lowercase (#453) 2021-02-22 21:08:28 +00:00
Matt Diephouse 4e5b90366b Make MessageData.expunge take a SequenceNumber (#449) 2021-02-18 19:13:32 +00:00
Daniel Eggert 594e1caedc Add RangeView to UIDSet (#447)
* Add RangeView to UIDSet

* Fix for Swift 5.2
2021-02-16 16:17:34 +00:00
David Evans e23b49269c Add internet message date (#444)
* Add internet message date

* Soundness
2021-02-16 10:03:04 +00:00
Daniel Eggert e704d7f4d9 Make UIDSet conform to RandomAccessCollection (#445) 2021-02-15 15:59:58 +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 Evans 2c339a8eee Fix filter docs (#440) 2021-02-12 10:57:40 +00:00
David Evans f49bb54e26 Make date hashable (#442) 2021-02-11 19:12:05 +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