@@ -7,6 +7,7 @@ class IMAP < Protocol
7
7
autoload :UIDFetchData , "#{ __dir__ } /fetch_data"
8
8
autoload :SearchResult , "#{ __dir__ } /search_result"
9
9
autoload :SequenceSet , "#{ __dir__ } /sequence_set"
10
+ autoload :UIDPlusData , "#{ __dir__ } /uidplus_data"
10
11
autoload :VanishedData , "#{ __dir__ } /vanished_data"
11
12
12
13
# Net::IMAP::ContinuationRequest represents command continuation requests.
@@ -344,55 +345,6 @@ class ResponseCode < Struct.new(:name, :data)
344
345
# code data can take.
345
346
end
346
347
347
- # UIDPlusData represents the ResponseCode#data that accompanies the
348
- # +APPENDUID+ and +COPYUID+ {response codes}[rdoc-ref:ResponseCode].
349
- #
350
- # A server that supports +UIDPLUS+ should send a UIDPlusData object inside
351
- # every TaggedResponse returned by the append[rdoc-ref:Net::IMAP#append],
352
- # copy[rdoc-ref:Net::IMAP#copy], move[rdoc-ref:Net::IMAP#move], {uid
353
- # copy}[rdoc-ref:Net::IMAP#uid_copy], and {uid
354
- # move}[rdoc-ref:Net::IMAP#uid_move] commands---unless the destination
355
- # mailbox reports +UIDNOTSTICKY+.
356
- #
357
- # == Required capability
358
- # Requires either +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315]]
359
- # or +IMAP4rev2+ capability.
360
- #
361
- class UIDPlusData < Struct . new ( :uidvalidity , :source_uids , :assigned_uids )
362
- ##
363
- # method: uidvalidity
364
- # :call-seq: uidvalidity -> nonzero uint32
365
- #
366
- # The UIDVALIDITY of the destination mailbox.
367
-
368
- ##
369
- # method: source_uids
370
- # :call-seq: source_uids -> nil or an array of nonzero uint32
371
- #
372
- # The UIDs of the copied or moved messages.
373
- #
374
- # Note:: Returns +nil+ for Net::IMAP#append.
375
-
376
- ##
377
- # method: assigned_uids
378
- # :call-seq: assigned_uids -> an array of nonzero uint32
379
- #
380
- # The newly assigned UIDs of the copied, moved, or appended messages.
381
- #
382
- # Note:: This always returns an array, even when it contains only one UID.
383
-
384
- ##
385
- # :call-seq: uid_mapping -> nil or a hash
386
- #
387
- # Returns a hash mapping each source UID to the newly assigned destination
388
- # UID.
389
- #
390
- # Note:: Returns +nil+ for Net::IMAP#append.
391
- def uid_mapping
392
- source_uids &.zip ( assigned_uids ) &.to_h
393
- end
394
- end
395
-
396
348
# MailboxList represents the data of an untagged +LIST+ response, for a
397
349
# _single_ mailbox path. IMAP#list returns an array of MailboxList objects.
398
350
#
0 commit comments