objective c port for iOS and OS X

git-svn-id: https://zxing.googlecode.com/svn/trunk@1773 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
smparkes@smparkes.net 2011-05-17 02:07:56 +00:00
parent 00eedc659f
commit 47b28a4edb
46 changed files with 3384 additions and 2 deletions

1
cpp/.gitignore vendored
View file

@ -1,2 +1,3 @@
/build
/.sconsign.dblite
xcuserdata

2
cpp/ios.xcodeproj/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/*.mode1v3
/*.pbxuser

View file

@ -0,0 +1,414 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
3B15E73A12CE996800DC7062 /* LuminanceSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B15E73912CE996800DC7062 /* LuminanceSource.cpp */; };
3B15E78612CE9BF900DC7062 /* Exception.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B15E78512CE9BF900DC7062 /* Exception.cpp */; };
3B2A325212CE9D31001D9945 /* IllegalArgumentException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A325112CE9D31001D9945 /* IllegalArgumentException.cpp */; };
3B2A32B012CEA202001D9945 /* HybridBinarizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A32AF12CEA202001D9945 /* HybridBinarizer.cpp */; };
3B2A32B412CEA238001D9945 /* GlobalHistogramBinarizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A32B312CEA238001D9945 /* GlobalHistogramBinarizer.cpp */; };
3B2A32B812CEA285001D9945 /* Binarizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A32B712CEA285001D9945 /* Binarizer.cpp */; };
3B2A32C612CEA2F9001D9945 /* BitArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A32C512CEA2F9001D9945 /* BitArray.cpp */; };
3B2A32CC12CEA380001D9945 /* BitMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A32CB12CEA380001D9945 /* BitMatrix.cpp */; };
3B2A32E812CEA43A001D9945 /* BinaryBitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A32E712CEA43A001D9945 /* BinaryBitmap.cpp */; };
3B2A32FF12CEA53A001D9945 /* Detector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A32FE12CEA53A001D9945 /* Detector.cpp */; };
3B2A330312CEA55B001D9945 /* AlignmentPatternFinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A330212CEA55B001D9945 /* AlignmentPatternFinder.cpp */; };
3B2A330712CEA59E001D9945 /* ResultPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A330612CEA59E001D9945 /* ResultPoint.cpp */; };
3B2A330B12CEA5BF001D9945 /* ReaderException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A330A12CEA5BF001D9945 /* ReaderException.cpp */; };
3B2A330F12CEA5D2001D9945 /* Version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A330E12CEA5D2001D9945 /* Version.cpp */; };
3B2A331312CEA5F3001D9945 /* FinderPatternFinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A331212CEA5F3001D9945 /* FinderPatternFinder.cpp */; };
3B2A331712CEA60A001D9945 /* DecodeHints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A331612CEA60A001D9945 /* DecodeHints.cpp */; };
3B2A331B12CEA624001D9945 /* FinderPatternInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A331A12CEA624001D9945 /* FinderPatternInfo.cpp */; };
3B2A331F12CEA638001D9945 /* GridSampler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A331E12CEA638001D9945 /* GridSampler.cpp */; };
3B2A332312CEA64F001D9945 /* PerspectiveTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A332212CEA64F001D9945 /* PerspectiveTransform.cpp */; };
3B2A332712CEA664001D9945 /* FinderPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A332612CEA664001D9945 /* FinderPattern.cpp */; };
3B2A332B12CEA67F001D9945 /* FormatInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A332A12CEA67F001D9945 /* FormatInformation.cpp */; };
3B2A332F12CEA696001D9945 /* ErrorCorrectionLevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A332E12CEA696001D9945 /* ErrorCorrectionLevel.cpp */; };
3B2A333312CEA6C2001D9945 /* DetectorResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A333212CEA6C2001D9945 /* DetectorResult.cpp */; };
3B2A335A12CEA925001D9945 /* Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A335912CEA925001D9945 /* Decoder.cpp */; };
3B2A335E12CEA93D001D9945 /* BitMatrixParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A335D12CEA93D001D9945 /* BitMatrixParser.cpp */; };
3B2A336212CEA95C001D9945 /* DataBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A336112CEA95C001D9945 /* DataBlock.cpp */; };
3B2A336612CEA976001D9945 /* Str.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A336512CEA976001D9945 /* Str.cpp */; };
3B2A336A12CEA997001D9945 /* DataMask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A336912CEA997001D9945 /* DataMask.cpp */; };
3B2A336E12CEA9B0001D9945 /* DecodedBitStreamParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A336D12CEA9B0001D9945 /* DecodedBitStreamParser.cpp */; };
3B2A337212CEA9E2001D9945 /* Mode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A337112CEA9E2001D9945 /* Mode.cpp */; };
3B2A337612CEAA06001D9945 /* ReedSolomonDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A337512CEAA06001D9945 /* ReedSolomonDecoder.cpp */; };
3B2A337A12CEAA20001D9945 /* GF256.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A337912CEAA20001D9945 /* GF256.cpp */; };
3B2A337E12CEAA37001D9945 /* GF256Poly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A337D12CEAA37001D9945 /* GF256Poly.cpp */; };
3B2A338212CEAA4B001D9945 /* ReedSolomonException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A338112CEAA4B001D9945 /* ReedSolomonException.cpp */; };
3B2A338612CEAA63001D9945 /* BitSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A338512CEAA63001D9945 /* BitSource.cpp */; };
3B2A338E12CEAA95001D9945 /* DecoderResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A338D12CEAA95001D9945 /* DecoderResult.cpp */; };
3BBCB71E12DD108300B5936D /* Result.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB71D12DD108300B5936D /* Result.cpp */; };
3BBCB72012DD10BC00B5936D /* QRCodeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB71F12DD10BC00B5936D /* QRCodeReader.cpp */; };
3BBCB72412DD10DC00B5936D /* Reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB72312DD10DC00B5936D /* Reader.cpp */; };
3BBF0AEE12CBCAFC0061650E /* AlignmentPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3BBF0AED12CBCAFC0061650E /* AlignmentPattern.cpp */; };
AA747D9F0F9514B9006C5449 /* ios_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* ios_Prefix.pch */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
3B15E73912CE996800DC7062 /* LuminanceSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LuminanceSource.cpp; path = core/src/zxing/LuminanceSource.cpp; sourceTree = "<group>"; };
3B15E78512CE9BF900DC7062 /* Exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Exception.cpp; path = core/src/zxing/Exception.cpp; sourceTree = "<group>"; };
3B2A325112CE9D31001D9945 /* IllegalArgumentException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IllegalArgumentException.cpp; path = core/src/zxing/common/IllegalArgumentException.cpp; sourceTree = "<group>"; };
3B2A32AF12CEA202001D9945 /* HybridBinarizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HybridBinarizer.cpp; path = core/src/zxing/common/HybridBinarizer.cpp; sourceTree = "<group>"; };
3B2A32B312CEA238001D9945 /* GlobalHistogramBinarizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GlobalHistogramBinarizer.cpp; path = core/src/zxing/common/GlobalHistogramBinarizer.cpp; sourceTree = "<group>"; };
3B2A32B712CEA285001D9945 /* Binarizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Binarizer.cpp; path = core/src/zxing/Binarizer.cpp; sourceTree = "<group>"; };
3B2A32C512CEA2F9001D9945 /* BitArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BitArray.cpp; path = core/src/zxing/common/BitArray.cpp; sourceTree = "<group>"; };
3B2A32CB12CEA380001D9945 /* BitMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BitMatrix.cpp; path = core/src/zxing/common/BitMatrix.cpp; sourceTree = "<group>"; };
3B2A32E712CEA43A001D9945 /* BinaryBitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryBitmap.cpp; path = core/src/zxing/BinaryBitmap.cpp; sourceTree = "<group>"; };
3B2A32FE12CEA53A001D9945 /* Detector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Detector.cpp; path = core/src/zxing/qrcode/detector/Detector.cpp; sourceTree = "<group>"; };
3B2A330212CEA55B001D9945 /* AlignmentPatternFinder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AlignmentPatternFinder.cpp; path = core/src/zxing/qrcode/detector/AlignmentPatternFinder.cpp; sourceTree = "<group>"; };
3B2A330612CEA59E001D9945 /* ResultPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ResultPoint.cpp; path = core/src/zxing/ResultPoint.cpp; sourceTree = "<group>"; };
3B2A330A12CEA5BF001D9945 /* ReaderException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReaderException.cpp; path = core/src/zxing/ReaderException.cpp; sourceTree = "<group>"; };
3B2A330E12CEA5D2001D9945 /* Version.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Version.cpp; path = core/src/zxing/qrcode/Version.cpp; sourceTree = "<group>"; };
3B2A331212CEA5F3001D9945 /* FinderPatternFinder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FinderPatternFinder.cpp; path = core/src/zxing/qrcode/detector/FinderPatternFinder.cpp; sourceTree = "<group>"; };
3B2A331612CEA60A001D9945 /* DecodeHints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeHints.cpp; path = core/src/zxing/DecodeHints.cpp; sourceTree = "<group>"; };
3B2A331A12CEA624001D9945 /* FinderPatternInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FinderPatternInfo.cpp; path = core/src/zxing/qrcode/detector/FinderPatternInfo.cpp; sourceTree = "<group>"; };
3B2A331E12CEA638001D9945 /* GridSampler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GridSampler.cpp; path = core/src/zxing/common/GridSampler.cpp; sourceTree = "<group>"; };
3B2A332212CEA64F001D9945 /* PerspectiveTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerspectiveTransform.cpp; path = core/src/zxing/common/PerspectiveTransform.cpp; sourceTree = "<group>"; };
3B2A332612CEA664001D9945 /* FinderPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FinderPattern.cpp; path = core/src/zxing/qrcode/detector/FinderPattern.cpp; sourceTree = "<group>"; };
3B2A332A12CEA67F001D9945 /* FormatInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatInformation.cpp; path = core/src/zxing/qrcode/FormatInformation.cpp; sourceTree = "<group>"; };
3B2A332E12CEA696001D9945 /* ErrorCorrectionLevel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ErrorCorrectionLevel.cpp; path = core/src/zxing/qrcode/ErrorCorrectionLevel.cpp; sourceTree = "<group>"; };
3B2A333212CEA6C2001D9945 /* DetectorResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DetectorResult.cpp; path = core/src/zxing/common/DetectorResult.cpp; sourceTree = "<group>"; };
3B2A335912CEA925001D9945 /* Decoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Decoder.cpp; path = core/src/zxing/qrcode/decoder/Decoder.cpp; sourceTree = "<group>"; };
3B2A335D12CEA93D001D9945 /* BitMatrixParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BitMatrixParser.cpp; path = core/src/zxing/qrcode/decoder/BitMatrixParser.cpp; sourceTree = "<group>"; };
3B2A336112CEA95C001D9945 /* DataBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataBlock.cpp; path = core/src/zxing/qrcode/decoder/DataBlock.cpp; sourceTree = "<group>"; };
3B2A336512CEA976001D9945 /* Str.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Str.cpp; path = core/src/zxing/common/Str.cpp; sourceTree = "<group>"; };
3B2A336912CEA997001D9945 /* DataMask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataMask.cpp; path = core/src/zxing/qrcode/decoder/DataMask.cpp; sourceTree = "<group>"; };
3B2A336D12CEA9B0001D9945 /* DecodedBitStreamParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodedBitStreamParser.cpp; path = core/src/zxing/qrcode/decoder/DecodedBitStreamParser.cpp; sourceTree = "<group>"; };
3B2A337112CEA9E2001D9945 /* Mode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mode.cpp; path = core/src/zxing/qrcode/decoder/Mode.cpp; sourceTree = "<group>"; };
3B2A337512CEAA06001D9945 /* ReedSolomonDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReedSolomonDecoder.cpp; path = core/src/zxing/common/reedsolomon/ReedSolomonDecoder.cpp; sourceTree = "<group>"; };
3B2A337912CEAA20001D9945 /* GF256.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GF256.cpp; path = core/src/zxing/common/reedsolomon/GF256.cpp; sourceTree = "<group>"; };
3B2A337D12CEAA37001D9945 /* GF256Poly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GF256Poly.cpp; path = core/src/zxing/common/reedsolomon/GF256Poly.cpp; sourceTree = "<group>"; };
3B2A338112CEAA4B001D9945 /* ReedSolomonException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReedSolomonException.cpp; path = core/src/zxing/common/reedsolomon/ReedSolomonException.cpp; sourceTree = "<group>"; };
3B2A338512CEAA63001D9945 /* BitSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BitSource.cpp; path = core/src/zxing/common/BitSource.cpp; sourceTree = "<group>"; };
3B2A338D12CEAA95001D9945 /* DecoderResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecoderResult.cpp; path = core/src/zxing/common/DecoderResult.cpp; sourceTree = "<group>"; };
3BBCB71D12DD108300B5936D /* Result.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Result.cpp; path = core/src/zxing/Result.cpp; sourceTree = "<group>"; };
3BBCB71F12DD10BC00B5936D /* QRCodeReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QRCodeReader.cpp; path = core/src/zxing/qrcode/QRCodeReader.cpp; sourceTree = "<group>"; };
3BBCB72312DD10DC00B5936D /* Reader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Reader.cpp; path = core/src/zxing/Reader.cpp; sourceTree = "<group>"; };
3BBF0AED12CBCAFC0061650E /* AlignmentPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AlignmentPattern.cpp; path = core/src/zxing/qrcode/detector/AlignmentPattern.cpp; sourceTree = "<group>"; };
AA747D9E0F9514B9006C5449 /* ios_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ios_Prefix.pch; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* libzxing.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libzxing.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
D2AAC07E0554694100DB518D /* libzxing.a */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* zxing */ = {
isa = PBXGroup;
children = (
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
);
name = zxing;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
3BBCB72312DD10DC00B5936D /* Reader.cpp */,
3BBCB71F12DD10BC00B5936D /* QRCodeReader.cpp */,
3BBCB71D12DD108300B5936D /* Result.cpp */,
3B2A338D12CEAA95001D9945 /* DecoderResult.cpp */,
3B2A338512CEAA63001D9945 /* BitSource.cpp */,
3B2A338112CEAA4B001D9945 /* ReedSolomonException.cpp */,
3B2A337D12CEAA37001D9945 /* GF256Poly.cpp */,
3B2A337912CEAA20001D9945 /* GF256.cpp */,
3B2A337512CEAA06001D9945 /* ReedSolomonDecoder.cpp */,
3B2A337112CEA9E2001D9945 /* Mode.cpp */,
3B2A336D12CEA9B0001D9945 /* DecodedBitStreamParser.cpp */,
3B2A336912CEA997001D9945 /* DataMask.cpp */,
3B2A336512CEA976001D9945 /* Str.cpp */,
3B2A336112CEA95C001D9945 /* DataBlock.cpp */,
3B2A335D12CEA93D001D9945 /* BitMatrixParser.cpp */,
3B2A335912CEA925001D9945 /* Decoder.cpp */,
3B2A333212CEA6C2001D9945 /* DetectorResult.cpp */,
3B2A332E12CEA696001D9945 /* ErrorCorrectionLevel.cpp */,
3B2A332A12CEA67F001D9945 /* FormatInformation.cpp */,
3B2A332612CEA664001D9945 /* FinderPattern.cpp */,
3B2A332212CEA64F001D9945 /* PerspectiveTransform.cpp */,
3B2A331E12CEA638001D9945 /* GridSampler.cpp */,
3B2A331A12CEA624001D9945 /* FinderPatternInfo.cpp */,
3B2A331612CEA60A001D9945 /* DecodeHints.cpp */,
3B2A331212CEA5F3001D9945 /* FinderPatternFinder.cpp */,
3B2A330E12CEA5D2001D9945 /* Version.cpp */,
3B2A330A12CEA5BF001D9945 /* ReaderException.cpp */,
3B2A330612CEA59E001D9945 /* ResultPoint.cpp */,
3B2A330212CEA55B001D9945 /* AlignmentPatternFinder.cpp */,
3B2A32FE12CEA53A001D9945 /* Detector.cpp */,
3B2A32E712CEA43A001D9945 /* BinaryBitmap.cpp */,
3B2A32CB12CEA380001D9945 /* BitMatrix.cpp */,
3B2A32C512CEA2F9001D9945 /* BitArray.cpp */,
3B2A32B712CEA285001D9945 /* Binarizer.cpp */,
3B2A32B312CEA238001D9945 /* GlobalHistogramBinarizer.cpp */,
3B2A32AF12CEA202001D9945 /* HybridBinarizer.cpp */,
3B2A325112CE9D31001D9945 /* IllegalArgumentException.cpp */,
3B15E78512CE9BF900DC7062 /* Exception.cpp */,
3B15E73912CE996800DC7062 /* LuminanceSource.cpp */,
3BBF0AED12CBCAFC0061650E /* AlignmentPattern.cpp */,
);
name = Classes;
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
AA747D9E0F9514B9006C5449 /* ios_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC07A0554694100DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
AA747D9F0F9514B9006C5449 /* ios_Prefix.pch in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D2AAC07D0554694100DB518D /* zxing */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "zxing" */;
buildPhases = (
D2AAC07A0554694100DB518D /* Headers */,
D2AAC07B0554694100DB518D /* Sources */,
D2AAC07C0554694100DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = zxing;
productName = zxing;
productReference = D2AAC07E0554694100DB518D /* libzxing.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ios" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 0867D691FE84028FC02AAC07 /* zxing */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D2AAC07D0554694100DB518D /* zxing */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3BBF0AEE12CBCAFC0061650E /* AlignmentPattern.cpp in Sources */,
3B15E73A12CE996800DC7062 /* LuminanceSource.cpp in Sources */,
3B15E78612CE9BF900DC7062 /* Exception.cpp in Sources */,
3B2A325212CE9D31001D9945 /* IllegalArgumentException.cpp in Sources */,
3B2A32B012CEA202001D9945 /* HybridBinarizer.cpp in Sources */,
3B2A32B412CEA238001D9945 /* GlobalHistogramBinarizer.cpp in Sources */,
3B2A32B812CEA285001D9945 /* Binarizer.cpp in Sources */,
3B2A32C612CEA2F9001D9945 /* BitArray.cpp in Sources */,
3B2A32CC12CEA380001D9945 /* BitMatrix.cpp in Sources */,
3B2A32E812CEA43A001D9945 /* BinaryBitmap.cpp in Sources */,
3B2A32FF12CEA53A001D9945 /* Detector.cpp in Sources */,
3B2A330312CEA55B001D9945 /* AlignmentPatternFinder.cpp in Sources */,
3B2A330712CEA59E001D9945 /* ResultPoint.cpp in Sources */,
3B2A330B12CEA5BF001D9945 /* ReaderException.cpp in Sources */,
3B2A330F12CEA5D2001D9945 /* Version.cpp in Sources */,
3B2A331312CEA5F3001D9945 /* FinderPatternFinder.cpp in Sources */,
3B2A331712CEA60A001D9945 /* DecodeHints.cpp in Sources */,
3B2A331B12CEA624001D9945 /* FinderPatternInfo.cpp in Sources */,
3B2A331F12CEA638001D9945 /* GridSampler.cpp in Sources */,
3B2A332312CEA64F001D9945 /* PerspectiveTransform.cpp in Sources */,
3B2A332712CEA664001D9945 /* FinderPattern.cpp in Sources */,
3B2A332B12CEA67F001D9945 /* FormatInformation.cpp in Sources */,
3B2A332F12CEA696001D9945 /* ErrorCorrectionLevel.cpp in Sources */,
3B2A333312CEA6C2001D9945 /* DetectorResult.cpp in Sources */,
3B2A335A12CEA925001D9945 /* Decoder.cpp in Sources */,
3B2A335E12CEA93D001D9945 /* BitMatrixParser.cpp in Sources */,
3B2A336212CEA95C001D9945 /* DataBlock.cpp in Sources */,
3B2A336612CEA976001D9945 /* Str.cpp in Sources */,
3B2A336A12CEA997001D9945 /* DataMask.cpp in Sources */,
3B2A336E12CEA9B0001D9945 /* DecodedBitStreamParser.cpp in Sources */,
3B2A337212CEA9E2001D9945 /* Mode.cpp in Sources */,
3B2A337612CEAA06001D9945 /* ReedSolomonDecoder.cpp in Sources */,
3B2A337A12CEAA20001D9945 /* GF256.cpp in Sources */,
3B2A337E12CEAA37001D9945 /* GF256Poly.cpp in Sources */,
3B2A338212CEAA4B001D9945 /* ReedSolomonException.cpp in Sources */,
3B2A338612CEAA63001D9945 /* BitSource.cpp in Sources */,
3B2A338E12CEAA95001D9945 /* DecoderResult.cpp in Sources */,
3BBCB71E12DD108300B5936D /* Result.cpp in Sources */,
3BBCB72012DD10BC00B5936D /* QRCodeReader.cpp in Sources */,
3BBCB72412DD10DC00B5936D /* Reader.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/zxing.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ios_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
PRODUCT_NAME = zxing;
WARNING_CFLAGS = (
"-Werror",
"-Wextra",
"-Wall",
"-Wno-unused-parameter",
);
};
name = Debug;
};
1DEB922008733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/zxing.dst;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ios_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
PRODUCT_NAME = zxing;
WARNING_CFLAGS = (
"-Werror",
"-Wextra",
"-Wall",
"-Wno-unused-parameter",
);
};
name = Release;
};
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = core/src;
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;
SDKROOT = iphoneos;
WARNING_CFLAGS = (
"-Wno-unused-parameter",
"-Werror",
"-Wextra",
"-Wall",
);
};
name = Debug;
};
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = core/src;
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;
SDKROOT = iphoneos;
WARNING_CFLAGS = (
"-Wno-unused-parameter",
"-Werror",
"-Wextra",
"-Wall",
);
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "zxing" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB921F08733DC00010E9CD /* Debug */,
1DEB922008733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ios" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB922308733DC00010E9CD /* Debug */,
1DEB922408733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}

