rhodes 3.2.1 → 3.2.2.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/CHANGELOG +7 -0
  2. data/Manifest.txt +36 -0
  3. data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/barcode.cpp +24 -3
  4. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/CaptureActivity.java +11 -280
  5. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/camera/CameraManager.java +11 -4
  6. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/Barcode.java +2 -1
  7. data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +36 -0
  8. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeCallbackHelper.h +25 -0
  9. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeCallbackHelper.mm +195 -0
  10. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.h +59 -0
  11. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.m +346 -0
  12. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewFactory.h +7 -0
  13. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewFactory.mm +58 -0
  14. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewFactoryRegister.mm +18 -0
  15. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewManager.h +16 -0
  16. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewManager.mm +32 -0
  17. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +9 -2
  18. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h +45 -0
  19. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h +7 -1
  20. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h +21 -4
  21. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h +32 -2
  22. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h +1 -0
  23. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar.h +26 -5
  24. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h +1 -0
  25. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h +2 -3
  26. data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/libzbar.a +0 -0
  27. data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode.i +3 -2
  28. data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode_wrap.c +7 -4
  29. data/lib/extensions/barcode/ext/barcode/shared/src/zbar.c +2 -2
  30. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +1 -1
  31. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraNewService.java +7 -2
  32. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraOldService.java +5 -1
  33. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraSemiService.java +8 -1
  34. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraService.java +4 -2
  35. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +11 -6
  36. data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +21 -13
  37. data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +33 -11
  38. data/platform/android/build/android.rake +63 -1
  39. data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +4 -0
  40. data/platform/iphone/curl/curl.xcodeproj/project.pbxproj +4 -0
  41. data/platform/iphone/icon.png +0 -0
  42. data/platform/iphone/rbuild/iphone.rake +6 -4
  43. data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +4 -1
  44. data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +4 -1
  45. data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +4 -0
  46. data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +4 -0
  47. data/platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.Libraries.dll +0 -0
  48. data/platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.dll +0 -0
  49. data/platform/wp7/IronRuby/bin/Silverlight3Release/Microsoft.Dynamic.dll +0 -0
  50. data/platform/wp7/IronRuby/bin/Silverlight3Release/Microsoft.Scripting.Core.dll +0 -0
  51. data/platform/wp7/IronRuby/bin/Silverlight3Release/Microsoft.Scripting.dll +0 -0
  52. data/res/generators/rhogen.rb +191 -0
  53. data/res/generators/templates/extension/app/MontanaTest/controller.rb +20 -0
  54. data/res/generators/templates/extension/app/MontanaTest/index.erb +17 -0
  55. data/res/generators/templates/extension/extensions/montana/ext.yml +4 -0
  56. data/res/generators/templates/extension/extensions/montana/ext/build +17 -0
  57. data/res/generators/templates/extension/extensions/montana/ext/build.bat +36 -0
  58. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/android/Rakefile +77 -0
  59. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/android/ext_build.files +1 -0
  60. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/android/jni/src/montana.cpp +28 -0
  61. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/android/src/com/montana/Montana.java +10 -0
  62. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/bb/Montana.files +1 -0
  63. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/bb/Rakefile +97 -0
  64. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/bb/montana.jdp +48 -0
  65. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/bb/src/com/montana/Montana.java +118 -0
  66. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Classes/Montana.h +4 -0
  67. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Classes/Montana.m +24 -0
  68. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Montana.xcodeproj/project.pbxproj +300 -0
  69. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Montana_Prefix.pch +7 -0
  70. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Rakefile +74 -0
  71. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Montana.vcproj +331 -0
  72. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Rakefile +62 -0
  73. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/src/montana_wm.cpp +40 -0
  74. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/src/montana_wm.h +2 -0
  75. data/res/generators/templates/extension/extensions/montana/ext/montana/shared/ruby/montana.i +15 -0
  76. data/res/generators/templates/extension/extensions/montana/ext/montana/shared/ruby/montana_wrap.c +2287 -0
  77. data/res/generators/templates/extension/extensions/montana/ext/montana/shared/src/montana.c +20 -0
  78. data/res/generators/templates/extension/extensions/montana/montana.rb +13 -0
  79. data/spec/framework_spec/build.yml +1 -1
  80. data/spec/phone_spec/build.yml +1 -1
  81. data/version +1 -1
  82. metadata +42 -5
