Skip to content

delegate

Description

To receive printer status change notifications, set a delegate that conforms to the SIISLP800PrinterManagerDelegate protocol.
When a delegate is assigned, the application is notified whenever the printer’s operational state changes (e.g., paper out, paper jam, errors).
Setting the delegate to nil removes the current delegate and stops status notifications from the library.

Syntax

public var delegate : (any SIISLP800PrinterManagerDelegate)? { get set }

Property value

An implementation of the SIISLP800PrinterManagerDelegate protocol that processes printer status updates.
Setting nil unregisters the current delegate and disables status callbacks.

Behavior

When a non-nil delegate is set

  • The delegate’s didStatusChange method is invoked whenever the printer reports a status change.
  • The latest printer status may be delivered immediately when:
    • The status actually changes
    • After a successful call to any connect(…) method
When nil is assigned
  • The delegate is unregistered.
  • The application will no longer receive status updates.
Connection-related behavior
  • This API is available only after a successful call to any connect(…) method.
  • Once connect(…) succeeds, status notifications become active.
  • If the printer becomes unreachable (e.g., cable unplugged, power failure) while notifications are active:
    • The delegate receives the communication‑lost status value (0x80000000) once.
    • The library continues attempting to recover the connection.
  • When communication is restored:
    • The latest printer status is reported again.
  • If communication is lost again:
    • The communication‑lost status value is sent again (once per occurrence).
  • When disconnect() is called, status notifications stop immediately.

Note

  • Status value definitions are described in the getStatus() API documentation.
  • Avoid calling other SIISLP800PrinterManager APIs from within the delegate methods.