rhodes 2.4.1 → 3.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/Rakefile +7 -36
- data/doc/build.txt +48 -22
- data/doc/device-caps.txt +130 -1
- data/doc/rhom.txt +9 -3
- data/doc/test-log-debug.txt +5 -2
- data/lib/extensions/barcode/ext/barcode/platform/android/Rakefile +40 -20
- data/lib/extensions/barcode/ext/barcode/platform/android/ZXing_Info/AUTHORS +58 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/ZXing_Info/CHANGES +266 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/ZXing_Info/COPYING +201 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/ZXing_Info/README +11 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/ext_build.files +173 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/barcode.cpp +34 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/BarcodeFormat.java +103 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/Binarizer.java +80 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/BinaryBitmap.java +128 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ChecksumException.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/DecodeHintType.java +79 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/EncodeHintType.java +39 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/FormatException.java +38 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/LuminanceSource.java +113 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/MultiFormatReader.java +166 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/MultiFormatWriter.java +65 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/NotFoundException.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/Reader.java +64 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ReaderException.java +98 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/Result.java +143 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ResultMetadataType.java +109 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ResultPoint.java +127 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ResultPointCallback.java +29 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/Writer.java +54 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/WriterException.java +35 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/AbstractDoCoMoResultParser.java +39 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/AddressBookAUResultParser.java +73 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/AddressBookDoCoMoResultParser.java +85 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/AddressBookParsedResult.java +122 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/BizcardResultParser.java +94 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/BookmarkDoCoMoResultParser.java +46 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/CalendarParsedResult.java +134 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/EmailAddressParsedResult.java +61 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/EmailAddressResultParser.java +64 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/EmailDoCoMoResultParser.java +87 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ExpandedProductParsedResult.java +195 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ExpandedProductResultParser.java +199 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/GeoParsedResult.java +132 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/GeoResultParser.java +77 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ISBNParsedResult.java +39 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ISBNResultParser.java +54 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ParsedResult.java +73 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ParsedResultType.java +53 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ProductParsedResult.java +49 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ProductResultParser.java +66 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ResultParser.java +319 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/SMSMMSResultParser.java +107 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/SMSParsedResult.java +104 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/SMSTOMMSTOResultParser.java +57 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/TelParsedResult.java +54 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/TelResultParser.java +44 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/TextParsedResult.java +48 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/URIParsedResult.java +113 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/URIResultParser.java +87 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/URLTOResultParser.java +47 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/VCardResultParser.java +346 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/VEventResultParser.java +54 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/WifiParsedResult.java +53 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/WifiResultParser.java +50 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/AbstractNDEFResultParser.java +45 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFRecord.java +87 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFSmartPosterParsedResult.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFSmartPosterResultParser.java +81 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFTextResultParser.java +57 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFURIResultParser.java +95 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/BitArray.java +247 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/BitMatrix.java +226 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/BitSource.java +97 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/CharacterSetECI.java +110 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/Collections.java +53 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/Comparator.java +27 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/DecoderResult.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/DefaultGridSampler.java +81 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/DetectorResult.java +46 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/ECI.java +52 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/GlobalHistogramBinarizer.java +196 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/GridSampler.java +171 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/HybridBinarizer.java +185 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/PerspectiveTransform.java +148 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/StringUtils.java +191 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/detector/MonochromeRectangleDetector.java +209 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/detector/WhiteRectangleDetector.java +316 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/GF256.java +139 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/GF256Poly.java +263 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/ReedSolomonDecoder.java +194 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java +75 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/ReedSolomonException.java +31 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/DataMatrixReader.java +161 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java +446 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/DataBlock.java +118 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java +462 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/Decoder.java +134 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/Version.java +242 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/detector/Detector.java +348 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/ByQuadrantReader.java +96 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/GenericMultipleBarcodeReader.java +156 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/MultipleBarcodeReader.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/qrcode/QRCodeMultiReader.java +80 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/qrcode/detector/MultiDetector.java +72 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/qrcode/detector/MultiFinderPatternFinder.java +324 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/CodaBarReader.java +263 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code128Reader.java +473 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code128Writer.java +73 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code39Reader.java +333 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code39Writer.java +82 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code93Reader.java +273 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EAN13Reader.java +135 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EAN13Writer.java +81 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EAN8Reader.java +72 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EAN8Writer.java +76 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EANManufacturerOrgSupport.java +170 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/ITFReader.java +348 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/ITFWriter.java +68 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/MultiFormatOneDReader.java +109 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/MultiFormatUPCEANReader.java +113 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/OneDReader.java +297 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCAReader.java +75 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCEANExtensionSupport.java +186 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCEANReader.java +355 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCEANWriter.java +104 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCEReader.java +153 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/AbstractRSSReader.java +110 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/DataCharacter.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/FinderPattern.java +48 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/Pair.java +41 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/RSS14Reader.java +494 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/RSSUtils.java +155 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/BitArrayBuilder.java +85 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/ExpandedPair.java +68 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/RSSExpandedReader.java +578 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI013103decoder.java +47 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01320xDecoder.java +55 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01392xDecoder.java +66 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01393xDecoder.java +76 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI013x0x1xDecoder.java +106 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI013x0xDecoder.java +56 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01AndOtherAIs.java +56 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01decoder.java +81 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01weightDecoder.java +58 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AbstractExpandedDecoder.java +85 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AnyAIDecoder.java +48 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/BlockParsedResult.java +60 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/CurrentParsingState.java +69 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/DecodedChar.java +52 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/DecodedInformation.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/DecodedNumeric.java +79 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/DecodedObject.java +44 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/FieldParser.java +285 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/GeneralAppIdDecoder.java +414 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/PDF417Reader.java +79 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java +1163 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/decoder/DecodedBitStreamParser.java +629 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/decoder/Decoder.java +150 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/detector/Detector.java +498 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/QRCodeReader.java +166 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/QRCodeWriter.java +108 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java +203 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/DataBlock.java +123 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/DataMask.java +155 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java +261 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/Decoder.java +148 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java +86 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/FormatInformation.java +171 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/Mode.java +112 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/Version.java +586 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/AlignmentPattern.java +48 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java +279 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/Detector.java +400 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/FinderPattern.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java +585 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/FinderPatternInfo.java +49 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/BlockPair.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/ByteMatrix.java +97 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/Encoder.java +557 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/MaskUtil.java +217 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/MatrixUtil.java +524 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/QRCode.java +239 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/Barcode.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/RhoLuminanceSource.java +75 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +74 -318
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +70 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/COPYING +27 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h +105 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h +60 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarImage.h +69 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h +51 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h +142 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h +118 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h +100 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h +33 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h +71 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar.h +1476 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h +201 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Exception.h +187 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Image.h +321 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h +130 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Processor.h +223 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h +162 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h +529 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Video.h +170 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Window.h +136 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/LICENSE +504 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/README +59 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-back.png +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-help.html +88 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-helpicons.png +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-samples.png +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/libzbar.a +0 -0
- data/lib/extensions/debugger/debugger.rb +215 -67
- data/lib/extensions/nfc/ext/nfc/platform/android/AndroidManifest.xml +1 -1
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/nfc/Nfc.java +14 -2
- data/lib/extensions/timeout/timeout.rb +114 -0
- data/lib/framework/rho/render.rb +14 -16
- data/lib/framework/rho/rho.rb +38 -14
- data/lib/framework/rho/rhoapplication.rb +1 -1
- data/lib/framework/rho/rhocontroller.rb +3 -3
- data/lib/framework/rho/rhofsconnector.rb +18 -6
- data/lib/framework/rho/rhoviewhelpers.rb +1 -1
- data/lib/framework/rhoappmanifest.rb +44 -0
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rhoframework.rb +31 -11
- data/lib/framework/rholang/localization_simplified.rb +10 -6
- data/lib/framework/rhom/rhom_object_factory.rb +3 -3
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml +2 -2
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesApplication.h +32 -8
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +21 -21
- data/platform/android/Rhodes/jni/src/rhocryptimpl.cpp +1 -0
- data/platform/android/Rhodes/jni/src/rhodes.cpp +21 -9
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +7 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +19 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +24 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +39 -47
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +113 -106
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/StatusNotification.java +49 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +5 -1
- data/platform/android/build/RhodesSRC_build.files +1 -0
- data/platform/android/build/android.rake +93 -6
- data/platform/bb/RubyVM/src/com/rho/RhodesApp.java +5 -4
- data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +10 -0
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +16 -15
- data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +2 -2
- data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +21 -19
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +2 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +6 -1
- data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +10 -3
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +21 -1
- data/platform/iphone/Classes/SimpleMainView.m +5 -5
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/rbuild/iphone.rake +30 -1
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +12 -0
- data/platform/shared/SyncClient/SyncClient.cpp +136 -20
- data/platform/shared/SyncClient/SyncClient.h +17 -0
- data/platform/shared/common/AppMenu.cpp +6 -1
- data/platform/shared/common/RhoConf.cpp +13 -1
- data/platform/shared/common/RhoConf.h +3 -1
- data/platform/shared/common/RhoDefs.h +10 -0
- data/platform/shared/common/RhoFile.cpp +15 -0
- data/platform/shared/common/RhoFile.h +1 -0
- data/platform/shared/common/RhodesApp.cpp +16 -3
- data/platform/shared/common/RhodesApp.h +1 -0
- data/platform/shared/common/RhodesAppBase.cpp +102 -62
- data/platform/shared/common/RhodesAppBase.h +7 -1
- data/platform/shared/curl/lib/rhossl.c +1 -0
- data/platform/shared/db/DBAdapter.cpp +14 -2
- data/platform/shared/logging/RhoLogConf.cpp +21 -0
- data/platform/shared/logging/RhoLogConf.h +11 -0
- data/platform/shared/logging/RhoLogSink.cpp +24 -0
- data/platform/shared/logging/RhoLogSink.h +20 -1
- data/platform/shared/net/HttpServer.cpp +8 -6
- data/platform/shared/net/RawSocket.cpp +130 -0
- data/platform/shared/net/RawSocket.h +74 -0
- data/platform/shared/ruby/ext/rho/rhoruby.c +37 -1
- data/platform/shared/ruby/ext/rho/rhosupport.c +74 -21
- data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +9 -1
- data/platform/shared/ruby/vm_eval.c +4 -3
- data/platform/shared/sync/SyncEngine.cpp +11 -12
- data/platform/shared/sync/SyncEngine.h +2 -2
- data/platform/shared/sync/SyncNotify.cpp +41 -13
- data/platform/shared/sync/SyncNotify.h +20 -3
- data/platform/shared/sync/SyncSource.cpp +21 -19
- data/platform/shared/sync/SyncThread.cpp +11 -1
- data/platform/shared/sync/SyncThread.h +3 -0
- data/platform/shared/test/test_helper.cpp +7 -0
- data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
- data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
- data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
- data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
- data/platform/win32/RhoSimulator/rhosimulator.exe +0 -0
- data/platform/wm/RhoLib/RhoLib.vcproj +762 -14
- data/platform/wm/build/wm.rake +87 -10
- data/platform/wm/rhodes.sln +155 -72
- data/platform/wm/rhodes/MainWindow.cpp +5 -2
- data/platform/wm/rhodes/MainWindow.h +9 -1
- data/platform/wm/rhodes/RhoNativeViewManager.cpp +4 -0
- data/platform/wm/rhodes/Rhodes.cpp +60 -6
- data/platform/wm/rhodes/emulator/ExternalWebView.cpp +20 -0
- data/platform/wm/rhodes/emulator/ExternalWebView.h +23 -0
- data/platform/wm/rhodes/emulator/ExternalWebView.ui +46 -0
- data/platform/wm/rhodes/emulator/MainWindowCallback.h +18 -0
- data/platform/wm/rhodes/emulator/MainWindowProxy.cpp +268 -0
- data/platform/wm/rhodes/emulator/MainWindowProxy.h +34 -0
- data/platform/wm/rhodes/emulator/MainWindowQt.cpp +345 -0
- data/platform/wm/rhodes/emulator/MainWindowQt.h +118 -0
- data/platform/wm/rhodes/emulator/NativeToolbarQt.cpp +57 -0
- data/platform/wm/rhodes/emulator/NativeToolbarQt.h +52 -0
- data/platform/wm/rhodes/emulator/QtMainWindow.cpp +219 -0
- data/platform/wm/rhodes/emulator/QtMainWindow.h +62 -0
- data/platform/wm/rhodes/emulator/QtMainWindow.ui +122 -0
- data/platform/wm/rhodes/{RhoCryptImpl.cpp → rho/common/RhoCryptImpl.cpp} +0 -0
- data/platform/wm/rhodes/{RhoCryptImpl.h → rho/common/RhoCryptImpl.h} +0 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +2 -86
- data/platform/wm/rhodes/rho/rubyext/NativeToolbarExt.cpp +87 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbarExt.h +6 -0
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +60 -0
- data/platform/wm/rhodes/rhodes.vcproj +4025 -365
- data/platform/wm/rhodes/signature/Signature.cpp +29 -13
- data/platform/wm/rubylib/rubylib.vcproj +1167 -195
- data/platform/wm/shttpd/shttpd.vcproj +4 -4
- data/platform/wm/sqlite3/sqlite3.vcproj +441 -13
- data/platform/wm/syncengine/syncengine.vcproj +443 -15
- data/platform/wm/tcmalloc/tcmalloc.vcproj +0 -154
- data/platform/wm/tools/detool/LogServer.cpp +150 -0
- data/platform/wm/tools/detool/LogServer.h +23 -0
- data/platform/wm/tools/detool/detool.cpp +42 -4
- data/platform/wm/tools/detool/detool.vcproj +10 -1
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/IronRuby.Libraries.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/IronRuby.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/Microsoft.Dynamic.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/Microsoft.Scripting.Core.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/Microsoft.Scripting.dll +0 -0
- data/platform/wp7/RhoAppRunner/Program.cs +20 -3
- data/platform/wp7/RhoLogServer/Program.cs +22 -0
- data/platform/wp7/RhoLogServer/Properties/AssemblyInfo.cs +36 -0
- data/platform/wp7/RhoLogServer/RhoLogServer.csproj +65 -0
- data/platform/wp7/RhoLogServer/SocketServer.cs +210 -0
- data/platform/wp7/RhoRubyExtGen/RhoAsyncHttp.cs +6 -0
- data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +3 -2
- data/platform/wp7/RhoRubyLib/RhoRuby.cs +82 -0
- data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +7 -5
- data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +1 -1
- data/platform/wp7/RhoRubyLib/common/RhoParams.cs +1 -1
- data/platform/wp7/RhoRubyLib/common/ThreadQueue.cs +4 -1
- data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +2 -2
- data/platform/wp7/RhoRubyLib/logging/IRhoLogSink.cs +1 -1
- data/platform/wp7/RhoRubyLib/logging/RhoEmptyLogger.cs +30 -0
- data/platform/wp7/RhoRubyLib/logging/RhoLogConf.cs +10 -0
- data/platform/wp7/RhoRubyLib/logging/RhoLogFileSink.cs +6 -1
- data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +56 -0
- data/platform/wp7/RhoRubyLib/logging/RhoLogger.cs +24 -11
- data/platform/wp7/RhoRubyLib/net/AsyncHttp.cs +57 -14
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +32 -9
- data/platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs +7 -0
- data/platform/wp7/RhoRubyLib/rubyext/RhoKernelOps.cs +6 -0
- data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +20 -16
- data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +2 -2
- data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +138 -40
- data/platform/wp7/WPApplication/rho/apps/app/layout.erb +3 -1
- data/platform/wp7/build/wp.rake +151 -12
- data/platform/wp7/rhodes.sln +10 -0
- data/platform/wp7/rhodes/App.xaml.cs +6 -0
- data/platform/wp7/rhodes/MainPage.xaml +3 -0
- data/platform/wp7/rhodes/MainPage.xaml.cs +19 -0
- data/platform/wp7/rhodes/Rhodes.csproj +4 -2
- data/rakefile.rb +7 -36
- data/res/build-tools/RhoAppRunner.exe +0 -0
- data/res/build-tools/RhoLogServer.exe +0 -0
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/wp7explorer.exe +0 -0
- data/res/generators/templates/application/app/layout.erb +3 -1
- data/res/generators/templates/application/public/jqtouch/jqtouch.js +1 -1
- data/rhodes.gemspec +1 -1
- data/spec/framework_spec/app/layout.erb +1 -1
- data/spec/framework_spec/build.yml +1 -0
- data/spec/perfomance_spec/app/layout.erb +3 -0
- data/spec/phone_spec/app/Account_s/account_s.rb +4 -1
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +30 -1
- data/spec/phone_spec/app/spec_runner.rb +1 -1
- data/spec/phone_spec/build.yml +4 -1
- metadata +262 -10
- data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Builtins/ConsoleStream.cs +0 -107
data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
//------------------------------------------------------------------------
|
2
|
+
// Copyright 2007-2010 (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
|
+
#ifndef _ZBAR_DECODER_H_
|
24
|
+
#define _ZBAR_DECODER_H_
|
25
|
+
|
26
|
+
/// @file
|
27
|
+
/// Decoder C++ wrapper
|
28
|
+
|
29
|
+
#ifndef _ZBAR_H_
|
30
|
+
# error "include zbar.h in your application, **not** zbar/Decoder.h"
|
31
|
+
#endif
|
32
|
+
|
33
|
+
#include <string>
|
34
|
+
|
35
|
+
namespace zbar {
|
36
|
+
|
37
|
+
/// low-level bar width stream decoder interface.
|
38
|
+
/// identifies symbols and extracts encoded data
|
39
|
+
|
40
|
+
class Decoder {
|
41
|
+
public:
|
42
|
+
|
43
|
+
/// Decoder result handler.
|
44
|
+
/// applications should subtype this and pass an instance to
|
45
|
+
/// set_handler() to implement result processing
|
46
|
+
class Handler {
|
47
|
+
public:
|
48
|
+
virtual ~Handler() { }
|
49
|
+
|
50
|
+
/// invoked by the Decoder as decode results become available.
|
51
|
+
virtual void decode_callback(Decoder &decoder) = 0;
|
52
|
+
};
|
53
|
+
|
54
|
+
/// constructor.
|
55
|
+
Decoder ()
|
56
|
+
: _handler(NULL)
|
57
|
+
{
|
58
|
+
_decoder = zbar_decoder_create();
|
59
|
+
}
|
60
|
+
|
61
|
+
~Decoder ()
|
62
|
+
{
|
63
|
+
zbar_decoder_destroy(_decoder);
|
64
|
+
}
|
65
|
+
|
66
|
+
/// clear all decoder state.
|
67
|
+
/// see zbar_decoder_reset()
|
68
|
+
void reset ()
|
69
|
+
{
|
70
|
+
zbar_decoder_reset(_decoder);
|
71
|
+
}
|
72
|
+
|
73
|
+
/// mark start of a new scan pass.
|
74
|
+
/// see zbar_decoder_new_scan()
|
75
|
+
void new_scan ()
|
76
|
+
{
|
77
|
+
zbar_decoder_new_scan(_decoder);
|
78
|
+
}
|
79
|
+
|
80
|
+
/// process next bar/space width from input stream.
|
81
|
+
/// see zbar_decode_width()
|
82
|
+
zbar_symbol_type_t decode_width (unsigned width)
|
83
|
+
{
|
84
|
+
return(zbar_decode_width(_decoder, width));
|
85
|
+
}
|
86
|
+
|
87
|
+
/// process next bar/space width from input stream.
|
88
|
+
/// see zbar_decode_width()
|
89
|
+
Decoder& operator<< (unsigned width)
|
90
|
+
{
|
91
|
+
zbar_decode_width(_decoder, width);
|
92
|
+
return(*this);
|
93
|
+
}
|
94
|
+
|
95
|
+
/// retrieve color of @em next element passed to Decoder.
|
96
|
+
/// see zbar_decoder_get_color()
|
97
|
+
zbar_color_t get_color () const
|
98
|
+
{
|
99
|
+
return(zbar_decoder_get_color(_decoder));
|
100
|
+
}
|
101
|
+
|
102
|
+
/// retrieve last decoded symbol type.
|
103
|
+
/// see zbar_decoder_get_type()
|
104
|
+
zbar_symbol_type_t get_type () const
|
105
|
+
{
|
106
|
+
return(zbar_decoder_get_type(_decoder));
|
107
|
+
}
|
108
|
+
|
109
|
+
/// retrieve string name of last decoded symbol type.
|
110
|
+
/// see zbar_get_symbol_name()
|
111
|
+
const char *get_symbol_name () const
|
112
|
+
{
|
113
|
+
return(zbar_get_symbol_name(zbar_decoder_get_type(_decoder)));
|
114
|
+
}
|
115
|
+
|
116
|
+
/// retrieve string name for last decode addon.
|
117
|
+
/// see zbar_get_addon_name()
|
118
|
+
const char *get_addon_name () const
|
119
|
+
{
|
120
|
+
return(zbar_get_addon_name(zbar_decoder_get_type(_decoder)));
|
121
|
+
}
|
122
|
+
|
123
|
+
/// retrieve last decoded data in ASCII format as a char array.
|
124
|
+
/// see zbar_decoder_get_data()
|
125
|
+
const char *get_data_chars() const
|
126
|
+
{
|
127
|
+
return(zbar_decoder_get_data(_decoder));
|
128
|
+
}
|
129
|
+
|
130
|
+
/// retrieve last decoded data as a std::string.
|
131
|
+
/// see zbar_decoder_get_data()
|
132
|
+
const std::string get_data_string() const
|
133
|
+
{
|
134
|
+
return(std::string(zbar_decoder_get_data(_decoder),
|
135
|
+
zbar_decoder_get_data_length(_decoder)));
|
136
|
+
}
|
137
|
+
|
138
|
+
/// retrieve last decoded data as a std::string.
|
139
|
+
/// see zbar_decoder_get_data()
|
140
|
+
const std::string get_data() const
|
141
|
+
{
|
142
|
+
return(get_data_string());
|
143
|
+
}
|
144
|
+
|
145
|
+
/// retrieve length of decoded binary data.
|
146
|
+
/// see zbar_decoder_get_data_length()
|
147
|
+
int get_data_length() const
|
148
|
+
{
|
149
|
+
return(zbar_decoder_get_data_length(_decoder));
|
150
|
+
}
|
151
|
+
|
152
|
+
/// retrieve last decode direction.
|
153
|
+
/// see zbar_decoder_get_direction()
|
154
|
+
/// @since 0.11
|
155
|
+
int get_direction() const
|
156
|
+
{
|
157
|
+
return(zbar_decoder_get_direction(_decoder));
|
158
|
+
}
|
159
|
+
|
160
|
+
/// setup callback to handle result data.
|
161
|
+
void set_handler (Handler &handler)
|
162
|
+
{
|
163
|
+
_handler = &handler;
|
164
|
+
zbar_decoder_set_handler(_decoder, _cb);
|
165
|
+
zbar_decoder_set_userdata(_decoder, this);
|
166
|
+
}
|
167
|
+
|
168
|
+
/// set config for indicated symbology (0 for all) to specified value.
|
169
|
+
/// @see zbar_decoder_set_config()
|
170
|
+
/// @since 0.4
|
171
|
+
int set_config (zbar_symbol_type_t symbology,
|
172
|
+
zbar_config_t config,
|
173
|
+
int value)
|
174
|
+
{
|
175
|
+
return(zbar_decoder_set_config(_decoder, symbology, config, value));
|
176
|
+
}
|
177
|
+
|
178
|
+
/// set config parsed from configuration string.
|
179
|
+
/// @see zbar_decoder_parse_config()
|
180
|
+
/// @since 0.4
|
181
|
+
int set_config (std::string cfgstr)
|
182
|
+
{
|
183
|
+
return(zbar_decoder_parse_config(_decoder, cfgstr.c_str()));
|
184
|
+
}
|
185
|
+
|
186
|
+
private:
|
187
|
+
friend class Scanner;
|
188
|
+
zbar_decoder_t *_decoder;
|
189
|
+
Handler *_handler;
|
190
|
+
|
191
|
+
static void _cb (zbar_decoder_t *cdcode)
|
192
|
+
{
|
193
|
+
Decoder *dcode = (Decoder*)zbar_decoder_get_userdata(cdcode);
|
194
|
+
if(dcode && dcode->_handler)
|
195
|
+
dcode->_handler->decode_callback(*dcode);
|
196
|
+
}
|
197
|
+
};
|
198
|
+
|
199
|
+
}
|
200
|
+
|
201
|
+
#endif
|
data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Exception.h
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
//------------------------------------------------------------------------
|
2
|
+
// Copyright 2007-2009 (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
|
+
#ifndef _ZBAR_EXCEPTION_H_
|
24
|
+
#define _ZBAR_EXCEPTION_H_
|
25
|
+
|
26
|
+
/// @file
|
27
|
+
/// C++ Exception definitions
|
28
|
+
|
29
|
+
#ifndef _ZBAR_H_
|
30
|
+
# error "include zbar.h in your application, **not** zbar/Exception.h"
|
31
|
+
#endif
|
32
|
+
|
33
|
+
#include <exception>
|
34
|
+
#include <new>
|
35
|
+
|
36
|
+
namespace zbar {
|
37
|
+
|
38
|
+
/// base class for exceptions defined by this API.
|
39
|
+
class Exception : public std::exception {
|
40
|
+
|
41
|
+
public:
|
42
|
+
/// create exception from C library error
|
43
|
+
Exception (const void *obj = NULL)
|
44
|
+
: std::exception(),
|
45
|
+
_obj(obj)
|
46
|
+
{ }
|
47
|
+
|
48
|
+
~Exception () throw() { }
|
49
|
+
|
50
|
+
/// retrieve error message
|
51
|
+
virtual const char* what () const throw()
|
52
|
+
{
|
53
|
+
if(!_obj)
|
54
|
+
return("zbar library unspecified generic error");
|
55
|
+
return(_zbar_error_string(_obj, 0));
|
56
|
+
}
|
57
|
+
|
58
|
+
private:
|
59
|
+
const void *_obj;
|
60
|
+
};
|
61
|
+
|
62
|
+
/// internal library error.
|
63
|
+
class InternalError : public Exception {
|
64
|
+
public:
|
65
|
+
/// create exception from C library error
|
66
|
+
InternalError (const void *obj)
|
67
|
+
: Exception(obj)
|
68
|
+
{ }
|
69
|
+
};
|
70
|
+
|
71
|
+
/// unsupported request.
|
72
|
+
class UnsupportedError : public Exception {
|
73
|
+
public:
|
74
|
+
/// create exception from C library error
|
75
|
+
UnsupportedError (const void *obj)
|
76
|
+
: Exception(obj)
|
77
|
+
{ }
|
78
|
+
};
|
79
|
+
|
80
|
+
/// invalid request.
|
81
|
+
class InvalidError : public Exception {
|
82
|
+
public:
|
83
|
+
/// create exception from C library error
|
84
|
+
InvalidError (const void *obj)
|
85
|
+
: Exception(obj)
|
86
|
+
{ }
|
87
|
+
};
|
88
|
+
|
89
|
+
/// failed system call.
|
90
|
+
class SystemError : public Exception {
|
91
|
+
public:
|
92
|
+
/// create exception from C library error
|
93
|
+
SystemError (const void *obj)
|
94
|
+
: Exception(obj)
|
95
|
+
{ }
|
96
|
+
};
|
97
|
+
|
98
|
+
/// locking error.
|
99
|
+
class LockingError : public Exception {
|
100
|
+
public:
|
101
|
+
/// create exception from C library error
|
102
|
+
LockingError (const void *obj)
|
103
|
+
: Exception(obj)
|
104
|
+
{ }
|
105
|
+
};
|
106
|
+
|
107
|
+
/// all resources busy.
|
108
|
+
class BusyError : public Exception {
|
109
|
+
public:
|
110
|
+
/// create exception from C library error
|
111
|
+
BusyError (const void *obj)
|
112
|
+
: Exception(obj)
|
113
|
+
{ }
|
114
|
+
};
|
115
|
+
|
116
|
+
/// X11 display error.
|
117
|
+
class XDisplayError : public Exception {
|
118
|
+
public:
|
119
|
+
/// create exception from C library error
|
120
|
+
XDisplayError (const void *obj)
|
121
|
+
: Exception(obj)
|
122
|
+
{ }
|
123
|
+
};
|
124
|
+
|
125
|
+
/// X11 protocol error.
|
126
|
+
class XProtoError : public Exception {
|
127
|
+
public:
|
128
|
+
/// create exception from C library error
|
129
|
+
XProtoError (const void *obj)
|
130
|
+
: Exception(obj)
|
131
|
+
{ }
|
132
|
+
};
|
133
|
+
|
134
|
+
/// output window is closed.
|
135
|
+
class ClosedError : public Exception {
|
136
|
+
public:
|
137
|
+
/// create exception from C library error
|
138
|
+
ClosedError (const void *obj)
|
139
|
+
: Exception(obj)
|
140
|
+
{ }
|
141
|
+
};
|
142
|
+
|
143
|
+
/// image format error
|
144
|
+
class FormatError : public Exception {
|
145
|
+
// FIXME needs c equivalent
|
146
|
+
|
147
|
+
virtual const char* what () const throw()
|
148
|
+
{
|
149
|
+
// FIXME what format?
|
150
|
+
return("unsupported format");
|
151
|
+
}
|
152
|
+
};
|
153
|
+
|
154
|
+
/// @internal
|
155
|
+
|
156
|
+
/// extract error information and create exception.
|
157
|
+
static inline std::exception throw_exception (const void *obj)
|
158
|
+
{
|
159
|
+
switch(_zbar_get_error_code(obj)) {
|
160
|
+
case ZBAR_ERR_NOMEM:
|
161
|
+
throw std::bad_alloc();
|
162
|
+
case ZBAR_ERR_INTERNAL:
|
163
|
+
throw InternalError(obj);
|
164
|
+
case ZBAR_ERR_UNSUPPORTED:
|
165
|
+
throw UnsupportedError(obj);
|
166
|
+
case ZBAR_ERR_INVALID:
|
167
|
+
throw InvalidError(obj);
|
168
|
+
case ZBAR_ERR_SYSTEM:
|
169
|
+
throw SystemError(obj);
|
170
|
+
case ZBAR_ERR_LOCKING:
|
171
|
+
throw LockingError(obj);
|
172
|
+
case ZBAR_ERR_BUSY:
|
173
|
+
throw BusyError(obj);
|
174
|
+
case ZBAR_ERR_XDISPLAY:
|
175
|
+
throw XDisplayError(obj);
|
176
|
+
case ZBAR_ERR_XPROTO:
|
177
|
+
throw XProtoError(obj);
|
178
|
+
case ZBAR_ERR_CLOSED:
|
179
|
+
throw ClosedError(obj);
|
180
|
+
default:
|
181
|
+
throw Exception(obj);
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
}
|
186
|
+
|
187
|
+
#endif
|
@@ -0,0 +1,321 @@
|
|
1
|
+
//------------------------------------------------------------------------
|
2
|
+
// Copyright 2007-2010 (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
|
+
#ifndef _ZBAR_IMAGE_H_
|
24
|
+
#define _ZBAR_IMAGE_H_
|
25
|
+
|
26
|
+
/// @file
|
27
|
+
/// Image C++ wrapper
|
28
|
+
|
29
|
+
#ifndef _ZBAR_H_
|
30
|
+
# error "include zbar.h in your application, **not** zbar/Image.h"
|
31
|
+
#endif
|
32
|
+
|
33
|
+
#include <assert.h>
|
34
|
+
#include <iterator>
|
35
|
+
#include "Symbol.h"
|
36
|
+
#include "Exception.h"
|
37
|
+
|
38
|
+
namespace zbar {
|
39
|
+
|
40
|
+
class Video;
|
41
|
+
|
42
|
+
/// stores image data samples along with associated format and size
|
43
|
+
/// metadata
|
44
|
+
|
45
|
+
class Image {
|
46
|
+
public:
|
47
|
+
|
48
|
+
/// general Image result handler.
|
49
|
+
/// applications should subtype this and pass an instance to
|
50
|
+
/// eg. ImageScanner::set_handler() to implement result processing
|
51
|
+
class Handler {
|
52
|
+
public:
|
53
|
+
virtual ~Handler() { }
|
54
|
+
|
55
|
+
/// invoked by library when Image should be processed
|
56
|
+
virtual void image_callback(Image &image) = 0;
|
57
|
+
|
58
|
+
/// cast this handler to the C handler
|
59
|
+
operator zbar_image_data_handler_t* () const
|
60
|
+
{
|
61
|
+
return(_cb);
|
62
|
+
}
|
63
|
+
|
64
|
+
private:
|
65
|
+
static void _cb (zbar_image_t *zimg,
|
66
|
+
const void *userdata)
|
67
|
+
{
|
68
|
+
if(userdata) {
|
69
|
+
Image *image = (Image*)zbar_image_get_userdata(zimg);
|
70
|
+
if(image)
|
71
|
+
((Handler*)userdata)->image_callback(*image);
|
72
|
+
else {
|
73
|
+
Image tmp(zimg, 1);
|
74
|
+
((Handler*)userdata)->image_callback(tmp);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
};
|
79
|
+
|
80
|
+
class SymbolIterator : public zbar::SymbolIterator {
|
81
|
+
public:
|
82
|
+
/// default constructor.
|
83
|
+
SymbolIterator ()
|
84
|
+
: zbar::SymbolIterator()
|
85
|
+
{ }
|
86
|
+
|
87
|
+
/// constructor.
|
88
|
+
SymbolIterator (const SymbolSet &syms)
|
89
|
+
: zbar::SymbolIterator(syms)
|
90
|
+
{ }
|
91
|
+
|
92
|
+
/// copy constructor.
|
93
|
+
SymbolIterator (const SymbolIterator& iter)
|
94
|
+
: zbar::SymbolIterator(iter)
|
95
|
+
{ }
|
96
|
+
};
|
97
|
+
|
98
|
+
/// constructor.
|
99
|
+
/// create a new Image with the specified parameters
|
100
|
+
Image (unsigned width = 0,
|
101
|
+
unsigned height = 0,
|
102
|
+
const std::string& format = "",
|
103
|
+
const void *data = NULL,
|
104
|
+
unsigned long length = 0)
|
105
|
+
: _img(zbar_image_create())
|
106
|
+
{
|
107
|
+
zbar_image_set_userdata(_img, this);
|
108
|
+
if(width && height)
|
109
|
+
set_size(width, height);
|
110
|
+
if(format.length())
|
111
|
+
set_format(format);
|
112
|
+
if(data && length)
|
113
|
+
set_data(data, length);
|
114
|
+
}
|
115
|
+
|
116
|
+
~Image ()
|
117
|
+
{
|
118
|
+
set_data(NULL, 0);
|
119
|
+
zbar_image_set_userdata(_img, NULL);
|
120
|
+
zbar_image_ref(_img, -1);
|
121
|
+
}
|
122
|
+
|
123
|
+
/// cast to C image object
|
124
|
+
operator const zbar_image_t* () const
|
125
|
+
{
|
126
|
+
return(_img);
|
127
|
+
}
|
128
|
+
|
129
|
+
/// cast to C image object
|
130
|
+
operator zbar_image_t* ()
|
131
|
+
{
|
132
|
+
return(_img);
|
133
|
+
}
|
134
|
+
|
135
|
+
/// retrieve the image format.
|
136
|
+
/// see zbar_image_get_format()
|
137
|
+
unsigned long get_format () const
|
138
|
+
{
|
139
|
+
return(zbar_image_get_format(_img));
|
140
|
+
}
|
141
|
+
|
142
|
+
/// specify the fourcc image format code for image sample data.
|
143
|
+
/// see zbar_image_set_format()
|
144
|
+
void set_format (unsigned long format)
|
145
|
+
{
|
146
|
+
zbar_image_set_format(_img, format);
|
147
|
+
}
|
148
|
+
|
149
|
+
/// specify the fourcc image format code for image sample data.
|
150
|
+
/// see zbar_image_set_format()
|
151
|
+
void set_format (const std::string& format)
|
152
|
+
{
|
153
|
+
unsigned long fourcc = zbar_fourcc_parse(format.c_str());
|
154
|
+
zbar_image_set_format(_img, fourcc);
|
155
|
+
}
|
156
|
+
|
157
|
+
/// retrieve a "sequence" (page/frame) number associated with this
|
158
|
+
/// image.
|
159
|
+
/// see zbar_image_get_sequence()
|
160
|
+
/// @since 0.6
|
161
|
+
unsigned get_sequence () const
|
162
|
+
{
|
163
|
+
return(zbar_image_get_sequence(_img));
|
164
|
+
}
|
165
|
+
|
166
|
+
/// associate a "sequence" (page/frame) number with this image.
|
167
|
+
/// see zbar_image_set_sequence()
|
168
|
+
/// @since 0.6
|
169
|
+
void set_sequence (unsigned sequence_num)
|
170
|
+
{
|
171
|
+
zbar_image_set_sequence(_img, sequence_num);
|
172
|
+
}
|
173
|
+
|
174
|
+
/// retrieve the width of the image.
|
175
|
+
/// see zbar_image_get_width()
|
176
|
+
unsigned get_width () const
|
177
|
+
{
|
178
|
+
return(zbar_image_get_width(_img));
|
179
|
+
}
|
180
|
+
|
181
|
+
/// retrieve the height of the image.
|
182
|
+
/// see zbar_image_get_height()
|
183
|
+
unsigned get_height () const
|
184
|
+
{
|
185
|
+
return(zbar_image_get_height(_img));
|
186
|
+
}
|
187
|
+
|
188
|
+
/// retrieve both dimensions of the image.
|
189
|
+
/// see zbar_image_get_size()
|
190
|
+
/// @since 0.11
|
191
|
+
void get_size (unsigned &width,
|
192
|
+
unsigned &height) const
|
193
|
+
{
|
194
|
+
zbar_image_get_size(_img, &width, &height);
|
195
|
+
}
|
196
|
+
|
197
|
+
/// specify the pixel size of the image.
|
198
|
+
/// see zbar_image_set_size()
|
199
|
+
void set_size (unsigned width,
|
200
|
+
unsigned height)
|
201
|
+
{
|
202
|
+
zbar_image_set_size(_img, width, height);
|
203
|
+
}
|
204
|
+
|
205
|
+
/// retrieve the scan crop rectangle.
|
206
|
+
/// see zbar_image_get_crop()
|
207
|
+
void get_crop (unsigned &x,
|
208
|
+
unsigned &y,
|
209
|
+
unsigned &width,
|
210
|
+
unsigned &height) const
|
211
|
+
{
|
212
|
+
zbar_image_get_crop(_img, &x, &y, &width, &height);
|
213
|
+
}
|
214
|
+
|
215
|
+
/// set the scan crop rectangle.
|
216
|
+
/// see zbar_image_set_crop()
|
217
|
+
void set_crop (unsigned x,
|
218
|
+
unsigned y,
|
219
|
+
unsigned width,
|
220
|
+
unsigned height)
|
221
|
+
{
|
222
|
+
zbar_image_set_crop(_img, x, y, width, height);
|
223
|
+
}
|
224
|
+
|
225
|
+
/// return the image sample data.
|
226
|
+
/// see zbar_image_get_data()
|
227
|
+
const void *get_data () const
|
228
|
+
{
|
229
|
+
return(zbar_image_get_data(_img));
|
230
|
+
}
|
231
|
+
|
232
|
+
/// return the size of the image sample data.
|
233
|
+
/// see zbar_image_get_data_length()
|
234
|
+
/// @since 0.6
|
235
|
+
unsigned long get_data_length () const
|
236
|
+
{
|
237
|
+
return(zbar_image_get_data_length(_img));
|
238
|
+
}
|
239
|
+
|
240
|
+
/// specify image sample data.
|
241
|
+
/// see zbar_image_set_data()
|
242
|
+
void set_data (const void *data,
|
243
|
+
unsigned long length)
|
244
|
+
{
|
245
|
+
zbar_image_set_data(_img, data, length, _cleanup);
|
246
|
+
}
|
247
|
+
|
248
|
+
/// image format conversion.
|
249
|
+
/// see zbar_image_convert()
|
250
|
+
Image convert (unsigned long format) const
|
251
|
+
{
|
252
|
+
zbar_image_t *img = zbar_image_convert(_img, format);
|
253
|
+
if(img)
|
254
|
+
return(Image(img));
|
255
|
+
throw FormatError();
|
256
|
+
}
|
257
|
+
|
258
|
+
/// image format conversion with crop/pad.
|
259
|
+
/// see zbar_image_convert_resize()
|
260
|
+
/// @since 0.4
|
261
|
+
Image convert (unsigned long format,
|
262
|
+
unsigned width,
|
263
|
+
unsigned height) const
|
264
|
+
{
|
265
|
+
zbar_image_t *img =
|
266
|
+
zbar_image_convert_resize(_img, format, width, height);
|
267
|
+
if(img)
|
268
|
+
return(Image(img));
|
269
|
+
throw FormatError();
|
270
|
+
}
|
271
|
+
|
272
|
+
const SymbolSet get_symbols () const {
|
273
|
+
return(SymbolSet(zbar_image_get_symbols(_img)));
|
274
|
+
}
|
275
|
+
|
276
|
+
void set_symbols (const SymbolSet &syms) {
|
277
|
+
zbar_image_set_symbols(_img, syms);
|
278
|
+
}
|
279
|
+
|
280
|
+
/// create a new SymbolIterator over decoded results.
|
281
|
+
SymbolIterator symbol_begin () const {
|
282
|
+
return(SymbolIterator(get_symbols()));
|
283
|
+
}
|
284
|
+
|
285
|
+
/// return a SymbolIterator suitable for ending iteration.
|
286
|
+
SymbolIterator symbol_end () const {
|
287
|
+
return(SymbolIterator());
|
288
|
+
}
|
289
|
+
|
290
|
+
protected:
|
291
|
+
|
292
|
+
friend class Video;
|
293
|
+
|
294
|
+
/// constructor.
|
295
|
+
/// @internal
|
296
|
+
/// create a new Image from a zbar_image_t C object
|
297
|
+
Image (zbar_image_t *src,
|
298
|
+
int refs = 0)
|
299
|
+
: _img(src)
|
300
|
+
{
|
301
|
+
if(refs)
|
302
|
+
zbar_image_ref(_img, refs);
|
303
|
+
zbar_image_set_userdata(_img, this);
|
304
|
+
}
|
305
|
+
|
306
|
+
/// default data cleanup (noop)
|
307
|
+
/// @internal
|
308
|
+
static void _cleanup (zbar_image_t *img)
|
309
|
+
{
|
310
|
+
// by default nothing is cleaned
|
311
|
+
assert(img);
|
312
|
+
assert(zbar_image_get_userdata(img));
|
313
|
+
}
|
314
|
+
|
315
|
+
private:
|
316
|
+
zbar_image_t *_img;
|
317
|
+
};
|
318
|
+
|
319
|
+
}
|
320
|
+
|
321
|
+
#endif
|