mirror of
https://github.com/Cocoanetics/SwiftMail.git
synced 2026-03-17 20:02:25 +00:00
28 lines
961 B
Swift
28 lines
961 B
Swift
// IMAPMailCommand.swift
|
|
// IMAP-specific extensions to the base MailCommand protocol
|
|
|
|
import Foundation
|
|
import NIO
|
|
import SwiftMailCore
|
|
|
|
/// IMAP specific command extensions
|
|
public protocol IMAPMailCommand: MailCommand {
|
|
/// The type of the tagged command
|
|
associatedtype TaggedCommandType
|
|
|
|
/// Convert this high-level command to a network-level tagged command format
|
|
/// - Parameter tag: The command tag to use
|
|
/// - Returns: The tagged command representation
|
|
func toTaggedCommand(tag: String) -> TaggedCommandType
|
|
}
|
|
|
|
/// Response handler protocol for IMAP commands
|
|
public protocol IMAPCommandResponseHandler: MailCommandHandler {
|
|
/// The type of response this handler processes
|
|
associatedtype IMAPResponseType
|
|
|
|
/// Process an IMAP response
|
|
/// - Parameter response: The IMAP response to process
|
|
/// - Returns: Whether the handler is complete
|
|
func processResponse(_ response: IMAPResponseType) -> Bool
|
|
} |