├── Crashlytics.framework ├── Versions │ ├── Current │ └── A │ │ ├── Crashlytics │ │ └── Resources │ │ └── Info.plist ├── Headers ├── Resources ├── Crashlytics └── run ├── appstore.png ├── ios_128.png ├── osx_128.png ├── proxy.pac.gz ├── ShadowWeb ├── libev │ ├── autogen.sh │ ├── Symbols.event │ ├── configure.ac │ └── Makefile.am ├── en.lproj │ ├── InfoPlist.strings │ └── Localizable.strings ├── cancel.png ├── zh-Hans.lproj │ └── InfoPlist.strings ├── Default.png ├── silence.wav ├── Default@2x.png ├── Default-568h@2x.png ├── SWBNewTabButton.h ├── table.h ├── SWBSmallCloseButtonHighlightView.h ├── SWBPage.m ├── QRCodeViewController.h ├── SWBTab.m ├── SWBTab.h ├── SWBNetworkActivityIndicatorManager.h ├── SWBSmallCloseButton.h ├── main.m ├── shadowsocks-Prefix.pch ├── ProxySettingsTableViewController.h ├── SWBPage.h ├── SWBAboutController.h ├── SimpleTableViewSource.h ├── SWBWebView.h ├── socks5.h ├── SWBPageManager.h ├── SWBTabView.h ├── SWBAppDelegate.h ├── SWBNetworkActivityIndicatorManager.m ├── ShadowsocksRunner.h └── encrypt.h ├── .travis.yml ├── ShadowsocksX ├── en.lproj │ ├── InfoPlist.strings │ └── Credits.rtf ├── menu_icon.png ├── menu_icon@2x.png ├── menu_icon_disabled.png ├── menu_icon_disabled@2x.png ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── 128.png │ │ ├── 16.png │ │ ├── 256.png │ │ ├── 32.png │ │ ├── 512.png │ │ ├── 64.png │ │ ├── 256-1.png │ │ └── 32-1.png │ ├── AppIcon-2.appiconset │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 144.png │ │ ├── 57.png │ │ └── 72.png │ └── LaunchImage.launchimage │ │ ├── Default.png │ │ ├── Default@2x.png │ │ └── Default-568h@2x.png ├── SWBApplication.h ├── ShadowsocksX-Prefix.pch ├── main.m ├── models │ └── profile.json ├── ProfileManager.h ├── SWBAppDelegate.h ├── SWBQRCodeWindowController.h ├── Configuration.h ├── install_helper.sh ├── Profile.h ├── qrcode.htm └── SWBQRCodeWindowController.m ├── ShadowsocksXTests ├── en.lproj │ └── InfoPlist.strings ├── ShadowsocksXTests-Info.plist └── ShadowsocksXTests.m ├── packaging └── osx │ ├── arrow.png │ └── build_dmg.sh ├── .gitignore ├── zxing-objc ├── ios-Prefix.pch ├── osx-Prefix.pch ├── NOTICE └── ZXingObjC │ ├── aztec │ ├── encoder │ │ └── ZXAztecCode.m │ ├── ZXAztecWriter.h │ ├── ZXAztecReader.h │ ├── decoder │ │ └── ZXAztecDecoder.h │ ├── detector │ │ └── ZXAztecDetector.h │ ├── ZXAztecDetectorResult.m │ └── ZXAztecDetectorResult.h │ ├── client │ ├── ZXCaptureView.h │ ├── ZXCaptureView.m │ ├── result │ │ ├── ZXBookmarkDoCoMoResultParser.h │ │ ├── ZXISBNResultParser.h │ │ ├── ZXProductResultParser.h │ │ ├── ZXTelResultParser.h │ │ ├── ZXExpandedProductResultParser.h │ │ ├── ZXURIResultParser.h │ │ ├── ZXISBNParsedResult.h │ │ ├── ZXAddressBookAUResultParser.h │ │ ├── ZXEmailAddressResultParser.h │ │ ├── ZXVEventResultParser.h │ │ ├── ZXSMTPResultParser.h │ │ ├── ZXURLTOResultParser.h │ │ ├── ZXEmailDoCoMoResultParser.h │ │ ├── ZXGeoResultParser.h │ │ ├── ZXWifiResultParser.h │ │ ├── ZXBizcardResultParser.h │ │ ├── ZXURIParsedResult.h │ │ ├── ZXISBNParsedResult.m │ │ ├── ZXTelParsedResult.h │ │ ├── ZXSMSTOMMSTOResultParser.h │ │ ├── ZXTextParsedResult.h │ │ ├── ZXAbstractDoCoMoResultParser.m │ │ └── ZXAbstractDoCoMoResultParser.h │ ├── ZXView.h │ ├── ZXImage.h │ └── ZXCaptureDelegate.h │ ├── datamatrix │ ├── encoder │ │ ├── ZXTextEncoder.h │ │ ├── ZXX12Encoder.h │ │ ├── ZXDataMatrixSymbolInfo144.h │ │ ├── ZXASCIIEncoder.h │ │ ├── ZXBase256Encoder.h │ │ ├── ZXEdifactEncoder.h │ │ ├── ZXDataMatrixEncoder.h │ │ ├── ZXDataMatrixErrorCorrection.h │ │ ├── ZXSymbolShapeHint.h │ │ ├── ZXC40Encoder.h │ │ └── ZXDataMatrixSymbolInfo144.m │ ├── ZXDataMatrixWriter.h │ ├── ZXDataMatrixReader.h │ ├── detector │ │ └── ZXDataMatrixDetector.h │ └── decoder │ │ ├── ZXDataMatrixDecodedBitStreamParser.h │ │ └── ZXDataMatrixDecoder.h │ ├── pdf417 │ ├── ZXPDF417ResultMetadata.m │ ├── ZXPDF417Writer.h │ ├── decoder │ │ ├── ZXPDF417CodewordDecoder.h │ │ ├── ZXPDF417BarcodeValue.h │ │ ├── ZXPDF417DecodedBitStreamParser.h │ │ ├── ec │ │ │ └── ZXPDF417ECErrorCorrection.h │ │ └── ZXPDF417Codeword.h │ ├── encoder │ │ ├── ZXCompaction.h │ │ ├── ZXDimensions.m │ │ ├── ZXBarcodeRow.h │ │ ├── ZXDimensions.h │ │ ├── ZXPDF417HighLevelEncoder.h │ │ └── ZXPDF417ErrorCorrection.h │ ├── ZXPDF417ResultMetadata.h │ ├── detector │ │ ├── ZXPDF417DetectorResult.h │ │ └── ZXPDF417DetectorResult.m │ └── ZXPDF417Reader.h │ ├── oned │ ├── ZXCodaBarWriter.h │ ├── rss │ │ ├── expanded │ │ │ ├── decoders │ │ │ │ ├── ZXAI01392xDecoder.h │ │ │ │ ├── ZXAI01393xDecoder.h │ │ │ │ ├── ZXAI01AndOtherAIs.h │ │ │ │ ├── ZXAI01320xDecoder.h │ │ │ │ ├── ZXAI013x0xDecoder.h │ │ │ │ ├── ZXAnyAIDecoder.h │ │ │ │ ├── ZXFieldParser.h │ │ │ │ ├── ZXDecodedObject.h │ │ │ │ ├── ZXAI013103decoder.h │ │ │ │ ├── ZXAI013x0x1xDecoder.h │ │ │ │ ├── ZXDecodedObject.m │ │ │ │ ├── ZXCurrentParsingState.h │ │ │ │ ├── ZXDecodedChar.h │ │ │ │ ├── ZXAI013103decoder.m │ │ │ │ ├── ZXAI01weightDecoder.h │ │ │ │ ├── ZXAI01decoder.h │ │ │ │ ├── ZXBlockParsedResult.h │ │ │ │ ├── ZXDecodedChar.m │ │ │ │ ├── ZXAnyAIDecoder.m │ │ │ │ ├── ZXAI01320xDecoder.m │ │ │ │ ├── ZXAbstractExpandedDecoder.h │ │ │ │ ├── ZXBlockParsedResult.m │ │ │ │ ├── ZXDecodedInformation.h │ │ │ │ ├── ZXDecodedNumeric.h │ │ │ │ └── ZXGeneralAppIdDecoder.h │ │ │ ├── ZXBitArrayBuilder.h │ │ │ └── ZXExpandedRow.h │ │ ├── ZXRSS14Reader.h │ │ ├── ZXDataCharacter.h │ │ ├── ZXPair.h │ │ ├── ZXRSSFinderPattern.h │ │ ├── ZXRSSUtils.h │ │ └── ZXPair.m │ ├── ZXCode93Reader.h │ ├── ZXEAN8Reader.h │ ├── ZXUPCAReader.h │ ├── ZXEAN8Writer.h │ ├── ZXUPCAWriter.h │ ├── ZXEAN13Writer.h │ ├── ZXMultiFormatOneDReader.h │ ├── ZXITFWriter.h │ ├── ZXCode128Writer.h │ ├── ZXCode39Writer.h │ ├── ZXEAN13Reader.h │ ├── ZXUPCEANExtensionSupport.h │ ├── ZXUPCEANWriter.h │ ├── ZXUPCEANWriter.m │ ├── ZXUPCEReader.h │ ├── ZXUPCEANExtension2Support.h │ ├── ZXUPCEANExtension5Support.h │ ├── ZXCodaBarReader.h │ ├── ZXMultiFormatUPCEANReader.h │ ├── ZXEANManufacturerOrgSupport.h │ ├── ZXOneDimensionalCodeWriter.h │ └── ZXCode39Reader.h │ ├── ZXEncodeHints.m │ ├── common │ ├── ZXDefaultGridSampler.h │ ├── detector │ │ ├── ZXMathUtils.h │ │ ├── ZXMonochromeRectangleDetector.h │ │ └── ZXMathUtils.m │ ├── ZXStringUtils.h │ ├── ZXDetectorResult.m │ ├── ZXECI.h │ ├── reedsolomon │ │ └── ZXReedSolomonEncoder.h │ ├── ZXCharacterSetECI.h │ └── ZXDecoderResult.m │ ├── qrcode │ ├── ZXQRCodeWriter.h │ ├── ZXQRCodeReader.h │ ├── encoder │ │ ├── ZXMaskUtil.h │ │ ├── ZXBlockPair.h │ │ ├── ZXQRCode.h │ │ └── ZXByteMatrix.h │ ├── detector │ │ ├── ZXFinderPatternInfo.m │ │ └── ZXAlignmentPattern.h │ └── decoder │ │ ├── ZXQRCodeBitMatrixParser.h │ │ └── ZXFormatInformation.h │ ├── maxicode │ ├── decoder │ │ ├── ZXMaxiCodeBitMatrixParser.h │ │ ├── ZXMaxiCodeDecodedBitStreamParser.h │ │ └── ZXMaxiCodeDecoder.h │ └── ZXMaxiCodeReader.h │ ├── multi │ ├── qrcode │ │ ├── ZXQRCodeMultiReader.h │ │ └── detector │ │ │ └── ZXMultiDetector.h │ └── ZXMultipleBarcodeReader.h │ ├── ZXDimension.h │ ├── ZXMultiFormatWriter.h │ ├── ZXResultPointCallback.h │ ├── ZXInvertedLuminanceSource.h │ ├── ZXRGBLuminanceSource.h │ └── ZXWriter.h ├── shadowsocks_sysconf └── shadowsocks_sysconf-Prefix.pch ├── OSXChangeLog.md ├── .gitmodules ├── CONTRIBUTING.md ├── About.md └── README.md /Crashlytics.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /Crashlytics.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /Crashlytics.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /Crashlytics.framework/Crashlytics: -------------------------------------------------------------------------------- 1 | Versions/Current/Crashlytics -------------------------------------------------------------------------------- /appstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/appstore.png -------------------------------------------------------------------------------- /ios_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ios_128.png -------------------------------------------------------------------------------- /osx_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/osx_128.png -------------------------------------------------------------------------------- /proxy.pac.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/proxy.pac.gz -------------------------------------------------------------------------------- /ShadowWeb/libev/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | autoreconf --install --symlink --force 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | xcode_sdk: iphonesimulator 3 | script: ./build.sh 4 | -------------------------------------------------------------------------------- /ShadowWeb/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ShadowsocksX/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ShadowWeb/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowWeb/cancel.png -------------------------------------------------------------------------------- /ShadowWeb/zh-Hans.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ShadowsocksXTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ShadowWeb/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowWeb/Default.png -------------------------------------------------------------------------------- /ShadowWeb/silence.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowWeb/silence.wav -------------------------------------------------------------------------------- /Crashlytics.framework/run: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/Crashlytics.framework/run -------------------------------------------------------------------------------- /ShadowWeb/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowWeb/Default@2x.png -------------------------------------------------------------------------------- /packaging/osx/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/packaging/osx/arrow.png -------------------------------------------------------------------------------- /ShadowsocksX/menu_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/menu_icon.png -------------------------------------------------------------------------------- /ShadowWeb/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowWeb/Default-568h@2x.png -------------------------------------------------------------------------------- /ShadowsocksX/menu_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/menu_icon@2x.png -------------------------------------------------------------------------------- /ShadowsocksX/menu_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/menu_icon_disabled.png -------------------------------------------------------------------------------- /ShadowsocksX/menu_icon_disabled@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/menu_icon_disabled@2x.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .idea/ 3 | shadowsocks.xcodeproj/project.xcworkspace/ 4 | shadowsocks.xcodeproj/xcuserdata/ 5 | .DS_STORE 6 | *.dmg 7 | -------------------------------------------------------------------------------- /Crashlytics.framework/Versions/A/Crashlytics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/Crashlytics.framework/Versions/A/Crashlytics -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/114.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/120.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/144.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/57.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon-2.appiconset/72.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon.appiconset/256-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon.appiconset/256-1.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/AppIcon.appiconset/32-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/AppIcon.appiconset/32-1.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /ShadowWeb/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | ShadowWeb 4 | 5 | Created by clowwindy on 6/17/13. 6 | Copyright (c) 2013 clowwindy. All rights reserved. 7 | */ 8 | -------------------------------------------------------------------------------- /ShadowsocksX/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slacka/shadowsocks-iOS/HEAD/ShadowsocksX/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /zxing-objc/ios-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ZXingObjC' target in the 'ZXingObjC' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /zxing-objc/osx-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ZXingObjC' target in the 'ZXingObjC' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | 7 | #import 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /ShadowsocksX/SWBApplication.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by clowwindy on 3/1/14. 3 | // Copyright (c) 2014 clowwindy. All rights reserved. 4 | // 5 | 6 | #import 7 | 8 | 9 | @interface SWBApplication : NSApplication 10 | @end -------------------------------------------------------------------------------- /shadowsocks_sysconf/shadowsocks_sysconf-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /ShadowsocksX/ShadowsocksX-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | 11 | #define _L(s) NSLocalizedString(@#s, nil) -------------------------------------------------------------------------------- /packaging/osx/build_dmg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -ne 1 ] 4 | then 5 | echo 'build_dmg.sh version' 6 | exit 1 7 | fi 8 | 9 | dmgbuild -s settings.py 'Shadowsocks' ShadowsocksX-$1.dmg 10 | rsync --progress -e ssh ShadowsocksX-$1.dmg frs.sourceforge.net:/home/frs/project/shadowsocksgui/dist/ 11 | 12 | -------------------------------------------------------------------------------- /ShadowWeb/SWBNewTabButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBNewTabButton.h 3 | // SWBuaWeb 4 | // 5 | // Created by clowwindy on 11-6-12. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface SWBNewTabButton : UIButton { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ShadowsocksX/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ShadowsocksX 4 | // 5 | // Created by clowwindy on 14-2-19. 6 | // Copyright (c) 2014年 clowwindy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) 12 | { 13 | return NSApplicationMain(argc, argv); 14 | } 15 | -------------------------------------------------------------------------------- /ShadowWeb/table.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | unsigned char encrypt_table[256]; 5 | unsigned char decrypt_table[256]; 6 | void get_table(const unsigned char* key); 7 | void table_encrypt(unsigned char *buf, size_t len); 8 | void table_decrypt(unsigned char *buf, size_t len); 9 | 10 | unsigned int _i; 11 | unsigned long long _a; 12 | -------------------------------------------------------------------------------- /ShadowsocksX/models/profile.json: -------------------------------------------------------------------------------- 1 | { 2 | "__class__": "Configuration", 3 | "current": 0, 4 | "profiles": [{ 5 | "__class__": "Profile", 6 | "server":"1.2.3.4", 7 | "server_port":8388, 8 | "password":"barfoo!", 9 | "method":"aes-256-cfb", 10 | "remarks":"test" 11 | }] 12 | } 13 | -------------------------------------------------------------------------------- /ShadowWeb/SWBSmallCloseButtonHighlightView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBSmallCloseButtonHighlightView.h 3 | // SWBuaWeb 4 | // 5 | // Created by clowwindy on 11-6-10. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface SWBSmallCloseButtonHighlightView : UIView { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ShadowsocksX/ProfileManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by clowwindy on 11/3/14. 3 | // Copyright (c) 2014 clowwindy. All rights reserved. 4 | // 5 | 6 | #import 7 | #import "Configuration.h" 8 | 9 | @interface ProfileManager : NSObject 10 | 11 | + (Configuration *)configuration; 12 | + (void)saveConfiguration:(Configuration *)configuration; 13 | + (void)reloadShadowsocksRunner; 14 | 15 | @end -------------------------------------------------------------------------------- /ShadowsocksX/SWBAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBAppDelegate.h 3 | // ShadowsocksX 4 | // 5 | // Created by clowwindy on 14-2-19. 6 | // Copyright (c) 2014年 clowwindy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SWBAppDelegate : NSObject 12 | 13 | @property (assign) IBOutlet NSWindow *window; 14 | @property (nonatomic, strong) NSStatusItem* item; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ShadowWeb/SWBPage.m: -------------------------------------------------------------------------------- 1 | // 2 | // AQPage.m 3 | // AquaWeb 4 | // 5 | // Created by clowwindy on 11-6-18. 6 | // Copyright (c) 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SWBPage.h" 10 | 11 | 12 | @implementation SWBPage 13 | @synthesize title; 14 | @synthesize url; 15 | @synthesize selected; 16 | @synthesize tag; 17 | 18 | - (BOOL)isSelected { 19 | return [self.selected boolValue]; 20 | } 21 | @end 22 | -------------------------------------------------------------------------------- /ShadowWeb/libev/Symbols.event: -------------------------------------------------------------------------------- 1 | event_active 2 | event_add 3 | event_base_dispatch 4 | event_base_free 5 | event_base_loop 6 | event_base_loopexit 7 | event_base_once 8 | event_base_priority_init 9 | event_base_set 10 | event_del 11 | event_dispatch 12 | event_get_method 13 | event_get_version 14 | event_init 15 | event_loop 16 | event_loopexit 17 | event_once 18 | event_pending 19 | event_priority_init 20 | event_priority_set 21 | event_set 22 | -------------------------------------------------------------------------------- /ShadowWeb/QRCodeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by clowwindy on 14-2-17. 3 | // Copyright (c) 2014 clowwindy. All rights reserved. 4 | // 5 | 6 | #import 7 | #import 8 | 9 | typedef void (^QRCodeViewControllerReturnBlock)(NSString *code); 10 | 11 | @interface QRCodeViewController : UIViewController 12 | 13 | -(id)initWithReturnBlock:(QRCodeViewControllerReturnBlock)block; 14 | 15 | @end -------------------------------------------------------------------------------- /ShadowWeb/SWBTab.m: -------------------------------------------------------------------------------- 1 | // 2 | // SWBTab.m 3 | // SWBuaWeb 4 | // 5 | // Created by clowwindy on 11-6-12. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SWBTab.h" 10 | 11 | 12 | @implementation SWBTab 13 | 14 | @synthesize title, tag; 15 | 16 | - (id)initWithTag:(NSInteger)aTag { 17 | self = [super init]; 18 | if (self) { 19 | self->tag = aTag; 20 | } 21 | return self; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ShadowWeb/SWBTab.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBTab.h 3 | // SWBuaWeb 4 | // 5 | // Created by clowwindy on 11-6-12. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface SWBTab : NSObject { 13 | NSInteger tag; 14 | } 15 | 16 | - (id)initWithTag:(NSInteger)aTag; 17 | 18 | @property (nonatomic, strong) NSString *title; 19 | @property (nonatomic, readonly) NSInteger tag; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ShadowWeb/SWBNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBNetworkActivityIndicatorManager.h 3 | // AquaWeb 4 | // 5 | // Created by clowwindy on 11-7-3. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface SWBNetworkActivityIndicatorManager : NSObject { 13 | NSMutableSet *sources; 14 | } 15 | 16 | -(void)setSourceActivityStatusIsBusy:(id)source busy:(BOOL)busy; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ShadowsocksX/SWBQRCodeWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // QRCodeWindowController.h 3 | // shadowsocks 4 | // 5 | // Created by clowwindy on 10/12/14. 6 | // Copyright (c) 2014 clowwindy. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface SWBQRCodeWindowController : NSWindowController 13 | 14 | @property (nonatomic, strong) IBOutlet WebView *webView; 15 | @property (nonatomic, copy) NSString *qrCode; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ShadowWeb/SWBSmallCloseButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBSmallCloseButton.h 3 | // SWBuaWeb 4 | // 5 | // Created by clowwindy on 11-6-10. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SWBSmallCloseButtonHighlightView.h" 11 | 12 | @interface SWBSmallCloseButton : UIButton { 13 | SWBSmallCloseButtonHighlightView *highlightView; 14 | } 15 | 16 | @property (nonatomic, assign) CGFloat radius; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /zxing-objc/NOTICE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | NOTICES FOR BARCODE4J 3 | -------------------------------------------------------------------------------- 4 | 5 | Barcode4J 6 | Copyright 2002-2010 Jeremias Märki 7 | Copyright 2005-2006 Dietmar Bürkle 8 | 9 | Portions of this software were contributed under section 5 of the 10 | Apache License. Contributors are listed under: 11 | http://barcode4j.sourceforge.net/contributors.html 12 | -------------------------------------------------------------------------------- /ShadowWeb/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ShadowWeb 4 | // 5 | // Created by clowwindy on 2/16/13. 6 | // Copyright (c) 2013 clowwindy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppProxyCap.h" 12 | #import "SWBAppDelegate.h" 13 | 14 | int main(int argc, char *argv[]) 15 | { 16 | @autoreleasepool { 17 | [AppProxyCap activate]; 18 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([SWBAppDelegate class])); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ShadowsocksX/Configuration.h: -------------------------------------------------------------------------------- 1 | // Generated by json_to_model 2 | 3 | #import 4 | #import "Profile.h" 5 | 6 | 7 | @interface Configuration : NSObject 8 | 9 | - (id)initWithJSONData:(NSData *)data; 10 | - (id)initWithJSONDictionary:(NSDictionary *)dictionary; 11 | - (NSDictionary *)JSONDictionary; 12 | - (NSData *)JSONData; 13 | 14 | 15 | @property (nonatomic, assign) NSInteger current; 16 | 17 | @property (nonatomic, strong) NSArray * profiles; 18 | 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /ShadowsocksX/install_helper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # install_helper.sh 4 | # shadowsocks 5 | # 6 | # Created by clowwindy on 14-3-15. 7 | 8 | cd `dirname "${BASH_SOURCE[0]}"` 9 | sudo mkdir -p "/Library/Application Support/ShadowsocksX/" 10 | sudo cp shadowsocks_sysconf "/Library/Application Support/ShadowsocksX/" 11 | sudo chown root:admin "/Library/Application Support/ShadowsocksX/shadowsocks_sysconf" 12 | sudo chmod +s "/Library/Application Support/ShadowsocksX/shadowsocks_sysconf" 13 | 14 | echo done -------------------------------------------------------------------------------- /ShadowWeb/shadowsocks-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ShadowWeb' target in the 'ShadowWeb' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | 16 | 17 | // polipo 18 | #define HAS_STDINT_H 19 | 20 | #define _L(s) NSLocalizedString(@#s, nil) -------------------------------------------------------------------------------- /OSXChangeLog.md: -------------------------------------------------------------------------------- 1 | 1.0.5 2 | ------ 3 | - Update PAC file 4 | - Add code sign 5 | 6 | 1.0.4 7 | ------ 8 | - Fix system proxy settings cleared when exiting with pac turned off 9 | 10 | 1.0.3 11 | ------ 12 | - Fix 100% CPU problem when using table encryption. 13 | - Fix "Please fill in the blank" message prompted when public server is selected. 14 | 15 | 1.0.2 16 | ------ 17 | - Authorize only once. 18 | 19 | 1.0.1 20 | ------ 21 | - Fix image uploading. 22 | 23 | 1.0 24 | ------ 25 | - Initial version. 26 | 27 | -------------------------------------------------------------------------------- /ShadowWeb/ProxySettingsTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProxySettingsTableViewController.h 3 | // shadowsocks-iOS 4 | // 5 | // Created by clowwindy on 12-12-31. 6 | // Copyright (c) 2012年 clowwindy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ProxySettingsTableViewController : UITableViewController { 12 | UITextField *ipField; 13 | UITextField *portField; 14 | UITextField *passwordField; 15 | } 16 | 17 | @property (nonatomic, weak) UIPopoverController *myPopoverController; 18 | @end 19 | -------------------------------------------------------------------------------- /ShadowWeb/SWBPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // AQPage.h 3 | // AquaWeb 4 | // 5 | // Created by clowwindy on 11-6-18. 6 | // Copyright (c) 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface SWBPage : NSObject { 13 | 14 | } 15 | @property (nonatomic, strong) NSString * title; 16 | @property (nonatomic, strong) NSString * url; 17 | @property (nonatomic, strong) NSNumber * selected; 18 | @property (nonatomic, assign) NSInteger tag; /* not saved into JSON */ 19 | 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ShadowWeb/libev/configure.ac: -------------------------------------------------------------------------------- 1 | orig_CFLAGS="$CFLAGS" 2 | 3 | AC_INIT 4 | AC_CONFIG_SRCDIR([ev_epoll.c]) 5 | 6 | AM_INIT_AUTOMAKE(libev,4.11) dnl also update ev.h! 7 | AC_CONFIG_HEADERS([config.h]) 8 | AM_MAINTAINER_MODE 9 | 10 | AC_PROG_CC 11 | 12 | dnl Supply default CFLAGS, if not specified 13 | if test -z "$orig_CFLAGS"; then 14 | if test x$GCC = xyes; then 15 | CFLAGS="-g -O3" 16 | fi 17 | fi 18 | 19 | AC_PROG_INSTALL 20 | AC_PROG_LIBTOOL 21 | 22 | m4_include([libev.m4]) 23 | 24 | AC_CONFIG_FILES([Makefile]) 25 | AC_OUTPUT 26 | -------------------------------------------------------------------------------- /ShadowWeb/SWBAboutController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by clowwindy on 7/7/13. 3 | // Copyright (c) 2013 clowwindy. All rights reserved. 4 | // 5 | // To change the template use AppCode | Preferences | File Templates. 6 | // 7 | 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | 14 | 15 | @interface SWBAboutController : UITableViewController { 16 | 17 | } 18 | 19 | @property (nonatomic, weak) UIPopoverController *myPopoverController; 20 | 21 | @end -------------------------------------------------------------------------------- /ShadowsocksX/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /ShadowWeb/SimpleTableViewSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by clowwindy on 6/6/13. 3 | // Copyright (c) 2013 clowwindy. All rights reserved. 4 | // 5 | // To change the template use AppCode | Preferences | File Templates. 6 | // 7 | 8 | 9 | #import 10 | 11 | typedef void (^SimpleTableViewSourceSelectionBlock)(NSObject *value); 12 | 13 | @interface SimpleTableViewSource : NSObject 14 | 15 | -(id)initWithLabels:(NSArray *)labels values:(NSArray *)values initialValue:(NSObject *)value selectionBlock:(SimpleTableViewSourceSelectionBlock)block; 16 | 17 | @end -------------------------------------------------------------------------------- /ShadowWeb/libev/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign 2 | 3 | VERSION_INFO = 4:0:0 4 | 5 | EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ 6 | ev_vars.h ev_wrap.h \ 7 | ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ 8 | ev.3 ev.pod Symbols.ev Symbols.event 9 | 10 | man_MANS = ev.3 11 | 12 | include_HEADERS = ev.h ev++.h event.h 13 | 14 | lib_LTLIBRARIES = libev.la 15 | 16 | libev_la_SOURCES = ev.c event.c 17 | libev_la_LDFLAGS = -version-info $(VERSION_INFO) 18 | 19 | ev.3: ev.pod 20 | pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@ 21 | -------------------------------------------------------------------------------- /ShadowsocksX/Profile.h: -------------------------------------------------------------------------------- 1 | // Generated by json_to_model 2 | 3 | #import 4 | 5 | 6 | @interface Profile : NSObject 7 | 8 | - (id)initWithJSONData:(NSData *)data; 9 | - (id)initWithJSONDictionary:(NSDictionary *)dictionary; 10 | - (NSDictionary *)JSONDictionary; 11 | - (NSData *)JSONData; 12 | 13 | 14 | @property (nonatomic, copy) NSString * server; 15 | 16 | @property (nonatomic, assign) NSInteger serverPort; 17 | 18 | @property (nonatomic, copy) NSString * remarks; 19 | 20 | @property (nonatomic, copy) NSString * password; 21 | 22 | @property (nonatomic, copy) NSString * method; 23 | 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /ShadowWeb/SWBWebView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBWebView.h 3 | // AquaWeb 4 | // 5 | // Created by clowwindy on 11-6-16. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface SWBWebView : UIWebView { 13 | 14 | } 15 | 16 | - (NSString *)pageTitle; 17 | - (NSString *)locationHref; 18 | - (CGSize)windowSize; 19 | - (CGPoint)scrollOffset; 20 | - (NSString *)lastClickedLink; 21 | - (NSString *)lastClickedLinkText; 22 | - (NSString *)lastImageSrc; 23 | - (void)openLastClickedLink; 24 | - (NSString *)selection; 25 | 26 | @property (nonatomic, readonly) UIScrollView *scrollView; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ShadowWeb/socks5.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define SOCKS_VERSION 0x05 4 | #define SOCKS_CMD_CONNECT 0x01 5 | #define SOCKS_IPV4 0x01 6 | #define SOCKS_DOMAIN 0x03 7 | #define SOCKS_IPV6 0x04 8 | #define SOCKS_CMD_NOT_SUPPORTED 0x07 9 | 10 | #pragma pack(1) 11 | 12 | struct method_select_request 13 | { 14 | char ver; 15 | char nmethods; 16 | char methods[255]; 17 | }; 18 | 19 | struct method_select_response 20 | { 21 | char ver; 22 | char method; 23 | }; 24 | 25 | struct socks5_request 26 | { 27 | char ver; 28 | char cmd; 29 | char rsv; 30 | char atyp; 31 | }; 32 | 33 | struct socks5_response 34 | { 35 | char ver; 36 | char rep; 37 | char rsv; 38 | char atyp; 39 | }; 40 | 41 | #pragma pack() 42 | 43 | -------------------------------------------------------------------------------- /ShadowsocksX/qrcode.htm: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 16 |
17 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/aztec/encoder/ZXAztecCode.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAztecCode.h" 18 | 19 | @implementation ZXAztecCode 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/ZXCaptureView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "ZXView.h" 18 | 19 | @interface ZXCaptureView : ZXView 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/ZXCaptureView.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "ZXCaptureView.h" 18 | 19 | @implementation ZXCaptureView 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/aztec/ZXAztecWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXWriter.h" 18 | 19 | @interface ZXAztecWriter : NSObject 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXTextEncoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXC40Encoder.h" 18 | 19 | @interface ZXTextEncoder : ZXC40Encoder 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXX12Encoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXC40Encoder.h" 18 | 19 | @interface ZXX12Encoder : ZXC40Encoder 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/ZXPDF417ResultMetadata.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXPDF417ResultMetadata.h" 18 | 19 | @implementation ZXPDF417ResultMetadata 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ShadowWeb/SWBPageManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // AQPageManager.h 3 | // AquaWeb 4 | // 5 | // Created by clowwindy on 11-6-18. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SWBPage.h" 11 | 12 | @interface SWBPageManager : NSObject { 13 | NSMutableArray *pages; 14 | NSMutableDictionary *tagToPageMapping; 15 | } 16 | 17 | @property (nonatomic,readonly) NSArray *pages; 18 | @property (nonatomic,readonly) NSMutableDictionary *tagToPageMapping; 19 | @property (nonatomic,readonly) NSInteger selectedIndex; 20 | 21 | -(SWBPage *)addPageWithTag:(NSInteger)tag; 22 | -(void)removePage:(NSInteger)tag; 23 | 24 | -(void)initMappingAndTabsByPages; 25 | 26 | -(SWBPage *)pageByTag:(NSInteger)tag; 27 | 28 | -(void)save; 29 | -(void)load; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ShadowsocksXTests/ShadowsocksXTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | clowwindy.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXCodaBarWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDimensionalCodeWriter.h" 18 | 19 | @interface ZXCodaBarWriter : ZXOneDimensionalCodeWriter 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI01392xDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI01decoder.h" 18 | 19 | @interface ZXAI01392xDecoder : ZXAI01decoder 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI01393xDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI01decoder.h" 18 | 19 | @interface ZXAI01393xDecoder : ZXAI01decoder 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI01AndOtherAIs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI01decoder.h" 18 | 19 | @interface ZXAI01AndOtherAIs : ZXAI01decoder 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXDataMatrixSymbolInfo144.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXSymbolInfo.h" 18 | 19 | @interface ZXDataMatrixSymbolInfo144 : ZXSymbolInfo 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI01320xDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI013x0xDecoder.h" 18 | 19 | @interface ZXAI01320xDecoder : ZXAI013x0xDecoder 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/ZXPDF417Writer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXCompaction.h" 18 | #import "ZXWriter.h" 19 | 20 | @interface ZXPDF417Writer : NSObject 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /ShadowsocksXTests/ShadowsocksXTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ShadowsocksXTests.m 3 | // ShadowsocksXTests 4 | // 5 | // Created by clowwindy on 14-2-19. 6 | // Copyright (c) 2014年 clowwindy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ShadowsocksXTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ShadowsocksXTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXASCIIEncoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDataMatrixEncoder.h" 18 | 19 | @interface ZXASCIIEncoder : NSObject 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXBase256Encoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDataMatrixEncoder.h" 18 | 19 | @interface ZXBase256Encoder : NSObject 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXEdifactEncoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDataMatrixEncoder.h" 18 | 19 | @interface ZXEdifactEncoder : NSObject 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI013x0xDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI01weightDecoder.h" 18 | 19 | @interface ZXAI013x0xDecoder : ZXAI01weightDecoder 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAnyAIDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAbstractExpandedDecoder.h" 18 | 19 | @interface ZXAnyAIDecoder : ZXAbstractExpandedDecoder 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/decoder/ZXPDF417CodewordDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXPDF417CodewordDecoder : NSObject 18 | 19 | + (int)decodedValue:(NSArray *)moduleBitCount; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/ZXEncodeHints.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXEncodeHints.h" 18 | 19 | @implementation ZXEncodeHints 20 | 21 | + (id)hints { 22 | return [[self alloc] init]; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXCode93Reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDReader.h" 18 | 19 | /** 20 | * Decodes Code 93 barcodes. 21 | */ 22 | 23 | @interface ZXCode93Reader : ZXOneDReader 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/encoder/ZXCompaction.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | typedef enum { 18 | ZX_COMPACTION_AUTO, 19 | ZX_COMPACTION_TEXT, 20 | ZX_COMPACTION_BYTE, 21 | ZX_COMPACTION_NUMERIC 22 | } ZXCompaction; -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "AppProxyCap"] 2 | path = AppProxyCap 3 | url = https://github.com/freewizard/AppProxyCap.git 4 | [submodule "OpenSSL-for-iPhone"] 5 | path = OpenSSL-for-iPhone 6 | url = git://github.com/clowwindy/OpenSSL-for-iPhone.git 7 | [submodule "GCDWebServer"] 8 | path = GCDWebServer 9 | url = https://github.com/swisspol/GCDWebServer 10 | [submodule "iProxy"] 11 | path = iProxy 12 | url = https://github.com/clowwindy/iProxy.git 13 | [submodule "NSData-Base64"] 14 | path = NSData-Base64 15 | url = https://github.com/l4u/NSData-Base64.git 16 | [submodule "GZIP"] 17 | path = GZIP 18 | url = https://github.com/nicklockwood/GZIP.git 19 | [submodule "Masonry"] 20 | path = Masonry 21 | url = git@github.com:Masonry/Masonry.git 22 | [submodule "AFNetworking"] 23 | path = AFNetworking 24 | url = git@github.com:AFNetworking/AFNetworking.git 25 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/ZXBitArrayBuilder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitArray; 18 | 19 | @interface ZXBitArrayBuilder : NSObject 20 | 21 | + (ZXBitArray *)buildBitArray:(NSArray *)pairs; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXBookmarkDoCoMoResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAbstractDoCoMoResultParser.h" 18 | 19 | @interface ZXBookmarkDoCoMoResultParser : ZXAbstractDoCoMoResultParser 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/ZXDefaultGridSampler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXGridSampler.h" 18 | 19 | @class ZXBitMatrix, ZXPerspectiveTransform; 20 | 21 | @interface ZXDefaultGridSampler : ZXGridSampler 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXEAN8Reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXUPCEANReader.h" 18 | 19 | /** 20 | * Implements decoding of the EAN-8 format. 21 | */ 22 | 23 | @interface ZXEAN8Reader : ZXUPCEANReader 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXUPCAReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXUPCEANReader.h" 18 | 19 | /** 20 | * Implements decoding of the UPC-A format. 21 | */ 22 | 23 | @interface ZXUPCAReader : ZXUPCEANReader 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ShadowWeb/SWBTabView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBTabView.h 3 | // SWBuaWeb 4 | // 5 | // Created by clowwindy on 11-6-10. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SWBSmallCloseButton.h" 11 | 12 | @protocol SWBTabViewDelegate 13 | 14 | @required 15 | 16 | -(void) tabViewDidClickCloseButton:(id)sender; 17 | 18 | @end 19 | 20 | @interface SWBTabView : UIControl { 21 | SWBSmallCloseButton *closeButton; 22 | UILabel *titleLabel; 23 | UIActivityIndicatorView *indicatorView; 24 | } 25 | 26 | @property (nonatomic, assign) BOOL focused; 27 | @property (nonatomic, weak) id delegate; 28 | @property (nonatomic, strong) IBOutlet NSString *title; 29 | @property (nonatomic, assign) BOOL loading; 30 | @property (weak, nonatomic, readonly) UILabel *titleLabel; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXEAN8Writer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXUPCEANWriter.h" 18 | 19 | /** 20 | * This object renders an EAN8 code as a ZXBitMatrix. 21 | */ 22 | 23 | @interface ZXEAN8Writer : ZXUPCEANWriter 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXUPCAWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXWriter.h" 18 | 19 | /** 20 | * This object renders a UPC-A code as a ZXBitMatrix. 21 | */ 22 | 23 | @interface ZXUPCAWriter : NSObject 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ShadowWeb/SWBAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // SWBAppDelegate.h 3 | // ShadowWeb 4 | // 5 | // Created by clowwindy on 2/16/13. 6 | // Copyright (c) 2013 clowwindy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "SWBNetworkActivityIndicatorManager.h" 12 | 13 | #define appNetworkActivityIndicatorManager [(SWBAppDelegate *)[UIApplication sharedApplication].delegate networkActivityIndicatorManager] 14 | 15 | @class SWBViewController; 16 | 17 | @interface SWBAppDelegate : UIResponder 18 | 19 | @property (strong, nonatomic) UIWindow *window; 20 | 21 | @property (strong, nonatomic) SWBViewController *viewController; 22 | 23 | @property (nonatomic, strong) SWBNetworkActivityIndicatorManager *networkActivityIndicatorManager; 24 | 25 | - (void)setPolipo:(BOOL)enabled; 26 | - (void)updateProxyMode; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/ZXView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR 18 | #import 19 | #define ZXView UIView 20 | #else 21 | #import 22 | #define ZXView NSView 23 | #endif 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXFieldParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXFieldParser : NSObject 18 | 19 | + (NSString *)parseFieldsInGeneralPurpose:(NSString *)rawInformation error:(NSError **)error; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXEAN13Writer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXUPCEANWriter.h" 18 | 19 | /** 20 | * This object renders an EAN13 code as a {@link BitMatrix}. 21 | */ 22 | 23 | @interface ZXEAN13Writer : ZXUPCEANWriter 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/decoder/ZXPDF417BarcodeValue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXPDF417BarcodeValue : NSObject 18 | 19 | - (void)setValue:(int)value; 20 | - (NSArray *)value; 21 | - (NSNumber *)confidence:(int)value; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXISBNResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses strings of digits that represent a ISBN. 21 | */ 22 | 23 | @interface ZXISBNResultParser : ZXResultParser 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXDataMatrixEncoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXEncoderContext; 18 | 19 | @protocol ZXDataMatrixEncoder 20 | 21 | - (int)encodingMode; 22 | - (void)encode:(ZXEncoderContext *)context; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXMultiFormatOneDReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDReader.h" 18 | 19 | @class ZXDecodeHints; 20 | 21 | @interface ZXMultiFormatOneDReader : ZXOneDReader 22 | 23 | - (id)initWithHints:(ZXDecodeHints *)hints; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXProductResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses strings of digits that represent a UPC code. 21 | */ 22 | 23 | @interface ZXProductResultParser : ZXResultParser 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXTelResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses a "tel:" URI result, which specifies a phone number. 21 | */ 22 | 23 | @interface ZXTelResultParser : ZXResultParser 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXITFWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDimensionalCodeWriter.h" 18 | 19 | /** 20 | * This object renders a ITF code as a {@link BitMatrix}. 21 | */ 22 | 23 | @interface ZXITFWriter : ZXOneDimensionalCodeWriter 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXDecodedObject.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXDecodedObject : NSObject 18 | 19 | @property (nonatomic, assign, readonly) int theNewPosition; 20 | 21 | - (id)initWithNewPosition:(int)newPosition; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/ZXQRCodeWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXWriter.h" 18 | 19 | /** 20 | * This object renders a QR Code as a BitMatrix 2D array of greyscale values. 21 | */ 22 | 23 | @interface ZXQRCodeWriter : NSObject 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXCode128Writer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDimensionalCodeWriter.h" 18 | 19 | /** 20 | * This object renders a CODE128 code as a ZXBitMatrix. 21 | */ 22 | 23 | @interface ZXCode128Writer : ZXOneDimensionalCodeWriter 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXCode39Writer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDimensionalCodeWriter.h" 18 | 19 | /** 20 | * This object renders a CODE39 code as a {@link BitMatrix}. 21 | */ 22 | 23 | @interface ZXCode39Writer : ZXOneDimensionalCodeWriter 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ShadowWeb/SWBNetworkActivityIndicatorManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // SWBNetworkActivityIndicatorManager.m 3 | // AquaWeb 4 | // 5 | // Created by clowwindy on 11-7-3. 6 | // Copyright 2011年 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "SWBNetworkActivityIndicatorManager.h" 10 | 11 | 12 | @implementation SWBNetworkActivityIndicatorManager 13 | 14 | - (id)init { 15 | self = [super init]; 16 | if (self) { 17 | sources = [[NSMutableSet alloc] init]; 18 | } 19 | return self; 20 | } 21 | 22 | -(void)setSourceActivityStatusIsBusy:(id)source busy:(BOOL)busy { 23 | if (busy&&![sources containsObject:source]) { 24 | [sources addObject:source]; 25 | } else if([sources containsObject:source]){ 26 | [sources removeObject:source]; 27 | } 28 | [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:([sources count] > 0)]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXEAN13Reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXUPCEANReader.h" 18 | 19 | /** 20 | * Implements decoding of the EAN-13 format. 21 | */ 22 | 23 | extern int FIRST_DIGIT_ENCODINGS[10]; 24 | 25 | @interface ZXEAN13Reader : ZXUPCEANReader 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ShadowWeb/ShadowsocksRunner.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by clowwindy on 14-2-27. 3 | // Copyright (c) 2014 clowwindy. All rights reserved. 4 | // 5 | 6 | #import 7 | 8 | 9 | #define kShadowsocksIPKey @"proxy ip" 10 | #define kShadowsocksPortKey @"proxy port" 11 | #define kShadowsocksPasswordKey @"proxy password" 12 | #define kShadowsocksEncryptionKey @"proxy encryption" 13 | #define kShadowsocksProxyModeKey @"proxy mode" 14 | #define kShadowsocksUsePublicServer @"public server" 15 | 16 | 17 | @interface ShadowsocksRunner : NSObject 18 | 19 | + (BOOL)settingsAreNotComplete; 20 | + (BOOL)runProxy; 21 | + (void)reloadConfig; 22 | + (BOOL)openSSURL:(NSURL *)url; 23 | + (NSURL *)generateSSURL; 24 | + (NSString *)configForKey:(NSString *)key; 25 | + (void)saveConfigForKey:(NSString *)key value:(NSString *)value; 26 | + (void)setUsingPublicServer:(BOOL)use; 27 | + (BOOL)isUsingPublicServer; 28 | 29 | 30 | @end -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/ZXDataMatrixWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXWriter.h" 18 | 19 | /** 20 | * This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. 21 | */ 22 | 23 | @interface ZXDataMatrixWriter : NSObject 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXExpandedProductResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses strings of digits that represent a RSS Extended code. 21 | */ 22 | 23 | @interface ZXExpandedProductResultParser : ZXResultParser 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/detector/ZXMathUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXMathUtils : NSObject 18 | 19 | + (int)round:(float)d; 20 | + (float)distance:(float)aX aY:(float)aY bX:(float)bX bY:(float)bY; 21 | + (float)distanceInt:(int)aX aY:(int)aY bX:(int)bX bY:(int)bY; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/maxicode/decoder/ZXMaxiCodeBitMatrixParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitMatrix; 18 | 19 | @interface ZXMaxiCodeBitMatrixParser : NSObject 20 | 21 | - (id)initWithBitMatrix:(ZXBitMatrix *)bitMatrix error:(NSError **)error; 22 | - (NSArray *)readCodewords; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXUPCEANExtensionSupport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitArray, ZXResult; 18 | 19 | @interface ZXUPCEANExtensionSupport : NSObject 20 | 21 | - (ZXResult *)decodeRow:(int)rowNumber row:(ZXBitArray *)row rowOffset:(int)rowOffset error:(NSError **)error; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI013103decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI013x0xDecoder.h" 18 | 19 | @interface ZXAI013103decoder : ZXAI013x0xDecoder 20 | 21 | - (void)addWeightCode:(NSMutableString *)buf weight:(int)weight; 22 | - (int)checkWeight:(int)weight; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/aztec/ZXAztecReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXReader.h" 18 | 19 | @class ZXBinaryBitmap, ZXDecodeHints, ZXResult; 20 | 21 | /** 22 | * This implementation can detect and decode Aztec codes in an image. 23 | */ 24 | @interface ZXAztecReader : NSObject 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXURIResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Tries to parse results that are a URI of some kind. 21 | */ 22 | 23 | @interface ZXURIResultParser : ZXResultParser 24 | 25 | + (BOOL)isBasicallyValidURI:(NSString *)uri; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/maxicode/ZXMaxiCodeReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXReader.h" 18 | 19 | @class ZXBinaryBitmap, ZXDecodeHints, ZXResult; 20 | 21 | /** 22 | * This implementation can detect and decode a MaxiCode in an image. 23 | */ 24 | @interface ZXMaxiCodeReader : NSObject 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/ZXRSS14Reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAbstractRSSReader.h" 18 | 19 | /** 20 | * Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. 21 | */ 22 | 23 | @class ZXDecodeHints, ZXResult; 24 | 25 | @interface ZXRSS14Reader : ZXAbstractRSSReader 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/ZXStringUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Common string-related functions. 19 | */ 20 | 21 | @class ZXDecodeHints; 22 | 23 | @interface ZXStringUtils : NSObject 24 | 25 | + (NSStringEncoding)guessEncoding:(int8_t *)bytes length:(unsigned int)length hints:(ZXDecodeHints *)hints; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/ZXDataCharacter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXDataCharacter : NSObject 18 | 19 | @property (nonatomic, assign, readonly) int value; 20 | @property (nonatomic, assign, readonly) int checksumPortion; 21 | 22 | - (id)initWithValue:(int)value checksumPortion:(int)checksumPortion; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/ZXDataMatrixReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXReader.h" 18 | 19 | /** 20 | * This implementation can detect and decode Data Matrix codes in an image. 21 | */ 22 | 23 | @class ZXBinaryBitmap, ZXDecodeHints, ZXResult; 24 | 25 | @interface ZXDataMatrixReader : NSObject 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXUPCEANWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDimensionalCodeWriter.h" 18 | 19 | /** 20 | * Encapsulates functionality and implementation that is common to UPC and EAN families 21 | * of one-dimensional barcodes. 22 | */ 23 | 24 | @interface ZXUPCEANWriter : ZXOneDimensionalCodeWriter 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI013x0x1xDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI01weightDecoder.h" 18 | 19 | @interface ZXAI013x0x1xDecoder : ZXAI01weightDecoder 20 | 21 | - (id)initWithInformation:(ZXBitArray *)information firstAIdigits:(NSString *)firstAIdigits dateCode:(NSString *)dateCode; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXISBNParsedResult.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXParsedResult.h" 18 | 19 | @interface ZXISBNParsedResult : ZXParsedResult 20 | 21 | @property (nonatomic, copy, readonly) NSString *isbn; 22 | 23 | - (id)initWithIsbn:(NSString *)isbn; 24 | + (id)isbnParsedResultWithIsbn:(NSString *)isbn; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXDecodedObject.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDecodedObject.h" 18 | 19 | @implementation ZXDecodedObject 20 | 21 | - (id)initWithNewPosition:(int)newPosition { 22 | if (self = [super init]) { 23 | _theNewPosition = newPosition; 24 | } 25 | 26 | return self; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXDataMatrixErrorCorrection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Error Correction Code for ECC200. 19 | */ 20 | 21 | @class ZXSymbolInfo; 22 | 23 | @interface ZXDataMatrixErrorCorrection : NSObject 24 | 25 | + (NSString *)encodeECC200:(NSString *)codewords symbolInfo:(ZXSymbolInfo *)symbolInfo; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/multi/qrcode/ZXQRCodeMultiReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXMultipleBarcodeReader.h" 18 | #import "ZXQRCodeReader.h" 19 | 20 | /** 21 | * This implementation can detect and decode multiple QR Codes in an image. 22 | */ 23 | 24 | @interface ZXQRCodeMultiReader : ZXQRCodeReader 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXCurrentParsingState.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXCurrentParsingState : NSObject 18 | 19 | @property (nonatomic, assign) int position; 20 | 21 | - (BOOL)alpha; 22 | - (BOOL)numeric; 23 | - (BOOL)isoIec646; 24 | - (void)setNumeric; 25 | - (void)setAlpha; 26 | - (void)setIsoIec646; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/ZXDimension.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Simply encapsulates a width and height. 19 | */ 20 | 21 | @interface ZXDimension : NSObject 22 | 23 | @property (nonatomic, assign, readonly) int height; 24 | @property (nonatomic, assign, readonly) int width; 25 | 26 | - (id)initWithWidth:(int)width height:(int)height; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/ZXPDF417ResultMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXPDF417ResultMetadata : NSObject 18 | 19 | @property (nonatomic, assign) int segmentIndex; 20 | @property (nonatomic, copy) NSString *fileId; 21 | @property (nonatomic, strong) NSArray *optionalData; 22 | @property (nonatomic, assign) BOOL lastSegment; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXAddressBookAUResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Implements KDDI AU's address book format. See http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. 21 | * (Thanks to Yuzo for translating!) 22 | */ 23 | 24 | @interface ZXAddressBookAUResultParser : ZXResultParser 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/ZXMultiFormatWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXWriter.h" 18 | 19 | /** 20 | * This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat 21 | * requested and encodes the barcode with the supplied contents. 22 | */ 23 | 24 | @interface ZXMultiFormatWriter : NSObject 25 | 26 | + (id)writer; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXEmailAddressResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Represents a result that encodes an e-mail address, either as a plain address 21 | * like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". 22 | */ 23 | 24 | @interface ZXEmailAddressResultParser : ZXResultParser 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXUPCEANWriter.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXBarcodeFormat.h" 18 | #import "ZXBitMatrix.h" 19 | #import "ZXUPCEANReader.h" 20 | #import "ZXUPCEANWriter.h" 21 | 22 | @implementation ZXUPCEANWriter 23 | 24 | - (int)defaultMargin { 25 | // Use a different default more appropriate for UPC/EAN 26 | return START_END_PATTERN_LEN; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/detector/ZXPDF417DetectorResult.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitMatrix; 18 | 19 | @interface ZXPDF417DetectorResult : NSObject 20 | 21 | @property (nonatomic, strong, readonly) ZXBitMatrix *bits; 22 | @property (nonatomic, strong, readonly) NSArray *points; 23 | 24 | - (id)initWithBits:(ZXBitMatrix *)bits points:(NSArray *)points; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/ZXResultPointCallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Callback which is invoked when a possible result point (significant 19 | * point in the barcode image such as a corner) is found. 20 | */ 21 | 22 | @class ZXResultPoint; 23 | 24 | @protocol ZXResultPointCallback 25 | 26 | - (void)foundPossibleResultPoint:(ZXResultPoint *)point; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/ZXDetectorResult.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXBitMatrix.h" 18 | #import "ZXDetectorResult.h" 19 | 20 | @implementation ZXDetectorResult 21 | 22 | - (id)initWithBits:(ZXBitMatrix *)bits points:(NSArray *)points { 23 | if (self = [super init]) { 24 | _bits = bits; 25 | _points = points; 26 | } 27 | 28 | return self; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXDecodedChar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDecodedObject.h" 18 | 19 | extern unichar const FNC1char; 20 | 21 | @interface ZXDecodedChar : ZXDecodedObject 22 | 23 | @property (nonatomic, assign, readonly) unichar value; 24 | 25 | - (id)initWithNewPosition:(int)newPosition value:(unichar)value; 26 | - (BOOL)fnc1; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXVEventResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Partially implements the iCalendar format's "VEVENT" format for specifying a 21 | * calendar event. See RFC 2445. This supports SUMMARY, LOCATION, GEO, DTSTART and DTEND fields. 22 | */ 23 | 24 | @interface ZXVEventResultParser : ZXResultParser 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/ZXECI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" 19 | * 5.3 of ISO 18004. 20 | */ 21 | 22 | @interface ZXECI : NSObject 23 | 24 | @property (nonatomic, readonly) int value; 25 | 26 | - (id)initWithValue:(int)value; 27 | + (ZXECI *)eciByValue:(int)value; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Crashlytics.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | Crashlytics 9 | CFBundleIdentifier 10 | com.crashlytics.ios 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Crashlytics 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.2.1 19 | CFBundleSupportedPlatforms 20 | 21 | iPhoneOS 22 | 23 | CFBundleVersion 24 | 35 25 | DTPlatformName 26 | iphoneos 27 | MinimumOSVersion 28 | 4.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/detector/ZXPDF417DetectorResult.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXPDF417DetectorResult.h" 18 | 19 | @implementation ZXPDF417DetectorResult 20 | 21 | - (id)initWithBits:(ZXBitMatrix *)bits points:(NSArray *)points { 22 | self = [super init]; 23 | if (self) { 24 | _bits = bits; 25 | _points = points; 26 | } 27 | 28 | return self; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/ZXQRCodeReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXReader.h" 18 | 19 | /** 20 | * This implementation can detect and decode QR Codes in an image. 21 | */ 22 | 23 | @class ZXBinaryBitmap, ZXQRCodeDecoder, ZXResult; 24 | 25 | @interface ZXQRCodeReader : NSObject 26 | 27 | @property (nonatomic, strong, readonly) ZXQRCodeDecoder *decoder; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXSMTPResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses an "smtp:" URI result, whose format is not standardized but appears to be like: 21 | * smtp(:subject(:body)). 22 | * 23 | * See http://code.google.com/p/zxing/issues/detail?id=536 24 | */ 25 | 26 | @interface ZXSMTPResultParser : ZXResultParser 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/reedsolomon/ZXReedSolomonEncoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Implements Reed-Solomon enbcoding, as the name implies. 19 | */ 20 | 21 | @class ZXGenericGF; 22 | 23 | @interface ZXReedSolomonEncoder : NSObject 24 | 25 | - (id)initWithField:(ZXGenericGF *)field; 26 | - (void)encode:(int *)toEncode toEncodeLen:(int)toEncodeLen ecBytes:(int)ecBytes; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI013103decoder.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI013103decoder.h" 18 | #import "ZXBitArray.h" 19 | 20 | @implementation ZXAI013103decoder 21 | 22 | - (void)addWeightCode:(NSMutableString *)buf weight:(int)weight { 23 | [buf appendString:@"(3103)"]; 24 | } 25 | 26 | - (int)checkWeight:(int)weight { 27 | return weight; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXSymbolShapeHint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular 19 | * symbols. 20 | */ 21 | 22 | @interface ZXSymbolShapeHint : NSObject 23 | 24 | + (ZXSymbolShapeHint *)forceNone; 25 | + (ZXSymbolShapeHint *)forceSquare; 26 | + (ZXSymbolShapeHint *)forceRectangle; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/decoder/ZXPDF417DecodedBitStreamParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * This class contains the methods for decoding the PDF417 codewords. 19 | */ 20 | 21 | @class ZXDecoderResult; 22 | 23 | @interface ZXPDF417DecodedBitStreamParser : NSObject 24 | 25 | + (ZXDecoderResult *)decode:(NSArray *)codewords ecLevel:(NSString *)ecLevel error:(NSError **)error; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXURLTOResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". 21 | * This seems to be used sometimes, but I am not able to find documentation 22 | * on its origin or official format? 23 | */ 24 | 25 | @interface ZXURLTOResultParser : ZXResultParser 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXEmailDoCoMoResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAbstractDoCoMoResultParser.h" 18 | 19 | /** 20 | * Implements the "MATMSG" email message entry format. 21 | * 22 | * Supported keys: TO, SUB, BODY 23 | */ 24 | 25 | @interface ZXEmailDoCoMoResultParser : ZXAbstractDoCoMoResultParser 26 | 27 | + (BOOL)isBasicallyValidEmailAddress:(NSString *)email; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXGeoResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses a "geo:" URI result, which specifies a location on the surface of 21 | * the Earth as well as an optional altitude above the surface. See 22 | * http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. 23 | */ 24 | 25 | @interface ZXGeoResultParser : ZXResultParser 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXUPCEReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXBarcodeFormat.h" 18 | #import "ZXUPCEANReader.h" 19 | 20 | /** 21 | * Implements decoding of the UPC-E format. 22 | * 23 | * http://www.barcodeisland.com/upce.phtml is a great reference for UPC-E information. 24 | */ 25 | 26 | @interface ZXUPCEReader : ZXUPCEANReader 27 | 28 | + (NSString *)convertUPCEtoUPCA:(NSString *)upce; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXWifiResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses a WIFI configuration string. Strings will be of the form: 21 | * WIFI:T:[network type];S:[SSID];P:[network password];H:[hidden?];; 22 | * 23 | * The fields can appear in any order. Only "S:" is required. 24 | */ 25 | 26 | @interface ZXWifiResultParser : ZXResultParser 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | How to Contribute 2 | ================= 3 | 4 | Pull Requests 5 | ------------- 6 | 7 | 1. Pull requests are welcome. If you would like to add a large feature 8 | or make a significant change, make sure to open an issue to discuss with 9 | people first. 10 | 2. Make sure to pass the unit tests. Write unit tests for new modules if 11 | needed. 12 | 13 | Issues 14 | ------ 15 | 16 | 1. Only bugs and feature requests are accepted here. 17 | 2. We'll only work on important features. If the feature you're asking only 18 | benefits a few people, you'd better implement the feature yourself and send us 19 | a pull request, or ask some of your friends to do so. 20 | 3. We don't answer questions of any other types here. Since very few people 21 | are watching the issue tracker here, you'll probably get no help from here. 22 | Read [Troubleshooting] and get help from forums or [mailing lists]. 23 | 24 | 25 | [Troubleshooting]: https://github.com/clowwindy/shadowsocks/wiki/Troubleshooting 26 | [mailing lists]: https://groups.google.com/forum/#!forum/shadowsocks 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXBizcardResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAbstractDoCoMoResultParser.h" 18 | 19 | /** 20 | * Implements the "BIZCARD" address book entry format, though this has been 21 | * largely reverse-engineered from examples observed in the wild -- still 22 | * looking for a definitive reference. 23 | */ 24 | 25 | @interface ZXBizcardResultParser : ZXAbstractDoCoMoResultParser 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXC40Encoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDataMatrixEncoder.h" 18 | 19 | @interface ZXC40Encoder : NSObject 20 | 21 | - (int)encodeChar:(unichar)c buffer:(NSMutableString *)sb; 22 | - (void)writeNextTriplet:(ZXEncoderContext *)context buffer:(NSMutableString *)buffer; 23 | - (void)handleEOD:(ZXEncoderContext *)context buffer:(NSMutableString *)buffer; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /About.md: -------------------------------------------------------------------------------- 1 | [Shadowsocks for iOS](https://github.com/shadowsocks/shadowsocks-iOS) 2 | =================== 3 | 4 | Copyright (C) 2014 clowwindy 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | This project has used some third party libraries. Thanks to the open source 20 | community for their great job. 21 | 22 | See [LICENSE](https://github.com/shadowsocks/shadowsocks-iOS/blob/master/LICENSE) 23 | for detailed license information. 24 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/ZXInvertedLuminanceSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXLuminanceSource.h" 18 | 19 | /** 20 | * A wrapper implementation of ZXLuminanceSource which inverts the luminances it returns -- black becomes 21 | * white and vice versa, and each value becomes (255-value). 22 | */ 23 | @interface ZXInvertedLuminanceSource : ZXLuminanceSource 24 | 25 | - (id)initWithDelegate:(ZXLuminanceSource *)delegate; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI01weightDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI01decoder.h" 18 | 19 | @class ZXBitArray; 20 | 21 | @interface ZXAI01weightDecoder : ZXAI01decoder 22 | 23 | - (void)encodeCompressedWeight:(NSMutableString *)buf currentPos:(int)currentPos weightSize:(int)weightSize; 24 | - (void)addWeightCode:(NSMutableString *)buf weight:(int)weight; 25 | - (int)checkWeight:(int)weight; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/encoder/ZXMaskUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXByteMatrix; 18 | 19 | @interface ZXMaskUtil : NSObject 20 | 21 | + (int)applyMaskPenaltyRule1:(ZXByteMatrix *)matrix; 22 | + (int)applyMaskPenaltyRule2:(ZXByteMatrix *)matrix; 23 | + (int)applyMaskPenaltyRule3:(ZXByteMatrix *)matrix; 24 | + (int)applyMaskPenaltyRule4:(ZXByteMatrix *)matrix; 25 | + (BOOL)dataMaskBit:(int)maskPattern x:(int)x y:(int)y; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/ZXRGBLuminanceSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXLuminanceSource.h" 18 | 19 | /** 20 | * This class is used to help decode images from files which arrive as RGB data from 21 | * an ARGB pixel array. It does not support rotation. 22 | */ 23 | 24 | @interface ZXRGBLuminanceSource : ZXLuminanceSource 25 | 26 | - (id)initWithWidth:(int)width height:(int)height pixels:(int *)pixels pixelsLen:(int)pixelsLen; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/aztec/decoder/ZXAztecDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * The main class which implements Aztec Code decoding -- as opposed to locating and extracting 19 | * the Aztec Code from an image. 20 | */ 21 | 22 | @class ZXAztecDetectorResult, ZXDecoderResult; 23 | 24 | @interface ZXAztecDecoder : NSObject 25 | 26 | - (ZXDecoderResult *)decode:(ZXAztecDetectorResult *)detectorResult error:(NSError **)error; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXUPCEANExtension2Support.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitArray, ZXResult; 18 | 19 | @interface ZXUPCEANExtension2Support : NSObject 20 | 21 | - (ZXResult *)decodeRow:(int)rowNumber row:(ZXBitArray *)row extensionStartRange:(NSRange)extensionStartRange error:(NSError **)error; 22 | - (int)decodeMiddle:(ZXBitArray *)row startRange:(NSRange)startRange result:(NSMutableString *)result error:(NSError **)error; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXUPCEANExtension5Support.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitArray, ZXResult; 18 | 19 | @interface ZXUPCEANExtension5Support : NSObject 20 | 21 | - (ZXResult *)decodeRow:(int)rowNumber row:(ZXBitArray *)row extensionStartRange:(NSRange)extensionStartRange error:(NSError **)error; 22 | - (int)decodeMiddle:(ZXBitArray *)row startRange:(NSRange)startRange result:(NSMutableString *)result error:(NSError **)error; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/encoder/ZXDimensions.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDimensions.h" 18 | 19 | @implementation ZXDimensions 20 | 21 | - (id)initWithMinCols:(int)minCols maxCols:(int)maxCols minRows:(int)minRows maxRows:(int)maxRows { 22 | if (self = [super init]) { 23 | _minCols = minCols; 24 | _maxCols = maxCols; 25 | _minRows = minRows; 26 | _maxRows = maxRows; 27 | } 28 | 29 | return self; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/ZXImage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | @class ZXBitMatrix; 20 | 21 | @interface ZXImage : NSObject 22 | 23 | @property (nonatomic, assign, readonly) CGImageRef cgimage; 24 | 25 | - (ZXImage *)initWithCGImageRef:(CGImageRef)image; 26 | - (ZXImage *)initWithURL:(NSURL const *)url; 27 | - (size_t)width; 28 | - (size_t)height; 29 | + (ZXImage *)imageWithMatrix:(ZXBitMatrix *)matrix; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/aztec/detector/ZXAztecDetector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code 19 | * is rotated or skewed, or partially obscured. 20 | */ 21 | 22 | @class ZXAztecDetectorResult, ZXBitMatrix; 23 | 24 | @interface ZXAztecDetector : NSObject 25 | 26 | - (id)initWithImage:(ZXBitMatrix *)image; 27 | - (ZXAztecDetectorResult *)detectWithError:(NSError **)error; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/ZXCaptureDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXCapture; 18 | @class ZXResult; 19 | 20 | @protocol ZXCaptureDelegate 21 | 22 | - (void)captureResult:(ZXCapture *)capture result:(ZXResult *)result; 23 | 24 | @optional 25 | - (void)captureSize:(ZXCapture *)capture 26 | width:(NSNumber *)width 27 | height:(NSNumber *)height; 28 | 29 | - (void)captureCameraIsReady:(ZXCapture *)capture; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/multi/qrcode/detector/ZXMultiDetector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXQRCodeDetector.h" 18 | 19 | /** 20 | * Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code 21 | * is rotated or skewed, or partially obscured. 22 | */ 23 | 24 | @class ZXDecodeHints; 25 | 26 | @interface ZXMultiDetector : ZXQRCodeDetector 27 | 28 | - (NSArray *)detectMulti:(ZXDecodeHints *)hints error:(NSError **)error; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXURIParsedResult.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXParsedResult.h" 18 | 19 | @interface ZXURIParsedResult : ZXParsedResult 20 | 21 | @property (nonatomic, copy, readonly) NSString *uri; 22 | @property (nonatomic, copy, readonly) NSString *title; 23 | 24 | - (id)initWithUri:(NSString *)uri title:(NSString *)title; 25 | + (id)uriParsedResultWithUri:(NSString *)uri title:(NSString *)title; 26 | - (BOOL)possiblyMaliciousURI; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI01decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAbstractExpandedDecoder.h" 18 | 19 | extern const int GTIN_SIZE; 20 | 21 | @interface ZXAI01decoder : ZXAbstractExpandedDecoder 22 | 23 | - (void)encodeCompressedGtin:(NSMutableString *)buf currentPos:(int)currentPos; 24 | - (void)encodeCompressedGtinWithoutAI:(NSMutableString *)buf currentPos:(int)currentPos initialBufferPosition:(int)initialBufferPosition; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/detector/ZXFinderPatternInfo.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXFinderPatternInfo.h" 18 | #import "ZXQRCodeFinderPattern.h" 19 | 20 | @implementation ZXFinderPatternInfo 21 | 22 | - (id)initWithPatternCenters:(NSArray *)patternCenters { 23 | if (self = [super init]) { 24 | _bottomLeft = patternCenters[0]; 25 | _topLeft = patternCenters[1]; 26 | _topRight = patternCenters[2]; 27 | } 28 | 29 | return self; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXBlockParsedResult.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXDecodedInformation; 18 | 19 | @interface ZXBlockParsedResult : NSObject 20 | 21 | @property (nonatomic, strong, readonly) ZXDecodedInformation *decodedInformation; 22 | @property (nonatomic, assign, readonly) BOOL finished; 23 | 24 | - (id)initWithFinished:(BOOL)finished; 25 | - (id)initWithInformation:(ZXDecodedInformation *)information finished:(BOOL)finished; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXDecodedChar.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDecodedChar.h" 18 | 19 | unichar const FNC1char = '$'; 20 | 21 | @implementation ZXDecodedChar 22 | 23 | - (id)initWithNewPosition:(int)newPosition value:(unichar)value { 24 | if (self = [super initWithNewPosition:newPosition]) { 25 | _value = value; 26 | } 27 | 28 | return self; 29 | } 30 | 31 | - (BOOL)fnc1 { 32 | return self.value == FNC1char; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/ZXPair.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDataCharacter.h" 18 | 19 | @class ZXRSSFinderPattern; 20 | 21 | @interface ZXPair : ZXDataCharacter 22 | 23 | @property (nonatomic, assign, readonly) int count; 24 | @property (nonatomic, strong, readonly) ZXRSSFinderPattern *finderPattern; 25 | 26 | - (id)initWithValue:(int)value checksumPortion:(int)checksumPortion finderPattern:(ZXRSSFinderPattern *)finderPattern; 27 | - (void)incrementCount; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ShadowsocksX/SWBQRCodeWindowController.m: -------------------------------------------------------------------------------- 1 | // 2 | // QRCodeWindowController.m 3 | // shadowsocks 4 | // 5 | // Created by clowwindy on 10/12/14. 6 | // Copyright (c) 2014 clowwindy. All rights reserved. 7 | // 8 | 9 | #import "SWBQRCodeWindowController.h" 10 | 11 | @interface SWBQRCodeWindowController () 12 | 13 | @end 14 | 15 | @implementation SWBQRCodeWindowController 16 | 17 | - (void)windowDidLoad { 18 | [super windowDidLoad]; 19 | 20 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. 21 | [self.webView.mainFrame loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"qrcode" withExtension:@"htm"]]]; 22 | self.webView.frameLoadDelegate = self; 23 | } 24 | 25 | -(void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame { 26 | if (self.qrCode) { 27 | [self.webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"genCode('%@')", _qrCode]]; 28 | } 29 | } 30 | 31 | -(void)dealloc { 32 | self.webView.frameLoadDelegate = nil; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXCodaBarReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDReader.h" 18 | 19 | extern const int CODA_ALPHABET_LEN; 20 | extern const char CODA_ALPHABET[]; 21 | extern const int CODA_CHARACTER_ENCODINGS[]; 22 | 23 | @class ZXBitArray, ZXDecodeHints, ZXResult; 24 | 25 | /** 26 | * Decodes Codabar barcodes. 27 | */ 28 | @interface ZXCodaBarReader : ZXOneDReader 29 | 30 | + (BOOL)arrayContains:(char *)array length:(unsigned int)length key:(unichar)key; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAnyAIDecoder.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAnyAIDecoder.h" 18 | #import "ZXGeneralAppIdDecoder.h" 19 | 20 | int const ANY_AI_HEADER_SIZE = 2 + 1 + 2; 21 | 22 | @implementation ZXAnyAIDecoder 23 | 24 | - (NSString *)parseInformationWithError:(NSError **)error { 25 | NSMutableString *buf = [NSMutableString string]; 26 | return [self.generalDecoder decodeAllCodes:buf initialPosition:ANY_AI_HEADER_SIZE error:error]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/decoder/ec/ZXPDF417ECErrorCorrection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * PDF417 error correction implementation. 19 | * 20 | * This example 21 | * is quite useful in understanding the algorithm. 22 | */ 23 | 24 | @interface ZXPDF417ECErrorCorrection : NSObject 25 | 26 | - (int)decode:(NSMutableArray *)received numECCodewords:(int)numECCodewords erasures:(NSArray *)erasures; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/decoder/ZXQRCodeBitMatrixParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitMatrix, ZXFormatInformation, ZXQRCodeVersion; 18 | 19 | @interface ZXQRCodeBitMatrixParser : NSObject 20 | 21 | - (id)initWithBitMatrix:(ZXBitMatrix *)bitMatrix error:(NSError **)error; 22 | - (ZXFormatInformation *)readFormatInformationWithError:(NSError **)error; 23 | - (ZXQRCodeVersion *)readVersionWithError:(NSError **)error; 24 | - (NSArray *)readCodewordsWithError:(NSError **)error; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/maxicode/decoder/ZXMaxiCodeDecodedBitStreamParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * MaxiCodes can encode text or structured information as bits in one of several modes, 19 | * with multiple character sets in one code. This class decodes the bits back into text. 20 | */ 21 | 22 | @class ZXDecoderResult; 23 | 24 | @interface ZXMaxiCodeDecodedBitStreamParser : NSObject 25 | 26 | + (ZXDecoderResult *)decode:(int8_t *)bytes length:(unsigned int)length mode:(int)mode; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXMultiFormatUPCEANReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDReader.h" 18 | 19 | /** 20 | * A reader that can read all available UPC/EAN formats. If a caller wants to try to 21 | * read all such formats, it is most efficient to use this implementation rather than invoke 22 | * individual readers. 23 | */ 24 | 25 | @class ZXDecodeHints; 26 | 27 | @interface ZXMultiFormatUPCEANReader : ZXOneDReader 28 | 29 | - (id)initWithHints:(ZXDecodeHints *)hints; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/ZXRSSFinderPattern.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultPoint.h" 18 | 19 | @interface ZXRSSFinderPattern : NSObject 20 | 21 | @property (nonatomic, assign, readonly) int value; 22 | @property (nonatomic, strong, readonly) NSMutableArray *startEnd; 23 | @property (nonatomic, strong, readonly) NSMutableArray *resultPoints; 24 | 25 | - (id)initWithValue:(int)value startEnd:(NSMutableArray *)startEnd start:(int)start end:(int)end rowNumber:(int)rowNumber; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/ZXRSSUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. 19 | */ 20 | 21 | @interface ZXRSSUtils : NSObject 22 | 23 | + (NSArray *)rssWidths:(int)val n:(int)n elements:(int)elements maxWidth:(int)maxWidth noNarrow:(BOOL)noNarrow; 24 | + (int)rssValue:(int *)widths widthsLen:(unsigned int)widthsLen maxWidth:(int)maxWidth noNarrow:(BOOL)noNarrow; 25 | + (NSArray *)elements:(NSArray *)eDist N:(int)N K:(int)K; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/ZXCharacterSetECI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXECI.h" 18 | 19 | /** 20 | * Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 21 | * of ISO 18004. 22 | */ 23 | 24 | @interface ZXCharacterSetECI : ZXECI 25 | 26 | @property (nonatomic, readonly) NSStringEncoding encoding; 27 | 28 | + (ZXCharacterSetECI *)characterSetECIByValue:(int)value; 29 | + (ZXCharacterSetECI *)characterSetECIByEncoding:(NSStringEncoding)encoding; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/encoder/ZXBarcodeRow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXBarcodeRow : NSObject 18 | 19 | @property (nonatomic, assign, readonly) int8_t *row; 20 | @property (nonatomic, assign, readonly) int rowLength; 21 | 22 | + (ZXBarcodeRow *)barcodeRowWithWidth:(int)width; 23 | - (id)initWithWidth:(int)width; 24 | - (void)setX:(int)x value:(int8_t)value; 25 | - (void)setX:(int)x black:(BOOL)black; 26 | - (void)addBar:(BOOL)black width:(int)width; 27 | - (int8_t *)scaledRow:(int)scale; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ShadowWeb/encrypt.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #import 4 | #import 5 | 6 | struct encryption_ctx { 7 | EVP_CIPHER_CTX* ctx; 8 | uint8_t status; 9 | unsigned char iv[16]; 10 | size_t iv_len; 11 | size_t bytes_remaining; // only for libsodium 12 | uint64_t ic; // only for libsodium 13 | uint8_t cipher; 14 | }; 15 | 16 | #define STATUS_EMPTY 0 17 | #define STATUS_INIT 1 18 | #define STATUS_DESTORYED 2 19 | 20 | #define kShadowsocksMethods 13 21 | 22 | const char *shadowsocks_encryption_names[]; 23 | 24 | void encrypt_buf(struct encryption_ctx* ctx, unsigned char *buf, size_t *len); 25 | void decrypt_buf(struct encryption_ctx* ctx, unsigned char *buf, size_t *len); 26 | 27 | int send_encrypt(struct encryption_ctx* ctx, int sock, unsigned char *buf, size_t *len, int flags); 28 | int recv_decrypt(struct encryption_ctx* ctx, int sock, unsigned char *buf, size_t *len, int flags); 29 | 30 | void init_encryption(struct encryption_ctx* ctx); 31 | void cleanup_encryption(struct encryption_ctx* ctx); 32 | 33 | void config_encryption(const char *password, const char *method); 34 | 35 | unsigned char *shadowsocks_key; 36 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXEANManufacturerOrgSupport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Records EAN prefix to GS1 Member Organization, where the member organization 19 | * correlates strongly with a country. This is an imperfect means of identifying 20 | * a country of origin by EAN-13 barcode value. See 21 | * http://en.wikipedia.org/wiki/List_of_GS1_country_codes 22 | */ 23 | 24 | @interface ZXEANManufacturerOrgSupport : NSObject 25 | 26 | - (NSString *)lookupCountryIdentifier:(NSString *)productCode; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXOneDimensionalCodeWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXWriter.h" 18 | 19 | /** 20 | * Encapsulates functionality and implementation that is common to one-dimensional barcodes. 21 | */ 22 | @interface ZXOneDimensionalCodeWriter : NSObject 23 | 24 | - (BOOL *)encode:(NSString *)contents length:(int *)pLength; 25 | - (int)appendPattern:(BOOL *)target pos:(int)pos pattern:(int *)pattern patternLen:(int)patternLen startColor:(BOOL)startColor; 26 | - (int)defaultMargin; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXISBNParsedResult.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXISBNParsedResult.h" 18 | 19 | @implementation ZXISBNParsedResult 20 | 21 | - (id)initWithIsbn:(NSString *)isbn { 22 | if (self = [super initWithType:kParsedResultTypeISBN]) { 23 | _isbn = isbn; 24 | } 25 | 26 | return self; 27 | } 28 | 29 | + (id)isbnParsedResultWithIsbn:(NSString *)isbn { 30 | return [[self alloc] initWithIsbn:isbn]; 31 | } 32 | 33 | - (NSString *)displayResult { 34 | return self.isbn; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/detector/ZXDataMatrixDetector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code 19 | * is rotated or skewed, or partially obscured. 20 | */ 21 | 22 | @class ZXBitMatrix, ZXDetectorResult, ZXWhiteRectangleDetector; 23 | 24 | @interface ZXDataMatrixDetector : NSObject 25 | 26 | - (id)initWithImage:(ZXBitMatrix *)image error:(NSError **)error; 27 | - (ZXDetectorResult *)detectWithError:(NSError **)error; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAI01320xDecoder.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAI01320xDecoder.h" 18 | 19 | @implementation ZXAI01320xDecoder 20 | 21 | - (void)addWeightCode:(NSMutableString *)buf weight:(int)weight { 22 | if (weight < 10000) { 23 | [buf appendString:@"(3202)"]; 24 | } else { 25 | [buf appendString:@"(3203)"]; 26 | } 27 | } 28 | 29 | - (int)checkWeight:(int)weight { 30 | if (weight < 10000) { 31 | return weight; 32 | } 33 | return weight - 10000; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/multi/ZXMultipleBarcodeReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXBinaryBitmap.h" 18 | #import "ZXResult.h" 19 | 20 | /** 21 | * Implementation of this interface attempt to read several barcodes from one image. 22 | */ 23 | 24 | @class ZXDecodeHints; 25 | 26 | @protocol ZXMultipleBarcodeReader 27 | 28 | - (NSArray *)decodeMultiple:(ZXBinaryBitmap *)image error:(NSError **)error; 29 | - (NSArray *)decodeMultiple:(ZXBinaryBitmap *)image hints:(ZXDecodeHints *)hints error:(NSError **)error; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/maxicode/decoder/ZXMaxiCodeDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * The main class which implements MaxiCode decoding -- as opposed to locating and extracting 19 | * the MaxiCode from an image. 20 | */ 21 | 22 | @class ZXBitMatrix, ZXDecodeHints, ZXDecoderResult; 23 | 24 | @interface ZXMaxiCodeDecoder : NSObject 25 | 26 | - (ZXDecoderResult *)decode:(ZXBitMatrix *)bits error:(NSError **)error; 27 | - (ZXDecoderResult *)decode:(ZXBitMatrix *)bits hints:(ZXDecodeHints *)hints error:(NSError **)error; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/encoder/ZXDimensions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. 19 | */ 20 | @interface ZXDimensions : NSObject 21 | 22 | @property (nonatomic, assign) int minCols; 23 | @property (nonatomic, assign) int maxCols; 24 | @property (nonatomic, assign) int minRows; 25 | @property (nonatomic, assign) int maxRows; 26 | 27 | - (id)initWithMinCols:(int)minCols maxCols:(int)maxCols minRows:(int)minRows maxRows:(int)maxRows; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/decoder/ZXDataMatrixDecodedBitStreamParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes 19 | * in one Data Matrix Code. This class decodes the bits back into text. 20 | * 21 | * See ISO 16022:2006, 5.2.1 - 5.2.9.2 22 | */ 23 | 24 | @class ZXDecoderResult; 25 | 26 | @interface ZXDataMatrixDecodedBitStreamParser : NSObject 27 | 28 | + (ZXDecoderResult *)decode:(int8_t *)bytes length:(unsigned int)length error:(NSError **)error; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/ZXPDF417Reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXMultipleBarcodeReader.h" 18 | #import "ZXReader.h" 19 | 20 | /** 21 | * This implementation can detect and decode PDF417 codes in an image. 22 | */ 23 | 24 | @class ZXDecodeHints, ZXResult; 25 | 26 | @interface ZXPDF417Reader : NSObject 27 | 28 | - (NSArray *)decodeMultiple:(ZXBinaryBitmap *)image error:(NSError **)error; 29 | - (NSArray *)decodeMultiple:(ZXBinaryBitmap *)image hints:(ZXDecodeHints *)hints error:(NSError **)error; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/encoder/ZXPDF417HighLevelEncoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Jeremias Maerki in part, and ZXing Authors in part 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * This file has been modified from its original form in Barcode4J. 19 | */ 20 | 21 | #import "ZXCompaction.h" 22 | 23 | /** 24 | * PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in 25 | * annex P. 26 | */ 27 | 28 | @interface ZXPDF417HighLevelEncoder : NSObject 29 | 30 | + (NSString *)encodeHighLevel:(NSString *)msg compaction:(ZXCompaction)compaction error:(NSError **)error; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/encoder/ZXBlockPair.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXBlockPair : NSObject 18 | 19 | @property (nonatomic, assign, readonly) int8_t *dataBytes; 20 | @property (nonatomic, assign, readonly) int8_t *errorCorrectionBytes; 21 | @property (nonatomic, assign, readonly) int errorCorrectionLength; 22 | @property (nonatomic, assign, readonly) int length; 23 | 24 | - (id)initWithData:(int8_t *)data length:(unsigned int)length errorCorrection:(int8_t *)errorCorrection errorCorrectionLength:(unsigned int)errorCorrectionLength; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXTelParsedResult.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXParsedResult.h" 18 | 19 | @interface ZXTelParsedResult : ZXParsedResult 20 | 21 | @property (nonatomic, copy, readonly) NSString *number; 22 | @property (nonatomic, copy, readonly) NSString *telURI; 23 | @property (nonatomic, copy, readonly) NSString *title; 24 | 25 | - (id)initWithNumber:(NSString *)number telURI:(NSString *)telURI title:(NSString *)title; 26 | + (id)telParsedResultWithNumber:(NSString *)number telURI:(NSString *)telURI title:(NSString *)title; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/decoder/ZXDataMatrixDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting 19 | * the Data Matrix Code from an image. 20 | */ 21 | 22 | @class ZXBitMatrix, ZXDecoderResult, ZXReedSolomonDecoder; 23 | 24 | @interface ZXDataMatrixDecoder : NSObject 25 | 26 | - (ZXDecoderResult *)decode:(BOOL **)image length:(unsigned int)length error:(NSError **)error; 27 | - (ZXDecoderResult *)decodeMatrix:(ZXBitMatrix *)bits error:(NSError **)error; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXAbstractExpandedDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitArray, ZXGeneralAppIdDecoder; 18 | 19 | @interface ZXAbstractExpandedDecoder : NSObject 20 | 21 | @property (nonatomic, strong, readonly) ZXGeneralAppIdDecoder *generalDecoder; 22 | @property (nonatomic, strong, readonly) ZXBitArray *information; 23 | 24 | - (id)initWithInformation:(ZXBitArray *)information; 25 | - (NSString *)parseInformationWithError:(NSError **)error; 26 | + (ZXAbstractExpandedDecoder *)createDecoder:(ZXBitArray *)information; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/aztec/ZXAztecDetectorResult.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAztecDetectorResult.h" 18 | 19 | @implementation ZXAztecDetectorResult 20 | 21 | - (id)initWithBits:(ZXBitMatrix *)bits 22 | points:(NSArray *)points 23 | compact:(BOOL)compact 24 | nbDatablocks:(int)nbDatablocks 25 | nbLayers:(int)nbLayers { 26 | if (self = [super initWithBits:bits points:points]) { 27 | _compact = compact; 28 | _nbDatablocks = nbDatablocks; 29 | _nbLayers = nbLayers; 30 | } 31 | 32 | return self; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Shadowsocks for iOS and OSX 2 | =========================== 3 | [![Build Status](https://travis-ci.org/shadowsocks/shadowsocks-iOS.svg?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-iOS) 4 | 5 | 6 | iOS 7 | ----- 8 | [![iOS Icon](https://raw.github.com/shadowsocks/shadowsocks-iOS/master/ios_128.png)](https://github.com/shadowsocks/shadowsocks-iOS/wiki/Help) 9 | [iOS Version](https://github.com/shadowsocks/shadowsocks-iOS/wiki/Help) 10 | 11 | OSX 12 | ----- 13 | [![OSX Icon](https://raw.github.com/shadowsocks/shadowsocks-iOS/master/osx_128.png)](https://github.com/shadowsocks/shadowsocks-iOS/wiki/Shadowsocks-for-OSX-Help) 14 | [OSX Version](https://github.com/shadowsocks/shadowsocks-iOS/wiki/Shadowsocks-for-OSX-Help) 15 | 16 | License 17 | ------- 18 | The project is released under the terms of [GPLv3](https://raw.github.com/shadowsocks/shadowsocks-iOS/master/LICENSE). 19 | 20 | Bugs and Issues 21 | ---------------- 22 | 23 | Please visit [issue tracker](https://github.com/shadowsocks/shadowsocks-iOS/issues?state=open) 24 | 25 | Mailing list: http://groups.google.com/group/shadowsocks 26 | 27 | Also see [troubleshooting](https://github.com/clowwindy/shadowsocks/wiki/Troubleshooting) 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXSMSTOMMSTOResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * Parses an "smsto:" URI result, whose format is not standardized but appears to be like: 21 | * smsto:number(:body). 22 | * 23 | * This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and 24 | * "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI 25 | * for purposes of forwarding to the platform. 26 | */ 27 | 28 | @interface ZXSMSTOMMSTOResultParser : ZXResultParser 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXTextParsedResult.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXParsedResult.h" 18 | 19 | /** 20 | * A simple result type encapsulating a string that has no further 21 | * interpretation. 22 | */ 23 | 24 | @interface ZXTextParsedResult : ZXParsedResult 25 | 26 | @property (nonatomic, copy, readonly) NSString *text; 27 | @property (nonatomic, copy, readonly) NSString *language; 28 | 29 | - (id)initWithText:(NSString *)text language:(NSString *)language; 30 | + (id)textParsedResultWithText:(NSString *)text language:(NSString *)language; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/ZXCode39Reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXOneDReader.h" 18 | 19 | /** 20 | * Decodes Code 39 barcodes. This does not support "Full ASCII Code 39" yet. 21 | */ 22 | 23 | extern char CODE39_ALPHABET[]; 24 | extern NSString *CODE39_ALPHABET_STRING; 25 | extern int CODE39_CHARACTER_ENCODINGS[]; 26 | 27 | @class ZXDecodeHints, ZXResult; 28 | 29 | @interface ZXCode39Reader : ZXOneDReader 30 | 31 | - (id)initUsingCheckDigit:(BOOL)usingCheckDigit; 32 | - (id)initUsingCheckDigit:(BOOL)usingCheckDigit extendedMode:(BOOL)extendedMode; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/encoder/ZXPDF417ErrorCorrection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Jeremias Maerki in part, and ZXing Authors in part 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in 19 | * chapter 4.10. 20 | */ 21 | @interface ZXPDF417ErrorCorrection : NSObject 22 | 23 | + (int)errorCorrectionCodewordCount:(int)errorCorrectionLevel; 24 | + (int)recommendedMinimumErrorCorrectionLevel:(int)n error:(NSError **)error; 25 | + (NSString *)generateErrorCorrection:(NSString *)dataCodewords errorCorrectionLevel:(int)errorCorrectionLevel; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/encoder/ZXQRCode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | extern int const NUM_MASK_PATTERNS; 18 | 19 | @class ZXByteMatrix, ZXErrorCorrectionLevel, ZXMode, ZXQRCodeVersion; 20 | 21 | @interface ZXQRCode : NSObject 22 | 23 | @property (nonatomic, strong) ZXMode *mode; 24 | @property (nonatomic, strong) ZXErrorCorrectionLevel *ecLevel; 25 | @property (nonatomic, strong) ZXQRCodeVersion *version; 26 | @property (nonatomic, assign) int maskPattern; 27 | @property (nonatomic, strong) ZXByteMatrix *matrix; 28 | 29 | + (BOOL)isValidMaskPattern:(int)maskPattern; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/ZXExpandedRow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. 19 | */ 20 | @interface ZXExpandedRow : NSObject 21 | 22 | @property (nonatomic, strong, readonly) NSArray *pairs; 23 | @property (nonatomic, assign, readonly) int rowNumber; 24 | @property (nonatomic, assign, readonly) BOOL wasReversed; 25 | 26 | - (id)initWithPairs:(NSArray *)pairs rowNumber:(int)rowNumber wasReversed:(BOOL)wasReversed; 27 | - (BOOL)isReversed; 28 | - (BOOL)isEquivalent:(NSArray *)otherPairs; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXBlockParsedResult.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXBlockParsedResult.h" 18 | #import "ZXDecodedInformation.h" 19 | 20 | @implementation ZXBlockParsedResult 21 | 22 | - (id)initWithFinished:(BOOL)finished { 23 | return [self initWithInformation:nil finished:finished]; 24 | } 25 | 26 | - (id)initWithInformation:(ZXDecodedInformation *)information finished:(BOOL)finished { 27 | if (self = [super init]) { 28 | _decodedInformation = information; 29 | _finished = finished; 30 | } 31 | 32 | return self; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXDecodedInformation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDecodedObject.h" 18 | 19 | @interface ZXDecodedInformation : ZXDecodedObject 20 | 21 | @property (nonatomic, copy, readonly) NSString *theNewString; 22 | @property (nonatomic, assign, readonly) int remainingValue; 23 | @property (nonatomic, assign, readonly) BOOL remaining; 24 | 25 | - (id)initWithNewPosition:(int)newPosition newString:(NSString *)newString; 26 | - (id)initWithNewPosition:(int)newPosition newString:(NSString *)newString remainingValue:(int)remainingValue; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXDecodedNumeric.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDecodedObject.h" 18 | 19 | extern const int FNC1; 20 | 21 | @interface ZXDecodedNumeric : ZXDecodedObject 22 | 23 | @property (nonatomic, assign, readonly) int firstDigit; 24 | @property (nonatomic, assign, readonly) int secondDigit; 25 | @property (nonatomic, assign, readonly) int value; 26 | 27 | - (id)initWithNewPosition:(int)newPosition firstDigit:(int)firstDigit secondDigit:(int)secondDigit; 28 | - (BOOL)firstDigitFNC1; 29 | - (BOOL)secondDigitFNC1; 30 | - (BOOL)anyFNC1; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/ZXWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXBarcodeFormat.h" 18 | 19 | /** 20 | * The base class for all objects which encode/generate a barcode image. 21 | */ 22 | 23 | @class ZXBitMatrix, ZXEncodeHints; 24 | 25 | @protocol ZXWriter 26 | 27 | - (ZXBitMatrix *)encode:(NSString *)contents format:(ZXBarcodeFormat)format width:(int)width height:(int)height error:(NSError **)error; 28 | - (ZXBitMatrix *)encode:(NSString *)contents format:(ZXBarcodeFormat)format width:(int)width height:(int)height hints:(ZXEncodeHints *)hints error:(NSError **)error; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/encoder/ZXByteMatrix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXByteMatrix : NSObject 18 | 19 | @property (nonatomic, assign, readonly) int height; 20 | @property (nonatomic, assign, readonly) int width; 21 | @property (nonatomic, assign, readonly) int8_t **array; 22 | 23 | - (id)initWithWidth:(int)width height:(int)height; 24 | - (char)getX:(int)x y:(int)y; 25 | - (void)setX:(int)x y:(int)y charValue:(char)value; 26 | - (void)setX:(int)x y:(int)y intValue:(int)value; 27 | - (void)setX:(int)x y:(int)y boolValue:(BOOL)value; 28 | - (void)clear:(char)value; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/detector/ZXMonochromeRectangleDetector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * A somewhat generic detector that looks for a barcode-like rectangular region within an image. 19 | * It looks within a mostly white region of an image for a region of black and white, but mostly 20 | * black. It returns the four corners of the region, as best it can determine. 21 | */ 22 | 23 | @class ZXBitMatrix; 24 | 25 | @interface ZXMonochromeRectangleDetector : NSObject 26 | 27 | - (id)initWithImage:(ZXBitMatrix *)image; 28 | - (NSArray *)detectWithError:(NSError **)error; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/detector/ZXAlignmentPattern.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultPoint.h" 18 | 19 | /** 20 | * Encapsulates an alignment pattern, which are the smaller square patterns found in 21 | * all but the simplest QR Codes. 22 | */ 23 | 24 | @interface ZXAlignmentPattern : ZXResultPoint 25 | 26 | - (id)initWithPosX:(float)posX posY:(float)posY estimatedModuleSize:(float)estimatedModuleSize; 27 | - (BOOL)aboutEquals:(float)moduleSize i:(float)i j:(float)j; 28 | - (ZXAlignmentPattern *)combineEstimateI:(float)i j:(float)j newModuleSize:(float)newModuleSize; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/aztec/ZXAztecDetectorResult.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultPoint.h" 18 | #import "ZXBitMatrix.h" 19 | #import "ZXDetectorResult.h" 20 | 21 | @interface ZXAztecDetectorResult : ZXDetectorResult 22 | 23 | @property (nonatomic, readonly) BOOL compact; 24 | @property (nonatomic, readonly) int nbDatablocks; 25 | @property (nonatomic, readonly) int nbLayers; 26 | 27 | - (id)initWithBits:(ZXBitMatrix *)bits 28 | points:(NSArray *)points 29 | compact:(BOOL)compact 30 | nbDatablocks:(int)nbDatablocks 31 | nbLayers:(int)nbLayers; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/detector/ZXMathUtils.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXMathUtils.h" 18 | 19 | @implementation ZXMathUtils 20 | 21 | + (int)round:(float)d { 22 | return (int)(d + 0.5f); 23 | } 24 | 25 | + (float)distance:(float)aX aY:(float)aY bX:(float)bX bY:(float)bY { 26 | float xDiff = aX - bX; 27 | float yDiff = aY - bY; 28 | return sqrtf(xDiff * xDiff + yDiff * yDiff); 29 | } 30 | 31 | + (float)distanceInt:(int)aX aY:(int)aY bX:(int)bX bY:(int)bY { 32 | int xDiff = aX - bX; 33 | int yDiff = aY - bY; 34 | return sqrtf(xDiff * xDiff + yDiff * yDiff); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/ZXPair.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXRSSFinderPattern.h" 18 | #import "ZXPair.h" 19 | 20 | @interface ZXPair () 21 | 22 | @property (nonatomic, assign) int count; 23 | 24 | @end 25 | 26 | @implementation ZXPair 27 | 28 | - (id)initWithValue:(int)value checksumPortion:(int)checksumPortion finderPattern:(ZXRSSFinderPattern *)finderPattern { 29 | if (self = [super initWithValue:value checksumPortion:checksumPortion]) { 30 | _finderPattern = finderPattern; 31 | } 32 | 33 | return self; 34 | } 35 | 36 | - (void)incrementCount { 37 | self.count++; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXAbstractDoCoMoResultParser.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXAbstractDoCoMoResultParser.h" 18 | 19 | @implementation ZXAbstractDoCoMoResultParser 20 | 21 | + (NSArray *) matchDoCoMoPrefixedField:(NSString *)prefix rawText:(NSString *)rawText trim:(BOOL)trim { 22 | return [self matchPrefixedField:prefix rawText:rawText endChar:';' trim:trim]; 23 | } 24 | 25 | + (NSString *) matchSingleDoCoMoPrefixedField:(NSString *)prefix rawText:(NSString *)rawText trim:(BOOL)trim { 26 | return [self matchSinglePrefixedField:prefix rawText:rawText endChar:';' trim:trim]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/common/ZXDecoderResult.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDecoderResult.h" 18 | 19 | @implementation ZXDecoderResult 20 | 21 | - (id)initWithRawBytes:(int8_t *)rawBytes 22 | length:(unsigned int)length 23 | text:(NSString *)text 24 | byteSegments:(NSMutableArray *)byteSegments 25 | ecLevel:(NSString *)ecLevel { 26 | if (self = [super init]) { 27 | _rawBytes = rawBytes; 28 | _length = length; 29 | _text = text; 30 | _byteSegments = byteSegments; 31 | _ecLevel = ecLevel; 32 | } 33 | 34 | return self; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/client/result/ZXAbstractDoCoMoResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXResultParser.h" 18 | 19 | /** 20 | * See DoCoMo's documentation http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/about/s2.html 21 | * about the result types represented by subclasses of this class. 22 | */ 23 | 24 | @interface ZXAbstractDoCoMoResultParser : ZXResultParser 25 | 26 | + (NSArray *)matchDoCoMoPrefixedField:(NSString *)prefix rawText:(NSString *)rawText trim:(BOOL)trim; 27 | + (NSString *)matchSingleDoCoMoPrefixedField:(NSString *)prefix rawText:(NSString *)rawText trim:(BOOL)trim; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/qrcode/decoder/ZXFormatInformation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Encapsulates a QR Code's format information, including the data mask used and 19 | * error correction level. 20 | */ 21 | 22 | @class ZXErrorCorrectionLevel; 23 | 24 | @interface ZXFormatInformation : NSObject 25 | 26 | @property (nonatomic, strong, readonly) ZXErrorCorrectionLevel *errorCorrectionLevel; 27 | @property (nonatomic, assign, readonly) char dataMask; 28 | 29 | + (int)numBitsDiffering:(int)a b:(int)b; 30 | + (ZXFormatInformation *)decodeFormatInformation:(int)maskedFormatInfo1 maskedFormatInfo2:(int)maskedFormatInfo2; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/pdf417/decoder/ZXPDF417Codeword.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @interface ZXPDF417Codeword : NSObject 18 | 19 | @property (nonatomic, assign, readonly) int startX; 20 | @property (nonatomic, assign, readonly) int endX; 21 | @property (nonatomic, assign, readonly) int bucket; 22 | @property (nonatomic, assign, readonly) int value; 23 | @property (nonatomic, assign) int rowNumber; 24 | 25 | - (id)initWithStartX:(int)startX endX:(int)endX bucket:(int)bucket value:(int)value; 26 | - (BOOL)hasValidRowNumber; 27 | - (BOOL)isValidRowNumber:(int)rowNumber; 28 | - (void)setRowNumberAsRowIndicatorColumn; 29 | - (int)width; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/datamatrix/encoder/ZXDataMatrixSymbolInfo144.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "ZXDataMatrixSymbolInfo144.h" 18 | 19 | @implementation ZXDataMatrixSymbolInfo144 20 | 21 | - (id)init { 22 | if (self = [super initWithRectangular:NO dataCapacity:1558 errorCodewords:620 matrixWidth:22 matrixHeight:22 dataRegions:36]) { 23 | self.rsBlockData = -1; //special! see below 24 | self.rsBlockError = 62; 25 | } 26 | 27 | return self; 28 | } 29 | 30 | - (int)interleavedBlockCount { 31 | return 10; 32 | } 33 | 34 | - (int)dataLengthForInterleavedBlock:(int)index { 35 | return (index <= 8) ? 156 : 155; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /zxing-objc/ZXingObjC/oned/rss/expanded/decoders/ZXGeneralAppIdDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @class ZXBitArray, ZXDecodedInformation; 18 | 19 | @interface ZXGeneralAppIdDecoder : NSObject 20 | 21 | - (id)initWithInformation:(ZXBitArray *)information; 22 | - (NSString *)decodeAllCodes:(NSMutableString *)buff initialPosition:(int)initialPosition error:(NSError **)error; 23 | - (int)extractNumericValueFromBitArray:(int)pos bits:(int)bits; 24 | + (int)extractNumericValueFromBitArray:(ZXBitArray *)information pos:(int)pos bits:(int)bits; 25 | - (ZXDecodedInformation *)decodeGeneralPurposeField:(int)pos remaining:(NSString *)remaining; 26 | 27 | @end 28 | --------------------------------------------------------------------------------