7
cpp/ios_Prefix.pch Normal file
View file

@ -0,0 +1,7 @@
//
// Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#endif

View file

@ -854,7 +854,11 @@
isa = PBXProject;
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "osx" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
);
mainGroup = 0867D691FE84028FC02AAC07 /* osx */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
@ -952,7 +956,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
@ -970,7 +973,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = core/src;
@ -987,6 +989,7 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = 4.2;
INSTALL_PATH = /usr/local/lib;
OTHER_LDFLAGS = (
"-framework",
@ -1005,6 +1008,7 @@
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_VERSION = 4.2;
INSTALL_PATH = /usr/local/lib;
OTHER_LDFLAGS = (
"-framework",

2
objc/ios.xcodeproj/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/*.mode1v3
/*.pbxuser

View file

@ -0,0 +1,302 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
3B15E6FE12CE970000DC7062 /* ZXLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B15E6FD12CE970000DC7062 /* ZXLuminanceSource.mm */; };
3B15E70012CE971100DC7062 /* CGImageLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B15E6FF12CE971100DC7062 /* CGImageLuminanceSource.mm */; };
3BBCB5B312DD018600B5936D /* ZXCaptureView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB5B212DD018600B5936D /* ZXCaptureView.mm */; };
3BBCB60A12DD084000B5936D /* ZXCapture.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB60912DD084000B5936D /* ZXCapture.mm */; };
3BBCB6A912DD0B1900B5936D /* ZXBinaryBitmap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6A812DD0B1900B5936D /* ZXBinaryBitmap.mm */; };
3BBCB6B112DD0B4C00B5936D /* ZXDecodeHints.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6AC12DD0B4C00B5936D /* ZXDecodeHints.mm */; };
3BBCB6B212DD0B4C00B5936D /* ZXHybridBinarizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6AD12DD0B4C00B5936D /* ZXHybridBinarizer.mm */; };
3BBCB6B312DD0B4C00B5936D /* ZXIllegalArgumentException.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6AE12DD0B4C00B5936D /* ZXIllegalArgumentException.mm */; };
3BBCB6B412DD0B4C00B5936D /* ZXQRCodeReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6AF12DD0B4C00B5936D /* ZXQRCodeReader.mm */; };
3BBCB6B512DD0B4C00B5936D /* ZXReaderException.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6B012DD0B4C00B5936D /* ZXReaderException.mm */; };
3BBCB6BB12DD0B8100B5936D /* ZXBinarizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6B812DD0B8100B5936D /* ZXBinarizer.mm */; };
3BBCB6BC12DD0B8100B5936D /* ZXCGImageLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6B912DD0B8100B5936D /* ZXCGImageLuminanceSource.mm */; };
3BBCB6BD12DD0B8100B5936D /* ZXReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB6BA12DD0B8100B5936D /* ZXReader.mm */; };
3BBCB71512DD105C00B5936D /* ZXResult.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB71412DD105C00B5936D /* ZXResult.mm */; };
AA747D9F0F9514B9006C5449 /* ios_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* ios_Prefix.pch */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
3B15E6FD12CE970000DC7062 /* ZXLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXLuminanceSource.mm; path = src/zxing/ZXLuminanceSource.mm; sourceTree = "<group>"; };
3B15E6FF12CE971100DC7062 /* CGImageLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CGImageLuminanceSource.mm; path = src/zxing/CGImageLuminanceSource.mm; sourceTree = "<group>"; };
3BBCB5B212DD018600B5936D /* ZXCaptureView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXCaptureView.mm; path = src/zxing/ZXCaptureView.mm; sourceTree = "<group>"; };
3BBCB60912DD084000B5936D /* ZXCapture.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXCapture.mm; path = src/zxing/ZXCapture.mm; sourceTree = "<group>"; };
3BBCB6A812DD0B1900B5936D /* ZXBinaryBitmap.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXBinaryBitmap.mm; path = src/zxing/ZXBinaryBitmap.mm; sourceTree = "<group>"; };
3BBCB6AC12DD0B4C00B5936D /* ZXDecodeHints.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXDecodeHints.mm; path = src/zxing/ZXDecodeHints.mm; sourceTree = "<group>"; };
3BBCB6AD12DD0B4C00B5936D /* ZXHybridBinarizer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXHybridBinarizer.mm; path = src/zxing/ZXHybridBinarizer.mm; sourceTree = "<group>"; };
3BBCB6AE12DD0B4C00B5936D /* ZXIllegalArgumentException.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXIllegalArgumentException.mm; path = src/zxing/ZXIllegalArgumentException.mm; sourceTree = "<group>"; };
3BBCB6AF12DD0B4C00B5936D /* ZXQRCodeReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXQRCodeReader.mm; path = src/zxing/ZXQRCodeReader.mm; sourceTree = "<group>"; };
3BBCB6B012DD0B4C00B5936D /* ZXReaderException.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXReaderException.mm; path = src/zxing/ZXReaderException.mm; sourceTree = "<group>"; };
3BBCB6B812DD0B8100B5936D /* ZXBinarizer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXBinarizer.mm; path = src/zxing/ZXBinarizer.mm; sourceTree = "<group>"; };
3BBCB6B912DD0B8100B5936D /* ZXCGImageLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXCGImageLuminanceSource.mm; path = src/zxing/ZXCGImageLuminanceSource.mm; sourceTree = "<group>"; };
3BBCB6BA12DD0B8100B5936D /* ZXReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXReader.mm; path = src/zxing/ZXReader.mm; sourceTree = "<group>"; };
3BBCB71412DD105C00B5936D /* ZXResult.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXResult.mm; path = src/zxing/ZXResult.mm; sourceTree = "<group>"; };
AA747D9E0F9514B9006C5449 /* ios_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ios_Prefix.pch; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* libzxingmm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libzxingmm.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
D2AAC07E0554694100DB518D /* libzxingmm.a */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* zxingmm */ = {
isa = PBXGroup;
children = (
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
);
name = zxingmm;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
3BBCB71412DD105C00B5936D /* ZXResult.mm */,
3BBCB6B812DD0B8100B5936D /* ZXBinarizer.mm */,
3BBCB6B912DD0B8100B5936D /* ZXCGImageLuminanceSource.mm */,
3BBCB6BA12DD0B8100B5936D /* ZXReader.mm */,
3BBCB6AC12DD0B4C00B5936D /* ZXDecodeHints.mm */,
3BBCB6AD12DD0B4C00B5936D /* ZXHybridBinarizer.mm */,
3BBCB6AE12DD0B4C00B5936D /* ZXIllegalArgumentException.mm */,
3BBCB6AF12DD0B4C00B5936D /* ZXQRCodeReader.mm */,
3BBCB6B012DD0B4C00B5936D /* ZXReaderException.mm */,
3BBCB6A812DD0B1900B5936D /* ZXBinaryBitmap.mm */,
3BBCB60912DD084000B5936D /* ZXCapture.mm */,
3BBCB5B212DD018600B5936D /* ZXCaptureView.mm */,
3B15E6FF12CE971100DC7062 /* CGImageLuminanceSource.mm */,
3B15E6FD12CE970000DC7062 /* ZXLuminanceSource.mm */,
);
name = Classes;
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
AA747D9E0F9514B9006C5449 /* ios_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC07A0554694100DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
AA747D9F0F9514B9006C5449 /* ios_Prefix.pch in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D2AAC07D0554694100DB518D /* zxingmm */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "zxingmm" */;
buildPhases = (
D2AAC07A0554694100DB518D /* Headers */,
D2AAC07B0554694100DB518D /* Sources */,
D2AAC07C0554694100DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = zxingmm;
productName = zxingmm;
productReference = D2AAC07E0554694100DB518D /* libzxingmm.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ios" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 0867D691FE84028FC02AAC07 /* zxingmm */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D2AAC07D0554694100DB518D /* zxingmm */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3B15E6FE12CE970000DC7062 /* ZXLuminanceSource.mm in Sources */,
3B15E70012CE971100DC7062 /* CGImageLuminanceSource.mm in Sources */,
3BBCB5B312DD018600B5936D /* ZXCaptureView.mm in Sources */,
3BBCB60A12DD084000B5936D /* ZXCapture.mm in Sources */,
3BBCB6A912DD0B1900B5936D /* ZXBinaryBitmap.mm in Sources */,
3BBCB6B112DD0B4C00B5936D /* ZXDecodeHints.mm in Sources */,
3BBCB6B212DD0B4C00B5936D /* ZXHybridBinarizer.mm in Sources */,
3BBCB6B312DD0B4C00B5936D /* ZXIllegalArgumentException.mm in Sources */,
3BBCB6B412DD0B4C00B5936D /* ZXQRCodeReader.mm in Sources */,
3BBCB6B512DD0B4C00B5936D /* ZXReaderException.mm in Sources */,
3BBCB6BB12DD0B8100B5936D /* ZXBinarizer.mm in Sources */,
3BBCB6BC12DD0B8100B5936D /* ZXCGImageLuminanceSource.mm in Sources */,
3BBCB6BD12DD0B8100B5936D /* ZXReader.mm in Sources */,
3BBCB71512DD105C00B5936D /* ZXResult.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/zxingmm.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ios_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
PRODUCT_NAME = zxingmm;
};
name = Debug;
};
1DEB922008733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/zxingmm.dst;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ios_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
PRODUCT_NAME = zxingmm;
};
name = Release;
};
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
../cpp/core/src,
src,
);
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;
SDKROOT = iphoneos;
WARNING_CFLAGS = (
"-Wextra",
"-Werror",
"-Wall",
"-Wno-unused-parameter",
);
};
name = Debug;
};
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
../cpp/core/src,
src,
);
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;
SDKROOT = iphoneos;
WARNING_CFLAGS = (
"-Wextra",
"-Werror",
"-Wall",
"-Wno-unused-parameter",
);
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "zxingmm" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB921F08733DC00010E9CD /* Debug */,
1DEB922008733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ios" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB922308733DC00010E9CD /* Debug */,
1DEB922408733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}

