rhodes 5.5.15 → 5.5.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (458) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +48 -13
  3. data/doc/oss/WM_CE_Installation_And_Build_Guidelines.md +1 -1
  4. data/lib/commonAPI/barcode/ext.yml +6 -2
  5. data/lib/commonAPI/barcode/ext/barcode.xml +1 -1
  6. data/lib/commonAPI/barcode/ext/build.bat +8 -0
  7. data/lib/commonAPI/barcode/ext/platform/qt/Barcode.pro +90 -0
  8. data/lib/commonAPI/barcode/ext/platform/qt/Rakefile +35 -0
  9. data/lib/commonAPI/barcode/ext/platform/qt/resources/barcode.qrc +10 -0
  10. data/lib/commonAPI/barcode/ext/platform/qt/resources/buttonBack.png +0 -0
  11. data/lib/commonAPI/barcode/ext/platform/qt/resources/buttonRetry.png +0 -0
  12. data/lib/commonAPI/barcode/ext/platform/qt/resources/buttonSave.png +0 -0
  13. data/lib/commonAPI/barcode/ext/platform/qt/resources/scanner_sound.wav +0 -0
  14. data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeController.cpp +40 -0
  15. data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeController.h +57 -0
  16. data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeDialogBuilder.h +52 -0
  17. data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeDialogView.cpp +175 -0
  18. data/lib/commonAPI/barcode/ext/platform/qt/src/BarcodeDialogView.h +68 -0
  19. data/lib/commonAPI/barcode/ext/platform/qt/src/Barcode_impl.cpp +109 -0
  20. data/lib/commonAPI/barcode/ext/platform/qt/src/decoderthread.cpp +39 -0
  21. data/lib/commonAPI/barcode/ext/platform/qt/src/decoderthread.h +29 -0
  22. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/CameraImageWrapper.cpp +131 -0
  23. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/CameraImageWrapper.h +39 -0
  24. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing.h +173 -0
  25. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing.pri +277 -0
  26. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing_global.h +13 -0
  27. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/imagehandler.cpp +45 -0
  28. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/imagehandler.h +23 -0
  29. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/qzxing.cpp +303 -0
  30. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigInteger.cc +405 -0
  31. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigInteger.hh +215 -0
  32. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerAlgorithms.cc +70 -0
  33. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerAlgorithms.hh +25 -0
  34. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerLibrary.hh +8 -0
  35. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerUtils.cc +50 -0
  36. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigIntegerUtils.hh +72 -0
  37. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigUnsigned.cc +697 -0
  38. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigUnsigned.hh +418 -0
  39. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigUnsignedInABase.cc +125 -0
  40. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/BigUnsignedInABase.hh +122 -0
  41. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/ChangeLog +146 -0
  42. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/NumberlikeArray.hh +177 -0
  43. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/bigint/README +71 -0
  44. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/win32/zxing/iconv.h +14 -0
  45. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/win32/zxing/msvc/stdint.h +247 -0
  46. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/win32/zxing/win_iconv.c +2035 -0
  47. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/BarcodeFormat.cpp +40 -0
  48. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/BarcodeFormat.h +60 -0
  49. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Binarizer.cpp +45 -0
  50. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Binarizer.h +50 -0
  51. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/BinaryBitmap.cpp +70 -0
  52. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/BinaryBitmap.h +56 -0
  53. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ChecksumException.cpp +28 -0
  54. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ChecksumException.h +34 -0
  55. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/DecodeHints.cpp +148 -0
  56. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/DecodeHints.h +85 -0
  57. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Exception.cpp +43 -0
  58. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Exception.h +51 -0
  59. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/FormatException.cpp +41 -0
  60. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/FormatException.h +37 -0
  61. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/IllegalStateException.h +35 -0
  62. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/InvertedLuminanceSource.cpp +68 -0
  63. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/InvertedLuminanceSource.h +48 -0
  64. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/LuminanceSource.cpp +86 -0
  65. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/LuminanceSource.h +59 -0
  66. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/MultiFormatReader.cpp +124 -0
  67. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/MultiFormatReader.h +48 -0
  68. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/NotFoundException.h +35 -0
  69. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Reader.cpp +31 -0
  70. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Reader.h +40 -0
  71. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ReaderException.h +37 -0
  72. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Result.cpp +66 -0
  73. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/Result.h +57 -0
  74. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultIO.cpp +34 -0
  75. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultPoint.cpp +108 -0
  76. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultPoint.h +55 -0
  77. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultPointCallback.cpp +26 -0
  78. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ResultPointCallback.h +39 -0
  79. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/WriterException.h +17 -0
  80. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/ZXing.h +140 -0
  81. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/AztecDetectorResult.cpp +54 -0
  82. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/AztecDetectorResult.h +48 -0
  83. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/AztecReader.cpp +68 -0
  84. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/AztecReader.h +49 -0
  85. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/decoder/AztecDecoder.cpp +495 -0
  86. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/decoder/Decoder.h +69 -0
  87. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/detector/AztecDetector.cpp +548 -0
  88. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/aztec/detector/Detector.h +92 -0
  89. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Array.h +173 -0
  90. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitArray.cpp +237 -0
  91. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitArray.h +97 -0
  92. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitArrayIO.cpp +31 -0
  93. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitMatrix.cpp +143 -0
  94. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitMatrix.h +91 -0
  95. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitSource.cpp +76 -0
  96. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/BitSource.h +74 -0
  97. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/CharacterSetECI.cpp +104 -0
  98. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/CharacterSetECI.h +53 -0
  99. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Counted.h +140 -0
  100. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/DecoderResult.cpp +51 -0
  101. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/DecoderResult.h +54 -0
  102. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/DetectorResult.cpp +39 -0
  103. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/DetectorResult.h +43 -0
  104. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GlobalHistogramBinarizer.cpp +212 -0
  105. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GlobalHistogramBinarizer.h +48 -0
  106. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GreyscaleLuminanceSource.cpp +80 -0
  107. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GreyscaleLuminanceSource.h +53 -0
  108. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp +81 -0
  109. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GreyscaleRotatedLuminanceSource.h +46 -0
  110. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GridSampler.cpp +122 -0
  111. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/GridSampler.h +45 -0
  112. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/HybridBinarizer.cpp +226 -0
  113. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/HybridBinarizer.h +67 -0
  114. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/IllegalArgumentException.cpp +27 -0
  115. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/IllegalArgumentException.h +36 -0
  116. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/PerspectiveTransform.cpp +107 -0
  117. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/PerspectiveTransform.h +49 -0
  118. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Point.h +47 -0
  119. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Str.cpp +61 -0
  120. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/Str.h +51 -0
  121. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/StringUtils.cpp +198 -0
  122. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/StringUtils.h +52 -0
  123. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/JavaMath.h +43 -0
  124. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/MathUtils.h +57 -0
  125. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp +175 -0
  126. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/MonochromeRectangleDetector.h +62 -0
  127. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/WhiteRectangleDetector.cpp +330 -0
  128. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/detector/WhiteRectangleDetector.h +59 -0
  129. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/GenericGF.cpp +150 -0
  130. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/GenericGF.h +73 -0
  131. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp +218 -0
  132. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/GenericGFPoly.h +56 -0
  133. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp +174 -0
  134. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.h +49 -0
  135. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/ReedSolomonException.cpp +30 -0
  136. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/common/reedsolomon/ReedSolomonException.h +33 -0
  137. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/DataMatrixReader.cpp +54 -0
  138. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/DataMatrixReader.h +45 -0
  139. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/DataMatrixVersion.cpp +199 -0
  140. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/Version.h +87 -0
  141. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/BitMatrixParser.h +59 -0
  142. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataBlock.h +49 -0
  143. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataMatrixBitMatrixParser.cpp +361 -0
  144. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataMatrixDataBlock.cpp +113 -0
  145. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataMatrixDecodedBitStreamParser.cpp +416 -0
  146. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp +93 -0
  147. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/DecodedBitStreamParser.h +104 -0
  148. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/decoder/Decoder.h +49 -0
  149. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/CornerPoint.h +43 -0
  150. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/DataMatrixCornerPoint.cpp +46 -0
  151. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp +447 -0
  152. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/DataMatrixDetectorException.cpp +23 -0
  153. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/Detector.h +94 -0
  154. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/datamatrix/detector/DetectorException.h +23 -0
  155. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/ByQuadrantReader.cpp +75 -0
  156. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/ByQuadrantReader.h +42 -0
  157. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp +137 -0
  158. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/GenericMultipleBarcodeReader.h +51 -0
  159. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/MultipleBarcodeReader.cpp +29 -0
  160. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/MultipleBarcodeReader.h +41 -0
  161. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/QRCodeMultiReader.cpp +58 -0
  162. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/QRCodeMultiReader.h +36 -0
  163. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/detector/MultiDetector.cpp +47 -0
  164. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/detector/MultiDetector.h +37 -0
  165. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp +236 -0
  166. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h +47 -0
  167. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/CodaBarReader.cpp +340 -0
  168. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/CodaBarReader.h +57 -0
  169. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code128Reader.cpp +497 -0
  170. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code128Reader.h +48 -0
  171. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code39Reader.cpp +329 -0
  172. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code39Reader.h +63 -0
  173. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code93Reader.cpp +293 -0
  174. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/Code93Reader.h +58 -0
  175. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/EAN13Reader.cpp +85 -0
  176. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/EAN13Reader.h +49 -0
  177. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/EAN8Reader.cpp +65 -0
  178. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/EAN8Reader.h +47 -0
  179. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/ITFReader.cpp +337 -0
  180. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/ITFReader.h +54 -0
  181. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/MultiFormatOneDReader.cpp +96 -0
  182. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/MultiFormatOneDReader.h +38 -0
  183. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/MultiFormatUPCEANReader.cpp +110 -0
  184. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/MultiFormatUPCEANReader.h +41 -0
  185. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/OneDReader.cpp +228 -0
  186. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/OneDReader.h +81 -0
  187. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/OneDResultPoint.cpp +28 -0
  188. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/OneDResultPoint.h +35 -0
  189. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCAReader.cpp +71 -0
  190. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCAReader.h +50 -0
  191. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCEANReader.cpp +309 -0
  192. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCEANReader.h +88 -0
  193. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCEReader.cpp +146 -0
  194. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/oned/UPCEReader.h +47 -0
  195. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/PDF417Reader.cpp +170 -0
  196. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/PDF417Reader.h +49 -0
  197. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/BitMatrixParser.h +84 -0
  198. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/DecodedBitStreamParser.h +84 -0
  199. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/Decoder.h +62 -0
  200. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp +997 -0
  201. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp +563 -0
  202. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp +118 -0
  203. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp +214 -0
  204. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.h +71 -0
  205. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp +120 -0
  206. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ModulusGF.h +72 -0
  207. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ModulusPoly.cpp +284 -0
  208. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/decoder/ec/ModulusPoly.h +68 -0
  209. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/detector/Detector.h +106 -0
  210. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/detector/LinesSampler.cpp +719 -0
  211. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/detector/LinesSampler.h +122 -0
  212. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/pdf417/detector/PDF417Detector.cpp +664 -0
  213. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/ErrorCorrectionLevel.h +55 -0
  214. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/FormatInformation.h +54 -0
  215. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRCodeReader.cpp +52 -0
  216. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRCodeReader.h +48 -0
  217. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRErrorCorrectionLevel.cpp +70 -0
  218. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRFormatInformation.cpp +117 -0
  219. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/QRVersion.cpp +566 -0
  220. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/Version.h +86 -0
  221. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/BitMatrixParser.h +56 -0
  222. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/DataBlock.h +50 -0
  223. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/DataMask.h +50 -0
  224. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/DecodedBitStreamParser.h +72 -0
  225. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/Decoder.h +46 -0
  226. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/Mode.h +68 -0
  227. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRBitMatrixParser.cpp +183 -0
  228. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRDataBlock.cpp +118 -0
  229. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRDataMask.cpp +159 -0
  230. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRDecodedBitStreamParser.cpp +433 -0
  231. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRDecoder.cpp +107 -0
  232. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/decoder/QRMode.cpp +118 -0
  233. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/AlignmentPattern.h +45 -0
  234. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/AlignmentPatternFinder.h +68 -0
  235. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/Detector.h +69 -0
  236. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/FinderPattern.h +48 -0
  237. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/FinderPatternFinder.h +80 -0
  238. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/FinderPatternInfo.h +47 -0
  239. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp +47 -0
  240. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRAlignmentPatternFinder.cpp +208 -0
  241. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRDetector.cpp +315 -0
  242. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRFinderPattern.cpp +69 -0
  243. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp +638 -0
  244. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/zxing/zxing/qrcode/detector/QRFinderPatternInfo.cpp +41 -0
  245. data/lib/commonAPI/coreapi/ext.yml +1 -1
  246. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/network/Network.java +21 -7
  247. data/lib/commonAPI/coreapi/ext/platform/qt/coreapi.pro +10 -0
  248. data/lib/commonAPI/coreapi/ext/platform/wm/src/Registry.cpp +57 -7
  249. data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.cpp +11 -0
  250. data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.h +2 -0
  251. data/lib/commonAPI/coreapi/ext/shared/qt/NavbarImpl.cpp +1 -1
  252. data/lib/commonAPI/coreapi/ext/system.xml +3 -0
  253. data/lib/commonAPI/coreapi/ext/webview.xml +0 -2
  254. data/lib/commonAPI/coreapi/public/api/rhonodejsapi.js +921 -0
  255. data/lib/commonAPI/mediacapture/ext.yml +1 -0
  256. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraObject.java +3 -2
  257. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java +260 -230
  258. data/lib/commonAPI/mediacapture/ext/platform/qt/MediaCapture.pro +17 -5
  259. data/lib/commonAPI/mediacapture/ext/platform/qt/resources/buttonBack.png +0 -0
  260. data/lib/commonAPI/mediacapture/ext/platform/qt/resources/mediacapture.qrc +1 -0
  261. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CCameraData.cpp +11 -4
  262. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CCameraData.h +4 -7
  263. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraDialogView.h +1 -6
  264. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraRefresher.h +54 -0
  265. data/lib/commonAPI/mediacapture/ext/platform/qt/src/Camera_impl.cpp +15 -21
  266. data/lib/commonAPI/mediacapture/ext/platform/qt/src/ImageFilenameGetterResult.h +7 -2
  267. data/lib/commonAPI/mediacapture/ext/platform/qt/src/cameradialogview.cpp +34 -32
  268. data/lib/extensions/zlib/ext/zlib.pro +11 -0
  269. data/platform/android/Rhodes/jni/src/fileapi.cpp +36 -22
  270. data/platform/iphone/Classes/SimpleMainView.m +1 -1
  271. data/platform/shared/api_generator/MethodResult.cpp +22 -7
  272. data/platform/shared/api_generator/MethodResult.h +3 -1
  273. data/platform/shared/api_generator/iphone/CMethodResult.m +6 -2
  274. data/platform/shared/api_generator/js_helpers.cpp +19 -0
  275. data/platform/shared/api_generator/js_helpers.h +23 -0
  276. data/platform/shared/common/RhoConf.cpp +0 -1
  277. data/platform/shared/common/RhoPort.h +3 -0
  278. data/platform/shared/common/RhodesApp.cpp +46 -11
  279. data/platform/shared/common/RhodesApp.h +7 -0
  280. data/platform/shared/common/RhodesAppBase.cpp +5 -1
  281. data/platform/shared/common/RhodesAppBase.h +8 -1
  282. data/platform/shared/common/ThreadQueue.h +1 -1
  283. data/platform/shared/common/map/BaseMapEngine.cpp +2 -0
  284. data/platform/shared/net/HttpServer.cpp +0 -1
  285. data/platform/shared/qt/RhoSimulator.pro +11 -0
  286. data/platform/shared/qt/RhoSimulator_dev.pro +12 -2
  287. data/platform/shared/qt/curl/curl.pro +10 -0
  288. data/platform/shared/qt/rhodes/guithreadfunchelper.h +29 -0
  289. data/platform/shared/qt/rhodes/iexecutable.h +9 -0
  290. data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +10 -21
  291. data/platform/shared/qt/rhodes/impl/MainWindowImpl.h +1 -1
  292. data/platform/shared/qt/rhodes/impl/QtSystemImpl.cpp +15 -1
  293. data/platform/shared/qt/rhodes/impl/RhoThreadImpl.cpp +7 -7
  294. data/platform/shared/qt/rhodes/mainwindowinterface.h +12 -0
  295. data/platform/shared/qt/rhodes/newVersion/DateTimeDialog.cpp +96 -0
  296. data/platform/shared/qt/rhodes/newVersion/DateTimeDialog.h +54 -0
  297. data/platform/shared/qt/rhodes/newVersion/ExternalWebView.cpp +45 -0
  298. data/platform/shared/qt/rhodes/newVersion/ExternalWebView.h +47 -0
  299. data/platform/shared/qt/rhodes/newVersion/QWebEngineViewSelectionSuppressor.h +103 -0
  300. data/platform/shared/qt/rhodes/newVersion/QtMainWindow.cpp +1181 -0
  301. data/platform/shared/qt/rhodes/newVersion/QtMainWindow.h +194 -0
  302. data/platform/shared/qt/rhodes/newVersion/QtNativeTabBar.cpp +107 -0
  303. data/platform/shared/qt/rhodes/newVersion/QtNativeTabBar.h +40 -0
  304. data/platform/shared/qt/rhodes/newVersion/RhoNativeApiCall.cpp +51 -0
  305. data/platform/shared/qt/rhodes/newVersion/RhoNativeApiCall.h +52 -0
  306. data/platform/shared/qt/rhodes/newVersion/main.cpp +280 -0
  307. data/platform/shared/qt/rhodes/newVersion/qtwebenginepage.cpp +19 -0
  308. data/platform/shared/qt/rhodes/newVersion/qtwebenginepage.h +21 -0
  309. data/platform/shared/qt/rhodes/newVersion/qtwebengineview.cpp +6 -0
  310. data/platform/shared/qt/rhodes/newVersion/qtwebengineview.h +18 -0
  311. data/platform/shared/qt/rhodes/{DateTimeDialog.cpp → oldVersion/DateTimeDialog.cpp} +0 -0
  312. data/platform/shared/qt/rhodes/{DateTimeDialog.h → oldVersion/DateTimeDialog.h} +0 -0
  313. data/platform/shared/qt/rhodes/{DateTimeDialog.ui → oldVersion/DateTimeDialog.ui} +0 -0
  314. data/platform/shared/qt/rhodes/{ExternalWebView.cpp → oldVersion/ExternalWebView.cpp} +0 -0
  315. data/platform/shared/qt/rhodes/{ExternalWebView.h → oldVersion/ExternalWebView.h} +0 -0
  316. data/platform/shared/qt/rhodes/{ExternalWebView.ui → oldVersion/ExternalWebView.ui} +0 -0
  317. data/platform/shared/qt/rhodes/{QtMainWindow.cpp → oldVersion/QtMainWindow.cpp} +4 -1
  318. data/platform/shared/qt/rhodes/{QtMainWindow.h → oldVersion/QtMainWindow.h} +8 -5
  319. data/platform/shared/qt/rhodes/{QtMainWindow.ui → oldVersion/QtMainWindow.ui} +0 -0
  320. data/platform/shared/qt/rhodes/{QtNativeTabBar.cpp → oldVersion/QtNativeTabBar.cpp} +0 -0
  321. data/platform/shared/qt/rhodes/{QtNativeTabBar.h → oldVersion/QtNativeTabBar.h} +0 -0
  322. data/platform/shared/qt/rhodes/{QtWebInspector.cpp → oldVersion/QtWebInspector.cpp} +0 -0
  323. data/platform/shared/qt/rhodes/{QtWebInspector.h → oldVersion/QtWebInspector.h} +0 -0
  324. data/platform/shared/qt/rhodes/{QtWebInspector.ui → oldVersion/QtWebInspector.ui} +0 -0
  325. data/platform/shared/qt/rhodes/{QtWebPage.cpp → oldVersion/QtWebPage.cpp} +0 -0
  326. data/platform/shared/qt/rhodes/{QtWebPage.h → oldVersion/QtWebPage.h} +0 -0
  327. data/platform/shared/qt/rhodes/{RhoNativeApiCall.cpp → oldVersion/RhoNativeApiCall.cpp} +0 -0
  328. data/platform/shared/qt/rhodes/{RhoNativeApiCall.h → oldVersion/RhoNativeApiCall.h} +0 -0
  329. data/platform/shared/qt/rhodes/{main.cpp → oldVersion/main.cpp} +2 -0
  330. data/platform/shared/qt/rhodes/{qkineticscroller.cpp → oldVersion/qkineticscroller.cpp} +0 -0
  331. data/platform/shared/qt/rhodes/{qkineticscroller.h → oldVersion/qkineticscroller.h} +0 -0
  332. data/platform/shared/qt/rhodes/{qkineticscroller_p.h → oldVersion/qkineticscroller_p.h} +0 -0
  333. data/platform/shared/qt/rhodes/{qtflickgesture.cpp → oldVersion/qtflickgesture.cpp} +0 -0
  334. data/platform/shared/qt/rhodes/{qtflickgesture_p.h → oldVersion/qtflickgesture_p.h} +0 -0
  335. data/platform/shared/qt/rhodes/{qtscroller.cpp → oldVersion/qtscroller.cpp} +0 -0
  336. data/platform/shared/qt/rhodes/{qtscroller.h → oldVersion/qtscroller.h} +0 -0
  337. data/platform/shared/qt/rhodes/{qtscroller_p.h → oldVersion/qtscroller_p.h} +0 -0
  338. data/platform/shared/qt/rhodes/{qtscrollerfilter.cpp → oldVersion/qtscrollerfilter.cpp} +0 -0
  339. data/platform/shared/qt/rhodes/{qtscrollerfilter_p.h → oldVersion/qtscrollerfilter_p.h} +0 -0
  340. data/platform/shared/qt/rhodes/{qtscrollerproperties.cpp → oldVersion/qtscrollerproperties.cpp} +0 -0
  341. data/platform/shared/qt/rhodes/{qtscrollerproperties.h → oldVersion/qtscrollerproperties.h} +0 -0
  342. data/platform/shared/qt/rhodes/{qtscrollerproperties_p.h → oldVersion/qtscrollerproperties_p.h} +0 -0
  343. data/platform/shared/qt/rhodes/{qtscrollevent.cpp → oldVersion/qtscrollevent.cpp} +0 -0
  344. data/platform/shared/qt/rhodes/{qtscrollevent.h → oldVersion/qtscrollevent.h} +0 -0
  345. data/platform/shared/qt/rhodes/{qtscrollevent_p.h → oldVersion/qtscrollevent_p.h} +0 -0
  346. data/platform/shared/qt/rhodes/{qwebviewkineticscroller.cpp → oldVersion/qwebviewkineticscroller.cpp} +0 -0
  347. data/platform/shared/qt/rhodes/{qwebviewkineticscroller.h → oldVersion/qwebviewkineticscroller.h} +0 -0
  348. data/platform/shared/qt/rhodes/{qwebviewselectionsuppressor.h → oldVersion/qwebviewselectionsuppressor.h} +0 -0
  349. data/platform/shared/qt/rhodes/rhodes.pro +92 -47
  350. data/platform/shared/qt/rholib/rholib.pro +32 -19
  351. data/platform/shared/qt/rubylib/rubylib.pro +12 -0
  352. data/platform/shared/qt/sqlite3/sqlite3.pro +11 -1
  353. data/platform/shared/qt/syncengine/syncengine.pro +10 -0
  354. data/platform/shared/ruby/eval.c +2 -4
  355. data/platform/shared/ruby/eval_intern.h +12 -0
  356. data/platform/shared/ruby/ext/rho/extensions.c +6 -2
  357. data/platform/shared/ruby/include/ruby/missing.h +6 -4
  358. data/platform/shared/ruby/io.c +27 -0
  359. data/platform/shared/ruby/numeric.c +5 -2
  360. data/platform/shared/ruby/time.c +4 -0
  361. data/platform/shared/ruby/win32/win32 backup.c +5808 -0
  362. data/platform/shared/ruby/win32/win32.c +2254 -2131
  363. data/platform/shared/unzip/deflate.cpp +6 -1
  364. data/platform/shared/unzip/gunzip.cpp +1 -1
  365. data/platform/shared/unzip/unzip.cpp +3 -6
  366. data/platform/shared/unzip/zip.cpp +1 -25
  367. data/platform/shared/unzip/zutil.cpp +1 -1
  368. data/platform/shared/unzip/zutil.h +1 -1
  369. data/platform/win32/RhoSimulator/rho/Databases/Databases.db +0 -0
  370. data/platform/win32/RhoSimulator/rho/WebpageIcons.db +0 -0
  371. data/platform/win32/RhoSimulator/rho/rholog.txt_pos +0 -0
  372. data/platform/win32/RhoSimulator/rhosimulator/Databases/Databases.db +0 -0
  373. data/platform/win32/RhoSimulator/rhosimulator/WebpageIcons.db +0 -0
  374. data/platform/win32/RhoSimulator/rhosimulator/rholog.txt_pos +0 -0
  375. data/platform/wm/build/build_inf.js +7 -3
  376. data/platform/wm/build/wm.rake +96 -30
  377. data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +3 -1
  378. data/rakefile.rb +48 -13
  379. data/res/generators/rhogen.rb +87 -8
  380. data/res/generators/templates/api/cpp/montana_js_wrap.cpp +1 -1
  381. data/res/generators/templates/application/nodejs/main.js +501 -0
  382. data/res/generators/templates/application/nodejs/rhoapp.js +71 -0
  383. data/res/generators/templates/application/nodejs/server/app.js +19 -0
  384. data/res/generators/templates/application/nodejs/server/package.json +16 -0
  385. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap-theme.css +587 -0
  386. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap-theme.css.map +1 -0
  387. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap-theme.min.css +6 -0
  388. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap-theme.min.css.map +1 -0
  389. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap.css +6757 -0
  390. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap.css.map +1 -0
  391. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap.min.css +6 -0
  392. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/css/bootstrap.min.css.map +1 -0
  393. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot +0 -0
  394. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg +288 -0
  395. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf +0 -0
  396. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff +0 -0
  397. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2 +0 -0
  398. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/js/bootstrap.js +2377 -0
  399. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/js/bootstrap.min.js +7 -0
  400. data/res/generators/templates/application/nodejs/server/public/bootstrap-3.3.7/js/npm.js +13 -0
  401. data/res/generators/templates/application/nodejs/server/public/images/bar/back_btn.png +0 -0
  402. data/res/generators/templates/application/nodejs/server/public/images/bar/back_btn@2x.png +0 -0
  403. data/res/generators/templates/application/nodejs/server/public/images/bar/back_btn@3x.png +0 -0
  404. data/res/generators/templates/application/nodejs/server/public/images/bar/forward_btn.png +0 -0
  405. data/res/generators/templates/application/nodejs/server/public/images/bar/forward_btn@2x.png +0 -0
  406. data/res/generators/templates/application/nodejs/server/public/images/bar/forward_btn@3x.png +0 -0
  407. data/res/generators/templates/application/nodejs/server/public/images/bar/gears.png +0 -0
  408. data/res/generators/templates/application/nodejs/server/public/images/bar/gears@2x.png +0 -0
  409. data/res/generators/templates/application/nodejs/server/public/images/bar/gears@3x.png +0 -0
  410. data/res/generators/templates/application/nodejs/server/public/images/bar/home_btn.png +0 -0
  411. data/res/generators/templates/application/nodejs/server/public/images/bar/home_btn@2x.png +0 -0
  412. data/res/generators/templates/application/nodejs/server/public/images/bar/home_btn@3x.png +0 -0
  413. data/res/generators/templates/application/nodejs/server/public/images/bar/sync_btn.png +0 -0
  414. data/res/generators/templates/application/nodejs/server/public/images/bar/sync_btn@2x.png +0 -0
  415. data/res/generators/templates/application/nodejs/server/public/images/bar/sync_btn@3x.png +0 -0
  416. data/res/generators/templates/application/nodejs/server/public/jquery/jquery-3.1.1.min.js +4 -0
  417. data/res/generators/templates/application/nodejs/server/public/jquery/jquery-3.1.1.min.map +1 -0
  418. data/res/generators/templates/application/nodejs_build.yml +76 -0
  419. data/res/generators/templates/application/nodejs_rhoconfig.txt +137 -0
  420. data/version +1 -1
  421. metadata +345 -77
  422. data/platform/win32/RhoSimulator/D3Dcompiler_46.dll +0 -0
  423. data/platform/win32/RhoSimulator/Qt5Core.dll +0 -0
  424. data/platform/win32/RhoSimulator/Qt5Gui.dll +0 -0
  425. data/platform/win32/RhoSimulator/Qt5Multimedia.dll +0 -0
  426. data/platform/win32/RhoSimulator/Qt5MultimediaWidgets.dll +0 -0
  427. data/platform/win32/RhoSimulator/Qt5Network.dll +0 -0
  428. data/platform/win32/RhoSimulator/Qt5OpenGL.dll +0 -0
  429. data/platform/win32/RhoSimulator/Qt5PrintSupport.dll +0 -0
  430. data/platform/win32/RhoSimulator/Qt5Qml.dll +0 -0
  431. data/platform/win32/RhoSimulator/Qt5Quick.dll +0 -0
  432. data/platform/win32/RhoSimulator/Qt5Sensors.dll +0 -0
  433. data/platform/win32/RhoSimulator/Qt5Sql.dll +0 -0
  434. data/platform/win32/RhoSimulator/Qt5V8.dll +0 -0
  435. data/platform/win32/RhoSimulator/Qt5WebKit.dll +0 -0
  436. data/platform/win32/RhoSimulator/Qt5WebKitWidgets.dll +0 -0
  437. data/platform/win32/RhoSimulator/Qt5Widgets.dll +0 -0
  438. data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
  439. data/platform/win32/RhoSimulator/icudt52.dll +0 -0
  440. data/platform/win32/RhoSimulator/icuin52.dll +0 -0
  441. data/platform/win32/RhoSimulator/icuuc52.dll +0 -0
  442. data/platform/win32/RhoSimulator/imageformats/qgif.dll +0 -0
  443. data/platform/win32/RhoSimulator/imageformats/qico.dll +0 -0
  444. data/platform/win32/RhoSimulator/imageformats/qjpeg.dll +0 -0
  445. data/platform/win32/RhoSimulator/imageformats/qmng.dll +0 -0
  446. data/platform/win32/RhoSimulator/imageformats/qsvg.dll +0 -0
  447. data/platform/win32/RhoSimulator/imageformats/qtga.dll +0 -0
  448. data/platform/win32/RhoSimulator/imageformats/qtiff.dll +0 -0
  449. data/platform/win32/RhoSimulator/imageformats/qwbmp.dll +0 -0
  450. data/platform/win32/RhoSimulator/libEGL.dll +0 -0
  451. data/platform/win32/RhoSimulator/libGLESv2.dll +0 -0
  452. data/platform/win32/RhoSimulator/libeay32.dll +0 -0
  453. data/platform/win32/RhoSimulator/msvcp110.dll +0 -0
  454. data/platform/win32/RhoSimulator/msvcr110.dll +0 -0
  455. data/platform/win32/RhoSimulator/platforms/qwindows.dll +0 -0
  456. data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
  457. data/platform/win32/RhoSimulator/vccorlib110.dll +0 -0
  458. data/platform/win32/RhoSimulator/vcomp110.dll +0 -0