@@ -0,0 +1,7 @@
1
+ #include "common/RhoNativeViewManager.h"
2
+
3
+
4
+ class BarcodeViewFactorySingletone {
5
+ public:
6
+ static NativeViewFactory* instance();
7
+ };
@@ -0,0 +1,58 @@
1
+
2
+ #import <UIKit/UIKit.h>
3
+
4
+ #import "BarcodeViewFactory.h"
5
+ #import "BarcodeViewController.h"
6
+
7
+ #import <strings.h>
8
+
9
+
10
+ class BarcodeNativeView : public NativeView {
11
+ public:
12
+ BarcodeNativeView() {
13
+ //mView = nil;
14
+ }
15
+ virtual ~BarcodeNativeView() {
16
+ //[mView release];
17
+ //mView = nil;
18
+ }
19
+
20
+ virtual void* getView() {
21
+ //if (mView == nil) {
22
+ // ctrl = []
23
+ // mView = [[RainbowView alloc] init];
24
+ //}
25
+ return [BarcodeViewController getCurrentView];
26
+ }
27
+
28
+ virtual void navigate(const char* url) {
29
+ //[mView navigate:url];
30
+ }
31
+ private:
32
+ //MapViewControllerESRI* ctrl;
33
+ //UIView* mView;
34
+ };
35
+
36
+
37
+
38
+ class BarcodeNativeViewFactory : public NativeViewFactory {
39
+ public:
40
+
41
+ virtual NativeView* getNativeView(const char* viewType) {
42
+ return new BarcodeNativeView();
43
+ }
44
+
45
+ virtual void destroyNativeView(NativeView* nativeView) {
46
+ delete nativeView;
47
+ }
48
+
49
+ };
50
+
51
+ static BarcodeNativeViewFactory* ourFactory = NULL;
52
+
53
+ NativeViewFactory* BarcodeViewFactorySingletone::instance() {
54
+ if (ourFactory == NULL) {
55
+ ourFactory = new BarcodeNativeViewFactory();
56
+ }
57
+ return ourFactory;
58
+ }
@@ -0,0 +1,18 @@
1
+
2
+ // rhodes/platform/shared/common/RhoNativeViewManager.h
3
+ #include "common/RhoNativeViewManager.h"
4
+
5
+ #include "BarcodeViewFactory.h"
6
+
7
+
8
+
9
+ //extern "C" void register_Barcode_mapViewProvider();
10
+
11
+
12
+
13
+
14
+ extern "C" void register_Barcode_View(void) {
15
+ NativeViewFactory* factory = BarcodeViewFactorySingletone::instance();
16
+ RhoNativeViewManager::registerViewType("Barcode_View", factory);
17
+ }
18
+
@@ -0,0 +1,16 @@
1
+
2
+ // Copyright 2010 __Rhomobile__. All rights reserved.
3
+ //
4
+
5
+ #import <Foundation/Foundation.h>
6
+ #import <UIKit/UIKit.h>
7
+
8
+ @interface BarcodeViewManager : NSObject {
9
+
10
+ }
11
+
12
+ + (void)openView;
13
+ + (void)closeView;
14
+
15
+ @end
16
+
@@ -0,0 +1,32 @@
1
+ //
2
+ // RainbowSmallViewManager.m
3
+ // Rainbow
4
+ //
5
+ // Created by Dmitry Soldatenkov on 10/15/10.
6
+ // Copyright 2010 __Rhomobile__. All rights reserved.
7
+ //
8
+
9
+
10
+
11
+
12
+ #import "BarcodeViewManager.h"
13
+ #import "common/RhoNativeViewManager.h"
14
+
15
+
16
+
17
+ @implementation BarcodeViewManager
18
+
19
+ static int view_id = 0;
20
+
21
+
22
+ + (void)openView {
23
+ view_id = RhoNativeViewManager::openNativeView("Barcode_View", OPEN_IN_MODAL_FULL_SCREEN_WINDOW, NULL);
24
+ }
25
+
26
+ + (void)closeView {
27
+ RhoNativeViewManager::closeNativeView(view_id);
28
+ }
29
+
30
+
31
+ @end
32
+
@@ -4,16 +4,23 @@
4
4
  #include <stdlib.h>