8
objc/ios_Prefix.pch Normal file
View file

@ -0,0 +1,8 @@
//
// Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif

View file

@ -0,0 +1,471 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
3B0BF98C1221ED4500F0BD0F /* ZXBinarizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B0BF9821221ED4500F0BD0F /* ZXBinarizer.h */; };
3B0BF98D1221ED4500F0BD0F /* ZXBinarizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B0BF9831221ED4500F0BD0F /* ZXBinarizer.mm */; };
3B0BF98E1221ED4500F0BD0F /* ZXBinaryBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B0BF9841221ED4500F0BD0F /* ZXBinaryBitmap.h */; };
3B0BF98F1221ED4500F0BD0F /* ZXBinaryBitmap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B0BF9851221ED4500F0BD0F /* ZXBinaryBitmap.mm */; };
3B0BF9901221ED4500F0BD0F /* ZXDecodeHints.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B0BF9861221ED4500F0BD0F /* ZXDecodeHints.h */; };
3B0BF9911221ED4500F0BD0F /* ZXDecodeHints.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B0BF9871221ED4500F0BD0F /* ZXDecodeHints.mm */; };
3B0BF9921221ED4500F0BD0F /* ZXHybridBinarizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B0BF9881221ED4500F0BD0F /* ZXHybridBinarizer.h */; };
3B0BF9931221ED4500F0BD0F /* ZXHybridBinarizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B0BF9891221ED4500F0BD0F /* ZXHybridBinarizer.mm */; };
3B0BF9941221ED4500F0BD0F /* ZXResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B0BF98A1221ED4500F0BD0F /* ZXResult.h */; };
3B0BF9951221ED4500F0BD0F /* ZXResult.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B0BF98B1221ED4500F0BD0F /* ZXResult.mm */; };
3B1E842A1222D432000D7528 /* ZXCaptureDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B1E84291222D432000D7528 /* ZXCaptureDelegate.h */; };
3B1E84591222DBBE000D7528 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B1E84581222DBBE000D7528 /* QuartzCore.framework */; };
3B98744E12235C340013711B /* ZXQRCodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B98744C12235C340013711B /* ZXQRCodeReader.h */; };
3B98744F12235C340013711B /* ZXQRCodeReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B98744D12235C340013711B /* ZXQRCodeReader.mm */; };
3B98746C12235EC40013711B /* ZXIllegalArgumentException.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B98746A12235EC40013711B /* ZXIllegalArgumentException.h */; };
3B98746D12235EC40013711B /* ZXReaderException.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B98746B12235EC40013711B /* ZXReaderException.h */; };
3B98747912235FEE0013711B /* ZXIllegalArgumentException.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B98747712235FEE0013711B /* ZXIllegalArgumentException.mm */; };
3B98747A12235FEE0013711B /* ZXReaderException.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B98747812235FEE0013711B /* ZXReaderException.mm */; };
3BB8D3C31222172900F86718 /* ZXCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BB8D3BF1222172900F86718 /* ZXCapture.h */; };
3BB8D3C41222172900F86718 /* ZXCaptureView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BB8D3C01222172900F86718 /* ZXCaptureView.h */; };
3BB8D3C51222172900F86718 /* ZXCaptureView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BB8D3C11222172900F86718 /* ZXCaptureView.mm */; };
3BB8D3C61222172900F86718 /* ZXView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BB8D3C21222172900F86718 /* ZXView.h */; };
3BCF09731221957200C3E580 /* ZXMultiFormatReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BCF096F1221957200C3E580 /* ZXMultiFormatReader.h */; };
3BCF09741221957200C3E580 /* ZXMultiFormatReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BCF09701221957200C3E580 /* ZXMultiFormatReader.mm */; };
3BCF09751221957200C3E580 /* ZXReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BCF09711221957200C3E580 /* ZXReader.h */; };
3BCF09761221957200C3E580 /* ZXReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BCF09721221957200C3E580 /* ZXReader.mm */; };
3BE809B512221C7D00AA1B63 /* ZXCapture.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BE809B412221C7D00AA1B63 /* ZXCapture.mm */; };
3BE809D1122221CF00AA1B63 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE809D0122221CF00AA1B63 /* QTKit.framework */; };
3BE809D71222222800AA1B63 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE809D61222222800AA1B63 /* CoreVideo.framework */; };
3BED8A3E122198540016F4E8 /* libzxing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BED8A39122198210016F4E8 /* libzxing.a */; };
3BED8A42122198850016F4E8 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BED8A41122198850016F4E8 /* libiconv.dylib */; };
3BED8A4E12219CB10016F4E8 /* ZXInit.c in Sources */ = {isa = PBXBuildFile; fileRef = 3BED8A4D12219CB10016F4E8 /* ZXInit.c */; };
3BED8A5F1221B0270016F4E8 /* ZXImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BED8A5D1221B0270016F4E8 /* ZXImage.h */; };
3BED8A601221B0270016F4E8 /* ZXImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BED8A5E1221B0270016F4E8 /* ZXImage.mm */; };
3BED8A831221B7870016F4E8 /* ZXCGImageLuminanceSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BED8A811221B7870016F4E8 /* ZXCGImageLuminanceSource.h */; };
3BED8A841221B7870016F4E8 /* ZXCGImageLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BED8A821221B7870016F4E8 /* ZXCGImageLuminanceSource.mm */; };
3BED8A8E1221B84E0016F4E8 /* CGImageLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BED8A8C1221B84E0016F4E8 /* CGImageLuminanceSource.mm */; };
3BED8A8F1221B84E0016F4E8 /* CGImageLuminanceSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BED8A8D1221B84E0016F4E8 /* CGImageLuminanceSource.h */; };
3BED8A9A1221B92B0016F4E8 /* ZXLuminanceSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BED8A981221B92B0016F4E8 /* ZXLuminanceSource.h */; };
3BED8A9B1221B92B0016F4E8 /* ZXLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BED8A991221B92B0016F4E8 /* ZXLuminanceSource.mm */; };
D2AAC0CC05546C4400DB518D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
3BED8A38122198210016F4E8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 3BED8A31122198210016F4E8 /* osx.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3B5B0DFF121C525D005698F8;
remoteInfo = zxing;
};
3BED8A3A122198300016F4E8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 3BED8A31122198210016F4E8 /* osx.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 3B5B0DFE121C525D005698F8;
remoteInfo = zxing;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
3B0BF9821221ED4500F0BD0F /* ZXBinarizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXBinarizer.h; path = src/zxing/ZXBinarizer.h; sourceTree = "<group>"; };
3B0BF9831221ED4500F0BD0F /* ZXBinarizer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXBinarizer.mm; path = src/zxing/ZXBinarizer.mm; sourceTree = "<group>"; };
3B0BF9841221ED4500F0BD0F /* ZXBinaryBitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXBinaryBitmap.h; path = src/zxing/ZXBinaryBitmap.h; sourceTree = "<group>"; };
3B0BF9851221ED4500F0BD0F /* ZXBinaryBitmap.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXBinaryBitmap.mm; path = src/zxing/ZXBinaryBitmap.mm; sourceTree = "<group>"; };
3B0BF9861221ED4500F0BD0F /* ZXDecodeHints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXDecodeHints.h; path = src/zxing/ZXDecodeHints.h; sourceTree = "<group>"; };
3B0BF9871221ED4500F0BD0F /* ZXDecodeHints.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXDecodeHints.mm; path = src/zxing/ZXDecodeHints.mm; sourceTree = "<group>"; };
3B0BF9881221ED4500F0BD0F /* ZXHybridBinarizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXHybridBinarizer.h; path = src/zxing/ZXHybridBinarizer.h; sourceTree = "<group>"; };
3B0BF9891221ED4500F0BD0F /* ZXHybridBinarizer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXHybridBinarizer.mm; path = src/zxing/ZXHybridBinarizer.mm; sourceTree = "<group>"; };
3B0BF98A1221ED4500F0BD0F /* ZXResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXResult.h; path = src/zxing/ZXResult.h; sourceTree = "<group>"; };
3B0BF98B1221ED4500F0BD0F /* ZXResult.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXResult.mm; path = src/zxing/ZXResult.mm; sourceTree = "<group>"; };
3B1E84291222D432000D7528 /* ZXCaptureDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXCaptureDelegate.h; path = src/zxing/ZXCaptureDelegate.h; sourceTree = "<group>"; };
3B1E84581222DBBE000D7528 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
3B98744C12235C340013711B /* ZXQRCodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXQRCodeReader.h; path = src/zxing/ZXQRCodeReader.h; sourceTree = "<group>"; };
3B98744D12235C340013711B /* ZXQRCodeReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXQRCodeReader.mm; path = src/zxing/ZXQRCodeReader.mm; sourceTree = "<group>"; };
3B98746A12235EC40013711B /* ZXIllegalArgumentException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXIllegalArgumentException.h; path = src/zxing/ZXIllegalArgumentException.h; sourceTree = "<group>"; };
3B98746B12235EC40013711B /* ZXReaderException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXReaderException.h; path = src/zxing/ZXReaderException.h; sourceTree = "<group>"; };
3B98747712235FEE0013711B /* ZXIllegalArgumentException.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXIllegalArgumentException.mm; path = src/zxing/ZXIllegalArgumentException.mm; sourceTree = "<group>"; };
3B98747812235FEE0013711B /* ZXReaderException.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXReaderException.mm; path = src/zxing/ZXReaderException.mm; sourceTree = "<group>"; };
3BB8D3BF1222172900F86718 /* ZXCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXCapture.h; path = src/zxing/ZXCapture.h; sourceTree = "<group>"; };
3BB8D3C01222172900F86718 /* ZXCaptureView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXCaptureView.h; path = src/zxing/ZXCaptureView.h; sourceTree = "<group>"; };
3BB8D3C11222172900F86718 /* ZXCaptureView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXCaptureView.mm; path = src/zxing/ZXCaptureView.mm; sourceTree = "<group>"; };
3BB8D3C21222172900F86718 /* ZXView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXView.h; path = src/zxing/ZXView.h; sourceTree = "<group>"; };
3BCF096F1221957200C3E580 /* ZXMultiFormatReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXMultiFormatReader.h; path = src/zxing/ZXMultiFormatReader.h; sourceTree = "<group>"; };
3BCF09701221957200C3E580 /* ZXMultiFormatReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXMultiFormatReader.mm; path = src/zxing/ZXMultiFormatReader.mm; sourceTree = "<group>"; };
3BCF09711221957200C3E580 /* ZXReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXReader.h; path = src/zxing/ZXReader.h; sourceTree = "<group>"; };
3BCF09721221957200C3E580 /* ZXReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXReader.mm; path = src/zxing/ZXReader.mm; sourceTree = "<group>"; };
3BE809B412221C7D00AA1B63 /* ZXCapture.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXCapture.mm; path = src/zxing/ZXCapture.mm; sourceTree = "<group>"; };
3BE809D0122221CF00AA1B63 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; };
3BE809D61222222800AA1B63 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
3BED8A31122198210016F4E8 /* osx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = osx.xcodeproj; path = ../cpp/osx.xcodeproj; sourceTree = SOURCE_ROOT; };
3BED8A41122198850016F4E8 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = usr/lib/libiconv.dylib; sourceTree = SDKROOT; };
3BED8A4D12219CB10016F4E8 /* ZXInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ZXInit.c; path = src/zxing/ZXInit.c; sourceTree = "<group>"; };
3BED8A5D1221B0270016F4E8 /* ZXImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXImage.h; path = src/zxing/ZXImage.h; sourceTree = "<group>"; };
3BED8A5E1221B0270016F4E8 /* ZXImage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXImage.mm; path = src/zxing/ZXImage.mm; sourceTree = "<group>"; };
3BED8A811221B7870016F4E8 /* ZXCGImageLuminanceSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXCGImageLuminanceSource.h; path = src/zxing/ZXCGImageLuminanceSource.h; sourceTree = "<group>"; };
3BED8A821221B7870016F4E8 /* ZXCGImageLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXCGImageLuminanceSource.mm; path = src/zxing/ZXCGImageLuminanceSource.mm; sourceTree = "<group>"; };
3BED8A8C1221B84E0016F4E8 /* CGImageLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CGImageLuminanceSource.mm; path = src/zxing/CGImageLuminanceSource.mm; sourceTree = "<group>"; };
3BED8A8D1221B84E0016F4E8 /* CGImageLuminanceSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGImageLuminanceSource.h; path = src/zxing/CGImageLuminanceSource.h; sourceTree = "<group>"; };
3BED8A981221B92B0016F4E8 /* ZXLuminanceSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXLuminanceSource.h; path = src/zxing/ZXLuminanceSource.h; sourceTree = "<group>"; };
3BED8A991221B92B0016F4E8 /* ZXLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZXLuminanceSource.mm; path = src/zxing/ZXLuminanceSource.mm; sourceTree = "<group>"; };
D2AAC0C705546C1D00DB518D /* zxing.bundle */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = zxing.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC0C505546C1D00DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3BED8A3E122198540016F4E8 /* libzxing.a in Frameworks */,
D2AAC0CC05546C4400DB518D /* Cocoa.framework in Frameworks */,
3BED8A42122198850016F4E8 /* libiconv.dylib in Frameworks */,
3BE809D1122221CF00AA1B63 /* QTKit.framework in Frameworks */,
3BE809D71222222800AA1B63 /* CoreVideo.framework in Frameworks */,
3B1E84591222DBBE000D7528 /* QuartzCore.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
D2AAC0C705546C1D00DB518D /* zxing.bundle */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* zxing */ = {
isa = PBXGroup;
children = (
3BED8A31122198210016F4E8 /* osx.xcodeproj */,
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
034768DFFF38A50411DB9C8B /* Products */,
3BED8A41122198850016F4E8 /* libiconv.dylib */,
3BE809D0122221CF00AA1B63 /* QTKit.framework */,
3BE809D61222222800AA1B63 /* CoreVideo.framework */,
3B1E84581222DBBE000D7528 /* QuartzCore.framework */,
);
name = zxing;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
3B98747712235FEE0013711B /* ZXIllegalArgumentException.mm */,
3B98747812235FEE0013711B /* ZXReaderException.mm */,
3B98746A12235EC40013711B /* ZXIllegalArgumentException.h */,
3B98746B12235EC40013711B /* ZXReaderException.h */,
3B98744C12235C340013711B /* ZXQRCodeReader.h */,
3B98744D12235C340013711B /* ZXQRCodeReader.mm */,
3B1E84291222D432000D7528 /* ZXCaptureDelegate.h */,
3BE809B412221C7D00AA1B63 /* ZXCapture.mm */,
3BB8D3BF1222172900F86718 /* ZXCapture.h */,
3BB8D3C01222172900F86718 /* ZXCaptureView.h */,
3BB8D3C11222172900F86718 /* ZXCaptureView.mm */,
3BB8D3C21222172900F86718 /* ZXView.h */,
3B0BF9821221ED4500F0BD0F /* ZXBinarizer.h */,
3B0BF9831221ED4500F0BD0F /* ZXBinarizer.mm */,
3B0BF9841221ED4500F0BD0F /* ZXBinaryBitmap.h */,
3B0BF9851221ED4500F0BD0F /* ZXBinaryBitmap.mm */,
3B0BF9861221ED4500F0BD0F /* ZXDecodeHints.h */,
3B0BF9871221ED4500F0BD0F /* ZXDecodeHints.mm */,
3B0BF9881221ED4500F0BD0F /* ZXHybridBinarizer.h */,
3B0BF9891221ED4500F0BD0F /* ZXHybridBinarizer.mm */,
3B0BF98A1221ED4500F0BD0F /* ZXResult.h */,
3B0BF98B1221ED4500F0BD0F /* ZXResult.mm */,
3BED8A981221B92B0016F4E8 /* ZXLuminanceSource.h */,
3BED8A991221B92B0016F4E8 /* ZXLuminanceSource.mm */,
3BED8A8C1221B84E0016F4E8 /* CGImageLuminanceSource.mm */,
3BED8A8D1221B84E0016F4E8 /* CGImageLuminanceSource.h */,
3BED8A811221B7870016F4E8 /* ZXCGImageLuminanceSource.h */,
3BED8A821221B7870016F4E8 /* ZXCGImageLuminanceSource.mm */,
3BED8A5D1221B0270016F4E8 /* ZXImage.h */,
3BED8A5E1221B0270016F4E8 /* ZXImage.mm */,
3BCF096F1221957200C3E580 /* ZXMultiFormatReader.h */,
3BCF09701221957200C3E580 /* ZXMultiFormatReader.mm */,
3BCF09711221957200C3E580 /* ZXReader.h */,
3BCF09721221957200C3E580 /* ZXReader.mm */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
0867D6A5FE840307C02AAC07 /* AppKit.framework */,
0867D69BFE84028FC02AAC07 /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
3BED8A4D12219CB10016F4E8 /* ZXInit.c */,
);
name = "Other Sources";
sourceTree = "<group>";
};
3BED8A32122198210016F4E8 /* Products */ = {
isa = PBXGroup;
children = (
3BED8A39122198210016F4E8 /* libzxing.a */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC0C305546C1D00DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
3BCF09731221957200C3E580 /* ZXMultiFormatReader.h in Headers */,
3BCF09751221957200C3E580 /* ZXReader.h in Headers */,
3BED8A5F1221B0270016F4E8 /* ZXImage.h in Headers */,
3BED8A831221B7870016F4E8 /* ZXCGImageLuminanceSource.h in Headers */,
3BED8A8F1221B84E0016F4E8 /* CGImageLuminanceSource.h in Headers */,
3BED8A9A1221B92B0016F4E8 /* ZXLuminanceSource.h in Headers */,
3B0BF98C1221ED4500F0BD0F /* ZXBinarizer.h in Headers */,
3B0BF98E1221ED4500F0BD0F /* ZXBinaryBitmap.h in Headers */,
3B0BF9901221ED4500F0BD0F /* ZXDecodeHints.h in Headers */,
3B0BF9921221ED4500F0BD0F /* ZXHybridBinarizer.h in Headers */,
3B0BF9941221ED4500F0BD0F /* ZXResult.h in Headers */,
3BB8D3C31222172900F86718 /* ZXCapture.h in Headers */,
3BB8D3C41222172900F86718 /* ZXCaptureView.h in Headers */,
3BB8D3C61222172900F86718 /* ZXView.h in Headers */,
3B1E842A1222D432000D7528 /* ZXCaptureDelegate.h in Headers */,
3B98744E12235C340013711B /* ZXQRCodeReader.h in Headers */,
3B98746C12235EC40013711B /* ZXIllegalArgumentException.h in Headers */,
3B98746D12235EC40013711B /* ZXReaderException.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D2AAC0C605546C1D00DB518D /* zxing */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB917D08733D990010E9CD /* Build configuration list for PBXNativeTarget "zxing" */;
buildPhases = (
D2AAC0C305546C1D00DB518D /* Headers */,
D2AAC0C405546C1D00DB518D /* Sources */,
D2AAC0C505546C1D00DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
3BED8A3B122198300016F4E8 /* PBXTargetDependency */,
);
name = zxing;
productName = zxing;
productReference = D2AAC0C705546C1D00DB518D /* zxing.bundle */;
productType = "com.apple.product-type.library.dynamic";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB918108733D990010E9CD /* Build configuration list for PBXProject "osx" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
);
mainGroup = 0867D691FE84028FC02AAC07 /* zxing */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 3BED8A32122198210016F4E8 /* Products */;
ProjectRef = 3BED8A31122198210016F4E8 /* osx.xcodeproj */;
},
);
projectRoot = "";
targets = (
D2AAC0C605546C1D00DB518D /* zxing */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
3BED8A39122198210016F4E8 /* libzxing.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libzxing.a;
remoteRef = 3BED8A38122198210016F4E8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXSourcesBuildPhase section */
D2AAC0C405546C1D00DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3BCF09741221957200C3E580 /* ZXMultiFormatReader.mm in Sources */,
3BCF09761221957200C3E580 /* ZXReader.mm in Sources */,
3BED8A4E12219CB10016F4E8 /* ZXInit.c in Sources */,
3BED8A601221B0270016F4E8 /* ZXImage.mm in Sources */,
3BED8A841221B7870016F4E8 /* ZXCGImageLuminanceSource.mm in Sources */,
3BED8A8E1221B84E0016F4E8 /* CGImageLuminanceSource.mm in Sources */,
3BED8A9B1221B92B0016F4E8 /* ZXLuminanceSource.mm in Sources */,
3B0BF98D1221ED4500F0BD0F /* ZXBinarizer.mm in Sources */,
3B0BF98F1221ED4500F0BD0F /* ZXBinaryBitmap.mm in Sources */,
3B0BF9911221ED4500F0BD0F /* ZXDecodeHints.mm in Sources */,
3B0BF9931221ED4500F0BD0F /* ZXHybridBinarizer.mm in Sources */,
3B0BF9951221ED4500F0BD0F /* ZXResult.mm in Sources */,
3BB8D3C51222172900F86718 /* ZXCaptureView.mm in Sources */,
3BE809B512221C7D00AA1B63 /* ZXCapture.mm in Sources */,
3B98744F12235C340013711B /* ZXQRCodeReader.mm in Sources */,
3B98747912235FEE0013711B /* ZXIllegalArgumentException.mm in Sources */,
3B98747A12235FEE0013711B /* ZXReaderException.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
3BED8A3B122198300016F4E8 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = zxing;
targetProxy = 3BED8A3A122198300016F4E8 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1DEB917E08733D990010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXECUTABLE_EXTENSION = bundle;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = osx_Prefix.pch;
GCC_VERSION = 4.2;
INSTALL_PATH = /usr/local/lib;
PRODUCT_NAME = zxing;
};
name = Debug;
};
1DEB917F08733D990010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXECUTABLE_EXTENSION = bundle;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = osx_Prefix.pch;
GCC_VERSION = 4.2;
INSTALL_PATH = /usr/local/lib;
PRODUCT_NAME = zxing;
};
name = Release;
};
1DEB918208733D990010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_GC = supported;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
src,
../cpp/core/src,
);
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
WARNING_CFLAGS = (
"-Wall",
"-Wextra",
);
};
name = Debug;
};
1DEB918308733D990010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_GC = supported;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
src,
../cpp/core/src,
);
PREBINDING = NO;
SDKROOT = macosx10.6;
WARNING_CFLAGS = (
"-Wall",
"-Wextra",
);
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB917D08733D990010E9CD /* Build configuration list for PBXNativeTarget "zxing" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB917E08733D990010E9CD /* Debug */,
1DEB917F08733D990010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB918108733D990010E9CD /* Build configuration list for PBXProject "osx" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB918208733D990010E9CD /* Debug */,
1DEB918308733D990010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:osx.xcodeproj">
</FileRef>
</Workspace>

5
objc/osx_Prefix.pch Normal file
View file

@ -0,0 +1,5 @@
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import <QTKit/QTKit.h>
#endif

View file

@ -0,0 +1,93 @@
// -*- mode:c++; c-basic-offset:2; indent-tabs-mode:nil -*-
#ifndef __CGIIMAGE_LUMINANCE_SOURCE__
#define __CGIIMAGE_LUMINANCE_SOURCE__
/*
* Copyright 2011 ZXing authors All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
#include <CoreVideo/CoreVideo.h>
#endif
#include <zxing/LuminanceSource.h>
namespace zxing {
class CGImageLuminanceSource : public LuminanceSource {
private:
CGImageRef image_;
CFDataRef data_;
int left_;
int top_;
int width_;
int height_;
int dataWidth_;
int dataHeight_;
int bytesPerRow_;
public:
static CGImageRef createImageFromBuffer(CVImageBufferRef);
static CGImageRef createImageFromBuffer(CVImageBufferRef,
int left,
int top,
int width,
int height);
CGImageLuminanceSource(CVPixelBufferRef buffer,
int left,
int top,
int width,
int height);
CGImageLuminanceSource(CVPixelBufferRef buffer);
CGImageLuminanceSource(CGImageRef image,
int left,
int top,
int width,
int height);
CGImageLuminanceSource(CGImageRef image);
~CGImageLuminanceSource();
CGImageRef image() { return image_; }
CGImageRef image(size_t width, size_t height);
unsigned char* getRow(int y, unsigned char* row);
unsigned char* getMatrix();
bool isRotateSupported() const {
return true;
}
int getWidth() const {
return width_;
}
int getHeight() const {
return height_;
}
Ref<LuminanceSource> rotateCounterClockwise();
private:
void init(CGImageRef image);
void init(CGImageRef image, int left, int top, int width, int height);
};
} /* namespace */
#endif

View file

@ -0,0 +1,228 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <zxing/CGImageLuminanceSource.h>
#include <zxing/common/IllegalArgumentException.h>
namespace zxing {
CGImageRef CGImageLuminanceSource::createImageFromBuffer
(CVPixelBufferRef buffer, int left, int top, int width, int height)
{
int bytesPerRow = CVPixelBufferGetBytesPerRow(buffer);
int dataWidth = CVPixelBufferGetWidth(buffer);
int dataHeight = CVPixelBufferGetHeight(buffer);
if (left + width > dataWidth ||
top + height > dataHeight ||
top < 0 ||
left < 0) {
throw
IllegalArgumentException("Crop rectangle does not fit within image data.");
}
int newBytesPerRow = ((width*4+0xf)>>4)<<4;
CVPixelBufferLockBaseAddress(buffer,0);
unsigned char* baseAddress =
(unsigned char*)CVPixelBufferGetBaseAddress(buffer);
int size = newBytesPerRow*height;
unsigned char* bytes = (unsigned char*)malloc(size);
if (newBytesPerRow == bytesPerRow) {
memcpy(bytes, baseAddress+top*bytesPerRow, size);
} else {
for(int y=0; y<height; y++) {
memcpy(bytes+y*bytesPerRow,
baseAddress+left*4+(top+y)*bytesPerRow,
bytesPerRow);
}
}
CVPixelBufferUnlockBaseAddress(buffer, 0);
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef newContext = CGBitmapContextCreate(bytes,
width,
height,
8,
newBytesPerRow,
colorSpace,
kCGBitmapByteOrder32Little|
kCGImageAlphaNoneSkipFirst);
CGColorSpaceRelease(colorSpace);
CGImageRef result = CGBitmapContextCreateImage(newContext);
CGContextRelease(newContext);
free(bytes);
return result;
}
CGImageRef CGImageLuminanceSource::createImageFromBuffer
(CVPixelBufferRef buffer)
{
return createImageFromBuffer
(buffer,
0,
0,
CVPixelBufferGetWidth(buffer),
CVPixelBufferGetHeight(buffer));
}
CGImageLuminanceSource::CGImageLuminanceSource(CVPixelBufferRef buffer)
{
CGImageRef image = createImageFromBuffer(buffer);
init(image);
CGImageRelease(image);
}
CGImageLuminanceSource::CGImageLuminanceSource
(CVPixelBufferRef buffer, int left, int top, int width, int height)
{
CGImageRef image = createImageFromBuffer(buffer, left, top, width, height);
init(image);
CGImageRelease(image);
}
CGImageLuminanceSource::CGImageLuminanceSource(CGImageRef cgimage)
{
init(cgimage);
}
CGImageLuminanceSource::CGImageLuminanceSource
(CGImageRef cgimage, int left, int top, int width, int height)
{
init(cgimage, left, top, width, height);
}
void
CGImageLuminanceSource::init(CGImageRef cgimage)
{
init(cgimage, 0, 0, CGImageGetWidth(cgimage), CGImageGetHeight(cgimage));
}
void
CGImageLuminanceSource::init
(CGImageRef cgimage, int left, int top, int width, int height) {
data_ = 0;
image_ = cgimage;
left_ = left;
top_ = top;
width_ = width;
height_ = height;
dataWidth_ = CGImageGetWidth(image_);
dataHeight_ = CGImageGetHeight(image_);
if (left_ + width_ > dataWidth_ ||
top_ + height_ > dataHeight_ ||
top_ < 0 ||
left_ < 0) {
throw IllegalArgumentException
("Crop rectangle does not fit within image data.");
}
CGColorSpaceRef space = CGImageGetColorSpace(image_);
CGColorSpaceModel model = CGColorSpaceGetModel(space);
if (model != kCGColorSpaceModelMonochrome ||
CGImageGetBitsPerComponent(image_) != 8 ||
CGImageGetBitsPerPixel(image_) != 8) {
CGColorSpaceRef gray = CGColorSpaceCreateDeviceGray();
CGContextRef ctx = CGBitmapContextCreate(0,
width,
height,
8,
width,
gray,
kCGImageAlphaNone);
CGColorSpaceRelease(gray);
if (top || left) {
CGContextClipToRect(ctx, CGRectMake(0, 0, width, height));
}
CGContextDrawImage(ctx, CGRectMake(-left, -top, width, height), image_);
image_ = CGBitmapContextCreateImage(ctx);
bytesPerRow_ = width;
top_ = 0;
left_ = 0;
dataWidth_ = width;
dataHeight_ = height;
CGContextRelease(ctx);
} else {
CGImageRetain(image_);
}
CGDataProviderRef provider = CGImageGetDataProvider(image_);
data_ = CGDataProviderCopyData(provider);
}
CGImageLuminanceSource::~CGImageLuminanceSource() {
if (image_) {
CGImageRelease(image_);
}
if (data_) {
CFRelease(data_);
}
}
unsigned char* CGImageLuminanceSource::getRow(int y, unsigned char* row) {
if (y < 0 || y >= this->getHeight()) {
throw IllegalArgumentException("Requested row is outside the image: " + y);
}
int width = getWidth();
// TODO(flyashi): determine if row has enough size.
if (row == NULL) {
row = new unsigned char[width_];
}
int offset = (y + top_) * dataWidth_ + left_;
CFDataGetBytes(data_, CFRangeMake(offset, width), row);
return row;
}
unsigned char* CGImageLuminanceSource::getMatrix() {
int size = width_ * height_;
unsigned char* result = new unsigned char[size];
if (left_ == 0 &&
top_ == 0 &&
dataWidth_ == width_ &&
dataHeight_ == height_) {
CFDataGetBytes(data_, CFRangeMake(0, size), result);
} else {
for (int row = 0; row < height_; row++) {
CFDataGetBytes(data_,
CFRangeMake((top_ + row) * dataWidth_ + left_, width_),
result + row * width_);
}
}
return result;
}
Ref<LuminanceSource> CGImageLuminanceSource::rotateCounterClockwise() {
return Ref<LuminanceSource>(0);
}
}

View file

@ -0,0 +1,29 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/Binarizer.h>
#import <zxing/ZXLuminanceSource.h>
@interface ZXBinarizer : NSObject {
zxing::Ref<zxing::Binarizer> native;
}
- (ZXBinarizer*)initWithNative:(zxing::Binarizer*)native;
- (zxing::Binarizer*)native;
- (CGImageRef)createImage;
@end

View file

@ -0,0 +1,88 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXBinarizer.h>
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
#define ZXBlack [[UIColor blackColor] CGColor]
#define ZXWhite [[UIColor whiteColor] CGColor]
#else
#define ZXBlack CGColorGetConstantColor(kCGColorBlack)
#define ZXWhite CGColorGetConstantColor(kCGColorWhite)
#endif
@implementation ZXBinarizer
- (ZXBinarizer*)initWithNative:(zxing::Binarizer*)binarizer {
if ((self = [super init])) {
native = binarizer;
}
return self;
}
- (zxing::Binarizer*)native {
return native;
}
- (CGImageRef)createImage {
zxing::BitMatrix& matrix (*native->getBlackMatrix());
zxing::LuminanceSource& source (*native->getLuminanceSource());
int width = source.getWidth();
int height = source.getHeight();
int bytesPerRow = ((width&0xf)>>4)<<4;
CGColorSpaceRef gray = CGColorSpaceCreateDeviceGray();
CGContextRef context = CGBitmapContextCreate (
0,
width,
height,
8, // bits per component
bytesPerRow,
gray,
kCGImageAlphaNone);
CGColorSpaceRelease(gray);
CGRect r = CGRectZero;
r.size.width = width;
r.size.height = height;
CGContextSetFillColorWithColor(context, ZXBlack);
CGContextFillRect(context, r);
r.size.width = 1;
r.size.height = 1;
CGContextSetFillColorWithColor(context, ZXWhite);
for(int y=0; y<height; y++) {
r.origin.y = height-1-y;
for(int x=0; x<width; x++) {
if (!matrix.get(x,y)) {
r.origin.x = x;
CGContextFillRect(context, r);
}
}
}
CGImageRef binary = CGBitmapContextCreateImage(context);
CGContextRelease(context);
return binary;
}
@end

View file

@ -0,0 +1,30 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/BinaryBitmap.h>
@class ZXBinarizer;
@interface ZXBinaryBitmap : NSObject {
zxing::Ref<zxing::BinaryBitmap> native;
}
- (ZXBinaryBitmap*)initWithBinarizer:(ZXBinarizer*)binarizer;
- (zxing::BinaryBitmap*)native;
@end

View file

@ -0,0 +1,38 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXBinaryBitmap.h>
#import <zxing/ZXBinarizer.h>
@implementation ZXBinaryBitmap
- (ZXBinaryBitmap*)initWithBinarizer:(ZXBinarizer*)binarizer {
native =
new zxing::BinaryBitmap(zxing::Ref<zxing::Binarizer>([binarizer native]));
return self;
}
- (zxing::BinaryBitmap*)native {
return native;
}
- (void)dealloc {
native = 0;
[super dealloc];
}
@end

View file

@ -0,0 +1,59 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXLuminanceSource.h>
#import <zxing/CGImageLuminanceSource.h>
@class ZXImage;
@interface ZXCGImageLuminanceSource : ZXLuminanceSource {
}
+ (CGImageRef)createImageFromBuffer:(CVImageBufferRef)buffer;
+ (CGImageRef)createImageFromBuffer:(CVImageBufferRef)buffer
left:(size_t)left
top:(size_t)top
width:(size_t)width
height:(size_t)height;
- (ZXCGImageLuminanceSource*)initWithZXImage:(ZXImage*)image
left:(size_t)left
top:(size_t)top
width:(size_t)width
height:(size_t)height;
- (ZXCGImageLuminanceSource*)initWithZXImage:(ZXImage*)image;
- (ZXCGImageLuminanceSource*)initWithCGImage:(CGImageRef)image
left:(size_t)left
top:(size_t)top
width:(size_t)width
height:(size_t)height;
- (ZXCGImageLuminanceSource*)initWithCGImage:(CGImageRef)image;
- (ZXCGImageLuminanceSource*)initWithBuffer:(CVPixelBufferRef)buffer
left:(size_t)left
top:(size_t)top
width:(size_t)width
height:(size_t)height;
- (ZXCGImageLuminanceSource*)initWithBuffer:(CVPixelBufferRef)buffer;
- (CGImageRef)image;
@end

View file

@ -0,0 +1,92 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXCGImageLuminanceSource.h>
#import <zxing/ZXImage.h>
@implementation ZXCGImageLuminanceSource
+ (CGImageRef)createImageFromBuffer:(CVImageBufferRef)buffer {
return zxing::CGImageLuminanceSource::createImageFromBuffer(buffer);
}
+ (CGImageRef)createImageFromBuffer:(CVImageBufferRef)buffer
left:(size_t)left
top:(size_t)top
width:(size_t)width
height:(size_t)height {
return zxing::CGImageLuminanceSource::createImageFromBuffer
(buffer, left, top, width, height);
}
- (ZXCGImageLuminanceSource*)initWithZXImage:(ZXImage*)image
left:(size_t)left
top:(size_t)top
width:(size_t)width
height:(size_t)height {
[super initWithNative:new zxing::CGImageLuminanceSource(image.cgimage, left, top, width, height)];
return self;
}
- (ZXCGImageLuminanceSource*)initWithZXImage:(ZXImage*)image {
[super initWithNative:new zxing::CGImageLuminanceSource(image.cgimage)];
return self;
}
- (ZXCGImageLuminanceSource*)initWithCGImage:(CGImageRef)image
left:(size_t)left
top:(size_t)top
width:(size_t)width
height:(size_t)height {
[super initWithNative:new zxing::CGImageLuminanceSource(image, left, top, width, height)];
return self;
}
- (ZXCGImageLuminanceSource*)initWithCGImage:(CGImageRef)image {
[super initWithNative:new zxing::CGImageLuminanceSource(image)];
return self;
}
- (ZXCGImageLuminanceSource*)initWithBuffer:(CVPixelBufferRef)buffer
left:(size_t)left
top:(size_t)top
width:(size_t)width
height:(size_t)height {
[super initWithNative:new zxing::CGImageLuminanceSource(buffer, left, top, width, height)];
return self;
}
- (ZXCGImageLuminanceSource*)initWithBuffer:(CVPixelBufferRef)buffer {
[super initWithNative:new zxing::CGImageLuminanceSource(buffer)];
return self;
}
- (CGImageRef)image {
zxing::LuminanceSource* source = native;
zxing::CGImageLuminanceSource* typed = (zxing::CGImageLuminanceSource*)source;
return typed->image();
}
/*
- (CGImageRef)createImageWithWidth:(size_t)width andHeight:(size_t)height {
zxing::LuminanceSource* source = native;
zxing::CGImageLuminanceSource* typed = (zxing::CGImageLuminanceSource*)source;
return typed->createImage(width, height);
}
*/
@end

134
objc/src/zxing/ZXCapture.h Normal file
View file

@ -0,0 +1,134 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXCaptureDelegate.h>
#if !TARGET_IPHONE_SIMULATOR
#if TARGET_OS_EMBEDDED
#include <AVFoundation/AVFoundation.h>
#define ZX(x) x
#define ZXAV(x) x
#define ZXAVC(x) ,x
#define ZXQT(x)
#define ZXCaptureSession AVCaptureSession
#define ZXCaptureVideoPreviewLayer AVCaptureVideoPreviewLayer
#define ZXCaptureDeviceInput AVCaptureDeviceInput
#define ZXCaptureVideoOutput AVCaptureVideoDataOutput
#else
#define ZX(x) x
#define ZXAV(x)
#define ZXAVC(x)
#define ZXQT(x) x
#define ZXCaptureSession QTCaptureSession
#define ZXCaptureVideoPreviewLayer QTCaptureLayer
#define ZXCaptureDeviceInput QTCaptureDeviceInput
#define ZXCaptureVideoOutput QTCaptureDecompressedVideoOutput
#endif
@interface ZXCapture
: NSObject
ZX(<CAAction ZXAVC(AVCaptureVideoDataOutputSampleBufferDelegate)>) {
ZX(
ZXCaptureSession* session;
ZXCaptureVideoPreviewLayer* layer;
ZXCaptureVideoOutput* output;
ZXCaptureDeviceInput* input;
id<ZXCaptureDelegate> delegate;
)
int order_in_skip;
int order_out_skip;
BOOL running;
BOOL on_screen;
CALayer* luminance;
CALayer* binary;
size_t width;
size_t height;
size_t reported_width;
size_t reported_height;
NSString* captureToFilename;
BOOL hard_stop;
int camera;
BOOL torch;
int device;
CGAffineTransform transform;
}
@property (nonatomic, assign) id<ZXCaptureDelegate> delegate;
@property (nonatomic, copy) NSString* captureToFilename;
@property (nonatomic) CGAffineTransform transform;
@property (nonatomic, readonly) ZXCaptureVideoOutput* output;
@property (nonatomic, readonly) CALayer* layer;
@property (nonatomic, readonly) CALayer* luminance;
@property (nonatomic, readonly) CALayer* binary;
- (id)init;
- (void)setLuminance:(BOOL)on_off;
- (void)setBinary:(BOOL)on_off;
- (void)start;
- (void)stop;
- (void)hard_stop;
- (void)order_skip;
@property (nonatomic, readonly) BOOL hasFront;
@property (nonatomic, readonly) BOOL hasBack;
@property (nonatomic, readonly) BOOL hasTorch;
@property (nonatomic, readonly) int front;
@property (nonatomic, readonly) int back;
@property (nonatomic) int camera;
@property (nonatomic) BOOL torch;
@end
#else
@interface ZXCapture : NSObject {
}
@property (nonatomic,assign) id<ZXCaptureDelegate> delegate;
@property (nonatomic,copy) NSString* captureToFilename;
@property (nonatomic) CGAffineTransform transform;
@property (nonatomic, readonly) void* output;
@property (nonatomic, readonly) CALayer* layer;
@property (nonatomic, readonly) CALayer* luminance;
@property (nonatomic, readonly) CALayer* binary;
- (id)init;
- (void)setLuminance:(BOOL)on_off;
- (void)setBinary:(BOOL)on_off;
- (void)start;
- (void)stop;
- (void)hard_stop;
- (void)order_skip;
@property (nonatomic,readonly) BOOL hasFront;
@property (nonatomic,readonly) BOOL hasBack;
@property (nonatomic,readonly) BOOL hasTorch;
@property (nonatomic,readonly) int front;
@property (nonatomic,readonly) int back;
@property (nonatomic) int camera;
@property (nonatomic) BOOL torch;
@end
#endif

619
objc/src/zxing/ZXCapture.mm Normal file
View file

@ -0,0 +1,619 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <zxing/ZXCapture.h>
#if !TARGET_IPHONE_SIMULATOR
#include <zxing/ZXCGImageLuminanceSource.h>
#include <zxing/ZXHybridBinarizer.h>
#include <zxing/ZXBinaryBitmap.h>
#include <zxing/ZXQRCodeReader.h>
#include <zxing/ZXDecodeHints.h>
#include <zxing/ZXResult.h>
#include <zxing/ZXReaderException.h>
#include <zxing/ZXIllegalArgumentException.h>
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
#define ZXCaptureDevice AVCaptureDevice
#define ZXCaptureOutput AVCaptureOutput
#define ZXMediaTypeVideo AVMediaTypeVideo
#define ZXCaptureConnection AVCaptureConnection
#else
#define ZXCaptureOutput QTCaptureOutput
#define ZXCaptureConnection QTCaptureConnection
#define ZXCaptureDevice QTCaptureDevice
#define ZXMediaTypeVideo QTMediaTypeVideo
#endif
@implementation ZXCapture
@synthesize delegate;
@synthesize transform;
@synthesize captureToFilename;
- (ZXCapture*)init {
if ((self = [super init])) {
on_screen = running = NO;
reported_width = 0;
reported_height = 0;
width = 1920;
height = 1080;
hard_stop = false;
device = -1;
order_in_skip = 0;
order_out_skip = 0;
transform = CGAffineTransformIdentity;
ZXQT({
transform.a = -1;
});
}
return self;
}
- (void)order_skip {
order_out_skip = order_in_skip = 1;
}
- (ZXCaptureDevice*)device {
ZXCaptureDevice* zxd = nil;
#if ZXAV(1)+0
NSArray* devices =
[ZXCaptureDevice
ZXAV(devicesWithMediaType:)
ZXQT(inputDevicesWithMediaType:) ZXMediaTypeVideo];
if ([devices count] > 0) {
if (device == -1) {
AVCaptureDevicePosition position = AVCaptureDevicePositionBack;
if (camera == self.front) {
position = AVCaptureDevicePositionFront;
}
for(unsigned int i=0; i < [devices count]; ++i) {
ZXCaptureDevice* dev = [devices objectAtIndex:i];
if (dev.position == position) {
device = i;
zxd = dev;
break;
}
}
}
if (!zxd && device != -1) {
zxd = [devices objectAtIndex:device];
}
}
#endif
if (!zxd) {
zxd =
[ZXCaptureDevice
ZXAV(defaultDeviceWithMediaType:)
ZXQT(defaultInputDeviceWithMediaType:) ZXMediaTypeVideo];
}
return zxd;
}
- (void)replaceInput {
if (session && input) {
[session removeInput:input];
[input release];
input = nil;
}
ZXCaptureDevice* zxd = [self device];
ZXQT([zxd open:nil]);
input =
[ZXCaptureDeviceInput deviceInputWithDevice:zxd
ZXAV(error:nil)];
[input retain];
[session addInput:input ZXQT(error:nil)];
}
- (ZXCaptureSession*)session {
if (session == 0) {
session = [[ZXCaptureSession alloc] init];
ZXAV({session.sessionPreset = AVCaptureSessionPresetMedium;});
[self replaceInput];
}
return session;
}
- (void)stop {
// NSLog(@"stop");
if (!running) {
return;
}
if (true ZXAV(&& self.session.running)) {
NSLog(@"stop running");
[self.session stopRunning];
} else {
// NSLog(@"already stopped");
}
running = false;
}
- (void)setOutputAttributes {
NSString* key = (NSString*)kCVPixelBufferPixelFormatTypeKey;
NSNumber* value = [NSNumber numberWithUnsignedInt:kCVPixelFormatType_32BGRA];
NSMutableDictionary* attributes =
[NSMutableDictionary dictionaryWithObject:value forKey:key];
key = (NSString*)kCVPixelBufferWidthKey;
value = [NSNumber numberWithUnsignedInt:width];
[attributes setObject:value forKey:key];
key = (NSString*)kCVPixelBufferHeightKey;
value = [NSNumber numberWithUnsignedInt:height];
[attributes setObject:value forKey:key];
[output ZXQT(setPixelBufferAttributes:)ZXAV(setVideoSettings:)attributes];
}
- (ZXCaptureVideoOutput*)output {
if (!output) {
output = [[ZXCaptureVideoOutput alloc] init];
[self setOutputAttributes];
[output ZXQT(setAutomaticallyDropsLateVideoFrames:)
ZXAV(setAlwaysDiscardsLateVideoFrames:)YES];
[output ZXQT(setDelegate:)ZXAV(setSampleBufferDelegate:)self
ZXAV(queue:dispatch_get_main_queue())];
[self.session addOutput:output ZXQT(error:nil)];
}
return output;
}
- (void)start {
// NSLog(@"start %@ %d %@ %@", self.session, running, output, delegate);
if (hard_stop) {
return;
}
if (delegate || luminance || binary) {
// for side effects
[self output];
}
if (false ZXAV(|| self.session.running)) {
// NSLog(@"already running");
} else {
static int i = 0;
if (++i == -2) {
abort();
}
NSLog(@"start running");
[self.session startRunning];
}
running = true;
}
- (void)start_stop {
// NSLog(@"ss %d %@ %d %@ %@ %@", running, delegate, on_screen, output, luminanceLayer, binary);
if ((!running && (delegate || on_screen)) ||
(!output &&
(delegate ||
(on_screen && (luminance || binary))))) {
[self start];
}
if (running && !delegate && !on_screen) {
[self stop];
}
}
- (void)setDelegate:(id<ZXCaptureDelegate>)_delegate {
delegate = _delegate;
if (delegate) {
hard_stop = false;
}
[self start_stop];
}
- (void)hard_stop {
hard_stop = true;
if (running) {
[self stop];
}
}
- (void)setLuminance:(BOOL)on {
if (on && !luminance) {
[luminance release];
luminance = [[CALayer layer] retain];
} else if (!on && luminance) {
[luminance release];
luminance = nil;
}
}
- (CALayer*)luminance {
return luminance;
}
- (void)setBinary:(BOOL)on {
if (on && !binary) {
[binary release];
binary = [[CALayer layer] retain];
} else if (!on && binary) {
[binary release];
binary = nil;
}
}
- (CALayer*)binary {
return binary;
}
- (CALayer*)layer {
if (!layer) {
layer = [[ZXCaptureVideoPreviewLayer alloc] initWithSession:self.session];
ZXAV(layer.videoGravity = AVLayerVideoGravityResizeAspect);
ZXAV(layer.videoGravity = AVLayerVideoGravityResizeAspectFill);
[layer setAffineTransform:transform];
layer.delegate = self;
ZXQT({
ProcessSerialNumber psn;
GetCurrentProcess(&psn);
TransformProcessType(&psn, 1);
});
}
return layer;
}
- (void)runActionForKey:(NSString *)key
object:(id)anObject
arguments:(NSDictionary *)dict {
// NSLog(@" rAFK %@ %@ %@", key, anObject, dict);
(void)anObject;
(void)dict;
if ([key isEqualToString:kCAOnOrderIn]) {
if (order_in_skip) {
--order_in_skip;
// NSLog(@"order in skip");
return;
}
// NSLog(@"order in");
on_screen = true;
if (luminance && luminance.superlayer != layer) {
// [layer addSublayer:luminance];
}
if (binary && binary.superlayer != layer) {
// [layer addSublayer:binary];
}
[self start_stop];
} else if ([key isEqualToString:kCAOnOrderOut]) {
if (order_out_skip) {
--order_out_skip;
// NSLog(@"order out skip");
return;
}
on_screen = false;
// NSLog(@"order out");
[self start_stop];
}
}
- (id<CAAction>)actionForLayer:(CALayer*)_layer forKey:(NSString*)event {
(void)_layer;
// NSLog(@"layer event %@", event);
// never animate
[CATransaction setValue:[NSNumber numberWithFloat:0.0f]
forKey:kCATransactionAnimationDuration];
// NSLog(@"afl %@ %@", _layer, event);
if ([event isEqualToString:kCAOnOrderIn]
|| [event isEqualToString:kCAOnOrderOut]
// || ([event isEqualToString:@"bounds"] && (binary || luminance))
// || ([event isEqualToString:@"onLayout"] && (binary || luminance))
) {
return self;
} else if ([event isEqualToString:@"contents"] ) {
} else if ([event isEqualToString:@"sublayers"] ) {
} else if ([event isEqualToString:@"onLayout"] ) {
} else if ([event isEqualToString:@"position"] ) {
} else if ([event isEqualToString:@"bounds"] ) {
} else if ([event isEqualToString:@"layoutManager"] ) {
} else if ([event isEqualToString:@"transform"] ) {
} else {
NSLog(@"afl %@ %@", _layer, event);
}
return nil;
}
- (void)dealloc {
[captureToFilename release];
[binary release];
[luminance release];
[output release];
[input release];
[layer release];
[session release];
[super dealloc];
}
- (void)captureOutput:(ZXCaptureOutput*)captureOutput
ZXQT(didOutputVideoFrame:(CVImageBufferRef)videoFrame
withSampleBuffer:(QTSampleBuffer*)sampleBuffer)
ZXAV(didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer)
fromConnection:(ZXCaptureConnection*)connection {
if (!captureToFilename && !luminance && !binary && !delegate) {
// NSLog(@"skipping capture");
return;
}
// NSLog(@"received frame");
ZXAV(CVImageBufferRef videoFrame = CMSampleBufferGetImageBuffer(sampleBuffer));
// NSLog(@"%d %d", CVPixelBufferGetWidth(videoFrame), CVPixelBufferGetHeight(videoFrame));
// NSLog(@"delegate %@", delegate);
ZXQT({
if (!reported_width || !reported_height) {
CGSize size =
[[[[input.device.formatDescriptions objectAtIndex:0]
formatDescriptionAttributes] objectForKey:@"videoEncodedPixelsSize"] sizeValue];
width = size.width;
height = size.height;
[self performSelectorOnMainThread:@selector(setOutputAttributes) withObject:nil waitUntilDone:NO];
reported_width = size.width;
reported_height = size.height;
[delegate captureSize:self
width:[NSNumber numberWithFloat:size.width]
height:[NSNumber numberWithFloat:size.height]];
}});
(void)sampleBuffer;
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
(void)captureOutput;
(void)connection;
#if !TARGET_OS_EMBEDDED
// The routines don't exist in iOS. There are alternatives, but a good
// solution would have to figure out a reasonable path and might be
// better as a post to url
if (captureToFilename) {
CGImageRef image =
[ZXCGImageLuminanceSource createImageFromBuffer:videoFrame];
NSURL* url = [NSURL fileURLWithPath:captureToFilename];
CGImageDestinationRef dest =
CGImageDestinationCreateWithURL((CFURLRef)url, kUTTypePNG, 1, nil);
CGImageDestinationAddImage(dest, image, nil);
CGImageDestinationFinalize(dest);
CGImageRelease(image);
CFRelease(dest);
self.captureToFilename = nil;
}
#endif
ZXCGImageLuminanceSource* source
= [[[ZXCGImageLuminanceSource alloc]
initWithBuffer:videoFrame]
autorelease];
if (luminance) {
CGImageRef image = source.image;
CGImageRetain(image);
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0), dispatch_get_main_queue(), ^{
luminance.contents = (id)image;
CGImageRelease(image);
});
}
if (binary || delegate) {
// compiler issue?
ZXHybridBinarizer* binarizer = [ZXHybridBinarizer alloc];
[[binarizer initWithSource:source] autorelease];
if (binary) {
CGImageRef image = binarizer.createImage;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0), dispatch_get_main_queue(), ^{
binary.contents = (id)image;
CGImageRelease(image);
});
}
if (delegate) {
ZXDecodeHints* hints = [[[ZXDecodeHints alloc] init] autorelease];
ZXBinaryBitmap* bitmap =
[[[ZXBinaryBitmap alloc] initWithBinarizer:binarizer] autorelease];
@try {
ZXQRCodeReader* reader = [[[ZXQRCodeReader alloc] init] autorelease];
// NSLog(@"started decode");
ZXResult* result = [reader decode:bitmap hints:hints];
// NSLog(@"finished decode");
[delegate captureResult:self result:result];
} @catch (ZXReaderException* rex) {
if (![rex.reason isEqualToString:@"Could not find three finder patterns"]) {
// NSLog(@"failed to decode, caught ReaderException '%@'", rex.reason);
}
} @catch (ZXIllegalArgumentException* iex) {
// NSLog(@"failed to decode, caught IllegalArgumentException '%@'", iex.reason);
} @catch (id ue) {
NSLog(@"Caught unknown exception: %@", ue);
}
}
// NSLog(@"finished frame");
}
[pool drain];
}
- (BOOL)hasFront {
NSArray* devices =
[ZXCaptureDevice
ZXAV(devicesWithMediaType:)
ZXQT(inputDevicesWithMediaType:) ZXMediaTypeVideo];
return [devices count] > 1;
}
- (BOOL)hasBack {
NSArray* devices =
[ZXCaptureDevice
ZXAV(devicesWithMediaType:)
ZXQT(inputDevicesWithMediaType:) ZXMediaTypeVideo];
return [devices count] > 0;
}
- (BOOL)hasTorch {
if ([self device]) {
return false ZXAV(|| [self device].hasTorch);
} else {
return NO;
}
}
- (int)front {
return 0;
}
- (int)back {
return 1;
}
- (int)camera {
return camera;
}
- (BOOL)torch {
return torch;
}
- (void)setCamera:(int)camera_ {
if (camera != camera_) {
camera = camera_;
device = -1;
if (running) {
[self replaceInput];
}
}
}
- (void)setTorch:(BOOL)torch_ {
(void)torch_;
ZXAV({
[input.device lockForConfiguration:nil];
switch(input.device.torchMode) {
case AVCaptureTorchModeOff:
case AVCaptureTorchModeAuto:
default:
input.device.torchMode = AVCaptureTorchModeOn;
break;
case AVCaptureTorchModeOn:
input.device.torchMode = AVCaptureTorchModeOff;
break;
}
[input.device unlockForConfiguration];
});
}
- (void)setTransform:(CGAffineTransform)transform_ {
transform = transform_;
[layer setAffineTransform:transform];
}
@end
#else
@implementation ZXCapture
@synthesize delegate;
@synthesize transform;
@synthesize captureToFilename;
- (id)init {
return 0;
}
- (CALayer*)layer {
return 0;
}
- (CALayer*)luminance {
return 0;
}
- (CALayer*)binary {
return 0;
}
- (void)setLuminance:(BOOL)on {}
- (void)setBinary:(BOOL)on {}
- (void)hard_stop {
}
- (BOOL)hasFront {
return YES;
}
- (BOOL)hasBack {
return NO;
}
- (BOOL)hasTorch {
return NO;
}
- (int)front {
return 0;
}
- (int)back {
return 1;
}
- (int)camera {
return self.front;
}
- (BOOL)torch {
return NO;
}
- (void)setCamera:(int)camera_ {}
- (void)setTorch:(BOOL)torch {}
- (void)order_skip {}
- (void)start {}
- (void)stop {}
- (void*)output {return 0;}
@end
#endif

