2017-06-09 00:10:02 +02:00
|
|
|
//
|
2018-02-28 16:55:33 +01:00
|
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
2017-06-09 00:10:02 +02:00
|
|
|
//
|
2016-08-19 01:47:21 +02:00
|
|
|
|
|
|
|
#import <AVFoundation/AVFoundation.h>
|
2020-11-11 07:45:50 +01:00
|
|
|
#import <SignalUtilitiesKit/OWSViewController.h>
|
2016-08-19 01:47:21 +02:00
|
|
|
#import <UIKit/UIKit.h>
|
2016-09-11 22:53:12 +02:00
|
|
|
#import <ZXingObjC/ZXingObjC.h>
|
2016-08-19 01:47:21 +02:00
|
|
|
|
2017-07-25 19:23:23 +02:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2016-09-08 04:23:04 +02:00
|
|
|
@class OWSQRCodeScanningViewController;
|
|
|
|
|
|
|
|
@protocol OWSQRScannerDelegate
|
|
|
|
|
2016-09-11 22:53:12 +02:00
|
|
|
@optional
|
2016-09-08 04:23:04 +02:00
|
|
|
|
2016-09-11 22:53:12 +02:00
|
|
|
- (void)controller:(OWSQRCodeScanningViewController *)controller didDetectQRCodeWithString:(NSString *)string;
|
|
|
|
- (void)controller:(OWSQRCodeScanningViewController *)controller didDetectQRCodeWithData:(NSData *)data;
|
2016-09-08 04:23:04 +02:00
|
|
|
|
2016-09-11 22:53:12 +02:00
|
|
|
@end
|
2016-08-19 01:47:21 +02:00
|
|
|
|
2017-06-09 00:10:02 +02:00
|
|
|
#pragma mark -
|
|
|
|
|
2016-09-11 22:53:12 +02:00
|
|
|
@interface OWSQRCodeScanningViewController
|
2017-07-25 19:23:23 +02:00
|
|
|
: OWSViewController <AVCaptureMetadataOutputObjectsDelegate, ZXCaptureDelegate>
|
2016-08-19 01:47:21 +02:00
|
|
|
|
2016-09-08 04:23:04 +02:00
|
|
|
@property (nonatomic, weak) UIViewController<OWSQRScannerDelegate> *scanDelegate;
|
2017-06-09 00:10:02 +02:00
|
|
|
|
2016-09-11 22:53:12 +02:00
|
|
|
- (void)startCapture;
|
2016-08-19 01:47:21 +02:00
|
|
|
|
|
|
|
@end
|
2017-07-25 19:23:23 +02:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|