Commit Graph
26 Commits
Author SHA1 Message Date
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
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
Daniel Eggert e704d7f4d9 Make UIDSet conform to RandomAccessCollection (#445) 2021-02-15 15:59:58 +00:00
Daniel Eggert d37f7d81c3 Add @discardableResult (#427) 2021-02-02 10:59:06 +00:00
Matt Diephouse fd1fa71ae4 Add UIDSet.init(_: Range<UID>) (#418) 2021-01-25 20:01:39 +00:00
Daniel Eggert 2f409effef Conform to CustomDebugStringConvertible (#408)
…instead of CustomStringConvertible
2021-01-21 13:34:19 +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
Daniel Eggert 44b7991dc4 Make UIDSet conform to Collection and SetAlgebra (#393) 2020-12-15 16:10:51 +00:00
David Evans b1a1d7350c Documentation PR part 6 (#387)
* Document UseAttribute

* Document URLRumpMechanism

* Document URLFetchData

* Document UAuthMechanism

* Document StoreModifier

* Document SortData

* Document SequenceMatchData

* Document QResyncParameter

* Document SelectParameter

* Document SectionSpecifier

* Document SectionSpecifier.Part

* Document SectionSpecifier.Kind

* Document ResponseEncodingOptions

* Document ResponseEncodeBuffer

* Document EncodeBuffer

* Document EncodeBuffer.Chunk

* Document EncodeBuffer more.

* Document CommandEncodeBuffer

* Document ParserError

* Document ResponseParser

* Document CommandParser

* Document SynchronisingLiteralParser

* Remove public where it isn't needed

* Document write CommandStream

* Document write TaggedCommand

* Remove public from write functions

* Document FetchAttribute

* Document top-level Capability

* Documents Capability subtypes

* Document FullDateTime

* Document FullDate

* Document FullTime

* Document ContinuationRequest

* Document ListSelectOptions

* Document ResponseOrContinuationRequest

* Document Response

* Document FetchResponse

* Document StreamingKind

* Document ResponseText

* Document ResponseTextCode

* Document TaggedResponse

* Document TaggedResponseState

* Remove docs

* Document UntaggedStatus

* Document ScopeOption

* Document ReturnOption

* Document IServer

* Document InitialClientResponse

* Document AttributeFlag

* Document UIDValidity

* Document UIDSet

* Document UID

* Document EncodedAuthenticationType

* Document EncodedMailbox

* Document EncodedSearch

* Document EncodedSection

* Document EncodedURLAuth

* Document EncodedUser

* Document ResponseCodeAppend

* Document ResponsePayload

* Document SequenceNumber

* Document OptionValueComp

* Document QuotaLimit

* Document QuotaResource

* Document OptionVendorTag

* Document IPartial and remove IPartialOnly

* Document QuotaRoot

* Document ESearchResponse

* Document SearchCorrelator

* Document Address

* Document UIDRange

* Document IUID

* Document SearchModificationSequence

* Document SearchModificationSequenceExtension

* Document SearchReturnData

* Document SearchReturnDataExtension

* Document SearchReturnOption

* Document SearchReturnOptionExtension

* Document SequenceRange

* Document SequenceRangeSet

* Fix compile

* Document SequenceSet

* Document ParameterValue

* Define TaggedExtension

* Document AuthIMAPURL

* Document AuthIMAPURLFull

* Document AuthIMAPURLRump

* Document ChangedSinceModifier

* Document UnchangedSinceModifier

* Document CreateParameter

* Document EntryValue

* Document Expire

* Document FetchModifier

* Document FetchModificationResponse

* Document IAbsolutePath

* Document IAuth

* Document ICommand

* Document IMailboxReference

* Document MetadataValue

* Document IMAPURL

* Document MetadataOption

* Document MetadataResponse

* Document RelativeIMAPURL

* Document INetworkPath

* Document MechanismBase64

* Document IMessageList

* Document IMessageOrPartial

* Document IMessagePart

* Document IPathQuery

* Document ISection

* Document IRelativePath

* Document IUAVerifier

* Document IURLAuthRump

* Document IURLAuthRump

* Document IUserInfo

* Fix missing documentation

* Document CommandEncoder

* Fix sanity

* Update CommandDecoder.swift

* PR reviews
2020-12-11 17:14:37 +00:00
Daniel Eggert 69adba4a85 Add failable “exactly” initializers for UID, UIDValidity, and SequenceNumber (#371) 2020-11-30 17:38:13 +00:00
Matt Diephouse 99b41de069 Make UID, UIDRange, and UIDSet CustomStringConvertible (#360)
* Make UID CustomStringConvertible

* Make UIDRange CustomStringConvertible

* Make UIDSet CustomStringConvertible
2020-11-11 18:41:00 +00:00
Matt Diephouse a704b73e6e Fix parsing and encoding of UID.max (#359)
* Fix parsing and encoding of UID.max

* Adjust formatting
2020-11-11 16:49:35 +00:00
Matt Diephouse 3d53c8cd0f Make UIDSet Hashable (#353) 2020-11-09 21:27:25 +00:00
Matt Diephouse 39f5c96cec Fix UID's and SequenceNumber's advanced(by:) with negative numbers (#347)
* Fix `UID`'s and `SequenceNumber`'s `advanced(by:)` with negative numbers

* Fix formatting
2020-11-06 16:08:26 +00:00
Matt Diephouse c28bc3756a Use UIDs for nextUIDs and UIDValiditys for uidValiditys (#346) 2020-11-05 19:39:51 +00:00
David Evans 8f2c4d34a8 Back UID, UIDValidity, and SequenceNumber as UInt32 (#344)
* Fix UID

* Fix UIDValidity

* Fix SequenceNumber

* Fix sanity

* PR review
2020-10-30 18:37:50 +00:00
Daniel Eggert 338d721607 Make UID conform to Codable. (#338) 2020-10-20 14:14:44 +01:00
Matt Diephouse e3b1b7f404 Change UIDValidity to match the design of UID (#335)
* Make UID Hashable

* Change UIDValidity to match UID

* Clean up inits and add asserts
2020-10-15 21:03:56 +01:00
David EvansandGeorge Barnett 9642c5a063 Document the various core writing functions. (#333)
* Simplify array has minimum size

* Document the writing functions

* Fix sanity

* Many documentation comments

* Update Sources/NIOIMAPCore/ByteBuffer+WriteLiteral.swift

Co-authored-by: George Barnett <gbarnett@apple.com>

* Address PR comments

* PR comments

Co-authored-by: George Barnett <gbarnett@apple.com>
2020-10-13 11:39:45 +01:00
David Evans bf2067efd3 Implement IMAP URL (#326)
* Define UIDValidity

* IUID and PartialRange

* PartialRange parsing

* Implement IPartial types

* Parse UChar

* Support parsing various character types

* Define EncodedSection

* Define EncodedUser

* Define ISection

* Implement IMailboxReference

* Define Expire

* Define Access

* Define IURLAuthRump

* Define EncodedURLAuth

* Define IAuth

* Define IUserInfo

* Define IMessageList

* Define IMessagePart

* Define IServer

* Define UAuthMechanism

* Define IUAVerifier

* Define IUrlAuth

* Define AuthImapUrl

* Define Auth types and ICommand

* Define IAbsolutePath

* Define IPathQuery

* Define ImapUrl

* Define INetworkPath

* Define Imessage or partial

* Define IRelativePath

* Define ImapUrlRel

* Fix sanity

* PR review comments

* More PR review comments

* PR comments

* Final comments

* Fix sanity

* Throw is UID is 0

* Pr reviews

* Fix sanity

* Add month/day validation

* Fix preconditions
2020-10-07 21:11:56 +01:00
David Evans 2fef4ba772 Implement RFC 4315 UIDPLUS (#302)
* Implement

* Test

* Fix tests
2020-09-03 10:51:04 +01:00
Daniel Eggert 30cdf896ff Create type for UID / UIDSet and use UIDs vs. Sequence Numbers (#166)
* Create type for UID / UIDSet and use UIDs vs. Sequence Numbers as appropriate.

* Remove commented out code.

* Linting.
2020-05-26 11:08:08 +01:00
David Evans f62ade3dc7 Remove all static convenience initialisers (#123)
* Re-add public inits

* Remove static initialisers
2020-05-11 15:31:43 +01:00
David Evans 28225ece7d Remove NIOIMAP namespace 2020-05-09 14:46:42 +01:00
tomer doron 53efab1d95 standardize format (#80)
motivation: use standard format across all of our projects

changes:
* add .swiftformat settings based on what we use in other projects
* validate format in the sanity script
* format
2020-04-24 12:05:17 +01:00
David Evans 19ecdb9576 Seperate module (#61) 2020-04-20 12:41:39 +01:00