View file

@ -0,0 +1,28 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@class ZXCapture;
@class ZXResult;
@protocol ZXCaptureDelegate <NSObject>
- (void)captureResult:(ZXCapture*)capture result:(ZXResult*)result;
- (void)captureSize:(ZXCapture*)capture
width:(NSNumber*)width
height:(NSNumber*)height;
@end

View file

@ -0,0 +1,25 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <zxing/ZXView.h>
@interface ZXCaptureView : ZXView {
}
- (ZXCaptureView*)init;
@end

View file

@ -0,0 +1,33 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <zxing/ZXCaptureView.h>
@implementation ZXCaptureView {
}
- (ZXCaptureView*)init {
if ((self = [super init])) {
}
return self;
}
- (void) dealloc {
[super dealloc];
}
@end

View file

@ -0,0 +1,28 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/DecodeHints.h>
@interface ZXDecodeHints : NSObject {
zxing::DecodeHints* native;
}
@property (readonly) zxing::DecodeHints* native;
- (ZXDecodeHints*)init;
@end

View file

@ -0,0 +1,36 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXDecodeHints.h>
@implementation ZXDecodeHints
@synthesize native;
- (ZXDecodeHints*)init {
if ((self = [super init])) {
native = new zxing::DecodeHints;
}
return self;
}
- (void)dealloc {
delete native;
[super dealloc];
}
@end