5
5
 
6
6
  #include "zbar.h"
7
+ #include "BarcodeViewController.h"
7
8
 
8
-
9
+ #include "ruby/ext/rho/rhoruby.h"
9
10
 
10
11
  extern void rho_platform_image_load_grayscale(const char* url, void** image_pixels, int* pwidth, int* pheight);
11
12
  extern void rho_platform_image_free(void* image_pixels);
12
13
 
14
+ extern void register_Barcode_View(void);
13
15
 
14
16
  static char strbuf[1024];
15
17
 
16
- void rho_barcode_take_barcode(const char* callback) {
18
+ void rho_barcode_take_barcode(const char* callback, VALUE options) {
19
+
20
+ register_Barcode_View();
21
+
22
+ [BarcodeViewController createBarcodeView:[NSString stringWithCString:callback]];
23
+
17
24
  }
18
25
 
19
26
 
@@ -0,0 +1,45 @@
1
+ //------------------------------------------------------------------------
2
+ // Copyright 2010-2011 (c) Jeff Brown <spadix@users.sourceforge.net>
3
+ //
4
+ // This file is part of the ZBar Bar Code Reader.
5
+ //
6
+ // The ZBar Bar Code Reader is free software; you can redistribute it
7
+ // and/or modify it under the terms of the GNU Lesser Public License as
8
+ // published by the Free Software Foundation; either version 2.1 of
9
+ // the License, or (at your option) any later version.
10
+ //
11
+ // The ZBar Bar Code Reader is distributed in the hope that it will be
12
+ // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13
+ // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ // GNU Lesser Public License for more details.
15
+ //
16
+ // You should have received a copy of the GNU Lesser Public License
17
+ // along with the ZBar Bar Code Reader; if not, write to the Free
18
+ // Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19
+ // Boston, MA 02110-1301 USA
20
+ //
21
+ // http://sourceforge.net/projects/zbar
22
+ //------------------------------------------------------------------------
23
+
24
+ @class ZBarReaderView;
25
+
26
+ // hack around missing simulator support for AVCapture interfaces
27
+
28
+ @interface ZBarCameraSimulator
29
+ : NSObject
30
+ < UINavigationControllerDelegate,
31
+ UIImagePickerControllerDelegate,
32
+ UIPopoverControllerDelegate >
33
+ {
34
+ UIViewController *viewController;
35
+ ZBarReaderView *readerView;
36
+ UIImagePickerController *picker;
37
+ UIPopoverController *pickerPopover;
38
+ }
39
+
40
+ - (id) initWithViewController: (UIViewController*) viewController;
41
+ - (void) takePicture;
42
+
43
+ @property (nonatomic, assign) ZBarReaderView *readerView;
44
+
45
+ @end
@@ -46,6 +46,7 @@
46
46
  @interface ZBarCaptureReader
47
47
  : NSObject
48
48
  {
49
+ #if !TARGET_IPHONE_SIMULATOR
49
50
  AVCaptureVideoDataOutput *captureOutput;
50
51
  id<ZBarCaptureDelegate> captureDelegate;
51
52
  ZBarImageScanner *scanner;
@@ -57,11 +58,12 @@
57
58
  dispatch_queue_t queue;
58
59
  ZBarImage *image;
59
60
  ZBarCVImage *result;
60
- int32_t running;
61
+ volatile uint32_t state;
61
62
  int framecnt;
62
63
  unsigned width, height;
63
64
  uint64_t t_frame, t_fps, t_scan;
64
65
  CGFloat dt_frame;
66
+ #endif
65
67
  }
66
68
 
67
69
  // supply a pre-configured image scanner
@@ -76,6 +78,10 @@
76
78
  // clear the internal result cache
77
79
  - (void) flushCache;
78
80
 
81
+ // capture the next frame after processing. the captured image will
82
+ // follow the same delegate path as an image with decoded symbols.
83
+ - (void) captureFrame;
84
+
79
85
  // the capture output. add this to an instance of AVCaptureSession
80
86
  @property (nonatomic, readonly) AVCaptureOutput *captureOutput;
81
87
 
@@ -46,17 +46,22 @@
46
46
  : UIView
47
47
  {
48
48
  id<ZBarReaderViewDelegate> readerDelegate;
49
- CGRect scanCrop, zoomCrop;
49
+ ZBarCaptureReader *captureReader;
50
+ CGRect scanCrop, effectiveCrop;
50
51
  CGAffineTransform previewTransform;
51
- CGFloat zoom, zoom0;
52
+ CGFloat zoom, zoom0, maxZoom;
53
+ UIColor *trackingColor;
52
54
  BOOL tracksSymbols, showsFPS;
53
55
  NSInteger torchMode;
56
+ UIInterfaceOrientation interfaceOrientation;
57
+ NSTimeInterval animationDuration;
54
58
 
55
- CALayer *preview, *overlay, *tracking;
59
+ CALayer *preview, *overlay, *tracking, *cropLayer;
56
60
  UIView *fpsView;
57
61
  UILabel *fpsLabel;
58
62
  UIPinchGestureRecognizer *pinch;
59
63
  CGFloat imageScale;
64
+ CGSize imageSize;
60
65
  BOOL started, running;
61
66
  }
62
67
 
@@ -72,6 +77,10 @@
72
77
  // clear the internal result cache
73
78
  - (void) flushCache;
74
79
 
80
+ // compensate for device/camera/interface orientation
81
+ - (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) orient
82
+ duration: (NSTimeInterval) duration;
83
+
75
84
  // delegate is notified of decode results.
76
85
  @property (nonatomic, assign) id<ZBarReaderViewDelegate> readerDelegate;
77
86
 
@@ -82,6 +91,9 @@
82
91
  // (default YES).
83
92
  @property (nonatomic) BOOL tracksSymbols;
84
93
 
94
+ // color of the tracking box (default green)
95
+ @property (nonatomic, retain) UIColor *trackingColor;
96
+
85
97
  // enable pinch gesture recognition for zooming the preview/decode
86
98
  // (default YES).
87
99
  @property (nonatomic) BOOL allowsPinchZoom;
@@ -94,9 +106,14 @@
94
106
  @property (nonatomic) BOOL showsFPS;
95
107
 
96
108
  // zoom scale factor applied to video preview *and* scanCrop.
97
- // also updated by pinch-zoom gesture. clipped to range [1,2],
109
+ // also updated by pinch-zoom gesture. clipped to range [1,maxZoom],
98
110
  // defaults to 1.25
99
111
  @property (nonatomic) CGFloat zoom;
112
+ - (void) setZoom: (CGFloat) zoom
113
+ animated: (BOOL) animated;
114
+
115
+ // maximum settable zoom factor.
116
+ @property (nonatomic) CGFloat maxZoom;
100
117
 
101
118
  // the region of the image that will be scanned. normalized coordinates.
102
119
  @property (nonatomic) CGRect scanCrop;
@@ -24,7 +24,15 @@
24
24
  #import <UIKit/UIKit.h>
25
25
  #import "ZBarReaderController.h"
26
26
 
27
- @class ZBarReaderView;
27
+ // orientation set support
28
+ #define ZBarOrientationMask(orient) (1 << orient)
29
+ #define ZBarOrientationMaskAll \
30
+ (ZBarOrientationMask(UIInterfaceOrientationPortrait) | \
31
+ ZBarOrientationMask(UIInterfaceOrientationPortraitUpsideDown) | \
32
+ ZBarOrientationMask(UIInterfaceOrientationLandscapeLeft) | \
33
+ ZBarOrientationMask(UIInterfaceOrientationLandscapeRight))
34
+
35
+ @class ZBarReaderView, ZBarCameraSimulator;
28
36
 
29
37
  // drop in video scanning replacement for ZBarReaderController.
30
38
  // this is a thin controller around a ZBarReaderView that adds the UI
@@ -41,10 +49,16 @@
41
49
  UIView *cameraOverlayView;
42
50
  CGAffineTransform cameraViewTransform;
43
51
  CGRect scanCrop;
52
+ NSUInteger supportedOrientationsMask;
53
+ UIImagePickerControllerCameraDevice cameraDevice;
54
+ UIImagePickerControllerCameraFlashMode cameraFlashMode;
55
+ UIImagePickerControllerQualityType videoQuality;
44
56
  BOOL showsZBarControls, tracksSymbols, enableCache;
45
57
 
58
+ ZBarHelpController *helpController;
46
59
  UIView *controls;
47
- BOOL didHideStatusBar;
60
+ BOOL didHideStatusBar, rotating;
61
+ ZBarCameraSimulator *cameraSim;
48
62
  }
