[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809

rpechayr rpechayr at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:32:19 UTC 2010


The following commit has been merged in the upstream branch:
commit e00bba2ea9a32dbf360232dbf23c13c0fac14eb7
Author: rpechayr <rpechayr at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date:   Sat Jun 19 16:57:05 2010 +0000

    [iphone][ZXingWidgetController] delegate API changed to conform to standard delagate APIs, bug fixed regarding status bar displaying upon success of scanning
    
    git-svn-id: http://zxing.googlecode.com/svn/trunk@1448 59b500cc-1b3d-0410-9834-0bbf25fbcc57

diff --git a/iphone/ZXingWidget/Classes/ZXingWidgetController.h b/iphone/ZXingWidget/Classes/ZXingWidgetController.h
index f58c3a5..03a7f89 100755
--- a/iphone/ZXingWidget/Classes/ZXingWidgetController.h
+++ b/iphone/ZXingWidget/Classes/ZXingWidgetController.h
@@ -51,6 +51,6 @@
 @end
 
 @protocol ZXingDelegate
-- (void)scanResult:(NSString *)result;
-- (void)cancelled;
+- (void)zxingController:(ZXingWidgetController*)controller didScanResult:(NSString *)result;
+- (void)zxingControllerDidCancel:(ZXingWidgetController*)controller;
 @end
\ No newline at end of file
diff --git a/iphone/ZXingWidget/Classes/ZXingWidgetController.m b/iphone/ZXingWidget/Classes/ZXingWidgetController.m
index 84be34d..cf9a921 100755
--- a/iphone/ZXingWidget/Classes/ZXingWidgetController.m
+++ b/iphone/ZXingWidget/Classes/ZXingWidgetController.m
@@ -78,6 +78,14 @@ CGImageRef UIGetScreenImage(void);
   }
 }
 
+- (void)unloadImagePicker {
+  if (self.imagePicker)
+  {
+    [imagePicker release];
+    imagePicker = nil;
+  }
+}
+
 - (id)initWithDelegate:(id<ZXingDelegate>)scanDelegate showCancel:(BOOL)shouldShowCancel OneDMode:(BOOL)shouldUseoOneDMode {
   if (self = [super init]) {
     [self setDelegate:scanDelegate];
@@ -108,11 +116,10 @@ CGImageRef UIGetScreenImage(void);
 }
 
 - (void)cancelled {
-  NSLog(@"cancelled called in ZXingWidgetController");
   [[UIApplication sharedApplication] setStatusBarHidden:NO];
-  wasCancelled = true;
+  wasCancelled = YES;
   if (delegate != nil) {
-    [delegate cancelled];
+    [delegate zxingControllerDidCancel:self];
   }
 }
 
@@ -129,8 +136,8 @@ CGImageRef UIGetScreenImage(void);
 - (BOOL)fixedFocus {
   NSString *platform = [self getPlatform];
   if ([platform isEqualToString:@"iPhone1,1"] ||
-      [platform isEqualToString:@"iPhone1,2"]) return true;
-  return false;
+      [platform isEqualToString:@"iPhone1,2"]) return YES;
+  return NO;
 }
 
 - (void)viewWillAppear:(BOOL)animated {
@@ -154,7 +161,7 @@ CGImageRef UIGetScreenImage(void);
   self.view = imagePicker.view;
   
   [overlayView setPoints:nil];
-  wasCancelled = false;
+  wasCancelled = NO;
   if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
 
     [NSTimer scheduledTimerWithTimeInterval: FIRST_TAKE_DELAY
@@ -323,8 +330,9 @@ CGImageRef UIGetScreenImage(void);
 }
 
 - (void)alertDelegate:(id)text {        
+  [[UIApplication sharedApplication] setStatusBarHidden:NO];
   if (delegate != nil) {
-    [delegate scanResult:text];
+    [delegate zxingController:self didScanResult:text];
   }
 }
 

-- 
Multi-format 1D/2D barcode image processing library



More information about the Pkg-google-commits mailing list