View file

@ -0,0 +1,26 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXBinarizer.h>
#import <zxing/common/HybridBinarizer.h>
@interface ZXHybridBinarizer : ZXBinarizer {
}
- (ZXHybridBinarizer*)initWithSource:(ZXLuminanceSource*)source;
@end

View file

@ -0,0 +1,29 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXHybridBinarizer.h>
@implementation ZXHybridBinarizer
- (ZXHybridBinarizer*)initWithSource:(ZXLuminanceSource*)source {
zxing::HybridBinarizer* hybrid =
new zxing::HybridBinarizer(zxing::Ref<zxing::LuminanceSource>([source native]));
[super initWithNative:hybrid];
return self;
}
@end

View file

@ -0,0 +1,21 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface ZXIllegalArgumentException : NSException {
}
@end

View file

@ -0,0 +1,23 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXIllegalArgumentException.h>
@implementation ZXIllegalArgumentException {
}
@end

28
objc/src/zxing/ZXImage.h Normal file
View file

@ -0,0 +1,28 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface ZXImage : NSObject {
CGImageRef cgimage;
}
@property (readonly) CGImageRef cgimage;
- (ZXImage*)initWithURL:(NSURL const*)url;
- (size_t)width;
- (size_t)height;
@end

62
objc/src/zxing/ZXImage.mm Normal file
View file