49
63
 
50
64
  // access to configure image scanner
@@ -60,6 +74,10 @@
60
74
  // enabled, the box will only be visible when scanning EAN and I2/5.
61
75
  @property (nonatomic) BOOL tracksSymbols;
62
76
 
77
+ // interface orientation support. bit-mask of accepted orientations.
78
+ // see eg ZBarOrientationMask() and ZBarOrientationMaskAll
79
+ @property (nonatomic) NSUInteger supportedOrientationsMask;
80
+
63
81
  // crop images for scanning. the image will be cropped to this
64
82
  // rectangle before scanning. the rectangle is normalized to the
65
83
  // image size and aspect ratio; useful values will place the rectangle
@@ -78,6 +96,18 @@
78
96
  // the onZBarHelp() javascript function.
79
97
  - (void) showHelpWithReason: (NSString*) reason;
80
98
 
99
+ // capture the next frame and send it over the usual delegate path.
100
+ - (void) takePicture;
101
+
102
+ // these attempt to emulate UIImagePickerController
103
+ + (BOOL) isCameraDeviceAvailable: (UIImagePickerControllerCameraDevice) cameraDevice;
104
+ + (BOOL) isFlashAvailableForCameraDevice: (UIImagePickerControllerCameraDevice) cameraDevice;
105
+ + (NSArray*) availableCaptureModesForCameraDevice: (UIImagePickerControllerCameraDevice) cameraDevice;
106
+ @property(nonatomic) UIImagePickerControllerCameraDevice cameraDevice;
107
+ @property(nonatomic) UIImagePickerControllerCameraFlashMode cameraFlashMode;
108
+ @property(nonatomic) UIImagePickerControllerCameraCaptureMode cameraCaptureMode;
109
+ @property(nonatomic) UIImagePickerControllerQualityType videoQuality;
110
+
81
111
  // direct access to the ZBarReaderView
