Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[IPHONEAPP-601]

remove ZXING library
add ZBarSDK
edit the QR Reader module to use the new library
  • Loading branch information...
commit 31c79d0fadfb6af24ac2c100cd046e45c44e2376 1 parent e6a277e
@BrianPatt BrianPatt authored
Showing with 4,711 additions and 20,327 deletions.
  1. +2 −2 Common/UIImage+Resize.m
  2. +107 −49 MIT Mobile.xcodeproj/project.pbxproj
  3. +1 −0  MIT_Mobile_Prefix.pch
  4. +1 −1  Modules/QR Reader/QRReaderHistoryViewController.h
  5. +9 −2 Modules/QR Reader/QRReaderHistoryViewController.m
  6. +4 −0 Modules/QR Reader/QRReaderOverlayView.h
  7. +44 −2 Modules/QR Reader/QRReaderOverlayView.m
  8. +3 −12 Modules/QR Reader/QRReaderScanViewController.h
  9. +47 −204 Modules/QR Reader/QRReaderScanViewController.mm
  10. +1 −2  Modules/Tours/SiteDetailViewController.h
  11. +45 −0 ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h
  12. +111 −0 ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h
  13. +60 −0 ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h
  14. +69 −0 ZBarSDK/Headers/ZBarSDK/ZBarImage.h
  15. +51 −0 ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h
  16. +142 −0 ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h
  17. +135 −0 ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h
  18. +130 −0 ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h
  19. +34 −0 ZBarSDK/Headers/ZBarSDK/ZBarSDK.h
  20. +71 −0 ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h
  21. +1,497 −0 ZBarSDK/Headers/ZBarSDK/zbar.h
  22. +202 −0 ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h
  23. +187 −0 ZBarSDK/Headers/ZBarSDK/zbar/Exception.h
  24. +321 −0 ZBarSDK/Headers/ZBarSDK/zbar/Image.h
  25. +130 −0 ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h
  26. +223 −0 ZBarSDK/Headers/ZBarSDK/zbar/Processor.h
  27. +162 −0 ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h
  28. +528 −0 ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h
  29. +170 −0 ZBarSDK/Headers/ZBarSDK/zbar/Video.h
  30. +136 −0 ZBarSDK/Headers/ZBarSDK/zbar/Window.h
  31. BIN  ZBarSDK/Resources/zbar-back.png
  32. +88 −0 ZBarSDK/Resources/zbar-help.html
  33. BIN  ZBarSDK/Resources/zbar-helpicons.png
  34. BIN  ZBarSDK/Resources/zbar-samples.png
  35. BIN  ZBarSDK/libzbar.a
  36. +0 −201 ZXing/COPYING
  37. +0 −54 ZXing/README
  38. +0 −17 ZXing/ZXingWidget/Classes/DataMatrixReader.h
  39. +0 −19 ZXing/ZXingWidget/Classes/DataMatrixReader.mm
  40. +0 −52 ZXing/ZXingWidget/Classes/Decoder.h
  41. +0 −286 ZXing/ZXingWidget/Classes/Decoder.mm
  42. +0 −34 ZXing/ZXingWidget/Classes/DecoderDelegate.h
  43. +0 −39 ZXing/ZXingWidget/Classes/FormatReader.h
  44. +0 −71 ZXing/ZXingWidget/Classes/FormatReader.mm
  45. +0 −17 ZXing/ZXingWidget/Classes/MultiFormatOneDReader.h
  46. +0 −19 ZXing/ZXingWidget/Classes/MultiFormatOneDReader.mm
  47. +0 −40 ZXing/ZXingWidget/Classes/MultiFormatReader.mm
  48. +0 −17 ZXing/ZXingWidget/Classes/MultiFormatUPCEANReader.h
  49. +0 −19 ZXing/ZXingWidget/Classes/MultiFormatUPCEANReader.mm
  50. +0 −32 ZXing/ZXingWidget/Classes/NSString+HTML.h
  51. +0 −70 ZXing/ZXingWidget/Classes/NSString+HTML.m
  52. +0 −43 ZXing/ZXingWidget/Classes/OverlayView.h
  53. +0 −246 ZXing/ZXingWidget/Classes/OverlayView.m
  54. +0 −16 ZXing/ZXingWidget/Classes/QRCodeReader.h
  55. +0 −20 ZXing/ZXingWidget/Classes/QRCodeReader.mm
  56. +0 −35 ZXing/ZXingWidget/Classes/TwoDDecoderResult.h
  57. +0 −52 ZXing/ZXingWidget/Classes/TwoDDecoderResult.m
  58. +0 −71 ZXing/ZXingWidget/Classes/ZXingWidgetController.h
  59. +0 −476 ZXing/ZXingWidget/Classes/ZXingWidgetController.m
  60. +0 −51 ZXing/ZXingWidget/Classes/actions/AddContactAction.h
  61. +0 −224 ZXing/ZXingWidget/Classes/actions/AddContactAction.m
  62. +0 −36 ZXing/ZXingWidget/Classes/actions/CallAction.h
  63. +0 −67 ZXing/ZXingWidget/Classes/actions/CallAction.m
  64. +0 −34 ZXing/ZXingWidget/Classes/actions/EmailAction.h
  65. +0 −68 ZXing/ZXingWidget/Classes/actions/EmailAction.m
  66. +0 −42 ZXing/ZXingWidget/Classes/actions/OpenUrlAction.h
  67. +0 −82 ZXing/ZXingWidget/Classes/actions/OpenUrlAction.m
  68. +0 −32 ZXing/ZXingWidget/Classes/actions/ResultAction.h
  69. +0 −36 ZXing/ZXingWidget/Classes/actions/ResultAction.m
  70. +0 −34 ZXing/ZXingWidget/Classes/actions/SMSAction.h
  71. +0 −85 ZXing/ZXingWidget/Classes/actions/SMSAction.m
  72. +0 −34 ZXing/ZXingWidget/Classes/actions/ShowMapAction.h
  73. +0 −68 ZXing/ZXingWidget/Classes/actions/ShowMapAction.m
  74. +0 −41 ZXing/ZXingWidget/Classes/parsedResults/BusinessCardParsedResult.h
  75. +0 −84 ZXing/ZXingWidget/Classes/parsedResults/BusinessCardParsedResult.m
  76. +0 −37 ZXing/ZXingWidget/Classes/parsedResults/EmailParsedResult.h
  77. +0 −74 ZXing/ZXingWidget/Classes/parsedResults/EmailParsedResult.m
  78. +0 −34 ZXing/ZXingWidget/Classes/parsedResults/GeoParsedResult.h
  79. +0 −59 ZXing/ZXingWidget/Classes/parsedResults/GeoParsedResult.m
  80. +0 −35 ZXing/ZXingWidget/Classes/parsedResults/ParsedResult.h
  81. +0 −104 ZXing/ZXingWidget/Classes/parsedResults/ParsedResult.m
  82. +0 −36 ZXing/ZXingWidget/Classes/parsedResults/SMSParsedResult.h
  83. +0 −65 ZXing/ZXingWidget/Classes/parsedResults/SMSParsedResult.m
  84. +0 −33 ZXing/ZXingWidget/Classes/parsedResults/TelParsedResult.h
  85. +0 −58 ZXing/ZXingWidget/Classes/parsedResults/TelParsedResult.m
  86. +0 −34 ZXing/ZXingWidget/Classes/parsedResults/TextParsedResult.h
  87. +0 −58 ZXing/ZXingWidget/Classes/parsedResults/TextParsedResult.m
  88. +0 −45 ZXing/ZXingWidget/Classes/parsedResults/URIParsedResult.h
  89. +0 −87 ZXing/ZXingWidget/Classes/parsedResults/URIParsedResult.m
  90. +0 −29 ZXing/ZXingWidget/Classes/resultParsers/BookmarkDoCoMoResultParser.h
  91. +0 −49 ZXing/ZXingWidget/Classes/resultParsers/BookmarkDoCoMoResultParser.m
  92. +0 −38 ZXing/ZXingWidget/Classes/resultParsers/DoCoMoResultParser.h
  93. +0 −114 ZXing/ZXingWidget/Classes/resultParsers/DoCoMoResultParser.m
  94. +0 −29 ZXing/ZXingWidget/Classes/resultParsers/EmailDoCoMoResultParser.h
  95. +0 −50 ZXing/ZXingWidget/Classes/resultParsers/EmailDoCoMoResultParser.m
  96. +0 −29 ZXing/ZXingWidget/Classes/resultParsers/GeoResultParser.h
  97. +0 −42 ZXing/ZXingWidget/Classes/resultParsers/GeoResultParser.m
  98. +0 −29 ZXing/ZXingWidget/Classes/resultParsers/MeCardParser.h
  99. +0 −54 ZXing/ZXingWidget/Classes/resultParsers/MeCardParser.m
  100. +0 −30 ZXing/ZXingWidget/Classes/resultParsers/PlainEmailResultParser.h
  101. +0 −40 ZXing/ZXingWidget/Classes/resultParsers/PlainEmailResultParser.m
  102. +0 −31 ZXing/ZXingWidget/Classes/resultParsers/ResultParser.h
  103. +0 −66 ZXing/ZXingWidget/Classes/resultParsers/ResultParser.m
  104. +0 −29 ZXing/ZXingWidget/Classes/resultParsers/SMSResultParser.h
  105. +0 −78 ZXing/ZXingWidget/Classes/resultParsers/SMSResultParser.m
  106. +0 −29 ZXing/ZXingWidget/Classes/resultParsers/SMSTOResultParser.h
  107. +0 −57 ZXing/ZXingWidget/Classes/resultParsers/SMSTOResultParser.m
  108. +0 −29 ZXing/ZXingWidget/Classes/resultParsers/TelResultParser.h
  109. +0 −44 ZXing/ZXingWidget/Classes/resultParsers/TelResultParser.m
  110. +0 −30 ZXing/ZXingWidget/Classes/resultParsers/TextResultParser.h
  111. +0 −36 ZXing/ZXingWidget/Classes/resultParsers/TextResultParser.m
  112. +0 −30 ZXing/ZXingWidget/Classes/resultParsers/URLResultParser.h
  113. +0 −80 ZXing/ZXingWidget/Classes/resultParsers/URLResultParser.m
  114. +0 −29 ZXing/ZXingWidget/Classes/resultParsers/URLTOResultParser.h
  115. +0 −54 ZXing/ZXingWidget/Classes/resultParsers/URLTOResultParser.m
  116. +0 −38 ZXing/ZXingWidget/CoreSrc/zxing/BarcodeFormat.cpp
  117. +0 −42 ZXing/ZXingWidget/CoreSrc/zxing/BarcodeFormat.h
  118. +0 −36 ZXing/ZXingWidget/CoreSrc/zxing/Binarizer.cpp
  119. +0 −46 ZXing/ZXingWidget/CoreSrc/zxing/Binarizer.h
  120. +0 −67 ZXing/ZXingWidget/CoreSrc/zxing/BinaryBitmap.cpp
  121. +0 −57 ZXing/ZXingWidget/CoreSrc/zxing/BinaryBitmap.h
  122. +0 −111 ZXing/ZXingWidget/CoreSrc/zxing/DecodeHints.cpp
  123. +0 −69 ZXing/ZXingWidget/CoreSrc/zxing/DecodeHints.h
  124. +0 −25 ZXing/ZXingWidget/CoreSrc/zxing/Exception.cpp
  125. +0 −39 ZXing/ZXingWidget/CoreSrc/zxing/Exception.h
  126. +0 −47 ZXing/ZXingWidget/CoreSrc/zxing/LuminanceSource.cpp
  127. +0 −49 ZXing/ZXingWidget/CoreSrc/zxing/LuminanceSource.h
  128. +0 −102 ZXing/ZXingWidget/CoreSrc/zxing/MultiFormatReader.cpp
  129. +0 −49 ZXing/ZXingWidget/CoreSrc/zxing/MultiFormatReader.h
  130. +0 −31 ZXing/ZXingWidget/CoreSrc/zxing/Reader.cpp
  131. +0 −40 ZXing/ZXingWidget/CoreSrc/zxing/Reader.h
  132. +0 −32 ZXing/ZXingWidget/CoreSrc/zxing/ReaderException.cpp
  133. +0 −34 ZXing/ZXingWidget/CoreSrc/zxing/ReaderException.h
  134. +0 −59 ZXing/ZXingWidget/CoreSrc/zxing/Result.cpp
  135. +0 −53 ZXing/ZXingWidget/CoreSrc/zxing/Result.h
  136. +0 −27 ZXing/ZXingWidget/CoreSrc/zxing/ResultPoint.cpp
  137. +0 −39 ZXing/ZXingWidget/CoreSrc/zxing/ResultPoint.h
  138. +0 −26 ZXing/ZXingWidget/CoreSrc/zxing/ResultPointCallback.cpp
  139. +0 −39 ZXing/ZXingWidget/CoreSrc/zxing/ResultPointCallback.h
  140. +0 −22 ZXing/ZXingWidget/CoreSrc/zxing/common/Array.cpp
  141. +0 −207 ZXing/ZXingWidget/CoreSrc/zxing/common/Array.h
  142. +0 −129 ZXing/ZXingWidget/CoreSrc/zxing/common/BitArray.cpp
  143. +0 −55 ZXing/ZXingWidget/CoreSrc/zxing/common/BitArray.h
  144. +0 −176 ZXing/ZXingWidget/CoreSrc/zxing/common/BitMatrix.cpp
  145. +0 −65 ZXing/ZXingWidget/CoreSrc/zxing/common/BitMatrix.h
  146. +0 −75 ZXing/ZXingWidget/CoreSrc/zxing/common/BitSource.cpp
  147. +0 −67 ZXing/ZXingWidget/CoreSrc/zxing/common/BitSource.h
  148. +0 −32 ZXing/ZXingWidget/CoreSrc/zxing/common/Counted.cpp
  149. +0 −205 ZXing/ZXingWidget/CoreSrc/zxing/common/Counted.h
  150. +0 −37 ZXing/ZXingWidget/CoreSrc/zxing/common/DecoderResult.cpp
  151. +0 −43 ZXing/ZXingWidget/CoreSrc/zxing/common/DecoderResult.h
  152. +0 −41 ZXing/ZXingWidget/CoreSrc/zxing/common/DetectorResult.cpp
  153. +0 −46 ZXing/ZXingWidget/CoreSrc/zxing/common/DetectorResult.h
  154. +0 −191 ZXing/ZXingWidget/CoreSrc/zxing/common/EdgeDetector.cpp
  155. +0 −38 ZXing/ZXingWidget/CoreSrc/zxing/common/EdgeDetector.h
  156. +0 −209 ZXing/ZXingWidget/CoreSrc/zxing/common/GlobalHistogramBinarizer.cpp
  157. +0 −47 ZXing/ZXingWidget/CoreSrc/zxing/common/GlobalHistogramBinarizer.h
  158. +0 −70 ZXing/ZXingWidget/CoreSrc/zxing/common/GreyscaleLuminanceSource.cpp
  159. +0 −62 ZXing/ZXingWidget/CoreSrc/zxing/common/GreyscaleLuminanceSource.h
  160. +0 −65 ZXing/ZXingWidget/CoreSrc/zxing/common/GreyscaleRotatedLuminanceSource.cpp
  161. +0 −60 ZXing/ZXingWidget/CoreSrc/zxing/common/GreyscaleRotatedLuminanceSource.h
  162. +0 −101 ZXing/ZXingWidget/CoreSrc/zxing/common/GridSampler.cpp
  163. +0 −43 ZXing/ZXingWidget/CoreSrc/zxing/common/GridSampler.h
  164. +0 −168 ZXing/ZXingWidget/CoreSrc/zxing/common/HybridBinarizer.cpp
  165. +0 −55 ZXing/ZXingWidget/CoreSrc/zxing/common/HybridBinarizer.h
  166. +0 −31 ZXing/ZXingWidget/CoreSrc/zxing/common/IllegalArgumentException.cpp
  167. +0 −33 ZXing/ZXingWidget/CoreSrc/zxing/common/IllegalArgumentException.h
  168. +0 −107 ZXing/ZXingWidget/CoreSrc/zxing/common/PerspectiveTransform.cpp
  169. +0 −49 ZXing/ZXingWidget/CoreSrc/zxing/common/PerspectiveTransform.h
  170. +0 −47 ZXing/ZXingWidget/CoreSrc/zxing/common/Point.h
  171. +0 −38 ZXing/ZXingWidget/CoreSrc/zxing/common/Str.cpp
  172. +0 −40 ZXing/ZXingWidget/CoreSrc/zxing/common/Str.h
  173. +0 −136 ZXing/ZXingWidget/CoreSrc/zxing/common/reedsolomon/GF256.cpp
  174. +0 −68 ZXing/ZXingWidget/CoreSrc/zxing/common/reedsolomon/GF256.h
  175. +0 −198 ZXing/ZXingWidget/CoreSrc/zxing/common/reedsolomon/GF256Poly.cpp
  176. +0 −53 ZXing/ZXingWidget/CoreSrc/zxing/common/reedsolomon/GF256Poly.h
  177. +0 −193 ZXing/ZXingWidget/CoreSrc/zxing/common/reedsolomon/ReedSolomonDecoder.cpp
  178. +0 −46 ZXing/ZXingWidget/CoreSrc/zxing/common/reedsolomon/ReedSolomonDecoder.h
  179. +0 −30 ZXing/ZXingWidget/CoreSrc/zxing/common/reedsolomon/ReedSolomonException.cpp
  180. +0 −33 ZXing/ZXingWidget/CoreSrc/zxing/common/reedsolomon/ReedSolomonException.h
  181. +0 −82 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/DataMatrixReader.cpp
  182. +0 −45 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/DataMatrixReader.h
  183. +0 −199 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/Version.cpp
  184. +0 −87 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/Version.h
  185. +0 −364 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/decoder/BitMatrixParser.cpp
  186. +0 −59 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/decoder/BitMatrixParser.h
  187. +0 −113 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/decoder/DataBlock.cpp
  188. +0 −49 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/decoder/DataBlock.h
  189. +0 −404 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp
  190. +0 −103 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/decoder/DecodedBitStreamParser.h
  191. +0 −96 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/decoder/Decoder.cpp
  192. +0 −50 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/decoder/Decoder.h
  193. +0 −54 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/detector/CornerPoint.cpp
  194. +0 −47 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/detector/CornerPoint.h
  195. +0 −315 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/detector/Detector.cpp
  196. +0 −79 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/detector/Detector.h
  197. +0 −172 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/detector/MonochromeRectangleDetector.cpp
  198. +0 −61 ZXing/ZXingWidget/CoreSrc/zxing/datamatrix/detector/MonochromeRectangleDetector.h
  199. +0 −490 ZXing/ZXingWidget/CoreSrc/zxing/oned/Code128Reader.cpp
  200. +0 −63 ZXing/ZXingWidget/CoreSrc/zxing/oned/Code128Reader.h
  201. +0 −352 ZXing/ZXingWidget/CoreSrc/zxing/oned/Code39Reader.cpp
  202. +0 −58 ZXing/ZXingWidget/CoreSrc/zxing/oned/Code39Reader.h
  203. +0 −95 ZXing/ZXingWidget/CoreSrc/zxing/oned/EAN13Reader.cpp
  204. +0 −44 ZXing/ZXingWidget/CoreSrc/zxing/oned/EAN13Reader.h
  205. +0 −73 ZXing/ZXingWidget/CoreSrc/zxing/oned/EAN8Reader.cpp
  206. +0 −41 ZXing/ZXingWidget/CoreSrc/zxing/oned/EAN8Reader.h
  207. +0 −363 ZXing/ZXingWidget/CoreSrc/zxing/oned/ITFReader.cpp
  208. +0 −56 ZXing/ZXingWidget/CoreSrc/zxing/oned/ITFReader.h
  209. +0 −66 ZXing/ZXingWidget/CoreSrc/zxing/oned/MultiFormatOneDReader.cpp
  210. +0 −38 ZXing/ZXingWidget/CoreSrc/zxing/oned/MultiFormatOneDReader.h
  211. +0 −87 ZXing/ZXingWidget/CoreSrc/zxing/oned/MultiFormatUPCEANReader.cpp
  212. +0 −38 ZXing/ZXingWidget/CoreSrc/zxing/oned/MultiFormatUPCEANReader.h
  213. +0 −206 ZXing/ZXingWidget/CoreSrc/zxing/oned/OneDReader.cpp
  214. +0 −50 ZXing/ZXingWidget/CoreSrc/zxing/oned/OneDReader.h
  215. +0 −36 ZXing/ZXingWidget/CoreSrc/zxing/oned/OneDResultPoint.cpp
  216. +0 −40 ZXing/ZXingWidget/CoreSrc/zxing/oned/OneDResultPoint.h
  217. +0 −65 ZXing/ZXingWidget/CoreSrc/zxing/oned/UPCAReader.cpp
  218. +0 −49 ZXing/ZXingWidget/CoreSrc/zxing/oned/UPCAReader.h
  219. +0 −311 ZXing/ZXingWidget/CoreSrc/zxing/oned/UPCEANReader.cpp
  220. +0 −77 ZXing/ZXingWidget/CoreSrc/zxing/oned/UPCEANReader.h
  221. +0 −143 ZXing/ZXingWidget/CoreSrc/zxing/oned/UPCEReader.cpp
  222. +0 −47 ZXing/ZXingWidget/CoreSrc/zxing/oned/UPCEReader.h
  223. +0 −49 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/ErrorCorrectionLevel.cpp
  224. +0 −46 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/ErrorCorrectionLevel.h
  225. +0 −108 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/FormatInformation.cpp
  226. +0 −54 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/FormatInformation.h
  227. +0 −82 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/QRCodeReader.cpp
  228. +0 −43 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/QRCodeReader.h
  229. +0 −557 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/Version.cpp
  230. +0 −85 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/Version.h
  231. +0 −191 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/BitMatrixParser.cpp
  232. +0 −56 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/BitMatrixParser.h
  233. +0 −118 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/DataBlock.cpp
  234. +0 −50 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/DataBlock.h
  235. +0 −159 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/DataMask.cpp
  236. +0 −50 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/DataMask.h
  237. +0 −353 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/DecodedBitStreamParser.cpp
  238. +0 −59 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/DecodedBitStreamParser.h
  239. +0 −103 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/Decoder.cpp
  240. +0 −47 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/Decoder.h
  241. +0 −73 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/Mode.cpp
  242. +0 −50 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/decoder/Mode.h
  243. +0 −46 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/AlignmentPattern.cpp
  244. +0 −45 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/AlignmentPattern.h
  245. +0 −209 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/AlignmentPatternFinder.cpp
  246. +0 −68 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/AlignmentPatternFinder.h
  247. +0 −286 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/Detector.cpp
  248. +0 −64 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/Detector.h
  249. +0 −58 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/FinderPattern.cpp
  250. +0 −48 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/FinderPattern.h
  251. +0 −540 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/FinderPatternFinder.cpp
  252. +0 −69 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/FinderPatternFinder.h
  253. +0 −41 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/FinderPatternInfo.cpp
  254. +0 −47 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/FinderPatternInfo.h
  255. +0 −169 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/QREdgeDetector.cpp
  256. +0 −48 ZXing/ZXingWidget/CoreSrc/zxing/qrcode/detector/QREdgeDetector.h
  257. +0 −1,261 ZXing/ZXingWidget/ZXingWidget.xcodeproj/project.pbxproj
  258. +0 −7 ZXing/ZXingWidget/ZXingWidget_Prefix.pch
  259. BIN  ZXing/ZXingWidget/beep-beep.caf
  260. +0 −1  ZXing/ZXingWidget/exportList