@ -0,0 +1,62 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXImage.h>
@implementation ZXImage
@synthesize cgimage;
- (ZXImage*)initWithURL:(NSURL const*)url {
CGDataProviderRef provider = CGDataProviderCreateWithURL((CFURLRef)url);
if (provider) {
CGImageSourceRef source = CGImageSourceCreateWithDataProvider(provider, 0);
if (source) {
cgimage = CGImageSourceCreateImageAtIndex(source, 0, 0);
CFRelease(source);
}
CGDataProviderRelease(provider);
}
if (cgimage) {
return self;
} else {
return 0;
}
}
- (size_t)width {
return CGImageGetWidth(cgimage);
}
- (size_t)height {
return CGImageGetHeight(cgimage);
}
- (void)dealloc {
if (cgimage) {
CGImageRelease(cgimage);
}
[super dealloc];
}
@end

18
objc/src/zxing/ZXInit.c Normal file
View file

@ -0,0 +1,18 @@
// -*- mode:c; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
void Init_zxing(void){}

View file

@ -0,0 +1,27 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/LuminanceSource.h>
@interface ZXLuminanceSource : NSObject {
zxing::Ref<zxing::LuminanceSource> native;
}
- (ZXLuminanceSource*)initWithNative:(zxing::LuminanceSource*)native;
- (zxing::LuminanceSource*)native;
@end

