Added in Version 1.0.0

PrinterDelegate

The protocol that defines the printer status event

Method

printerIsReady(_ printer: StarPrinter)

Notify that the printer is ready

printerDidHaveError(_ printer: StarPrinter)

Notify that the printer has error

printerIsPaperReady(_ printer: StarPrinter)

Notify that the printer paper is ready

printerIsPaperNearEmpty(_ printer: StarPrinter)

Notify that the printer paper is near empty

printerIsPaperEmpty(_ printer: StarPrinter)

Notify that the printer is out of paper

printerIsCoverOpen(_ printer: StarPrinter)

Notify that the printer cover is open

printerIsCoverClose(_ printer: StarPrinter)

Notify that the printer cover is closed

printer(_ printer: StarPrinter, communicationErrorDidOccur error: Error)

Notify that a communication error occurred

Note

This Delegate is Class-Only Protocol. It cannot apply to Swift struct (e.g. SwiftUI) and Enum. If necessary, create another class and apply it to the class.