FRAMechanismReaderAction.m revision 6a2ae9c7fb4d2c40d75cab0edaf940f22c18224f
3112N/A * Distribution License (the License). You may not use this file except in compliance with the
3112N/A * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
3112N/A * When distributing Covered Software, include this CDDL Header Notice in each file and include
3112N/A * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
4458N/A FRAMechanism *mechanism = [_mechanismReader parseFromString:code handler:[self mechanismReadCallback] error:&error];
4723N/A activityIndicator = [[FRAActivityIndicator alloc] init:NSLocalizedString(@"qr_code_scan_contact_server", nil)];
4458N/A- (void)hideActivityIndicator {
4458N/A * @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
900N/A FRABlockAlertView *alertView = [[FRABlockAlertView alloc] initWithTitle:NSLocalizedString(@"warning", nil)
4714N/A handler:[self duplicateMechanismCallback:code identity:identity mechanism:duplicateMechanism error:error]];
4714N/A * Generates a duplicate mechanism callback which once confirmed will remove the duplicate mechanism and re-parse the URL to add in the mechanism.
4495N/A * @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
4631N/A- (void(^)(NSInteger))duplicateMechanismCallback:(NSString *)code identity:(FRAIdentity *)identity mechanism:(FRAMechanism *)mechanism error:(NSError *__autoreleasing*) error {
if (successfullyRemoved) {
if (!success) {
FRABlockAlertView *alertView = [[FRABlockAlertView alloc] initWithTitle:NSLocalizedString(@"qr_code_scan_error_title", nil)
if (!error) {
return nil;
case FRANetworkFailure:
case FRAMissingDeviceId:
case FRAInvalidQRCode:
return nil;
@end