SDKPrintState

sealed class SDKPrintState

Representation of a single SDKPrintState Methods in states can only be called ONCE. Calling a method more than once will result in an SDKFunctionWasConsumedException

Inheritors

Types

Link copied to clipboard
class DeviceRequired(isAborted: () -> Boolean, provideDeviceFn: (SDKDevice) -> Unit) : SDKPrintState

In this state, a SDKDevice (previously got from the SDKDeviceScanService) must be provided This will be the first state to be called after creation This state is abortable

Link copied to clipboard
class NonRecoverableError(val error: SDKPrinterError, val exception: Exception? = null) : SDKPrintState

This state indicates that an error described by SDKPrinterError and a exception has occurred and its NotRecoverable Nothing can be done after the SDKPrinter is in this state

Link copied to clipboard

This state indicates a successful print. This state is not abortable.

Link copied to clipboard
class ReadyToPrint(isAborted: () -> Boolean, printFileWrapperFn: (FileWrapper) -> Unit, printBitmapFn: (Bitmap) -> Unit) : SDKPrintState

In this state, a an asset must be provided for printing Printer can print bitmap and fileWrapper This state is abortable

Link copied to clipboard
class RecoverableError(isAborted: () -> Boolean, val error: SDKPrinterError, recoverFn: () -> Unit) : SDKPrintState

This state indicates that an error described by SDKPrinterError has occurred and its recoverable

Link copied to clipboard
class SuccessfulPrint(isAborted: () -> Boolean, printAgainFn: () -> Unit, finishPrintFn: () -> Unit) : SDKPrintState

Print was successful print. Printer can print print again or finish print. This state is abortable