@@ -0,0 +1,41 @@
1
+ /*
2
+ * FinderPatternInfo.cpp
3
+ * zxing
4
+ *
5
+ * Created by Christian Brunschen on 13/05/2008.
6
+ * Copyright 2008 ZXing authors All rights reserved.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+
21
+ #include <zxing/qrcode/detector/FinderPatternInfo.h>
22
+
23
+ namespace zxing {
24
+ namespace qrcode {
25
+
26
+ FinderPatternInfo::FinderPatternInfo(std::vector<Ref<FinderPattern> > patternCenters) :
27
+ bottomLeft_(patternCenters[0]), topLeft_(patternCenters[1]), topRight_(patternCenters[2]) {
28
+ }
29
+
30
+ Ref<FinderPattern> FinderPatternInfo::getBottomLeft() {
31
+ return bottomLeft_;
32
+ }
33
+ Ref<FinderPattern> FinderPatternInfo::getTopLeft() {
34
+ return topLeft_;
35
+ }
36
+ Ref<FinderPattern> FinderPatternInfo::getTopRight() {
37
+ return topRight_;
38
+ }
39
+
40
+ }
41
+ }
@@ -5,7 +5,7 @@ libraries: ["CoreAPI"]
5
5
  iphone:
6
6
  xcodeproject: ext/platform/iphone/Coreapi.xcodeproj
7
7
  xcodetarget: CoreAPI
8
- rebuild_deplist: ext/platform/iphone/deplist.txt
8
+ #rebuild_deplist: ext/platform/iphone/deplist.txt
9
9
 
10
10
  android:
11
11
  source_list: ext/platform/android/ext_java.files
@@ -5,7 +5,7 @@ import android.net.ConnectivityManager;
5
5
  import android.net.NetworkInfo;
6
6
 
7
7
  import com.rhomobile.rhodes.Logger;
8
- import com.rhomobile.rhodes.RhodesActivity;
8
+ import com.rhomobile.rhodes.RhodesService;
9
9
 
10
10
  public class Network
11
11
  {
@@ -15,28 +15,42 @@ public class Network
15
15
 
16
16
  private Network()
17
17
  {
18
- connectivityManager = (ConnectivityManager)RhodesActivity.getContext().getSystemService(Context.CONNECTIVITY_SERVICE);
18
+ tryInit();
19
19
  }
20
20
 
21
- public static Network getNetworkObject()
21
+ private void tryInit() {
22
+ if ( null == connectivityManager ) {
23
+ try {
24
+ connectivityManager = (ConnectivityManager)RhodesService.getInstance().getContext().getSystemService(Context.CONNECTIVITY_SERVICE);
25
+ } catch ( Exception e ) {
26
+ Logger.E(TAG, "tryInit Cannot get connectivity manager: " + e.toString() );
27
+ }
28
+ }
29
+ }
30
+
31
+ private static Network getNetworkObjectSafe()
22
32
  {
23
- if(network == null) network = new Network();
33
+ if(network == null) {
34
+ network = new Network();
35
+ }
36
+ network.tryInit();
37
+
24
38
  return network;
25
39
  }
26
40
 
27
41
  public static int hasNetwork()
28
42
  {
29
- return getNetworkObject().doHasNetwork();
43
+ return getNetworkObjectSafe().doHasNetwork();
30
44
  }
31
45
 
32
46
  public static int hasCellNetwork()
33
47
  {
34
- return getNetworkObject().doHasCellNetwork();
48
+ return getNetworkObjectSafe().doHasCellNetwork();
35
49
  }
36
50
 
37
51
  public static int hasWifiNetwork()
38
52
  {
39
- return getNetworkObject().doHasWifiNetwork();
53
+ return getNetworkObjectSafe().doHasWifiNetwork();
40
54
  }
41
55
 
42
56
  private int doHasNetwork()
@@ -1,5 +1,13 @@
1
1
  QT -= core
2
+ greaterThan(QT_VERSION, 5.6.0): {
3
+ CONFIG += c++14
4
+ DEFINES += CPP_ELEVEN
5
+ DEFINES += RHODES_VERSION_2
6
+ }
2
7
 
8
+ lessThan(QT_VERSION, 5.6.0): {
9
+ DEFINES += RHODES_VERSION_1
10
+ }
3
11
  TARGET = coreapi
4
12
  TEMPLATE = lib
5
13
 
@@ -56,6 +64,8 @@ win32 {
56
64
  QMAKE_CXXFLAGS_WARN_ON += /wd4996 /wd4100 /wd4005
57
65
  QMAKE_CFLAGS_RELEASE += /O2
58
66
  QMAKE_CXXFLAGS_RELEASE += /O2
67
+ QMAKE_CXXFLAGS_RELEASE += -MP9
68
+ QMAKE_CXXFLAGS_DEBUG += -MP9
59
69
  }
60
70
 
61
71
  HEADERS += \
@@ -4,6 +4,8 @@
4
4
  #include <algorithm>
5
5
  #include <Strsafe.h>
6
6
  #include "Registry.h"
7
+
8
+
7
9
  //bool WriteRegHandler (HKEY proot, LPCTSTR psubkey, LPCTSTR psetting, DWORD ptype, LPCTSTR pvalue_string, bool persistent)
8
10
  bool WriteRegHandler (rho::String proot, LPCTSTR psubkey, LPCTSTR psetting, rho::String ptype, LPCTSTR pvalue_string, bool persistent)
9
11
  {
@@ -220,7 +222,7 @@ BOOL WriteRegFile (HKEY hroot, LPCWSTR psubkey, LPCWSTR psetting, DWORD type, co
220
222
 
221
223
  pfile = NULL;
222
224
  ok = FALSE;
223
-
225
+ #ifndef CPP_ELEVEN
224
226
  if (hroot == HKEY_LOCAL_MACHINE)
225
227
  proot = L"HKEY_LOCAL_MACHINE";
226
228
  else if (hroot == HKEY_CURRENT_USER)
@@ -234,7 +236,23 @@ BOOL WriteRegFile (HKEY hroot, LPCWSTR psubkey, LPCWSTR psetting, DWORD type, co
234
236
  LOG(WARNING) + "Unknown hive: " + (DWORD)hroot;
235
237
  goto Exit;
236
238
  }
237
-
239
+ #else
240
+ std::wstring temwstr;
241
+ if (hroot == HKEY_LOCAL_MACHINE)
242
+ temwstr = L"HKEY_LOCAL_MACHINE";
243
+ else if (hroot == HKEY_CURRENT_USER)
244
+ temwstr = L"HKEY_CURRENT_USER";
245
+ else if (hroot == HKEY_CLASSES_ROOT)
246
+ temwstr = L"HKEY_CLASSES_ROOT";
247
+ else if (hroot == HKEY_USERS)
248
+ temwstr = L"HKEY_USERS";
249
+ else
250
+ {
251
+ LOG(WARNING) + "Unknown hive: " + (DWORD)hroot;
252
+ goto Exit;
253
+ }
254
+ proot = const_cast<wchar_t *>(temwstr.c_str());
255
+ #endif
238
256
  // Form the filename, replacing '\' with '_'
239
257
  pfilename = new WCHAR [128];
240
258
  StringCchPrintf (pfilename, 128, L"\\application\\re_%s_%s_%s.reg", proot, psubkey, psetting);
@@ -365,11 +383,11 @@ BOOL DeleteRegFile (HKEY hroot, LPCWSTR psubkey, LPCWSTR psetting)
365
383
  WCHAR *proot;
366
384
 
367
385
  ok = FALSE;
368
-
386
+ #ifndef CPP_ELEVEN
369
387
  if (hroot == HKEY_LOCAL_MACHINE)
370
388
  proot = L"HKEY_LOCAL_MACHINE";
371
389
  else if (hroot == HKEY_CURRENT_USER)
372
- proot = L"HKEY_CURRENT_USER";
390
+ proot = L"HKEY_CURRENT_USER";
373
391
  else if (hroot == HKEY_CLASSES_ROOT)
374
392
  proot = L"HKEY_CLASSES_ROOT";
375
393
  else if (hroot == HKEY_USERS)
@@ -379,7 +397,23 @@ BOOL DeleteRegFile (HKEY hroot, LPCWSTR psubkey, LPCWSTR psetting)
379
397
  LOG(WARNING) + "Unknown hive: " + (DWORD)hroot;
380
398
  goto Exit;
381
399
  }
382
-
400
+ #else
401
+ std::wstring tempwstr;
402
+ if (hroot == HKEY_LOCAL_MACHINE)
403
+ tempwstr = L"HKEY_LOCAL_MACHINE";
404
+ else if (hroot == HKEY_CURRENT_USER)
405
+ tempwstr = L"HKEY_CURRENT_USER";
406
+ else if (hroot == HKEY_CLASSES_ROOT)
407
+ tempwstr = L"HKEY_CLASSES_ROOT";
408
+ else if (hroot == HKEY_USERS)
409
+ tempwstr = L"HKEY_USERS";
410
+ else
411
+ {
412
+ LOG(WARNING) + "Unknown hive: " + (DWORD)hroot;
413
+ goto Exit;
414
+ }
415
+ proot = const_cast<wchar_t *>(tempwstr.c_str());
416
+ #endif
383
417
  pfilename = new WCHAR [128];
384
418
 
385
419
  // Form the 'create' filename, replacing '\' with '_'
@@ -416,7 +450,7 @@ BOOL CreateDeleteRegFile (HKEY hroot, LPCWSTR psubkey, LPCWSTR psetting)
416
450
 
417
451
  pfile = NULL;
418
452
  ok = FALSE;
419
-
453
+ #ifndef CPP_ELEVEN
420
454
  if (hroot == HKEY_LOCAL_MACHINE)
421
455
  proot = L"HKEY_LOCAL_MACHINE";
422
456
  else if (hroot == HKEY_CURRENT_USER)
@@ -430,7 +464,23 @@ BOOL CreateDeleteRegFile (HKEY hroot, LPCWSTR psubkey, LPCWSTR psetting)
430
464
  LOG(WARNING) + "Unknown hive: " + (DWORD)hroot;
431
465
  goto Exit;
432
466
  }
433
-
467
+ #else
468
+ std::wstring tempstr;
469
+ if (hroot == HKEY_LOCAL_MACHINE)
470
+ tempstr = L"HKEY_LOCAL_MACHINE";
471
+ else if (hroot == HKEY_CURRENT_USER)
472
+ tempstr = L"HKEY_CURRENT_USER";
473
+ else if (hroot == HKEY_CLASSES_ROOT)
474
+ tempstr = L"HKEY_CLASSES_ROOT";
475
+ else if (hroot == HKEY_USERS)
476
+ tempstr = L"HKEY_USERS";
477
+ else
478
+ {
479
+ LOG(WARNING) + "Unknown hive: " + (DWORD)hroot;
480
+ goto Exit;
481
+ }
482
+ proot = const_cast<wchar_t *>(tempstr.c_str());
483
+ #endif
434
484
  // Form the filename, replacing '\' with '_'
435
485
  pfilename = new WCHAR [128];
436
486
  StringCchPrintf (pfilename, 128, L"\\application\\re_%s_%s_%s_delete.reg", proot, psubkey, psetting);
@@ -157,6 +157,17 @@ void CSystemImplBase::setLocalServerPort( int value, CMethodResult& oResult)
157
157
  //Local port can be set only in confuguration file
158
158
  }
159
159
 
160
+ void CSystemImplBase::getNodejsServerPort(CMethodResult& oResult)
161
+ {
162
+ oResult.set( atoi(RHODESAPP().getNodeJSListeningPort()) );
163
+ }
164
+
165
+ void CSystemImplBase::setNodejsServerPort( int value, CMethodResult& oResult)
166
+ {
167
+ //Local port can be set only in confuguration file
168
+ }
169
+
170
+
160
171
  void CSystemImplBase::getFreeServerPort(rho::apiGenerator::CMethodResult& oResult)
161
172
  {
162
173
  oResult.set( RHODESAPP().determineFreeListeningPort() );
@@ -18,6 +18,8 @@ public:
18
18
  virtual void getIsSymbolDevice(CMethodResult& oResult);
19
19
  virtual void getLocalServerPort(CMethodResult& oResult);
20
20
  virtual void setLocalServerPort( int value, CMethodResult& oResult);
21
+ virtual void getNodejsServerPort(CMethodResult& oResult);
22
+ virtual void setNodejsServerPort( int value, CMethodResult& oResult);
21
23
  virtual void getFreeServerPort(rho::apiGenerator::CMethodResult& oResult);
22
24
  virtual void getHasTouchscreen(rho::apiGenerator::CMethodResult& oResult);
23
25
  virtual void getHasSqlite(rho::apiGenerator::CMethodResult& oResult);
@@ -47,7 +47,7 @@ public:
47
47
 
48
48
  //extern "C" void Init_Navbar_API();
49
49
 
50
- extern "C"void Init_Navbar()
50
+ extern "C" void Init_Navbar()
51
51
  {
52
52
  rho::CNavbarFactory::setInstance( new rho::CNavbarFactory() );
53
53
  rho::Init_Navbar_API();
@@ -165,6 +165,9 @@ Be sure to review the [Ruby API Usage](/guide/api_ruby) guide for important info
165
165
  <PROPERTY name="localServerPort" type="INTEGER" default="8080" readOnly="true">
166
166
  <DESC>Port of the local (embedded) HTTP server. This parameter is mainly for debug purposes. If not specified, the platform will detect a free port on the device and use that one.</DESC>
167
167
  </PROPERTY>
168
+ <PROPERTY name="NodejsServerPort" type="INTEGER" default="3000" readOnly="true">
169
+ <DESC>Port of the local (embedded) Node.js HTTP server if it started (only for Node.js type applications).</DESC>
170
+ </PROPERTY>
168
171
  <PROPERTY name="freeServerPort" type="INTEGER" readOnly="true">
169
172
  <DESC>Get free local server port, available for binding.</DESC>
170
173
  </PROPERTY>
@@ -217,8 +217,6 @@ If you open your page in WebView, and after it makes a few jumps by linking (for
217
217
  <DESC>Execute JavaScript on the current page from your controller.
218
218
 
219
219
  For most mobile platforms, WebView.execute_js has been implemented via redirection to URL with 'javascript:' schema. If WebView.execute_js used in an AJAX call handler method in the controller, it may lead to the situation where the success javascript handler will never be executed. This may happen because, at the moment of success handler should be executed, a URL of the page already has been changed. This means no handlers from the previous page are valid.</DESC>
220
- <APPLIES rubyOnly="true"/>
221
-
222
220
  <PARAMS>
223
221
  <PARAM name="javascriptText" type="STRING">
224
222
  <DESC>The call to the JavaScript method on the current page, such as "test();".</DESC>
@@ -0,0 +1,921 @@
1
+ //console.log('@@@@@@@@@@@@@@@@@@ start eval Rho');
2
+
3
+
4
+
5
+ global.RhomobileEngine = {}
6
+
7
+ function initializeRhoAPI() {
8
+
9
+ //'use strict';
10
+
11
+ // === API configuration ========================================================
12
+
13
+ var thisFileName = 'rhoapi.js';
14
+
15
+ var RHO_ID_PARAM = '__rhoID';
16
+ var RHO_CLASS_PARAM = '__rhoClass';
17
+ var RHO_CALLBACK_PARAM = '__rhoCallback';
18
+
19
+ var API_CONTROLLER_URL = '/system/js_api_entrypoint';
20
+ //var API_CALLBACK_BASE_URL = '/system/js_api_entrypoint';
21
+ var API_CALLBACK_BASE_URL = '';
22
+
23
+ var NOT_INSTANCE_ID = '0';
24
+
25
+
26
+ ////console.log("***************************");
27
+
28
+ // === simplified jQuery 1.9.1 parts =============================================
29
+
30
+ var __$$ = {
31
+ isFunction: function (obj) {
32
+ return 'function' === typeof obj;
33
+ },
34
+
35
+ isPlainObject: function (obj) {
36
+ return obj && 'object' === typeof obj;
37
+ },
38
+
39
+ isArray: function (obj) {
40
+ return (obj && 'Array' == (obj).constructor.name);
41
+ },
42
+
43
+ extend: function () {
44
+ var src, copyIsArray, copy, name, options, clone,
45
+ target = arguments[0] || {},
46
+ i = 1,
47
+ length = arguments.length,
48
+ deep = false;
49
+
50
+ // Handle a deep copy situation
51
+ if (typeof target === "boolean") {
52
+ deep = target;
53
+
54
+ // skip the boolean and the target
55
+ target = arguments[ i ] || {};
56
+ i++;
57
+ }
58
+
59
+ // Handle case when target is a string or something (possible in deep copy)
60
+ if (typeof target !== "object" && !__$$.isFunction(target)) {
61
+ target = {};
62
+ }
63
+
64
+ // extend jQuery itself if only one argument is passed
65
+ if (i === length) {
66
+ target = this;
67
+ i--;
68
+ }
69
+
70
+ for (; i < length; i++) {
71
+ // Only deal with non-null/undefined values
72
+ if ((options = arguments[ i ]) != null) {
73
+ // Extend the base object
74
+ for (name in options) {
75
+ src = target[ name ];
76
+ copy = options[ name ];
77
+
78
+ // Prevent never-ending loop
79
+ if (target === copy) {
80
+ continue;
81
+ }
82
+
83
+ // Recurse if we're merging plain objects or arrays
84
+ if (deep && copy && ( __$$.isPlainObject(copy) || (copyIsArray = __$$.isArray(copy)) )) {
85
+ if (copyIsArray) {
86
+ copyIsArray = false;
87
+ clone = src && __$$.isArray(src) ? src : [];
88
+
89
+ } else {
90
+ clone = src && __$$.isPlainObject(src) ? src : {};
91
+ }
92
+
93
+ // Never move original objects, clone them
94
+ target[ name ] = __$$.extend(deep, clone, copy);
95
+
96
+ // Don't bring in undefined values
97
+ } else if (copy !== undefined) {
98
+ target[ name ] = copy;
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ // Return the modified object
105
+ return target;
106
+ },
107
+
108
+ ajax: function(opts) {
109
+
110
+ },
111
+ each:function (anObjectOrArray, callback) {
112
+ if (this.isArray(anObjectOrArray)) {
113
+ anObjectOrArray.forEach(function (each, idx) {
114
+ callback(idx, each);
115
+ });
116
+ }
117
+ else {
118
+ for (var property in anObjectOrArray) {
119
+ if (anObjectOrArray.hasOwnProperty(property)) {
120
+ callback(property, anObjectOrArray[property]);
121
+ }
122
+ }
123
+ }
124
+ }
125
+ };
126
+
127
+
128
+ // === Core parts ============================================================
129
+ ////console.log("*************************** 2");
130
+ var baseCallbackId = new Date().valueOf();
131
+ var idCount = 0;
132
+ var pendingCallbacks = {};
133
+
134
+
135
+ ////console.log("*************************** 3");
136
+
137
+ function getVmID() {
138
+ return 'jxcore';
139
+ }
140
+
141
+ function defaultEmptyCallback() {
142
+ }
143
+
144
+ function nextId(tag) {
145
+ if ('undefined' == typeof tag || !tag)
146
+ tag = RHO_ID_PARAM;
147
+
148
+ return (tag + '#' + baseCallbackId + idCount++);
149
+ }
150
+
151
+ function toBool(value) {
152
+ if (value && 'string' == typeof value) {
153
+ return (value.toLowerCase() == "true")
154
+ }
155
+ return false;
156
+ }
157
+ ////console.log("*************************** 31");
158
+
159
+ function prepareCallback(callback, /*opt*/ isPersistent, /*opt*/ id) {
160
+ /*
161
+ Rho.Log.info('prepareCallback.callback: type: ' + typeof callback,"JSC");
162
+ Rho.Log.info('prepareCallback.callback: isPersistent: ' + isPersistent,"JSC");
163
+ Rho.Log.info('prepareCallback.callback: id: ' + id,"JSC");
164
+ */
165
+
166
+ if ('string' == typeof callback)
167
+ return callback;
168
+
169
+ if ('function' != typeof callback)
170
+ callback = defaultEmptyCallback;
171
+
172
+ if ('undefined' == typeof id || !id)
173
+ id = nextId();
174
+
175
+ var data = {
176
+ id: id,
177
+ callback: callback,
178
+ isPersistent: ('undefined' != typeof isPersistent) && isPersistent
179
+ };
180
+
181
+ pendingCallbacks[id] = data;
182
+
183
+ /*
184
+ var arr = [], p, i = 0;
185
+ for (p in data) {
186
+ arr[i++] = " " + p + " : " + data[p]+" ";
187
+ }
188
+ var str = arr.join(', ');
189
+
190
+ Rho.Log.info('prepareCallback.callback: pendingCallbacks: {' + str + "}","JSC");
191
+ */
192
+ // store options for pending callback
193
+ return API_CALLBACK_BASE_URL + id;
194
+ }
195
+ ////console.log("*************************** 32");
196
+
197
+ function scanForInstances(value) {
198
+ for (var prop in value) {
199
+ if (!value.hasOwnProperty(prop)) continue;
200
+ if ('object' == typeof value[prop]) {
201
+ value[prop] = createInstances(value[prop]);
202
+ }
203
+ }
204
+ return value;
205
+ }
206
+
207
+ function createInstances(value) {
208
+ if ((value != null) && ('object' == typeof value)) {
209
+ if (value[RHO_ID_PARAM] && value[RHO_CLASS_PARAM]) {
210
+ return objectForClass(value[RHO_CLASS_PARAM], value[RHO_ID_PARAM]);
211
+ } else {
212
+ return scanForInstances(value);
213
+ }
214
+ }
215
+ return value;
216
+ }
217
+ ////console.log("*************************** 33");
218
+
219
+ function jsValue(result) {
220
+
221
+ ////console.log("&&&&&& 1");
222
+ if ('undefined' == typeof result)
223
+ throw 'Invalid API JSON response';
224
+ ////console.log("&&&&&& 2");
225
+
226
+ if (null == result || 'object' != typeof result) {
227
+ ////console.log("&&&&&& 3");
228
+ return result;
229
+ }
230
+ ////console.log("&&&&&& 4");
231
+
232
+ var value = __$$.extend(result instanceof Array ? [] : {}, result);
233
+ ////console.log("&&&&&& 5");
234
+
235
+ return createInstances(value);
236
+ }
237
+
238
+ function namesToProps(names) {
239
+ var namesObj = {};
240
+ if ("string" == typeof names) {
241
+ names = names.split(/[\s\,]/);
242
+ }
243
+ if (names instanceof Array) {
244
+ for (var i = 0; i < names.length; i++) {
245
+ if (0 < names[i].length)
246
+ namesObj[names[i]] = null;
247
+ }
248
+ } else if (names instanceof Object) {
249
+ namesObj = names;
250
+ }
251
+ return namesObj;
252
+ }
253
+
254
+ function namesToArray(names) {
255
+ var namesArray = [];
256
+ if ("string" == typeof names) {
257
+ names = names.split(/[\s\,]/);
258
+ }
259
+ if (names instanceof Array) {
260
+ for (var i = 0; i < names.length; i++) {
261
+ if (0 < names[i].length)
262
+ namesArray.push(names[i]);
263
+ }
264
+ } else if (names instanceof Object) {
265
+ for (var name in names) {
266
+ if (names.hasOwnProperty(name) && 0 < name.length)
267
+ namesArray.push(name);
268
+ }
269
+ }
270
+ return namesArray;
271
+ }
272
+
273
+ ////console.log("*************************** 34");
274
+
275
+
276
+ var reqIdCount = 0;
277
+
278
+ function wrapFunctions(key, value) {
279
+ if ('function' != typeof value) return value;
280
+
281
+ return RHO_CALLBACK_PARAM + ":" + prepareCallback(value, true);
282
+ }
283
+
284
+
285
+ ////console.log("*************************** 35");
286
+
287
+
288
+ function commonReq(params) {
289
+
290
+ var valueCallback = null;
291
+
292
+ if ("number" == typeof params.valueCallbackIndex) {
293
+ if (params.valueCallbackIndex < params.args.length - 1)
294
+ throw 'Generated API method error: wrong position for value callback argument!';
295
+
296
+ if (params.valueCallbackIndex == params.args.length - 1)
297
+ valueCallback = params.args.pop();
298
+
299
+ if (valueCallback && "function" != typeof valueCallback)
300
+ throw 'Value callback should be a function!';
301
+ }
302
+
303
+ var persistentCallback = null;
304
+ var persistentCallbackOptParams = null;
305
+
306
+ if ("number" == typeof params.persistentCallbackIndex) {
307
+ if (params.persistentCallbackIndex < params.args.length - 2)
308
+ throw 'Generated API method error: wrong position for persistent callback argument!';
309
+
310
+ if (params.persistentCallbackIndex == params.args.length - 2) {
311
+ persistentCallbackOptParams = params.args.pop();
312
+ persistentCallback = params.args.pop();
313
+ } else if (params.persistentCallbackIndex == params.args.length - 1) {
314
+ persistentCallback = params.args.pop();
315
+ }
316
+
317
+ if (persistentCallback && 'function' != typeof persistentCallback)
318
+ throw 'Persistent callback should be a function!';
319
+
320
+ if (persistentCallbackOptParams && 'string' != typeof persistentCallbackOptParams)
321
+ throw 'Persistent callback optional parameters should be a string!';
322
+
323
+ var persistentCallbackOptParams = persistentCallbackOptParams || null;
324
+
325
+ if (persistentCallback)
326
+ persistentCallback = prepareCallback(persistentCallback, true);
327
+ }
328
+
329
+ var cmd = { 'method': params.method, 'params': params.args };
330
+
331
+ cmd[RHO_CLASS_PARAM] = params.module;
332
+ cmd[RHO_ID_PARAM] = params.instanceId || null;
333
+ cmd['jsonrpc'] = '2.0';
334
+ cmd['id'] = reqIdCount++;
335
+
336
+ if (persistentCallback) {
337
+ cmd[RHO_CALLBACK_PARAM] = {
338
+ id: persistentCallback,
339
+ vmID: getVmID(),
340
+ optParams: persistentCallbackOptParams
341
+ };
342
+ }
343
+
344
+ var cmdText = JSON.stringify(cmd, wrapFunctions);
345
+ //////console.log(cmdText);
346
+
347
+ var result = null;
348
+
349
+ function handleResult(rawResult) {
350
+ ////console.log("===== A");
351
+ result = jsValue(rawResult);
352
+ ////console.log("===== B");
353
+ if (valueCallback) {
354
+ ////console.log("===== C");
355
+ valueCallback(result);
356
+ }
357
+ ////console.log("===== D");
358
+ }
359
+
360
+ function handleError(errObject) {
361
+ throw errObject.message;
362
+ }
363
+ ////console.log("*************************** 5 a");
364
+
365
+ ////console.log("*************************** Rho.platform.nativeApiCall = "+ typeof Rho.platform.nativeApiCall);
366
+
367
+
368
+ Rho.platform.nativeApiCall(cmdText, null != valueCallback, function (result) {
369
+ ////console.log("===== 1");
370
+ if (result['error']) {
371
+ ////console.log("===== 2");
372
+ handleError(result['error']);
373
+ ////console.log("===== 3");
374
+ }
375
+ else {
376
+ ////console.log("===== 4");
377
+ handleResult(result['result']);
378
+ ////console.log("===== 5");
379
+ }
380
+ });
381
+ ////console.log("*************************** 5 b");
382
+
383
+ return (null != valueCallback) ? null : result;
384
+ }
385
+
386
+ ////console.log("*************************** 6");
387
+
388
+
389
+ function apiReqFor(module) {
390
+ return function (params) {
391
+ params.args = Array.prototype.slice.call(params.args);
392
+ if ('getProperties' == params.method && 0 < params.args.length) {
393
+ params.args[0] = namesToArray(params.args[0]);
394
+ }
395
+ params.module = module;
396
+ params.method = params.method;
397
+ return commonReq(params);
398
+ };
399
+ }
400
+
401
+ function extendSafely(destination, source, override) {
402
+ var src = source;
403
+ var dst = destination;
404
+ var sourceIsFunc = false;
405
+
406
+ if ('function' == typeof src) {
407
+ if ('function' == typeof dst && !override)
408
+ throw "Namespace definition conflict!";
409
+
410
+ sourceIsFunc = true;
411
+ src = destination;
412
+ dst = source;
413
+ }
414
+
415
+ for (var prop in src) {
416
+ if (!src.hasOwnProperty(prop)) continue;
417
+ if (dst.hasOwnProperty(prop) && !override) continue;
418
+ if ('prototype' == prop) {
419
+ if(sourceIsFunc) continue;
420
+
421
+ if('object' != typeof dst[prop])
422
+ dst[prop] = {};
423
+ for (var subProp in src[prop]) {
424
+ if (!src[prop].hasOwnProperty(subProp)) continue;
425
+ dst[prop][subProp] = src[prop][subProp];
426
+ }
427
+ continue;
428
+ }
429
+ dst[prop] = src[prop];
430
+ }
431
+ return dst;
432
+ }
433
+
434
+
435
+ ////console.log("*************************** 7");
436
+
437
+
438
+ function namespace(nsPathStr, membersObj, override) {
439
+
440
+ ////console.log("------ 1");
441
+ membersObj = membersObj || {};
442
+ //console.log("------ 2");
443
+
444
+ var ns = global;
445
+ var parts = nsPathStr.split(/[\:\.]/);
446
+ var nsLog = '';
447
+ //console.log("------ 3");
448
+
449
+ for (var i = 0; i < parts.length; i++) {
450
+ var nsProp = parts[i];
451
+ nsLog = nsLog + (i == 0 ? '' : '.') + nsProp;
452
+ //console.log("------ 4");
453
+
454
+ var subNs = ns[nsProp];
455
+ if (!(subNs instanceof Object || 'undefined' == typeof subNs)) {
456
+ throw "Namespace " + nsLog + " is already defined and it isn't an object!";
457
+ }
458
+ //console.log("------ 5");
459
+
460
+ if (i == parts.length - 1) {
461
+ if (ns[nsProp])
462
+ ns[nsProp] = extendSafely(ns[nsProp], membersObj, override);
463
+ else
464
+ ns[nsProp] = membersObj;
465
+ }
466
+ //console.log("------ 6");
467
+ ns[nsProp] = ns[nsProp] || {};
468
+ ns = ns[nsProp];
469
+ //console.log("------ 7");
470
+ }
471
+ //console.log("------ 8");
472
+ return ns;
473
+ }
474
+
475
+
476
+ //console.log("*************************** 8");
477
+
478
+ // === Property proxy support ====================================================
479
+
480
+ var propsSupport = {
481
+ ffHackKeywords: false,
482
+ ffHackMethod: false,
483
+ js185: false
484
+ };
485
+
486
+ (function propertySupportCheck() {
487
+ /* propsSupport.ffHackKeywords = (function supported_firefoxHack_keywords() {
488
+ var testObj = {};
489
+ var okGet = false;
490
+ var okSet = false;
491
+ try {
492
+ testObj = {
493
+ get propGet() {
494
+ okGet = true;
495
+ return okGet;
496
+ },
497
+ set propSet(val) {
498
+ okSet = val;
499
+ }
500
+ };
501
+ testObj.propSet = testObj.propGet;
502
+ } catch (ex) {};
503
+ return okGet && okSet;
504
+ })();*/
505
+
506
+ propsSupport.ffHackMethod = (function supported_firefoxHack_method() {
507
+ var testObj = {};
508
+ var okGet = false;
509
+ var okSet = false;
510
+ try {
511
+ testObj.__defineGetter__('propGet', function () {
512
+ okGet = true;
513
+ return okGet;
514
+ });
515
+ testObj.__defineSetter__('propSet', function (val) {
516
+ okSet = val;
517
+ });
518
+
519
+ testObj.propSet = testObj.propGet;
520
+ } catch (ex) {};
521
+ return okGet && okSet;
522
+ })();
523
+
524
+ propsSupport.js185 = (function supported_js185_standard() {
525
+ var testObj = {};
526
+ var okGet = false;
527
+ var okSet = false;
528
+ try {
529
+ Object.defineProperty(testObj, 'propGet', {
530
+ get: function () {
531
+ okGet = true;
532
+ return okGet;
533
+ }
534
+ });
535
+ Object.defineProperty(testObj, 'propSet', {
536
+ set: function (val) {
537
+ okSet = val;
538
+ }
539
+ });
540
+ testObj.propSet = testObj.propGet;
541
+ } catch (ex) {};
542
+ return okGet && okSet;
543
+ })();
544
+ })();
545
+ // at this point we have property support level already detected
546
+
547
+ // Here is default (fallback option) implementation of property using explicit accessors.
548
+ // It will be used in case we have no any support for natural props syntax in a browser.
549
+ // Usage sample: obj.setSomething(123), var abc = obj.getSomething()
550
+ // ====================================================================================
551
+ var createPropProxy_fallback = function (obj, propDescr, getter, setter) {
552
+ var propName = propDescr.split(':')[0];
553
+
554
+ function accessorName(accessor, propDescr) {
555
+ var names = propDescr.split(':');
556
+ var propName = names[0];
557
+ var getterName = names[1];
558
+ var setterName = names[2];
559
+
560
+ if (('get' == accessor) && getterName)
561
+ return getterName;
562
+
563
+ if (('set' == accessor) && setterName)
564
+ return setterName;
565
+
566
+ return accessor + propName.charAt(0).toUpperCase() + propName.slice(1);
567
+ }
568
+
569
+ if (null != getter && 'function' == typeof getter) {
570
+ obj[accessorName('get', propDescr)] = getter;
571
+ }
572
+ if (null != setter && 'function' == typeof setter) {
573
+ obj[accessorName('set', propDescr)] = setter;
574
+ }
575
+ };
576
+
577
+ //console.log("*************************** 9");
578
+
579
+
580
+ var createPropProxy = createPropProxy_fallback;
581
+
582
+ if (propsSupport.js185) {
583
+ // the best case, js185 props are supported
584
+ createPropProxy = function (obj, propDescr, getter, setter) {
585
+ var propName = propDescr.split(':')[0];
586
+
587
+ // TODO: implement enumeration of propProxy to extend target namespace with them.
588
+ var js185PropDef = {configurable: true, enumerable: false /* true */};
589
+ if (null != getter && 'function' == typeof getter) {
590
+ js185PropDef['get'] = getter;
591
+ }
592
+ if (null != setter && 'function' == typeof setter) {
593
+ js185PropDef['set'] = setter;
594
+ }
595
+ Object.defineProperty(obj, propName, js185PropDef);
596
+ };
597
+ } else if (propsSupport.ffHackMethod) {
598
+ // backup option, props are supported with firefox hack
599
+ createPropProxy = function (obj, propDescr, getter, setter) {
600
+ var propName = propDescr.split(':')[0];
601
+
602
+ obj.__defineGetter__(propName, getter);
603
+ obj.__defineSetter__(propName, setter);
604
+ };
605
+ } else {
606
+ // Sorry, no luck. We able provide just a default implementation with explicit accessors.
607
+ // It is the best thing we can do in this case.
608
+ }
609
+
610
+ // ====================================================================================
611
+ //console.log("*************************** 10");
612
+
613
+ function propAccessReqFunc(apiReqFunc, propName, rw, idFunc, customFunc) {
614
+ var isSet = ('w' == rw);
615
+
616
+ var propNameParts = propName.split(':');
617
+
618
+ propName = propNameParts[0];
619
+ var methodGet = propName;
620
+ var methodSet = propName + '=';
621
+
622
+ if (2 < propNameParts.length)
623
+ methodSet = propNameParts[2];
624
+
625
+ if (1 < propNameParts.length)
626
+ methodGet = propNameParts[1];
627
+
628
+ return function () {
629
+ try {
630
+ if ('function' == typeof customFunc)
631
+ return customFunc.apply(this, arguments);
632
+ } catch(ex) {
633
+ throw "Custom accessor function exception: " + ex;
634
+ }
635
+
636
+ return apiReqFunc({
637
+ instanceId: ('function' == typeof idFunc) ? idFunc.apply(this, []) : NOT_INSTANCE_ID,
638
+ args: arguments,
639
+ method: isSet ? methodSet : methodGet,
640
+ valueCallbackIndex: (isSet ? 1 : 0)
641
+ });
642
+ };
643
+ }
644
+
645
+ var incompatibleProps = [];
646
+
647
+ // Properties bulk definition.
648
+ // Sample:
649
+ //
650
+ // Rho.util.createPropsProxy(Application, {
651
+ // 'publicFolder': 'r',
652
+ // 'startURI': 'rw',
653
+ // 'version': 'r',
654
+ // 'title': 'rw'
655
+ // }, apiReq);
656
+ //
657
+ function createPropsProxy(obj, propDefs, apiReq, idFunc) {
658
+ if (!(propDefs instanceof Array))
659
+ throw 'Property definitions list should be Array instance';
660
+
661
+ for (var i=0; i<propDefs.length; i++) {
662
+ var propDef = propDefs[i];
663
+ var propAccess = propDef['propAccess'];
664
+
665
+ var getter = (0 <= propAccess.indexOf('r')) ? propAccessReqFunc(apiReq, propDef['propName'], 'r', idFunc, propDef['customGet']) : null;
666
+ var setter = (0 <= propAccess.indexOf('w')) ? propAccessReqFunc(apiReq, propDef['propName'], 'w', idFunc, propDef['customSet']) : null;
667
+
668
+ try {
669
+ createPropProxy(obj, propDef['propName'], getter, setter);
670
+ } catch (ex) {
671
+ // we unable to create property with this name, so log it
672
+ incompatibleProps.push(name);
673
+ }
674
+ // create explicit accessors
675
+ createPropProxy_fallback(obj, propDef['propName'], getter, setter);
676
+ }
677
+ }
678
+
679
+ //console.log("*************************** 11");
680
+
681
+ // entity property support =======================================================
682
+
683
+ function createRawPropsProxy(obj, propDefs, force_fallback ) {
684
+ if (!(propDefs instanceof Array))
685
+ throw 'Property definitions list should be Array instance';
686
+
687
+ if (createPropProxy != createPropProxy_fallback || true == force_fallback) {
688
+ for (var i=0; i<propDefs.length; i++) {
689
+ var propDef = propDefs[i];
690
+
691
+ try {
692
+ createPropProxy(obj, propDef['propName'], propDef['propGetter'], propDef['propSetter']);
693
+ } catch (ex) {
694
+ // we unable to create property with this name, so log it
695
+ incompatibleProps.push(name);
696
+ }
697
+ }
698
+ }
699
+ }
700
+
701
+ // === Method calls =========================================================
702
+
703
+ function methodAccessReqFunc(nativeName, persistentCallbackIndex, valueCallbackIndex, apiReq, idFunc) {
704
+ return function() {
705
+ return apiReq({
706
+ instanceId: ('function' == typeof idFunc) ? idFunc.apply(this, []) : NOT_INSTANCE_ID,
707
+ args: arguments,
708
+ method: nativeName,
709
+ persistentCallbackIndex: persistentCallbackIndex,
710
+ valueCallbackIndex: valueCallbackIndex
711
+ });
712
+ }
713
+ }
714
+
715
+ function createMethodsProxy(obj, methodDefs, apiReq, idFunc) {
716
+ if (!(methodDefs instanceof Array))
717
+ throw 'Property definitions list should be Array instance';
718
+
719
+ for (var i=0; i<methodDefs.length; i++) {
720
+ var methodDef = methodDefs[i];
721
+ try {
722
+ obj[methodDef['methodName']] = methodAccessReqFunc(
723
+ methodDef['nativeName'],
724
+ methodDef['persistentCallbackIndex'],
725
+ methodDef['valueCallbackIndex'],
726
+ apiReq, idFunc
727
+ );
728
+ } catch (ex) {
729
+ // we unable to create property with this name, so log it..
730
+ incompatibleProps.push(methodDef['methodName']);
731
+ }
732
+ }
733
+ }
734
+
735
+ //console.log("*************************** 12");
736
+
737
+ function namespaceAlias(ns, parent, alias) {
738
+ if (!parent) throw 'No parent namespace for alias!';
739
+ if (parent[alias]) throw 'Alias definition conflict!';
740
+
741
+ parent[alias] = ns;
742
+ }
743
+
744
+ // === Factory handling =========================================================
745
+
746
+ function objectForClass(className, id) {
747
+ var instObject = {};
748
+ instObject[RHO_CLASS_PARAM] = className;
749
+ instObject[RHO_ID_PARAM] = id;
750
+ return new (namespace(className))(instObject);
751
+ }
752
+
753
+ // === Modules loading implementation ============================================
754
+
755
+ function appendDomElement(target, tagName, attributes) {
756
+ var elm = document.createElement(tagName);
757
+ for (var name in attributes) {
758
+ if (!attributes.hasOwnProperty(name)) continue;
759
+ elm.setAttribute(name, attributes[name]);
760
+ }
761
+ target.appendChild(elm);
762
+ }
763
+
764
+
765
+
766
+ function loadApiModules(moduleNames) {
767
+ }
768
+
769
+ // === Callback handler ==========================================================
770
+
771
+ function callbackHandler(callbackId, resultObj) {
772
+ var cbId = decodeURIComponent(callbackId);
773
+ ////console.log('Rho.callback_handler: callback for: ' +cbId);
774
+ ////console.log('Rho.callback_handler: resultObj: ' +resultObj);
775
+
776
+ var opts = pendingCallbacks[cbId];
777
+
778
+ if ('object' == typeof opts && opts) {
779
+ ////console.log('Rho.callback_handler: callback found!');
780
+
781
+ if ('function' == typeof opts.callback) {
782
+ var result = null;
783
+ var err = null;
784
+ if (resultObj) {
785
+ err = resultObj['error'];
786
+ if (!err)
787
+ result = jsValue(resultObj['result']);
788
+ }
789
+ opts.callback(result, err);
790
+ }
791
+
792
+ if (!opts.isPersistent)
793
+ delete pendingCallbacks[cbId];
794
+ }
795
+ };
796
+
797
+ // === Utility internal methods ==================================================
798
+ //console.log("*************************** 12");
799
+
800
+ var rhoUtil = {
801
+ flag: {
802
+ API_AJAX_URL: '__rho_apiAjaxURL',
803
+ USE_AJAX_BRIDGE: '__rho_useAjaxBridge',
804
+ NATIVE_BRIDGE_TYPE: '__rho_nativeBridgeType'
805
+ },
806
+ loadApiModules: loadApiModules,
807
+ namespace: namespace,
808
+ namespaceAlias: namespaceAlias,
809
+ apiReqFor: apiReqFor,
810
+ namesToProps: namesToProps,
811
+ namesToArray: namesToArray,
812
+ createPropsProxy: createPropsProxy,
813
+ createRawPropsProxy: createRawPropsProxy,
814
+ createMethodsProxy: createMethodsProxy,
815
+ methodAccessReqFunc: methodAccessReqFunc,
816
+ incompatibleProps: incompatibleProps,
817
+ rhoIdParam: function () { return RHO_ID_PARAM },
818
+ rhoClassParam: function () { return RHO_CLASS_PARAM },
819
+ nextId: nextId
820
+ };
821
+
822
+ var rhoPlatform = {
823
+ id: {
824
+ AJAX: 'ajax',
825
+ AUTO: 'auto',
826
+ RHOSIMULATOR: 'rhosimulator',
827
+ ANDROID: 'android',
828
+ IPHONE: 'iphone',
829
+ WP8: 'wp8',
830
+ WM: 'wm',
831
+ WIN32: 'win32',
832
+ JXCORE: 'jxcore'
833
+ },
834
+ nativeApiCall: "",
835
+ nativeApiResult: function(){/* intentionally empty stub function */}
836
+ }
837
+
838
+ // === Public interface ==========================================================
839
+ //console.log("*************************** 13");
840
+
841
+ var rho = {
842
+ jQuery: __$$,
843
+ util: rhoUtil,
844
+ platform: rhoPlatform,
845
+ callbackHandler: callbackHandler
846
+ };
847
+
848
+ // === js-to-native bridges ======================================================
849
+
850
+ /* ========================================================================
851
+ You can force bridge type will be used in a following ways:
852
+
853
+ window[rhoUtil.flag.NATIVE_BRIDGE_TYPE] = rhoPlatform.id.ANDROID;
854
+ window[rhoUtil.flag.NATIVE_BRIDGE_TYPE] = 'android';
855
+ window['__rho_nativeBridgeType'] = 'android';
856
+
857
+ Feel free to define it at any moment.
858
+ ======================================================================== */
859
+
860
+ var RHO_API_CALL_TAG = '__rhoNativeApiCall';
861
+ var RHO_API_TAG = '__rhoNativeApi';
862
+
863
+ var bridges = {};
864
+ var addBridge = function(platformId, bridgeFactory) {
865
+ bridges[platformId] = function() {
866
+ var bridge = bridgeFactory();
867
+ bridge.apiCall.platformId = platformId;
868
+ return bridge;
869
+ };
870
+ };
871
+ addBridge(rhoPlatform.id.JXCORE, function() {
872
+ return {
873
+ apiCall: function (cmdText, async, resultHandler) {
874
+ //console.log("+++ 1");
875
+ var nativeApiResult = {};
876
+ //console.log("+++ 2");
877
+ global.RhomobileEngine.tau_js_entry_point_result = null;
878
+ //console.log("+++ 3");
879
+ process.natives.js_entry_point(cmdText);
880
+ //console.log("+++ 4");
881
+ if (global.RhomobileEngine.tau_js_entry_point_result != null) {
882
+ //console.log("+++ 5");
883
+ nativeApiResult = global.RhomobileEngine.tau_js_entry_point_result;
884
+ //console.log("+++ 6");
885
+ global.RhomobileEngine.tau_js_entry_point_result = null;
886
+ //console.log("+++ 7");
887
+ }
888
+ //console.log("+++ 8");
889
+ //console.log("nativeApiResult type = "+ typeof nativeApiResult );
890
+ //console.log("nativeApiResult = "+nativeApiResult );
891
+ //console.log("resultHandler type = "+ typeof resultHandler );
892
+ //var parsed = JSON.parse(nativeApiResult);
893
+ //console.log("+++ 9");
894
+ resultHandler(nativeApiResult);
895
+ //console.log("+++ 10");
896
+ }
897
+ };
898
+ });
899
+
900
+ rhoPlatform.nativeApiCall = function() {
901
+ // use forced bridge type value in case it defined,
902
+ // otherwise use auto-detected bridge type
903
+ var platformBridge = bridges[rhoPlatform.id.JXCORE];
904
+
905
+ platformBridge().apiCall.apply(this, arguments);
906
+ }
907
+
908
+ //return rho;
909
+
910
+ global.Rho = rho;
911
+ //console.log("*************************** 14");
912
+
913
+ }
914
+
915
+
916
+ initializeRhoAPI();
917
+ //var EB = Rho;
918
+
919
+
920
+
921
+ //console.log("*************************** 15");