David Evans
794f81bb66
Remove initial response ( #283 )
2020-08-18 11:45:23 +01:00
David Evans
495d5f8c4b
Refactor tests part 2 ( #279 )
...
* Update testParse2Digit
* Update testParseToken
* Update testParseUnsubscribe
* Update testParseUID
* Update testParseUIDSet
* Update testParseUserId
* Update testUIDRange
* Update testParseUid
* Update testParseText
* Fix sanity
* Remove un-needed function
* Update parseTaggedResponse
* Update parseTag
* Update parseSequenceSet
* Update parseRename
* Update parseSubscribe
* Update parseStoreAttribueFlags
* Update parseStore
* Update parseStatus
* Update testParseSequenceSet
* Update parse NZNumber
* Update parseNumber
* Update parseNString
* Test utilities for void returning parsers
* Update testParseNil
* Update testParseNewline
* Update testParseNamespace
* Update testParseAddress
* Better error messages
* Update testParseSequenceRange
* Fix testParseStatus
* Update testParseSequenceNumber
* Update testParseSelect
* Update testParseSectionSpecifierKind
* Update testParseSectionSpecifier
* Update testParseSectionPart
* Update testParseSectionBinary
* Update testParseSection
* Update testParseSearchReturnOptionExtension
* Batch replace function calls
* Use new method almost everywhere
* Remove extra spacing
* Fix sanity
* Remove redundant function
* Remove redundant code
* Refactor parsing search keys
2020-07-31 01:54:17 -07:00
David Evans
f465495467
Setup new parser testing function for convenience (Part 1) ( #278 )
...
* Setup new testing method
* Fix sanity
2020-07-17 12:16:25 +01:00
David Evans
005ee648ff
Flatten parameter types ( #277 )
...
* Begin refactor
* Remove redundant function calls
* Remove CreateParameter
* Remove SelectParameter
* Remove RenameParameter
* Remove StoreModifier
* Remove FetchModifier
* Cleanup
* Flatten simple
* Fix sanity
* Switch to guard
2020-07-15 17:19:17 +01:00
David Evans
f5dd896f7f
Add support for LITERAL- ( #276 )
...
* Support LITERAL-
* Tests for LITERAL-
* Fix sanity
2020-07-15 12:35:12 +01:00
David Evans
b0aa428e15
Convert Mailbox attribute array into a struct ( #273 )
...
* Refactor into struct
* Fix sanity
* Add documentation
* Documentation
* More docs
* Don't use writeable key paths
* Fix sanity
2020-07-13 18:14:31 +01:00
David Evans
b34be24dfb
Remove try encoding ( #272 )
2020-07-13 10:15:30 +01:00
David Evans
ba7544ecf9
Replace ByteBuffer with string where possible ( #269 )
...
* Replace ByteBuffer with string where possible
* Fix sanity
* Use flat map
2020-07-10 13:28:11 +01:00
David Evans and Cory Benfield
30fd9d7fa7
Add Body Disposition size and filename conveniences ( #268 )
...
* Add size and filename conveniences
* Fix sanity
* Update Sources/NIOIMAPCore/Grammar/Body/Field/Disposition.swift
Co-authored-by: Cory Benfield <lukasa@apple.com >
* Update Sources/NIOIMAPCore/Grammar/Body/Field/Disposition.swift
Co-authored-by: Cory Benfield <lukasa@apple.com >
Co-authored-by: Cory Benfield <lukasa@apple.com >
2020-07-10 11:20:03 +01:00
David Evans
9cb7a1df06
Replace a lot of Type with Kind ( #267 )
2020-07-10 11:13:45 +01:00
David Evans
0c304df4e2
Enable splitting a mailbox name ( #252 )
...
* Enable splitting a mailbox name
* Extra test cases
* Fix sanity
* Improve docs
* Update MailboxInfo.swift
* Update MailboxName.swift
2020-07-09 14:48:47 +01:00
David Evans
93a801b650
Cleanup parse nstring ( #266 )
...
* Cleanup
* Fix sanity
2020-07-09 14:00:05 +01:00
David Evans
1082a1aa7c
Fix parsing BODYSTRUCTURE ( #265 )
...
* Fix parsing and add test cases
* Fix sanity
2020-07-09 13:37:21 +01:00
Daniel Eggert
a3e3867aa2
Make flags case-insensitive, but case-preserving. ( #264 )
2020-07-09 11:43:04 +01:00
David Evans
e5f5c52e32
Fix MessageAttribute documentation ( #261 )
...
* Fix documentation
* Rename structure to hasExtensionData
* Fix sanity
2020-07-09 10:36:53 +01:00
David Evans
05bf679fd0
Remove String typealias ( #259 )
...
* Convert NString into a struct
* Fix sanity
* Just use ByteBuffer?
2020-07-09 09:36:33 +01:00
Daniel Eggert
e1d5de1c10
RawRepresentable ( #262 )
2020-07-09 09:20:09 +01:00
Daniel Eggert
c401b8e251
Cleanup various names related to BodyStructure ( #257 )
...
* BodyStructure: Naming cleanup
* octetCount
* lineCount
* Disposition.kind
2020-07-09 08:50:30 +01:00
David Evans
f58e239a59
Extra tests for non-standard capabilities ( #251 )
...
* Minor modifications
* Fix tests
2020-07-08 14:56:10 +01:00
David Evans
2599f0d94d
Re-add BodyStructureTests ( #250 )
...
* Re-add tests
* Uncomment tests
* Fix sanity
* Refactor Body Field Language
* Add humungous example
* Fix sanity
* Remove unused extension (PR review nit)
2020-07-06 22:44:28 +01:00
David Evans
a5c31cf51f
Refactor capability literal+ API ( #247 )
...
* Refactor literal+
* Fix tests
* Add documentation
* Fix doc nit
* Fix sanity
* Fix tests
2020-07-06 19:11:11 +01:00
David Evans
46c52f84b2
Camel-case months when encoding ( #248 )
...
* Camel-case months
* Fix tests
2020-07-06 19:05:46 +01:00
David Evans
fd9905098c
Refactor Search and UID Search ( #242 )
...
* Refactor Search and UID Search
* Uncomment tests
* Fix sanity
2020-07-06 18:57:38 +01:00
David Evans
6716144eb4
Be more lenient when parsing spaces ( #238 )
...
* Update space parser
* Remove typo
* Extra tests
* Fix parsing spaces
* Re-add missing tests
* Fix sanity
2020-07-06 18:55:55 +01:00
David Evans
1add02eaa4
Don't uppercase keywords ( #249 )
2020-07-06 18:51:42 +01:00
Daniel Eggert
3c20af6f53
Use encoding options specific to the transport direction. ( #240 )
...
* Use encoding options specific to the transport direction.
* Add description to precondition failure.
* Make properties on EncodingOptions public.
* Rename files.
* Change APPEND to use CommandEncodingOptions.
2020-07-06 18:37:16 +01:00
David Evans
ffed95aa72
Remove writeAString ( #239 )
2020-07-02 19:05:34 +01:00
David Evans
9757506063
Make synchronising use configurable ( #226 )
...
* Make synchronising use configurable
* Fix sanity
* Rename
* Rename
* Fix text encoding
* Switch to an option set
* Embed options in struct
* Fix UInt8 test
* Fix UTF-7 encoding and tests
* Fix sanity
* Refactor
* Fix sanity
2020-07-01 16:45:13 +01:00
Daniel Eggert
42ac3f717a
Add parenthesis around search keys when ambiguous ( #237 )
...
Fixes #210
2020-07-01 09:14:00 +01:00
David Evans
701d2d54d7
Refactor and fix Append ( #228 )
...
* Support encoding append commands
* Yay it works
* Cleanup 1
* Cleanup 2
* Fix sanity
* Fix command decoder test
* Fix parsing partial commands sync literals
* Fix parser stress tests
* Fix tests
* Remove unused code
* Code refactor and cleanup
* Fix sanity
* Tests
* Tests and sanity
* Encode AppendCommand tests
* Fix sanity
2020-06-30 12:56:56 +01:00
David Evans
4d8f545414
Always use parseNewline ( #234 )
2020-06-30 12:56:46 +01:00
Daniel Eggert
7bb7916a1a
Allow space before newline (for CAPABILITY). ( #233 )
...
See also: #232
2020-06-30 11:23:11 +01:00
Johannes Weiss and David Evans
525d58d1fa
non-happy path tests: over/underflows ( #220 )
...
* Support encoding append commands
* Yay it works
* Cleanup 1
* Cleanup 2
* Fix sanity
* Fix command decoder test
* Fix parsing partial commands sync literals
* Fix parser stress tests
* Fix tests
* Remove unused code
* Code refactor and cleanup
* Fix sanity
Co-authored-by: David Evans <d.evans@apple.com >
2020-06-26 14:47:40 +01:00
Daniel Eggert
4e19396c19
Range for FETCH need to be encoded as <offset.count> ( #214 )
...
* Range for FETCH need to be encoded as <offset.count>
From RFC 3501:
> This is done by appending an open angle bracket ("<"), the octet position of the first desired octet, a period, the maximum number of octets desired, and a close angle bracket (">") to the part specifier.
* Check for overflow.
* Add more test cases. Limit to UInt32.max
2020-06-26 10:47:30 +01:00
David Evans
b307ac1404
Remove capability preconditions ( #230 )
...
* Remove preconditions
* Fix sanity
2020-06-25 17:58:02 +01:00
Daniel Eggert
1fe1cd4c10
Allow continuation request without space or text. ( #222 )
2020-06-25 17:34:40 +01:00
David Evans
2f185c1abd
Make keywords case sensitive ( #227 )
...
* Make keywords case sensitive
* Fix sanity
2020-06-22 14:48:29 +01:00
David Evans
c34e3889cb
Refactor search key ( #223 )
...
* More search key tests
* Remove sent search type
* Rename smaller and larger
* Rename search key sequence set case
* Documentation
* Add documentation
* And
* Fix tests
* Documentation
2020-06-22 13:48:02 +01:00
David Evans
49b44c521f
Only send return when supported and options exist ( #208 )
...
* Only send return when supported and options exist
* Fix sanity
* Throw an error when encoding
* Fix tests
* Fix sanity
* Fire error through pipeline
* Update ByteBuffer+WriteLiteral.swift
2020-06-22 12:17:11 +01:00
David Evans
c04c7bae95
Add name and value to capability ( #221 )
...
* Add name and value to capability
* Fix sanity
2020-06-18 22:20:35 +01:00
David Evans
e44a55ca8d
Flatten RFC822 into FetchAttribute ( #219 )
...
* Flatten RFC822
* Fix sanity
* Fix tests
2020-06-18 13:38:53 +01:00
Daniel Eggert
1a88c6edd9
Encode FETCH attributes using macros when possible. ( #216 )
2020-06-17 14:56:50 +01:00
Daniel Eggert
84bf22edd4
Use flag case from RFC 3501 for system flags. ( #217 )
2020-06-17 14:54:49 +01:00
David Evans
f97bfee82f
Don't defer to literal8 ( #209 )
...
* Don't defer to literal8
* Use literal if more than 70 characters
2020-06-17 14:51:45 +01:00
David Evans
2a8b8ec78e
Add extra capabilities ( #211 )
2020-06-17 13:08:10 +01:00
Daniel Eggert
03c8a323dc
Replace Date.Month with Int ( #203 )
...
* Change Date.Month -> Int
* Change property order to year, month, day.
* Fix style.
* Fix lowercase / uppercase month name.
* Use preconditionFailure()
2020-06-17 12:48:44 +01:00
Daniel Eggert and David Evans
418f718635
SectionSpecifier convenience. ( #197 )
...
Co-authored-by: David Evans <d.evans@apple.com >
2020-06-17 11:46:24 +01:00
Daniel Eggert
148232a79b
Add documentation to MessageAttribute ( #196 )
2020-06-17 10:42:59 +01:00
Daniel Eggert
774135b482
Simplify Date.DateTime -> use InternalDate ( #191 )
...
* Simplify Date.DateTime -> use InternalDate
Fixes #74
* Changes according to feedback from @Davidde94
* Fix code style.
* More cleanup.
2020-06-15 18:27:34 +01:00
David Evans
2fe4f0227d
Make BodyStructure a RandomAccessCollection ( #194 )
...
* Implement start index
* Implement index before
* Implement index after
* Implement position
* Fix sanity
* Refactor
* Fix sanity
2020-06-15 17:42:48 +01:00