[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809
ftylitak
ftylitak at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:31:19 UTC 2010
The following commit has been merged in the upstream branch:
commit 0a40ff470014a00d654328ff372ea8025701a866
Author: ftylitak <ftylitak at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date: Tue May 4 00:24:11 2010 +0000
ZXing on Symbian using OpenC++ (currently only Qr decoder)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1332 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/symbian/ZXingBarcodeReader/.cproject b/symbian/ZXingBarcodeReader/.cproject
new file mode 100644
index 0000000..14100f3
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/.cproject
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+<storageModule buildFromInf="true" buildingTestComps="true" cleanLevel="0" concurrentBuildJobs="4" defaultMMPChangedAction="2" extraSBSv2Args="" infBuildComponents="" infFileLocation="group\bld.inf" macrosFile="" makeEngineToUse="make" manageDependencies="true" moduleId="com.nokia.carbide.cdt.builder.carbideCPPBuilder" overrideMakeEngine="false" overrideWorkspaceSettings="false" promptForMMPChangedAction="false" useConcurrentBuilding="true" useDebugMode="false" useIncrementalBuilder="false" useKeepGoing="false" useMMPMacros="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="Emulator Debug (WINSCW) [S60_5th_Edition_SDK_v1.0]">
+<storageModule buildSystemId="com.nokia.carbide.cdt.builder.CarbideConfigurationDataProvider" id="Emulator Debug (WINSCW) [S60_5th_Edition_SDK_v1.0]" moduleId="org.eclipse.cdt.core.settings" name="Emulator Debug (WINSCW) [S60_5th_Edition_SDK_v1.0]">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.cdt.debug.cw.symbian.SymbianE32" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.CarbideMakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.SBSv2ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MWLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RCOMPErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MWCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakeDefErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="CarbideConfigurationDataProvider">
+<ENV_VAR_DATA_ID/>
+<ARGUMENTS_DATA_ID ABLDFREEZEARGSSTORAGE="-r"/>
+<ROM_BUILDER_DATA_ID ROMBUILDWORKINGDIRECTORYSTORAGE="C:\"/>
+</storageModule>
+<storageModule filesCache="C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\bld.inf;C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\CameraWrapperExample.mmp;" includesCache="C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/sys;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/variant;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/ecom;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport/stl;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/inc;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/common/reedsolomon;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/oned;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/decoder;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/detector;" macrosCache="_UNICODE;__SYMBIAN32__;__SUPPORT_CPP_EXCEPTIONS__;__EXE__;__S60_3X__;__SERIES60_3X__;__S60_5X__;__CW32__;__WINS__;__WINSCW__;__S60_50__;_DEBUG;" moduleId="configDataCache" sourcesCache="/ZXingBarcodeReader/data;/ZXingBarcodeReader/group;/ZXingBarcodeReader/group/zxing;/ZXingBarcodeReader/group/zxing/common;/ZXingBarcodeReader/group/zxing/common/reedsolomon;/ZXingBarcodeReader/group/zxing/oned;/ZXingBarcodeReader/group/zxing/qrcode;/ZXingBarcodeReader/group/zxing/qrcode/decoder;/ZXingBarcodeReader/group/zxing/qrcode/detector;/ZXingBarcodeReader/inc;/ZXingBarcodeReader/src;" timestampCache="1272924381505" useMmpMacrosCache="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+</cconfiguration>
+<cconfiguration id="Phone Debug (ARMV5) [S60_5th_Edition_SDK_v1.0]">
+<storageModule buildSystemId="com.nokia.carbide.cdt.builder.CarbideConfigurationDataProvider" id="Phone Debug (ARMV5) [S60_5th_Edition_SDK_v1.0]" moduleId="org.eclipse.cdt.core.settings" name="Phone Debug (ARMV5) [S60_5th_Edition_SDK_v1.0]">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.cdt.debug.cw.symbian.SymbianE32" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RVCTLinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.CarbideMakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.SBSv2ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.Elf2E32ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RCOMPErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakeDefErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RVCTCompilerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="CarbideConfigurationDataProvider">
+<ENV_VAR_DATA_ID/>
+<ARGUMENTS_DATA_ID ABLDFREEZEARGSSTORAGE="-r"/>
+<ROM_BUILDER_DATA_ID ROMBUILDWORKINGDIRECTORYSTORAGE="C:\"/>
+</storageModule>
+<storageModule filesCache="C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\bld.inf;C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\CameraWrapperExample.mmp;" includesCache="C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/sys;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/variant;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/ecom;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport/stl;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/inc;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/common/reedsolomon;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/oned;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/decoder;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/detector;" macrosCache="_UNICODE;__SUPPORT_CPP_EXCEPTIONS__;__MARM_ARMV5__;__ARMCC__;__ARMCC_2_2__;__SYMBIAN32__;__MARM__;__EXE__;__S60_3X__;__SERIES60_3X__;__ARMCC_2__;__S60_5X__;__EPOC32__;__GENERIC_MARM__;__EABI__;__S60_50__;_DEBUG;" moduleId="configDataCache" sourcesCache="/ZXingBarcodeReader/data;/ZXingBarcodeReader/group;/ZXingBarcodeReader/group/zxing;/ZXingBarcodeReader/group/zxing/common;/ZXingBarcodeReader/group/zxing/common/reedsolomon;/ZXingBarcodeReader/group/zxing/oned;/ZXingBarcodeReader/group/zxing/qrcode;/ZXingBarcodeReader/group/zxing/qrcode/decoder;/ZXingBarcodeReader/group/zxing/qrcode/detector;/ZXingBarcodeReader/inc;/ZXingBarcodeReader/src;" timestampCache="1272924381514" useMmpMacrosCache="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+</cconfiguration>
+<cconfiguration id="Phone Release (ARMV5) [S60_5th_Edition_SDK_v1.0]">
+<storageModule buildSystemId="com.nokia.carbide.cdt.builder.CarbideConfigurationDataProvider" id="Phone Release (ARMV5) [S60_5th_Edition_SDK_v1.0]" moduleId="org.eclipse.cdt.core.settings" name="Phone Release (ARMV5) [S60_5th_Edition_SDK_v1.0]">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.cdt.debug.cw.symbian.SymbianE32" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RVCTLinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.CarbideMakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.SBSv2ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.Elf2E32ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RCOMPErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakeDefErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RVCTCompilerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="CarbideConfigurationDataProvider">
+<ENV_VAR_DATA_ID/>
+<ARGUMENTS_DATA_ID ABLDFREEZEARGSSTORAGE="-r"/>
+<ROM_BUILDER_DATA_ID ROMBUILDWORKINGDIRECTORYSTORAGE="C:\"/>
+</storageModule>
+<storageModule filesCache="C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\bld.inf;C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\CameraWrapperExample.mmp;" includesCache="C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/sys;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/variant;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/ecom;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport/stl;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/inc;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/common/reedsolomon;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/oned;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/decoder;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/detector;" macrosCache="_UNICODE;__SUPPORT_CPP_EXCEPTIONS__;__MARM_ARMV5__;NDEBUG;__ARMCC__;__ARMCC_2_2__;__SYMBIAN32__;__MARM__;__EXE__;__S60_3X__;__SERIES60_3X__;__ARMCC_2__;__S60_5X__;__EPOC32__;__GENERIC_MARM__;__EABI__;__S60_50__;" moduleId="configDataCache" sourcesCache="/ZXingBarcodeReader/data;/ZXingBarcodeReader/group;/ZXingBarcodeReader/group/zxing;/ZXingBarcodeReader/group/zxing/common;/ZXingBarcodeReader/group/zxing/common/reedsolomon;/ZXingBarcodeReader/group/zxing/oned;/ZXingBarcodeReader/group/zxing/qrcode;/ZXingBarcodeReader/group/zxing/qrcode/decoder;/ZXingBarcodeReader/group/zxing/qrcode/detector;/ZXingBarcodeReader/inc;/ZXingBarcodeReader/src;" timestampCache="1272924381522" useMmpMacrosCache="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+</cconfiguration>
+<cconfiguration id="Phone Debug (GCCE) [S60_5th_Edition_SDK_v1.0]">
+<storageModule buildSystemId="com.nokia.carbide.cdt.builder.CarbideConfigurationDataProvider" id="Phone Debug (GCCE) [S60_5th_Edition_SDK_v1.0]" moduleId="org.eclipse.cdt.core.settings" name="Phone Debug (GCCE) [S60_5th_Edition_SDK_v1.0]">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.cdt.debug.cw.symbian.SymbianE32" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.CarbideMakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.SBSv2ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.Elf2E32ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RCOMPErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.GCCECompilerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakeDefErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.GCCEAssemblerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.GCCELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="CarbideConfigurationDataProvider">
+<SIS_BUILDER_DATA_ID CREATESTUBSTORAGE="false" ENABLEDSTORAGE="true" PARTIALUPGRADESTORAGE="false" PKGFILESTORAGE="C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\sis\ZXingBarcodeReader_S60.pkg" SIGNINGTYPESTORAGE="1"/>
+<ENV_VAR_DATA_ID/>
+<ARGUMENTS_DATA_ID ABLDFREEZEARGSSTORAGE="-r"/>
+<ROM_BUILDER_DATA_ID ROMBUILDWORKINGDIRECTORYSTORAGE="C:\"/>
+</storageModule>
+<storageModule filesCache="C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\bld.inf;C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\CameraWrapperExample.mmp;" includesCache="C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/sys;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/variant;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/ecom;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport/stl;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/inc;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/common/reedsolomon;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/oned;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/decoder;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/detector;" macrosCache="_UNICODE;__SUPPORT_CPP_EXCEPTIONS__;__MARM_ARMV5__;__SYMBIAN32__;__GCCE__;__MARM__;__EXE__;__SERIES60_3X__;__S60_3X__;__S60_5X__;__EPOC32__;__GENERIC_MARM__;__EABI__;_DEBUG;__S60_50__;" moduleId="configDataCache" sourcesCache="/ZXingBarcodeReader/data;/ZXingBarcodeReader/group;/ZXingBarcodeReader/group/zxing;/ZXingBarcodeReader/group/zxing/common;/ZXingBarcodeReader/group/zxing/common/reedsolomon;/ZXingBarcodeReader/group/zxing/oned;/ZXingBarcodeReader/group/zxing/qrcode;/ZXingBarcodeReader/group/zxing/qrcode/decoder;/ZXingBarcodeReader/group/zxing/qrcode/detector;/ZXingBarcodeReader/inc;/ZXingBarcodeReader/src;" timestampCache="1272924381542" useMmpMacrosCache="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+</cconfiguration>
+<cconfiguration id="Phone Release (GCCE) [S60_5th_Edition_SDK_v1.0]">
+<storageModule buildSystemId="com.nokia.carbide.cdt.builder.CarbideConfigurationDataProvider" id="Phone Release (GCCE) [S60_5th_Edition_SDK_v1.0]" moduleId="org.eclipse.cdt.core.settings" name="Phone Release (GCCE) [S60_5th_Edition_SDK_v1.0]">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.cdt.debug.cw.symbian.SymbianE32" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.CarbideMakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.SBSv2ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.Elf2E32ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RCOMPErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.GCCECompilerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakeDefErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.GCCEAssemblerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.GCCELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="CarbideConfigurationDataProvider">
+<ENV_VAR_DATA_ID/>
+<ARGUMENTS_DATA_ID ABLDFREEZEARGSSTORAGE="-r"/>
+<ROM_BUILDER_DATA_ID ROMBUILDWORKINGDIRECTORYSTORAGE="C:\"/>
+</storageModule>
+<storageModule filesCache="C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\bld.inf;C:\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\CameraWrapperExample.mmp;" includesCache="C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/sys;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/variant;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/ecom;C:/S60/devices/S60_5th_Edition_SDK_v1.0/epoc32/include/stdapis/stlport/stl;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/inc;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/common/reedsolomon;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/oned;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/decoder;C:/Carbide/ZXingWorkspace/ZXingBarcodeReader/group/zxing/qrcode/detector;" macrosCache="_UNICODE;__SUPPORT_CPP_EXCEPTIONS__;__MARM_ARMV5__;NDEBUG;__SYMBIAN32__;__GCCE__;__MARM__;__EXE__;__SERIES60_3X__;__S60_3X__;__S60_5X__;__EPOC32__;__GENERIC_MARM__;__EABI__;__S60_50__;" moduleId="configDataCache" sourcesCache="/ZXingBarcodeReader/data;/ZXingBarcodeReader/group;/ZXingBarcodeReader/group/zxing;/ZXingBarcodeReader/group/zxing/common;/ZXingBarcodeReader/group/zxing/common/reedsolomon;/ZXingBarcodeReader/group/zxing/oned;/ZXingBarcodeReader/group/zxing/qrcode;/ZXingBarcodeReader/group/zxing/qrcode/decoder;/ZXingBarcodeReader/group/zxing/qrcode/detector;/ZXingBarcodeReader/inc;/ZXingBarcodeReader/src;" timestampCache="1272924381550" useMmpMacrosCache="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+</cconfiguration>
+</storageModule>
+</cproject>
diff --git a/symbian/ZXingBarcodeReader/.project b/symbian/ZXingBarcodeReader/.project
new file mode 100644
index 0000000..cc8486f
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/.project
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ZXingBarcodeReader</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.nokia.carbide.cdt.builder.carbideCPPBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>com.nokia.carbide.cdt.builder.carbideCPPBuilderNature</nature>
+ </natures>
+</projectDescription>
diff --git a/symbian/ZXingBarcodeReader/.settings/org.eclipse.cdt.ui.prefs b/symbian/ZXingBarcodeReader/.settings/org.eclipse.cdt.ui.prefs
new file mode 100644
index 0000000..55c6104
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/.settings/org.eclipse.cdt.ui.prefs
@@ -0,0 +1,4 @@
+#Tue Apr 27 21:26:48 EEST 2010
+eclipse.preferences.version=1
+formatter_profile=Qt
+formatter_settings_version=1
diff --git a/symbian/ZXingBarcodeReader/Nokia_Licence.txt b/symbian/ZXingBarcodeReader/Nokia_Licence.txt
new file mode 100644
index 0000000..758a745
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/Nokia_Licence.txt
@@ -0,0 +1,31 @@
+Copyright © 2009 Nokia Corporation. All rights reserved.
+Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation.
+Java and all Java-based marks are trademarks or registered trademarks of
+Sun Microsystems, Inc. Other product and company names mentioned herein may be
+trademarks or trade names of their respective owners.
+
+
+Subject to the conditions below, you may, without charge:
+
+· Use, copy, modify and/or merge copies of this software and
+ associated documentation files (the Software)
+
+· Publish, distribute, sub-license and/or sell new software
+ derived from or incorporating the Software.
+
+
+
+This file, unmodified, shall be included with all copies or substantial portions
+of the Software that are distributed in source code form.
+
+The Software cannot constitute the primary value of any new software derived
+from or incorporating the Software.
+
+Any person dealing with the Software shall not misrepresent the source of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/COPYING b/symbian/ZXingBarcodeReader/ZXing_Licence.txt
similarity index 100%
copy from COPYING
copy to symbian/ZXingBarcodeReader/ZXing_Licence.txt
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/InstallToDevice/CameraWrapper/sis/camerawrapper.sisx b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/InstallToDevice/CameraWrapper/sis/camerawrapper.sisx
new file mode 100644
index 0000000..8a4fab2
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/InstallToDevice/CameraWrapper/sis/camerawrapper.sisx differ
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/include/cameraengine.h b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/include/cameraengine.h
new file mode 100644
index 0000000..d802fb3
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/include/cameraengine.h
@@ -0,0 +1,241 @@
+/*
+* ============================================================================
+* Name : cameraengine.h
+* Part of : CameraWrapper
+* Description : Camera engine class declaration
+* Version : %version: 2 %
+*
+* Copyright (c) 2009 Nokia Corporation.
+* This material, including documentation and any related
+* computer programs, is protected by copyright controlled by
+* Nokia Corporation.
+* ==============================================================================
+*/
+
+#ifndef CCAMERAENGINE_H
+#define CCAMERAENGINE_H
+
+// INCLUDES
+#include <e32base.h>
+#include <ecam.h>
+
+// FORWARD DECLARATIONS
+class CCameraEnginePrivate;
+class MCameraEngineObserver;
+class CCameraAdvancedSettings;
+
+NONSHARABLE_CLASS( CCameraEngine ) : public CBase
+ {
+public:
+
+ enum TCameraEngineState
+ {
+ EEngineNotReady,
+ EEngineIdle,
+ EEngineViewFinding,
+ EEngineCapturing,
+ EEngineFocusing
+ };
+
+ IMPORT_C static CCameraEngine* NewL( TInt aCameraHandle,
+ TInt aPriority,
+ MCameraEngineObserver* aObserver );
+ IMPORT_C ~CCameraEngine();
+
+public:
+
+ /**
+ * Returns the current state (TCameraEngineState)
+ * of the camera engine.
+ */
+ IMPORT_C TCameraEngineState State() const;
+
+ /**
+ * Returns true if the camera has been reserved and
+ * powered on.
+ */
+ IMPORT_C TBool IsCameraReady() const;
+
+ /**
+ * Returns true if the camera supports AutoFocus.
+ */
+ IMPORT_C TBool IsAutoFocusSupported() const;
+
+ /**
+ * Captures an image. When complete, observer will receive
+ * MceoCapturedDataReady() or MceoCapturedBitmapReady() callback,
+ * depending on which image format was used in PrepareL().
+ * @leave May leave with KErrNotReady if camera is not
+ * reserved or prepared for capture.
+ */
+ IMPORT_C void CaptureL();
+
+ /**
+ * Reserves and powers on the camera. When complete,
+ * observer will receive MceoCameraReady() callback
+ *
+ */
+ IMPORT_C void ReserveAndPowerOn();
+
+ /**
+ * Releases and powers off the camera
+ *
+ */
+ IMPORT_C void ReleaseAndPowerOff();
+
+ /**
+ * Prepares for image capture.
+ * @param aCaptureSize requested capture size. On return,
+ * contains the selected size (closest match)
+ * @param aFormat Image format to use. Default is JPEG with
+ * EXIF information as provided by the camera module
+ * @leave KErrNotSupported, KErrNoMemory, KErrNotReady
+ */
+ IMPORT_C void PrepareL( TSize& aCaptureSize,
+ CCamera::TFormat aFormat = CCamera::EFormatExif );
+
+ /**
+ * Starts the viewfinder. Observer will receive
+ * MceoViewFinderFrameReady() callbacks periodically.
+ * @param aSize requested viewfinder size. On return,
+ * contains the selected size.
+ *
+ * @leave KErrNotSupported is viewfinding with bitmaps is not
+ * supported, KErrNotReady
+ */
+ IMPORT_C void StartViewFinderL( TSize& aSize );
+
+ /**
+ * Stops the viewfinder if active.
+ */
+ IMPORT_C void StopViewFinder();
+
+ /**
+ * Releases memory for the last received viewfinder frame.
+ * Client must call this in response to MceoViewFinderFrameReady()
+ * callback, after drawing the viewfinder frame is complete.
+ */
+ IMPORT_C void ReleaseViewFinderBuffer();
+
+ /**
+ * Releases memory for the last captured image.
+ * Client must call this in response to MceoCapturedDataReady()
+ * or MceoCapturedBitmapReady()callback, after processing the
+ * data/bitmap is complete.
+ */
+ IMPORT_C void ReleaseImageBuffer();
+
+ /**
+ * Starts focusing. Does nothing if AutoFocus is not supported.
+ * When complete, observer will receive MceoFocusComplete()
+ * callback.
+ * @leave KErrInUse, KErrNotReady
+ */
+ IMPORT_C void StartFocusL();
+
+ /**
+ * Cancels the ongoing focusing operation.
+ */
+ IMPORT_C void FocusCancel();
+
+ /**
+ * Gets a bitfield of supported focus ranges.
+ * @param aSupportedRanges a bitfield of either TAutoFocusRange
+ * (S60 3.0/3.1 devices) or TFocusRange (S60 3.2 and onwards) values
+ */
+ IMPORT_C void SupportedFocusRanges( TInt& aSupportedRanges ) const;
+
+ /**
+ * Sets the focus range
+ * @param aFocusRange one of the values returned by
+ * SupportedFocusRanges().
+ */
+ IMPORT_C void SetFocusRange( TInt aFocusRange );
+
+ /**
+ * Returns a pointer to CCamera object used by the engine.
+ * Allows getting access to additional functionality
+ * from CCamera - do not use for functionality already provided
+ * by CCameraEngine methods.
+ */
+ IMPORT_C CCamera* Camera();
+
+ /**
+ * Returns a pointer to CCameraAdvancedSettings object used by
+ * the engine. May be NULL if adv. settings is not available.
+ * Allows getting access to additional functionality
+ * from CCameraAdvancedSettings - do not use for functionality already
+ * provided by CCameraEngine methods.
+ */
+ IMPORT_C CCamera::CCameraAdvancedSettings* AdvancedSettings();
+
+ /**
+ * Static function that returns the number of cameras on the device.
+ */
+ IMPORT_C static TInt CamerasAvailable();
+
+ /**
+ * Maximum digital zoom value. 0 if digital zoom is not supported
+ */
+ IMPORT_C TInt MaxDigitalZoom();
+
+ /**
+ * Current digital zoom value
+ */
+ IMPORT_C TInt DigitalZoom();
+
+ /**
+ * Adjust digital zoom. set aTele to ETrue to increase zoom (tele)
+ * or EFalse to decrease zoom (wide)
+ * @return Returns the new zoom level or KErrNotSupported
+ */
+ IMPORT_C TInt AdjustDigitalZoom( TBool aTele );
+
+ /**
+ * Returns a bitfield of supported exposure modes
+ * See CCamera::TExposure
+ */
+ IMPORT_C TInt SupportedExposureModes();
+
+ /**
+ * Returns the current exposure mode
+ * See CCamera::TExposure
+ */
+ IMPORT_C TInt Exposure();
+
+ /**
+ * Set camera exposure mode
+ * See CCamera::TExposure
+ * @param aExposure One of the modes from SupportedExposureModes
+ * @return KErrNone or KErrNotSupported
+ */
+ IMPORT_C TInt SetExposure( TInt aExposure );
+
+ /**
+ * Returns a bitfield of supported flash modes
+ * See CCamera::TFlash
+ */
+ IMPORT_C TInt SupportedFlashModes();
+
+ /**
+ * Returns the current flash mode
+ * See CCamera::TFlash
+ */
+ IMPORT_C TInt Flash();
+
+ /**
+ * Set camera flash mode
+ * See CCamera::TFlash
+ * @param aFlash One of the modes from SupportedFlashModes
+ * @return KErrNone or KErrNotSupported
+ */
+ IMPORT_C TInt SetFlash( TInt aFlash );
+
+protected:
+ CCameraEngine();
+
+private:
+ CCameraEnginePrivate* iPimpl;
+ };
+
+#endif //CCAMERAENGINE_H
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/include/cameraengineobserver.h b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/include/cameraengineobserver.h
new file mode 100644
index 0000000..832dfc1
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/include/cameraengineobserver.h
@@ -0,0 +1,92 @@
+/*
+* ============================================================================
+* Name : cameraengineobserver.h
+* Part of : CameraWrapper
+* Description : Observer interface for camera engine (wrapper DLL)
+* Version : %version: 1 %
+*
+* Copyright (c) 2009 Nokia Corporation.
+* This material, including documentation and any related
+* computer programs, is protected by copyright controlled by
+* Nokia Corporation.
+* ==============================================================================
+*/
+
+#ifndef __CCAMERAENGINEOBSERVER_H__
+#define __CCAMERAENGINEOBSERVER_H__
+
+// FORWARD DECLARATIONS
+class CFbsBitmap;
+class TECAMEvent;
+
+enum TCameraEngineError
+ {
+ EErrReserve,
+ EErrPowerOn,
+ EErrViewFinderReady,
+ EErrImageReady,
+ EErrAutoFocusInit,
+ EErrAutoFocusMode,
+ EErrAutoFocusArea,
+ EErrAutoFocusRange,
+ EErrAutoFocusType,
+ EErrOptimisedFocusComplete,
+ };
+
+
+class MCameraEngineObserver
+ {
+public:
+
+ /**
+ * Camera is ready to use for capturing images.
+ */
+ virtual void MceoCameraReady() = 0;
+
+ /**
+ * Camera AF lens has attained optimal focus
+ */
+ virtual void MceoFocusComplete() = 0;
+
+ /**
+ * Captured data is ready - call CCameraEngine::ReleaseImageBuffer()
+ * after processing/saving the data (typically, JPG-encoded image)
+ * @param aData Pointer to a descriptor containing a frame of camera data.
+ */
+ virtual void MceoCapturedDataReady( TDesC8* aData ) = 0;
+
+ /**
+ * Captured bitmap is ready.
+ * after processing/saving the image, call
+ * CCameraEngine::ReleaseImageBuffer() to free the bitmap.
+ * @param aBitmap Pointer to an FBS bitmap containing a captured image.
+ */
+ virtual void MceoCapturedBitmapReady( CFbsBitmap* aBitmap ) = 0;
+
+ /**
+ * A new viewfinder frame is ready.
+ * after displaying the frame, call
+ * CCameraEngine::ReleaseViewFinderBuffer()
+ * to free the bitmap.
+ * @param aFrame Pointer to an FBS bitmap containing a viewfinder frame.
+ */
+ virtual void MceoViewFinderFrameReady( CFbsBitmap& aFrame ) = 0;
+
+ /**
+ * Notifies clients about errors in camera engine
+ * @param aErrorType type of error (see TCameraEngineError)
+ * @param aError Symbian system-wide error code
+ */
+ virtual void MceoHandleError( TCameraEngineError aErrorType, TInt aError ) = 0;
+
+ /**
+ * Notifies client about other events not recognized by camera engine.
+ * The default implementation is empty.
+ * @param aEvent camera event (see MCameraObserver2::HandleEvent())
+ */
+ virtual void MceoHandleOtherEvent( const TECAMEvent& /*aEvent*/ ) {}
+ };
+
+#endif // __CCAMERAENGINEOBSERVER_H__
+
+// eof
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper.dso b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper.dso
new file mode 100644
index 0000000..cc62031
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper.dso differ
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper.lib b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper.lib
new file mode 100644
index 0000000..9e972bd
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper.lib differ
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper{000a0000}.dso b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper{000a0000}.dso
new file mode 100644
index 0000000..cc62031
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper{000a0000}.dso differ
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper{000a0000}.lib b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper{000a0000}.lib
new file mode 100644
index 0000000..9e972bd
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/lib/camerawrapper{000a0000}.lib differ
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/urel/camerawrapper.dll b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/urel/camerawrapper.dll
new file mode 100644
index 0000000..04e2b18
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/urel/camerawrapper.dll differ
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/urel/camerawrapper.dll.map b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/urel/camerawrapper.dll.map
new file mode 100644
index 0000000..0aa9800
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/armv5/urel/camerawrapper.dll.map
@@ -0,0 +1,431 @@
+ARM Linker, RVCT2.2 [Build 616]
+
+================================================================================
+
+Image Symbol Table
+
+ Local Symbols
+
+ Symbol Name Value Ov Type Size Object(Section)
+
+ [Anonymous Symbol] 0x00000000 Number 0 FBSCLI{000a0000}-130.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 drtaeabi{000a0000}-184.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 FBSCLI{000a0000}-25.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-2123.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 scppnwdl{000a0000}-3.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 FBSCLI{000a0000}-30.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-2125.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-2061.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 FBSCLI{000a0000}-31.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-593.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-208.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecamadvsettings{000a0000}-120.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-649.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-2082.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecamadvsettings{000a0000}-125.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-654.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecamadvsettings{000a0000}-64.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecamadvsettings{000a0000}-26.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-669.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 drtaeabi{000a0000}-158.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecamadvsettings{000a0000}-28.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecam{000a0000}-2.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 drtaeabi{000a0000}-180.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecamadvsettings{000a0000}-41.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecam{000a0000}-3.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 drtaeabi{000a0000}-183.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 ecamadvsettings{000a0000}-42.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-1356.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-205.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-1657.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-1601.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-2060.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-1659.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-1311.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-1308.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-1838.o ABSOLUTE
+ [Anonymous Symbol] 0x00000000 Number 0 euser{000a0000}-1169.o ABSOLUTE
+ ..\..\..\..\..\..\EPOC32\BUILD\src\common\generic\COMMS-INFRAS\Flogger\GROUP\FLOGGER\ARMV5\VtblExports.s 0x00000000 Number 0 VtblExports.o ABSOLUTE
+ ..\src\Ccamautofocus.cpp 0x00000000 Number 0 CCamAutoFocus.o ABSOLUTE
+ ..\src\Ccamautofocusimpl.cpp 0x00000000 Number 0 CCamAutoFocusImpl.o ABSOLUTE
+ \EPOC32\BUILD\src\cedar\generic\BASE\E32\EDLL\ARMV5\UREL\uc_dll_.cpp 0x00000000 Number 0 uc_dll_.o ABSOLUTE
+ \EPOC32\BUILD\src\cedar\generic\BASE\E32\EUSER\ARMV5\VtblExports.s 0x00000000 Number 0 VtblExports.o ABSOLUTE
+ \EPOC32\BUILD\src\cedar\generic\BASE\E32\compsupp\DRTAEABI\ARMV5\VtblExports.s 0x00000000 Number 0 VtblExports.o ABSOLUTE
+ \EPOC32\BUILD\src\common\generic\GRAPHICS\Fbserv\GROUP\FBSCLI\ARMV5\VtblExports.s 0x00000000 Number 0 VtblExports.o ABSOLUTE
+ \EPOC32\BUILD\src\common\generic\MULTIMEDIA\ECAM\GROUP\ECAMADVSETTINGS\ARMV5\VtblExports.s 0x00000000 Number 0 VtblExports.o ABSOLUTE
+ \EPOC32\BUILD\src\common\generic\MULTIMEDIA\ECAM\GROUP\ECAM\ARMV5\VtblExports.s 0x00000000 Number 0 VtblExports.o ABSOLUTE
+ \S60\S60_3rd_FP1\EPOC32\BUILD\S60\proj\CameraWrapper\group\CAMERAWRAPPER\ARMV5\camerawrapper{000a0000}.s 0x00000000 Number 0 camerawrapper{000a0000}.exp ABSOLUTE
+ \S60\proj\CameraWrapper\src\cameraengine.cpp 0x00000000 Number 0 camerawrapper.in ABSOLUTE
+ \S60\proj\CameraWrapper\src\cameraengineprivate.cpp 0x00000000 Number 0 camerawrapper.in ABSOLUTE
+ \\EPOC32\\BUILD\\src\\cedar\\generic\\BASE\\E32\\EDLL\\ARMV5\\UREL\\uc_dll_.cpp 0x00000000 Number 0 uc_dll_.o ABSOLUTE
+ \\src\\cedar\\generic\\BASE\\E32\\compsupp\\RVCT2_2\\ucppinit_aeabi.cpp 0x00000000 Number 0 ucppinit_aeabi.o ABSOLUTE
+ \src\cedar\generic\BASE\E32\EUSER\epoc\arm\uc_dll.cpp 0x00000000 Number 0 uc_dll.o ABSOLUTE
+ \src\cedar\generic\BASE\E32\compsupp\RVCT2_2\ucppinit_aeabi.cpp 0x00000000 Number 0 ucppinit_aeabi.o ABSOLUTE
+ .emb_text 0x00008000 Section 40 uc_dll_.o(.emb_text)
+ .emb_text 0x00008028 Section 72 ucppinit_aeabi.o(.emb_text)
+ skip 0x0000803c ARM Code 0 ucppinit_aeabi.o(.emb_text)
+ loop 0x0000804c ARM Code 0 ucppinit_aeabi.o(.emb_text)
+ fpinit 0x00008064 Data 0 ucppinit_aeabi.o(.emb_text)
+ base 0x00008068 Data 0 ucppinit_aeabi.o(.emb_text)
+ limit 0x0000806c Data 0 ucppinit_aeabi.o(.emb_text)
+ .text 0x00008070 Section 348 camerawrapper.in(.text)
+ .text 0x000081cc Section 2104 camerawrapper.in(.text)
+ .text 0x00008a04 Section 40 uc_dll.o(.text)
+ .text 0x00008a2c Section 188 CCamAutoFocus.o(.text)
+ .text 0x00008ae8 Section 304 CCamAutoFocusImpl.o(.text)
+ .text.clean 0x00008c18 Section 10 camerawrapper.in(.text.clean)
+ .text.clean 0x00008c22 Section 76 camerawrapper.in(.text.clean)
+ .text.clean 0x00008c6e Section 10 CCamAutoFocus.o(.text.clean)
+ .text.clean 0x00008c78 Section 10 CCamAutoFocusImpl.o(.text.clean)
+ ExportTable 0x00008c84 Section 140 camerawrapper{000a0000}.exp(ExportTable)
+ StubCode 0x00008d10 Section 8 euser{000a0000}-1169.o(StubCode)
+ theImportedSymbol 0x00008d14 Data 0 euser{000a0000}-1169.o(StubCode)
+ StubCode 0x00008d18 Section 8 euser{000a0000}-1308.o(StubCode)
+ theImportedSymbol 0x00008d1c Data 0 euser{000a0000}-1308.o(StubCode)
+ StubCode 0x00008d20 Section 8 euser{000a0000}-1311.o(StubCode)
+ theImportedSymbol 0x00008d24 Data 0 euser{000a0000}-1311.o(StubCode)
+ StubCode 0x00008d28 Section 8 euser{000a0000}-1356.o(StubCode)
+ theImportedSymbol 0x00008d2c Data 0 euser{000a0000}-1356.o(StubCode)
+ StubCode 0x00008d30 Section 8 euser{000a0000}-1601.o(StubCode)
+ theImportedSymbol 0x00008d34 Data 0 euser{000a0000}-1601.o(StubCode)
+ StubCode 0x00008d38 Section 8 euser{000a0000}-1657.o(StubCode)
+ theImportedSymbol 0x00008d3c Data 0 euser{000a0000}-1657.o(StubCode)
+ StubCode 0x00008d40 Section 8 euser{000a0000}-1659.o(StubCode)
+ theImportedSymbol 0x00008d44 Data 0 euser{000a0000}-1659.o(StubCode)
+ StubCode 0x00008d48 Section 8 euser{000a0000}-1838.o(StubCode)
+ theImportedSymbol 0x00008d4c Data 0 euser{000a0000}-1838.o(StubCode)
+ StubCode 0x00008d50 Section 8 euser{000a0000}-205.o(StubCode)
+ theImportedSymbol 0x00008d54 Data 0 euser{000a0000}-205.o(StubCode)
+ StubCode 0x00008d58 Section 8 euser{000a0000}-2060.o(StubCode)
+ theImportedSymbol 0x00008d5c Data 0 euser{000a0000}-2060.o(StubCode)
+ StubCode 0x00008d60 Section 8 euser{000a0000}-2061.o(StubCode)
+ theImportedSymbol 0x00008d64 Data 0 euser{000a0000}-2061.o(StubCode)
+ StubCode 0x00008d68 Section 8 euser{000a0000}-208.o(StubCode)
+ theImportedSymbol 0x00008d6c Data 0 euser{000a0000}-208.o(StubCode)
+ StubCode 0x00008d70 Section 8 euser{000a0000}-2082.o(StubCode)
+ theImportedSymbol 0x00008d74 Data 0 euser{000a0000}-2082.o(StubCode)
+ StubCode 0x00008d78 Section 8 euser{000a0000}-2123.o(StubCode)
+ theImportedSymbol 0x00008d7c Data 0 euser{000a0000}-2123.o(StubCode)
+ StubCode 0x00008d80 Section 8 euser{000a0000}-2125.o(StubCode)
+ theImportedSymbol 0x00008d84 Data 0 euser{000a0000}-2125.o(StubCode)
+ StubCode 0x00008d88 Section 8 euser{000a0000}-593.o(StubCode)
+ theImportedSymbol 0x00008d8c Data 0 euser{000a0000}-593.o(StubCode)
+ StubCode 0x00008d90 Section 8 euser{000a0000}-649.o(StubCode)
+ theImportedSymbol 0x00008d94 Data 0 euser{000a0000}-649.o(StubCode)
+ StubCode 0x00008d98 Section 8 euser{000a0000}-654.o(StubCode)
+ theImportedSymbol 0x00008d9c Data 0 euser{000a0000}-654.o(StubCode)
+ StubCode 0x00008da0 Section 8 euser{000a0000}-669.o(StubCode)
+ theImportedSymbol 0x00008da4 Data 0 euser{000a0000}-669.o(StubCode)
+ StubCode 0x00008da8 Section 8 ecam{000a0000}-2.o(StubCode)
+ theImportedSymbol 0x00008dac Data 0 ecam{000a0000}-2.o(StubCode)
+ StubCode 0x00008db0 Section 8 ecam{000a0000}-3.o(StubCode)
+ theImportedSymbol 0x00008db4 Data 0 ecam{000a0000}-3.o(StubCode)
+ StubCode 0x00008db8 Section 8 FBSCLI{000a0000}-130.o(StubCode)
+ theImportedSymbol 0x00008dbc Data 0 FBSCLI{000a0000}-130.o(StubCode)
+ StubCode 0x00008dc0 Section 8 FBSCLI{000a0000}-25.o(StubCode)
+ theImportedSymbol 0x00008dc4 Data 0 FBSCLI{000a0000}-25.o(StubCode)
+ StubCode 0x00008dc8 Section 8 FBSCLI{000a0000}-30.o(StubCode)
+ theImportedSymbol 0x00008dcc Data 0 FBSCLI{000a0000}-30.o(StubCode)
+ StubCode 0x00008dd0 Section 8 FBSCLI{000a0000}-31.o(StubCode)
+ theImportedSymbol 0x00008dd4 Data 0 FBSCLI{000a0000}-31.o(StubCode)
+ StubCode 0x00008dd8 Section 8 ecamadvsettings{000a0000}-120.o(StubCode)
+ theImportedSymbol 0x00008ddc Data 0 ecamadvsettings{000a0000}-120.o(StubCode)
+ StubCode 0x00008de0 Section 8 ecamadvsettings{000a0000}-125.o(StubCode)
+ theImportedSymbol 0x00008de4 Data 0 ecamadvsettings{000a0000}-125.o(StubCode)
+ StubCode 0x00008de8 Section 8 ecamadvsettings{000a0000}-26.o(StubCode)
+ theImportedSymbol 0x00008dec Data 0 ecamadvsettings{000a0000}-26.o(StubCode)
+ StubCode 0x00008df0 Section 8 ecamadvsettings{000a0000}-28.o(StubCode)
+ theImportedSymbol 0x00008df4 Data 0 ecamadvsettings{000a0000}-28.o(StubCode)
+ StubCode 0x00008df8 Section 8 ecamadvsettings{000a0000}-41.o(StubCode)
+ theImportedSymbol 0x00008dfc Data 0 ecamadvsettings{000a0000}-41.o(StubCode)
+ StubCode 0x00008e00 Section 8 ecamadvsettings{000a0000}-42.o(StubCode)
+ theImportedSymbol 0x00008e04 Data 0 ecamadvsettings{000a0000}-42.o(StubCode)
+ StubCode 0x00008e08 Section 8 ecamadvsettings{000a0000}-64.o(StubCode)
+ theImportedSymbol 0x00008e0c Data 0 ecamadvsettings{000a0000}-64.o(StubCode)
+ StubCode 0x00008e10 Section 8 drtaeabi{000a0000}-158.o(StubCode)
+ theImportedSymbol 0x00008e14 Data 0 drtaeabi{000a0000}-158.o(StubCode)
+ StubCode 0x00008e18 Section 8 drtaeabi{000a0000}-180.o(StubCode)
+ theImportedSymbol 0x00008e1c Data 0 drtaeabi{000a0000}-180.o(StubCode)
+ StubCode 0x00008e20 Section 8 drtaeabi{000a0000}-183.o(StubCode)
+ theImportedSymbol 0x00008e24 Data 0 drtaeabi{000a0000}-183.o(StubCode)
+ StubCode 0x00008e28 Section 8 drtaeabi{000a0000}-184.o(StubCode)
+ theImportedSymbol 0x00008e2c Data 0 drtaeabi{000a0000}-184.o(StubCode)
+ StubCode 0x00008e30 Section 8 scppnwdl{000a0000}-3.o(StubCode)
+ theImportedSymbol 0x00008e34 Data 0 scppnwdl{000a0000}-3.o(StubCode)
+ i._ZN20CCameraEnginePrivate16FrameBufferReadyEP12MFrameBufferi 0x00008e38 Section 2 camerawrapper.in(i._ZN20CCameraEnginePrivate16FrameBufferReadyEP12MFrameBufferi)
+ i._ZN20CCameraEnginePrivate16VideoBufferReadyER13MCameraBufferi 0x00008e3a Section 2 camerawrapper.in(i._ZN20CCameraEnginePrivate16VideoBufferReadyER13MCameraBufferi)
+ i._ZThn4_N20CCameraEnginePrivate16FrameBufferReadyEP12MFrameBufferi 0x00008e3c Section 2 camerawrapper.in(i._ZThn4_N20CCameraEnginePrivate16FrameBufferReadyEP12MFrameBufferi)
+ i._ZThn8_N20CCameraEnginePrivate16VideoBufferReadyER13MCameraBufferi 0x00008e3e Section 2 camerawrapper.in(i._ZThn8_N20CCameraEnginePrivate16VideoBufferReadyER13MCameraBufferi)
+ .extab._ZN13CCameraEngineD1Ev 0x00008e40 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivate10ConstructLEv 0x00008e50 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivateC1EiiP21MCameraEngineObserver 0x00008eb8 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivateD1Ev 0x00008ec8 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivate13SetFocusRangeEi 0x00008ed8 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivate17AdjustDigitalZoomEi 0x00008f00 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivate11SetExposureEi 0x00008f28 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivate8SetFlashEi 0x00008f50 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivate16ImageBufferReadyER13MCameraBufferi 0x00008f78 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN20CCameraEnginePrivate15PowerOnCompleteEi 0x00008fc0 Data 0 camerawrapper.in(.ARM.extab)
+ .extab._ZN13CCamAutoFocusD1Ev 0x00008fe8 Data 0 CCamAutoFocus.o(.ARM.extab)
+ .extab._ZN17CCamAutoFocusImplD1Ev 0x00008ff8 Data 0 CCamAutoFocusImpl.o(.ARM.extab)
+ .constdata$1 0x00009008 Data 0 camerawrapper.in(.constdata)
+ KUidECamEventReserveComplete 0x00009008 Data 4 camerawrapper.in(.constdata)
+ .constdata 0x00009008 Section 16 camerawrapper.in(.constdata)
+ KUidECamEventPowerOnComplete 0x0000900c Data 4 camerawrapper.in(.constdata)
+ KNullDesC 0x00009010 Data 8 camerawrapper.in(.constdata)
+ .constdata$1 0x00009018 Data 0 CCamAutoFocusImpl.o(.constdata)
+ KCameraAutoFocusUid 0x00009018 Data 4 CCamAutoFocusImpl.o(.constdata)
+ .constdata 0x00009018 Section 4 CCamAutoFocusImpl.o(.constdata)
+ .constdata__ZTI13CCamAutoFocus 0x0000901c Section 12 CCamAutoFocus.o(.constdata__ZTI13CCamAutoFocus)
+ .constdata__ZTI13CCameraEngine 0x00009028 Section 12 camerawrapper.in(.constdata__ZTI13CCameraEngine)
+ .constdata__ZTI15MCameraObserver 0x00009034 Section 8 camerawrapper.in(.constdata__ZTI15MCameraObserver)
+ .constdata__ZTI16MCameraObserver2 0x0000903c Section 8 camerawrapper.in(.constdata__ZTI16MCameraObserver2)
+ .constdata__ZTI17CCamAutoFocusImpl 0x00009044 Section 32 CCamAutoFocusImpl.o(.constdata__ZTI17CCamAutoFocusImpl)
+ .constdata__ZTI20CCameraEnginePrivate 0x00009064 Section 48 camerawrapper.in(.constdata__ZTI20CCameraEnginePrivate)
+ .constdata__ZTI21MCamAutoFocusObserver 0x00009094 Section 8 camerawrapper.in(.constdata__ZTI21MCamAutoFocusObserver)
+ .constdata__ZTI24MCameraAutoFocusObserver 0x0000909c Section 8 CCamAutoFocusImpl.o(.constdata__ZTI24MCameraAutoFocusObserver)
+ .constdata__ZTS13CCamAutoFocus 0x000090a4 Section 16 CCamAutoFocus.o(.constdata__ZTS13CCamAutoFocus)
+ .constdata__ZTS13CCameraEngine 0x000090b4 Section 16 camerawrapper.in(.constdata__ZTS13CCameraEngine)
+ .constdata__ZTS15MCameraObserver 0x000090c4 Section 18 camerawrapper.in(.constdata__ZTS15MCameraObserver)
+ .constdata__ZTS16MCameraObserver2 0x000090d6 Section 19 camerawrapper.in(.constdata__ZTS16MCameraObserver2)
+ .constdata__ZTS17CCamAutoFocusImpl 0x000090e9 Section 20 CCamAutoFocusImpl.o(.constdata__ZTS17CCamAutoFocusImpl)
+ .constdata__ZTS20CCameraEnginePrivate 0x000090fd Section 23 camerawrapper.in(.constdata__ZTS20CCameraEnginePrivate)
+ .constdata__ZTS21MCamAutoFocusObserver 0x00009114 Section 24 camerawrapper.in(.constdata__ZTS21MCamAutoFocusObserver)
+ .constdata__ZTS24MCameraAutoFocusObserver 0x0000912c Section 27 CCamAutoFocusImpl.o(.constdata__ZTS24MCameraAutoFocusObserver)
+ .constdata__ZTV13CCamAutoFocus 0x00009148 Section 20 CCamAutoFocus.o(.constdata__ZTV13CCamAutoFocus)
+ .constdata__ZTV13CCameraEngine 0x0000915c Section 20 camerawrapper.in(.constdata__ZTV13CCameraEngine)
+ .constdata__ZTV17CCamAutoFocusImpl 0x00009170 Section 44 CCamAutoFocusImpl.o(.constdata__ZTV17CCamAutoFocusImpl)
+ .constdata__ZTV20CCameraEnginePrivate 0x0000919c Section 132 camerawrapper.in(.constdata__ZTV20CCameraEnginePrivate)
+ .ARM.exidx 0x00009220 Section 8 ucppinit_aeabi.o(.ARM.exidx)
+
+ Global Symbols
+
+ Symbol Name Value Ov Type Size Object(Section)
+
+ BuildAttributes$$THUMB_ISAv2$ARM_ISAv5$M$PE$A:L22$X:L11$S22$IEEE1$IW$USESV6$~STKCKD$USESV7$~SHL$OSPACE$IEEEJ$EBA8$UX$REQ8$PRES8$EABIv2 0x00000000 Number 0 anon$$obj.o ABSOLUTE
+ #<DLL>FBSCLI{000a0000}[10003a15].DLL#<\DLL>19 - Undefined Reference
+ #<DLL>FBSCLI{000a0000}[10003a15].DLL#<\DLL>1e - Undefined Reference
+ #<DLL>FBSCLI{000a0000}[10003a15].DLL#<\DLL>1f - Undefined Reference
+ #<DLL>FBSCLI{000a0000}[10003a15].DLL#<\DLL>82 - Undefined Reference
+ #<DLL>drtaeabi{000a0000}.dll#<\DLL>9e - Undefined Reference
+ #<DLL>drtaeabi{000a0000}.dll#<\DLL>b4 - Undefined Reference
+ #<DLL>drtaeabi{000a0000}.dll#<\DLL>b7 - Undefined Reference
+ #<DLL>drtaeabi{000a0000}.dll#<\DLL>b8 - Undefined Reference
+ #<DLL>ecamadvsettings{000a0000}[1020e76b].dll#<\DLL>1a - Undefined Reference
+ #<DLL>ecamadvsettings{000a0000}[1020e76b].dll#<\DLL>1c - Undefined Reference
+ #<DLL>ecamadvsettings{000a0000}[1020e76b].dll#<\DLL>29 - Undefined Reference
+ #<DLL>ecamadvsettings{000a0000}[1020e76b].dll#<\DLL>2a - Undefined Reference
+ #<DLL>ecamadvsettings{000a0000}[1020e76b].dll#<\DLL>40 - Undefined Reference
+ #<DLL>ecamadvsettings{000a0000}[1020e76b].dll#<\DLL>78 - Undefined Reference
+ #<DLL>ecamadvsettings{000a0000}[1020e76b].dll#<\DLL>7d - Undefined Reference
+ #<DLL>ecam{000a0000}[101fb4c3].dll#<\DLL>2 - Undefined Reference
+ #<DLL>ecam{000a0000}[101fb4c3].dll#<\DLL>3 - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>251 - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>289 - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>28e - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>29d - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>491 - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>51c - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>51f - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>54c - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>641 - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>679 - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>67b - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>72e - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>80c - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>80d - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>822 - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>84b - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>84d - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>cd - Undefined Reference
+ #<DLL>euser{000a0000}[100039e5].dll#<\DLL>d0 - Undefined Reference
+ #<DLL>scppnwdl{000a0000}.dll#<\DLL>3 - Undefined Reference
+ SHT$$INIT_ARRAY$$Base - Undefined Weak Reference
+ SHT$$INIT_ARRAY$$Limit - Undefined Weak Reference
+ typeinfo for XLeaveException - Undefined Reference
+ typeinfo for CBase - Undefined Reference
+ vtable for __cxxabiv1::__class_type_info - Undefined Reference
+ vtable for __cxxabiv1::__si_class_type_info - Undefined Reference
+ vtable for __cxxabiv1::__vmi_class_type_info - Undefined Reference
+ _fp_init - Undefined Weak Reference
+ run_static_dtors - Undefined Weak Reference
+ Image$$ER_RO$$Base 0x00008000 Number 0 anon$$obj.o(linker$$defined$$symbols)
+ _E32Dll 0x00008000 ARM Code 40 uc_dll_.o(.emb_text)
+ Symbian$$CPP$$Exception$$Descriptor 0x00008014 Data 0 uc_dll_.o(.emb_text)
+ __cpp_initialize__aeabi_ 0x00008028 ARM Code 72 ucppinit_aeabi.o(.emb_text)
+ CCameraEngine::CCameraEngine() 0x00008071 Thumb Code 6 camerawrapper.in(.text)
+ CCameraEngine::CCameraEngine__sub_object() 0x00008071 Thumb Code 0 camerawrapper.in(.text)
+ std::nothrow 0x00008071 Thumb Code 0 ucppinit_aeabi.o(.emb_text)
+ CCameraEngine::NewL(int, int, MCameraEngineObserver*) 0x00008077 Thumb Code 44 camerawrapper.in(.text)
+ CCameraEngine::~CCameraEngine() 0x000080a3 Thumb Code 28 camerawrapper.in(.text)
+ CCameraEngine::~CCameraEngine__sub_object() 0x000080a3 Thumb Code 0 camerawrapper.in(.text)
+ CCameraEngine::~CCameraEngine__deallocating() 0x000080bf Thumb Code 16 camerawrapper.in(.text)
+ CCameraEngine::State() const 0x000080cf Thumb Code 6 camerawrapper.in(.text)
+ CCameraEngine::IsCameraReady() const 0x000080d5 Thumb Code 6 camerawrapper.in(.text)
+ CCameraEngine::IsAutoFocusSupported() const 0x000080db Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::CaptureL() 0x000080e5 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::ReserveAndPowerOn() 0x000080ef Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::ReleaseAndPowerOff() 0x000080f9 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::PrepareL(TSize&, CCamera::TFormat) 0x00008103 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::StartViewFinderL(TSize&) 0x0000810d Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::StopViewFinder() 0x00008117 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::ReleaseViewFinderBuffer() 0x00008121 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::ReleaseImageBuffer() 0x0000812b Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::StartFocusL() 0x00008135 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::FocusCancel() 0x0000813f Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::SupportedFocusRanges(int&) const 0x00008149 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::SetFocusRange(int) 0x00008153 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::Camera() 0x0000815d Thumb Code 6 camerawrapper.in(.text)
+ CCameraEngine::AdvancedSettings() 0x00008163 Thumb Code 8 camerawrapper.in(.text)
+ CCameraEngine::CamerasAvailable() 0x0000816b Thumb Code 8 camerawrapper.in(.text)
+ CCameraEngine::MaxDigitalZoom() 0x00008173 Thumb Code 6 camerawrapper.in(.text)
+ CCameraEngine::DigitalZoom() 0x00008179 Thumb Code 8 camerawrapper.in(.text)
+ CCameraEngine::AdjustDigitalZoom(int) 0x00008181 Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::SupportedExposureModes() 0x0000818b Thumb Code 6 camerawrapper.in(.text)
+ CCameraEngine::Exposure() 0x00008191 Thumb Code 14 camerawrapper.in(.text)
+ CCameraEngine::SetExposure(int) 0x0000819f Thumb Code 10 camerawrapper.in(.text)
+ CCameraEngine::SupportedFlashModes() 0x000081a9 Thumb Code 6 camerawrapper.in(.text)
+ CCameraEngine::Flash() 0x000081af Thumb Code 14 camerawrapper.in(.text)
+ CCameraEngine::SetFlash(int) 0x000081bd Thumb Code 10 camerawrapper.in(.text)
+ CCameraEnginePrivate::ConstructL() 0x000081cd Thumb Code 268 camerawrapper.in(.text)
+ CCameraEnginePrivate::CCameraEnginePrivate(int, int, MCameraEngineObserver*) 0x000082d9 Thumb Code 48 camerawrapper.in(.text)
+ CCameraEnginePrivate::CCameraEnginePrivate__sub_object(int, int, MCameraEngineObserver*) 0x000082d9 Thumb Code 0 camerawrapper.in(.text)
+ CCameraEnginePrivate::NewL(int, int, MCameraEngineObserver*) 0x00008309 Thumb Code 44 camerawrapper.in(.text)
+ CCameraEnginePrivate::ReleaseImageBuffer() 0x00008335 Thumb Code 40 camerawrapper.in(.text)
+ CCameraEnginePrivate::ReleaseViewFinderBuffer() 0x0000835d Thumb Code 22 camerawrapper.in(.text)
+ CCameraEnginePrivate::StopViewFinder() 0x00008373 Thumb Code 30 camerawrapper.in(.text)
+ CCameraEnginePrivate::~CCameraEnginePrivate() 0x00008391 Thumb Code 98 camerawrapper.in(.text)
+ CCameraEnginePrivate::~CCameraEnginePrivate__sub_object() 0x00008391 Thumb Code 0 camerawrapper.in(.text)
+ CCameraEnginePrivate::~CCameraEnginePrivate__deallocating() 0x000083f3 Thumb Code 16 camerawrapper.in(.text)
+ CCameraEnginePrivate::IsAutoFocusSupported() const 0x00008403 Thumb Code 34 camerawrapper.in(.text)
+ CCameraEnginePrivate::CaptureL() 0x00008425 Thumb Code 34 camerawrapper.in(.text)
+ CCameraEnginePrivate::ReserveAndPowerOn() 0x00008447 Thumb Code 8 camerawrapper.in(.text)
+ CCameraEnginePrivate::FocusCancel() 0x0000844f Thumb Code 38 camerawrapper.in(.text)
+ CCameraEnginePrivate::ReleaseAndPowerOff() 0x00008475 Thumb Code 44 camerawrapper.in(.text)
+ CCameraEnginePrivate::PrepareL(TSize&, CCamera::TFormat) 0x000084a1 Thumb Code 118 camerawrapper.in(.text)
+ CCameraEnginePrivate::StartViewFinderL(TSize&) 0x00008517 Thumb Code 62 camerawrapper.in(.text)
+ CCameraEnginePrivate::StartFocusL() 0x00008555 Thumb Code 88 camerawrapper.in(.text)
+ CCameraEnginePrivate::SupportedFocusRanges(int&) const 0x000085ad Thumb Code 36 camerawrapper.in(.text)
+ CCameraEnginePrivate::SetFocusRange(int) 0x000085d1 Thumb Code 98 camerawrapper.in(.text)
+ CCameraEnginePrivate::AdjustDigitalZoom(int) 0x00008633 Thumb Code 110 camerawrapper.in(.text)
+ CCameraEnginePrivate::SetExposure(int) 0x000086a1 Thumb Code 62 camerawrapper.in(.text)
+ CCameraEnginePrivate::SetFlash(int) 0x000086df Thumb Code 62 camerawrapper.in(.text)
+ CCameraEnginePrivate::HandleEvent(const TECAMEvent&) 0x0000871d Thumb Code 196 camerawrapper.in(.text)
+ thunk{-8} to CCameraEnginePrivate::HandleEvent(const TECAMEvent&) 0x000087e1 Thumb Code 4 camerawrapper.in(.text)
+ CCameraEnginePrivate::ViewFinderReady(MCameraBuffer&, int) 0x000087e5 Thumb Code 46 camerawrapper.in(.text)
+ thunk{-8} to CCameraEnginePrivate::ViewFinderReady(MCameraBuffer&, int) 0x00008813 Thumb Code 4 camerawrapper.in(.text)
+ CCameraEnginePrivate::HandleImageReady(CFbsBitmap*, TDesC8*, int) 0x00008817 Thumb Code 60 camerawrapper.in(.text)
+ CCameraEnginePrivate::ImageBufferReady(MCameraBuffer&, int) 0x00008853 Thumb Code 126 camerawrapper.in(.text)
+ thunk{-8} to CCameraEnginePrivate::ImageBufferReady(MCameraBuffer&, int) 0x000088d1 Thumb Code 4 camerawrapper.in(.text)
+ CCameraEnginePrivate::ReserveComplete(int) 0x000088d5 Thumb Code 24 camerawrapper.in(.text)
+ thunk{-4} to CCameraEnginePrivate::ReserveComplete(int) 0x000088ed Thumb Code 4 camerawrapper.in(.text)
+ CCameraEnginePrivate::PowerOnComplete(int) 0x000088f1 Thumb Code 142 camerawrapper.in(.text)
+ thunk{-4} to CCameraEnginePrivate::PowerOnComplete(int) 0x0000897f Thumb Code 4 camerawrapper.in(.text)
+ CCameraEnginePrivate::ViewFinderFrameReady(CFbsBitmap&) 0x00008983 Thumb Code 8 camerawrapper.in(.text)
+ thunk{-4} to CCameraEnginePrivate::ViewFinderFrameReady(CFbsBitmap&) 0x0000898b Thumb Code 4 camerawrapper.in(.text)
+ CCameraEnginePrivate::ImageReady(CFbsBitmap*, HBufC8*, int) 0x0000898f Thumb Code 48 camerawrapper.in(.text)
+ thunk{-4} to CCameraEnginePrivate::ImageReady(CFbsBitmap*, HBufC8*, int) 0x000089bf Thumb Code 4 camerawrapper.in(.text)
+ CCameraEnginePrivate::InitComplete(int) 0x000089c3 Thumb Code 18 camerawrapper.in(.text)
+ thunk{-12} to CCameraEnginePrivate::InitComplete(int) 0x000089d5 Thumb Code 4 camerawrapper.in(.text)
+ CCameraEnginePrivate::OptimisedFocusComplete(int) 0x000089d9 Thumb Code 26 camerawrapper.in(.text)
+ thunk{-12} to CCameraEnginePrivate::OptimisedFocusComplete(int) 0x000089f3 Thumb Code 4 camerawrapper.in(.text)
+ _E32Dll_Body 0x00008a05 Thumb Code 34 uc_dll.o(.text)
+ CCamAutoFocus::ConstructL(CCamera*) 0x00008a2d Thumb Code 26 CCamAutoFocus.o(.text)
+ CCamAutoFocus::CCamAutoFocus() 0x00008a47 Thumb Code 6 CCamAutoFocus.o(.text)
+ CCamAutoFocus::CCamAutoFocus__sub_object() 0x00008a47 Thumb Code 0 CCamAutoFocus.o(.text)
+ CCamAutoFocus::NewL(CCamera*) 0x00008a4d Thumb Code 36 CCamAutoFocus.o(.text)
+ CCamAutoFocus::~CCamAutoFocus() 0x00008a71 Thumb Code 28 CCamAutoFocus.o(.text)
+ CCamAutoFocus::~CCamAutoFocus__sub_object() 0x00008a71 Thumb Code 0 CCamAutoFocus.o(.text)
+ CCamAutoFocus::~CCamAutoFocus__deallocating() 0x00008a8d Thumb Code 16 CCamAutoFocus.o(.text)
+ CCamAutoFocus::InitL(MCamAutoFocusObserver&) 0x00008a9d Thumb Code 10 CCamAutoFocus.o(.text)
+ CCamAutoFocus::AttemptOptimisedFocusL() 0x00008aa7 Thumb Code 10 CCamAutoFocus.o(.text)
+ CCamAutoFocus::SetFocusRangeL(CCamAutoFocus::TAutoFocusRange) 0x00008ab1 Thumb Code 10 CCamAutoFocus.o(.text)
+ CCamAutoFocus::FocusRange(CCamAutoFocus::TAutoFocusRange&) 0x00008abb Thumb Code 10 CCamAutoFocus.o(.text)
+ CCamAutoFocus::Cancel() 0x00008ac5 Thumb Code 10 CCamAutoFocus.o(.text)
+ CCamAutoFocus::ResetToIdleL() 0x00008acf Thumb Code 10 CCamAutoFocus.o(.text)
+ CCamAutoFocus::Close() 0x00008ad9 Thumb Code 10 CCamAutoFocus.o(.text)
+ CCamAutoFocusImpl::CCamAutoFocusImpl(CCamera*) 0x00008ae9 Thumb Code 22 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::CCamAutoFocusImpl__sub_object(CCamera*) 0x00008ae9 Thumb Code 0 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::ConstructL() 0x00008aff Thumb Code 2 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::Close() 0x00008b01 Thumb Code 22 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::~CCamAutoFocusImpl() 0x00008b17 Thumb Code 26 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::~CCamAutoFocusImpl__sub_object() 0x00008b17 Thumb Code 0 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::~CCamAutoFocusImpl__deallocating() 0x00008b31 Thumb Code 16 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::InitL(MCamAutoFocusObserver&) 0x00008b41 Thumb Code 60 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::AttemptOptimisedFocusL() 0x00008b7d Thumb Code 28 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::SetFocusRangeL(int) 0x00008b99 Thumb Code 34 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::FocusRange(int&) 0x00008bbb Thumb Code 6 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::Cancel() 0x00008bc1 Thumb Code 14 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::ResetToIdleL() 0x00008bcf Thumb Code 28 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::InitComplete(int) 0x00008beb Thumb Code 14 CCamAutoFocusImpl.o(.text)
+ thunk{-4} to CCamAutoFocusImpl::InitComplete(int) 0x00008bf9 Thumb Code 4 CCamAutoFocusImpl.o(.text)
+ CCamAutoFocusImpl::OptimisedFocusComplete(int) 0x00008bfd Thumb Code 14 CCamAutoFocusImpl.o(.text)
+ thunk{-4} to CCamAutoFocusImpl::OptimisedFocusComplete(int) 0x00008c0b Thumb Code 4 CCamAutoFocusImpl.o(.text)
+ __DLL_Export_Table__ 0x00008c84 ARM Code 0 camerawrapper{000a0000}.exp(ExportTable)
+ DLL##ExportTableSize 0x00008c88 Data 0 camerawrapper{000a0000}.exp(ExportTable)
+ DLL##ExportTable 0x00008c8c Data 0 camerawrapper{000a0000}.exp(ExportTable)
+ TPtrC16::TPtrC16(const unsigned short*) 0x00008d10 ARM Code 0 euser{000a0000}-1169.o(StubCode)
+ RLibrary::Load(const TDesC16&, const TDesC16&) 0x00008d18 ARM Code 0 euser{000a0000}-1308.o(StubCode)
+ RLibrary::Close() 0x00008d20 ARM Code 0 euser{000a0000}-1311.o(StubCode)
+ TVersion::TVersion() 0x00008d28 ARM Code 0 euser{000a0000}-1356.o(StubCode)
+ TUid::operator ==(const TUid&) const 0x00008d30 ARM Code 0 euser{000a0000}-1601.o(StubCode)
+ TSize::operator ==(const TSize&) const 0x00008d38 ARM Code 0 euser{000a0000}-1657.o(StubCode)
+ TSize::operator -(const TSize&) const 0x00008d40 ARM Code 0 euser{000a0000}-1659.o(StubCode)
+ RLibrary::Lookup(int) const 0x00008d48 ARM Code 0 euser{000a0000}-1838.o(StubCode)
+ CleanupStack::Pop() 0x00008d50 ARM Code 0 euser{000a0000}-205.o(StubCode)
+ User::MarkCleanupStack() 0x00008d58 ARM Code 0 euser{000a0000}-2060.o(StubCode)
+ User::UnMarkCleanupStack(TTrapHandler*) 0x00008d60 ARM Code 0 euser{000a0000}-2061.o(StubCode)
+ CleanupStack::PushL(CBase*) 0x00008d68 ARM Code 0 euser{000a0000}-208.o(StubCode)
+ XLeaveException::GetReason() const 0x00008d70 ARM Code 0 euser{000a0000}-2082.o(StubCode)
+ CBase::Extension_(unsigned, void*&, void*) 0x00008d78 ARM Code 0 euser{000a0000}-2123.o(StubCode)
+ CBase::~CBase() 0x00008d80 ARM Code 0 euser{000a0000}-2125.o(StubCode)
+ User::LeaveIfError(int) 0x00008d88 ARM Code 0 euser{000a0000}-593.o(StubCode)
+ User::Leave(int) 0x00008d90 ARM Code 0 euser{000a0000}-649.o(StubCode)
+ User::AllocZL(int) 0x00008d98 ARM Code 0 euser{000a0000}-654.o(StubCode)
+ User::Invariant() 0x00008da0 ARM Code 0 euser{000a0000}-669.o(StubCode)
+ CCamera::CamerasAvailable() 0x00008da8 ARM Code 0 ecam{000a0000}-2.o(StubCode)
+ CCamera::NewL(MCameraObserver&, int) 0x00008db0 ARM Code 0 ecam{000a0000}-3.o(StubCode)
+ CFbsBitmap::Handle() const 0x00008db8 ARM Code 0 FBSCLI{000a0000}-130.o(StubCode)
+ CFbsBitmap::Reset() 0x00008dc0 ARM Code 0 FBSCLI{000a0000}-25.o(StubCode)
+ CFbsBitmap::Duplicate(int) 0x00008dc8 ARM Code 0 FBSCLI{000a0000}-30.o(StubCode)
+ CFbsBitmap::CFbsBitmap() 0x00008dd0 ARM Code 0 FBSCLI{000a0000}-31.o(StubCode)
+ CCamera::CCameraAdvancedSettings::SupportedFocusModes() const 0x00008dd8 ARM Code 0 ecamadvsettings{000a0000}-120.o(StubCode)
+ CCamera::CCameraAdvancedSettings::SupportedFocusRanges() const 0x00008de0 ARM Code 0 ecamadvsettings{000a0000}-125.o(StubCode)
+ CCamera::CCameraAdvancedSettings::SetFocusMode(CCamera::CCameraAdvancedSettings::TFocusMode) 0x00008de8 ARM Code 0 ecamadvsettings{000a0000}-26.o(StubCode)
+ CCamera::CCameraAdvancedSettings::SetFocusRange(CCamera::CCameraAdvancedSettings::TFocusRange) 0x00008df0 ARM Code 0 ecamadvsettings{000a0000}-28.o(StubCode)
+ CCamera::CCameraAdvancedSettings::SetAutoFocusArea(CCamera::CCameraAdvancedSettings::TAutoFocusArea) 0x00008df8 ARM Code 0 ecamadvsettings{000a0000}-41.o(StubCode)
+ CCamera::CCameraAdvancedSettings::SetAutoFocusType(CCamera::CCameraAdvancedSettings::TAutoFocusType) 0x00008e00 ARM Code 0 ecamadvsettings{000a0000}-42.o(StubCode)
+ CCamera::CCameraAdvancedSettings::NewL(CCamera&) 0x00008e08 ARM Code 0 ecamadvsettings{000a0000}-64.o(StubCode)
+ __aeabi_unwind_cpp_pr0 0x00008e10 ARM Code 0 drtaeabi{000a0000}-158.o(StubCode)
+ __cxa_begin_catch 0x00008e18 ARM Code 0 drtaeabi{000a0000}-180.o(StubCode)
+ __cxa_end_catch 0x00008e20 ARM Code 0 drtaeabi{000a0000}-183.o(StubCode)
+ __cxa_end_cleanup 0x00008e28 ARM Code 0 drtaeabi{000a0000}-184.o(StubCode)
+ operator delete (void*) 0x00008e30 ARM Code 0 scppnwdl{000a0000}-3.o(StubCode)
+ CCameraEnginePrivate::FrameBufferReady(MFrameBuffer*, int) 0x00008e39 Thumb Code 2 camerawrapper.in(i._ZN20CCameraEnginePrivate16FrameBufferReadyEP12MFrameBufferi)
+ CCameraEnginePrivate::VideoBufferReady(MCameraBuffer&, int) 0x00008e3b Thumb Code 2 camerawrapper.in(i._ZN20CCameraEnginePrivate16VideoBufferReadyER13MCameraBufferi)
+ thunk{-4} to CCameraEnginePrivate::FrameBufferReady(MFrameBuffer*, int) 0x00008e3d Thumb Code 2 camerawrapper.in(i._ZThn4_N20CCameraEnginePrivate16FrameBufferReadyEP12MFrameBufferi)
+ thunk{-8} to CCameraEnginePrivate::VideoBufferReady(MCameraBuffer&, int) 0x00008e3f Thumb Code 2 camerawrapper.in(i._ZThn8_N20CCameraEnginePrivate16VideoBufferReadyER13MCameraBufferi)
+ typeinfo for CCamAutoFocus 0x0000901c Data 12 CCamAutoFocus.o(.constdata__ZTI13CCamAutoFocus)
+ typeinfo for CCameraEngine 0x00009028 Data 12 camerawrapper.in(.constdata__ZTI13CCameraEngine)
+ typeinfo for MCameraObserver 0x00009034 Data 8 camerawrapper.in(.constdata__ZTI15MCameraObserver)
+ typeinfo for MCameraObserver2 0x0000903c Data 8 camerawrapper.in(.constdata__ZTI16MCameraObserver2)
+ typeinfo for CCamAutoFocusImpl 0x00009044 Data 32 CCamAutoFocusImpl.o(.constdata__ZTI17CCamAutoFocusImpl)
+ typeinfo for CCameraEnginePrivate 0x00009064 Data 48 camerawrapper.in(.constdata__ZTI20CCameraEnginePrivate)
+ typeinfo for MCamAutoFocusObserver 0x00009094 Data 8 camerawrapper.in(.constdata__ZTI21MCamAutoFocusObserver)
+ typeinfo for MCameraAutoFocusObserver 0x0000909c Data 8 CCamAutoFocusImpl.o(.constdata__ZTI24MCameraAutoFocusObserver)
+ typeinfo name for CCamAutoFocus 0x000090a4 Data 16 CCamAutoFocus.o(.constdata__ZTS13CCamAutoFocus)
+ typeinfo name for CCameraEngine 0x000090b4 Data 16 camerawrapper.in(.constdata__ZTS13CCameraEngine)
+ typeinfo name for MCameraObserver 0x000090c4 Data 18 camerawrapper.in(.constdata__ZTS15MCameraObserver)
+ typeinfo name for MCameraObserver2 0x000090d6 Data 19 camerawrapper.in(.constdata__ZTS16MCameraObserver2)
+ typeinfo name for CCamAutoFocusImpl 0x000090e9 Data 20 CCamAutoFocusImpl.o(.constdata__ZTS17CCamAutoFocusImpl)
+ typeinfo name for CCameraEnginePrivate 0x000090fd Data 23 camerawrapper.in(.constdata__ZTS20CCameraEnginePrivate)
+ typeinfo name for MCamAutoFocusObserver 0x00009114 Data 24 camerawrapper.in(.constdata__ZTS21MCamAutoFocusObserver)
+ typeinfo name for MCameraAutoFocusObserver 0x0000912c Data 27 CCamAutoFocusImpl.o(.constdata__ZTS24MCameraAutoFocusObserver)
+ vtable for CCamAutoFocus 0x00009148 Data 20 CCamAutoFocus.o(.constdata__ZTV13CCamAutoFocus)
+ vtable for CCameraEngine 0x0000915c Data 20 camerawrapper.in(.constdata__ZTV13CCameraEngine)
+ vtable for CCamAutoFocusImpl 0x00009170 Data 44 CCamAutoFocusImpl.o(.constdata__ZTV17CCamAutoFocusImpl)
+ vtable for CCameraEnginePrivate 0x0000919c Data 132 camerawrapper.in(.constdata__ZTV20CCameraEnginePrivate)
+ .ARM.exidx$$Base 0x00009220 Number 0 ucppinit_aeabi.o(.ARM.exidx)
+ .ARM.exidx$$Limit 0x00009338 Number 0 camerawrapper.in(.ARM.exidx)
+ Image$$ER_RO$$Limit 0x00009338 Number 0 anon$$obj.o(linker$$defined$$symbols)
+
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/CamAutoFocus.dll b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/CamAutoFocus.dll
new file mode 100644
index 0000000..da16da6
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/CamAutoFocus.dll differ
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/camerawrapper.dll b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/camerawrapper.dll
new file mode 100644
index 0000000..d352fa8
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/camerawrapper.dll differ
diff --git a/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/camerawrapper.lib b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/camerawrapper.lib
new file mode 100644
index 0000000..272d0aa
Binary files /dev/null and b/symbian/ZXingBarcodeReader/camerawrapper/epoc32/release/winscw/udeb/camerawrapper.lib differ
diff --git a/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader.rls b/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader.rls
new file mode 100644
index 0000000..c6dd40c
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader.rls
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+// LOCALISATION STRINGS
+
+// Caption string for app.
+#define qtn_caption_string "ZXingBarcodeReader"
+#define qtn_about "About"
+#define qtn_exit "Exit"
+#define qtn_command1_text "ZXingBarcodeReader"
+#define qtn_loc_resource_file_1 "\\resource\\apps\\ZXingBarcodeReader_0xEF24C10A"
+#define qtn_about_dialog_title "About"
+#define qtn_about_dialog_text "ZXing Qr Reader 0.1.0\n\n"
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader.rss b/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader.rss
new file mode 100644
index 0000000..1b8eeb2
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader.rss
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+
+// RESOURCE IDENTIFIER
+NAME CAME // 4 letter ID
+
+
+// INCLUDES
+#include <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <appinfo.rh>
+#include "CameraWrapperExample.hrh"
+#include "ZXingBarcodeReader.rls"
+
+// RESOURCE DEFINITIONS
+// -----------------------------------------------------------------------------
+//
+// Define the resource file signature
+// This resource should be empty.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE
+ {
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Default Document Name
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_default_document_name
+ {
+ buf="CAME";
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Define default menu and CBA key.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+ {
+ menubar = r_menubar;
+ cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_menubar
+// Main menubar
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_menubar
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_menu; }
+ };
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_menu
+// Menu for "Options"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EAbout;
+ txt = qtn_about;
+ },
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// About dialog resource.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_about_query_dialog
+ {
+ flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+ buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
+ items=
+ {
+ DLG_LINE
+ {
+ type = EAknCtPopupHeadingPane;
+ id = EAknMessageQueryHeaderId;
+ itemflags = EEikDlgItemNonFocusing;
+ control = AVKON_HEADING
+ {
+ };
+ },
+ DLG_LINE
+ {
+ type = EAknCtMessageQuery;
+ id = EAknMessageQueryContentId;
+ control = AVKON_MESSAGE_QUERY
+ {
+ };
+ }
+ };
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// Resources for messages.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF32 r_caption_string { buf=qtn_caption_string; }
+RESOURCE TBUF32 r_about_dialog_title { buf=qtn_about_dialog_title; }
+RESOURCE TBUF r_about_dialog_text { buf=qtn_about_dialog_text; }
+RESOURCE TBUF r_command1_text { buf=qtn_command1_text; }
+
+
+// ----------------------------------------------------------------------------
+//
+// r_localisable_app_info
+//
+// ----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+ {
+ short_caption = qtn_caption_string;
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = qtn_caption_string;
+
+ number_of_icons = 1;
+ icon_file = "\\resource\\apps\\ZXingBarcodeReader_0xEF24C10A.mif";
+ };
+ }
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader_reg.rss b/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader_reg.rss
new file mode 100644
index 0000000..24fdbab
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/data/ZXingBarcodeReader_reg.rss
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#include "CameraWrapperExample.hrh"
+#include "ZXingBarcodeReader.rls"
+#include <appinfo.rh>
+#include <ZXingBarcodeReader_0xEF24C10A.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 _UID3
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="ZXingBarcodeReader_0xEF24C10A";
+ //app_file="ZXingBarcodeReader";
+ localisable_resource_file = qtn_loc_resource_file_1;
+ localisable_resource_id = R_LOCALISABLE_APP_INFO;
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
diff --git a/symbian/ZXingBarcodeReader/gfx/QrDecoder.svg b/symbian/ZXingBarcodeReader/gfx/QrDecoder.svg
new file mode 100644
index 0000000..3bd9d64
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/gfx/QrDecoder.svg
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
+<svg version="1.2" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
+ x="0px" y="0px" width="135px" height="135px" viewBox="0 0 135 135" xml:space="preserve">
+<image width="135" height="135" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
+EAMCAwYAAALJAAAGlAAAErr/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAIcAhwMBIgACEQEDEQH/
+xACvAAACAwEBAQAAAAAAAAAAAAAABQMEBgIBBwEBAAAAAAAAAAAAAAAAAAAAABAAAgICAQIFAwMF
+AAAAAAAAAwQCBQEGAAcXERITFDUzFTdgIxZAMSI0NhEAAgECAwQECggDAw0AAAAAAQIDABEhEgQx
+QSITUWEyBXGRQlKSs9MUNHSBobHB0eFyIxBissIzBkDxgqLSg5PDJIQVNRYSAQAAAAAAAAAAAAAA
+AAAAAGD/2gAMAwEAAhEDEQAAANFjdBaMqaC4ZPZY3ZFpWvsGmtZnADXZIGplxg2MyaAGQtACwfJ9
+A9YCL6h8v+oHyG9p6BfW1HAltQ2STDa0MF9QVNQALWR3OSDi90Kb8dgqRTRHXfkhz3UCLlxwKeHa
+01pIFZG7RnttVbJl7CgTc9zlC1bmF0L2oVe/ahVt1rhoDoI0z7MEvXdUl8i9KlyT0tt1j4VxP0ZC
+iZ1T2vbomtJQjy2lQks0HpDVvAtar4TTd0gZU4+yhQbqjxjDwaspBylcpSbtTYOmK2+JvL8BJMru
+E/VCAcLOZyxUlsjsshSo28mMbVAOdX84+uHzdoj+lGXc8ODAt1FUtrWOoMNsEAa0lB8AAAAAAAAA
+AAAAAH//2gAIAQIAAQUA/SP/2gAIAQMAAQUA/SP/2gAIAQEAAQUA3G9boazudfc7nX3O519zudfc
+3G9boazWrNi3pN12d/X+VbRHKznc6+5XXrbWo9zr7nc6+53Ovudzr7ldettaj1O+B1Boaek9zqHl
+TvVRb2HU757caJu+rENnQ1FTudQ829obmk1Gqu2yt1aLbmqsnmu0bpXxzqJSJt9zqHnU74Gk/G3U
+74Gk/G3NE/6vqd89zdxkLt+q0NVHlk5VNoQRGKJgqCiHBft3TpT2Z9g+e51O+BpPxt1O+B1RT3ui
+z6YiHzXtFFVWvU757j2l+72TqDALLSaxMzmgQfA1RzlOkdRCjfmqaw0utddF00WNzqd8DSfjbfat
+6zpqxW7VWF6wZ5A9KbSLpyOmblDBY+3hH0uLYZGw/ZPxKxal8kGmzowUchmSr0pZUsY5cXt3hVdT
+YL6Re2K80ZNEg1KQ/HGceVxmYM11vgESjEaQs4cwvNiZjpoFm2nXgGoTmcExn++cZ8cSfPjCV/6u
+u7gtifFjQDyyT8/FxxEBhuAcmRyAa3lwCwxgXM15ciTZgsJlwZ4YrZMQUCVTjeMCgSQmzMDC0KqU
+H/Fd0LMWRQjNchZm4sViOTYTLMhWD4QmOAsRVPycBlXRRSyKQKyWDrmjkBSZwM8pMlHCDTXnhCnm
+bOqbgD15iB5V8VvPU9Xkq3/KY/YYLn1sKr5YwNXECpJelBqs9AYWci5aJ4NMgP38g9qSFp5sVBvN
+qmz/AFpkJh5qDEuSAyLkcOF4CUiyPJOEq04QygSEX0yiLGR1D4fVLk9hlsQWZiIpj1RwQUnE1XGG
+NZ2f6xP99piYOeXB1zkylMZpBlgsj4xXA8BpgMP3UkZGJFOGbJiebFyTRMklEp7ExD4xjGKzHhre
+2miEkbAPMWIefcQclYA8bLH7CrghLizkcoeplWIfNxuxSKMTucJDbESPr4WZXLEsrD6NHnOdO3ji
+q6818Br+RXRll4UBHMMZYnHCLMsZxFZxkRGLLHqN5UgNdxfK0PZg5PMTtBKpjhJNlxSCJDTt5z4c
+BPH2/BI8SJH3NmTGWM+MuGR87FlKXF/VyTK0JcYEsvDLU84WBI+ftuZcxV4xxguAQrDYlqHUWcQV
+VTTt2Ov/AMc2rlbrew5c3HEqeytKyiqAN3Nfi9fVBccCfUFYVlbSW6+n+N7Z2a2tKmjrm3x4A1yx
+ZWZrmoPsmqt5Qq6uyX0rqd8DU71b1Ff3Ovudzr7l7et3zd7RKXyljRKK7dr+sIa/xzp3SON0VEpQ
+qdMfntvaInu3c6+5Q6whJjqd893OvuV1621qP9D/AP/aAAgBAgIGPwAj/9oACAEDAgY/ACP/2gAI
+AQEBBj8Ai1mjSN5HnWIiUMy5WSR/IZceGvh9J6Entq+H0noSe2r4fSehJ7avh9J6Entqi1mjSN5H
+nWIiUMy5WSR/IZceGtN3hqVRJpuZmWMEIMkjxiwYsdi9NaL3KOGT3nm5+crNbl8u2XI6efWj1koA
+k1EEUrhbhQ0iBza5OGP8Ph9J6EntqfvyRIxqlg1EoRQ3LzQmQLgWLW4BfGvh9J6Entq+H0noSe2r
+4fSehJ7avh9J6EntqfvyRIxqlg1EoRQ3LzQmQLgWLW4BfGtP82nq5qg1koJj08eolcLYsVjllc2u
+RjhXw+r9CP21Rd36aHUJNNmytIqBBkVpDcrIx2L0Vp/lE9ZNUWj0bxpIk6ykyllXKqSJ5CtjxVH/
+AIe7yjml1mivzZNOqtEecxnXKZHjbsyC/Dtr4fV+hH7ap9ZECI9RHp5UDWDBZJYnF7E440dVHqdN
+pkDmMLqXaNmsFbMoCNhxUndegDaKWGQalpdcBDEVRWjyqyGQ5ryDC2y9aru6SaKaaDSasu0LZ14+
+a4tcA7G6K70/7f8A51T6OWDVGTTyPE5VIypaNihteUYYV8Pq/Qj9tWn+bT1c1SfKa3+qetP82nq5
+qk+U1v8AVP8Aw0P++9TJWn+UT1k38NZFEpeRzAqIoLMzNDEAABtJrVf/AFcHul+X7p7476TP2+bk
+zNHmtw322w6a/wDCaURy6FFSIjOxusWUoEKsGNso4r+OgoJZBsVybDC2HRsoNpAiyE2JD5zbwXNT
+LzWtNDLE6mxGVwyEAbsOiu84i4YOICnSQvNv4swrvP5uf1jfw0/zaermqT5TW/1T1p/m09XNUWiz
+8v3mHUw57ZsvMkmTNa4va9fud8Kn6oAPtnqDvKPvJdUIM/7axBc2dGj7Qla3a6K0/wAonrJv4L3/
+AO+5Ms0E3u/Kv/cBBlz8wdrJ5td2pmDGDnNIgOPHysv9JqKRWVbLewBuoI2XvV2ZTgTexOwXO1vo
+poroMq5r5fqxajiCuVsBfEEZtmY2wNGZVHAV7OwjG4I66m17d9xwe+yPqFjaMXUSsWtjMNmzZX7P
+fKSfphDfZPWn+bT1c1SfKa3+qeo4dDGJXinWWQFlQLGscgLXkZR5QpYo9XqI1W9okmZY1BN2sga2
+JNMJ4n1BJzJJnDEA9Rb66Mumz6e9uWgkub34m7WF+qlk1Lyah7ZS0rh2UAmwDMdlyaCxzzM4NyFd
+r2seujHJIzT2IxJJzHs8VEavYbFb8Z/mxx6qEkblYSSQGN1y45eEm9ACXArsBYbSSdhr/p5FV2Nm
+KhlJXHfh01Z5AWZXAO03NxtY1+zmTpIYAG3gNXUsCe0M+/x1cZwdxV/wak0+ommmiDAokkuZVbsh
+gGa2ANP3VNFl1zafVRiHMp4pTKUGYNlxzDfRg00ySPKwVgrA2UcRvbwWoRYLioub3xtvvauMZmG8
+f5jXC2RDuGB+6skagqVBzNfbfw1JnCoznNmsxuCNmBqTXKCpZmlCDBRy9mHXaiZzly7MuFy3hv0U
+NOQscS3UMw47Le2+26ryyMzgWsp6OoCg4EikttYG2w1HFp3VlvaxFzxH6DVmQ3HRYg+DfVgeE4jw
+1eiQq9YsfxptZqJIU1wimKwg2xQuIxlLFuIAb600cSoh42Y2tfsjcKXSyG0gNr2uvEbjG/X0VGyO
+uOa+XZuqNQykhRewJOzqrLIpLMMALHbhjjQZspGC4eDwUth0qLbyWNQs4zzPmCIMccMB+Nc+dlkF
+gcgJCLfdh2j9VGM5gL34AFGwdFqCRs4IN8W6j/MaEnCb7G7Dixt2lH20w1DCSJioEg7SEXwcffRl
+29Nji+b7/toMOBMouxW9r33LQWA3KkFg6lLXBtvbbtqaNkQyCPUqGsN5e2Nr760rIbE5huOGHTXv
+LC8wBYN1re2GzdQ5hzW2GwG3wUge6wAWuVAW1sMbUjSMpIuO1bceg1kN3tjYAfcKLTME5ea6sQDe
+972PhoSzspdxftWyo2xRY+VtNNHE6hUCgm4NgCMAN5tRZohI4a2ZySdg+irMkRHQSPxoju+4jHZQ
+DMp6crG++n954TsCyAJmGOZTs/Km0ksl9OSWhY2HCL2GbpUis2jjvGosVtzFzjE9PTeg0CBXJsci
+3NuvbWoZr80Jqd2N+K2FaZM2Wwc3tfork5r4EZrdN91f3n+r+de5Wtbhz7exvt9FL+5v83qPXRmv
+zL8Nuz1339FRLbLzmXOL3wtdqZs2U4G1r3zbBQ0at2SQWttYbT9NFb5rm97WoPmzXNrWtu8NRw5L
+42zX6T4KjlDZc1w2F+LDHxUEDWMcnatuN1b6wKKhr5+K9rY9nr6qxixG3i/KtRPltwahrX6A2/6K
+036X+1aChiFzJw3NsbUnJJFr5rG3RbfRlYFbbWuL4+A0rRsxGa3atu6zTrKc6hGID8Qv02NRJlUS
+ZXC8PlGM5cbUDKbAtHbAnYeqjIxsmZjfw3rMhuAbX2fbWRbPYXsR+IpmhSy4ZbEDdUfMdgWfh4r7
+FN9hplht7yUTECzZs634vHTJPdndWABObbl37rUzTICmWwvY43FToAAuScZbYYhq036X+1aH6k+6
+kyAHNe9+q1APhnAJt46WKKxVjmu2JuQRut0UWUAki2NQzMOKN0zgdAsrfVRUM1hgDcbPJOzooSZm
+zDBxcYMPo30IorEEZiWxNzhut0VzYiWY8JDYixx3W6K7K+I/jSobZYbgEb2a2bxWqMLYlmvj5qXv
+9Zo4LZcNh/V01YbKn60n/tVpmYEghxh4Vrst4h+NdlvEPxrst4h+NLwtt6B0Hrpf1D7DRgYG0oZS
+cLZjs3770IDiR/dHz083wrupeSQGZFGPZIFjY1xkRn6WHjC0FVzcG/ZJ3HoocsFFAYs3lkAnZ0U+
+W6LHbOxAwvst19AqXWTKRiwSMbQuIVaLKCLi7ZtuYhSenppf1D7DWsub2TUgeia0v+l91LJIuONz
+cjYT11tX0/zqy5STsAYn76RUFgRfeceLpoK4uAb7x9lNCg4b5Qu3aBQh1SkA9iQi1z+NIk7Z4QLc
+1QL2AwzjC/h20BBMjLlxsQDe53PagYiga+P7inCx/mNLFnDsQQUQ22k7Xa1vormSOi48MStdQfpJ
+uakaYjIxewvgL3sb9JocsogCgHiBudl8T1UFkViAb9m32CtXmUgyR6llG+2Vl+6tJh52z6KO3svu
+PXX5Gk279x6DUdgTw/j01xbPNH30Jw1rFTlA823X1VGMG7WG/dSxoSoN7AjMMBfqNfuDN1hQf7Qo
+OI8xJy2ygf2jVkXIOoXP3CmbEMtgWbrv14VjLfqVfvvXbFzt4fzoPlDXNrbKkntYcnUm1/NMg2/R
+Wm1OXNIuoEYN7cLpIx+tRS67SOGMqS8uFrKzMrOmW5OXEjea/wDXN/xoPaVGNTpjpouLNKzwuF4T
+bCOQticNlQ6a/PLwLIWPDiXkWwGPm0up7w1UsMLuI1bKHu5BYC0cbHYppY9NOz908yINqCGB5ZCc
+1smQHDHyaj/+Wv3nyL+958sPLz25Vuesd82Vtl9lJDr9a+n7whUJqoliZuXMoyyoHSEg2a4uCabU
+93a2aaFHMbNbJZwAxFpI1OxhUuj1buI0gaUcQbiV0XylPnVN3XHqXbvfLkg0xQgNNIoMKczl5BmL
+Ljmw31w93WvttPD/ALdHumGEtrld4zDzFHHFmLjMTlwynfS6bvCEwzOgkVeYr3QkqDeMsNqmkHcy
+tqNUZRnV2jUCPK92BbJje2+n7smjy94HT6pBHmUnPK0pTjDZccw31p/m09XNUXd+mh07ww5srSK5
+c52aQ3KyKNrdFfD6T0JPbV8PpPQk9tSazWJGkiRiICIMq5VZn8tmx4qTR6x5EjSQSgxFVbMqsnlq
+2HFSdxxvIdK0+niLsV5mWYRlsQoW/GbYVqPcpJpPecmfnMrW5ea2XIiefU+sln1Qk1EjyuFeMKGk
+YubXiOGNPo9G8jxvIZSZSrNmZVTyFXDhrUfKP6yGp9ZEAZNPJp5UDXKlo4onF7EYYV8PpPQk9tWl
+/wAUGSb37VJ73JHmXkiTVIS4VcmbKOYbcXjrT/KJ6yavh9J6EntqfvyRIxqlg1EoRQ3LzQmQLgWL
+W4BfH/Iv/9k=">
+</image>
+</svg>
diff --git a/symbian/ZXingBarcodeReader/group/ABLD.BAT b/symbian/ZXingBarcodeReader/group/ABLD.BAT
new file mode 100644
index 0000000..f771061
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/ABLD.BAT
@@ -0,0 +1,15 @@
+ at ECHO OFF
+
+REM Bldmake-generated batch file - ABLD.BAT
+REM ** DO NOT EDIT **
+
+perl -S ABLD.PL "\Carbide\ZXingWorkspace\ZXingBarcodeReader\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9
+if errorlevel==1 goto CheckPerl
+goto End
+
+:CheckPerl
+perl -v >NUL
+if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed?
+goto End
+
+:End
diff --git a/symbian/ZXingBarcodeReader/group/CameraWrapperExample.mmp b/symbian/ZXingBarcodeReader/group/CameraWrapperExample.mmp
new file mode 100644
index 0000000..1ee5a11
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/CameraWrapperExample.mmp
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+TARGET ZXingBarcodeReader_0xEF24C10A.exe
+TARGETTYPE exe
+UID 0x100039CE 0xEF24C10A
+VENDORID 0
+EPOCSTACKSIZE 0x5000
+
+SOURCEPATH ..\data
+
+START RESOURCE ZXingBarcodeReader.rss
+HEADER
+TARGET ZXingBarcodeReader_0xEF24C10A
+TARGETPATH resource\apps
+END //RESOURCE
+
+START RESOURCE ZXingBarcodeReader_reg.rss
+TARGET ZXingBarcodeReader_0xEF24C10A_reg
+TARGETPATH \private\10003a3f\apps
+END //RESOURCE
+
+SYSTEMINCLUDE /epoc32/include
+SYSTEMINCLUDE /epoc32/include/stdapis
+SYSTEMINCLUDE /epoc32/include/stdapis/sys
+SYSTEMINCLUDE /epoc32/include/stdapis/stlport
+SYSTEMINCLUDE /epoc32/include/variant
+SYSTEMINCLUDE /epoc32/include/ecom
+SYSTEMINCLUDE /epoc32/include/stdapis/stlport/stl
+
+SYSTEMINCLUDE .
+SYSTEMINCLUDE ../inc
+SYSTEMINCLUDE zxing/common/reedsolomon
+SYSTEMINCLUDE zxing/oned
+SYSTEMINCLUDE zxing/qrcode
+SYSTEMINCLUDE zxing/qrcode/decoder
+SYSTEMINCLUDE zxing/qrcode/detector
+
+SOURCEPATH ../src
+SOURCE CameraWrapperExample.cpp
+SOURCE CameraWrapperExampleApplication.cpp
+SOURCE CameraWrapperExampleAppView.cpp
+SOURCE CameraWrapperExampleAppUi.cpp
+SOURCE CameraWrapperExampleDocument.cpp
+SOURCE CameraImage.cpp
+
+LIBRARY euser.lib
+LIBRARY apparc.lib
+LIBRARY cone.lib
+LIBRARY eikcore.lib
+LIBRARY avkon.lib
+LIBRARY commonengine.lib
+LIBRARY efsrv.lib
+LIBRARY estor.lib
+LIBRARY aknnotify.lib
+LIBRARY fbscli.lib
+LIBRARY bitgdi.lib
+LIBRARY eikcoctl.lib
+LIBRARY PlatformEnv.lib // PathInfo
+LIBRARY bafl.lib // BafUtils
+LIBRARY ecam.lib // Camera
+LIBRARY camerawrapper.lib // CameraWrapper library
+LIBRARY libc.lib
+LIBRARY libm.lib
+LIBRARY libdl.lib
+LIBRARY libstdcpp.lib
+
+CAPABILITY UserEnvironment
+
+SOURCEPATH zxing/common/reedsolomon
+SOURCE GF256.cpp GF256Poly.cpp ReedSolomonDecoder.cpp ReedSolomonException.cpp
+SOURCEPATH zxing/common
+SOURCE Array.cpp BitArray.cpp BitMatrix.cpp BitSource.cpp Counted.cpp DecoderResult.cpp DetectorResult.cpp EdgeDetector.cpp GlobalHistogramBinarizer.cpp GridSampler.cpp IllegalArgumentException.cpp LocalBlockBinarizer.cpp PerspectiveTransform.cpp Str.cpp
+SOURCEPATH zxing/oned
+SOURCE Code128Reader.cpp Code39Reader.cpp EAN13Reader.cpp EAN8Reader.cpp ITFReader.cpp MultiFormatOneDReader.cpp MultiFormatUPCEANReader.cpp OneDReader.cpp OneDResultPoint.cpp UPCAReader.cpp UPCEANReader.cpp UPCEReader.cpp
+SOURCEPATH zxing/qrcode/decoder
+SOURCE BitMatrixParser.cpp DataBlock.cpp DataMask.cpp DecodedBitStreamParser.cpp Decoder.cpp Mode.cpp
+SOURCEPATH zxing/qrcode/detector
+SOURCE AlignmentPattern.cpp AlignmentPatternFinder.cpp Detector.cpp FinderPattern.cpp FinderPatternFinder.cpp FinderPatternInfo.cpp QREdgeDetector.cpp
+SOURCEPATH zxing/qrcode
+SOURCE ErrorCorrectionLevel.cpp FormatInformation.cpp QRCodeReader.cpp Version.cpp
+SOURCEPATH zxing
+SOURCE BarcodeFormat.cpp Binarizer.cpp BinaryBitmap.cpp Exception.cpp LuminanceSource.cpp MultiFormatReader.cpp Reader.cpp ReaderException.cpp Result.cpp ResultPoint.cpp
+
+OPTION CW -wchar_t on
+OPTION ARMCC --visibility_inlines_hidden
+OPTION GCCE -fvisibility-inlines-hidden
+
+SOURCEPATH ../src
+SOURCE DecodingOperations.cpp
diff --git a/symbian/ZXingBarcodeReader/group/Icons_scalable_dc.mk b/symbian/ZXingBarcodeReader/group/Icons_scalable_dc.mk
new file mode 100644
index 0000000..f29691f
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/Icons_scalable_dc.mk
@@ -0,0 +1,40 @@
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
+else
+ZDIR=$(EPOCROOT)epoc32\data\z
+endif
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\ZXingBarcodeReader_0xEF24C10A.mif
+
+ICONDIR=..\gfx
+
+do_nothing :
+ @rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE : $(ICONTARGETFILENAME)
+
+$(ICONTARGETFILENAME) : $(ICONDIR)\QrDecoder.svg
+ mifconv $(ICONTARGETFILENAME) \
+ /c32 $(ICONDIR)\QrDecoder.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+ @echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
+
diff --git a/symbian/ZXingBarcodeReader/group/bld.inf b/symbian/ZXingBarcodeReader/group/bld.inf
new file mode 100644
index 0000000..c196b50
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/bld.inf
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+PRJ_PLATFORMS
+WINSCW GCCE ARMV5
+
+PRJ_MMPFILES
+gnumakefile icons_scalable_dc.mk
+CameraWrapperExample.mmp
+
diff --git a/cpp/core/src/zxing/BarcodeFormat.cpp b/symbian/ZXingBarcodeReader/group/zxing/BarcodeFormat.cpp
old mode 100755
new mode 100644
similarity index 100%
copy from cpp/core/src/zxing/BarcodeFormat.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/BarcodeFormat.cpp
diff --git a/cpp/core/src/zxing/BarcodeFormat.h b/symbian/ZXingBarcodeReader/group/zxing/BarcodeFormat.h
similarity index 100%
copy from cpp/core/src/zxing/BarcodeFormat.h
copy to symbian/ZXingBarcodeReader/group/zxing/BarcodeFormat.h
diff --git a/cpp/core/src/zxing/Binarizer.cpp b/symbian/ZXingBarcodeReader/group/zxing/Binarizer.cpp
similarity index 100%
copy from cpp/core/src/zxing/Binarizer.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/Binarizer.cpp
diff --git a/cpp/core/src/zxing/Binarizer.h b/symbian/ZXingBarcodeReader/group/zxing/Binarizer.h
similarity index 100%
copy from cpp/core/src/zxing/Binarizer.h
copy to symbian/ZXingBarcodeReader/group/zxing/Binarizer.h
diff --git a/cpp/core/src/zxing/BinaryBitmap.cpp b/symbian/ZXingBarcodeReader/group/zxing/BinaryBitmap.cpp
similarity index 100%
copy from cpp/core/src/zxing/BinaryBitmap.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/BinaryBitmap.cpp
diff --git a/cpp/core/src/zxing/BinaryBitmap.h b/symbian/ZXingBarcodeReader/group/zxing/BinaryBitmap.h
similarity index 100%
copy from cpp/core/src/zxing/BinaryBitmap.h
copy to symbian/ZXingBarcodeReader/group/zxing/BinaryBitmap.h
diff --git a/cpp/core/src/zxing/Exception.cpp b/symbian/ZXingBarcodeReader/group/zxing/Exception.cpp
similarity index 100%
copy from cpp/core/src/zxing/Exception.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/Exception.cpp
diff --git a/cpp/core/src/zxing/Exception.h b/symbian/ZXingBarcodeReader/group/zxing/Exception.h
similarity index 100%
copy from cpp/core/src/zxing/Exception.h
copy to symbian/ZXingBarcodeReader/group/zxing/Exception.h
diff --git a/cpp/core/src/zxing/LuminanceSource.cpp b/symbian/ZXingBarcodeReader/group/zxing/LuminanceSource.cpp
similarity index 100%
copy from cpp/core/src/zxing/LuminanceSource.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/LuminanceSource.cpp
diff --git a/cpp/core/src/zxing/LuminanceSource.h b/symbian/ZXingBarcodeReader/group/zxing/LuminanceSource.h
similarity index 100%
copy from cpp/core/src/zxing/LuminanceSource.h
copy to symbian/ZXingBarcodeReader/group/zxing/LuminanceSource.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/MultiFormatReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/MultiFormatReader.cpp
new file mode 100644
index 0000000..fd3d8d2
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/MultiFormatReader.cpp
@@ -0,0 +1,54 @@
+/*
+ * MultiFormatBarcodeReader.cpp
+ * ZXing
+ *
+ * Created by Lukasz Warchol on 10-01-26.
+ * Modified by Luiz Silva on 09/02/2010.
+ * Copyright 2010 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "MultiFormatReader.h"
+#include <zxing/qrcode/QRCodeReader.h>
+//#include <zxing/datamatrix/DataMatrixReader.h>
+#include <zxing/oned/MultiFormatUPCEANReader.h>
+#include <zxing/oned/MultiFormatOneDReader.h>
+#include <zxing/ReaderException.h>
+
+namespace zxing {
+ MultiFormatReader::MultiFormatReader(){
+ readers = new std::vector<Reader*>();
+
+ readers->push_back(new zxing::qrcode::QRCodeReader());
+ //readers->push_back(new zxing::datamatrix::DataMatrixReader());
+ readers->push_back(new zxing::oned::MultiFormatUPCEANReader());
+ readers->push_back(new zxing::oned::MultiFormatOneDReader());
+ }
+
+ Ref<Result> MultiFormatReader::decode(Ref<BinaryBitmap> image){
+ int size = readers->size();
+ for (int i = 0; i < size; i++) {
+ Reader* reader = (*readers)[i];
+ try {
+ return reader->decode(image);
+ } catch (ReaderException re) {
+ // continue
+ }
+ }
+ throw ReaderException("No code detected");
+ }
+ MultiFormatReader::~MultiFormatReader(){
+ delete readers;
+ }
+}
diff --git a/cpp/core/src/zxing/MultiFormatReader.h b/symbian/ZXingBarcodeReader/group/zxing/MultiFormatReader.h
similarity index 100%
copy from cpp/core/src/zxing/MultiFormatReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/MultiFormatReader.h
diff --git a/cpp/core/src/zxing/Reader.cpp b/symbian/ZXingBarcodeReader/group/zxing/Reader.cpp
old mode 100755
new mode 100644
similarity index 100%
copy from cpp/core/src/zxing/Reader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/Reader.cpp
diff --git a/symbian/ZXingBarcodeReader/group/zxing/Reader.h b/symbian/ZXingBarcodeReader/group/zxing/Reader.h
new file mode 100644
index 0000000..3de270f
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/Reader.h
@@ -0,0 +1,38 @@
+#ifndef __READER_H__
+#define __READER_H__
+
+/*
+ * Reader.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 13/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <map>
+#include <zxing/BinaryBitmap.h>
+#include <zxing/Result.h>
+
+namespace zxing {
+
+class Reader {
+public:
+ virtual Ref<Result> decode(Ref<BinaryBitmap> image) = 0;
+ virtual ~Reader();
+};
+
+}
+
+#endif // __READER_H__
diff --git a/cpp/core/src/zxing/ReaderException.cpp b/symbian/ZXingBarcodeReader/group/zxing/ReaderException.cpp
similarity index 100%
copy from cpp/core/src/zxing/ReaderException.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/ReaderException.cpp
diff --git a/cpp/core/src/zxing/ReaderException.h b/symbian/ZXingBarcodeReader/group/zxing/ReaderException.h
similarity index 100%
copy from cpp/core/src/zxing/ReaderException.h
copy to symbian/ZXingBarcodeReader/group/zxing/ReaderException.h
diff --git a/cpp/core/src/zxing/Result.cpp b/symbian/ZXingBarcodeReader/group/zxing/Result.cpp
similarity index 100%
copy from cpp/core/src/zxing/Result.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/Result.cpp
diff --git a/cpp/core/src/zxing/Result.h b/symbian/ZXingBarcodeReader/group/zxing/Result.h
similarity index 100%
copy from cpp/core/src/zxing/Result.h
copy to symbian/ZXingBarcodeReader/group/zxing/Result.h
diff --git a/cpp/core/src/zxing/ResultPoint.cpp b/symbian/ZXingBarcodeReader/group/zxing/ResultPoint.cpp
old mode 100755
new mode 100644
similarity index 100%
copy from cpp/core/src/zxing/ResultPoint.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/ResultPoint.cpp
diff --git a/cpp/core/src/zxing/ResultPoint.h b/symbian/ZXingBarcodeReader/group/zxing/ResultPoint.h
similarity index 100%
copy from cpp/core/src/zxing/ResultPoint.h
copy to symbian/ZXingBarcodeReader/group/zxing/ResultPoint.h
diff --git a/cpp/core/src/zxing/common/Array.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/Array.cpp
old mode 100755
new mode 100644
similarity index 100%
copy from cpp/core/src/zxing/common/Array.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/Array.cpp
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/Array.h b/symbian/ZXingBarcodeReader/group/zxing/common/Array.h
new file mode 100644
index 0000000..39b1786
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/Array.h
@@ -0,0 +1,209 @@
+#ifndef __ARRAY_H__
+#define __ARRAY_H__
+
+/*
+ * Array.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 07/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <valarray>
+#include <cstdarg>
+
+#ifdef DEBUG_COUNTING
+#include <iostream>
+#include <typeinfo>
+#endif
+
+#include <zxing/common/Counted.h>
+
+
+namespace zxing {
+
+template<typename T> class Array : public Counted {
+protected:
+public:
+ std::valarray<T> values_;
+ Array(size_t n) :
+ Counted(), values_(T(), n) {
+ }
+ Array(T *ts, size_t n) :
+ Counted(), values_(ts, n) {
+ }
+ Array(T v, size_t n) :
+ Counted(), values_(v, n) {
+ }
+ Array(std::valarray<T> &v) :
+ Counted(), values_(v) {
+ }
+ Array(Array<T> &other) :
+ Counted(), values_(other.values_) {
+ }
+ Array(Array<T> *other) :
+ Counted(), values_(other->values_) {
+ }
+ virtual ~Array() {
+ }
+ Array<T>& operator=(const Array<T> &other) {
+#ifdef DEBUG_COUNTING
+ cout << "assigning values from Array " << &other << " to this Array " << this << ", ";
+#endif
+ values_ = other.values_;
+#ifdef DEBUG_COUNTING
+ cout << "new size = " << values_.size() << "\n";
+#endif
+ return *this;
+ }
+ Array<T>& operator=(const std::valarray<T> &array) {
+#ifdef DEBUG_COUNTING
+ cout << "assigning values from Array " << &array << " to this Array " << this << ", ";
+#endif
+ values_ = array;
+#ifdef DEBUG_COUNTING
+ cout << "new size = " << values_.size() << "\n";
+#endif
+ return *this;
+ }
+ T operator[](size_t i) const {
+ return values_[i];
+ }
+ T& operator[](size_t i) {
+ return values_[i];
+ }
+ size_t size() const {
+ return values_.size();
+ }
+ std::valarray<T> values() const {
+ return values_;
+ }
+ std::valarray<T>& values() {
+ return values_;
+ }
+};
+
+template<typename T> class ArrayRef {
+private:
+public:
+ Array<T> *array_;
+ ArrayRef() :
+ array_(0) {
+#ifdef DEBUG_COUNTING
+ cout << "instantiating empty ArrayRef " << this << "\n";
+#endif
+ }
+ ArrayRef(size_t n) :
+ array_(0) {
+#ifdef DEBUG_COUNTING
+ cout << "instantiating ArrayRef " << this << "with size " << n << "\n";
+#endif
+ reset(new Array<T> (n));
+ }
+ ArrayRef(T *ts, size_t n) :
+ array_(0) {
+#ifdef DEBUG_COUNTING
+ cout << "instantiating ArrayRef " << this << "with " << n << " elements at " << (void *)ts << "\n";
+#endif
+ reset(new Array<T> (ts, n));
+ }
+ ArrayRef(Array<T> *a) :
+ array_(0) {
+#ifdef DEBUG_COUNTING
+ cout << "instantiating ArrayRef " << this << " from pointer:\n";
+#endif
+ reset(a);
+ }
+ ArrayRef(const Array<T> &a) :
+ array_(0) {
+#ifdef DEBUG_COUNTING
+ cout << "instantiating ArrayRef " << this << " from reference to Array " << (void *)&a << ":\n";
+#endif
+ reset(const_cast<Array<T> *>(&a));
+ }
+ ArrayRef(const ArrayRef &other) :
+ array_(0) {
+#ifdef DEBUG_COUNTING
+ cout << "instantiating ArrayRef " << this << " from ArrayRef " << &other << ":\n";
+#endif
+ reset(other.array_);
+ }
+
+ template<class Y>
+ ArrayRef(const ArrayRef<Y> &other) :
+ array_(0) {
+#ifdef DEBUG_COUNTING
+ cout << "instantiating ArrayRef " << this << " from ArrayRef " << &other << ":\n";
+#endif
+ reset(static_cast<const Array<T> *>(other.array_));
+ }
+
+ ~ArrayRef() {
+#ifdef DEBUG_COUNTING
+ cout << "destroying ArrayRef " << this << " with " << (array_ ? typeid(*array_).name() : "NULL") << " "
+ << array_ << "\n";
+#endif
+ if (array_) {
+ array_->release();
+ }
+ array_ = 0;
+ }
+
+ T operator[](size_t i) const {
+ return (*array_)[i];
+ }
+ T& operator[](size_t i) {
+ return (*array_)[i];
+ }
+ size_t size() const {
+ return array_->size();
+ }
+
+ void reset(Array<T> *a) {
+#ifdef DEBUG_COUNTING
+ cout << "resetting ArrayRef " << this << " from " << (array_ ? typeid(*array_).name() : "NULL") << " "
+ << array_ << " to " << (a ? typeid(*a).name() : "NULL") << " " << a << "\n";
+#endif
+ if (a) {
+ a->retain();
+ }
+ if (array_) {
+ array_->release();
+ }
+ array_ = a;
+ }
+ void reset(const ArrayRef<T> &other) {
+ reset(other.array_);
+ }
+ ArrayRef<T>& operator=(const ArrayRef<T> &other) {
+ reset(other);
+ return *this;
+ }
+ ArrayRef<T>& operator=(Array<T> *a) {
+ reset(a);
+ return *this;
+ }
+
+ Array<T>& operator*() {
+ return *array_;
+ }
+ Array<T>* operator->() {
+ return array_;
+ }
+};
+
+} // namespace zxing
+
+#endif // __ARRAY_H__
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/BitArray.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/BitArray.cpp
new file mode 100644
index 0000000..26e6869
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/BitArray.cpp
@@ -0,0 +1,118 @@
+/*
+ * BitArray.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 09/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/BitArray.h>
+#include <iostream>
+
+using namespace std;
+
+namespace zxing {
+static unsigned int logDigits(unsigned digits) {
+ unsigned log = 0;
+ unsigned val = 1;
+ while (val < digits) {
+ log++;
+ val <<= 1;
+ }
+ return log;
+}
+const unsigned int BitArray::bitsPerWord_ = numeric_limits<unsigned int>::digits;
+const unsigned int BitArray::logBits_ = logDigits(bitsPerWord_);
+const unsigned int BitArray::bitsMask_ = (1 << logBits_) - 1;
+size_t BitArray::wordsForBits(size_t bits) {
+ int arraySize = bits >> logBits_;
+ if (bits - (arraySize << logBits_) != 0) {
+ arraySize++;
+ }
+ return arraySize;
+}
+BitArray::BitArray() {
+ cout << "hey! don't use this BitArrayConstructor!\n";
+}
+
+BitArray::BitArray(size_t size) :
+ size_(size), bits_((const unsigned int)0, wordsForBits(size)) {
+}
+BitArray::~BitArray() {
+}
+size_t BitArray::getSize() {
+ return size_;
+}
+bool BitArray::get(size_t i) {
+ return (bits_[i >> logBits_] & (1 << (i & bitsMask_))) != 0;
+}
+void BitArray::set(size_t i) {
+ bits_[i >> logBits_] |= 1 << (i & bitsMask_);
+}
+void BitArray::setBulk(size_t i, unsigned int newBits) {
+ bits_[i >> logBits_] = newBits;
+}
+void BitArray::clear() {
+ size_t max = bits_.size();
+ for (size_t i = 0; i < max; i++) {
+ bits_[i] = 0;
+ }
+}
+bool BitArray::isRange(size_t start, size_t end, bool value) {
+ if (end < start) {
+ throw IllegalArgumentException("end must be after start");
+ }
+ if (end == start) {
+ return true;
+ }
+ // treat the 'end' as inclusive, rather than exclusive
+ end--;
+ size_t firstWord = start >> logBits_;
+ size_t lastWord = end >> logBits_;
+ for (size_t i = firstWord; i <= lastWord; i++) {
+ size_t firstBit = i > firstWord ? 0 : start & bitsMask_;
+ size_t lastBit = i < lastWord ? logBits_ : end & bitsMask_;
+ unsigned int mask;
+ if (firstBit == 0 && lastBit == logBits_) {
+ mask = numeric_limits<unsigned int>::max();
+ } else {
+ mask = 0;
+ for (size_t j = firstBit; j <= lastBit; j++) {
+ mask |= 1 << j;
+ }
+ }
+ if (value) {
+ if ((bits_[i] & mask) != mask) {
+ return false;
+ }
+ } else {
+ if ((bits_[i] & mask) != 0) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+valarray<unsigned int>& BitArray::getBitArray() {
+ return bits_;
+}
+void BitArray::reverse() {
+ unsigned int allBits = numeric_limits<unsigned int>::max();
+ size_t max = bits_.size();
+ for (size_t i = 0; i < max; i++) {
+ bits_[i] = bits_[i] ^ allBits;
+ }
+}
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/BitArray.h b/symbian/ZXingBarcodeReader/group/zxing/common/BitArray.h
new file mode 100644
index 0000000..1e8828e
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/BitArray.h
@@ -0,0 +1,57 @@
+#ifndef __BIT_ARRAY_H__
+#define __BIT_ARRAY_H__
+
+/*
+ * BitArray.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 09/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/Counted.h>
+#include <zxing/common/IllegalArgumentException.h>
+#include <valarray>
+#include <limits>
+#include <iostream>
+
+namespace zxing {
+
+class BitArray : public Counted {
+private:
+ size_t size_;
+ std::valarray<unsigned int> bits_;
+ static const unsigned int bitsPerWord_;
+ static const unsigned int logBits_;
+ static const unsigned int bitsMask_;
+ static size_t wordsForBits(size_t bits);
+ explicit BitArray();
+
+public:
+ BitArray(size_t size);
+ ~BitArray();
+ size_t getSize();
+ bool get(size_t i);
+ void set(size_t i);
+ void setBulk(size_t i, unsigned int newBits);
+ void clear();
+ bool isRange(size_t start, size_t end, bool value);
+ std::valarray<unsigned int>& getBitArray();
+ void reverse();
+};
+
+}
+
+#endif // __BIT_ARRAY_H__
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/BitMatrix.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/BitMatrix.cpp
new file mode 100644
index 0000000..9256c40
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/BitMatrix.cpp
@@ -0,0 +1,148 @@
+/*
+ * BitMatrix.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 12/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/BitMatrix.h>
+#include <zxing/common/IllegalArgumentException.h>
+
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <cstring>
+
+namespace zxing {
+using namespace std;
+
+unsigned int logDigits(unsigned digits) {
+ unsigned log = 0;
+ unsigned val = 1;
+ while (val < digits) {
+ log++;
+ val <<= 1;
+ }
+ return log;
+}
+
+
+const unsigned int bitsPerWord = std::numeric_limits<unsigned int>::digits;
+const unsigned int logBits = logDigits(bitsPerWord);
+const unsigned int bitsMask = (1 << logBits) - 1;
+
+static size_t wordsForSize(size_t width, size_t height) {
+ size_t bits = width * height;
+ int arraySize = bits >> logBits;
+ if (bits - (arraySize << logBits) != 0) {
+ arraySize++;
+ }
+ return arraySize;
+}
+
+BitMatrix::BitMatrix(size_t dimension) :
+ width_(dimension), height_(dimension), bits_(NULL) {
+
+ words_ = wordsForSize(width_, height_);
+ bits_ = new unsigned int[words_];
+ clear();
+}
+
+BitMatrix::BitMatrix(size_t width, size_t height) :
+ width_(width), height_(height), bits_(NULL) {
+
+ words_ = wordsForSize(width_, height_);
+ bits_ = new unsigned int[words_];
+ clear();
+}
+
+BitMatrix::~BitMatrix() {
+ delete[] bits_;
+}
+
+
+bool BitMatrix::get(size_t x, size_t y) const {
+ size_t offset = x + width_ * y;
+ return ((bits_[offset >> logBits] >> (offset & bitsMask)) & 0x01) != 0;
+}
+
+void BitMatrix::set(size_t x, size_t y) {
+ size_t offset = x + width_ * y;
+ bits_[offset >> logBits] |= 1 << (offset & bitsMask);
+}
+
+void BitMatrix::flip(size_t x, size_t y) {
+ size_t offset = x + width_ * y;
+ bits_[offset >> logBits] ^= 1 << (offset & bitsMask);
+}
+
+void BitMatrix::clear() {
+ std::memset(bits_, 0, sizeof(unsigned int) * words_);
+}
+
+void BitMatrix::setRegion(size_t left, size_t top, size_t width, size_t height) {
+ if (top < 0 || left < 0) {
+ throw IllegalArgumentException("topI and leftJ must be nonnegative");
+ }
+ if (height < 1 || width < 1) {
+ throw IllegalArgumentException("height and width must be at least 1");
+ }
+ size_t right = left + width;
+ size_t bottom = top + height;
+ if (right > width_ || bottom > height_) {
+ throw IllegalArgumentException("top + height and left + width must be <= matrix dimension");
+ }
+ for (size_t y = top; y < bottom; y++) {
+ int yOffset = width_ * y;
+ for (size_t x = left; x < right; x++) {
+ size_t offset = x + yOffset;
+ bits_[offset >> logBits] |= 1 << (offset & bitsMask);
+ }
+ }
+}
+
+size_t BitMatrix::getWidth() const {
+ return width_;
+}
+
+size_t BitMatrix::getHeight() const {
+ return height_;
+}
+
+size_t BitMatrix::getDimension() const {
+ return width_;
+}
+
+unsigned int* BitMatrix::getBits() {
+ return bits_;
+}
+
+ostream& operator<<(ostream &out, BitMatrix &bm) {
+ for (size_t y = 0; y < bm.height_; y++) {
+ for (size_t x = 0; x < bm.width_; x++) {
+ out << (bm.get(x, y) ? "X " : " ");
+ }
+ out << "\n";
+ }
+ return out;
+}
+const char *BitMatrix::description() {
+ ostringstream out;
+ out << *this;
+ return out.str().c_str();
+}
+
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/BitMatrix.h b/symbian/ZXingBarcodeReader/group/zxing/common/BitMatrix.h
new file mode 100644
index 0000000..e8f8f84
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/BitMatrix.h
@@ -0,0 +1,61 @@
+#ifndef __BIT_MATRIX_H__
+#define __BIT_MATRIX_H__
+
+/*
+ * BitMatrix.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 12/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/Counted.h>
+#include <valarray>
+#include <limits>
+
+namespace zxing {
+
+class BitMatrix : public Counted {
+private:
+ size_t width_;
+ size_t height_;
+ size_t words_;
+ unsigned int* bits_;
+
+public:
+ BitMatrix(size_t dimension);
+ BitMatrix(size_t width, size_t height);
+
+ ~BitMatrix();
+ // Inlining this does not really improve performance.
+ bool get(size_t x, size_t y) const;
+ void set(size_t x, size_t y);
+ void flip(size_t x, size_t y);
+ void clear();
+ void setRegion(size_t left, size_t top, size_t width, size_t height);
+
+ size_t getDimension() const;
+ size_t getWidth() const;
+ size_t getHeight() const;
+
+ unsigned int* getBits();
+
+ friend std::ostream& operator<<(std::ostream &out, BitMatrix &bm);
+ const char *description();
+};
+
+}
+
+#endif // __BIT_MATRIX_H__
diff --git a/cpp/core/src/zxing/common/BitSource.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/BitSource.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/BitSource.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/BitSource.cpp
diff --git a/cpp/core/src/zxing/common/BitSource.h b/symbian/ZXingBarcodeReader/group/zxing/common/BitSource.h
similarity index 100%
copy from cpp/core/src/zxing/common/BitSource.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/BitSource.h
diff --git a/cpp/core/src/zxing/common/Counted.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/Counted.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/Counted.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/Counted.cpp
diff --git a/cpp/core/src/zxing/common/Counted.h b/symbian/ZXingBarcodeReader/group/zxing/common/Counted.h
similarity index 100%
copy from cpp/core/src/zxing/common/Counted.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/Counted.h
diff --git a/cpp/core/src/zxing/common/DecoderResult.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/DecoderResult.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/DecoderResult.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/DecoderResult.cpp
diff --git a/cpp/core/src/zxing/common/DecoderResult.h b/symbian/ZXingBarcodeReader/group/zxing/common/DecoderResult.h
similarity index 100%
copy from cpp/core/src/zxing/common/DecoderResult.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/DecoderResult.h
diff --git a/cpp/core/src/zxing/common/DetectorResult.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/DetectorResult.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/DetectorResult.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/DetectorResult.cpp
diff --git a/cpp/core/src/zxing/common/DetectorResult.h b/symbian/ZXingBarcodeReader/group/zxing/common/DetectorResult.h
similarity index 100%
copy from cpp/core/src/zxing/common/DetectorResult.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/DetectorResult.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/EdgeDetector.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/EdgeDetector.cpp
new file mode 100644
index 0000000..3f0b403
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/EdgeDetector.cpp
@@ -0,0 +1,190 @@
+/*
+ * EdgeDetector.cpp
+ * zxing
+ *
+ * Created by Ralf Kistner on 7/12/2009.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/EdgeDetector.h>
+#include <algorithm>
+
+using namespace std;
+
+namespace zxing {
+namespace EdgeDetector {
+
+void findEdgePoints(std::vector<Point>& points, const BitMatrix& image, Point start, Point end, bool invert, int skip, float deviation) {
+ float xdist = end.x - start.x;
+ float ydist = end.y - start.y;
+ float length = sqrt(xdist * xdist + ydist * ydist);
+
+
+ int var;
+
+ if (abs(xdist) > abs(ydist)) {
+ // Horizontal
+ if (xdist < 0)
+ skip = -skip;
+
+ var = int(abs(deviation * length / xdist));
+
+ float dy = ydist / xdist * skip;
+ bool left = (skip < 0) ^ invert;
+ int x = int(start.x);
+
+ int steps = int(xdist / skip);
+ for (int i = 0; i < steps; i++) {
+ x += skip;
+ if (x < 0 || x >= (int)image.getWidth())
+ continue; // In case we start off the edge
+ int my = int(start.y + dy * i);
+ int ey = min(my + var + 1, (int)image.getHeight() - 1);
+ int sy = max(my - var, 0);
+ for (int y = sy + 1; y < ey; y++) {
+ if (left) {
+ if (image.get(x, y) && !image.get(x, y + 1)) {
+ points.push_back(Point(x, y + 0.5f));
+ }
+ } else {
+ if (!image.get(x, y) && image.get(x, y + 1)) {
+ points.push_back(Point(x, y + 0.5f));
+ }
+ }
+ }
+ }
+ } else {
+ // Vertical
+ if (ydist < 0)
+ skip = -skip;
+
+ var = int(abs(deviation * length / ydist));
+
+ float dx = xdist / ydist * skip;
+ bool down = (skip > 0) ^ invert;
+ int y = int(start.y);
+
+ int steps = int(ydist / skip);
+ for (int i = 0; i < steps; i++) {
+ y += skip;
+ if (y < 0 || y >= (int)image.getHeight())
+ continue; // In case we start off the edge
+ int mx = int(start.x + dx * i);
+ int ex = min(mx + var + 1, (int)image.getWidth() - 1);
+ int sx = max(mx - var, 0);
+ for (int x = sx + 1; x < ex; x++) {
+ if (down) {
+ if (image.get(x, y) && !image.get(x + 1, y)) {
+ points.push_back(Point(x + 0.5f, y));
+ }
+
+ } else {
+ if (!image.get(x, y) && image.get(x + 1, y)) {
+ points.push_back(Point(x + 0.5f, y));
+ }
+ }
+
+ }
+ }
+
+ }
+}
+
+Line findLine(const BitMatrix& image, Line estimate, bool invert, int deviation, float threshold, int skip) {
+ float t = threshold * threshold;
+
+ Point start = estimate.start;
+ Point end = estimate.end;
+
+ vector<Point> edges;
+ edges.clear();
+ findEdgePoints(edges, image, start, end, invert, skip, deviation);
+
+ int n = edges.size();
+
+ float xdist = end.x - start.x;
+ float ydist = end.y - start.y;
+
+ bool horizontal = abs(xdist) > abs(ydist);
+
+ float max = 0;
+ Line bestLine(start, end); // prepopulate with the given line, in case we can't find any line for some reason
+
+ for (int i = -deviation; i < deviation; i++) {
+ float x1, y1;
+ if (horizontal) {
+ y1 = start.y + i;
+ x1 = start.x - i * ydist / xdist;
+ } else {
+ y1 = start.y - i * xdist / ydist;
+ x1 = start.x + i;
+ }
+
+ for (int j = -deviation; j < deviation; j++) {
+ float x2, y2;
+ if (horizontal) {
+ y2 = end.y + j;
+ x2 = end.x - j * ydist / xdist;
+ } else {
+ y2 = end.y - j * xdist / ydist;
+ x2 = end.x + j;
+ }
+
+ float dx = x1 - x2;
+ float dy = y1 - y2;
+ float length = sqrt(dx * dx + dy * dy);
+
+ float score = 0;
+
+ for(int k = 0; k < n; k++) {
+ const Point& edge = edges[k];
+ float dist = ((x1 - edge.x) * dy - (y1 - edge.y) * dx) / length;
+ // Similar to least squares method
+ float s = t - dist * dist;
+ if (s > 0)
+ score += s;
+ }
+
+ if (score > max) {
+ max = score;
+ bestLine.start = Point(x1, y1);
+ bestLine.end = Point(x2, y2);
+ }
+ }
+ }
+
+ return bestLine;
+}
+
+Point intersection(Line a, Line b) {
+ float dxa = a.start.x - a.end.x;
+ float dxb = b.start.x - b.end.x;
+ float dya = a.start.y - a.end.y;
+ float dyb = b.start.y - b.end.y;
+
+ float p = a.start.x * a.end.y - a.start.y * a.end.x;
+ float q = b.start.x * b.end.y - b.start.y * b.end.x;
+ float denom = dxa * dyb - dya * dxb;
+ if(denom == 0) // Lines don't intersect
+ return Point(INFINITY, INFINITY);
+
+ float x = (p * dxb - dxa * q) / denom;
+ float y = (p * dyb - dya * q) / denom;
+
+ return Point(x, y);
+}
+
+} // namespace EdgeDetector
+} // namespace zxing
diff --git a/cpp/core/src/zxing/common/EdgeDetector.h b/symbian/ZXingBarcodeReader/group/zxing/common/EdgeDetector.h
similarity index 100%
copy from cpp/core/src/zxing/common/EdgeDetector.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/EdgeDetector.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/GlobalHistogramBinarizer.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/GlobalHistogramBinarizer.cpp
new file mode 100644
index 0000000..8767dbd
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/GlobalHistogramBinarizer.cpp
@@ -0,0 +1,177 @@
+/*
+ * GlobalHistogramBinarizer.cpp
+ * zxing
+ *
+ * Created by Ralf Kistner on 16/10/2009.
+ * Copyright 2008 ZXing authors All rights reserved.
+ * Modified by Lukasz Warchol on 02/02/2010.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/GlobalHistogramBinarizer.h>
+
+#include <zxing/common/IllegalArgumentException.h>
+
+namespace zxing {
+ using namespace std;
+
+ const int LUMINANCE_BITS = 5;
+ const int LUMINANCE_SHIFT = 8 - LUMINANCE_BITS;
+ const int LUMINANCE_BUCKETS = 1 << LUMINANCE_BITS;
+
+ GlobalHistogramBinarizer::GlobalHistogramBinarizer(Ref<LuminanceSource> source) :
+ Binarizer(source) {
+
+ }
+
+ GlobalHistogramBinarizer::~GlobalHistogramBinarizer() {
+ }
+
+
+ Ref<BitArray> GlobalHistogramBinarizer::estimateBlackRow(int y, Ref<BitArray> row){
+ valarray<int> histogram(0, LUMINANCE_BUCKETS);
+ LuminanceSource& source = *getSource();
+ int width = source.getWidth();
+ if (row == NULL || row->getSize() < width) {
+ row = new BitArray(width);
+ } else {
+ row->clear();
+ }
+
+ for (int x = 0; x < width; x++) {
+ unsigned char pixel = source.getPixel(x, y);
+ histogram[pixel >> LUMINANCE_SHIFT]++;
+ }
+ int blackPoint = estimate(histogram) << LUMINANCE_SHIFT;
+
+
+ Ref<BitArray> array_ref(new BitArray(width));
+ BitArray& array = *array_ref;
+
+ int left = source.getPixel(0, y);
+ int center = source.getPixel(1, y);
+ for (int x = 1; x < width - 1; x++) {
+ int right = source.getPixel(x+1, y);
+ // A simple -1 4 -1 box filter with a weight of 2.
+ int luminance = ((center << 2) - left - right) >> 1;
+ if (luminance < blackPoint) {
+ array.set(x);
+ }
+ left = center;
+ center = right;
+ }
+
+ return array_ref;
+ }
+
+ Ref<BitMatrix> GlobalHistogramBinarizer::estimateBlackMatrix() {
+ // Faster than working with the reference
+ LuminanceSource& source = *getSource();
+ int width = source.getWidth();
+ int height = source.getHeight();
+ valarray<int> histogram(0, LUMINANCE_BUCKETS);
+
+
+ // Quickly calculates the histogram by sampling four rows from the image. This proved to be
+ // more robust on the blackbox tests than sampling a diagonal as we used to do.
+ for (int y = 1; y < 5; y++) {
+ int row = height * y / 5;
+ int right = (width << 2) / 5;
+ int sdf;
+ for (int x = width / 5; x < right; x++) {
+ unsigned char pixel = source.getPixel(x, row);
+ histogram[pixel >> LUMINANCE_SHIFT]++;
+ sdf = histogram[pixel >> LUMINANCE_SHIFT];
+ }
+ }
+
+ int blackPoint = estimate(histogram) << LUMINANCE_SHIFT;
+
+ Ref<BitMatrix> matrix_ref(new BitMatrix(width, height));
+ BitMatrix& matrix = *matrix_ref;
+ for (int y = 0; y < height; y++) {
+ for (int x = 0; x < width; x++) {
+ if (source.getPixel(x, y) <= blackPoint)
+ matrix.set(x, y);
+ }
+ }
+ return matrix_ref;
+ }
+
+ int GlobalHistogramBinarizer::estimate(valarray<int> &histogram) {
+ int numBuckets = histogram.size();
+ int maxBucketCount = 0;
+
+
+ // Find tallest peak in histogram
+ int firstPeak = 0;
+ int firstPeakSize = 0;
+ for (int i = 0; i < numBuckets; i++) {
+ if (histogram[i] > firstPeakSize) {
+ firstPeak = i;
+ firstPeakSize = histogram[i];
+ }
+ if (histogram[i] > maxBucketCount) {
+ maxBucketCount = histogram[i];
+ }
+ }
+
+ // Find second-tallest peak -- well, another peak that is tall and not
+ // so close to the first one
+ int secondPeak = 0;
+ int secondPeakScore = 0;
+ for (int i = 0; i < numBuckets; i++) {
+ int distanceToBiggest = i - firstPeak;
+ // Encourage more distant second peaks by multiplying by square of distance
+ int score = histogram[i] * distanceToBiggest * distanceToBiggest;
+ if (score > secondPeakScore) {
+ secondPeak = i;
+ secondPeakScore = score;
+ }
+ }
+
+ // Put firstPeak first
+ if (firstPeak > secondPeak) {
+ int temp = firstPeak;
+ firstPeak = secondPeak;
+ secondPeak = temp;
+ }
+
+ // Kind of arbitrary; if the two peaks are very close, then we figure there is so little
+ // dynamic range in the image, that discriminating black and white is too error-prone.
+ // Decoding the image/line is either pointless, or may in some cases lead to a false positive
+ // for 1D formats, which are relatively lenient.
+ // We arbitrarily say "close" is "<= 1/16 of the total histogram buckets apart"
+ if (secondPeak - firstPeak <= numBuckets >> 4) {
+ throw IllegalArgumentException("Too little dynamic range in luminance");
+ }
+
+ // Find a valley between them that is low and closer to the white peak
+ int bestValley = secondPeak - 1;
+ int bestValleyScore = -1;
+ for (int i = secondPeak - 1; i > firstPeak; i--) {
+ int fromFirst = i - firstPeak;
+ // Favor a "valley" that is not too close to either peak -- especially not the black peak --
+ // and that has a low value of course
+ int score = fromFirst * fromFirst * (secondPeak - i) * (maxBucketCount - histogram[i]);
+ if (score > bestValleyScore) {
+ bestValley = i;
+ bestValleyScore = score;
+ }
+ }
+
+ return bestValley;
+ }
+
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/GlobalHistogramBinarizer.h b/symbian/ZXingBarcodeReader/group/zxing/common/GlobalHistogramBinarizer.h
new file mode 100644
index 0000000..6735c5b
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/GlobalHistogramBinarizer.h
@@ -0,0 +1,44 @@
+/*
+ * GlobalHistogramBinarizer.h
+ * zxing
+ *
+ * Created by Ralf Kistner on 16/10/2009.
+ * Copyright 2008 ZXing authors All rights reserved.
+ * Modified by Lukasz Warchol on 02/02/2010.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef GLOBALHISTOGRAMBINARIZER_H_
+#define GLOBALHISTOGRAMBINARIZER_H_
+
+#include <valarray>
+#include <zxing/Binarizer.h>
+#include <zxing/common/BitArray.h>
+#include <zxing/common/BitMatrix.h>
+
+namespace zxing {
+
+ class GlobalHistogramBinarizer : public Binarizer {
+ public:
+ GlobalHistogramBinarizer(Ref<LuminanceSource> source);
+ virtual ~GlobalHistogramBinarizer();
+
+ virtual Ref<BitArray> estimateBlackRow(int y, Ref<BitArray> row);
+ virtual Ref<BitMatrix> estimateBlackMatrix();
+ static int estimate(std::valarray<int> &histogram);
+ };
+
+}
+
+#endif /* GLOBALHISTOGRAMBINARIZER_H_ */
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/GridSampler.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/GridSampler.cpp
new file mode 100644
index 0000000..06bb602
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/GridSampler.cpp
@@ -0,0 +1,101 @@
+/*
+ * GridSampler.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 18/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/GridSampler.h>
+#include <zxing/common/PerspectiveTransform.h>
+#include <zxing/ReaderException.h>
+#include <iostream>
+#include <sstream>
+
+namespace zxing {
+using namespace std;
+
+GridSampler GridSampler::gridSampler;
+
+GridSampler::GridSampler() {
+}
+
+Ref<BitMatrix> GridSampler::sampleGrid(Ref<BitMatrix> image, int dimension, Ref<PerspectiveTransform> transform) {
+ Ref<BitMatrix> bits(new BitMatrix(dimension));
+ valarray<float> points((const float)0.0f, dimension << 1);
+ for (int y = 0; y < dimension; y++) {
+ int max = points.size();
+ float yValue = (float)y + 0.5f;
+ for (int x = 0; x < max; x += 2) {
+ points[x] = (float)(x >> 1) + 0.5f;
+ points[x + 1] = yValue;
+ }
+ transform->transformPoints(points);
+ checkAndNudgePoints(image, points);
+ for (int x = 0; x < max; x += 2) {
+ if (image->get((int)points[x], (int)points[x + 1])) {
+ bits->set(x >> 1, y);
+ }
+ }
+ }
+ return bits;
+}
+
+Ref<BitMatrix> GridSampler::sampleGrid(Ref<BitMatrix> image, int dimension, float p1ToX, float p1ToY, float p2ToX,
+ float p2ToY, float p3ToX, float p3ToY, float p4ToX, float p4ToY, float p1FromX, float p1FromY, float p2FromX,
+ float p2FromY, float p3FromX, float p3FromY, float p4FromX, float p4FromY) {
+ Ref<PerspectiveTransform> transform(PerspectiveTransform::quadrilateralToQuadrilateral(p1ToX, p1ToY, p2ToX, p2ToY,
+ p3ToX, p3ToY, p4ToX, p4ToY, p1FromX, p1FromY, p2FromX, p2FromY, p3FromX, p3FromY, p4FromX, p4FromY));
+
+ return sampleGrid(image, dimension, transform);
+
+}
+
+void GridSampler::checkAndNudgePoints(Ref<BitMatrix> image, valarray<float> &points) {
+ int width = image->getWidth();
+ int height = image->getHeight();
+
+
+ // The Java code assumes that if the start and end points are in bounds, the rest will also be.
+ // However, in some unusual cases points in the middle may also be out of bounds.
+ // Since we can't rely on an ArrayIndexOutOfBoundsException like Java, we check every point.
+
+ for (size_t offset = 0; offset < points.size(); offset += 2) {
+ int x = (int)points[offset];
+ int y = (int)points[offset + 1];
+ if (x < -1 || x > width || y < -1 || y > height) {
+ ostringstream s;
+ s << "Transformed point out of bounds at " << x << "," << y;
+ throw ReaderException(s.str().c_str());
+ }
+
+ if (x == -1) {
+ points[offset] = 0.0f;
+ } else if (x == width) {
+ points[offset] = width - 1;
+ }
+ if (y == -1) {
+ points[offset + 1] = 0.0f;
+ } else if (y == height) {
+ points[offset + 1] = height - 1;
+ }
+ }
+
+}
+
+GridSampler &GridSampler::getInstance() {
+ return gridSampler;
+}
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/GridSampler.h b/symbian/ZXingBarcodeReader/group/zxing/common/GridSampler.h
new file mode 100644
index 0000000..3dd577d
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/GridSampler.h
@@ -0,0 +1,44 @@
+#ifndef __GRID_SAMPLER_H__
+#define __GRID_SAMPLER_H__
+
+/*
+ * GridSampler.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 18/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/Counted.h>
+#include <zxing/common/BitMatrix.h>
+#include <zxing/common/PerspectiveTransform.h>
+
+namespace zxing {
+class GridSampler {
+private:
+ static GridSampler gridSampler;
+ GridSampler();
+
+public:
+ Ref<BitMatrix> sampleGrid(Ref<BitMatrix> image, int dimension, Ref<PerspectiveTransform> transform);
+ Ref<BitMatrix> sampleGrid(Ref<BitMatrix> image, int dimension, float p1ToX, float p1ToY, float p2ToX, float p2ToY,
+ float p3ToX, float p3ToY, float p4ToX, float p4ToY, float p1FromX, float p1FromY, float p2FromX,
+ float p2FromY, float p3FromX, float p3FromY, float p4FromX, float p4FromY);
+ static void checkAndNudgePoints(Ref<BitMatrix> image, std::valarray<float> &points);
+ static GridSampler &getInstance();
+};
+}
+
+#endif // __GRID_SAMPLER_H__
diff --git a/cpp/core/src/zxing/common/IllegalArgumentException.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/IllegalArgumentException.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/IllegalArgumentException.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/IllegalArgumentException.cpp
diff --git a/cpp/core/src/zxing/common/IllegalArgumentException.h b/symbian/ZXingBarcodeReader/group/zxing/common/IllegalArgumentException.h
similarity index 100%
copy from cpp/core/src/zxing/common/IllegalArgumentException.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/IllegalArgumentException.h
diff --git a/cpp/core/src/zxing/common/LocalBlockBinarizer.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/LocalBlockBinarizer.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/LocalBlockBinarizer.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/LocalBlockBinarizer.cpp
diff --git a/cpp/core/src/zxing/common/LocalBlockBinarizer.h b/symbian/ZXingBarcodeReader/group/zxing/common/LocalBlockBinarizer.h
similarity index 100%
copy from cpp/core/src/zxing/common/LocalBlockBinarizer.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/LocalBlockBinarizer.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/PerspectiveTransform.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/PerspectiveTransform.cpp
new file mode 100644
index 0000000..44d9ddc
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/PerspectiveTransform.cpp
@@ -0,0 +1,121 @@
+/*
+ * PerspectiveTransform.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 12/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/PerspectiveTransform.h>
+
+namespace zxing {
+using namespace std;
+
+PerspectiveTransform::PerspectiveTransform(float a11, float a21, float a31, float a12, float a22, float a32, float a13,
+ float a23, float a33) {
+ this->a11 = a11;
+ this->a12 = a12;
+ this->a13 = a13;
+ this->a21 = a21;
+ this->a22 = a22;
+ this->a23 = a23;
+ this->a31 = a31;
+ this->a32 = a32;
+ this->a33 = a33;
+}
+
+Ref<PerspectiveTransform> PerspectiveTransform::quadrilateralToQuadrilateral(float x0, float y0, float x1, float y1,
+ float x2, float y2, float x3, float y3, float x0p, float y0p, float x1p, float y1p, float x2p, float y2p,
+ float x3p, float y3p) {
+ Ref<PerspectiveTransform> qToS = PerspectiveTransform::quadrilateralToSquare(x0, y0, x1, y1, x2, y2, x3, y3);
+ Ref<PerspectiveTransform> sToQ =
+ PerspectiveTransform::squareToQuadrilateral(x0p, y0p, x1p, y1p, x2p, y2p, x3p, y3p);
+ return sToQ->times(qToS);
+}
+
+Ref<PerspectiveTransform> PerspectiveTransform::squareToQuadrilateral(float x0, float y0, float x1, float y1, float x2,
+ float y2, float x3, float y3) {
+ float dy2 = y3 - y2;
+ float dy3 = y0 - y1 + y2 - y3;
+ if (dy2 == 0.0f && dy3 == 0.0f) {
+ Ref<PerspectiveTransform> result(new PerspectiveTransform(x1 - x0, x2 - x1, x0, y1 - y0, y2 - y1, y0, 0.0f,
+ 0.0f, 1.0f));
+ return result;
+ } else {
+ float dx1 = x1 - x2;
+ float dx2 = x3 - x2;
+ float dx3 = x0 - x1 + x2 - x3;
+ float dy1 = y1 - y2;
+ float denominator = dx1 * dy2 - dx2 * dy1;
+ float a13 = (dx3 * dy2 - dx2 * dy3) / denominator;
+ float a23 = (dx1 * dy3 - dx3 * dy1) / denominator;
+ Ref<PerspectiveTransform> result(new PerspectiveTransform(x1 - x0 + a13 * x1, x3 - x0 + a23 * x3, x0, y1 - y0
+ + a13 * y1, y3 - y0 + a23 * y3, y0, a13, a23, 1.0f));
+ return result;
+ }
+}
+
+Ref<PerspectiveTransform> PerspectiveTransform::quadrilateralToSquare(float x0, float y0, float x1, float y1, float x2,
+ float y2, float x3, float y3) {
+ // Here, the adjoint serves as the inverse:
+ return squareToQuadrilateral(x0, y0, x1, y1, x2, y2, x3, y3)->buildAdjoint();
+}
+
+Ref<PerspectiveTransform> PerspectiveTransform::buildAdjoint() {
+ // Adjoint is the transpose of the cofactor matrix:
+ Ref<PerspectiveTransform> result(new PerspectiveTransform(a22 * a33 - a23 * a32, a23 * a31 - a21 * a33, a21 * a32
+ - a22 * a31, a13 * a32 - a12 * a33, a11 * a33 - a13 * a31, a12 * a31 - a11 * a32, a12 * a23 - a13 * a22,
+ a13 * a21 - a11 * a23, a11 * a22 - a12 * a21));
+ return result;
+}
+
+Ref<PerspectiveTransform> PerspectiveTransform::times(Ref<PerspectiveTransform> other) {
+ Ref<PerspectiveTransform> result(new PerspectiveTransform(a11 * other->a11 + a21 * other->a12 + a31 * other->a13,
+ a11 * other->a21 + a21 * other->a22 + a31 * other->a23, a11 * other->a31 + a21 * other->a32 + a31
+ * other->a33, a12 * other->a11 + a22 * other->a12 + a32 * other->a13, a12 * other->a21 + a22
+ * other->a22 + a32 * other->a23, a12 * other->a31 + a22 * other->a32 + a32 * other->a33, a13
+ * other->a11 + a23 * other->a12 + a33 * other->a13, a13 * other->a21 + a23 * other->a22 + a33
+ * other->a23, a13 * other->a31 + a23 * other->a32 + a33 * other->a33));
+ return result;
+}
+
+void PerspectiveTransform::transformPoints(valarray<float> &points) {
+ int max = points.size();
+ float a11 = this->a11;
+ float a12 = this->a12;
+ float a13 = this->a13;
+ float a21 = this->a21;
+ float a22 = this->a22;
+ float a23 = this->a23;
+ float a31 = this->a31;
+ float a32 = this->a32;
+ float a33 = this->a33;
+ for (int i = 0; i < max; i += 2) {
+ float x = points[i];
+ float y = points[i + 1];
+ float denominator = a13 * x + a23 * y + a33;
+ points[i] = (a11 * x + a21 * y + a31) / denominator;
+ points[i + 1] = (a12 * x + a22 * y + a32) / denominator;
+ }
+}
+
+ostream& operator<<(ostream& out, PerspectiveTransform &pt) {
+ out << pt.a11 << ", " << pt.a12 << ", " << pt.a13 << ", \n";
+ out << pt.a21 << ", " << pt.a22 << ", " << pt.a23 << ", \n";
+ out << pt.a31 << ", " << pt.a32 << ", " << pt.a33 << "\n";
+ return out;
+}
+
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/PerspectiveTransform.h b/symbian/ZXingBarcodeReader/group/zxing/common/PerspectiveTransform.h
new file mode 100644
index 0000000..581f928
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/PerspectiveTransform.h
@@ -0,0 +1,50 @@
+#ifndef __PERSPECTIVE_TANSFORM_H__
+#define __PERSPECTIVE_TANSFORM_H__
+
+/*
+ * PerspectiveTransform.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 12/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/Counted.h>
+#include <valarray>
+
+namespace zxing {
+class PerspectiveTransform : public Counted {
+private:
+ float a11, a12, a13, a21, a22, a23, a31, a32, a33;
+ PerspectiveTransform(float a11, float a21, float a31, float a12, float a22, float a32, float a13, float a23,
+ float a33);
+
+public:
+ static Ref<PerspectiveTransform>
+ quadrilateralToQuadrilateral(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3,
+ float x0p, float y0p, float x1p, float y1p, float x2p, float y2p, float x3p, float y3p);
+ static Ref<PerspectiveTransform> squareToQuadrilateral(float x0, float y0, float x1, float y1, float x2, float y2,
+ float x3, float y3);
+ static Ref<PerspectiveTransform> quadrilateralToSquare(float x0, float y0, float x1, float y1, float x2, float y2,
+ float x3, float y3);
+ Ref<PerspectiveTransform> buildAdjoint();
+ Ref<PerspectiveTransform> times(Ref<PerspectiveTransform> other);
+ void transformPoints(std::valarray<float> &points);
+
+ friend std::ostream& operator<<(std::ostream& out, PerspectiveTransform &pt);
+};
+}
+
+#endif // __PERSPECTIVE_TANSFORM_H__
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/Point.h b/symbian/ZXingBarcodeReader/group/zxing/common/Point.h
new file mode 100644
index 0000000..a391042
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/Point.h
@@ -0,0 +1,47 @@
+/*
+ * Point.h
+ * zxing
+ *
+ * Created by Ralf Kistner on 7/12/2009.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ZXING_POINT_H_
+#define ZXING_POINT_H_
+
+namespace zxing {
+class PointI {
+public:
+ int x;
+ int y;
+};
+
+class Point {
+public:
+ Point(float x_, float y_) : x(x_), y(y_) {};
+
+ float x;
+ float y;
+};
+
+class Line {
+public:
+ Line(Point start_, Point end_) : start(start_), end(end_) {};
+
+ Point start;
+ Point end;
+};
+}
+#endif // POINT_H_
diff --git a/cpp/core/src/zxing/common/Str.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/Str.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/Str.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/Str.cpp
diff --git a/cpp/core/src/zxing/common/Str.h b/symbian/ZXingBarcodeReader/group/zxing/common/Str.h
similarity index 100%
copy from cpp/core/src/zxing/common/Str.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/Str.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256.cpp
new file mode 100644
index 0000000..8add889
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256.cpp
@@ -0,0 +1,140 @@
+/*
+ * GF256.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 05/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <valarray>
+#include <vector>
+#include <iostream>
+#include <zxing/common/reedsolomon/GF256.h>
+#include <zxing/common/reedsolomon/GF256Poly.h>
+#include <zxing/common/IllegalArgumentException.h>
+#include <zxing/common/Array.h>
+#include <zxing/common/Counted.h>
+
+namespace zxing {
+using namespace std;
+
+static inline ArrayRef<int> makeArray(int value) {
+ ArrayRef<int> valuesRef(new Array<int> (value, 1));
+ return valuesRef;
+}
+
+static inline Ref<GF256Poly> refPoly(GF256 &field, int value) {
+ ArrayRef<int> values(makeArray(value));
+ Ref<GF256Poly> result(new GF256Poly(field, values));
+ return result;
+}
+
+GF256::GF256(int primitive) :
+ exp_((const int)0, 256), log_((const int)0, 256), zero_(refPoly(*this, 0)), one_(refPoly(*this, 1)) {
+ int x = 1;
+ for (int i = 0; i < 256; i++) {
+ exp_[i] = x;
+ x <<= 1;
+ if (x >= 0x100) {
+ x ^= primitive;
+ }
+ }
+
+ // log(0) == 0, but should never be used
+ log_[0] = 0;
+ for (int i = 0; i < 255; i++) {
+ log_[exp_[i]] = i;
+ }
+}
+
+Ref<GF256Poly> GF256::getZero() {
+ return zero_;
+}
+
+Ref<GF256Poly> GF256::getOne() {
+ return one_;
+}
+
+Ref<GF256Poly> GF256::buildMonomial(int degree, int coefficient) {
+#ifdef DEBUG
+ cout << __FUNCTION__ << "\n";
+#endif
+ if (degree < 0) {
+ throw IllegalArgumentException("Degree must be non-negative");
+ }
+ if (coefficient == 0) {
+ return zero_;
+ }
+ int nCoefficients = degree + 1;
+ ArrayRef<int> coefficients(new Array<int> (nCoefficients));
+ coefficients[0] = coefficient;
+ Ref<GF256Poly> result(new GF256Poly(*this, coefficients));
+ return result;
+}
+
+int GF256::addOrSubtract(int a, int b) {
+ return a ^ b;
+}
+
+int GF256::exp(int a) {
+ return exp_[a];
+}
+
+int GF256::log(int a) {
+ if (a == 0) {
+ throw IllegalArgumentException("Cannot take the logarithm of 0");
+ }
+ return log_[a];
+}
+
+int GF256::inverse(int a) {
+ if (a == 0) {
+ throw IllegalArgumentException("Cannot calculate the inverse of 0");
+ }
+ return exp_[255 - log_[a]];
+}
+
+int GF256::multiply(int a, int b) {
+ if (a == 0 || b == 0) {
+ return 0;
+ }
+ if (a == 1) {
+ return b;
+ }
+ if (b == 1) {
+ return a;
+ }
+ return exp_[(log_[a] + log_[b]) % 255];
+}
+
+GF256 GF256::QR_CODE_FIELD(0x011D); // x^8 + x^4 + x^3 + x^2 + 1
+GF256 GF256::DATA_MATRIX_FIELD(0x012D); // x^8 + x^5 + x^3 + x^2 + 1
+
+ostream& operator<<(ostream& out, const GF256& field) {
+ out << "Field[\nexp=(";
+ out << field.exp_[0];
+ for (int i = 1; i < 256; i++) {
+ out << "," << field.exp_[i];
+ }
+ out << "),\nlog=(";
+ out << field.log_[0];
+ for (int i = 1; i < 256; i++) {
+ out << "," << field.log_[i];
+ }
+ out << ")\n]";
+ return out;
+}
+
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256.h b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256.h
new file mode 100644
index 0000000..0930f63
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256.h
@@ -0,0 +1,69 @@
+#ifndef __GF256_H__
+#define __GF256_H__
+
+/*
+ * GF256.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 05/05/2008.
+ * Copyright 2008 Google UK. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <memory>
+#include <valarray>
+#include <zxing/common/Counted.h>
+
+namespace zxing {
+class GF256Poly;
+
+class GF256 {
+ /**
+ * <p>This class contains utility methods for performing mathematical
+ * operations over the Galois Field GF(256). Operations use a given
+ * primitive polynomial in calculations.</p>
+ *
+ * <p>Throughout this package, elements of GF(256) are represented as an
+ * <code>int</code> for convenience and speed (but at the cost of memory).
+ * Only the bottom 8 bits are really used.</p>
+ *
+ * @author srowen at google.com (Sean Owen)
+ * @author christian.brunschen at gmail.com (Christian Brunschen)
+ */
+private:
+ std::valarray<int> exp_;
+ std::valarray<int> log_;
+ Ref<GF256Poly> zero_;
+ Ref<GF256Poly> one_;
+
+ GF256(int primitive);
+
+public:
+ Ref<GF256Poly> getZero();
+ Ref<GF256Poly> getOne();
+ Ref<GF256Poly> buildMonomial(int degree, int coefficient);
+ static int addOrSubtract(int a, int b);
+ int exp(int a);
+ int log(int a);
+ int inverse(int a);
+ int multiply(int a, int b);
+
+ static GF256 QR_CODE_FIELD;
+ static GF256 DATA_MATRIX_FIELD;
+
+ friend std::ostream& operator<<(std::ostream& out, const GF256& field);
+};
+}
+
+#endif // __GF256_H__
diff --git a/cpp/core/src/zxing/common/reedsolomon/GF256Poly.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256Poly.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/reedsolomon/GF256Poly.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256Poly.cpp
diff --git a/cpp/core/src/zxing/common/reedsolomon/GF256Poly.h b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256Poly.h
similarity index 100%
copy from cpp/core/src/zxing/common/reedsolomon/GF256Poly.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/GF256Poly.h
diff --git a/cpp/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/ReedSolomonDecoder.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/ReedSolomonDecoder.cpp
diff --git a/cpp/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.h b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/ReedSolomonDecoder.h
similarity index 100%
copy from cpp/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/ReedSolomonDecoder.h
diff --git a/cpp/core/src/zxing/common/reedsolomon/ReedSolomonException.cpp b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/ReedSolomonException.cpp
similarity index 100%
copy from cpp/core/src/zxing/common/reedsolomon/ReedSolomonException.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/ReedSolomonException.cpp
diff --git a/cpp/core/src/zxing/common/reedsolomon/ReedSolomonException.h b/symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/ReedSolomonException.h
similarity index 100%
copy from cpp/core/src/zxing/common/reedsolomon/ReedSolomonException.h
copy to symbian/ZXingBarcodeReader/group/zxing/common/reedsolomon/ReedSolomonException.h
diff --git a/cpp/core/src/zxing/oned/Code128Reader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/Code128Reader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/Code128Reader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/Code128Reader.cpp
diff --git a/cpp/core/src/zxing/oned/Code128Reader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/Code128Reader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/Code128Reader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/Code128Reader.h
diff --git a/cpp/core/src/zxing/oned/Code39Reader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/Code39Reader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/Code39Reader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/Code39Reader.cpp
diff --git a/cpp/core/src/zxing/oned/Code39Reader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/Code39Reader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/Code39Reader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/Code39Reader.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/oned/EAN13Reader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/EAN13Reader.cpp
new file mode 100644
index 0000000..0e3de97
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/oned/EAN13Reader.cpp
@@ -0,0 +1,95 @@
+/*
+ * EAN13Reader.cpp
+ * ZXing
+ *
+ * Created by Lukasz Warchol on 10-01-22.
+ * Copyright 2010 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "EAN13Reader.h"
+#include <zxing/ReaderException.h>
+
+namespace zxing {
+ namespace oned {
+
+ static const int FIRST_DIGIT_ENCODINGS[10] = {0x00, 0x0B, 0x0D, 0xE, 0x13, 0x19, 0x1C, 0x15, 0x16, 0x1A};
+
+
+ EAN13Reader::EAN13Reader(){
+ decodeMiddleCounters = new int[4];
+ for (int i=0; i<4; i++) {
+ decodeMiddleCounters[i] = 0;
+ }
+ }
+
+ int EAN13Reader::decodeMiddle(Ref<BitArray> row, int startRange[], int startRangeLen, std::string& resultString){
+ int countersLen = 4;
+ int* counters = decodeMiddleCounters;
+ counters[0] = 0;
+ counters[1] = 0;
+ counters[2] = 0;
+ counters[3] = 0;
+
+
+ int end = row->getSize();
+ int rowOffset = startRange[1];
+
+ int lgPatternFound = 0;
+
+ for (int x = 0; x < 6 && rowOffset < end; x++) {
+ int bestMatch = decodeDigit(row, counters, countersLen, rowOffset, UPC_EAN_PATTERNS_L_AND_G_PATTERNS);
+ resultString.append(1, (char) ('0' + bestMatch % 10));
+ for (int i = 0; i < countersLen; i++) {
+ rowOffset += counters[i];
+ }
+ if (bestMatch >= 10) {
+ lgPatternFound |= 1 << (5 - x);
+ }
+ }
+
+ determineFirstDigit(resultString, lgPatternFound);
+
+ int* middleRange = findGuardPattern(row, rowOffset, true, (int*)getMIDDLE_PATTERN(), getMIDDLE_PATTERN_LEN());
+ rowOffset = middleRange[1];
+
+ for (int x = 0; x < 6 && rowOffset < end; x++) {
+ int bestMatch = decodeDigit(row, counters, countersLen, rowOffset, UPC_EAN_PATTERNS_L_PATTERNS);
+ resultString.append(1, (char) ('0' + bestMatch));
+ for (int i = 0; i < countersLen; i++) {
+ rowOffset += counters[i];
+ }
+ }
+
+ return rowOffset;
+ }
+
+ void EAN13Reader::determineFirstDigit(std::string& resultString, int lgPatternFound){
+ for (int d = 0; d < 10; d++) {
+ if (lgPatternFound == FIRST_DIGIT_ENCODINGS[d]) {
+ resultString.insert((size_t)0, (size_t)1, (char) ('0' + d));
+ return;
+ }
+ }
+ throw ReaderException("determineFirstDigit");
+ }
+
+ BarcodeFormat EAN13Reader::getBarcodeFormat(){
+ return BarcodeFormat_EAN_13;
+ }
+ EAN13Reader::~EAN13Reader(){
+ delete [] decodeMiddleCounters;
+ }
+ }
+}
diff --git a/cpp/core/src/zxing/oned/EAN13Reader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/EAN13Reader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/EAN13Reader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/EAN13Reader.h
diff --git a/cpp/core/src/zxing/oned/EAN8Reader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/EAN8Reader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/EAN8Reader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/EAN8Reader.cpp
diff --git a/cpp/core/src/zxing/oned/EAN8Reader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/EAN8Reader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/EAN8Reader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/EAN8Reader.h
diff --git a/cpp/core/src/zxing/oned/ITFReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/ITFReader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/ITFReader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/ITFReader.cpp
diff --git a/cpp/core/src/zxing/oned/ITFReader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/ITFReader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/ITFReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/ITFReader.h
diff --git a/cpp/core/src/zxing/oned/MultiFormatOneDReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/MultiFormatOneDReader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/MultiFormatOneDReader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/MultiFormatOneDReader.cpp
diff --git a/cpp/core/src/zxing/oned/MultiFormatOneDReader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/MultiFormatOneDReader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/MultiFormatOneDReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/MultiFormatOneDReader.h
diff --git a/cpp/core/src/zxing/oned/MultiFormatUPCEANReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/MultiFormatUPCEANReader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/MultiFormatUPCEANReader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/MultiFormatUPCEANReader.cpp
diff --git a/cpp/core/src/zxing/oned/MultiFormatUPCEANReader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/MultiFormatUPCEANReader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/MultiFormatUPCEANReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/MultiFormatUPCEANReader.h
diff --git a/cpp/core/src/zxing/oned/OneDReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/OneDReader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/OneDReader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/OneDReader.cpp
diff --git a/cpp/core/src/zxing/oned/OneDReader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/OneDReader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/OneDReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/OneDReader.h
diff --git a/cpp/core/src/zxing/oned/OneDResultPoint.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/OneDResultPoint.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/OneDResultPoint.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/OneDResultPoint.cpp
diff --git a/cpp/core/src/zxing/oned/OneDResultPoint.h b/symbian/ZXingBarcodeReader/group/zxing/oned/OneDResultPoint.h
similarity index 100%
copy from cpp/core/src/zxing/oned/OneDResultPoint.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/OneDResultPoint.h
diff --git a/cpp/core/src/zxing/oned/UPCAReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/UPCAReader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/UPCAReader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/UPCAReader.cpp
diff --git a/cpp/core/src/zxing/oned/UPCAReader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/UPCAReader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/UPCAReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/UPCAReader.h
diff --git a/cpp/core/src/zxing/oned/UPCEANReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/UPCEANReader.cpp
similarity index 100%
copy from cpp/core/src/zxing/oned/UPCEANReader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/oned/UPCEANReader.cpp
diff --git a/cpp/core/src/zxing/oned/UPCEANReader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/UPCEANReader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/UPCEANReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/UPCEANReader.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/oned/UPCEReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/oned/UPCEReader.cpp
new file mode 100644
index 0000000..3738d4c
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/oned/UPCEReader.cpp
@@ -0,0 +1,150 @@
+/*
+ * UPCEReader.cpp
+ * ZXing
+ *
+ * Created by Lukasz Warchol on 10-01-26.
+ * Copyright 2010 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "UPCEReader.h"
+#include <zxing/ReaderException.h>
+
+namespace zxing {
+ namespace oned {
+
+ /**
+ * The pattern that marks the middle, and end, of a UPC-E pattern.
+ * There is no "second half" to a UPC-E barcode.
+ */
+ static const int MIDDLE_END_PATTERN[6] = {1, 1, 1, 1, 1, 1};
+
+ /**
+ * See {@link #L_AND_G_PATTERNS}; these values similarly represent patterns of
+ * even-odd parity encodings of digits that imply both the number system (0 or 1)
+ * used, and the check digit.
+ */
+ static const int NUMSYS_AND_CHECK_DIGIT_PATTERNS[2][10] = {
+ {0x38, 0x34, 0x32, 0x31, 0x2C, 0x26, 0x23, 0x2A, 0x29, 0x25},
+ {0x07, 0x0B, 0x0D, 0x0E, 0x13, 0x19, 0x1C, 0x15, 0x16, 0x1A}
+ };
+
+ UPCEReader::UPCEReader(){
+ decodeMiddleCounters = new int[4];
+ for (int i=0; i<4; i++) {
+ decodeMiddleCounters[i] = 0;
+ }
+ }
+
+ int UPCEReader::decodeMiddle(Ref<BitArray> row, int startRange[], int startRangeLen, std::string& resultString){
+ int countersLen = 4;
+ int* counters = decodeMiddleCounters;
+ counters[0] = 0;
+ counters[1] = 0;
+ counters[2] = 0;
+ counters[3] = 0;
+
+
+ int end = row->getSize();
+ int rowOffset = startRange[1];
+
+ int lgPatternFound = 0;
+
+ for (int x = 0; x < 6 && rowOffset < end; x++) {
+ int bestMatch = decodeDigit(row, counters, countersLen, rowOffset, UPC_EAN_PATTERNS_L_AND_G_PATTERNS);
+ resultString.append(1, (char) ('0' + bestMatch % 10));
+ for (int i = 0; i < countersLen; i++) {
+ rowOffset += counters[i];
+ }
+ if (bestMatch >= 10) {
+ lgPatternFound |= 1 << (5 - x);
+ }
+ }
+
+ determineNumSysAndCheckDigit(resultString, lgPatternFound);
+
+ return rowOffset;
+ }
+
+ int* UPCEReader::decodeEnd(Ref<BitArray> row, int endStart){
+ return findGuardPattern(row, endStart, true, MIDDLE_END_PATTERN, sizeof(MIDDLE_END_PATTERN)/sizeof(int));
+ }
+
+ bool UPCEReader::checkChecksum(std::string s){
+ return UPCEANReader::checkChecksum(convertUPCEtoUPCA(s));
+ }
+
+
+ void UPCEReader::determineNumSysAndCheckDigit(std::string& resultString, int lgPatternFound){
+ for (int numSys = 0; numSys <= 1; numSys++) {
+ for (int d = 0; d < 10; d++) {
+ if (lgPatternFound == NUMSYS_AND_CHECK_DIGIT_PATTERNS[numSys][d]) {
+ resultString.insert((size_t)0, (size_t)1, (char) ('0' + numSys));
+ resultString.append(1, (char) ('0' + d));
+ return;
+ }
+ }
+ }
+ throw ReaderException("determineNumSysAndCheckDigit exception");
+ }
+
+ /**
+ * Expands a UPC-E value back into its full, equivalent UPC-A code value.
+ *
+ * @param upce UPC-E code as string of digits
+ * @return equivalent UPC-A code as string of digits
+ */
+ std::string& UPCEReader::convertUPCEtoUPCA(std::string upce) {
+ std::string result;
+ result.append(1, upce[0]);
+ char lastChar = upce[6];
+ switch (lastChar) {
+ case '0':
+ case '1':
+ case '2':
+ result.append(upce.substr(1,2));
+ result.append(1, lastChar);
+ result.append("0000");
+ result.append(upce.substr(3,3));
+ break;
+ case '3':
+ result.append(upce.substr(1,3));
+ result.append("00000");
+ result.append(upce.substr(4,2));
+ break;
+ case '4':
+ result.append(upce.substr(1,4));
+ result.append("00000");
+ result.append(1, upce[5]);
+ break;
+ default:
+ result.append(upce.substr(1,5));
+ result.append("0000");
+ result.append(1, lastChar);
+ break;
+ }
+ result.append(1, upce[7]);
+ std::string& returnResult = result;
+ return returnResult;
+ }
+
+
+ BarcodeFormat UPCEReader::getBarcodeFormat(){
+ return BarcodeFormat_UPC_E;
+ }
+ UPCEReader::~UPCEReader(){
+ delete [] decodeMiddleCounters;
+ }
+ }
+}
diff --git a/cpp/core/src/zxing/oned/UPCEReader.h b/symbian/ZXingBarcodeReader/group/zxing/oned/UPCEReader.h
similarity index 100%
copy from cpp/core/src/zxing/oned/UPCEReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/oned/UPCEReader.h
diff --git a/cpp/core/src/zxing/qrcode/ErrorCorrectionLevel.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/ErrorCorrectionLevel.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/ErrorCorrectionLevel.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/ErrorCorrectionLevel.cpp
diff --git a/cpp/core/src/zxing/qrcode/ErrorCorrectionLevel.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/ErrorCorrectionLevel.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/ErrorCorrectionLevel.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/ErrorCorrectionLevel.h
diff --git a/cpp/core/src/zxing/qrcode/FormatInformation.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/FormatInformation.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/FormatInformation.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/FormatInformation.cpp
diff --git a/cpp/core/src/zxing/qrcode/FormatInformation.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/FormatInformation.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/FormatInformation.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/FormatInformation.h
diff --git a/cpp/core/src/zxing/qrcode/QRCodeReader.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/QRCodeReader.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/QRCodeReader.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/QRCodeReader.cpp
diff --git a/cpp/core/src/zxing/qrcode/QRCodeReader.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/QRCodeReader.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/QRCodeReader.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/QRCodeReader.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/Version.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/Version.cpp
new file mode 100644
index 0000000..5e63c82
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/Version.cpp
@@ -0,0 +1,559 @@
+/*
+ * Version.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 14/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/qrcode/Version.h>
+#include <zxing/qrcode/FormatInformation.h>
+#include <cstdarg>
+#include <limits>
+#include <iostream>
+
+namespace zxing {
+namespace qrcode {
+using namespace std;
+
+ECB::ECB(int count, int dataCodewords) :
+ count_(count), dataCodewords_(dataCodewords) {
+}
+
+int ECB::getCount() {
+ return count_;
+}
+
+int ECB::getDataCodewords() {
+ return dataCodewords_;
+}
+
+ECBlocks::ECBlocks(int ecCodewords, ECB *ecBlocks) :
+ ecCodewords_(ecCodewords) {
+ ecBlocks_.push_back(ecBlocks);
+}
+
+ECBlocks::ECBlocks(int ecCodewords, ECB *ecBlocks1, ECB *ecBlocks2) :
+ ecCodewords_(ecCodewords) {
+ ecBlocks_.push_back(ecBlocks1);
+ ecBlocks_.push_back(ecBlocks2);
+}
+
+int ECBlocks::getECCodewords() {
+ return ecCodewords_;
+}
+
+std::vector<ECB*>& ECBlocks::getECBlocks() {
+ return ecBlocks_;
+}
+
+ECBlocks::~ECBlocks() {
+ for (size_t i = 0; i < ecBlocks_.size(); i++) {
+ delete ecBlocks_[i];
+ }
+}
+
+unsigned int Version::VERSION_DECODE_INFO[] = { 0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6, 0x0C762, 0x0D847, 0x0E60D,
+ 0x0F928, 0x10B78, 0x1145D, 0x12A17, 0x13532, 0x149A6, 0x15683, 0x168C9, 0x177EC, 0x18EC4, 0x191E1, 0x1AFAB,
+ 0x1B08E, 0x1CC1A, 0x1D33F, 0x1ED75, 0x1F250, 0x209D5, 0x216F0, 0x228BA, 0x2379F, 0x24B0B, 0x2542E, 0x26A64,
+ 0x27541, 0x28C69
+ };
+int Version::N_VERSION_DECODE_INFOS = 34;
+vector<Ref<Version> > Version::VERSIONS;
+static int N_VERSIONS = Version::buildVersions();
+
+int Version::getVersionNumber() {
+ return versionNumber_;
+}
+
+valarray<int> &Version::getAlignmentPatternCenters() {
+ return alignmentPatternCenters_;
+}
+
+int Version::getTotalCodewords() {
+ return totalCodewords_;
+}
+
+int Version::getDimensionForVersion() {
+ return 17 + 4 * versionNumber_;
+}
+
+ECBlocks& Version::getECBlocksForLevel(ErrorCorrectionLevel &ecLevel) {
+ return *ecBlocks_[ecLevel.ordinal()];
+}
+
+Version *Version::getProvisionalVersionForDimension(int dimension) {
+ if (dimension % 4 != 1) {
+ throw ReaderException("Dimension must be 1 mod 4");
+ }
+ return Version::getVersionForNumber((dimension - 17) >> 2);
+}
+
+Version *Version::getVersionForNumber(int versionNumber) {
+ if (versionNumber < 1 || versionNumber > 40) {
+ throw ReaderException("versionNumber must be between 1 and 40");
+ }
+
+ return VERSIONS[versionNumber - 1];
+}
+
+Version::Version(int versionNumber, valarray<int> *alignmentPatternCenters, ECBlocks *ecBlocks1, ECBlocks *ecBlocks2,
+ ECBlocks *ecBlocks3, ECBlocks *ecBlocks4) :
+ versionNumber_(versionNumber), alignmentPatternCenters_(*alignmentPatternCenters), ecBlocks_(4) {
+ ecBlocks_[0] = ecBlocks1;
+ ecBlocks_[1] = ecBlocks2;
+ ecBlocks_[2] = ecBlocks3;
+ ecBlocks_[3] = ecBlocks4;
+
+ int total = 0;
+ int ecCodewords = ecBlocks1->getECCodewords();
+ vector<ECB*> &ecbArray = ecBlocks1->getECBlocks();
+ for (size_t i = 0; i < ecbArray.size(); i++) {
+ ECB *ecBlock = ecbArray[i];
+ total += ecBlock->getCount() * (ecBlock->getDataCodewords() + ecCodewords);
+ }
+ totalCodewords_ = total;
+}
+
+Version::~Version() {
+ delete &alignmentPatternCenters_;
+ for (size_t i = 0; i < ecBlocks_.size(); i++) {
+ delete ecBlocks_[i];
+ }
+}
+
+Version *Version::decodeVersionInformation(unsigned int versionBits) {
+ int bestDifference = numeric_limits<int>::max();
+ size_t bestVersion = 0;
+ for (int i = 0; i < N_VERSION_DECODE_INFOS; i++) {
+ unsigned targetVersion = VERSION_DECODE_INFO[i];
+ // Do the version info bits match exactly? done.
+ if (targetVersion == versionBits) {
+ return getVersionForNumber(i + 7);
+ }
+ // Otherwise see if this is the closest to a real version info bit
+ // string we have seen so far
+ int bitsDifference = FormatInformation::numBitsDiffering(versionBits, targetVersion);
+ if (bitsDifference < bestDifference) {
+ bestVersion = i + 7;
+ bestDifference = bitsDifference;
+ }
+ }
+ // We can tolerate up to 3 bits of error since no two version info codewords will
+ // differ in less than 4 bits.
+ if (bestDifference <= 3) {
+ return getVersionForNumber(bestVersion);
+ }
+ // If we didn't find a close enough match, fail
+ return 0;
+}
+
+Ref<BitMatrix> Version::buildFunctionPattern() {
+ int dimension = getDimensionForVersion();
+ Ref<BitMatrix> functionPattern(new BitMatrix(dimension));
+
+
+ // Top left finder pattern + separator + format
+ functionPattern->setRegion(0, 0, 9, 9);
+ // Top right finder pattern + separator + format
+ functionPattern->setRegion(dimension - 8, 0, 8, 9);
+ // Bottom left finder pattern + separator + format
+ functionPattern->setRegion(0, dimension - 8, 9, 8);
+
+
+ // Alignment patterns
+ size_t max = alignmentPatternCenters_.size();
+ for (size_t x = 0; x < max; x++) {
+ int i = alignmentPatternCenters_[x] - 2;
+ for (size_t y = 0; y < max; y++) {
+ if ((x == 0 && (y == 0 || y == max - 1)) || (x == max - 1 && y == 0)) {
+ // No alignment patterns near the three finder patterns
+ continue;
+ }
+ functionPattern->setRegion(alignmentPatternCenters_[y] - 2, i, 5, 5);
+ }
+ }
+
+ // Vertical timing pattern
+ functionPattern->setRegion(6, 9, 1, dimension - 17);
+ // Horizontal timing pattern
+ functionPattern->setRegion(9, 6, dimension - 17, 1);
+
+ if (versionNumber_ > 6) {
+ // Version info, top right
+ functionPattern->setRegion(dimension - 11, 0, 3, 6);
+ // Version info, bottom left
+ functionPattern->setRegion(0, dimension - 11, 6, 3);
+ }
+
+
+ //#ifdef DEBUG
+ // cout << "version " << versionNumber_ << " built function pattern:\n";
+ // cout << *functionPattern;
+ //#endif
+
+ return functionPattern;
+}
+
+static valarray<int> *intArray(size_t n...) {
+ va_list ap;
+ va_start(ap, n);
+ valarray<int> *result = new valarray<int>(n);
+ for (size_t i = 0; i < n; i++) {
+ (*result)[i] = va_arg(ap, int);
+ }
+ va_end(ap);
+ return result;
+}
+
+int Version::buildVersions() {
+ VERSIONS.push_back(Ref<Version>(new Version(1, intArray(0),
+ new ECBlocks(7, new ECB(1, 19)),
+ new ECBlocks(10, new ECB(1, 16)),
+ new ECBlocks(13, new ECB(1, 13)),
+ new ECBlocks(17, new ECB(1, 9)))));
+ VERSIONS.push_back(Ref<Version>(new Version(2, intArray(2, 6, 18),
+ new ECBlocks(10, new ECB(1, 34)),
+ new ECBlocks(16, new ECB(1, 28)),
+ new ECBlocks(22, new ECB(1, 22)),
+ new ECBlocks(28, new ECB(1, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(3, intArray(2, 6, 22),
+ new ECBlocks(15, new ECB(1, 55)),
+ new ECBlocks(26, new ECB(1, 44)),
+ new ECBlocks(18, new ECB(2, 17)),
+ new ECBlocks(22, new ECB(2, 13)))));
+ VERSIONS.push_back(Ref<Version>(new Version(4, intArray(2, 6, 26),
+ new ECBlocks(20, new ECB(1, 80)),
+ new ECBlocks(18, new ECB(2, 32)),
+ new ECBlocks(26, new ECB(2, 24)),
+ new ECBlocks(16, new ECB(4, 9)))));
+ VERSIONS.push_back(Ref<Version>(new Version(5, intArray(2, 6, 30),
+ new ECBlocks(26, new ECB(1, 108)),
+ new ECBlocks(24, new ECB(2, 43)),
+ new ECBlocks(18, new ECB(2, 15),
+ new ECB(2, 16)),
+ new ECBlocks(22, new ECB(2, 11),
+ new ECB(2, 12)))));
+ VERSIONS.push_back(Ref<Version>(new Version(6, intArray(2, 6, 34),
+ new ECBlocks(18, new ECB(2, 68)),
+ new ECBlocks(16, new ECB(4, 27)),
+ new ECBlocks(24, new ECB(4, 19)),
+ new ECBlocks(28, new ECB(4, 15)))));
+ VERSIONS.push_back(Ref<Version>(new Version(7, intArray(3, 6, 22, 38),
+ new ECBlocks(20, new ECB(2, 78)),
+ new ECBlocks(18, new ECB(4, 31)),
+ new ECBlocks(18, new ECB(2, 14),
+ new ECB(4, 15)),
+ new ECBlocks(26, new ECB(4, 13),
+ new ECB(1, 14)))));
+ VERSIONS.push_back(Ref<Version>(new Version(8, intArray(3, 6, 24, 42),
+ new ECBlocks(24, new ECB(2, 97)),
+ new ECBlocks(22, new ECB(2, 38),
+ new ECB(2, 39)),
+ new ECBlocks(22, new ECB(4, 18),
+ new ECB(2, 19)),
+ new ECBlocks(26, new ECB(4, 14),
+ new ECB(2, 15)))));
+ VERSIONS.push_back(Ref<Version>(new Version(9, intArray(3, 6, 26, 46),
+ new ECBlocks(30, new ECB(2, 116)),
+ new ECBlocks(22, new ECB(3, 36),
+ new ECB(2, 37)),
+ new ECBlocks(20, new ECB(4, 16),
+ new ECB(4, 17)),
+ new ECBlocks(24, new ECB(4, 12),
+ new ECB(4, 13)))));
+ VERSIONS.push_back(Ref<Version>(new Version(10, intArray(3, 6, 28, 50),
+ new ECBlocks(18, new ECB(2, 68),
+ new ECB(2, 69)),
+ new ECBlocks(26, new ECB(4, 43),
+ new ECB(1, 44)),
+ new ECBlocks(24, new ECB(6, 19),
+ new ECB(2, 20)),
+ new ECBlocks(28, new ECB(6, 15),
+ new ECB(2, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(11, intArray(3, 6, 30, 54),
+ new ECBlocks(20, new ECB(4, 81)),
+ new ECBlocks(30, new ECB(1, 50),
+ new ECB(4, 51)),
+ new ECBlocks(28, new ECB(4, 22),
+ new ECB(4, 23)),
+ new ECBlocks(24, new ECB(3, 12),
+ new ECB(8, 13)))));
+ VERSIONS.push_back(Ref<Version>(new Version(12, intArray(3, 6, 32, 58),
+ new ECBlocks(24, new ECB(2, 92),
+ new ECB(2, 93)),
+ new ECBlocks(22, new ECB(6, 36),
+ new ECB(2, 37)),
+ new ECBlocks(26, new ECB(4, 20),
+ new ECB(6, 21)),
+ new ECBlocks(28, new ECB(7, 14),
+ new ECB(4, 15)))));
+ VERSIONS.push_back(Ref<Version>(new Version(13, intArray(3, 6, 34, 62),
+ new ECBlocks(26, new ECB(4, 107)),
+ new ECBlocks(22, new ECB(8, 37),
+ new ECB(1, 38)),
+ new ECBlocks(24, new ECB(8, 20),
+ new ECB(4, 21)),
+ new ECBlocks(22, new ECB(12, 11),
+ new ECB(4, 12)))));
+ VERSIONS.push_back(Ref<Version>(new Version(14, intArray(4, 6, 26, 46, 66),
+ new ECBlocks(30, new ECB(3, 115),
+ new ECB(1, 116)),
+ new ECBlocks(24, new ECB(4, 40),
+ new ECB(5, 41)),
+ new ECBlocks(20, new ECB(11, 16),
+ new ECB(5, 17)),
+ new ECBlocks(24, new ECB(11, 12),
+ new ECB(5, 13)))));
+ VERSIONS.push_back(Ref<Version>(new Version(15, intArray(4, 6, 26, 48, 70),
+ new ECBlocks(22, new ECB(5, 87),
+ new ECB(1, 88)),
+ new ECBlocks(24, new ECB(5, 41),
+ new ECB(5, 42)),
+ new ECBlocks(30, new ECB(5, 24),
+ new ECB(7, 25)),
+ new ECBlocks(24, new ECB(11, 12),
+ new ECB(7, 13)))));
+ VERSIONS.push_back(Ref<Version>(new Version(16, intArray(4, 6, 26, 50, 74),
+ new ECBlocks(24, new ECB(5, 98),
+ new ECB(1, 99)),
+ new ECBlocks(28, new ECB(7, 45),
+ new ECB(3, 46)),
+ new ECBlocks(24, new ECB(15, 19),
+ new ECB(2, 20)),
+ new ECBlocks(30, new ECB(3, 15),
+ new ECB(13, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(17, intArray(4, 6, 30, 54, 78),
+ new ECBlocks(28, new ECB(1, 107),
+ new ECB(5, 108)),
+ new ECBlocks(28, new ECB(10, 46),
+ new ECB(1, 47)),
+ new ECBlocks(28, new ECB(1, 22),
+ new ECB(15, 23)),
+ new ECBlocks(28, new ECB(2, 14),
+ new ECB(17, 15)))));
+ VERSIONS.push_back(Ref<Version>(new Version(18, intArray(4, 6, 30, 56, 82),
+ new ECBlocks(30, new ECB(5, 120),
+ new ECB(1, 121)),
+ new ECBlocks(26, new ECB(9, 43),
+ new ECB(4, 44)),
+ new ECBlocks(28, new ECB(17, 22),
+ new ECB(1, 23)),
+ new ECBlocks(28, new ECB(2, 14),
+ new ECB(19, 15)))));
+ VERSIONS.push_back(Ref<Version>(new Version(19, intArray(4, 6, 30, 58, 86),
+ new ECBlocks(28, new ECB(3, 113),
+ new ECB(4, 114)),
+ new ECBlocks(26, new ECB(3, 44),
+ new ECB(11, 45)),
+ new ECBlocks(26, new ECB(17, 21),
+ new ECB(4, 22)),
+ new ECBlocks(26, new ECB(9, 13),
+ new ECB(16, 14)))));
+ VERSIONS.push_back(Ref<Version>(new Version(20, intArray(4, 6, 34, 62, 90),
+ new ECBlocks(28, new ECB(3, 107),
+ new ECB(5, 108)),
+ new ECBlocks(26, new ECB(3, 41),
+ new ECB(13, 42)),
+ new ECBlocks(30, new ECB(15, 24),
+ new ECB(5, 25)),
+ new ECBlocks(28, new ECB(15, 15),
+ new ECB(10, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(21, intArray(5, 6, 28, 50, 72, 94),
+ new ECBlocks(28, new ECB(4, 116),
+ new ECB(4, 117)),
+ new ECBlocks(26, new ECB(17, 42)),
+ new ECBlocks(28, new ECB(17, 22),
+ new ECB(6, 23)),
+ new ECBlocks(30, new ECB(19, 16),
+ new ECB(6, 17)))));
+ VERSIONS.push_back(Ref<Version>(new Version(22, intArray(5, 6, 26, 50, 74, 98),
+ new ECBlocks(28, new ECB(2, 111),
+ new ECB(7, 112)),
+ new ECBlocks(28, new ECB(17, 46)),
+ new ECBlocks(30, new ECB(7, 24),
+ new ECB(16, 25)),
+ new ECBlocks(24, new ECB(34, 13)))));
+ VERSIONS.push_back(Ref<Version>(new Version(23, intArray(5, 6, 30, 54, 74, 102),
+ new ECBlocks(30, new ECB(4, 121),
+ new ECB(5, 122)),
+ new ECBlocks(28, new ECB(4, 47),
+ new ECB(14, 48)),
+ new ECBlocks(30, new ECB(11, 24),
+ new ECB(14, 25)),
+ new ECBlocks(30, new ECB(16, 15),
+ new ECB(14, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(24, intArray(5, 6, 28, 54, 80, 106),
+ new ECBlocks(30, new ECB(6, 117),
+ new ECB(4, 118)),
+ new ECBlocks(28, new ECB(6, 45),
+ new ECB(14, 46)),
+ new ECBlocks(30, new ECB(11, 24),
+ new ECB(16, 25)),
+ new ECBlocks(30, new ECB(30, 16),
+ new ECB(2, 17)))));
+ VERSIONS.push_back(Ref<Version>(new Version(25, intArray(5, 6, 32, 58, 84, 110),
+ new ECBlocks(26, new ECB(8, 106),
+ new ECB(4, 107)),
+ new ECBlocks(28, new ECB(8, 47),
+ new ECB(13, 48)),
+ new ECBlocks(30, new ECB(7, 24),
+ new ECB(22, 25)),
+ new ECBlocks(30, new ECB(22, 15),
+ new ECB(13, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(26, intArray(5, 6, 30, 58, 86, 114),
+ new ECBlocks(28, new ECB(10, 114),
+ new ECB(2, 115)),
+ new ECBlocks(28, new ECB(19, 46),
+ new ECB(4, 47)),
+ new ECBlocks(28, new ECB(28, 22),
+ new ECB(6, 23)),
+ new ECBlocks(30, new ECB(33, 16),
+ new ECB(4, 17)))));
+ VERSIONS.push_back(Ref<Version>(new Version(27, intArray(5, 6, 34, 62, 90, 118),
+ new ECBlocks(30, new ECB(8, 122),
+ new ECB(4, 123)),
+ new ECBlocks(28, new ECB(22, 45),
+ new ECB(3, 46)),
+ new ECBlocks(30, new ECB(8, 23),
+ new ECB(26, 24)),
+ new ECBlocks(30, new ECB(12, 15),
+ new ECB(28, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(28, intArray(6, 6, 26, 50, 74, 98, 122),
+ new ECBlocks(30, new ECB(3, 117),
+ new ECB(10, 118)),
+ new ECBlocks(28, new ECB(3, 45),
+ new ECB(23, 46)),
+ new ECBlocks(30, new ECB(4, 24),
+ new ECB(31, 25)),
+ new ECBlocks(30, new ECB(11, 15),
+ new ECB(31, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(29, intArray(6, 6, 30, 54, 78, 102, 126),
+ new ECBlocks(30, new ECB(7, 116),
+ new ECB(7, 117)),
+ new ECBlocks(28, new ECB(21, 45),
+ new ECB(7, 46)),
+ new ECBlocks(30, new ECB(1, 23),
+ new ECB(37, 24)),
+ new ECBlocks(30, new ECB(19, 15),
+ new ECB(26, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(30, intArray(6, 6, 26, 52, 78, 104, 130),
+ new ECBlocks(30, new ECB(5, 115),
+ new ECB(10, 116)),
+ new ECBlocks(28, new ECB(19, 47),
+ new ECB(10, 48)),
+ new ECBlocks(30, new ECB(15, 24),
+ new ECB(25, 25)),
+ new ECBlocks(30, new ECB(23, 15),
+ new ECB(25, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(31, intArray(6, 6, 30, 56, 82, 108, 134),
+ new ECBlocks(30, new ECB(13, 115),
+ new ECB(3, 116)),
+ new ECBlocks(28, new ECB(2, 46),
+ new ECB(29, 47)),
+ new ECBlocks(30, new ECB(42, 24),
+ new ECB(1, 25)),
+ new ECBlocks(30, new ECB(23, 15),
+ new ECB(28, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(32, intArray(6, 6, 34, 60, 86, 112, 138),
+ new ECBlocks(30, new ECB(17, 115)),
+ new ECBlocks(28, new ECB(10, 46),
+ new ECB(23, 47)),
+ new ECBlocks(30, new ECB(10, 24),
+ new ECB(35, 25)),
+ new ECBlocks(30, new ECB(19, 15),
+ new ECB(35, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(33, intArray(6, 6, 30, 58, 86, 114, 142),
+ new ECBlocks(30, new ECB(17, 115),
+ new ECB(1, 116)),
+ new ECBlocks(28, new ECB(14, 46),
+ new ECB(21, 47)),
+ new ECBlocks(30, new ECB(29, 24),
+ new ECB(19, 25)),
+ new ECBlocks(30, new ECB(11, 15),
+ new ECB(46, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(34, intArray(6, 6, 34, 62, 90, 118, 146),
+ new ECBlocks(30, new ECB(13, 115),
+ new ECB(6, 116)),
+ new ECBlocks(28, new ECB(14, 46),
+ new ECB(23, 47)),
+ new ECBlocks(30, new ECB(44, 24),
+ new ECB(7, 25)),
+ new ECBlocks(30, new ECB(59, 16),
+ new ECB(1, 17)))));
+ VERSIONS.push_back(Ref<Version>(new Version(35, intArray(7, 6, 30, 54, 78,
+ 102, 126, 150),
+ new ECBlocks(30, new ECB(12, 121),
+ new ECB(7, 122)),
+ new ECBlocks(28, new ECB(12, 47),
+ new ECB(26, 48)),
+ new ECBlocks(30, new ECB(39, 24),
+ new ECB(14, 25)),
+ new ECBlocks(30, new ECB(22, 15),
+ new ECB(41, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(36, intArray(7, 6, 24, 50, 76,
+ 102, 128, 154),
+ new ECBlocks(30, new ECB(6, 121),
+ new ECB(14, 122)),
+ new ECBlocks(28, new ECB(6, 47),
+ new ECB(34, 48)),
+ new ECBlocks(30, new ECB(46, 24),
+ new ECB(10, 25)),
+ new ECBlocks(30, new ECB(2, 15),
+ new ECB(64, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(37, intArray(7, 6, 28, 54, 80,
+ 106, 132, 158),
+ new ECBlocks(30, new ECB(17, 122),
+ new ECB(4, 123)),
+ new ECBlocks(28, new ECB(29, 46),
+ new ECB(14, 47)),
+ new ECBlocks(30, new ECB(49, 24),
+ new ECB(10, 25)),
+ new ECBlocks(30, new ECB(24, 15),
+ new ECB(46, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(38, intArray(7, 6, 32, 58, 84,
+ 110, 136, 162),
+ new ECBlocks(30, new ECB(4, 122),
+ new ECB(18, 123)),
+ new ECBlocks(28, new ECB(13, 46),
+ new ECB(32, 47)),
+ new ECBlocks(30, new ECB(48, 24),
+ new ECB(14, 25)),
+ new ECBlocks(30, new ECB(42, 15),
+ new ECB(32, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(39, intArray(7, 6, 26, 54, 82,
+ 110, 138, 166),
+ new ECBlocks(30, new ECB(20, 117),
+ new ECB(4, 118)),
+ new ECBlocks(28, new ECB(40, 47),
+ new ECB(7, 48)),
+ new ECBlocks(30, new ECB(43, 24),
+ new ECB(22, 25)),
+ new ECBlocks(30, new ECB(10, 15),
+ new ECB(67, 16)))));
+ VERSIONS.push_back(Ref<Version>(new Version(40, intArray(7, 6, 30, 58, 86,
+ 114, 142, 170),
+ new ECBlocks(30, new ECB(19, 118),
+ new ECB(6, 119)),
+ new ECBlocks(28, new ECB(18, 47),
+ new ECB(31, 48)),
+ new ECBlocks(30, new ECB(34, 24),
+ new ECB(34, 25)),
+ new ECBlocks(30, new ECB(20, 15),
+ new ECB(61, 16)))));
+ return VERSIONS.size();
+}
+}
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/Version.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/Version.h
new file mode 100644
index 0000000..181bd98
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/Version.h
@@ -0,0 +1,87 @@
+#ifndef __VERSION_H__
+#define __VERSION_H__
+
+/*
+ * Version.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 14/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/Counted.h>
+#include <zxing/qrcode/ErrorCorrectionLevel.h>
+#include <zxing/ReaderException.h>
+#include <zxing/common/BitMatrix.h>
+#include <zxing/common/Counted.h>
+#include <vector>
+#include <valarray>
+
+namespace zxing {
+namespace qrcode {
+
+class ECB {
+private:
+ int count_;
+ int dataCodewords_;
+public:
+ ECB(int count, int dataCodewords);
+ int getCount();
+ int getDataCodewords();
+};
+
+class ECBlocks {
+private:
+ int ecCodewords_;
+ std::vector<ECB*> ecBlocks_;
+public:
+ ECBlocks(int ecCodewords, ECB *ecBlocks);
+ ECBlocks(int ecCodewords, ECB *ecBlocks1, ECB *ecBlocks2);
+ int getECCodewords();
+ std::vector<ECB*>& getECBlocks();
+ ~ECBlocks();
+};
+
+class Version : public Counted {
+
+private:
+ int versionNumber_;
+ std::valarray<int> &alignmentPatternCenters_;
+ std::vector<ECBlocks*> ecBlocks_;
+ int totalCodewords_;
+ Version(int versionNumber, std::valarray<int> *alignmentPatternCenters, ECBlocks *ecBlocks1, ECBlocks *ecBlocks2,
+ ECBlocks *ecBlocks3, ECBlocks *ecBlocks4);
+
+public:
+ static unsigned int VERSION_DECODE_INFO[];
+ static int N_VERSION_DECODE_INFOS;
+ static std::vector<Ref<Version> > VERSIONS;
+
+ ~Version();
+ int getVersionNumber();
+ std::valarray<int> &getAlignmentPatternCenters();
+ int getTotalCodewords();
+ int getDimensionForVersion();
+ ECBlocks &getECBlocksForLevel(ErrorCorrectionLevel &ecLevel);
+ static Version *getProvisionalVersionForDimension(int dimension);
+ static Version *getVersionForNumber(int versionNumber);
+ static Version *decodeVersionInformation(unsigned int versionBits);
+ Ref<BitMatrix> buildFunctionPattern();
+ static int buildVersions();
+};
+}
+}
+
+#endif // __VERSION_H__
diff --git a/cpp/core/src/zxing/qrcode/decoder/BitMatrixParser.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/BitMatrixParser.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/decoder/BitMatrixParser.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/BitMatrixParser.cpp
diff --git a/cpp/core/src/zxing/qrcode/decoder/BitMatrixParser.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/BitMatrixParser.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/decoder/BitMatrixParser.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/BitMatrixParser.h
diff --git a/cpp/core/src/zxing/qrcode/decoder/DataBlock.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataBlock.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/decoder/DataBlock.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataBlock.cpp
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataBlock.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataBlock.h
new file mode 100644
index 0000000..df536f4
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataBlock.h
@@ -0,0 +1,52 @@
+#ifndef __DATA_BLOCK_H__
+#define __DATA_BLOCK_H__
+
+/*
+ * DataBlock.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 19/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <valarray>
+#include <vector>
+#include <zxing/common/Counted.h>
+#include <zxing/common/Array.h>
+#include <zxing/qrcode/Version.h>
+#include <zxing/qrcode/ErrorCorrectionLevel.h>
+
+namespace zxing {
+namespace qrcode {
+
+class DataBlock : public Counted {
+private:
+ int numDataCodewords_;
+ ArrayRef<unsigned char> codewords_;
+
+ DataBlock(int numDataCodewords, ArrayRef<unsigned char> codewords);
+
+public:
+ static std::vector<Ref<DataBlock> >
+ getDataBlocks(ArrayRef<unsigned char> rawCodewords, Version *version, ErrorCorrectionLevel &ecLevel);
+
+ int getNumDataCodewords();
+ ArrayRef<unsigned char> getCodewords();
+};
+
+}
+}
+
+#endif // __DATA_BLOCK_H__
diff --git a/cpp/core/src/zxing/qrcode/decoder/DataMask.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataMask.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/decoder/DataMask.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataMask.cpp
diff --git a/cpp/core/src/zxing/qrcode/decoder/DataMask.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataMask.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/decoder/DataMask.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DataMask.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DecodedBitStreamParser.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DecodedBitStreamParser.cpp
new file mode 100644
index 0000000..ab32b2e
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DecodedBitStreamParser.cpp
@@ -0,0 +1,282 @@
+/*
+ * DecodedBitStreamParser.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 20/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/qrcode/decoder/DecodedBitStreamParser.h>
+#include <iostream>
+#include <iconv.h>
+
+// Required for compatibility. TODO: test on Symbian
+#ifdef ZXING_ICONV_CONST
+#undef ICONV_CONST
+#define ICONV_CONST const
+#endif
+
+#ifndef ICONV_CONST
+#define ICONV_CONST /**/
+#endif
+
+using namespace zxing;
+
+namespace zxing {
+namespace qrcode {
+
+using namespace std;
+
+const char DecodedBitStreamParser::ALPHANUMERIC_CHARS[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
+ 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+ 'Y', 'Z', ' ', '$', '%', '*', '+', '-', '.', '/', ':'
+ };
+
+const char *DecodedBitStreamParser::ASCII = "ASCII";
+const char *DecodedBitStreamParser::ISO88591 = "ISO-8859-1";
+const char *DecodedBitStreamParser::UTF8 = "UTF-8";
+const char *DecodedBitStreamParser::SHIFT_JIS = "SHIFT_JIS";
+const char *DecodedBitStreamParser::EUC_JP = "EUC-JP";
+
+void DecodedBitStreamParser::append(ostream &ost, const unsigned char *bufIn, size_t nIn, const char *src) {
+ if (nIn == 0) {
+ return;
+ }
+
+ iconv_t cd = iconv_open(UTF8, src);
+ const int maxOut = 4 * nIn + 1;
+ unsigned char* bufOut = new unsigned char[maxOut];
+
+ ICONV_CONST char *fromPtr = (ICONV_CONST char *)bufIn;
+ size_t nFrom = nIn;
+ char *toPtr = (char *)bufOut;
+ size_t nTo = maxOut;
+
+ while (nFrom > 0) {
+ size_t oneway = iconv(cd, (const char**)&fromPtr, &nFrom, &toPtr, &nTo);
+ if (oneway == (size_t)(-1)) {
+ iconv_close(cd);
+ delete[] bufOut;
+ throw ReaderException("error converting characters");
+ }
+ }
+ iconv_close(cd);
+
+ int nResult = maxOut - nTo;
+ bufOut[nResult] = '\0';
+
+ ost << bufOut;
+ delete[] bufOut;
+}
+
+void DecodedBitStreamParser::decodeKanjiSegment(Ref<BitSource> bits, ostringstream &result, int count) {
+ // Each character will require 2 bytes. Read the characters as 2-byte pairs
+ // and decode as Shift_JIS afterwards
+ size_t nBytes = 2 * count;
+ unsigned char* buffer = new unsigned char[nBytes];
+ int offset = 0;
+ while (count > 0) {
+ // Each 13 bits encodes a 2-byte character
+
+ int twoBytes = bits->readBits(13);
+ int assembledTwoBytes = ((twoBytes / 0x0C0) << 8) | (twoBytes % 0x0C0);
+ if (assembledTwoBytes < 0x01F00) {
+ // In the 0x8140 to 0x9FFC range
+ assembledTwoBytes += 0x08140;
+ } else {
+ // In the 0xE040 to 0xEBBF range
+ assembledTwoBytes += 0x0C140;
+ }
+ buffer[offset] = (unsigned char)(assembledTwoBytes >> 8);
+ buffer[offset + 1] = (unsigned char)assembledTwoBytes;
+ offset += 2;
+ count--;
+ }
+
+ append(result, buffer, nBytes, SHIFT_JIS);
+ delete[] buffer;
+}
+
+void DecodedBitStreamParser::decodeByteSegment(Ref<BitSource> bits, ostringstream &result, int count) {
+ int nBytes = count;
+ unsigned char* readBytes = new unsigned char[nBytes];
+ if (count << 3 > bits->available()) {
+ ostringstream s;
+ s << "Count too large: " << count;
+ delete[] readBytes;
+ throw ReaderException(s.str().c_str());
+ }
+ for (int i = 0; i < count; i++) {
+ readBytes[i] = (unsigned char)bits->readBits(8);
+ }
+ // The spec isn't clear on this mode; see
+ // section 6.4.5: t does not say which encoding to assuming
+ // upon decoding. I have seen ISO-8859-1 used as well as
+ // Shift_JIS -- without anything like an ECI designator to
+ // give a hint.
+ const char *encoding = guessEncoding(readBytes, nBytes);
+ append(result, readBytes, nBytes, encoding);
+ delete[] readBytes;
+}
+
+void DecodedBitStreamParser::decodeNumericSegment(Ref<BitSource> bits, ostringstream &result, int count) {
+ int nBytes = count;
+ unsigned char* bytes = new unsigned char[nBytes];
+ int i = 0;
+ // Read three digits at a time
+ while (count >= 3) {
+ // Each 10 bits encodes three digits
+ int threeDigitsBits = bits->readBits(10);
+ if (threeDigitsBits >= 1000) {
+ ostringstream s;
+ s << "Illegal value for 3-digit unit: " << threeDigitsBits;
+ delete[] bytes;
+ throw ReaderException(s.str().c_str());
+ }
+ bytes[i++] = ALPHANUMERIC_CHARS[threeDigitsBits / 100];
+ bytes[i++] = ALPHANUMERIC_CHARS[(threeDigitsBits / 10) % 10];
+ bytes[i++] = ALPHANUMERIC_CHARS[threeDigitsBits % 10];
+ count -= 3;
+ }
+ if (count == 2) {
+ // Two digits left over to read, encoded in 7 bits
+ int twoDigitsBits = bits->readBits(7);
+ if (twoDigitsBits >= 100) {
+ ostringstream s;
+ s << "Illegal value for 2-digit unit: " << twoDigitsBits;
+ delete[] bytes;
+ throw ReaderException(s.str().c_str());
+ }
+ bytes[i++] = ALPHANUMERIC_CHARS[twoDigitsBits / 10];
+ bytes[i++] = ALPHANUMERIC_CHARS[twoDigitsBits % 10];
+ } else if (count == 1) {
+ // One digit left over to read
+ int digitBits = bits->readBits(4);
+ if (digitBits >= 10) {
+ ostringstream s;
+ s << "Illegal value for digit unit: " << digitBits;
+ delete[] bytes;
+ throw ReaderException(s.str().c_str());
+ }
+ bytes[i++] = ALPHANUMERIC_CHARS[digitBits];
+ }
+ append(result, bytes, nBytes, ASCII);
+ delete[] bytes;
+}
+
+void DecodedBitStreamParser::decodeAlphanumericSegment(Ref<BitSource> bits, ostringstream &result, int count) {
+ int nBytes = count;
+ unsigned char* bytes = new unsigned char[nBytes];
+ int i = 0;
+ // Read two characters at a time
+ while (count > 1) {
+ int nextTwoCharsBits = bits->readBits(11);
+ bytes[i++] = ALPHANUMERIC_CHARS[nextTwoCharsBits / 45];
+ bytes[i++] = ALPHANUMERIC_CHARS[nextTwoCharsBits % 45];
+ count -= 2;
+ }
+ if (count == 1) {
+ bytes[i++] = ALPHANUMERIC_CHARS[bits->readBits(6)];
+ }
+ append(result, bytes, nBytes, ASCII);
+ delete[] bytes;
+}
+
+const char *
+DecodedBitStreamParser::guessEncoding(unsigned char *bytes, int length) {
+ // Does it start with the UTF-8 byte order mark? then guess it's UTF-8
+ if (length > 3 && bytes[0] == (unsigned char)0xEF && bytes[1] == (unsigned char)0xBB && bytes[2]
+ == (unsigned char)0xBF) {
+ return UTF8;
+ }
+ // For now, merely tries to distinguish ISO-8859-1, UTF-8 and Shift_JIS,
+ // which should be by far the most common encodings. ISO-8859-1
+ // should not have bytes in the 0x80 - 0x9F range, while Shift_JIS
+ // uses this as a first byte of a two-byte character. If we see this
+ // followed by a valid second byte in Shift_JIS, assume it is Shift_JIS.
+ // If we see something else in that second byte, we'll make the risky guess
+ // that it's UTF-8.
+ bool canBeISO88591 = true;
+ bool lastWasPossibleDoubleByteStart = false;
+ for (int i = 0; i < length; i++) {
+ int value = bytes[i] & 0xFF;
+ if (value >= 0x80 && value <= 0x9F && i < length - 1) {
+ canBeISO88591 = false;
+ // ISO-8859-1 shouldn't use this, but before we decide it is Shift_JIS,
+ // just double check that it is followed by a byte that's valid in
+ // the Shift_JIS encoding
+ if (lastWasPossibleDoubleByteStart) {
+ // If we just checked this and the last byte for being a valid double-byte
+ // char, don't check starting on this byte. If the this and the last byte
+ // formed a valid pair, then this shouldn't be checked to see if it starts
+ // a double byte pair of course.
+ lastWasPossibleDoubleByteStart = false;
+ } else {
+ // ... otherwise do check to see if this plus the next byte form a valid
+ // double byte pair encoding a character.
+ lastWasPossibleDoubleByteStart = true;
+ int nextValue = bytes[i + 1] & 0xFF;
+ if ((value & 0x1) == 0) {
+ // if even, next value should be in [0x9F,0xFC]
+ // if not, we'll guess UTF-8
+ if (nextValue < 0x9F || nextValue > 0xFC) {
+ return UTF8;
+ }
+ } else {
+ // if odd, next value should be in [0x40,0x9E]
+ // if not, we'll guess UTF-8
+ if (nextValue < 0x40 || nextValue > 0x9E) {
+ return UTF8;
+ }
+ }
+ }
+ }
+ }
+ return canBeISO88591 ? ISO88591 : SHIFT_JIS;
+}
+
+string DecodedBitStreamParser::decode(ArrayRef<unsigned char> bytes, Version *version) {
+ ostringstream result;
+ Ref<BitSource> bits(new BitSource(bytes));
+ Mode *mode = &Mode::TERMINATOR;
+ do {
+ // While still another segment to read...
+ if (bits->available() < 4) {
+ // OK, assume we're done. Really, a TERMINATOR mode should have been recorded here
+ mode = &Mode::TERMINATOR;
+ } else {
+ mode = &Mode::forBits(bits->readBits(4)); // mode is encoded by 4 bits
+ }
+ if (mode != &Mode::TERMINATOR) {
+ // How many characters will follow, encoded in this mode?
+ int count = bits->readBits(mode->getCharacterCountBits(version));
+ if (mode == &Mode::NUMERIC) {
+ decodeNumericSegment(bits, result, count);
+ } else if (mode == &Mode::ALPHANUMERIC) {
+ decodeAlphanumericSegment(bits, result, count);
+ } else if (mode == &Mode::BYTE) {
+ decodeByteSegment(bits, result, count);
+ } else if (mode == &Mode::KANJI) {
+ decodeKanjiSegment(bits, result, count);
+ } else {
+ throw ReaderException("Unsupported mode indicator");
+ }
+ }
+ } while (mode != &Mode::TERMINATOR);
+ return result.str();
+}
+
+}
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DecodedBitStreamParser.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DecodedBitStreamParser.h
new file mode 100644
index 0000000..8c4ab9b
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/DecodedBitStreamParser.h
@@ -0,0 +1,60 @@
+#ifndef __DECODED_BIT_STREAM_PARSER_H__
+#define __DECODED_BIT_STREAM_PARSER_H__
+
+/*
+ * DecodedBitStreamParser.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 20/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string>
+#include <sstream>
+#include <zxing/qrcode/decoder/Mode.h>
+#include <zxing/common/BitSource.h>
+#include <zxing/common/Counted.h>
+#include <zxing/common/Array.h>
+
+
+
+namespace zxing {
+namespace qrcode {
+
+class DecodedBitStreamParser {
+private:
+ static const char ALPHANUMERIC_CHARS[];
+
+ static const char *ASCII;
+ static const char *ISO88591;
+ static const char *UTF8;
+ static const char *SHIFT_JIS;
+ static const char *EUC_JP;
+
+ static void decodeKanjiSegment(Ref<BitSource> bits, std::ostringstream &result, int count);
+ static void decodeByteSegment(Ref<BitSource> bits, std::ostringstream &result, int count);
+ static void decodeAlphanumericSegment(Ref<BitSource> bits, std::ostringstream &result, int count);
+ static void decodeNumericSegment(Ref<BitSource> bits, std::ostringstream &result, int count);
+ static const char *guessEncoding(unsigned char *bytes, int length);
+ static void append(std::ostream &ost, const unsigned char *bufIn, size_t nIn, const char *src);
+
+public:
+ static std::string decode(ArrayRef<unsigned char> bytes, Version *version);
+};
+
+}
+}
+
+#endif // __DECODED_BIT_STREAM_PARSER_H__
diff --git a/cpp/core/src/zxing/qrcode/decoder/Decoder.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Decoder.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/decoder/Decoder.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Decoder.cpp
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Decoder.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Decoder.h
new file mode 100644
index 0000000..96e1dc0
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Decoder.h
@@ -0,0 +1,49 @@
+#ifndef __DECODER_H__
+#define __DECODER_H__
+
+/*
+ * Decoder.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 20/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/common/reedsolomon/ReedSolomonDecoder.h>
+#include <zxing/common/reedsolomon/GF256.h>
+#include <zxing/common/Counted.h>
+#include <zxing/common/Array.h>
+#include <zxing/common/DecoderResult.h>
+#include <zxing/common/BitMatrix.h>
+#include <valarray>
+
+namespace zxing {
+namespace qrcode {
+
+class Decoder {
+private:
+ ReedSolomonDecoder rsDecoder_;
+
+ void correctErrors(ArrayRef<unsigned char> bytes, int numDataCodewords);
+
+public:
+ Decoder();
+ Ref<DecoderResult> decode(Ref<BitMatrix> bits);
+};
+
+}
+}
+
+#endif // __DECODER_H__
diff --git a/cpp/core/src/zxing/qrcode/decoder/Mode.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Mode.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/decoder/Mode.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Mode.cpp
diff --git a/cpp/core/src/zxing/qrcode/decoder/Mode.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Mode.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/decoder/Mode.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/decoder/Mode.h
diff --git a/cpp/core/src/zxing/qrcode/detector/AlignmentPattern.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPattern.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/AlignmentPattern.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPattern.cpp
diff --git a/cpp/core/src/zxing/qrcode/detector/AlignmentPattern.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPattern.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/AlignmentPattern.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPattern.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPatternFinder.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPatternFinder.cpp
new file mode 100644
index 0000000..b3d92d4
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPatternFinder.cpp
@@ -0,0 +1,204 @@
+/*
+ * AlignmentPatternFinder.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 14/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AlignmentPatternFinder.h"
+#include <zxing/ReaderException.h>
+#include <zxing/common/BitArray.h>
+#include <vector>
+#include <cmath>
+
+namespace zxing {
+namespace qrcode {
+
+using namespace std;
+
+float AlignmentPatternFinder::centerFromEnd(valarray<int> &stateCount, int end) {
+ return (float)(end - stateCount[2]) - stateCount[1] / 2.0f;
+}
+
+bool AlignmentPatternFinder::foundPatternCross(valarray<int> &stateCount) {
+ float maxVariance = moduleSize_ / 2.0f;
+ for (size_t i = 0; i < 3; i++) {
+ if (abs(moduleSize_ - stateCount[i]) >= maxVariance) {
+ return false;
+ }
+ }
+ return true;
+}
+
+float AlignmentPatternFinder::crossCheckVertical(size_t startI, size_t centerJ, int maxCount,
+ int originalStateCountTotal) {
+ int maxI = image_->getHeight();
+ valarray<int> stateCount(0, 3);
+
+
+ // Start counting up from center
+ int i = startI;
+ while (i >= 0 && image_->get(centerJ, i) && stateCount[1] <= maxCount) {
+ stateCount[1]++;
+ i--;
+ }
+ // If already too many modules in this state or ran off the edge:
+ if (i < 0 || stateCount[1] > maxCount) {
+ return NAN;
+ }
+ while (i >= 0 && !image_->get(centerJ, i) && stateCount[0] <= maxCount) {
+ stateCount[0]++;
+ i--;
+ }
+ if (stateCount[0] > maxCount) {
+ return NAN;
+ }
+
+ // Now also count down from center
+ i = startI + 1;
+ while (i < maxI && image_->get(centerJ, i) && stateCount[1] <= maxCount) {
+ stateCount[1]++;
+ i++;
+ }
+ if (i == maxI || stateCount[1] > maxCount) {
+ return NAN;
+ }
+ while (i < maxI && !image_->get(centerJ, i) && stateCount[2] <= maxCount) {
+ stateCount[2]++;
+ i++;
+ }
+ if (stateCount[2] > maxCount) {
+ return NAN;
+ }
+
+ int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2];
+ if (5 * abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {
+ return NAN;
+ }
+
+ return foundPatternCross(stateCount) ? centerFromEnd(stateCount, i) : NAN;
+}
+
+Ref<AlignmentPattern> AlignmentPatternFinder::handlePossibleCenter(valarray<int> &stateCount, size_t i, size_t j) {
+ int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2];
+ float centerJ = centerFromEnd(stateCount, j);
+ float centerI = crossCheckVertical(i, (int)centerJ, 2 * stateCount[1], stateCountTotal);
+ if (!isnan(centerI)) {
+ float estimatedModuleSize = (float)(stateCount[0] + stateCount[1] + stateCount[2]) / 3.0f;
+ int max = possibleCenters_->size();
+ for (int index = 0; index < max; index++) {
+ Ref<AlignmentPattern> center((*possibleCenters_)[index]);
+ // Look for about the same center and module size:
+ if (center->aboutEquals(estimatedModuleSize, centerI, centerJ)) {
+ Ref<AlignmentPattern> result(new AlignmentPattern(centerJ, centerI, estimatedModuleSize));
+ return result;
+ }
+ }
+ AlignmentPattern *tmp = new AlignmentPattern(centerJ, centerI, estimatedModuleSize);
+ // Hadn't found this before; save it
+ tmp->retain();
+ possibleCenters_->push_back(tmp);
+ }
+ Ref<AlignmentPattern> result;
+ return result;
+}
+
+AlignmentPatternFinder::AlignmentPatternFinder(Ref<BitMatrix> image, size_t startX, size_t startY, size_t width,
+ size_t height, float moduleSize) :
+ image_(image), possibleCenters_(new vector<AlignmentPattern *> ()), startX_(startX), startY_(startY),
+ width_(width), height_(height), moduleSize_(moduleSize) {
+}
+
+AlignmentPatternFinder::~AlignmentPatternFinder() {
+ for (size_t i = 0; i < possibleCenters_->size(); i++) {
+ (*possibleCenters_)[i]->release();
+ (*possibleCenters_)[i] = 0;
+ }
+ delete possibleCenters_;
+}
+
+Ref<AlignmentPattern> AlignmentPatternFinder::find() {
+ size_t maxJ = startX_ + width_;
+ size_t middleI = startY_ + (height_ >> 1);
+ // Ref<BitArray> luminanceRow(new BitArray(width_));
+ // We are looking for black/white/black modules in 1:1:1 ratio;
+ // this tracks the number of black/white/black modules seen so far
+ valarray<int> stateCount(0, 3);
+ for (size_t iGen = 0; iGen < height_; iGen++) {
+ // Search from middle outwards
+ size_t i = middleI + ((iGen & 0x01) == 0 ? ((iGen + 1) >> 1) : -((iGen + 1) >> 1));
+ // image_->getBlackRow(i, luminanceRow, startX_, width_);
+ stateCount[0] = 0;
+ stateCount[1] = 0;
+ stateCount[2] = 0;
+ size_t j = startX_;
+ // Burn off leading white pixels before anything else; if we start in the middle of
+ // a white run, it doesn't make sense to count its length, since we don't know if the
+ // white run continued to the left of the start point
+ while (j < maxJ && !image_->get(j, i)) {
+ j++;
+ }
+ int currentState = 0;
+ while (j < maxJ) {
+ if (image_->get(j, i)) {
+ // Black pixel
+ if (currentState == 1) { // Counting black pixels
+ stateCount[currentState]++;
+ } else { // Counting white pixels
+ if (currentState == 2) { // A winner?
+ if (foundPatternCross(stateCount)) { // Yes
+ Ref<AlignmentPattern> confirmed(handlePossibleCenter(stateCount, i, j));
+ if (confirmed != 0) {
+ return confirmed;
+ }
+ }
+ stateCount[0] = stateCount[2];
+ stateCount[1] = 1;
+ stateCount[2] = 0;
+ currentState = 1;
+ } else {
+ stateCount[++currentState]++;
+ }
+ }
+ } else { // White pixel
+ if (currentState == 1) { // Counting black pixels
+ currentState++;
+ }
+ stateCount[currentState]++;
+ }
+ j++;
+ }
+ if (foundPatternCross(stateCount)) {
+ Ref<AlignmentPattern> confirmed(handlePossibleCenter(stateCount, i, maxJ));
+ if (confirmed != 0) {
+ return confirmed;
+ }
+ }
+
+ }
+
+ // Hmm, nothing we saw was observed and confirmed twice. If we had
+ // any guess at all, return it.
+ if (possibleCenters_->size() > 0) {
+ Ref<AlignmentPattern> center((*possibleCenters_)[0]);
+ return center;
+ }
+
+ throw zxing::ReaderException("Could not find alignment pattern");
+}
+
+}
+}
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPatternFinder.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPatternFinder.h
new file mode 100644
index 0000000..2663643
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/AlignmentPatternFinder.h
@@ -0,0 +1,62 @@
+#ifndef __ALIGNMENT_PATTERN_FINDER_H__
+#define __ALIGNMENT_PATTERN_FINDER_H__
+
+/*
+ * AlignmentPatternFinder.h
+ * zxing
+ *
+ * Created by Christian Brunschen on 14/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AlignmentPattern.h"
+#include <zxing/common/Counted.h>
+#include <zxing/common/BitMatrix.h>
+#include <vector>
+
+namespace zxing {
+namespace qrcode {
+
+class AlignmentPatternFinder : public Counted {
+private:
+ static int CENTER_QUORUM;
+ static int MIN_SKIP;
+ static int MAX_MODULES;
+
+ Ref<BitMatrix> image_;
+ std::vector<AlignmentPattern *> *possibleCenters_;
+ size_t startX_;
+ size_t startY_;
+ size_t width_;
+ size_t height_;
+ float moduleSize_;
+
+ static float centerFromEnd(std::valarray<int> &stateCount, int end);
+ bool foundPatternCross(std::valarray<int> &stateCount);
+
+ float crossCheckVertical(size_t startI, size_t centerJ, int maxCount, int originalStateCountTotal);
+
+ Ref<AlignmentPattern> handlePossibleCenter(std::valarray<int> &stateCount, size_t i, size_t j);
+
+public:
+ AlignmentPatternFinder(Ref<BitMatrix> image, size_t startX, size_t startY, size_t width, size_t height,
+ float moduleSize);
+ ~AlignmentPatternFinder();
+ Ref<AlignmentPattern> find();
+};
+}
+}
+
+#endif // __ALIGNMENT_PATTERN_FINDER_H__
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/Detector.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/Detector.cpp
new file mode 100644
index 0000000..9dbc297
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/Detector.cpp
@@ -0,0 +1,265 @@
+/*
+ * Detector.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 14/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/qrcode/detector/Detector.h>
+#include <zxing/qrcode/detector/FinderPatternFinder.h>
+#include <zxing/qrcode/detector/FinderPattern.h>
+#include <zxing/qrcode/detector/AlignmentPattern.h>
+#include <zxing/qrcode/detector/AlignmentPatternFinder.h>
+#include <zxing/qrcode/Version.h>
+#include <zxing/common/GridSampler.h>
+#include <cmath>
+#include <sstream>
+
+namespace zxing {
+namespace qrcode {
+
+using namespace std;
+
+Detector::Detector(Ref<BitMatrix> image) :
+ image_(image) {
+}
+
+Ref<BitMatrix> Detector::getImage() {
+ return image_;
+}
+
+Ref<DetectorResult> Detector::detect() {
+ FinderPatternFinder finder(image_);
+ Ref<FinderPatternInfo> info(finder.find());
+
+ Ref<FinderPattern> topLeft(info->getTopLeft());
+ Ref<FinderPattern> topRight(info->getTopRight());
+ Ref<FinderPattern> bottomLeft(info->getBottomLeft());
+
+ float moduleSize = calculateModuleSize(topLeft, topRight, bottomLeft);
+ int dimension = computeDimension(topLeft, topRight, bottomLeft, moduleSize);
+ Version *provisionalVersion = Version::getProvisionalVersionForDimension(dimension);
+ int modulesBetweenFPCenters = provisionalVersion->getDimensionForVersion() - 7;
+
+ Ref<AlignmentPattern> alignmentPattern;
+ // Anything above version 1 has an alignment pattern
+ if (provisionalVersion->getAlignmentPatternCenters().size() > 0) {
+
+
+ // Guess where a "bottom right" finder pattern would have been
+ float bottomRightX = topRight->getX() - topLeft->getX() + bottomLeft->getX();
+ float bottomRightY = topRight->getY() - topLeft->getY() + bottomLeft->getY();
+
+
+ // Estimate that alignment pattern is closer by 3 modules
+ // from "bottom right" to known top left location
+ float correctionToTopLeft = 1.0f - 3.0f / (float)modulesBetweenFPCenters;
+ int estAlignmentX = (int)(topLeft->getX() + correctionToTopLeft * (bottomRightX - topLeft->getX()));
+ int estAlignmentY = (int)(topLeft->getY() + correctionToTopLeft * (bottomRightY - topLeft->getY()));
+
+
+ // Kind of arbitrary -- expand search radius before giving up
+ for (int i = 4; i <= 16; i <<= 1) {
+ try {
+ alignmentPattern = findAlignmentInRegion(moduleSize, estAlignmentX, estAlignmentY, (float)i);
+ break;
+ } catch (zxing::ReaderException re) {
+ // try next round
+ }
+ }
+ if (alignmentPattern == 0) {
+ // Try anyway
+ }
+
+ }
+
+ Ref<PerspectiveTransform> transform = createTransform(topLeft, topRight, bottomLeft, alignmentPattern, dimension);
+ Ref<BitMatrix> bits(sampleGrid(image_, dimension, transform));
+ std::vector<Ref<ResultPoint> > points(alignmentPattern == 0 ? 3 : 4);
+ points[0].reset(bottomLeft);
+ points[1].reset(topLeft);
+ points[2].reset(topRight);
+ if (alignmentPattern != 0) {
+ points[3].reset(alignmentPattern);
+ }
+
+ Ref<DetectorResult> result(new DetectorResult(bits, points, transform));
+ return result;
+}
+
+Ref<PerspectiveTransform> Detector::createTransform(Ref<ResultPoint> topLeft, Ref<ResultPoint> topRight, Ref <
+ ResultPoint > bottomLeft, Ref<ResultPoint> alignmentPattern, int dimension) {
+
+ float dimMinusThree = (float)dimension - 3.5f;
+ float bottomRightX;
+ float bottomRightY;
+ float sourceBottomRightX;
+ float sourceBottomRightY;
+ if (alignmentPattern != 0) {
+ bottomRightX = alignmentPattern->getX();
+ bottomRightY = alignmentPattern->getY();
+ sourceBottomRightX = sourceBottomRightY = dimMinusThree - 3.0f;
+ } else {
+ // Don't have an alignment pattern, just make up the bottom-right point
+ bottomRightX = (topRight->getX() - topLeft->getX()) + bottomLeft->getX();
+ bottomRightY = (topRight->getY() - topLeft->getY()) + bottomLeft->getY();
+ sourceBottomRightX = sourceBottomRightY = dimMinusThree;
+ }
+
+ Ref<PerspectiveTransform> transform(PerspectiveTransform::quadrilateralToQuadrilateral(3.5f, 3.5f, dimMinusThree, 3.5f, sourceBottomRightX,
+ sourceBottomRightY, 3.5f, dimMinusThree, topLeft->getX(), topLeft->getY(), topRight->getX(),
+ topRight->getY(), bottomRightX, bottomRightY, bottomLeft->getX(), bottomLeft->getY()));
+
+ return transform;
+}
+
+Ref<BitMatrix> Detector::sampleGrid(Ref<BitMatrix> image, int dimension, Ref<PerspectiveTransform> transform) {
+ GridSampler &sampler = GridSampler::getInstance();
+ return sampler.sampleGrid(image, dimension, transform);
+}
+
+int Detector::computeDimension(Ref<ResultPoint> topLeft, Ref<ResultPoint> topRight, Ref<ResultPoint> bottomLeft,
+ float moduleSize) {
+ int tltrCentersDimension = lround(FinderPatternFinder::distance(topLeft, topRight) / moduleSize);
+ int tlblCentersDimension = lround(FinderPatternFinder::distance(topLeft, bottomLeft) / moduleSize);
+ int dimension = ((tltrCentersDimension + tlblCentersDimension) >> 1) + 7;
+ switch (dimension & 0x03) { // mod 4
+ case 0:
+ dimension++;
+ break;
+ // 1? do nothing
+ case 2:
+ dimension--;
+ break;
+ case 3:
+ ostringstream s;
+ s << "Bad dimension: " << dimension;
+ throw zxing::ReaderException(s.str().c_str());
+ }
+ return dimension;
+}
+
+float Detector::calculateModuleSize(Ref<ResultPoint> topLeft, Ref<ResultPoint> topRight, Ref<ResultPoint> bottomLeft) {
+ // Take the average
+ return (calculateModuleSizeOneWay(topLeft, topRight) + calculateModuleSizeOneWay(topLeft, bottomLeft)) / 2.0f;
+}
+
+float Detector::calculateModuleSizeOneWay(Ref<ResultPoint> pattern, Ref<ResultPoint> otherPattern) {
+ float moduleSizeEst1 = sizeOfBlackWhiteBlackRunBothWays((int)pattern->getX(), (int)pattern->getY(),
+ (int)otherPattern->getX(), (int)otherPattern->getY());
+ float moduleSizeEst2 = sizeOfBlackWhiteBlackRunBothWays((int)otherPattern->getX(), (int)otherPattern->getY(),
+ (int)pattern->getX(), (int)pattern->getY());
+ if (isnan(moduleSizeEst1)) {
+ return moduleSizeEst2;
+ }
+ if (isnan(moduleSizeEst2)) {
+ return moduleSizeEst1;
+ }
+ // Average them, and divide by 7 since we've counted the width of 3 black modules,
+ // and 1 white and 1 black module on either side. Ergo, divide sum by 14.
+ return (moduleSizeEst1 + moduleSizeEst2) / 14.0f;
+}
+
+float Detector::sizeOfBlackWhiteBlackRunBothWays(int fromX, int fromY, int toX, int toY) {
+
+ float result = sizeOfBlackWhiteBlackRun(fromX, fromY, toX, toY);
+
+
+ // Now count other way -- don't run off image though of course
+ int otherToX = fromX - (toX - fromX);
+ if (otherToX < 0) {
+ // "to" should the be the first value not included, so, the first value off
+ // the edge is -1
+ otherToX = -1;
+ } else if (otherToX >= (int)image_->getWidth()) {
+ otherToX = image_->getWidth();
+ }
+ int otherToY = fromY - (toY - fromY);
+ if (otherToY < 0) {
+ otherToY = -1;
+ } else if (otherToY >= (int)image_->getHeight()) {
+ otherToY = image_->getHeight();
+ }
+ result += sizeOfBlackWhiteBlackRun(fromX, fromY, otherToX, otherToY);
+ return result - 1.0f; // -1 because we counted the middle pixel twice
+}
+
+float Detector::sizeOfBlackWhiteBlackRun(int fromX, int fromY, int toX, int toY) {
+ // Mild variant of Bresenham's algorithm;
+ // see http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
+ bool steep = abs(toY - fromY) > abs(toX - fromX);
+ if (steep) {
+ int temp = fromX;
+ fromX = fromY;
+ fromY = temp;
+ temp = toX;
+ toX = toY;
+ toY = temp;
+ }
+
+ int dx = abs(toX - fromX);
+ int dy = abs(toY - fromY);
+ int error = -dx >> 1;
+ int ystep = fromY < toY ? 1 : -1;
+ int xstep = fromX < toX ? 1 : -1;
+ int state = 0; // In black pixels, looking for white, first or second time
+ for (int x = fromX, y = fromY; x != toX; x += xstep) {
+
+ int realX = steep ? y : x;
+ int realY = steep ? x : y;
+ if (state == 1) { // In white pixels, looking for black
+ if (image_->get(realX, realY)) {
+ state++;
+ }
+ } else {
+ if (!image_->get(realX, realY)) {
+ state++;
+ }
+ }
+
+ if (state == 3) { // Found black, white, black, and stumbled back onto white; done
+ int diffX = x - fromX;
+ int diffY = y - fromY;
+ return (float)sqrt((double)(diffX * diffX + diffY * diffY));
+ }
+ error += dy;
+ if (error > 0) {
+ y += ystep;
+ error -= dx;
+ }
+ }
+ int diffX = toX - fromX;
+ int diffY = toY - fromY;
+ return (float)sqrt((double)(diffX * diffX + diffY * diffY));
+}
+
+Ref<AlignmentPattern> Detector::findAlignmentInRegion(float overallEstModuleSize, int estAlignmentX, int estAlignmentY,
+ float allowanceFactor) {
+ // Look for an alignment pattern (3 modules in size) around where it
+ // should be
+ int allowance = (int)(allowanceFactor * overallEstModuleSize);
+ int alignmentAreaLeftX = max(0, estAlignmentX - allowance);
+ int alignmentAreaRightX = min((int)(image_->getWidth() - 1), estAlignmentX + allowance);
+ int alignmentAreaTopY = max(0, estAlignmentY - allowance);
+ int alignmentAreaBottomY = min((int)(image_->getHeight() - 1), estAlignmentY + allowance);
+
+ AlignmentPatternFinder alignmentFinder(image_, alignmentAreaLeftX, alignmentAreaTopY, alignmentAreaRightX
+ - alignmentAreaLeftX, alignmentAreaBottomY - alignmentAreaTopY, overallEstModuleSize);
+ return alignmentFinder.find();
+}
+
+}
+}
diff --git a/cpp/core/src/zxing/qrcode/detector/Detector.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/Detector.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/Detector.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/Detector.h
diff --git a/cpp/core/src/zxing/qrcode/detector/FinderPattern.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPattern.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/FinderPattern.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPattern.cpp
diff --git a/cpp/core/src/zxing/qrcode/detector/FinderPattern.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPattern.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/FinderPattern.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPattern.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternFinder.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternFinder.cpp
new file mode 100644
index 0000000..666c4f2
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternFinder.cpp
@@ -0,0 +1,501 @@
+/*
+ * FinderPatternFinder.cpp
+ * zxing
+ *
+ * Created by Christian Brunschen on 13/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/qrcode/detector/FinderPatternFinder.h>
+#include <zxing/ReaderException.h>
+#include <vector>
+#include <cmath>
+
+namespace zxing {
+namespace qrcode {
+
+using namespace std;
+
+class ClosestToAverageComparator {
+private:
+ float averageModuleSize_;
+public:
+ ClosestToAverageComparator(float averageModuleSize) :
+ averageModuleSize_(averageModuleSize) {
+ }
+ int operator()(Ref<FinderPattern> a, Ref<FinderPattern> b) {
+ float dA = abs(a->getEstimatedModuleSize() - averageModuleSize_);
+ float dB = abs(b->getEstimatedModuleSize() - averageModuleSize_);
+ return dA < dB ? -1 : dA > dB ? 1 : 0;
+ }
+};
+
+class CenterComparator {
+public:
+ int operator()(Ref<FinderPattern> a, Ref<FinderPattern> b) {
+ return b->getCount() - a->getCount();
+ }
+};
+
+int FinderPatternFinder::CENTER_QUORUM = 2;
+int FinderPatternFinder::MIN_SKIP = 3;
+int FinderPatternFinder::MAX_MODULES = 57;
+
+float FinderPatternFinder::centerFromEnd(int* stateCount, int end) {
+ return (float)(end - stateCount[4] - stateCount[3]) - stateCount[2] / 2.0f;
+}
+
+bool FinderPatternFinder::foundPatternCross(int* stateCount) {
+ int totalModuleSize = 0;
+ for (int i = 0; i < 5; i++) {
+ if (stateCount[i] == 0) {
+ return false;
+ }
+ totalModuleSize += stateCount[i];
+ }
+ if (totalModuleSize < 7) {
+ return false;
+ }
+ float moduleSize = (float)totalModuleSize / 7.0f;
+ float maxVariance = moduleSize / 2.0f;
+ // Allow less than 50% variance from 1-1-3-1-1 proportions
+ return abs(moduleSize - stateCount[0]) < maxVariance && abs(moduleSize - stateCount[1]) < maxVariance && abs(3.0f
+ * moduleSize - stateCount[2]) < 3.0f * maxVariance && abs(moduleSize - stateCount[3]) < maxVariance && abs(
+ moduleSize - stateCount[4]) < maxVariance;
+}
+
+float FinderPatternFinder::crossCheckVertical(size_t startI, size_t centerJ, int maxCount, int originalStateCountTotal) {
+
+ int maxI = image_->getHeight();
+ int stateCount[5];
+ for (int i = 0; i < 5; i++)
+ stateCount[i] = 0;
+
+
+ // Start counting up from center
+ int i = startI;
+ while (i >= 0 && image_->get(centerJ, i)) {
+ stateCount[2]++;
+ i--;
+ }
+ if (i < 0) {
+ return NAN;
+ }
+ while (i >= 0 && !image_->get(centerJ, i) && stateCount[1] <= maxCount) {
+ stateCount[1]++;
+ i--;
+ }
+ // If already too many modules in this state or ran off the edge:
+ if (i < 0 || stateCount[1] > maxCount) {
+ return NAN;
+ }
+ while (i >= 0 && image_->get(centerJ, i) && stateCount[0] <= maxCount) {
+ stateCount[0]++;
+ i--;
+ }
+ if (stateCount[0] > maxCount) {
+ return NAN;
+ }
+
+ // Now also count down from center
+ i = startI + 1;
+ while (i < maxI && image_->get(centerJ, i)) {
+ stateCount[2]++;
+ i++;
+ }
+ if (i == maxI) {
+ return NAN;
+ }
+ while (i < maxI && !image_->get(centerJ, i) && stateCount[3] < maxCount) {
+ stateCount[3]++;
+ i++;
+ }
+ if (i == maxI || stateCount[3] >= maxCount) {
+ return NAN;
+ }
+ while (i < maxI && image_->get(centerJ, i) && stateCount[4] < maxCount) {
+ stateCount[4]++;
+ i++;
+ }
+ if (stateCount[4] >= maxCount) {
+ return NAN;
+ }
+
+ // If we found a finder-pattern-like section, but its size is more than 40% different than
+ // the original, assume it's a false positive
+ int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] + stateCount[4];
+ if (5 * abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {
+ return NAN;
+ }
+
+ return foundPatternCross(stateCount) ? centerFromEnd(stateCount, i) : NAN;
+}
+
+float FinderPatternFinder::crossCheckHorizontal(size_t startJ, size_t centerI, int maxCount,
+ int originalStateCountTotal) {
+
+ int maxJ = image_->getWidth();
+ int stateCount[5];
+ for (int i = 0; i < 5; i++)
+ stateCount[i] = 0;
+
+ int j = startJ;
+ while (j >= 0 && image_->get(j, centerI)) {
+ stateCount[2]++;
+ j--;
+ }
+ if (j < 0) {
+ return NAN;
+ }
+ while (j >= 0 && !image_->get(j, centerI) && stateCount[1] <= maxCount) {
+ stateCount[1]++;
+ j--;
+ }
+ if (j < 0 || stateCount[1] > maxCount) {
+ return NAN;
+ }
+ while (j >= 0 && image_->get(j, centerI) && stateCount[0] <= maxCount) {
+ stateCount[0]++;
+ j--;
+ }
+ if (stateCount[0] > maxCount) {
+ return NAN;
+ }
+
+ j = startJ + 1;
+ while (j < maxJ && image_->get(j, centerI)) {
+ stateCount[2]++;
+ j++;
+ }
+ if (j == maxJ) {
+ return NAN;
+ }
+ while (j < maxJ && !image_->get(j, centerI) && stateCount[3] < maxCount) {
+ stateCount[3]++;
+ j++;
+ }
+ if (j == maxJ || stateCount[3] >= maxCount) {
+ return NAN;
+ }
+ while (j < maxJ && image_->get(j, centerI) && stateCount[4] < maxCount) {
+ stateCount[4]++;
+ j++;
+ }
+ if (stateCount[4] >= maxCount) {
+ return NAN;
+ }
+
+ // If we found a finder-pattern-like section, but its size is significantly different than
+ // the original, assume it's a false positive
+ int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] + stateCount[4];
+ if (5 * abs(stateCountTotal - originalStateCountTotal) >= originalStateCountTotal) {
+ return NAN;
+ }
+
+ return foundPatternCross(stateCount) ? centerFromEnd(stateCount, j) : NAN;
+}
+
+bool FinderPatternFinder::handlePossibleCenter(int* stateCount, size_t i, size_t j) {
+ int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] + stateCount[4];
+ float centerJ = centerFromEnd(stateCount, j);
+ float centerI = crossCheckVertical(i, (size_t)centerJ, stateCount[2], stateCountTotal);
+ if (!isnan(centerI)) {
+ // Re-cross check
+ centerJ = crossCheckHorizontal((size_t)centerJ, (size_t)centerI, stateCount[2], stateCountTotal);
+ if (!isnan(centerJ)) {
+ float estimatedModuleSize = (float)stateCountTotal / 7.0f;
+ bool found = false;
+ size_t max = possibleCenters_.size();
+ for (size_t index = 0; index < max; index++) {
+ Ref<FinderPattern> center = possibleCenters_[index];
+ // Look for about the same center and module size:
+ if (center->aboutEquals(estimatedModuleSize, centerI, centerJ)) {
+ center->incrementCount();
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ Ref<FinderPattern> newPattern(new FinderPattern(centerJ, centerI, estimatedModuleSize));
+ possibleCenters_.push_back(newPattern);
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+int FinderPatternFinder::findRowSkip() {
+ size_t max = possibleCenters_.size();
+ if (max <= 1) {
+ return 0;
+ }
+ Ref<FinderPattern> firstConfirmedCenter;
+ for (size_t i = 0; i < max; i++) {
+ Ref<FinderPattern> center = possibleCenters_[i];
+ if (center->getCount() >= CENTER_QUORUM) {
+ if (firstConfirmedCenter == 0) {
+ firstConfirmedCenter = center;
+ } else {
+ // We have two confirmed centers
+ // How far down can we skip before resuming looking for the next
+ // pattern? In the worst case, only the difference between the
+ // difference in the x / y coordinates of the two centers.
+ // This is the case where you find top left first. Draw it out.
+ hasSkipped_ = true;
+ return (int)(abs(firstConfirmedCenter->getX() - center->getX()) - abs(firstConfirmedCenter->getY()
+ - center->getY()));
+ }
+ }
+ }
+ return 0;
+}
+
+bool FinderPatternFinder::haveMultiplyConfirmedCenters() {
+ int confirmedCount = 0;
+ float totalModuleSize = 0.0f;
+ size_t max = possibleCenters_.size();
+ for (size_t i = 0; i < max; i++) {
+ Ref<FinderPattern> pattern = possibleCenters_[i];
+ if (pattern->getCount() >= CENTER_QUORUM) {
+ confirmedCount++;
+ totalModuleSize += pattern->getEstimatedModuleSize();
+ }
+ }
+ if (confirmedCount < 3) {
+ return false;
+ }
+ // OK, we have at least 3 confirmed centers, but, it's possible that one is a "false positive"
+ // and that we need to keep looking. We detect this by asking if the estimated module sizes
+ // vary too much. We arbitrarily say that when the total deviation from average exceeds
+ // 15% of the total module size estimates, it's too much.
+ float average = totalModuleSize / max;
+ float totalDeviation = 0.0f;
+ for (size_t i = 0; i < max; i++) {
+ Ref<FinderPattern> pattern = possibleCenters_[i];
+ totalDeviation += abs(pattern->getEstimatedModuleSize() - average);
+ }
+ return totalDeviation <= 0.15f * totalModuleSize;
+}
+
+vector<Ref<FinderPattern> > FinderPatternFinder::selectBestPatterns() {
+ sort(possibleCenters_.begin(), possibleCenters_.end(), CenterComparator());
+ size_t size = 0;
+ size_t max = possibleCenters_.size();
+ while (size < max) {
+ if (possibleCenters_[size]->getCount() < CENTER_QUORUM) {
+ break;
+ }
+ size++;
+ }
+
+ if (size < 3) {
+ // Couldn't find enough finder patterns
+ throw zxing::ReaderException("Could not find three finder patterns");
+ }
+
+ if (size == 3) {
+ // Found just enough -- hope these are good!
+ vector<Ref<FinderPattern> > result(3);
+ result[0] = possibleCenters_[0];
+ result[1] = possibleCenters_[1];
+ result[2] = possibleCenters_[2];
+ return result;
+ }
+
+ // Hmm, multiple found. We need to pick the best three. Find the most
+ // popular ones whose module size is nearest the average
+ // This does not work for multiple qr codes in the same image
+ float averageModuleSize = 0.0f;
+ for (size_t i = 0; i < size; i++) {
+ averageModuleSize += possibleCenters_[i]->getEstimatedModuleSize();
+ }
+ averageModuleSize /= (float)size;
+
+ sort(possibleCenters_.begin(), possibleCenters_.end(), ClosestToAverageComparator(averageModuleSize));
+
+ vector<Ref<FinderPattern> > result(3);
+ result[0] = possibleCenters_[0];
+ result[1] = possibleCenters_[1];
+ result[2] = possibleCenters_[2];
+ return result;
+}
+
+vector<Ref<FinderPattern> > FinderPatternFinder::orderBestPatterns(vector<Ref<FinderPattern> > patterns) {
+ // Find distances between pattern centers
+ float abDistance = distance(patterns[0], patterns[1]);
+ float bcDistance = distance(patterns[1], patterns[2]);
+ float acDistance = distance(patterns[0], patterns[2]);
+
+ Ref<FinderPattern> topLeft;
+ Ref<FinderPattern> topRight;
+ Ref<FinderPattern> bottomLeft;
+ // Assume one closest to other two is top left;
+ // topRight and bottomLeft will just be guesses below at first
+ if (bcDistance >= abDistance && bcDistance >= acDistance) {
+ topLeft = patterns[0];
+ topRight = patterns[1];
+ bottomLeft = patterns[2];
+ } else if (acDistance >= bcDistance && acDistance >= abDistance) {
+ topLeft = patterns[1];
+ topRight = patterns[0];
+ bottomLeft = patterns[2];
+ } else {
+ topLeft = patterns[2];
+ topRight = patterns[0];
+ bottomLeft = patterns[1];
+ }
+
+ // Use cross product to figure out which of other1/2 is the bottom left
+ // pattern. The vector "top-left -> bottom-left" x "top-left -> top-right"
+ // should yield a vector with positive z component
+ if ((bottomLeft->getY() - topLeft->getY()) * (topRight->getX() - topLeft->getX()) < (bottomLeft->getX()
+ - topLeft->getX()) * (topRight->getY() - topLeft->getY())) {
+ Ref<FinderPattern> temp = topRight;
+ topRight = bottomLeft;
+ bottomLeft = temp;
+ }
+
+ vector<Ref<FinderPattern> > results(3);
+ results[0] = bottomLeft;
+ results[1] = topLeft;
+ results[2] = topRight;
+ return results;
+}
+
+float FinderPatternFinder::distance(Ref<ResultPoint> p1, Ref<ResultPoint> p2) {
+ float dx = p1->getX() - p2->getX();
+ float dy = p1->getY() - p2->getY();
+ return (float)sqrt(dx * dx + dy * dy);
+}
+
+FinderPatternFinder::FinderPatternFinder(Ref<BitMatrix> image) :
+ image_(image), possibleCenters_(), hasSkipped_(false) {
+}
+
+Ref<FinderPatternInfo> FinderPatternFinder::find() {
+ size_t maxI = image_->getHeight();
+ size_t maxJ = image_->getWidth();
+
+
+ // We are looking for black/white/black/white/black modules in
+ // 1:1:3:1:1 ratio; this tracks the number of such modules seen so far
+
+ // As this is used often, we use an integer array instead of valarray
+ int stateCount[5];
+ bool done = false;
+
+
+ // Let's assume that the maximum version QR Code we support takes up 1/4
+ // the height of the image, and then account for the center being 3
+ // modules in size. This gives the smallest number of pixels the center
+ // could be, so skip this often. When trying harder, look for all
+ // QR versions regardless of how dense they are.
+ size_t iSkip = MIN_SKIP;
+
+ // This is slightly faster than using the Ref. Efficiency is important here
+ BitMatrix& matrix = *image_;
+
+ for (size_t i = iSkip - 1; i < maxI && !done; i += iSkip) {
+ // Get a row of black/white values
+
+ stateCount[0] = 0;
+ stateCount[1] = 0;
+ stateCount[2] = 0;
+ stateCount[3] = 0;
+ stateCount[4] = 0;
+ int currentState = 0;
+ for (size_t j = 0; j < maxJ; j++) {
+ if (matrix.get(j, i)) {
+ // Black pixel
+ if ((currentState & 1) == 1) { // Counting white pixels
+ currentState++;
+ }
+ stateCount[currentState]++;
+ } else { // White pixel
+ if ((currentState & 1) == 0) { // Counting black pixels
+ if (currentState == 4) { // A winner?
+ if (foundPatternCross(stateCount)) { // Yes
+ bool confirmed = handlePossibleCenter(stateCount, i, j);
+ if (confirmed) {
+ iSkip = 1; // Go back to examining each line
+ if (hasSkipped_) {
+ done = haveMultiplyConfirmedCenters();
+ } else {
+ int rowSkip = findRowSkip();
+ if (rowSkip > stateCount[2]) {
+ // Skip rows between row of lower confirmed center
+ // and top of presumed third confirmed center
+ // but back up a bit to get a full chance of detecting
+ // it, entire width of center of finder pattern
+
+ // Skip by rowSkip, but back off by stateCount[2] (size
+ // of last center of pattern we saw) to be conservative,
+ // and also back off by iSkip which is about to be
+ // re-added
+ i += rowSkip - stateCount[2] - iSkip;
+ j = maxJ - 1;
+ }
+ }
+ } else {
+ // Advance to next black pixel
+ do {
+ j++;
+ } while (j < maxJ && !image_->get(j, i));
+ j--; // back up to that last white pixel
+ }
+ // Clear state to start looking again
+ currentState = 0;
+ stateCount[0] = 0;
+ stateCount[1] = 0;
+ stateCount[2] = 0;
+ stateCount[3] = 0;
+ stateCount[4] = 0;
+ } else { // No, shift counts back by two
+ stateCount[0] = stateCount[2];
+ stateCount[1] = stateCount[3];
+ stateCount[2] = stateCount[4];
+ stateCount[3] = 1;
+ stateCount[4] = 0;
+ currentState = 3;
+ }
+ } else {
+ stateCount[++currentState]++;
+ }
+ } else { // Counting white pixels
+ stateCount[currentState]++;
+ }
+ }
+ }
+ if (foundPatternCross(stateCount)) {
+ bool confirmed = handlePossibleCenter(stateCount, i, maxJ);
+ if (confirmed) {
+ iSkip = stateCount[0];
+ if (hasSkipped_) {
+ // Found a third one
+ done = haveMultiplyConfirmedCenters();
+ }
+ }
+ }
+ }
+
+ vector<Ref<FinderPattern> > patternInfo = selectBestPatterns();
+ patternInfo = orderBestPatterns(patternInfo);
+
+ Ref<FinderPatternInfo> result(new FinderPatternInfo(patternInfo));
+ return result;
+}
+}
+}
diff --git a/cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternFinder.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternFinder.h
diff --git a/cpp/core/src/zxing/qrcode/detector/FinderPatternInfo.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternInfo.cpp
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/FinderPatternInfo.cpp
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternInfo.cpp
diff --git a/cpp/core/src/zxing/qrcode/detector/FinderPatternInfo.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternInfo.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/FinderPatternInfo.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/FinderPatternInfo.h
diff --git a/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/QREdgeDetector.cpp b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/QREdgeDetector.cpp
new file mode 100644
index 0000000..18affe6
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/QREdgeDetector.cpp
@@ -0,0 +1,168 @@
+/*
+ * QREdgeDetector.cpp
+ * zxing
+ *
+ * Created by Ralf Kistner on 7/12/2009.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/qrcode/detector/QREdgeDetector.h>
+#include <zxing/common/EdgeDetector.h>
+
+using namespace std;
+
+namespace zxing {
+namespace qrcode {
+
+static const float patternEdgeThreshold = 2;
+static const int patternEdgeWidth = 3;
+static const float patternEdgeSearchRatio = 1.1;
+static const int patternEdgeSkip = 2;
+
+static const float accurateEdgeThreshold = 3.3;
+static const int accurateEdgeWidth = 7;
+static const int accurateEdgeSkip = 2;
+
+static Point guessLastPattern(Point topLeft, Point topRight, Point bottomLeft) {
+ return Point(topRight.x - topLeft.x + bottomLeft.x, topRight.y - topLeft.y + bottomLeft.y);
+}
+
+static Point rp(Ref<ResultPoint> rp) {
+ return Point(rp->getX(), rp->getY());
+}
+
+QREdgeDetector::QREdgeDetector(Ref<BitMatrix> image) : Detector(image) { }
+
+Ref<PerspectiveTransform> QREdgeDetector::createTransform(Ref<ResultPoint> topLeft, Ref<ResultPoint> topRight, Ref <
+ ResultPoint > bottomLeft, Ref<ResultPoint> alignmentPattern, int dimension) {
+
+ if(alignmentPattern == NULL) {
+ Point corner = findCorner(*Detector::getImage(), rp(topLeft), rp(topRight), rp(bottomLeft), dimension);
+ return get1CornerTransform(rp(topLeft), rp(topRight), rp(bottomLeft), corner, dimension);
+ } else {
+ return Detector::createTransform(topLeft, topRight, bottomLeft, alignmentPattern, dimension);
+ }
+}
+
+
+
+
+Point QREdgeDetector::findCorner(const BitMatrix& image, Point topLeft, Point topRight, Point bottomLeft, int dimension) {
+ Point bottomRight = guessLastPattern(topLeft, topRight, bottomLeft);
+
+ Line bottomEst = findPatternEdge(image, bottomLeft, topLeft, bottomRight, false);
+ Line rightEst = findPatternEdge(image, topRight, topLeft, bottomRight, true);
+
+ //return EdgeDetector::intersection(bottomEst, rightEst);
+
+ Line bottom = EdgeDetector::findLine(image, bottomEst, false, accurateEdgeWidth, accurateEdgeThreshold, accurateEdgeSkip);
+ Line right = EdgeDetector::findLine(image, rightEst, true, accurateEdgeWidth, accurateEdgeThreshold, accurateEdgeSkip);
+
+
+ return EdgeDetector::intersection(bottom, right);
+}
+
+Line QREdgeDetector::findPatternEdge(const BitMatrix& image, Point pattern, Point opposite, Point direction, bool invert) {
+ Point start = endOfReverseBlackWhiteBlackRun(image, pattern, opposite);
+
+ float dx = pattern.x - start.x;
+ float dy = pattern.y - start.y;
+ float dist = sqrt(dx*dx + dy*dy);
+
+ float dirX = direction.x - pattern.x;
+ float dirY = direction.y - pattern.y;
+ float dirSize = sqrt(dirX*dirX + dirY*dirY);
+
+ float nx = dirX/dirSize;
+ float ny = dirY/dirSize;
+
+ float search = dist * patternEdgeSearchRatio;
+ Point a(start.x + nx*search, start.y + ny*search);
+ Point b(start.x - nx*search, start.y - ny*search);
+
+ return EdgeDetector::findLine(image, Line(a, b), invert, patternEdgeWidth, patternEdgeThreshold, patternEdgeSkip);
+}
+
+
+Ref<PerspectiveTransform> QREdgeDetector::get1CornerTransform(Point topLeft, Point topRight, Point bottomLeft, Point corner, int dimension) {
+ float dimMinusThree = (float) dimension - 3.5f;
+
+ Ref<PerspectiveTransform> transform(PerspectiveTransform::quadrilateralToQuadrilateral(3.5f, 3.5f, dimMinusThree, 3.5f, dimension,
+ dimension, 3.5f, dimMinusThree, topLeft.x, topLeft.y, topRight.x,
+ topRight.y, corner.x, corner.y, bottomLeft.x, bottomLeft.y));
+
+ return transform;
+}
+
+// Adapted from "sizeOfBlackWhiteBlackRun" in zxing::qrcode::Detector
+Point QREdgeDetector::endOfReverseBlackWhiteBlackRun(const BitMatrix& image, Point from, Point to) {
+ int fromX = (int)from.x;
+ int fromY = (int)from.y;
+ int toX = (int)to.x;
+ int toY = (int)to.y;
+
+ bool steep = abs(toY - fromY) > abs(toX - fromX);
+ if (steep) {
+ int temp = fromX;
+ fromX = fromY;
+ fromY = temp;
+ temp = toX;
+ toX = toY;
+ toY = temp;
+ }
+
+ int dx = abs(toX - fromX);
+ int dy = abs(toY - fromY);
+ int error = -dx >> 1;
+ int ystep = fromY < toY ? -1 : 1;
+ int xstep = fromX < toX ? -1 : 1;
+ int state = 0; // In black pixels, looking for white, first or second time
+
+ // In case there are no points, prepopulate to from
+ int realX = fromX;
+ int realY = fromY;
+ for (int x = fromX, y = fromY; x != toX; x += xstep) {
+ realX = steep ? y : x;
+ realY = steep ? x : y;
+
+ if(realX < 0 || realY < 0 || realX >= (int)image.getWidth() || realY >= (int)image.getHeight())
+ break;
+
+ if (state == 1) { // In white pixels, looking for black
+ if (image.get(realX, realY)) {
+ state++;
+ }
+ } else {
+ if (!image.get(realX, realY)) {
+ state++;
+ }
+ }
+
+ if (state == 3) { // Found black, white, black, and stumbled back onto white; done
+ return Point(realX, realY);
+ }
+ error += dy;
+ if (error > 0) {
+ y += ystep;
+ error -= dx;
+ }
+ }
+
+ // B-W-B run not found, return the last point visited.
+ return Point(realX, realY);
+}
+
+} // namespace qrcode
+} // namespace zxing
diff --git a/cpp/core/src/zxing/qrcode/detector/QREdgeDetector.h b/symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/QREdgeDetector.h
similarity index 100%
copy from cpp/core/src/zxing/qrcode/detector/QREdgeDetector.h
copy to symbian/ZXingBarcodeReader/group/zxing/qrcode/detector/QREdgeDetector.h
diff --git a/symbian/ZXingBarcodeReader/inc/CameraImage.h b/symbian/ZXingBarcodeReader/inc/CameraImage.h
new file mode 100644
index 0000000..a919504
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/inc/CameraImage.h
@@ -0,0 +1,31 @@
+#ifndef CAMERAIMAGE_H
+#define CAMERAIMAGE_H
+
+#include <zxing/LuminanceSource.h>
+#include <string>
+#include <FBS.H>
+
+using namespace zxing;
+using namespace std;
+
+class CameraImage : public LuminanceSource
+{
+public:
+ CameraImage();
+ CameraImage(CameraImage& otherInstance);
+ ~CameraImage();
+
+ int getWidth();
+ int getHeight();
+
+ unsigned char getPixel(int x, int y);
+
+ void setImage(CFbsBitmap* newImage);
+
+ CFbsBitmap* getImage();
+
+private:
+ CFbsBitmap* image;
+};
+
+#endif //CAMERAIMAGE_H
diff --git a/symbian/ZXingBarcodeReader/inc/CameraWrapperExample.hrh b/symbian/ZXingBarcodeReader/inc/CameraWrapperExample.hrh
new file mode 100644
index 0000000..806b0cc
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/inc/CameraWrapperExample.hrh
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#ifndef __CAMERAWRAPPEREXAMPLE_HRH__
+#define __CAMERAWRAPPEREXAMPLE_HRH__
+
+#define _UID3 0xEF24C10A
+
+// CameraWrapperExample enumerate command codes
+enum TCameraWrapperExampleIds
+ {
+ ECommand1 = 0x6001, // start value must not be 0
+ ECommand2,
+ EHelp,
+ EAbout
+ };
+
+#endif // __CAMERAWRAPPEREXAMPLE_HRH__
diff --git a/symbian/ZXingBarcodeReader/inc/CameraWrapperExample.pan b/symbian/ZXingBarcodeReader/inc/CameraWrapperExample.pan
new file mode 100644
index 0000000..052c691
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/inc/CameraWrapperExample.pan
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#ifndef __CAMERAWRAPPEREXAMPLE_PAN__
+#define __CAMERAWRAPPEREXAMPLE_PAN__
+
+enum TCameraWrapperExamplePanics
+ {
+ ECameraWrapperExampleUi = 1
+ // add further panics here
+ };
+
+inline void Panic (TCameraWrapperExamplePanics aReason )
+ {
+ _LIT (applicationName, "ZXingBarcodeReader" );
+ User::Panic (applicationName, aReason );
+ }
+
+#endif // __CAMERAWRAPPEREXAMPLE_PAN__
diff --git a/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleAppUi.h b/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleAppUi.h
new file mode 100644
index 0000000..1efab67
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleAppUi.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#ifndef __CAMERAWRAPPEREXAMPLEAPPUI_h__
+#define __CAMERAWRAPPEREXAMPLEAPPUI_h__
+
+// INCLUDES
+#include <aknappui.h>
+
+//#define EKeyZoomIn EKeyApplicationC
+//#define EKeyZoomOut EKeyApplicationD
+//#define EKeyVolumeUp EKeyIncVolume
+//#define EKeyVolumeDown EKeyDecVolume
+
+
+#ifdef ENABLE_CAMERA_SHUTTER
+// Focus key events (shutter key pressed half-way down)
+const TInt KStdKeyCameraFocus = 0xe2;
+const TInt KStdKeyCameraFocus2 = 0xeb; // S60 3.2 and onwards
+
+// All known event codes used for the camera shutter key on S60 3.x devices
+const TUint KKeyCameraShutter1 = 0xf883;
+const TUint KKeyCameraShutter2 = 0xf849; // S60 3.2
+const TUint KKeyCameraNseries1 = 0xf881; // S60 3.2 Nseries
+const TUint KKeyCameraNseries2 = 0xf88c;
+
+const TUint KCameraShutterKeyEventCodes[6] = {
+ EKeyCamera, // general camera key
+ KKeyCameraShutter1,
+ KKeyCameraShutter2,
+ KKeyCameraNseries1,
+ KKeyCameraNseries2,
+ 0 };
+#endif
+
+
+// FORWARD DECLARATIONS
+class CCameraWrapperExampleAppView;
+
+// CLASS DECLARATION
+class CCameraWrapperExampleAppUi : public CAknAppUi,
+ public MCoeForegroundObserver
+ {
+ public:
+ // Constructors and destructor
+ void ConstructL ();
+ CCameraWrapperExampleAppUi ();
+ virtual ~CCameraWrapperExampleAppUi ();
+
+ private:
+ TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+ void HandleCommandL (TInt aCommand );
+ void HandleResourceChangeL(TInt aType);
+
+ #ifdef ENABLE_CAMERA_SHUTTER
+ void CaptureCameraShutter(TBool aEnable);
+ #endif
+
+ public:
+ void UseOptionsExitCbaL();
+ void UseOptionsBackCbaL();
+ TBool IsBackCBA();
+
+ private: // From MCoeForegroundObserver
+ void HandleGainingForeground();
+ void HandleLosingForeground();
+
+ private:
+ // Data
+ CCameraWrapperExampleAppView* iAppView;
+ RArray<TInt32> iShutterKeyHandles;
+ TBool iCameraKeyCaptured;
+
+ };
+
+#endif // __CAMERAWRAPPEREXAMPLEAPPUI_h__
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleAppView.h b/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleAppView.h
new file mode 100644
index 0000000..be7f364
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleAppView.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#ifndef __CAMERAWRAPPEREXAMPLEAPPVIEW_h__
+#define __CAMERAWRAPPEREXAMPLEAPPVIEW_h__
+
+// INCLUDES
+#include <coecntrl.h>
+#include <fbs.h>
+
+#include <cameraengine.h>
+#include <cameraengineobserver.h>
+#include <akninfopopupnotecontroller.h>
+#include <e32base.h>
+#include <string>
+
+class CCameraWrapperExampleAppUi;
+
+// CLASS DECLARATION
+class CCameraWrapperExampleAppView :
+public CCoeControl, public MCameraEngineObserver
+ {
+ public:
+ // Constructors
+ static CCameraWrapperExampleAppView* NewL (const TRect& aRect );
+ static CCameraWrapperExampleAppView* NewLC (const TRect& aRect );
+ virtual ~CCameraWrapperExampleAppView ();
+
+ private:
+ // Functions from base classes
+ void Draw (const TRect& aRect ) const;
+ void DrawTexts(CWindowGc& gc) const;
+ void SizeChanged ();
+ void HandlePointerEventL (const TPointerEvent& aPointerEvent );
+ void SetTitle(const TDesC& aTitle);
+ void SetError( const TDesC& aMsg, TInt aVal );
+ void SetError( const TDesC& aMsg, TInt aVal1, TInt aVal2 );
+ void StartFocusing();
+ void StorePicture( TDesC8* aData );
+
+ public:
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+ CCameraEngine* CameraEngine(){return iCameraWrapper;};
+ void CancelCapturedPicture(TBool aCleanTexts=ETrue);
+ void Capture();
+
+ private: // From MCameraEngineObserver
+ void MceoCameraReady();
+ void MceoFocusComplete();
+ void MceoCapturedDataReady( TDesC8* aData );
+ void MceoCapturedBitmapReady( CFbsBitmap* aBitmap );
+ void MceoViewFinderFrameReady( CFbsBitmap& aFrame );
+ void MceoHandleError( TCameraEngineError aErrorType, TInt aError );
+ void MceoHandleOtherEvent( const TECAMEvent& /*aEvent*/ );
+
+ private:
+ // Constructors
+ void ConstructL (const TRect& aRect );
+ CCameraWrapperExampleAppView ();
+
+ public:
+ void decodeBackbufferImage();
+
+ private:
+ void CreateBackBufferL();
+ void ReleaseBackBuffer();
+ void ShowResultL(TDesC16& message);
+
+ //timer
+ void StartTimer();
+ static TInt Tick(TAny* aObject);
+
+ private:
+ // Data
+
+ CCameraWrapperExampleAppUi* iAppUi;
+
+ // CameraWrapper class
+ CCameraEngine* iCameraWrapper;
+
+ TSize iViewFinderSize;
+ TSize iCaptureSize;
+
+ CFbsBitmap* iBackBuffer;
+ CFbsBitmapDevice* iBackBufferDevice;
+ CFbsBitGc* iBackBufferContext;
+
+ const CFont* iTitleFont;
+ TBuf<50> iTitle;
+ TRect iFocusRect;
+
+ // Is new picture focused whit camera shutter key
+ TBool iCameraShutterFocusing;
+
+ HBufC8* iData;
+
+
+// Set the note as the member variable of your application view (for example, CAknView)
+private:
+ CAknInfoPopupNoteController* iNote;
+ CPeriodic* iPeriodic;
+
+ };
+
+#endif // __CAMERAWRAPPEREXAMPLEAPPVIEW_h__
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleApplication.h b/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleApplication.h
new file mode 100644
index 0000000..3b6d4a6
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleApplication.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#ifndef __CAMERAWRAPPEREXAMPLEAPPLICATION_H__
+#define __CAMERAWRAPPEREXAMPLEAPPLICATION_H__
+
+// INCLUDES
+#include <aknapp.h>
+#include "CameraWrapperExample.hrh"
+
+// UID for the application;
+// this should correspond to the uid defined in the mmp file
+const TUid KUidCameraWrapperExampleApp =
+ {
+ _UID3
+ };
+
+// CLASS DECLARATION
+
+class CCameraWrapperExampleApplication : public CAknApplication
+ {
+ public:
+ // Functions from base classes
+ TUid AppDllUid () const;
+
+ protected:
+ // Functions from base classes
+ CApaDocument* CreateDocumentL ();
+ };
+
+#endif // __CAMERAWRAPPEREXAMPLEAPPLICATION_H__
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleDocument.h b/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleDocument.h
new file mode 100644
index 0000000..e0f2c3a
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/inc/CameraWrapperExampleDocument.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#ifndef __CAMERAWRAPPEREXAMPLEDOCUMENT_h__
+#define __CAMERAWRAPPEREXAMPLEDOCUMENT_h__
+
+// INCLUDES
+#include <akndoc.h>
+
+// FORWARD DECLARATIONS
+class CCameraWrapperExampleAppUi;
+class CEikApplication;
+
+// CLASS DECLARATION
+class CCameraWrapperExampleDocument : public CAknDocument
+ {
+ public:
+ // Constructors and destructor
+ static CCameraWrapperExampleDocument* NewL (CEikApplication& aApp );
+ static CCameraWrapperExampleDocument* NewLC (CEikApplication& aApp );
+ virtual ~CCameraWrapperExampleDocument ();
+
+ public:
+ // Functions from base classes
+ CEikAppUi* CreateAppUiL ();
+
+ private:
+ // Constructors
+ void ConstructL ();
+ CCameraWrapperExampleDocument (CEikApplication& aApp );
+
+ private:
+ // Data
+
+ };
+
+#endif // __CAMERAWRAPPEREXAMPLEDOCUMENT_h__
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/sis/ZXingBarcodeReader_S60.pkg b/symbian/ZXingBarcodeReader/sis/ZXingBarcodeReader_S60.pkg
new file mode 100644
index 0000000..eea5136
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/sis/ZXingBarcodeReader_S60.pkg
@@ -0,0 +1,27 @@
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"ZXingBarcodeReader"},(0xEF24C10A),1,0,0
+
+;Localised Vendor name
+%{"Forum Nokia"}
+
+;Unique Vendor name
+:"Forum Nokia"
+
+;Supports S60 3rd Edition
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Supports S60 5th Edition
+[0x1028315F], 0, 0, 0, {"S60ProductID"}
+
+;Files to install
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\ZXingBarcodeReader_0xEF24C10A.exe" -"!:\sys\bin\ZXingBarcodeReader_0xEF24C10A.exe"
+"$(EPOCROOT)Epoc32\data\z\resource\apps\ZXingBarcodeReader_0xEF24C10A.rsc" -"!:\resource\apps\ZXingBarcodeReader_0xEF24C10A.rsc"
+"$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\ZXingBarcodeReader_0xEF24C10A_reg.rsc" -"!:\private\10003a3f\import\apps\ZXingBarcodeReader_0xEF24C10A_reg.rsc"
+"$(EPOCROOT)Epoc32\data\z\resource\apps\ZXingBarcodeReader_0xEF24C10A.mif" -"!:\resource\apps\ZXingBarcodeReader_0xEF24C10A.mif"
+
+;CameraWrapper
+@"$(EPOCROOT)Epoc32\InstallToDevice\CameraWrapper\sis\camerawrapper.sisx", (0x2001ec5f)
+
diff --git a/symbian/ZXingBarcodeReader/sis/ZXingBarcodeReader_S60.sisx b/symbian/ZXingBarcodeReader/sis/ZXingBarcodeReader_S60.sisx
new file mode 100644
index 0000000..fc5a929
Binary files /dev/null and b/symbian/ZXingBarcodeReader/sis/ZXingBarcodeReader_S60.sisx differ
diff --git a/symbian/ZXingBarcodeReader/src/CameraImage.cpp b/symbian/ZXingBarcodeReader/src/CameraImage.cpp
new file mode 100644
index 0000000..4ebce64
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/src/CameraImage.cpp
@@ -0,0 +1,45 @@
+#include "CameraImage.h"
+
+
+CameraImage::CameraImage() : LuminanceSource()
+{
+}
+
+CameraImage::CameraImage(CameraImage& otherInstance) : LuminanceSource()
+{
+ image = otherInstance.getImage();
+}
+
+CameraImage::~CameraImage()
+{
+}
+
+int CameraImage::getWidth()
+{
+ return image->SizeInPixels().iWidth;
+}
+
+int CameraImage::getHeight()
+{
+ return image->SizeInPixels().iHeight;
+}
+
+unsigned char CameraImage::getPixel(int x, int y)
+{
+ TPoint pixelPosition(x,y);
+ TRgb color;
+ image->GetPixel(color, pixelPosition);
+ return ((color.Red() + color.Green() + color.Blue()) / 3);
+}
+
+void CameraImage::setImage(CFbsBitmap* newImage)
+{
+ image = newImage;
+}
+
+CFbsBitmap* CameraImage::getImage()
+{
+ return image;
+}
+
+
diff --git a/symbian/ZXingBarcodeReader/src/CameraWrapperExample.cpp b/symbian/ZXingBarcodeReader/src/CameraWrapperExample.cpp
new file mode 100644
index 0000000..4ec789d
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/src/CameraWrapperExample.cpp
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+// INCLUDE FILES
+#include <eikstart.h>
+#include "CameraWrapperExampleApplication.h"
+
+LOCAL_C CApaApplication* NewApplication ()
+ {
+ return new CCameraWrapperExampleApplication;
+ }
+
+GLDEF_C TInt E32Main ()
+ {
+ return EikStart::RunApplication (NewApplication );
+ }
+
diff --git a/symbian/ZXingBarcodeReader/src/CameraWrapperExampleAppUi.cpp b/symbian/ZXingBarcodeReader/src/CameraWrapperExampleAppUi.cpp
new file mode 100644
index 0000000..585c031
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/src/CameraWrapperExampleAppUi.cpp
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+// INCLUDE FILES
+#include <avkon.hrh>
+#include <eikon.hrh>
+#include <aknmessagequerydialog.h>
+#include <aknnotewrappers.h>
+#include <eikenv.h>
+
+#include <ZXingBarcodeReader_0xEF24C10A.rsg>
+#include "CameraWrapperExample.hrh"
+#include "CameraWrapperExample.pan"
+#include "CameraWrapperExampleApplication.h"
+#include "CameraWrapperExampleAppUi.h"
+#include "CameraWrapperExampleAppView.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+void CCameraWrapperExampleAppUi::ConstructL ()
+ {
+ // Initialise app UI with standard value.
+ BaseConstructL (CAknAppUi::EAknEnableSkin );
+
+ // Start receiving camera shutter key events
+ #ifdef ENABLE_CAMERA_SHUTTER
+ CaptureCameraShutter(ETrue);
+ #endif
+
+ // Make this class observe changes in foreground events
+ iEikonEnv->AddForegroundObserverL(*this);
+
+ // Create view
+ iAppView = CCameraWrapperExampleAppView::NewL (ClientRect () );
+ }
+
+CCameraWrapperExampleAppUi::CCameraWrapperExampleAppUi ()
+ {
+ }
+
+CCameraWrapperExampleAppUi::~CCameraWrapperExampleAppUi ()
+ {
+ delete iAppView;
+
+ #ifdef ENABLE_CAMERA_SHUTTER
+ CaptureCameraShutter(EFalse);
+ #endif
+
+ iShutterKeyHandles.Close();
+ }
+
+#ifdef ENABLE_CAMERA_SHUTTER
+
+void CCameraWrapperExampleAppUi::CaptureCameraShutter(TBool aEnable)
+ {
+ // Try to capture events from the camera shutter key(s)
+ // http://wiki.forum.nokia.com/index.php/KIS000563_-_Camera_shutter_key_(EKeyCamera_events)_cannot_be_used_in_3rd_party_applications
+ if (aEnable && !iCameraKeyCaptured)
+ {
+ iCameraKeyCaptured = ETrue;
+ // Enable capturing
+ RProcess proc;
+ iShutterKeyHandles.Reset();
+ if(proc.HasCapability(ECapabilitySwEvent))
+ {
+ for(TInt i=0; KCameraShutterKeyEventCodes[i] != 0; i++)
+ {
+ TInt32 handle = iEikonEnv->RootWin().CaptureKey( KCameraShutterKeyEventCodes[i], 0, 0 );
+ if(handle >= 0)
+ {
+ iShutterKeyHandles.Append(handle);
+ }
+ }
+ }
+ }
+ else if(!aEnable && iCameraKeyCaptured)
+ {
+ iCameraKeyCaptured = EFalse;
+ // Disable capturing
+ // Release the captured camera shutter key(s)
+ for(TInt i=0; i < iShutterKeyHandles.Count(); i++)
+ {
+ iEikonEnv->RootWin().CancelCaptureKey( iShutterKeyHandles[i] );
+ }
+ }
+ }
+#endif
+
+
+void CCameraWrapperExampleAppUi::HandleGainingForeground()
+ {
+ // Application gets focused so reserve the camera
+ // http://wiki.forum.nokia.com/index.php/CS000821_-_Handling_Camera_resource
+ if ( iAppView &&
+ iAppView->CameraEngine() &&
+ iAppView->CameraEngine()->State() != CCameraEngine::EEngineNotReady )
+ {
+ iAppView->CameraEngine()->ReserveAndPowerOn();
+
+#ifdef ENABLE_CAMERA_SHUTTER
+ CaptureCameraShutter(ETrue);
+#endif
+ }
+ }
+
+void CCameraWrapperExampleAppUi::HandleLosingForeground()
+ {
+ // Application loses focus so release the camera
+ // http://wiki.forum.nokia.com/index.php/CS000821_-_Handling_Camera_resource
+ if ( iAppView &&
+ iAppView->CameraEngine() &&
+ iAppView->CameraEngine()->State() != CCameraEngine::EEngineNotReady )
+ {
+ iAppView->CameraEngine()->ReleaseAndPowerOff();
+
+#ifdef ENABLE_CAMERA_SHUTTER
+ CaptureCameraShutter(EFalse);
+#endif
+ }
+ }
+
+void CCameraWrapperExampleAppUi::UseOptionsExitCbaL()
+ {
+ CEikButtonGroupContainer* cba = Cba();
+ if (cba)
+ {
+ cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_EXIT);
+ cba->DrawNow();
+ }
+ }
+
+void CCameraWrapperExampleAppUi::UseOptionsBackCbaL()
+ {
+ CEikButtonGroupContainer* cba = Cba();
+ if (cba)
+ {
+ cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK);
+ cba->DrawNow();
+ }
+ }
+
+TBool CCameraWrapperExampleAppUi::IsBackCBA()
+ {
+ CEikButtonGroupContainer* cba = Cba();
+ // NOTE: There should be EAknSoftkeyBack in the application because
+ // we use R_AVKON_SOFTKEYS_SELECT_BACK, but it seems that there is EAknSoftkeyCancel
+ CCoeControl* back = cba->ControlOrNull(EAknSoftkeyBack);
+ CCoeControl* cancel = cba->ControlOrNull(EAknSoftkeyCancel);
+ if (back || cancel)
+ return ETrue;
+ else
+ return EFalse;
+ }
+
+TKeyResponse CCameraWrapperExampleAppUi::HandleKeyEventL(
+ const TKeyEvent& aKeyEvent,TEventCode aType)
+ {
+ // Capture picture with selection key
+ switch ( aKeyEvent.iCode )
+ {
+ case EKeyOK:
+ case EStdKeyDevice3:
+ case EKeyUpArrow:
+ case EKeyDownArrow:
+ {
+ // Capture picture
+ return iAppView->OfferKeyEventL(aKeyEvent,aType);
+ }
+ default:
+ {
+ break;
+ }
+ };
+
+ // Camera shutter events handling
+ #ifdef ENABLE_CAMERA_SHUTTER
+ // Camera shutter autofocus
+ switch ( aKeyEvent.iScanCode )
+ {
+ case KStdKeyCameraFocus:
+ case KStdKeyCameraFocus2:
+ {
+ // Camera shutter autofocus
+ return iAppView->OfferKeyEventL(aKeyEvent,aType);
+ }
+ default:
+ {
+ break;
+ }
+ };
+ // Camera shutter key
+ for(TInt i=0; KCameraShutterKeyEventCodes[i] != 0; i++)
+ {
+ if( KCameraShutterKeyEventCodes[i] == aKeyEvent.iCode )
+ {
+ // Capture image
+ iAppView->Capture();
+ return EKeyWasConsumed;
+ }
+ }
+ #endif
+
+ return EKeyWasNotConsumed;
+ }
+
+void CCameraWrapperExampleAppUi::HandleCommandL (TInt aCommand )
+ {
+ switch (aCommand )
+ {
+ case EEikCmdExit:
+ case EAknSoftkeyExit:
+ {
+ Exit();
+ break;
+ }
+ case EAknSoftkeyBack:
+ {
+ iAppView->CancelCapturedPicture();
+ UseOptionsExitCbaL();
+ break;
+ }
+ case EAbout:
+ {
+ CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog ();
+ dlg->PrepareLC (R_ABOUT_QUERY_DIALOG );
+ HBufC* title = iEikonEnv->AllocReadResourceLC (R_ABOUT_DIALOG_TITLE );
+ dlg->QueryHeading ()->SetTextL (*title );
+ CleanupStack::PopAndDestroy (); //title
+ HBufC* msg = iEikonEnv->AllocReadResourceLC (R_ABOUT_DIALOG_TEXT );
+ dlg->SetMessageTextL (*msg );
+ CleanupStack::PopAndDestroy (); //msg
+ dlg->RunLD();
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ };
+ }
+
+void CCameraWrapperExampleAppUi::HandleResourceChangeL(TInt aType)
+ {
+ CAknAppUi::HandleResourceChangeL( aType );
+
+ if ( aType==KEikDynamicLayoutVariantSwitch )
+ {
+ if (iAppView)
+ {
+ TRect rect;
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,rect);
+ iAppView->SetRect(rect);
+ }
+ }
+
+ }
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/src/CameraWrapperExampleAppView.cpp b/symbian/ZXingBarcodeReader/src/CameraWrapperExampleAppView.cpp
new file mode 100644
index 0000000..66daa89
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/src/CameraWrapperExampleAppView.cpp
@@ -0,0 +1,575 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+// INCLUDE FILES
+#include <coemain.h>
+#include <eikon.hrh>
+#include <aknutils.h>
+#include <pathinfo.h>
+#include <f32file.h>
+#include <BAUTILS.H>
+#include "CameraWrapperExampleAppView.h"
+#include "CameraWrapperExampleAppUi.h"
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+CCameraWrapperExampleAppView* CCameraWrapperExampleAppView::NewL (const TRect& aRect )
+ {
+ CCameraWrapperExampleAppView* self = CCameraWrapperExampleAppView::NewLC (aRect );
+ CleanupStack::Pop (self );
+ return self;
+ }
+
+CCameraWrapperExampleAppView* CCameraWrapperExampleAppView::NewLC (const TRect& aRect )
+ {
+ CCameraWrapperExampleAppView* self = new (ELeave) CCameraWrapperExampleAppView;
+ CleanupStack::PushL (self );
+ self->ConstructL (aRect );
+ return self;
+ }
+
+void CCameraWrapperExampleAppView::ConstructL (const TRect& aRect )
+ {
+ // Create a window for this application view
+ CreateWindowL ();
+
+ iTitleFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont);
+
+ iAppUi = static_cast<CCameraWrapperExampleAppUi*>(iEikonEnv->EikAppUi());
+
+ // Set the windows size
+ SetRect (aRect );
+
+ //Start decoder timer.
+ StartTimer();
+
+ // Activate the window, which makes it ready to be drawn
+ ActivateL ();
+ }
+
+CCameraWrapperExampleAppView::CCameraWrapperExampleAppView () : iPeriodic(NULL)
+ {
+ }
+
+CCameraWrapperExampleAppView::~CCameraWrapperExampleAppView ()
+ {
+ if (iCameraWrapper)
+ {
+ iCameraWrapper->ReleaseAndPowerOff();
+ }
+ delete iCameraWrapper;
+ delete iData;
+
+ ReleaseBackBuffer();
+ }
+
+TKeyResponse CCameraWrapperExampleAppView::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
+ {
+ switch ( aKeyEvent.iCode )
+ {
+ case EKeyOK:
+ case EStdKeyDevice3:
+ {
+ // Capture picture
+ iCameraShutterFocusing = EFalse;
+ StartFocusing();
+ return EKeyWasConsumed;
+ }
+ case EKeyUpArrow:
+ {
+ if (iCameraWrapper->State() == CCameraEngine::EEngineViewFinding)
+ {
+ iCameraWrapper->AdjustDigitalZoom(ETrue);
+ }
+ return EKeyWasConsumed;
+ }
+ case EKeyDownArrow:
+ {
+ if (iCameraWrapper->State() == CCameraEngine::EEngineViewFinding)
+ {
+ iCameraWrapper->AdjustDigitalZoom(EFalse);
+
+ }
+ return EKeyWasConsumed;
+ }
+ default:
+ {
+ break;
+ }
+ };
+
+
+
+#ifdef ENABLE_CAMERA_SHUTTER
+ // Camera shutter autofocus
+ switch ( aKeyEvent.iScanCode )
+ {
+ case KStdKeyCameraFocus:
+ case KStdKeyCameraFocus2:
+ {
+ // Camera shutter autofocus
+ if (aType == EEventKeyDown)
+ {
+ if (!iAppUi->IsBackCBA())
+ {
+ iCameraShutterFocusing = ETrue;
+ StartFocusing();
+ }
+ return EKeyWasConsumed;
+ }
+ else if (aType == EEventKeyUp)
+ {
+ // Camera state can be EEngineIdle or EEngineFocusing
+ if (!iAppUi->IsBackCBA() && (iCameraWrapper->State() == CCameraEngine::EEngineFocusing ||
+ iCameraWrapper->State() == CCameraEngine::EEngineIdle))
+ {
+ iCameraWrapper->FocusCancel();
+ CancelCapturedPicture();
+ iAppUi->UseOptionsExitCbaL();
+ }
+ return EKeyWasConsumed;
+ }
+ }
+ default:
+ {
+ break;
+ }
+ };
+#endif
+
+ return EKeyWasNotConsumed;
+ }
+
+void CCameraWrapperExampleAppView::CancelCapturedPicture(TBool aCleanTexts)
+ {
+ if (iCameraWrapper && iCameraWrapper->State() == CCameraEngine::EEngineIdle)
+ {
+ TRAPD(err,iCameraWrapper->StartViewFinderL(iViewFinderSize));
+ if (aCleanTexts)
+ {
+ if (err)
+ {
+ SetError(_L("Camera viewfinder error %d"), err);
+ }
+ else
+ {
+ SetTitle(_L("Camera viewfinder"));
+ }
+ }
+ }
+ }
+
+void CCameraWrapperExampleAppView::Draw(const TRect& /*aRect*/) const
+ {
+ CWindowGc& gc = SystemGc ();
+
+ // Draw backbuffer that has camera picture
+ gc.BitBlt(TPoint(0, 0), iBackBuffer);
+
+ // Draw texts
+ DrawTexts(gc);
+
+ // Focus rect
+ if (iCameraWrapper && iCameraWrapper->State() == CCameraEngine::EEngineFocusing)
+ {
+ gc.SetPenColor(KRgbWhite);
+ gc.DrawRect(iFocusRect);
+ }
+ }
+
+void CCameraWrapperExampleAppView::DrawTexts(CWindowGc& gc) const
+ {
+ if (iTitle.Length()>0)
+ {
+ TRect rect(Rect());
+ gc.SetPenColor(KRgbWhite);
+ gc.UseFont(iTitleFont);
+ gc.DrawText(iTitle, rect, rect.Height()/10, CGraphicsContext::ECenter );
+ gc.DiscardFont();
+ }
+ }
+
+void CCameraWrapperExampleAppView::SizeChanged()
+ {
+ // Create camera wrapper class here because
+ // whole camera wrapper and all handles have to reset
+ // while orientatio of the application changes.
+ if (iCameraWrapper)
+ {
+ // Power off camera if it is on
+ iCameraWrapper->StopViewFinder();
+ iCameraWrapper->ReleaseAndPowerOff();
+ delete iCameraWrapper; iCameraWrapper = NULL;
+ }
+ TInt camErr(KErrNotSupported);
+ if(CCameraEngine::CamerasAvailable() > 0)
+ {
+ TRAP(camErr, iCameraWrapper = CCameraEngine::NewL(0,0,this));
+ }
+
+ // iViewFinderSize is picture size for viewfinder.
+ // iCaptureSize is picture size for capturing picture.
+ // We want fill whole screen
+ if (Rect().Size().iWidth > Rect().Size().iHeight)
+ {
+ iViewFinderSize = TSize(Rect().Size().iWidth,Rect().Size().iWidth);
+ iCaptureSize = TSize(1280,960); // Captured picture size
+ }
+ else
+ {
+ iViewFinderSize = TSize(Rect().Size().iHeight,Rect().Size().iHeight);
+ iCaptureSize = TSize(1280,960); // Captured picture size
+ }
+
+ // Focus rectangle
+ iFocusRect = Rect();
+ iFocusRect.Shrink(Rect().Size().iWidth/4, Rect().Size().iHeight/4);
+
+ // Create back buffer where recieved camera pictures are copied
+ ReleaseBackBuffer();
+ CreateBackBufferL();
+
+ // Power on camera, start viewfinder when MceoCameraReady() received
+ if(camErr == KErrNone)
+ {
+ iCameraWrapper->ReserveAndPowerOn();
+ SetTitle(_L("Camera power on"));
+ }
+ else
+ {
+ SetTitle(_L("no camera found"));
+ }
+ }
+
+void CCameraWrapperExampleAppView::HandlePointerEventL (
+ const TPointerEvent& aPointerEvent )
+ {
+ if (aPointerEvent.iType == TPointerEvent::EButton1Down)
+ {
+ // When pointing to screen camera capture picture
+ if (!iAppUi->IsBackCBA() &&
+ iCameraWrapper && iCameraWrapper->State() == CCameraEngine::EEngineViewFinding)
+ {
+ iCameraShutterFocusing = EFalse;
+ StartFocusing();
+ }
+ // After captureing, when pointing again to screen camera
+ // start viewfinder again
+ else if (!iAppUi->IsBackCBA() &&
+ iCameraWrapper && iCameraWrapper->State() == CCameraEngine::EEngineIdle)
+ {
+ CancelCapturedPicture();
+ iAppUi->UseOptionsExitCbaL();
+ }
+ }
+ }
+
+void CCameraWrapperExampleAppView::SetTitle(const TDesC& aTitle)
+ {
+ iTitle.Copy(aTitle);
+ DrawNow();
+ }
+
+void CCameraWrapperExampleAppView::SetError( const TDesC& aMsg, TInt aVal )
+ {
+ iTitle.Format(aMsg, aVal);
+ DrawNow();
+ }
+
+void CCameraWrapperExampleAppView::SetError( const TDesC& aMsg, TInt aVal1, TInt aVal2 )
+ {
+ iTitle.Format(aMsg, aVal1, aVal2);
+ DrawNow();
+ }
+
+void CCameraWrapperExampleAppView::CreateBackBufferL()
+ {
+ // create back buffer bitmap
+ iBackBuffer = new (ELeave) CFbsBitmap;
+
+ User::LeaveIfError( iBackBuffer->Create(Size(),EColor16M));
+
+ // create back buffer graphics context
+ iBackBufferDevice = CFbsBitmapDevice::NewL(iBackBuffer);
+ User::LeaveIfError(iBackBufferDevice->CreateContext(iBackBufferContext));
+ iBackBufferContext->SetPenStyle(CGraphicsContext::ESolidPen);
+
+ iBackBufferContext->SetBrushColor(KRgbBlack);
+ iBackBufferContext->Clear();
+ }
+
+void CCameraWrapperExampleAppView::ReleaseBackBuffer()
+ {
+ if (iBackBufferContext)
+ {
+ delete iBackBufferContext;
+ iBackBufferContext = NULL;
+ }
+ if (iBackBufferDevice)
+ {
+ delete iBackBufferDevice;
+ iBackBufferDevice = NULL;
+ }
+ if (iBackBuffer)
+ {
+ delete iBackBuffer;
+ iBackBuffer = NULL;
+ }
+ }
+
+void CCameraWrapperExampleAppView::MceoCameraReady()
+ {
+ iAppUi->UseOptionsExitCbaL();
+
+ if (iCameraWrapper->State() == CCameraEngine::EEngineIdle)
+ {
+ // Prepare camera
+ TRAPD(err,iCameraWrapper->PrepareL(iCaptureSize));
+ if (err)
+ {
+ SetError(_L("Camera prepare error %d"), err);
+ return;
+ }
+
+ // Start viewfinder. Viewfinder pictures starts coming into MceoViewFinderFrameReady();
+ TRAPD(err2,iCameraWrapper->StartViewFinderL(iViewFinderSize));
+ if (err2)
+ {
+ SetError(_L("Camera start viewfinder error %d"), err2);
+ return;
+ }
+
+ SetTitle(_L("Camera viewfinder"));
+ }
+ }
+
+void CCameraWrapperExampleAppView::Capture()
+ {
+ // This method is called when picture is focused with camera shutter and pressed whole down
+ // as taking a new picture
+#ifdef ENABLE_CAMERA_SHUTTER
+ if (iCameraWrapper && !iAppUi->IsBackCBA())
+ {
+ // No focus supported
+ SetTitle(_L("Capturing picture"));
+ iCameraWrapper->StopViewFinder();
+ TRAPD(err,iCameraWrapper->CaptureL());
+ if (err)
+ {
+ SetError(_L("Camera capture error %d"), err);
+ }
+ }
+#endif
+ }
+
+void CCameraWrapperExampleAppView::StartFocusing()
+ {
+ if (iCameraWrapper && iCameraWrapper->State() == CCameraEngine::EEngineViewFinding)
+ {
+ if (!iCameraWrapper->IsAutoFocusSupported())
+ {
+ // No focus supported
+ SetTitle(_L("Capturing picture"));
+ iCameraWrapper->StopViewFinder();
+ TRAPD(err,iCameraWrapper->CaptureL());
+ if (err)
+ {
+ SetError(_L("Camera capture error %d"), err);
+ }
+ }
+ else
+ {
+ // Focusing supported
+ iCameraWrapper->StartFocusL();
+ SetTitle(_L("Autofocusing..."));
+ }
+ }
+ }
+
+void CCameraWrapperExampleAppView::MceoFocusComplete()
+ {
+ // CameraEngine state is EEngineIdle
+ SetTitle(_L("Focused"));
+
+ if (iCameraShutterFocusing)
+ {
+ // Leave as focused. User must press whole camera shutter down for capturing
+ // then CCameraWrapperExampleAppView::Capture() is called
+ }
+ else
+ {
+ // Capture picture after it has focused
+ iCameraWrapper->StopViewFinder();
+ TRAPD(err,iCameraWrapper->CaptureL());
+ if (err)
+ {
+ SetError(_L("Camera capture error %d"), err);
+ }
+ }
+ }
+
+void CCameraWrapperExampleAppView::MceoCapturedDataReady( TDesC8* aData )
+ {
+ SetTitle(_L("Saving picture..."));
+
+ delete iData; iData = NULL;
+ iData = aData->Alloc();
+
+ if (iCameraWrapper)
+ iCameraWrapper->ReleaseImageBuffer();
+
+ TRAP_IGNORE(iAppUi->UseOptionsBackCbaL());
+
+ StorePicture(iData);
+ }
+
+void CCameraWrapperExampleAppView::StorePicture( TDesC8* aData )
+ {
+ // Create path for filename
+ TFileName path = PathInfo::PhoneMemoryRootPath();
+ path.Append(PathInfo::ImagesPath());
+
+ // Ensure that path exists
+ BaflUtils::EnsurePathExistsL(iEikonEnv->FsSession(),path);
+
+ // Get next free filename for the image
+ TFileName fileToSave;
+ TBool fileExists = ETrue;
+ for (TInt i=1 ; i<100 ; i++)
+ {
+ fileToSave.Copy(path);
+ fileToSave.Append(_L("cw_image_"));
+ fileToSave.AppendNum(i);
+ fileToSave.Append(_L(".jpg"));
+ fileExists = BaflUtils::FileExists(iEikonEnv->FsSession(),fileToSave);
+ if (!fileExists)
+ {
+ break;
+ }
+ }
+
+ // Save file
+ if (!fileExists)
+ {
+ RFile file;
+ TInt err = file.Create(iEikonEnv->FsSession(),fileToSave,EFileWrite);
+ if (!err)
+ {
+ file.Write(*aData);
+ file.Close();
+ SetTitle(fileToSave);
+ }
+ else
+ {
+ SetError(_L("File saving error %d"),err);
+ }
+ }
+ else
+ {
+ SetTitle(_L("File not saved, delete old pictures!"));
+ }
+ }
+
+
+void CCameraWrapperExampleAppView::MceoCapturedBitmapReady( CFbsBitmap* aBitmap )
+ {
+ if (iBackBufferContext)
+ {
+ TSize bmpSizeInPixels = aBitmap->SizeInPixels();
+ TInt xDelta = (Rect().Width() - bmpSizeInPixels.iWidth) / 2;
+ TInt yDelta = (Rect().Height() - bmpSizeInPixels.iHeight) / 2;
+ TPoint pos( xDelta, yDelta );
+
+ // Copy received viewfinder picture to back buffer
+ iBackBufferContext->BitBlt( pos, aBitmap, TRect( TPoint( 0, 0 ), bmpSizeInPixels ));
+
+ // Update backbuffer into screen
+ SetTitle(_L("New picture"));
+ }
+ if (iCameraWrapper)
+ iCameraWrapper->ReleaseImageBuffer();
+ }
+
+void CCameraWrapperExampleAppView::MceoViewFinderFrameReady( CFbsBitmap& aFrame )
+ {
+ if (iBackBufferContext)
+ {
+ TSize bmpSizeInPixels = aFrame.SizeInPixels();
+ TInt xDelta = (Rect().Width() - bmpSizeInPixels.iWidth) / 2;
+ TInt yDelta = (Rect().Height() - bmpSizeInPixels.iHeight) / 2;
+ TPoint pos( xDelta, yDelta );
+
+ // Copy received viewfinder picture to back buffer
+ iBackBufferContext->BitBlt( pos, &aFrame, TRect( TPoint( 0, 0 ), bmpSizeInPixels ));
+
+ // Update backbuffer into screen
+ DrawNow();
+ }
+ if (iCameraWrapper)
+ iCameraWrapper->ReleaseViewFinderBuffer();
+ }
+
+void CCameraWrapperExampleAppView::MceoHandleError( TCameraEngineError aErrorType, TInt aError )
+ {
+ // NOTE: CameraEngine state seems to go into CCameraEngine::EEngineIdle state
+
+ if (aErrorType == EErrReserve)
+ {
+ return; //-18 comes on application startup, but everything works ok
+ }
+
+ switch (aErrorType)
+ {
+ case EErrReserve:
+ {
+ SetError(_L("Camera reserved error (%d)"), aError);
+ break;
+ }
+ case EErrPowerOn:
+ {
+ SetError(_L("Camera power on error (%d)"), aError);
+ break;
+ }
+ case EErrViewFinderReady:
+ {
+ SetError(_L("Camera viewfinder error (%d)"), aError);
+ break;
+ }
+ case EErrImageReady:
+ {
+ SetError(_L("Camera image ready error (%d)"), aError);
+ break;
+ }
+ case EErrAutoFocusInit:
+ case EErrAutoFocusMode:
+ case EErrAutoFocusArea:
+ case EErrAutoFocusRange:
+ case EErrAutoFocusType:
+ case EErrOptimisedFocusComplete:
+ {
+ //SetTitle(_L("Try focusing again"));
+ break;
+ }
+ default:
+ {
+ SetError(_L("Error %d (%d)"), aErrorType, aError);
+ break;
+ }
+ };
+
+ // Try handle error
+ CancelCapturedPicture(EFalse);
+ iAppUi->UseOptionsExitCbaL();
+ }
+
+void CCameraWrapperExampleAppView::MceoHandleOtherEvent( const TECAMEvent& /*aEvent*/ )
+ {
+ }
+
+
+
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/src/CameraWrapperExampleApplication.cpp b/symbian/ZXingBarcodeReader/src/CameraWrapperExampleApplication.cpp
new file mode 100644
index 0000000..5542e47
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/src/CameraWrapperExampleApplication.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+// INCLUDE FILES
+#include "CameraWrapperExample.hrh"
+#include "CameraWrapperExampleDocument.h"
+#include "CameraWrapperExampleApplication.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+CApaDocument* CCameraWrapperExampleApplication::CreateDocumentL ()
+ {
+ // Create an CameraWrapperExample document, and return a pointer to it
+ return CCameraWrapperExampleDocument::NewL (*this );
+ }
+
+TUid CCameraWrapperExampleApplication::AppDllUid () const
+ {
+ // Return the UID for the CameraWrapperExample application
+ return KUidCameraWrapperExampleApp;
+ }
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/src/CameraWrapperExampleDocument.cpp b/symbian/ZXingBarcodeReader/src/CameraWrapperExampleDocument.cpp
new file mode 100644
index 0000000..0b0e2c3
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/src/CameraWrapperExampleDocument.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+// INCLUDE FILES
+#include "CameraWrapperExampleAppUi.h"
+#include "CameraWrapperExampleDocument.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+CCameraWrapperExampleDocument* CCameraWrapperExampleDocument::NewL (
+ CEikApplication& aApp )
+ {
+ CCameraWrapperExampleDocument* self = NewLC (aApp );
+ CleanupStack::Pop (self );
+ return self;
+ }
+
+CCameraWrapperExampleDocument* CCameraWrapperExampleDocument::NewLC (
+ CEikApplication& aApp )
+ {
+ CCameraWrapperExampleDocument* self =
+ new (ELeave) CCameraWrapperExampleDocument (aApp );
+
+ CleanupStack::PushL (self );
+ self->ConstructL ();
+ return self;
+ }
+
+void CCameraWrapperExampleDocument::ConstructL ()
+ {
+ }
+
+CCameraWrapperExampleDocument::CCameraWrapperExampleDocument (
+ CEikApplication& aApp ) :
+ CAknDocument (aApp )
+ {
+ }
+
+CCameraWrapperExampleDocument::~CCameraWrapperExampleDocument ()
+ {
+ }
+
+CEikAppUi* CCameraWrapperExampleDocument::CreateAppUiL ()
+ {
+ return new (ELeave) CCameraWrapperExampleAppUi;
+ }
+
+// End of File
diff --git a/symbian/ZXingBarcodeReader/src/DecodingOperations.cpp b/symbian/ZXingBarcodeReader/src/DecodingOperations.cpp
new file mode 100644
index 0000000..56bfe41
--- /dev/null
+++ b/symbian/ZXingBarcodeReader/src/DecodingOperations.cpp
@@ -0,0 +1,104 @@
+#include "CameraWrapperExampleAppView.h"
+#include <e32std.h>
+
+#include <zxing/qrcode/QRCodeReader.h>
+
+#include <zxing/common/GlobalHistogramBinarizer.h>
+#include <zxing/Binarizer.h>
+#include <zxing/BinaryBitmap.h>
+#include <CameraImage.h>
+#include <string>
+
+using namespace zxing;
+using namespace zxing::qrcode;
+
+void CCameraWrapperExampleAppView::StartTimer()
+ {
+ const TInt tickInterval=2000000;
+ iPeriodic=CPeriodic::NewL(0); // neutral priority
+
+ //CleanupStack::PushL(iPeriodic);
+
+ iPeriodic->Start(tickInterval,tickInterval,TCallBack(&CCameraWrapperExampleAppView::Tick, this));
+
+// CleanupStack::PopAndDestroy(iPeriodic);
+ }
+
+TInt CCameraWrapperExampleAppView::Tick(TAny* aObject)
+ {
+ // cast, and call non-static function
+ ((CCameraWrapperExampleAppView*)aObject)->decodeBackbufferImage();
+ return 1;
+ }
+
+void CCameraWrapperExampleAppView::decodeBackbufferImage()
+ {
+ QRCodeReader decoder;
+
+ CameraImage image;
+ image.setImage(iBackBuffer);
+
+
+ Ref<Result> res;
+
+ try
+ {
+ Ref<LuminanceSource> imageRef(new CameraImage(image));
+ GlobalHistogramBinarizer* binz = new GlobalHistogramBinarizer(imageRef);
+
+ Ref<Binarizer> bz (binz);
+ BinaryBitmap* bb = new BinaryBitmap(bz);
+
+ Ref<BinaryBitmap> ref(bb);
+
+ res = decoder.decode(ref);
+
+ string string = res->getText()->getText();
+ HBufC8 *pHeap8 = HBufC8::NewMaxLC(string.size());
+ pHeap8->Des().Copy((const TUint8 *)string.c_str());
+
+ HBufC *pHeap16 = HBufC::NewMaxLC(pHeap8->Length());
+ pHeap16->Des().Copy(*pHeap8);
+
+ ShowResultL(*pHeap16);
+ }
+ catch(zxing::Exception& e)
+ {
+ string string = "Error...retrying...";
+ HBufC8 *pHeap8 = HBufC8::NewMaxLC(string.size());
+ pHeap8->Des().Copy((const TUint8 *)string.c_str());
+
+ HBufC *pHeap16 = HBufC::NewMaxLC(pHeap8->Length());
+ pHeap16->Des().Copy(*pHeap8);
+
+ ShowResultL(*pHeap16);
+ }
+ }
+
+void CCameraWrapperExampleAppView::ShowResultL(TDesC16& message)
+ {
+ if (!iNote)
+ {
+ // Create the note once
+ iNote = CAknInfoPopupNoteController::NewL();
+ }
+ // Hide the note. The last note may be visible when creating the second
+ iNote->HideInfoPopupNote();
+
+ // Set the time delay period before the popup is shown (in milliseconds)
+ iNote->SetTimeDelayBeforeShow(100);
+
+ // Set the time period of how long the popup is in the view (in milliseconds)
+ iNote->SetTimePopupInView(2*1000);
+
+ // Note text
+ iNote->SetTextL(message);
+
+ TRect rect(Rect());
+
+ // Note position
+ iNote->SetPositionAndAlignment(TPoint(rect.Width()/5,rect.Height()/7),EHLeftVTop);
+
+ // Show note
+ iNote->ShowInfoPopupNote();
+ }
--
Multi-format 1D/2D barcode image processing library
More information about the Pkg-google-commits
mailing list