View
4 Common/UIImage+Resize.m
@@ -16,7 +16,7 @@ - (UIImage *)resizedImage:(CGSize)newSize interpolationQuality:(CGInterpolationQ
case UIImageOrientationLeftMirrored:
case UIImageOrientationRight:
case UIImageOrientationRightMirrored:
- drawTransposed = YES;
+ drawTransposed = NO;
break;
default:
@@ -50,7 +50,7 @@ - (UIImage *)resizedImage:(CGSize)newSize
CGImageGetBitsPerComponent(imageRef),
0,
CGImageGetColorSpace(imageRef),
- CGImageGetBitmapInfo(imageRef));
+ kCGImageAlphaPremultipliedFirst);
// Rotate and/or flip the image if required by its orientation
CGContextConcatCTM(bitmap, transform);
View
156 MIT Mobile.xcodeproj/project.pbxproj
@@ -174,6 +174,11 @@
4B779FDF141E42050082DEF9 /* LibrariesTellUsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B779FDE141E42050082DEF9 /* LibrariesTellUsViewController.m */; };
4B7B66F5142D01BD00366615 /* WorldCatSearchController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7B66F4142D01BD00366615 /* WorldCatSearchController.m */; };
4B7B66F8142D01FE00366615 /* WorldCatBook.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7B66F7142D01FE00366615 /* WorldCatBook.m */; };
+ 4B83723B157E5B5C004CBC49 /* libzbar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B837235157E5B5C004CBC49 /* libzbar.a */; };
+ 4B83723C157E5B5C004CBC49 /* zbar-back.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B837237157E5B5C004CBC49 /* zbar-back.png */; };
+ 4B83723D157E5B5C004CBC49 /* zbar-help.html in Resources */ = {isa = PBXBuildFile; fileRef = 4B837238157E5B5C004CBC49 /* zbar-help.html */; };
+ 4B83723E157E5B5C004CBC49 /* zbar-helpicons.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B837239157E5B5C004CBC49 /* zbar-helpicons.png */; };
+ 4B83723F157E5B5C004CBC49 /* zbar-samples.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B83723A157E5B5C004CBC49 /* zbar-samples.png */; };
4B9A4EA41355E24900E37876 /* MorseCodePattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B9A4EA31355E24800E37876 /* MorseCodePattern.m */; };
4B9EF9B714321E360071F8E3 /* LibrariesBookDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B9EF9B614321E360071F8E3 /* LibrariesBookDetailViewController.m */; };
4BAA30AD143A8DF1004C47C1 /* LibraryMenuElementViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BAA30AC143A8DF1004C47C1 /* LibraryMenuElementViewController.m */; };
@@ -297,7 +302,6 @@
EB4C2914127B224800058748 /* IconGrid.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4C2912127B224800058748 /* IconGrid.m */; };
EB4C31BC1280AA9600058748 /* TourSiteOrRoute.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4C31BA1280AA9600058748 /* TourSiteOrRoute.m */; };
EB4C34FA1281FCBD00058748 /* tours in Resources */ = {isa = PBXBuildFile; fileRef = EB4C34F81281FCBD00058748 /* tours */; };
- EB4C39CC1283577400058748 /* libZXingWidget.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 56D7D29F1282B2ED00E9E5C9 /* libZXingWidget.a */; settings = {ATTRIBUTES = (Required, ); }; };
EB4C3A0B1283698000058748 /* TourOverviewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4C3A091283698000058748 /* TourOverviewViewController.m */; };
EB4C3A8C1283812A00058748 /* MITSpringboard.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4C3A8A1283812A00058748 /* MITSpringboard.m */; };
EB4C3A93128456DB00058748 /* TourOverviewViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EB4C3A92128456DB00058748 /* TourOverviewViewController.xib */; };
@@ -372,23 +376,6 @@
EF3B3B15103F072400E8AA0C /* MITNavigationActivityView.m in Sources */ = {isa = PBXBuildFile; fileRef = EF3B3B15103F072400E8AA0B /* MITNavigationActivityView.m */; };
/* End PBXBuildFile section */
-/* Begin PBXContainerItemProxy section */
- 56D7D29E1282B2ED00E9E5C9 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 56D7D2951282B2ED00E9E5C9 /* ZXingWidget.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = D2AAC07E0554694100DB518D;
- remoteInfo = ZXingWidget;
- };
- 56D7D2A11282B2F900E9E5C9 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 56D7D2951282B2ED00E9E5C9 /* ZXingWidget.xcodeproj */;
- proxyType = 1;
- remoteGlobalIDString = D2AAC07D0554694100DB518D;
- remoteInfo = ZXingWidget;
- };
-/* End PBXContainerItemProxy section */
-
/* Begin PBXFileReference section */
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D3623240D0F684500981E51 /* MIT_MobileAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIT_MobileAppDelegate.h; path = "App Delegate/MIT_MobileAppDelegate.h"; sourceTree = "<group>"; };
@@ -720,6 +707,31 @@
4B7B66F4142D01BD00366615 /* WorldCatSearchController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WorldCatSearchController.m; path = WorldCatSearch/WorldCatSearchController.m; sourceTree = "<group>"; };
4B7B66F6142D01FE00366615 /* WorldCatBook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorldCatBook.h; path = WorldCatSearch/WorldCatBook.h; sourceTree = "<group>"; };
4B7B66F7142D01FE00366615 /* WorldCatBook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WorldCatBook.m; path = WorldCatSearch/WorldCatBook.m; sourceTree = "<group>"; };
+ 4B837221157E5B5C004CBC49 /* Decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Decoder.h; sourceTree = "<group>"; };
+ 4B837222157E5B5C004CBC49 /* Exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Exception.h; sourceTree = "<group>"; };
+ 4B837223157E5B5C004CBC49 /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Image.h; sourceTree = "<group>"; };
+ 4B837224157E5B5C004CBC49 /* ImageScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageScanner.h; sourceTree = "<group>"; };
+ 4B837225157E5B5C004CBC49 /* Processor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Processor.h; sourceTree = "<group>"; };
+ 4B837226157E5B5C004CBC49 /* Scanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scanner.h; sourceTree = "<group>"; };
+ 4B837227157E5B5C004CBC49 /* Symbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Symbol.h; sourceTree = "<group>"; };
+ 4B837228157E5B5C004CBC49 /* Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Video.h; sourceTree = "<group>"; };
+ 4B837229157E5B5C004CBC49 /* Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Window.h; sourceTree = "<group>"; };
+ 4B83722A157E5B5C004CBC49 /* zbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zbar.h; sourceTree = "<group>"; };
+ 4B83722B157E5B5C004CBC49 /* ZBarCameraSimulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarCameraSimulator.h; sourceTree = "<group>"; };
+ 4B83722C157E5B5C004CBC49 /* ZBarCaptureReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarCaptureReader.h; sourceTree = "<group>"; };
+ 4B83722D157E5B5C004CBC49 /* ZBarHelpController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarHelpController.h; sourceTree = "<group>"; };
+ 4B83722E157E5B5C004CBC49 /* ZBarImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarImage.h; sourceTree = "<group>"; };
+ 4B83722F157E5B5C004CBC49 /* ZBarImageScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarImageScanner.h; sourceTree = "<group>"; };
+ 4B837230157E5B5C004CBC49 /* ZBarReaderController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarReaderController.h; sourceTree = "<group>"; };
+ 4B837231157E5B5C004CBC49 /* ZBarReaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarReaderView.h; sourceTree = "<group>"; };
+ 4B837232157E5B5C004CBC49 /* ZBarReaderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarReaderViewController.h; sourceTree = "<group>"; };
+ 4B837233157E5B5C004CBC49 /* ZBarSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarSDK.h; sourceTree = "<group>"; };
+ 4B837234157E5B5C004CBC49 /* ZBarSymbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZBarSymbol.h; sourceTree = "<group>"; };
+ 4B837235157E5B5C004CBC49 /* libzbar.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libzbar.a; sourceTree = "<group>"; };
+ 4B837237157E5B5C004CBC49 /* zbar-back.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "zbar-back.png"; sourceTree = "<group>"; };
+ 4B837238157E5B5C004CBC49 /* zbar-help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "zbar-help.html"; sourceTree = "<group>"; };
+ 4B837239157E5B5C004CBC49 /* zbar-helpicons.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "zbar-helpicons.png"; sourceTree = "<group>"; };
+ 4B83723A157E5B5C004CBC49 /* zbar-samples.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "zbar-samples.png"; sourceTree = "<group>"; };
4B9A4EA21355E24800E37876 /* MorseCodePattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MorseCodePattern.h; sourceTree = "<group>"; };
4B9A4EA31355E24800E37876 /* MorseCodePattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MorseCodePattern.m; sourceTree = "<group>"; };
4B9EF9B514321E360071F8E3 /* LibrariesBookDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibrariesBookDetailViewController.h; path = WorldCatSearch/LibrariesBookDetailViewController.h; sourceTree = "<group>"; };
@@ -745,7 +757,6 @@
569DC33B1282ADBC00BA0794 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = iphoneos4.0/System/Library/Frameworks/CoreMedia.framework; sourceTree = "<group>"; };
569DC33E1282ADC000BA0794 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = iphoneos4.0/System/Library/Frameworks/CoreVideo.framework; sourceTree = "<group>"; };
569DC3411282ADCE00BA0794 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = iphoneos4.0/usr/lib/libiconv.dylib; sourceTree = "<group>"; };
- 56D7D2951282B2ED00E9E5C9 /* ZXingWidget.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ZXingWidget.xcodeproj; path = ZXing/ZXingWidget/ZXingWidget.xcodeproj; sourceTree = SOURCE_ROOT; };
56D7D7BA12846C4100E9E5C9 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = iphoneos4.0/System/Library/Frameworks/MapKit.framework; sourceTree = "<group>"; };
56D7DF51128854DF00E9E5C9 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = iphoneos4.0/System/Library/Frameworks/MapKit.framework; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* MIT_Mobile-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MIT_Mobile-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
@@ -1126,12 +1137,12 @@
569DC33C1282ADBC00BA0794 /* CoreMedia.framework in Frameworks */,
569DC33F1282ADC000BA0794 /* CoreVideo.framework in Frameworks */,
569DC3421282ADCE00BA0794 /* libiconv.dylib in Frameworks */,
- EB4C39CC1283577400058748 /* libZXingWidget.a in Frameworks */,
56D7DF52128854DF00E9E5C9 /* MapKit.framework in Frameworks */,
EB4C40D51288988900058748 /* OpenGLES.framework in Frameworks */,
EBF8A77B12AF09CD00D39AE6 /* MediaPlayer.framework in Frameworks */,
A63DEE281353CF37001C52BF /* EventKit.framework in Frameworks */,
A69826E51354A488004A8258 /* EventKitUI.framework in Frameworks */,
+ 4B83723B157E5B5C004CBC49 /* libzbar.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1216,6 +1227,7 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
+ 4B83721C157E5B19004CBC49 /* Contrib */,
DE715445102FE468005E6111 /* Modules */,
080E96DDFE201D6D7F000001 /* Common */,
DE783C9810C8651300931EC5 /* App Delegate */,
@@ -1223,7 +1235,6 @@
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
- 56D7D2951282B2ED00E9E5C9 /* ZXingWidget.xcodeproj */,
);
name = CustomTemplate;
sourceTree = "<group>";
@@ -1798,12 +1809,76 @@
name = LocationsHours;
sourceTree = "<group>";
};
- 56D7D29B1282B2ED00E9E5C9 /* Products */ = {
+ 4B83721C157E5B19004CBC49 /* Contrib */ = {
isa = PBXGroup;
children = (
- 56D7D29F1282B2ED00E9E5C9 /* libZXingWidget.a */,
+ 4B83721D157E5B5C004CBC49 /* ZBarSDK */,
);
- name = Products;
+ name = Contrib;
+ sourceTree = "<group>";
+ };
+ 4B83721D157E5B5C004CBC49 /* ZBarSDK */ = {
+ isa = PBXGroup;
+ children = (
+ 4B83721E157E5B5C004CBC49 /* Headers */,
+ 4B837235157E5B5C004CBC49 /* libzbar.a */,
+ 4B837236157E5B5C004CBC49 /* Resources */,
+ );
+ path = ZBarSDK;
+ sourceTree = "<group>";
+ };
+ 4B83721E157E5B5C004CBC49 /* Headers */ = {
+ isa = PBXGroup;
+ children = (
+ 4B83721F157E5B5C004CBC49 /* ZBarSDK */,
+ );
+ path = Headers;
+ sourceTree = "<group>";
+ };
+ 4B83721F157E5B5C004CBC49 /* ZBarSDK */ = {
+ isa = PBXGroup;
+ children = (
+ 4B837220157E5B5C004CBC49 /* zbar */,
+ 4B83722A157E5B5C004CBC49 /* zbar.h */,
+ 4B83722B157E5B5C004CBC49 /* ZBarCameraSimulator.h */,
+ 4B83722C157E5B5C004CBC49 /* ZBarCaptureReader.h */,
+ 4B83722D157E5B5C004CBC49 /* ZBarHelpController.h */,
+ 4B83722E157E5B5C004CBC49 /* ZBarImage.h */,
+ 4B83722F157E5B5C004CBC49 /* ZBarImageScanner.h */,
+ 4B837230157E5B5C004CBC49 /* ZBarReaderController.h */,
+ 4B837231157E5B5C004CBC49 /* ZBarReaderView.h */,
+ 4B837232157E5B5C004CBC49 /* ZBarReaderViewController.h */,
+ 4B837233157E5B5C004CBC49 /* ZBarSDK.h */,
+ 4B837234157E5B5C004CBC49 /* ZBarSymbol.h */,
+ );
+ path = ZBarSDK;
+ sourceTree = "<group>";
+ };
+ 4B837220157E5B5C004CBC49 /* zbar */ = {
+ isa = PBXGroup;
+ children = (
+ 4B837221157E5B5C004CBC49 /* Decoder.h */,
+ 4B837222157E5B5C004CBC49 /* Exception.h */,
+ 4B837223157E5B5C004CBC49 /* Image.h */,
+ 4B837224157E5B5C004CBC49 /* ImageScanner.h */,
+ 4B837225157E5B5C004CBC49 /* Processor.h */,
+ 4B837226157E5B5C004CBC49 /* Scanner.h */,
+ 4B837227157E5B5C004CBC49 /* Symbol.h */,
+ 4B837228157E5B5C004CBC49 /* Video.h */,
+ 4B837229157E5B5C004CBC49 /* Window.h */,
+ );
+ path = zbar;
+ sourceTree = "<group>";
+ };
+ 4B837236157E5B5C004CBC49 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 4B837237157E5B5C004CBC49 /* zbar-back.png */,
+ 4B837238157E5B5C004CBC49 /* zbar-help.html */,
+ 4B837239157E5B5C004CBC49 /* zbar-helpicons.png */,
+ 4B83723A157E5B5C004CBC49 /* zbar-samples.png */,
+ );
+ path = Resources;
sourceTree = "<group>";
};
BD1E92F3103B5D60004429AA /* JSON */ = {
@@ -2466,7 +2541,6 @@
buildRules = (
);
dependencies = (
- 56D7D2A21282B2F900E9E5C9 /* PBXTargetDependency */,
);
name = "MIT Mobile";
productName = "MIT Mobile";
@@ -2494,12 +2568,6 @@
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
projectDirPath = "";
- projectReferences = (
- {
- ProductGroup = 56D7D29B1282B2ED00E9E5C9 /* Products */;
- ProjectRef = 56D7D2951282B2ED00E9E5C9 /* ZXingWidget.xcodeproj */;
- },
- );
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* MIT Mobile */,
@@ -2507,16 +2575,6 @@
};
/* End PBXProject section */
-/* Begin PBXReferenceProxy section */
- 56D7D29F1282B2ED00E9E5C9 /* libZXingWidget.a */ = {
- isa = PBXReferenceProxy;
- fileType = archive.ar;
- path = libZXingWidget.a;
- remoteRef = 56D7D29E1282B2ED00E9E5C9 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
-/* End PBXReferenceProxy section */
-
/* Begin PBXResourcesBuildPhase section */
1D60588D0D05DD3D006BFB54 /* Resources */ = {
isa = PBXResourcesBuildPhase;
@@ -2557,6 +2615,10 @@
4B667064140330A000714C6A /* LibrariesViewController.xib in Resources */,
4BE4D2FF14115DD200E723F0 /* LibrariesLocationsHoursDetailViewController.xib in Resources */,
4BE4D3011416EB4D00E723F0 /* libraries in Resources */,
+ 4B83723C157E5B5C004CBC49 /* zbar-back.png in Resources */,
+ 4B83723D157E5B5C004CBC49 /* zbar-help.html in Resources */,
+ 4B83723E157E5B5C004CBC49 /* zbar-helpicons.png in Resources */,
+ 4B83723F157E5B5C004CBC49 /* zbar-samples.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2903,14 +2965,6 @@
};
/* End PBXSourcesBuildPhase section */
-/* Begin PBXTargetDependency section */
- 56D7D2A21282B2F900E9E5C9 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- name = ZXingWidget;
- targetProxy = 56D7D2A11282B2F900E9E5C9 /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
/* Begin XCBuildConfiguration section */
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
@@ -2931,6 +2985,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Common/Libraries & Headers/OAuthConsumer\"",
+ "\"$(SRCROOT)/ZBarSDK\"",
);
PRODUCT_NAME = MITMobile;
SDKROOT = iphoneos;
@@ -2955,6 +3010,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Common/Libraries & Headers/OAuthConsumer\"",
+ "\"$(SRCROOT)/ZBarSDK\"",
);
PRODUCT_NAME = MITMobile;
SDKROOT = iphoneos;
@@ -3059,6 +3115,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Common/Libraries & Headers/OAuthConsumer\"",
+ "\"$(SRCROOT)/ZBarSDK\"",
);
PRODUCT_NAME = MITMobile;
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
@@ -3113,6 +3170,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Common/Libraries & Headers/OAuthConsumer\"",
+ "\"$(SRCROOT)/ZBarSDK\"",
);
PRODUCT_NAME = MITMobile;
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
View
1  MIT_Mobile_Prefix.pch
@@ -13,4 +13,5 @@
#import <UIKit/UIKit.h>
#import "MITConstants.h" // shared constants (common URLs, NSUserDefaults keys, etc)
#import "MITLogging.h" // DLog(), WLog(), ELog()
+ #import "ZBarSDK.h"
#endif
View
2  Modules/QR Reader/QRReaderHistoryViewController.h
@@ -5,7 +5,7 @@
@class QRReaderScanViewController;
@class QRReaderHelpView;
-@interface QRReaderHistoryViewController : UIViewController <UITableViewDelegate,UITableViewDataSource,QRReaderScanDelegate> {
+@interface QRReaderHistoryViewController : UIViewController <UITableViewDelegate,UITableViewDataSource,ZBarReaderDelegate,QRReaderScanDelegate> {
UITableView *_tableView;
UIView *_contentView;
QRReaderHelpView *_helpView;
View
11 Modules/QR Reader/QRReaderHistoryViewController.m
@@ -157,9 +157,7 @@ - (IBAction)beginQRScanning:(id)sender {
[self.navigationController popToViewController:self
animated:YES];
self.scanController = [[[QRReaderScanViewController alloc] init] autorelease];
- self.scanController.reader = [QRReaderScanViewController defaultReader];
self.scanController.scanDelegate = self;
-
[self presentModalViewController:self.scanController
animated:YES];
}
@@ -215,6 +213,15 @@ - (IBAction)hideHelp:(id)sender {
}
#pragma mark -
+#pragma mark ZBarReaderDelegate Methods
+
+- (void) readerControllerDidFailToRead: (ZBarReaderController*) reader
+ withRetry: (BOOL) retry {
+ [self dismissModalViewControllerAnimated:YES];
+ self.scanController = nil;
+}
+
+#pragma mark -
#pragma mark ScanView Delegate Methods
- (void)scanView:(QRReaderScanViewController*)scanView
didScanResult:(NSString*)result
View
4 Modules/QR Reader/QRReaderOverlayView.h
@@ -7,6 +7,8 @@
UIColor *_highlightColor;
UIColor *_outlineColor;
UIColor *_overlayColor;
+ UIInterfaceOrientation _interfaceOrientation;
+ NSTimeInterval _animationDuration;
}
@property (nonatomic) BOOL highlighted;
@@ -16,4 +18,6 @@
- (CGRect)qrRect;
+- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) orient
+ duration: (NSTimeInterval) duration;
@end
View
46 Modules/QR Reader/QRReaderOverlayView.m
@@ -1,5 +1,5 @@
#import "QRReaderOverlayView.h"
-
+#include <QuartzCore/QuartzCore.h>
@implementation QRReaderOverlayView
@synthesize highlighted = _highlighted;
@synthesize highlightColor = _highlightColor;
@@ -29,15 +29,41 @@ - (void)dealloc
[super dealloc];
}
+- (CGFloat)rotationForInterfaceOrientation:(int)orient
+{
+ // resolve camera/device image orientation to view/interface orientation
+ switch(orient)
+ {
+ case UIInterfaceOrientationLandscapeLeft:
+ return(M_PI_2);
+ case UIInterfaceOrientationPortraitUpsideDown:
+ return(M_PI);
+ case UIInterfaceOrientationLandscapeRight:
+ return(3 * M_PI_2);
+ case UIInterfaceOrientationPortrait:
+ return(2 * M_PI);
+ }
+ return(0);
+}
+
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
+ CGRect bds = CGRectZero;
+ if (!UIInterfaceOrientationIsLandscape(_interfaceOrientation))
+ {
+ bds = [self bounds];
+ } else {
+ CGContextRotateCTM(context,[self rotationForInterfaceOrientation:_interfaceOrientation]);
+ bds = CGRectMake(0., 0., [self bounds].size.height, [self bounds].size.width);
+ }
+
CGRect qrRect = [self qrRect];
{
CGContextBeginPath(context);
- CGContextAddRect(context, self.bounds);
+ CGContextAddRect(context, bds);
CGContextAddRect(context, qrRect);
CGContextClosePath(context);
@@ -100,6 +126,13 @@ - (CGRect)qrRect {
static CGFloat kRectScalingFactor = 0.75;
CGRect qrRect = self.bounds;
+ CGSize psize;
+ if(UIInterfaceOrientationIsLandscape(_interfaceOrientation)) {
+ psize = CGSizeMake(qrRect.size.height, qrRect.size.width);
+ } else {
+ psize = qrRect.size;
+ }
+ qrRect.size = psize;
CGFloat minRect = MIN(qrRect.size.width, qrRect.size.height) * kRectScalingFactor;
qrRect.origin.x = (qrRect.size.width - minRect) / 2.0;
qrRect.origin.y = (qrRect.size.height - minRect) / 2.0;
@@ -135,4 +168,13 @@ - (void)setOverlayColor:(UIColor *)overlayColor {
_overlayColor = [overlayColor retain];
}
+- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) orient
+ duration: (NSTimeInterval) duration {
+ if(_interfaceOrientation != orient) {
+ _interfaceOrientation = orient;
+ _animationDuration = duration;
+ }
+ [self setNeedsDisplay];
+}
+
@end
View
15 Modules/QR Reader/QRReaderScanViewController.h
@@ -1,34 +1,25 @@
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
-#import "DecoderDelegate.h"
+
@protocol QRReaderScanDelegate;
@class QRReaderOverlayView;
-@class FormatReader;
-@interface QRReaderScanViewController : UIViewController <DecoderDelegate> {
+@interface QRReaderScanViewController : UIViewController <ZBarReaderViewDelegate>{
id<QRReaderScanDelegate> _scanDelegate;
QRReaderOverlayView *_overlayView;
+ ZBarReaderView *_readerView;
UILabel *adviceLabel;
BOOL _isCaptureActive;
- BOOL _decodedResult;
-
- FormatReader *_reader;
UIButton *_cancelButton;
-
- AVCaptureSession *_captureSession;
- AVCaptureVideoPreviewLayer *_previewLayer;
}
@property (nonatomic,retain) id<QRReaderScanDelegate> scanDelegate;
@property (nonatomic,retain,readonly) IBOutlet QRReaderOverlayView *overlayView;
@property (nonatomic,retain,readonly) UILabel *adviceLabel;
@property (nonatomic,readonly) BOOL isCaptureActive;
-@property (nonatomic,retain) FormatReader *reader;
-
-+ (FormatReader*)defaultReader;
@end
@protocol QRReaderScanDelegate <NSObject>
View
251 Modules/QR Reader/QRReaderScanViewController.mm
@@ -8,18 +8,9 @@
#import "QRReaderOverlayView.h"
#import "QRReaderScanViewController.h"
-// ZXing
-#import "QRCodeReader.h"
-#import "FormatReader.h"
-#import "Decoder.h"
-#import "TwoDDecoderResult.h"
-
#import "UIImage+Resize.h"
@interface QRReaderScanViewController ()
-
-@property (nonatomic,retain) AVCaptureSession *captureSession;
-@property (nonatomic,retain) AVCaptureVideoPreviewLayer *previewLayer;
@property (nonatomic,retain) QRReaderOverlayView *overlayView;
@property (nonatomic,retain) UILabel *adviceLabel;
@property (nonatomic) BOOL isCaptureActive;
@@ -30,24 +21,39 @@ - (void)stopCapture;
@end
@implementation QRReaderScanViewController
-
-@synthesize captureSession = _captureSession;
-@synthesize previewLayer = _previewLayer;
-
@synthesize overlayView = _overlayView;
@synthesize adviceLabel;
@synthesize isCaptureActive = _isCaptureActive;
-@synthesize reader = _reader;
@synthesize scanDelegate = _scanDelegate;
@synthesize cancelButton = _cancelButton;
-+ (FormatReader*)defaultReader {
- return [[[QRCodeReader alloc] init] autorelease];
+- (void)dealloc
+{
+ self.cancelButton = nil;
+ self.overlayView = nil;
+ [super dealloc];
+}
+
+- (void)didReceiveMemoryWarning
+{
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc that aren't in use.
}
-- (void)loadView {
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ _readerView = [ZBarReaderViewController new].readerView;
+ _readerView.readerDelegate = self;
+ _readerView.frame = self.view.bounds;
+ self.view = _readerView;
+ self.overlayView = [[[QRReaderOverlayView alloc] initWithFrame:self.view.bounds] autorelease];
+ self.isCaptureActive = NO;
self.wantsFullScreenLayout = YES;
- self.view = [[[UIView alloc] init] autorelease];
self.view.backgroundColor = [UIColor blackColor];
self.view.autoresizingMask = (UIViewAutoresizingFlexibleHeight |
UIViewAutoresizingFlexibleWidth);
@@ -68,35 +74,6 @@ - (void)loadView {
action:@selector(cancelScan:)
forControlEvents:UIControlEventTouchUpInside];
self.cancelButton.titleLabel.font = [UIFont boldSystemFontOfSize:14.0];
-
- _decodedResult = NO;
-}
-
-- (void)dealloc
-{
- self.cancelButton = nil;
- self.overlayView = nil;
-
- self.captureSession = nil;
- self.previewLayer = nil;
- [super dealloc];
-}
-
-- (void)didReceiveMemoryWarning
-{
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-#pragma mark - View lifecycle
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
- self.overlayView = [[[QRReaderOverlayView alloc] initWithFrame:self.view.bounds] autorelease];
- self.isCaptureActive = NO;
[self startCapture];
}
@@ -107,13 +84,6 @@ - (void)viewDidUnload
[self stopCapture];
self.overlayView = nil;
- self.previewLayer = nil;
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@@ -132,37 +102,7 @@ - (BOOL)startCapture {
return NO;
}
- _decodedResult = NO;
-
- AVCaptureVideoDataOutput *output = [[[AVCaptureVideoDataOutput alloc] init] autorelease];
-
- output.alwaysDiscardsLateVideoFrames = YES;
-
- dispatch_queue_t queue = dispatch_queue_create("decoderQueue", NULL);
- [output setSampleBufferDelegate:self
- queue:queue];
- dispatch_release(queue);
-
- [output setVideoSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithUnsignedInt:kCVPixelFormatType_32BGRA]
- forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey]];
-
- self.captureSession = [[[AVCaptureSession alloc] init] autorelease];
-
- if (self.captureSession) {
- self.captureSession.sessionPreset = AVCaptureSessionPresetMedium;
- [self.captureSession addInput:inputDevice];
- [self.captureSession addOutput:output];
-
- self.previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.captureSession];
- self.previewLayer.frame = self.view.bounds;
- self.previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
- [self.view.layer addSublayer:self.previewLayer];
- [self.captureSession startRunning];
- self.isCaptureActive = YES;
- }
-
- [self.view addSubview:self.overlayView];
-
+ [_readerView addSubview:self.overlayView];
[self.cancelButton sizeToFit];
self.cancelButton.center = CGPointMake(self.view.frame.size.width / 2.0, self.view.frame.size.height - 60.0);
@@ -173,40 +113,18 @@ - (BOOL)startCapture {
[self.view insertSubview:self.adviceLabel aboveSubview:self.overlayView];
-
- return (self.captureSession != nil);
+ [_readerView start];
+ return YES;
}
- (void)stopCapture {
+ [_readerView stop];
if (self.isCaptureActive == NO) {
return;
}
-
- [self.captureSession stopRunning];
- self.captureSession = nil;
self.isCaptureActive = NO;
}
-- (BOOL)hasVMCopyBug {
- size_t size = 0;
- sysctlbyname("hw.machine",
- NULL, &size,
- NULL, 0);
-
- char *mname = (char*)malloc(size);
- memset((void*)mname,'\0',size + 1);
- sysctlbyname("hw.machine",
- mname, &size,
- NULL, 0);
-
- NSString *mstr = [NSString stringWithCString:mname
- encoding:NSASCIIStringEncoding];
- free(mname);
-
- return ([mstr isEqualToString:@"iPhone1,1"] ||
- [mstr isEqualToString:@"iPhone1,2"]);
-}
-
- (void)cancelScan:(id)sender {
if (self.scanDelegate) {
[self.scanDelegate scanViewDidCancel:self];
@@ -215,73 +133,18 @@ - (void)cancelScan:(id)sender {
[self stopCapture];
}
-
-#pragma mark - AVCaptureVideoDataOutputSampleBufferDelegate
-- (void)captureOutput:(AVCaptureOutput*)captureOutput
-didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
- fromConnection:(AVCaptureConnection *)connection
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- if ((self.isCaptureActive == NO) ||
- (self.reader == nil) ||
- _decodedResult)
- {
- [pool drain];
- return;
- }
-
- CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
- CVPixelBufferLockBaseAddress(imageBuffer,0);
-
- size_t bytesPerRow = CVPixelBufferGetBytesPerRow(imageBuffer);
- size_t width = CVPixelBufferGetWidth(imageBuffer);
- size_t height = CVPixelBufferGetHeight(imageBuffer);
- void *bufferBase = NULL;
- BOOL mustFreeBuffer = NO;
-
-
- if ([self hasVMCopyBug]) {
- // vm_copy fails with the iPhone 3G series so, in order to avoid
- // flooding the log, we need to malloc, copy and free our own
- // copy of the pixel data.
- mustFreeBuffer = YES;
- size_t size = CVPixelBufferGetDataSize(imageBuffer);
- bufferBase = malloc(size);
- memcpy(bufferBase,CVPixelBufferGetBaseAddress(imageBuffer),size);
- } else {
- bufferBase = (void*)CVPixelBufferGetBaseAddress(imageBuffer);
- }
-
- CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
- CGContextRef context = CGBitmapContextCreate(bufferBase,
- width,
- height,
- 8,
- bytesPerRow,
- colorSpace,
- kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst);
-
- CGColorSpaceRelease(colorSpace);
-
- if (context == nil) {
- if (mustFreeBuffer)
- free(bufferBase);
-
- if (imageBuffer)
- CVPixelBufferUnlockBaseAddress(imageBuffer, 0);
-
- [pool drain];
- return;
- }
-
- CGImageRef cgImage = CGBitmapContextCreateImage(context);
-
- CGContextRelease(context);
-
+- (void) readerView: (ZBarReaderView*) areaderView
+ didReadSymbols: (ZBarSymbolSet*) symbols
+ fromImage: (UIImage*) image {
+ CGImageRef cgImage = image.CGImage;
CGRect clipRect = [self.overlayView qrRect];
- clipRect = [self.previewLayer convertRect:clipRect
- fromLayer:self.overlayView.layer];
+ CGFloat w_view = self.view.frame.size.width;
+ CGFloat h_view = self.view.frame.size.height;
+ CGFloat hRate = image.size.width / w_view;
+ CGFloat vRate = image.size.height / h_view;
+ CGFloat y_preview = hRate * clipRect.origin.y;
+ CGFloat x_preview = vRate * clipRect.origin.x;
+ clipRect = CGRectMake(x_preview, y_preview, clipRect.size.width * vRate, clipRect.size.height * vRate);
// Fix the origin for the clipping rect as the video capture is 4:3
// Will not work properly if the clipping rect is not centered on the
@@ -296,46 +159,26 @@ - (void)captureOutput:(AVCaptureOutput*)captureOutput
CGImageRef cropped = CGImageCreateWithImageInRect(cgImage, clipRect);
UIImage *qrImage = [UIImage imageWithCGImage:cropped];
- CGImageRelease(cgImage);
- CGImageRelease(cropped);
-
- CVPixelBufferUnlockBaseAddress(imageBuffer, 0);
-
- if (mustFreeBuffer)
- free(bufferBase);
-
- Decoder *decoder = [[[Decoder alloc] init] autorelease];
- decoder.readers = [NSArray arrayWithObject:_reader];
- decoder.delegate = self;
-
- _decodedResult = [decoder decodeImage:qrImage];
-
- [pool drain];
-}
-
-#pragma mark -
-#pragma mark DecoderDelegate (ZXing)
-- (void)decoder:(Decoder *)decoder
- didDecodeImage:(UIImage *)image
- usingSubset:(UIImage *)subset
- withResult:(TwoDDecoderResult *)result {
self.overlayView.highlightColor = [UIColor greenColor];
self.overlayView.highlighted = YES;
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
[self stopCapture];
+ NSString *result = nil;
+ for (ZBarSymbol *symbol in symbols) {
+ result = symbol.data;
+ }
- UIImage *rotateImage = [UIImage imageWithCGImage:[image CGImage]
+ UIImage *rotateImage = [UIImage imageWithCGImage:[qrImage CGImage]
scale:1.0
orientation:UIImageOrientationRight];
-
- rotateImage = [rotateImage resizedImage:image.size
- interpolationQuality:kCGInterpolationDefault];
+ rotateImage = [rotateImage resizedImage:qrImage.size
+ interpolationQuality:kCGInterpolationDefault];
if (self.scanDelegate) {
[self.scanDelegate scanView:self
- didScanResult:[NSString stringWithString:result.text]
+ didScanResult:[NSString stringWithString:result]
fromImage:rotateImage];
}
}
View
3  Modules/Tours/SiteDetailViewController.h
@@ -1,9 +1,8 @@
#import <UIKit/UIKit.h>
#import "MITThumbnailView.h"
#import "MITMapView.h"
-#import "CampusTourInteriorController.h"
#import "ConnectionWrapper.h"
-
+#import <AVFoundation/AVFoundation.h>
@class TourSiteOrRoute;
@class CampusTourSideTrip;
@class TourComponent;
View
45 ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h
@@ -0,0 +1,45 @@
+//------------------------------------------------------------------------
+// Copyright 2010-2011 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+@class ZBarReaderView;
+
+// hack around missing simulator support for AVCapture interfaces
+
+@interface ZBarCameraSimulator
+ : NSObject
+ < UINavigationControllerDelegate,
+ UIImagePickerControllerDelegate,
+ UIPopoverControllerDelegate >
+{
+ UIViewController *viewController;
+ ZBarReaderView *readerView;
+ UIImagePickerController *picker;
+ UIPopoverController *pickerPopover;
+}
+
+- (id) initWithViewController: (UIViewController*) viewController;
+- (void) takePicture;
+
+@property (nonatomic, assign) ZBarReaderView *readerView;
+
+@end
View
111 ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h
@@ -0,0 +1,111 @@
+//------------------------------------------------------------------------
+// Copyright 2010 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+#import <CoreGraphics/CoreGraphics.h>
+#import "ZBarImageScanner.h"
+
+@class AVCaptureVideoDataOutput, AVCaptureOutput;
+@class ZBarCaptureReader, ZBarCVImage;
+
+@protocol ZBarCaptureDelegate <NSObject>
+
+// called when a new barcode is detected. the image refers to the
+// video buffer and must not be retained for long
+- (void) captureReader: (ZBarCaptureReader*) captureReader
+ didReadNewSymbolsFromImage: (ZBarImage*) image;
+
+@optional
+// called when a potential/uncertain barcode is detected. will also
+// be called *after* captureReader:didReadNewSymbolsFromImage:
+// when good barcodes are detected
+- (void) captureReader: (ZBarCaptureReader*) captureReader
+ didTrackSymbols: (ZBarSymbolSet*) symbols;
+
+@end
+
+@interface ZBarCaptureReader
+ : NSObject
+{
+#if !TARGET_IPHONE_SIMULATOR
+ AVCaptureVideoDataOutput *captureOutput;
+ id<ZBarCaptureDelegate> captureDelegate;
+ ZBarImageScanner *scanner;
+ CGRect scanCrop;
+ CGSize size;
+ CGFloat framesPerSecond;
+ BOOL enableCache;
+
+ dispatch_queue_t queue;
+ ZBarImage *image;
+ ZBarCVImage *result;
+ volatile uint32_t state;
+ int framecnt;
+ unsigned width, height;
+ uint64_t t_frame, t_fps, t_scan;
+ CGFloat dt_frame;
+#endif
+}
+
+// supply a pre-configured image scanner
+- (id) initWithImageScanner: (ZBarImageScanner*) imageScanner;
+
+// this must be called before the session is started
+- (void) willStartRunning;
+
+// this must be called *before* the session is stopped
+- (void) willStopRunning;
+
+// clear the internal result cache
+- (void) flushCache;
+
+// capture the next frame after processing. the captured image will
+// follow the same delegate path as an image with decoded symbols.
+- (void) captureFrame;
+
+// the capture output. add this to an instance of AVCaptureSession
+@property (nonatomic, readonly) AVCaptureOutput *captureOutput;
+
+// delegate is notified of decode results and symbol tracking.
+@property (nonatomic, assign) id<ZBarCaptureDelegate> captureDelegate;
+
+// access to image scanner for configuration.
+@property (nonatomic, readonly) ZBarImageScanner *scanner;
+
+// region of image to scan in normalized coordinates.
+// NB horizontal crop currently ignored...
+@property (nonatomic, assign) CGRect scanCrop;
+
+// size of video frames.
+@property (nonatomic, readonly) CGSize size;
+
+// (quickly) gate the reader function without interrupting the video
+// stream. also flushes the cache when enabled. defaults to *NO*
+@property (nonatomic) BOOL enableReader;
+
+// current frame rate (for debug/optimization).
+// only valid when running
+@property (nonatomic, readonly) CGFloat framesPerSecond;
+
+@property (nonatomic) BOOL enableCache;
+
+@end
View
60 ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------
+// Copyright 2009-2010 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+#import <UIKit/UIKit.h>
+
+@class ZBarHelpController;
+
+@protocol ZBarHelpDelegate
+@optional
+
+- (void) helpControllerDidFinish: (ZBarHelpController*) help;
+
+@end
+
+
+// failure dialog w/a few useful tips
+
+@interface ZBarHelpController : UIViewController
+ < UIWebViewDelegate,
+ UIAlertViewDelegate >
+{
+ NSString *reason;
+ id delegate;
+ UIWebView *webView;
+ UIToolbar *toolbar;
+ UIBarButtonItem *doneBtn, *backBtn, *space;
+ NSURL *linkURL;
+ NSUInteger orientations;
+}
+
+@property (nonatomic, assign) id<ZBarHelpDelegate> delegate;
+
+// designated initializer
+- (id) initWithReason: (NSString*) reason;
+
+- (BOOL) isInterfaceOrientationSupported: (UIInterfaceOrientation) orientation;
+- (void) setInterfaceOrientation: (UIInterfaceOrientation) orientation
+ supported: (BOOL) supported;
+
+@end
View
69 ZBarSDK/Headers/ZBarSDK/ZBarImage.h
@@ -0,0 +1,69 @@
+//------------------------------------------------------------------------
+// Copyright 2009 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+#import <UIKit/UIKit.h>
+#import "zbar.h"
+#import "ZBarSymbol.h"
+
+#ifdef __cplusplus
+using namespace zbar;
+#endif
+
+// Obj-C wrapper for ZBar image
+
+@interface ZBarImage : NSObject
+{
+ zbar_image_t *zimg;
+ double t_convert;
+}
+
+@property (nonatomic) unsigned long format;
+@property (nonatomic) unsigned sequence;
+@property (nonatomic) CGSize size;
+@property (nonatomic) CGRect crop;
+@property (readonly, nonatomic) const void *data;
+@property (readonly, nonatomic) unsigned long dataLength;
+@property (copy, nonatomic) ZBarSymbolSet *symbols;
+@property (readonly, nonatomic) zbar_image_t *zbarImage;
+@property (readonly, nonatomic) UIImage *UIImage;
+
+- (id) initWithImage: (zbar_image_t*) image;
+- (id) initWithCGImage: (CGImageRef) image;
+- (id) initWithCGImage: (CGImageRef) image
+ size: (CGSize) size;
+- (id) initWithCGImage: (CGImageRef) image
+ crop: (CGRect) crop
+ size: (CGSize) size;
+
+- (void) setData: (const void*) data
+ withLength: (unsigned long) length;
+- (UIImage*) UIImageWithOrientation: (UIImageOrientation) imageOrientation;
+- (void) cleanup;
+
++ (unsigned long) fourcc: (NSString*) format;
+
+#if 0
+- convertToFormat: (unsigned long) format;
+#endif
+
+@end
View
51 ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h
@@ -0,0 +1,51 @@
+//------------------------------------------------------------------------
+// Copyright 2009 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+#import "zbar.h"
+#import "ZBarImage.h"
+
+#ifdef __cplusplus
+using namespace zbar;
+#endif
+
+// Obj-C wrapper for ZBar image scanner
+
+@interface ZBarImageScanner : NSObject
+{
+ zbar_image_scanner_t *scanner;
+}
+
+@property (nonatomic) BOOL enableCache;
+@property (readonly, nonatomic) ZBarSymbolSet *results;
+
+// decoder configuration
+- (void) parseConfig: (NSString*) configStr;
+- (void) setSymbology: (zbar_symbol_type_t) symbology
+ config: (zbar_config_t) config
+ to: (int) value;
+
+// image scanning interface
+- (NSInteger) scanImage: (ZBarImage*) image;
+
+@end
View
142 ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h
@@ -0,0 +1,142 @@
+//------------------------------------------------------------------------
+// Copyright 2009-2010 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+#import <UIKit/UIKit.h>
+#import "ZBarImageScanner.h"
+
+#ifdef __cplusplus
+using namespace zbar;
+#endif
+
+typedef enum {
+ // default interface provided by UIImagePickerController - user manually
+ // captures an image by pressing a button
+ ZBarReaderControllerCameraModeDefault = 0,
+
+ // automatically scan by taking screenshots with UIGetScreenImage().
+ // resolution is limited by the screen, so this is inappropriate for
+ // longer codes
+ ZBarReaderControllerCameraModeSampling,
+
+ // automatically scan by rapidly taking pictures with takePicture.
+ // tradeoff resolution with frame rate by adjusting the crop, and size
+ // properties of the reader along with the density configs of the image
+ // scanner
+ ZBarReaderControllerCameraModeSequence,
+
+} ZBarReaderControllerCameraMode;
+
+
+@class ZBarReaderController, ZBarHelpController;
+
+@protocol ZBarReaderDelegate <UIImagePickerControllerDelegate>
+@optional
+
+// called when no barcode is found in an image selected by the user.
+// if retry is NO, the delegate *must* dismiss the controller
+- (void) readerControllerDidFailToRead: (ZBarReaderController*) reader
+ withRetry: (BOOL) retry;
+
+@end
+
+
+@interface ZBarReaderController
+ : UIImagePickerController
+ < UINavigationControllerDelegate,
+ UIImagePickerControllerDelegate >
+{
+ ZBarImageScanner *scanner;
+ ZBarHelpController *help;
+ UIView *overlay, *boxView;
+ CALayer *boxLayer;
+
+ UIToolbar *toolbar;
+ UIBarButtonItem *cancelBtn, *scanBtn, *space[3];
+ UIButton *infoBtn;
+
+ id <ZBarReaderDelegate> readerDelegate;
+ BOOL showsZBarControls, showsHelpOnFail, takesPicture, enableCache;
+ ZBarReaderControllerCameraMode cameraMode;
+ CGRect scanCrop;
+ NSInteger maxScanDimension;
+
+ BOOL hasOverlay, sampling;
+ uint64_t t_frame;
+ double dt_frame;
+
+ ZBarSymbol *symbol;
+}
+
+// access to configure image scanner
+@property (readonly, nonatomic) ZBarImageScanner *scanner;
+
+// barcode result recipient (NB don't use delegate)
+@property (nonatomic, assign) id <ZBarReaderDelegate> readerDelegate;
+
+// whether to use alternate control set
+@property (nonatomic) BOOL showsZBarControls;
+
+// whether to display helpful information when decoding fails
+@property (nonatomic) BOOL showsHelpOnFail;
+
+// how to use the camera (when sourceType == Camera)
+@property (nonatomic) ZBarReaderControllerCameraMode cameraMode;
+
+// whether to outline symbols with the green tracking box.
+@property (nonatomic) BOOL tracksSymbols;
+
+// whether to automatically take a full picture when a barcode is detected
+// (when cameraMode == Sampling)
+@property (nonatomic) BOOL takesPicture;
+
+// whether to use the "cache" for realtime modes (default YES). this can be
+// used to safely disable the inter-frame consistency and duplicate checks,
+// speeding up recognition, iff:
+// 1. the controller is dismissed when a barcode is read and
+// 2. unreliable symbologies are disabled (all EAN/UPC variants and I2/5)
+@property (nonatomic) BOOL enableCache;
+
+// crop images for scanning. the original image will be cropped to this
+// rectangle before scanning. the rectangle is normalized to the image size
+// and aspect ratio; useful values will place the rectangle between 0 and 1
+// on each axis, where the x-axis corresponds to the image major axis.
+// defaults to the full image (0, 0, 1, 1).
+@property (nonatomic) CGRect scanCrop;
+
+// scale image to scan. after cropping, the image will be scaled if
+// necessary, such that neither of its dimensions exceed this value.
+// defaults to 640.
+@property (nonatomic) NSInteger maxScanDimension;
+
+// display the built-in help browser. for use with custom overlays if
+// you don't also want to create your own help view. only send this
+// message when the reader is displayed. the argument will be passed
+// to the onZBarHelp() javascript function.
+- (void) showHelpWithReason: (NSString*) reason;
+
+// direct scanner interface - scan UIImage and return something enumerable
+- (id <NSFastEnumeration>) scanImage: (CGImageRef) image;
+
+@end
+
+extern NSString* const ZBarReaderControllerResults;
View
135 ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h
@@ -0,0 +1,135 @@
+//------------------------------------------------------------------------
+// Copyright 2010 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+#import <UIKit/UIKit.h>
+#import "ZBarImageScanner.h"
+
+@class AVCaptureSession, AVCaptureDevice;
+@class CALayer;
+@class ZBarImageScanner, ZBarCaptureReader, ZBarReaderView;
+
+// delegate is notified of decode results.
+
+@protocol ZBarReaderViewDelegate < NSObject >
+
+- (void) readerView: (ZBarReaderView*) readerView
+ didReadSymbols: (ZBarSymbolSet*) symbols
+ fromImage: (UIImage*) image;
+
+@end
+
+// read barcodes from the displayed video preview. the view maintains
+// a complete video capture session feeding a ZBarCaptureReader and
+// presents the associated preview with symbol tracking annotations.
+
+@interface ZBarReaderView
+ : UIView
+{
+ id<ZBarReaderViewDelegate> readerDelegate;
+ ZBarCaptureReader *captureReader;
+ CGRect scanCrop, effectiveCrop;
+ CGAffineTransform previewTransform;
+ CGFloat zoom, zoom0, maxZoom;
+ UIColor *trackingColor;
+ BOOL tracksSymbols, showsFPS;
+ NSInteger torchMode;
+ UIInterfaceOrientation interfaceOrientation;
+ NSTimeInterval animationDuration;
+
+ CALayer *preview, *overlay, *tracking, *cropLayer;
+ UIView *fpsView;
+ UILabel *fpsLabel;
+ UIPinchGestureRecognizer *pinch;
+ CGFloat imageScale;
+ CGSize imageSize;
+ BOOL started, running;
+}
+
+// supply a pre-configured image scanner.
+- (id) initWithImageScanner: (ZBarImageScanner*) imageScanner;
+
+// start the video stream and barcode reader.
+- (void) start;
+
+// stop the video stream and barcode reader.
+- (void) stop;
+
+// clear the internal result cache
+- (void) flushCache;
+
+// compensate for device/camera/interface orientation
+- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) orient
+ duration: (NSTimeInterval) duration;
+
+// delegate is notified of decode results.
+@property (nonatomic, assign) id<ZBarReaderViewDelegate> readerDelegate;
+
+// access to image scanner for configuration.
+@property (nonatomic, readonly) ZBarImageScanner *scanner;
+
+// whether to display the tracking annotation for uncertain barcodes
+// (default YES).
+@property (nonatomic) BOOL tracksSymbols;
+
+// color of the tracking box (default green)
+@property (nonatomic, retain) UIColor *trackingColor;
+
+// enable pinch gesture recognition for zooming the preview/decode
+// (default YES).
+@property (nonatomic) BOOL allowsPinchZoom;
+
+// torch mode to set automatically (default Auto).
+@property (nonatomic) NSInteger torchMode;
+
+// whether to display the frame rate for debug/configuration
+// (default NO).
+@property (nonatomic) BOOL showsFPS;
+
+// zoom scale factor applied to video preview *and* scanCrop.
+// also updated by pinch-zoom gesture. clipped to range [1,maxZoom],
+// defaults to 1.25
+@property (nonatomic) CGFloat zoom;
+- (void) setZoom: (CGFloat) zoom
+ animated: (BOOL) animated;
+
+// maximum settable zoom factor.
+@property (nonatomic) CGFloat maxZoom;
+
+// the region of the image that will be scanned. normalized coordinates.
+@property (nonatomic) CGRect scanCrop;
+
+// additional transform applied to video preview.
+// (NB *not* applied to scan crop)
+@property (nonatomic) CGAffineTransform previewTransform;
+
+// specify an alternate capture device.
+@property (nonatomic, retain) AVCaptureDevice *device;
+
+// direct access to the capture session. warranty void if opened...
+@property (nonatomic, readonly) AVCaptureSession *session;
+@property (nonatomic, readonly) ZBarCaptureReader *captureReader;
+
+// this flag still works, but its use is deprecated
+@property (nonatomic) BOOL enableCache;
+
+@end
View
130 ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h
@@ -0,0 +1,130 @@
+//------------------------------------------------------------------------
+// Copyright 2010 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+#import <UIKit/UIKit.h>
+#import "ZBarReaderController.h"
+
+// orientation set support
+#define ZBarOrientationMask(orient) (1 << orient)
+#define ZBarOrientationMaskAll \
+ (ZBarOrientationMask(UIInterfaceOrientationPortrait) | \
+ ZBarOrientationMask(UIInterfaceOrientationPortraitUpsideDown) | \
+ ZBarOrientationMask(UIInterfaceOrientationLandscapeLeft) | \
+ ZBarOrientationMask(UIInterfaceOrientationLandscapeRight))
+
+@class ZBarReaderView, ZBarCameraSimulator;
+
+// drop in video scanning replacement for ZBarReaderController.
+// this is a thin controller around a ZBarReaderView that adds the UI
+// controls and select functionality offered by ZBarReaderController.
+// Automatically falls back to a ZBarReaderController if video APIs
+// are unavailable (eg for OS < 4.0)
+
+@interface ZBarReaderViewController
+ : UIViewController
+{
+ ZBarImageScanner *scanner;
+ id <ZBarReaderDelegate> readerDelegate;
+ ZBarReaderView *readerView;
+ UIView *cameraOverlayView;
+ CGAffineTransform cameraViewTransform;
+ CGRect scanCrop;
+ NSUInteger supportedOrientationsMask;
+ UIImagePickerControllerCameraDevice cameraDevice;
+ UIImagePickerControllerCameraFlashMode cameraFlashMode;
+ UIImagePickerControllerQualityType videoQuality;
+ BOOL showsZBarControls, tracksSymbols, enableCache;
+
+ ZBarHelpController *helpController;
+ UIView *controls;
+ BOOL didHideStatusBar, rotating;
+ ZBarCameraSimulator *cameraSim;
+}
+
+// access to configure image scanner
+@property (nonatomic, readonly) ZBarImageScanner *scanner;
+
+// barcode result recipient
+@property (nonatomic, assign) id <ZBarReaderDelegate> readerDelegate;
+
+// whether to use alternate control set
+@property (nonatomic) BOOL showsZBarControls;
+
+// whether to show the green tracking box. note that, even when
+// enabled, the box will only be visible when scanning EAN and I2/5.
+@property (nonatomic) BOOL tracksSymbols;
+
+// interface orientation support. bit-mask of accepted orientations.
+// see eg ZBarOrientationMask() and ZBarOrientationMaskAll
+@property (nonatomic) NSUInteger supportedOrientationsMask;
+
+// crop images for scanning. the image will be cropped to this
+// rectangle before scanning. the rectangle is normalized to the
+// image size and aspect ratio; useful values will place the rectangle
+// between 0 and 1 on each axis, where the x-axis corresponds to the
+// image major axis. defaults to the full image (0, 0, 1, 1).
+@property (nonatomic) CGRect scanCrop;
+
+// provide a custom overlay. note that this can be used with
+// showsZBarControls enabled (but not if you want backward compatibility)
+@property (nonatomic, retain) UIView *cameraOverlayView;
+
+// transform applied to the preview image.
+@property (nonatomic) CGAffineTransform cameraViewTransform;
+
+// display the built-in help browser. the argument will be passed to
+// the onZBarHelp() javascript function.
+- (void) showHelpWithReason: (NSString*) reason;
+
+// capture the next frame and send it over the usual delegate path.
+- (void) takePicture;
+
+// these attempt to emulate UIImagePickerController
++ (BOOL) isCameraDeviceAvailable: (UIImagePickerControllerCameraDevice) cameraDevice;
++ (BOOL) isFlashAvailableForCameraDevice: (UIImagePickerControllerCameraDevice) cameraDevice;
++ (NSArray*) availableCaptureModesForCameraDevice: (UIImagePickerControllerCameraDevice) cameraDevice;
+@property(nonatomic) UIImagePickerControllerCameraDevice cameraDevice;
+@property(nonatomic) UIImagePickerControllerCameraFlashMode cameraFlashMode;
+@property(nonatomic) UIImagePickerControllerCameraCaptureMode cameraCaptureMode;
+@property(nonatomic) UIImagePickerControllerQualityType videoQuality;
+
+// direct access to the ZBarReaderView
+@property (nonatomic, readonly) ZBarReaderView *readerView;
+
+// this flag still works, but its use is deprecated
+@property (nonatomic) BOOL enableCache;
+
+// these are present only for backward compatibility.
+// they will error if inappropriate/unsupported values are set
+@property (nonatomic) UIImagePickerControllerSourceType sourceType; // Camera
+@property (nonatomic) BOOL allowsEditing; // NO
+@property (nonatomic) BOOL allowsImageEditing; // NO
+@property (nonatomic) BOOL showsCameraControls; // NO
+@property (nonatomic) BOOL showsHelpOnFail; // ignored
+@property (nonatomic) ZBarReaderControllerCameraMode cameraMode; // Sampling
+@property (nonatomic) BOOL takesPicture; // NO
+@property (nonatomic) NSInteger maxScanDimension; // ignored
+
++ (BOOL) isSourceTypeAvailable: (UIImagePickerControllerSourceType) sourceType;
+
+@end
View
34 ZBarSDK/Headers/ZBarSDK/ZBarSDK.h
@@ -0,0 +1,34 @@
+/*------------------------------------------------------------------------
+ * Copyright 2010 (c) Jeff Brown <spadix@users.sourceforge.net>
+ *
+ * This file is part of the ZBar Bar Code Reader.
+ *
+ * The ZBar Bar Code Reader is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * The ZBar Bar Code Reader is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with the ZBar Bar Code Reader; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ *
+ * http://sourceforge.net/projects/zbar
+ *------------------------------------------------------------------------*/
+
+#import "zbar.h"
+
+#import "ZBarSymbol.h"
+#import "ZBarImage.h"
+#import "ZBarImageScanner.h"
+#import "ZBarReaderView.h"
+#import "ZBarReaderViewController.h"
+#import "ZBarReaderController.h"
+#import "ZBarCaptureReader.h"
+#import "ZBarHelpController.h"
+#import "ZBarCameraSimulator.h"
View
71 ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------
+// Copyright 2009-2010 (c) Jeff Brown <spadix@users.sourceforge.net>
+//
+// This file is part of the ZBar Bar Code Reader.
+//
+// The ZBar Bar Code Reader is free software; you can redistribute it
+// and/or modify it under the terms of the GNU Lesser Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// The ZBar Bar Code Reader is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser Public License for more details.
+//
+// You should have received a copy of the GNU Lesser Public License
+// along with the ZBar Bar Code Reader; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+// Boston, MA 02110-1301 USA
+//
+// http://sourceforge.net/projects/zbar
+//------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+#import <CoreGraphics/CoreGraphics.h>
+#import "zbar.h"
+
+#ifdef __cplusplus
+using namespace zbar;
+#endif
+
+// Obj-C wrapper for ZBar result types
+
+@interface ZBarSymbolSet
+ : NSObject <NSFastEnumeration>
+{
+ const zbar_symbol_set_t *set;
+ BOOL filterSymbols;
+}
+
+@property (readonly, nonatomic) int count;
+@property (readonly, nonatomic) const zbar_symbol_set_t *zbarSymbolSet;
+@property (nonatomic) BOOL filterSymbols;
+
+- (id) initWithSymbolSet: (const zbar_symbol_set_t*) set;
+
+@end
+
+
+@interface ZBarSymbol : NSObject
+{
+ const zbar_symbol_t *symbol;
+}
+
+@property (readonly, nonatomic) zbar_symbol_type_t type;
+@property (readonly, nonatomic) NSString *typeName;
+@property (readonly, nonatomic) NSUInteger configMask;
+@property (readonly, nonatomic) NSUInteger modifierMask;
+@property (readonly, nonatomic) NSString *data;
+@property (readonly, nonatomic) int quality;
+@property (readonly, nonatomic) int count;
+@property (readonly, nonatomic) zbar_orientation_t orientation;
+@property (readonly, nonatomic) ZBarSymbolSet *components;
+@property (readonly, nonatomic) const zbar_symbol_t *zbarSymbol;
+@property (readonly, nonatomic) CGRect bounds;
+
+- (id) initWithSymbol: (const zbar_symbol_t*) symbol;
+
++ (NSString*) nameForType: (zbar_symbol_type_t) type;
+
+@end
View
1,497 ZBarSDK/Headers/ZBarSDK/zbar.h
@@ -0,0 +1,1497 @@
+/*------------------------------------------------------------------------
+ * Copyright 2007-2010 (c) Jeff Brown <spadix@users.sourceforge.net>
+ *
+ * This file is part of the ZBar Bar Code Reader.
+ *
+ * The ZBar Bar Code Reader is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * The ZBar Bar Code Reader is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with the ZBar Bar Code Reader; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ *
+ * http://sourceforge.net/projects/zbar
+ *------------------------------------------------------------------------*/
+#ifndef _ZBAR_H_
+#define _ZBAR_H_
+
+/** @file
+ * ZBar Barcode Reader C API definition
+ */
+
+/** @mainpage
+ *
+ * interface to the barcode reader is available at several levels.
+ * most applications will want to use the high-level interfaces:
+ *
+ * @section high-level High-Level Interfaces
+ *
+ * these interfaces wrap all library functionality into an easy-to-use
+ * package for a specific toolkit:
+ * - the "GTK+ 2.x widget" may be used with GTK GUI applications. a
+ * Python wrapper is included for PyGtk
+ * - the @ref zbar::QZBar "Qt4 widget" may be used with Qt GUI
+ * applications
+ * - the Processor interface (in @ref c-processor "C" or @ref
+ * zbar::Processor "C++") adds a scanning window to an application
+ * with no GUI.
+ *
+ * @section mid-level Intermediate Interfaces
+ *
+ * building blocks used to construct high-level interfaces:
+ * - the ImageScanner (in @ref c-imagescanner "C" or @ref
+ * zbar::ImageScanner "C++") looks for barcodes in a library defined
+ * image object
+ * - the Window abstraction (in @ref c-window "C" or @ref
+ * zbar::Window "C++") sinks library images, displaying them on the
+ * platform display
+ * - the Video abstraction (in @ref c-video "C" or @ref zbar::Video
+ * "C++") sources library images from a video device
+ *
+ * @section low-level Low-Level Interfaces
+ *
+ * direct interaction with barcode scanning and decoding:
+ * - the Scanner (in @ref c-scanner "C" or @ref zbar::Scanner "C++")
+ * looks for barcodes in a linear intensity sample stream
+ * - the Decoder (in @ref c-decoder "C" or @ref zbar::Decoder "C++")
+ * extracts barcodes from a stream of bar and space widths
+ */
+
+#ifdef __cplusplus
+
+/** C++ namespace for library interfaces */
+namespace zbar {
+ extern "C" {
+#endif
+
+
+/** @name Global library interfaces */
+/*@{*/
+
+/** "color" of element: bar or space. */
+typedef enum zbar_color_e {
+ ZBAR_SPACE = 0, /**< light area or space between bars */
+ ZBAR_BAR = 1, /**< dark area or colored bar segment */
+} zbar_color_t;
+
+/** decoded symbol type. */
+typedef enum zbar_symbol_type_e {
+ ZBAR_NONE = 0, /**< no symbol decoded */
+ ZBAR_PARTIAL = 1, /**< intermediate status */
+ ZBAR_EAN2 = 2, /**< GS1 2-digit add-on */
+ ZBAR_EAN5 = 5, /**< GS1 5-digit add-on */
+ ZBAR_EAN8 = 8, /**< EAN-8 */
+ ZBAR_UPCE = 9, /**< UPC-E */
+ ZBAR_ISBN10 = 10, /**< ISBN-10 (from EAN-13). @since 0.4 */
+ ZBAR_UPCA = 12, /**< UPC-A */
+ ZBAR_EAN13 = 13, /**< EAN-13 */
+ ZBAR_ISBN13 = 14, /**< ISBN-13 (from EAN-13). @since 0.4 */
+ ZBAR_COMPOSITE = 15, /**< EAN/UPC composite */
+ ZBAR_I25 = 25, /**< Interleaved 2 of 5. @since 0.4 */
+ ZBAR_DATABAR = 34, /**< GS1 DataBar (RSS). @since 0.11 */
+ ZBAR_DATABAR_EXP = 35, /**< GS1 DataBar Expanded. @since 0.11 */
+ ZBAR_CODE39 = 39, /**< Code 39. @since 0.4 */
+ ZBAR_PDF417 = 57, /**< PDF417. @since 0.6 */
+ ZBAR_QRCODE = 64, /**< QR Code. @since 0.10 */
+ ZBAR_CODE93 = 93, /**< Code 93. @since 0.11 */
+ ZBAR_CODE128 = 128, /**< Code 128 */
+
+ /** mask for base symbol type.
+ * @deprecated in 0.11, remove this from existing code
+ */
+ ZBAR_SYMBOL = 0x00ff,
+ /** 2-digit add-on flag.
+ * @deprecated in 0.11, a ::ZBAR_EAN2 component is used for
+ * 2-digit GS1 add-ons
+ */
+ ZBAR_ADDON2 = 0x0200,
+ /** 5-digit add-on flag.
+ * @deprecated in 0.11, a ::ZBAR_EAN5 component is used for
+ * 5-digit GS1 add-ons
+ */
+ ZBAR_ADDON5 = 0x0500,
+ /** add-on flag mask.
+ * @deprecated in 0.11, GS1 add-ons are represented using composite
+ * symbols of type ::ZBAR_COMPOSITE; add-on components use ::ZBAR_EAN2
+ * or ::ZBAR_EAN5
+ */
+ ZBAR_ADDON = 0x0700,
+} zbar_symbol_type_t;
+
+/** decoded symbol coarse orientation.
+ * @since 0.11
+ */
+typedef enum zbar_orientation_e {
+ ZBAR_ORIENT_UNKNOWN = -1, /**< unable to determine orientation */
+ ZBAR_ORIENT_UP, /**< upright, read left to right */
+ ZBAR_ORIENT_RIGHT, /**< sideways, read top to bottom */
+ ZBAR_ORIENT_DOWN, /**< upside-down, read right to left */
+ ZBAR_ORIENT_LEFT, /**< sideways, read bottom to top */
+} zbar_orientation_t;
+
+/** error codes. */
+typedef enum zbar_error_e {