Data Capture Context Listener

Defined in framework ScanditCaptureCore

DataCaptureContextListener
protocol DataCaptureContextListener : NSObjectProtocol

Added in version 6.0.0

Interface for observing/listening to mode and status changes of a data capture context.

To observe changes of the data capture context, one or more DataCaptureContextListener may be added. These listeners provide hooks into different parts of the data capture context.

context
open func context(_ context: DataCaptureContext, didChange frameSource: (any FrameSource)?) -> Void

Added in version 6.0.0

Invoked when the data capture context changed the frame source. Also invoked if the frame source is reset to null.

context
open func context(_ context: DataCaptureContext, didAdd mode: any DataCaptureMode) -> Void

Added in version 6.0.0

Called when a mode got added to the context.

context
open func context(_ context: DataCaptureContext, didRemove mode: any DataCaptureMode) -> Void

Added in version 6.0.0

Called when a mode got removed from the context.

didStartObserving
optional func didStartObserving(_ context: DataCaptureContext) -> Void

Added in version 6.0.0

Called when the listener has been added to the data capture context and is from now on receiving events.

didStopObserving
optional func didStopObserving(_ context: DataCaptureContext) -> Void

Added in version 6.0.0

Called when the listener has been removed from the data capture context and is no longer receiving events.

context
open func context(_ context: DataCaptureContext, didChange contextStatus: ContextStatus) -> Void

Added in version 6.0.0

Called when a context status changed.