ExposureSubmissionQRScannerViewModel
class ExposureSubmissionQRScannerViewModel : NSObject, AVCaptureMetadataOutputObjectsDelegate
Undocumented
-
Undocumented
Declaration
Swift
init( isScanningActivated: Bool, onSuccess: @escaping (DeviceRegistrationKey) -> Void, onError: @escaping (QRScannerError, _ reactivateScanning: @escaping () -> Void) -> Void, onCancel: @escaping () -> Void )
-
Undocumented
Declaration
Swift
func metadataOutput( _: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from _: AVCaptureConnection )
-
Undocumented
Declaration
Swift
let onError: (QRScannerError, _ reactivateScanning: @escaping () -> Void) -> Void
-
Undocumented
Declaration
Swift
let onCancel: () -> Void
-
Undocumented
Declaration
Swift
func activateScanning()
-
Undocumented
Declaration
Swift
func deactivateScanning()
-
Undocumented
Declaration
Swift
func didScan(metadataObjects: [MetadataObject])
-
Sanitizes the input string and extracts a guid.
- the input needs to start with https://localhost/?
- the input must not ne longer than 150 chars and cannot be empty
- the guid contains only the following characters: a-f, A-F, 0-9,-
- the guid is a well formatted string (6-8-4-4-4-12) with length 43 (6 chars encode a random number, 32 chars for the uuid, 5 chars are separators)
Declaration
Swift
func extractGuid(from input: String) -> String?