2 * Copyright 2009 Jeff Verkoeyen
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <UIKit/UIKit.h>
18 #include <AudioToolbox/AudioToolbox.h>
20 #include "ParsedResult.h"
21 #include "OverlayView.h"
23 @protocol ZXingDelegate;
25 //@interface ZXingWidgetController : UIImagePickerController <DecoderDelegate, CancelDelegate> {
26 @interface ZXingWidgetController : UIViewController<DecoderDelegate, CancelDelegate, UIImagePickerControllerDelegate,UINavigationControllerDelegate> {
29 UIImagePickerController *imagePicker;
31 OverlayView *overlayView;
32 SystemSoundID beepSound;
35 id<ZXingDelegate> delegate;
40 @property (nonatomic, retain ) NSSet *readers;
41 @property (nonatomic, assign) id<ZXingDelegate> delegate;
42 @property (nonatomic, assign) NSURL *soundToPlay;
43 @property (nonatomic, retain) ParsedResult *result;
44 @property (nonatomic, retain) NSArray *actions;
45 @property (nonatomic, retain) OverlayView *overlayView;
47 - (id)initWithDelegate:(id<ZXingDelegate>)delegate showCancel:(BOOL)shouldShowCancel OneDMode:(BOOL)shouldUseoOneDMode;
50 - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker;
53 @protocol ZXingDelegate
54 - (void)zxingController:(ZXingWidgetController*)controller didScanResult:(NSString *)result;
55 - (void)zxingControllerDidCancel:(ZXingWidgetController*)controller;