[iphone] Memory leak fixed. Widget does not crash anymore after a few seconds. No...
[zxing.git] / iphone / ZXingWidget / Classes / Decoder.h
1 //
2 //  Decoder.h
3 //  ZXing
4 //
5 //  Created by Christian Brunschen on 31/03/2008.
6 //
7 /*
8  * Copyright 2008 ZXing authors
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *      http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22
23 #import <UIKit/UIKit.h>
24 #import "DecoderDelegate.h"
25
26 @interface Decoder : NSObject {
27         UIImage *image;
28         CGRect cropRect;
29   UIImage *subsetImage;
30   unsigned char *subsetData;
31   size_t subsetWidth;
32   size_t subsetHeight;
33   size_t subsetBytesPerRow;
34         id<DecoderDelegate> delegate;
35   NSOperationQueue *operationQueue;
36 }
37
38 @property(nonatomic, retain) UIImage *image;
39 @property(nonatomic, assign) CGRect cropRect;
40 @property(nonatomic, retain) UIImage *subsetImage;
41 @property(nonatomic, assign) unsigned char *subsetData;
42 @property(assign) size_t subsetWidth;
43 @property(assign) size_t subsetHeight;
44 @property(assign) size_t subsetBytesPerRow;
45 @property(nonatomic, assign) id<DecoderDelegate> delegate;
46 @property (nonatomic, retain) NSOperationQueue *operationQueue;
47
48 - (void) decodeImage:(UIImage *)image;
49 - (void) decodeImage:(UIImage *)image cropRect:(CGRect)cropRect;
50
51 @end