View file

@ -0,0 +1,36 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXLuminanceSource.h>
@implementation ZXLuminanceSource
- (ZXLuminanceSource*)initWithNative:(zxing::LuminanceSource*)_native {
native = _native;
return self;
}
- (zxing::LuminanceSource*)native {
return native;
}
- (void)dealloc {
native = 0;
[super dealloc];
}
@end

View file

@ -0,0 +1,25 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXReader.h>
@interface ZXMultiFormatReader : ZXReader {
}
- (ZXMultiFormatReader*)init;
@end

View file

@ -0,0 +1,29 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/MultiFormatReader.h>
#import <zxing/ZXMultiFormatReader.h>
@implementation ZXMultiFormatReader
- (ZXMultiFormatReader*)init {
zxing::MultiFormatReader* multi = new zxing::MultiFormatReader();
[super initWithReader:multi];
return self;
}
@end

View file

@ -0,0 +1,25 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXReader.h>
@interface ZXQRCodeReader : ZXReader {
}
- (ZXQRCodeReader*)init;
@end

View file

@ -0,0 +1,29 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/qrcode/QRCodeReader.h>
#import <zxing/ZXQRCodeReader.h>
@implementation ZXQRCodeReader
- (ZXQRCodeReader*)init {
zxing::qrcode::QRCodeReader* multi = new zxing::qrcode::QRCodeReader();
[super initWithReader:multi];
return self;
}
@end