82
112
  @property (nonatomic, readonly) ZBarReaderView *readerView;
83
113
 
@@ -31,3 +31,4 @@
31
31
  #import "ZBarReaderController.h"
32
32
  #import "ZBarCaptureReader.h"
33
33
  #import "ZBarHelpController.h"
34
+ #import "ZBarCameraSimulator.h"
@@ -86,12 +86,15 @@ typedef enum zbar_color_e {
86
86
  typedef enum zbar_symbol_type_e {
87
87
  ZBAR_NONE = 0, /**< no symbol decoded */
88
88
  ZBAR_PARTIAL = 1, /**< intermediate status */
89
+ ZBAR_EAN2 = 2, /**< GS1 2-digit add-on */
90
+ ZBAR_EAN5 = 5, /**< GS1 5-digit add-on */
89
91
  ZBAR_EAN8 = 8, /**< EAN-8 */
90
92
  ZBAR_UPCE = 9, /**< UPC-E */
91
93
  ZBAR_ISBN10 = 10, /**< ISBN-10 (from EAN-13). @since 0.4 */
92
94
  ZBAR_UPCA = 12, /**< UPC-A */
93
95
  ZBAR_EAN13 = 13, /**< EAN-13 */
94
96
  ZBAR_ISBN13 = 14, /**< ISBN-13 (from EAN-13). @since 0.4 */
97
+ ZBAR_COMPOSITE = 15, /**< EAN/UPC composite */
95
98
  ZBAR_I25 = 25, /**< Interleaved 2 of 5. @since 0.4 */
96
99
  ZBAR_DATABAR = 34, /**< GS1 DataBar (RSS). @since 0.11 */
97
100
  ZBAR_DATABAR_EXP = 35, /**< GS1 DataBar Expanded. @since 0.11 */
@@ -100,10 +103,27 @@ typedef enum zbar_symbol_type_e {
100
103
  ZBAR_QRCODE = 64, /**< QR Code. @since 0.10 */
101
104
  ZBAR_CODE93 = 93, /**< Code 93. @since 0.11 */
102
105
  ZBAR_CODE128 = 128, /**< Code 128 */
103
- ZBAR_SYMBOL = 0x00ff, /**< mask for base symbol type */
104
- ZBAR_ADDON2 = 0x0200, /**< 2-digit add-on flag */
105
- ZBAR_ADDON5 = 0x0500, /**< 5-digit add-on flag */
106
- ZBAR_ADDON = 0x0700, /**< add-on flag mask */
106
+
107
+ /** mask for base symbol type.
108
+ * @deprecated in 0.11, remove this from existing code
109
+ */
110
+ ZBAR_SYMBOL = 0x00ff,
111
+ /** 2-digit add-on flag.
112
+ * @deprecated in 0.11, a ::ZBAR_EAN2 component is used for
113
+ * 2-digit GS1 add-ons
114
+ */
115
+ ZBAR_ADDON2 = 0x0200,
116
+ /** 5-digit add-on flag.
117
+ * @deprecated in 0.11, a ::ZBAR_EAN5 component is used for
118
+ * 5-digit GS1 add-ons
119
+ */
120
+ ZBAR_ADDON5 = 0x0500,
121
+ /** add-on flag mask.
122
+ * @deprecated in 0.11, GS1 add-ons are represented using composite
123
+ * symbols of type ::ZBAR_COMPOSITE; add-on components use ::ZBAR_EAN2
124
+ * or ::ZBAR_EAN5
125
+ */
126
+ ZBAR_ADDON = 0x0700,
107
127
  } zbar_symbol_type_t;
108
128
 
109
129
  /** decoded symbol coarse orientation.
@@ -203,6 +223,7 @@ extern const char *zbar_get_symbol_name(zbar_symbol_type_t sym);
203
223
  * @param sym symbol type encoding
204
224
  * @returns static string name for any addon, or the empty string
205
225
  * if no addons were decoded
226
+ * @deprecated in 0.11
206
227
  */
207
228
  extern const char *zbar_get_addon_name(zbar_symbol_type_t sym);
208
229
 
@@ -381,7 +402,7 @@ extern int zbar_symbol_get_loc_y(const zbar_symbol_t *symbol,
381
402
 
382
403
  /** retrieve general orientation of decoded symbol.
383
404
  * @returns a coarse, axis-aligned indication of symbol orientation or
384
- * ZBAR_ORIENT_UNKNOWN if unknown
405
+ * ::ZBAR_ORIENT_UNKNOWN if unknown
385
406
  * @since 0.11
386
407
  */
387
408
  extern zbar_orientation_t
@@ -115,6 +115,7 @@ class Decoder {
115
115
 
116
116
  /// retrieve string name for last decode addon.
117
117
  /// see zbar_get_addon_name()
118
+ /// @deprecated in 0.11
118
119
  const char *get_addon_name () const
119
120
  {
120
121
  return(zbar_get_addon_name(zbar_decoder_get_type(_decoder)));