31
objc/src/zxing/ZXReader.h Normal file
View file

@ -0,0 +1,31 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/Reader.h>
@class ZXBinaryBitmap;
@class ZXDecodeHints;
@class ZXResult;
@interface ZXReader : NSObject {
zxing::Ref<zxing::Reader> reader;
}
- (ZXReader*)initWithReader:(zxing::Reader*)reader;
- (ZXResult*)decode:(ZXBinaryBitmap*)bitmap hints:(ZXDecodeHints*)hints;
@end

View file

@ -0,0 +1,58 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXReader.h>
#import <zxing/ZXResult.h>
#import <zxing/ZXBinaryBitmap.h>
#import <zxing/ZXDecodeHints.h>
#import <zxing/ReaderException.h>
#import <zxing/ZXReaderException.h>
#import <zxing/common/IllegalArgumentException.h>
#import <zxing/ZXIllegalArgumentException.h>
@implementation ZXReader
- (ZXReader*)initWithReader:(zxing::Reader*)_reader {
reader = _reader;
return self;
}
- (ZXResult*)decode:(ZXBinaryBitmap*)bitmap hints:(ZXDecodeHints*)hints {
try {
zxing::Ref<zxing::Result> result (reader->decode(
zxing::Ref<zxing::BinaryBitmap>([bitmap native]),
*[hints native]));
return [[[ZXResult alloc] initWithNative:result] autorelease];
} catch (zxing::ReaderException const& re) {
NSString* s = [NSString stringWithCString:re.what() encoding:NSUTF8StringEncoding];
NSException* e = [[[ZXReaderException alloc] initWithName:@"ZXReaderException"
reason:s
userInfo:nil] autorelease];
@throw e;
} catch (zxing::IllegalArgumentException const& iae) {
NSString* s = [NSString stringWithCString:iae.what() encoding:NSUTF8StringEncoding];
NSException* e = [[[ZXIllegalArgumentException alloc]
initWithName:@"ZXIllegalArgumntException"
reason:s
userInfo:nil] autorelease];
@throw e;
}
/* not reachable */
return nil;
}
@end

View file

@ -0,0 +1,21 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface ZXReaderException : NSException {
}
@end

View file

@ -0,0 +1,23 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXReaderException.h>
@implementation ZXReaderException {
}
@end

27
objc/src/zxing/ZXResult.h Normal file
View file

@ -0,0 +1,27 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/Result.h>
@interface ZXResult : NSObject {
zxing::Ref<zxing::Result> native;
}
- (ZXResult*)initWithNative:(zxing::Result*)native;
- (NSString*)text;
@end

View file

@ -0,0 +1,39 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <zxing/ZXResult.h>
@implementation ZXResult
- (ZXResult*)initWithNative:(zxing::Result*)result {
if ((self = [super init])) {
native = result;
}
return self;
}
- (void)dealloc {
native = 0;
[super dealloc];
}
- (NSString*)text {
return [NSString stringWithCString:native->getText()->getText().c_str()
encoding:NSUTF8StringEncoding];
}
@end

22
objc/src/zxing/ZXView.h Normal file
View file

@ -0,0 +1,22 @@
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
#define ZXView UIView
#else
#define ZXView NSView
#endif