rhodes 6.2.0 → 7.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (553) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +14 -10
  3. data/appveyor.yml +1 -1
  4. data/extensions/emdk3-manager/ext/platform/android/Rakefile +2 -0
  5. data/extensions/rhoconnect-push/ext/rhoconnect-push/platform/android/Rakefile +18 -1
  6. data/extensions/rhoelementsext/ext/rhoelementsext/platform/android/Rakefile +19 -1
  7. data/lib/commonAPI/RubyServer/ext.yml +21 -0
  8. data/lib/commonAPI/RubyServer/ext/RubyServer.xml +101 -0
  9. data/lib/commonAPI/RubyServer/ext/build +19 -0
  10. data/lib/commonAPI/RubyServer/ext/build.bat +29 -0
  11. data/lib/commonAPI/RubyServer/ext/platform/android/Rakefile +161 -0
  12. data/lib/commonAPI/RubyServer/ext/platform/android/ext_java.files +9 -0
  13. data/lib/commonAPI/RubyServer/ext/platform/android/ext_native.files +7 -0
  14. data/lib/commonAPI/RubyServer/ext/platform/iphone/Rakefile +73 -0
  15. data/lib/commonAPI/RubyServer/ext/platform/iphone/RubyServer.xcodeproj/project.pbxproj +322 -0
  16. data/lib/commonAPI/RubyServer/ext/platform/iphone/RubyServer_Prefix.pch +7 -0
  17. data/lib/commonAPI/RubyServer/ext/shared/RubyServerImpl.cpp +242 -0
  18. data/lib/commonAPI/barcode/ext/platform/android/src/com/rho/barcode/BarcodeFactory.java +23 -3
  19. data/lib/commonAPI/barcode/ext/platform/android/src/com/rho/barcode/BarcodeRhoExtension.java +68 -8
  20. data/lib/commonAPI/barcode/ext/platform/iphone/Barcode.xcodeproj/project.pbxproj +24 -52
  21. data/lib/commonAPI/barcode/ext/platform/iphone/Classes/BarcodeViewController.h +38 -10
  22. data/lib/commonAPI/barcode/ext/platform/iphone/Classes/BarcodeViewController.m +300 -22
  23. data/lib/commonAPI/barcode/ext/platform/iphone/Classes/BarcodeViewFactory.mm +6 -0
  24. data/lib/commonAPI/barcode/ext/platform/iphone/Classes/barcode.m +6 -2
  25. data/lib/commonAPI/barcode/ext/platform/iphone/impl/Barcode.m +7 -3
  26. data/lib/commonAPI/barcode/ext/platform/iphone/impl/BarcodeFactory.m +13 -0
  27. data/lib/commonAPI/barcode/ext/platform/iphone/impl/BarcodeSingleton.m +25 -3
  28. data/lib/commonAPI/bluetooth/ext/platform/android/Rakefile +29 -10
  29. data/lib/commonAPI/clipboard/ext/platform/android/Rakefile +29 -10
  30. data/lib/commonAPI/coreapi/ext/Notification.xml +47 -0
  31. data/lib/commonAPI/coreapi/ext/platform/android/ApplicationManifestAdds.erb +1 -0
  32. data/lib/commonAPI/coreapi/ext/platform/android/Rakefile +19 -0
  33. data/lib/commonAPI/coreapi/ext/platform/android/ext_java.files +2 -0
  34. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/AlarmReceiver.java +27 -0
  35. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/Notification.java +28 -10
  36. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java +14 -1
  37. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationScheduler.java +260 -0
  38. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationSingleton.java +23 -1
  39. data/lib/commonAPI/coreapi/ext/platform/iphone/Coreapi.xcodeproj/project.pbxproj +21 -19
  40. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NotificationSingleton.h +1 -0
  41. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NotificationSingleton.m +234 -1
  42. data/lib/commonAPI/coreapi/ext/platform/qt/coreapi.pro +2 -0
  43. data/lib/commonAPI/coreapi/ext/platform/qt/src/CNotificationImpl.cpp +7 -0
  44. data/lib/commonAPI/coreapi/ext/shared/ApplicationImpl.cpp +5 -0
  45. data/lib/commonAPI/coreapi/public/api/rhoapi.js +18 -8
  46. data/lib/commonAPI/devicesecurity/ext/platform/android/Rakefile +19 -0
  47. data/lib/commonAPI/devicesecurity/ext/platform/iphone/DeviceSecurity.xcodeproj/project.pbxproj +16 -0
  48. data/lib/commonAPI/hardwarekeys/ext/keycapture.xml +11 -9
  49. data/lib/commonAPI/hardwarekeys/ext/platform/iphone/impl/KeyCaptureSingleton.h +5 -3
  50. data/lib/commonAPI/hardwarekeys/ext/platform/iphone/impl/KeyCaptureSingleton.m +80 -67
  51. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraEclair.java +25 -14
  52. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraGingerbread.java +55 -25
  53. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraObject.java +34 -9
  54. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/ICameraObject.java +1 -0
  55. data/lib/commonAPI/printing_zebra/ext/platform/android/Rakefile +18 -0
  56. data/lib/commonAPI/sensor/ext/platform/android/src/com/rho/sensor/Sensor.java +4 -4
  57. data/lib/extensions/decrypt/ext/platform/android/Rakefile +19 -1
  58. data/lib/extensions/decryptstub/ext/platform/android/Rakefile +19 -0
  59. data/lib/extensions/decryptstub/ext/platform/iphone/Decryptstub.xcodeproj/project.pbxproj +4 -2
  60. data/lib/extensions/digest-md5/ext/android/Rakefile +18 -0
  61. data/lib/extensions/digest-sha1/ext/android/Rakefile +18 -0
  62. data/lib/extensions/digest-sha2/ext/android/Rakefile +18 -0
  63. data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.h +19 -19
  64. data/lib/extensions/fcm-push/ext/android/Rakefile +18 -0
  65. data/lib/extensions/fcm-push/ext/android/src/com/rhomobile/rhodes/fcm/FCMIntentService.java +38 -16
  66. data/lib/extensions/gcm-push/ext/android/Rakefile +19 -0
  67. data/lib/extensions/keyboard/ext.yml +15 -0
  68. data/lib/extensions/keyboard/ext/Keyboard.xml +28 -0
  69. data/lib/extensions/keyboard/ext/build +19 -0
  70. data/lib/extensions/keyboard/ext/build.bat +29 -0
  71. data/lib/extensions/keyboard/ext/platform/android/Rakefile +141 -0
  72. data/lib/extensions/keyboard/ext/platform/android/ext_java.files +9 -0
  73. data/lib/extensions/keyboard/ext/platform/android/ext_native.files +7 -0
  74. data/lib/extensions/keyboard/ext/platform/android/jni/Keyboard_impl.cpp +61 -0
  75. data/lib/extensions/keyboard/ext/platform/android/src/com/rho/keyboard/Keyboard.java +32 -0
  76. data/lib/extensions/keyboard/ext/platform/android/src/com/rho/keyboard/KeyboardFactory.java +18 -0
  77. data/lib/extensions/keyboard/ext/platform/android/src/com/rho/keyboard/KeyboardSingleton.java +29 -0
  78. data/lib/extensions/keyboard/ext/platform/iphone/Keyboard.xcodeproj/project.pbxproj +368 -0
  79. data/lib/extensions/keyboard/ext/platform/iphone/Keyboard_Prefix.pch +7 -0
  80. data/lib/extensions/keyboard/ext/platform/iphone/Rakefile +73 -0
  81. data/lib/extensions/keyboard/ext/platform/iphone/impl/Keyboard.h +14 -0
  82. data/lib/extensions/keyboard/ext/platform/iphone/impl/Keyboard.m +24 -0
  83. data/lib/extensions/keyboard/ext/platform/iphone/impl/KeyboardFactorySingleton.m +16 -0
  84. data/lib/extensions/keyboard/ext/platform/iphone/impl/KeyboardSetup.m +9 -0
  85. data/lib/extensions/keyboard/ext/platform/iphone/impl/KeyboardSingleton.h +17 -0
  86. data/lib/extensions/keyboard/ext/platform/iphone/impl/KeyboardSingleton.m +23 -0
  87. data/lib/extensions/keyboard/ext/platform/iphone/impl/readme.txt +7 -0
  88. data/lib/extensions/keyboard/ext/platform/qt/Keyboard.pro +68 -0
  89. data/lib/extensions/keyboard/ext/platform/qt/Makefile +473 -0
  90. data/lib/extensions/keyboard/ext/platform/qt/Makefile.Release +408 -0
  91. data/lib/extensions/keyboard/ext/platform/qt/Rakefile +39 -0
  92. data/lib/extensions/keyboard/ext/platform/qt/src/Keyboard_impl.cpp +99 -0
  93. data/lib/extensions/keyboard/ext/platform/uwp/Keyboard.props +18 -0
  94. data/lib/extensions/keyboard/ext/platform/uwp/Keyboard.vcxproj +197 -0
  95. data/lib/extensions/keyboard/ext/platform/uwp/Keyboard.vcxproj.filters +50 -0
  96. data/lib/extensions/keyboard/ext/platform/uwp/KeyboardImpl.csproj +119 -0
  97. data/lib/extensions/keyboard/ext/platform/uwp/KeyboardImpl.props +8 -0
  98. data/lib/extensions/keyboard/ext/platform/uwp/KeyboardImpl.targets +7 -0
  99. data/lib/extensions/keyboard/ext/platform/uwp/KeyboardLib.props +18 -0
  100. data/lib/extensions/keyboard/ext/platform/uwp/KeyboardLib.vcxproj +197 -0
  101. data/lib/extensions/keyboard/ext/platform/uwp/KeyboardLib.vcxproj.filters +58 -0
  102. data/lib/extensions/keyboard/ext/platform/uwp/src/Keyboard_impl.cpp +76 -0
  103. data/lib/extensions/keyboard/ext/platform/uwp/src/Keyboard_impl.cs +69 -0
  104. data/lib/extensions/keyboard/ext/platform/uwp/src/Properties/AssemblyInfo.cs +37 -0
  105. data/lib/extensions/keyboard/ext/platform/wm/Keyboard.sln +52 -0
  106. data/lib/extensions/keyboard/ext/platform/wm/Keyboard.vcproj +714 -0
  107. data/lib/extensions/keyboard/ext/platform/wm/Keyboard.vsprops +15 -0
  108. data/lib/extensions/keyboard/ext/platform/wm/src/Keyboard_impl.cpp +77 -0
  109. data/lib/extensions/openssl.so.src/ext/android/Rakefile +18 -0
  110. data/lib/extensions/openssl.so/ext/android/aarch64/libopenssl.so.a +0 -0
  111. data/lib/extensions/openssl.so/ext/iphone/OpenSSl.SDK/howtobuild.txt +2 -0
  112. data/lib/extensions/openssl.so/ext/iphone/OpenSSl.SDK/libcrypto.a +0 -0
  113. data/lib/extensions/openssl.so/ext/iphone/OpenSSl.SDK/libssl.a +0 -0
  114. data/lib/extensions/openssl.so/ext/iphone/Release-iphoneos/libopenssl.so.a +0 -0
  115. data/lib/extensions/openssl.so/ext/iphone/Release-iphonesimulator/libopenssl.so.a +0 -0
  116. data/lib/extensions/openssl/ext/android/Rakefile +18 -0
  117. data/lib/extensions/zlib/ext/zlib.c +5 -1
  118. data/lib/framework/autocomplete/Rhodes.rb +1 -1
  119. data/lib/framework/rhodes.rb +1 -1
  120. data/lib/framework/set.rb +799 -0
  121. data/lib/framework/version.rb +1 -1
  122. data/lib/rhodes.rb +1 -1
  123. data/platform/android/Rhodes/AndroidManifest.xml.erb +11 -2
  124. data/platform/android/Rhodes/jni/include/rhodes.h +6 -0
  125. data/platform/android/Rhodes/jni/include/rhodes/RhoClassFactory.h +3 -0
  126. data/platform/android/Rhodes/jni/include/rhodes/SecurityTokenGenerator.h +30 -0
  127. data/platform/android/Rhodes/jni/include/rhodes/details/rhojava.inc +1 -0
  128. data/platform/android/Rhodes/jni/src/JNIRhoRubyCppWrapper.cpp +408 -0
  129. data/platform/android/Rhodes/jni/src/RhoClassFactory.cpp +7 -0
  130. data/platform/android/Rhodes/jni/src/SecurityTokenGenerator.cpp +60 -0
  131. data/platform/android/Rhodes/jni/src/fileapi.cpp +318 -12
  132. data/platform/android/Rhodes/jni/src/mapview.cpp +4 -0
  133. data/platform/android/Rhodes/res/drawable/ic_notification.png +0 -0
  134. data/platform/android/Rhodes/res/xml/network_security_config.xml +7 -0
  135. data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +9 -0
  136. data/platform/android/Rhodes/src/com/rhomobile/rhodes/LocalFileProvider.java +1 -1
  137. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMain.java +8 -0
  138. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoRubyArrayObjects.java +33 -0
  139. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoRubyClassObject.java +20 -0
  140. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoRubyObject.java +115 -0
  141. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoRubySingleton.java +52 -0
  142. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoRubyTypes.java +15 -0
  143. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +25 -13
  144. data/platform/android/Rhodes/src/com/rhomobile/rhodes/SecurityTokenGenerator.java +57 -0
  145. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +1 -1
  146. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +9 -2
  147. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality.java +3 -0
  148. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality01.java +7 -0
  149. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality11.java +13 -1
  150. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality26.java +105 -0
  151. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionalityManager.java +4 -1
  152. data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +24 -4
  153. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +20 -1
  154. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +10 -0
  155. data/platform/android/build/Rakefile +30 -1
  156. data/platform/android/build/RhodesSRC_build.files +8 -0
  157. data/platform/android/build/android.rake +326 -22
  158. data/platform/android/build/android_tools.rb +36 -3
  159. data/platform/android/build/androidcommon.rb +97 -44
  160. data/platform/android/build/librhocommon_build.files +11 -0
  161. data/platform/android/build/librhodes_build.files +2 -0
  162. data/platform/android/build/manifest_generator.rb +9 -2
  163. data/platform/android/build/maven_deps_extractor.rb +96 -15
  164. data/platform/android/build/ndkwrapper.rb +111 -16
  165. data/platform/android/build/pom.erb +2 -2
  166. data/platform/iphone/Classes/AppManager/AppManager.m +31 -1
  167. data/platform/iphone/Classes/MapView/GoogleGeocoder.h +3 -3
  168. data/platform/iphone/Classes/RhoMainViewStubImpl.h +38 -0
  169. data/platform/iphone/Classes/RhoMainViewStubImpl.m +88 -0
  170. data/platform/iphone/Classes/RhoUIWebView.h +5 -0
  171. data/platform/iphone/Classes/RhoUIWebView.m +14 -6
  172. data/platform/iphone/Classes/{RhoWKWebView.m → RhoWKWebView.mm} +98 -18
  173. data/platform/iphone/Classes/RhoWebView.h +1 -1
  174. data/platform/iphone/Classes/RhoWebViewFabrique.m +24 -12
  175. data/platform/iphone/Classes/Rhodes.h +7 -2
  176. data/platform/iphone/Classes/Rhodes.m +46 -8
  177. data/platform/iphone/Classes/SimpleMainView.m +22 -13
  178. data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.h +32 -3
  179. data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.m +93 -61
  180. data/platform/iphone/Classes/URLProtocol/CRhoWKURLProtocol.h +22 -0
  181. data/platform/iphone/Classes/URLProtocol/CRhoWKURLProtocol.m +246 -0
  182. data/platform/iphone/Classes/WebView.m +14 -2
  183. data/platform/iphone/Entitlements.plist +1 -1
  184. data/platform/iphone/Framework/RhoApplication/RhoApplication.xcodeproj/project.pbxproj +399 -0
  185. data/platform/iphone/Framework/Rhodes/Rhodes.xcodeproj/project.pbxproj +1208 -0
  186. data/platform/iphone/Framework/Rhodes/Rhodes/Info.plist +24 -0
  187. data/platform/iphone/Framework/Rhodes/Rhodes/Rhodes.h +21 -0
  188. data/platform/iphone/Framework/Rhodes/Rhodes/StubCode.m +15 -0
  189. data/platform/iphone/Info.plist +1 -3
  190. data/platform/iphone/RhoAppBaseLib/RhoAppBaseLib.xcodeproj/project.pbxproj +511 -4
  191. data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +467 -1
  192. data/platform/iphone/Rhodes.xcodeproj/project.pbxproj +51 -274
  193. data/platform/iphone/RhodesBaseDelegate.h +1 -1
  194. data/platform/iphone/curl/curl.xcodeproj/project.pbxproj +85 -3
  195. data/platform/iphone/rbuild/ApplicationPlist.erb +1 -1
  196. data/platform/iphone/rbuild/iphone.rake +497 -25
  197. data/platform/iphone/rbuild/iphonecommon.rb +15 -6
  198. data/platform/iphone/rhodes_stub.cpp +15 -0
  199. data/platform/iphone/rhodeslib/api/RhodesLib.h +28 -0
  200. data/platform/iphone/rhodeslib/impl/RhodesLib.m +52 -0
  201. data/platform/iphone/rhodesruby/api/IRefCountedObject.h +20 -0
  202. data/platform/iphone/rhodesruby/api/IRhoRuby.h +72 -0
  203. data/platform/iphone/rhodesruby/api/IRhoRubyArray.h +12 -0
  204. data/platform/iphone/rhodesruby/api/IRhoRubyBoolean.h +11 -0
  205. data/platform/iphone/rhodesruby/api/IRhoRubyFloat.h +10 -0
  206. data/platform/iphone/rhodesruby/api/IRhoRubyHash.h +15 -0
  207. data/platform/iphone/rhodesruby/api/IRhoRubyInteger.h +10 -0
  208. data/platform/iphone/rhodesruby/api/IRhoRubyMutableArray.h +9 -0
  209. data/platform/iphone/rhodesruby/api/IRhoRubyMutableBoolean.h +10 -0
  210. data/platform/iphone/rhodesruby/api/IRhoRubyMutableFloat.h +10 -0
  211. data/platform/iphone/rhodesruby/api/IRhoRubyMutableHash.h +10 -0
  212. data/platform/iphone/rhodesruby/api/IRhoRubyMutableInteger.h +10 -0
  213. data/platform/iphone/rhodesruby/api/IRhoRubyMutableString.h +10 -0
  214. data/platform/iphone/rhodesruby/api/IRhoRubyNativeCallback.h +9 -0
  215. data/platform/iphone/rhodesruby/api/IRhoRubyNil.h +10 -0
  216. data/platform/iphone/rhodesruby/api/IRhoRubyObject.h +37 -0
  217. data/platform/iphone/rhodesruby/api/IRhoRubyRunnable.h +8 -0
  218. data/platform/iphone/rhodesruby/api/IRhoRubyString.h +10 -0
  219. data/platform/iphone/rhodesruby/api/RhoRuby.h +26 -0
  220. data/platform/iphone/rhodesruby/api/RhoRubySingletone.h +14 -0
  221. data/platform/iphone/rhodesruby/impl/RhoRubyFabrique.h +10 -0
  222. data/platform/iphone/rhodesruby/impl/RhoRubyImpl.h +56 -0
  223. data/platform/iphone/rhodesruby/impl/RhoRubyImpl.mm +432 -0
  224. data/platform/iphone/rhodesruby/impl/RhoRubyMutableArrayImpl.h +24 -0
  225. data/platform/iphone/rhodesruby/impl/RhoRubyMutableArrayImpl.mm +43 -0
  226. data/platform/iphone/rhodesruby/impl/RhoRubyMutableBooleanImpl.h +23 -0
  227. data/platform/iphone/rhodesruby/impl/RhoRubyMutableBooleanImpl.mm +38 -0
  228. data/platform/iphone/rhodesruby/impl/RhoRubyMutableFloatImpl.h +23 -0
  229. data/platform/iphone/rhodesruby/impl/RhoRubyMutableFloatImpl.mm +35 -0
  230. data/platform/iphone/rhodesruby/impl/RhoRubyMutableHashImpl.h +24 -0
  231. data/platform/iphone/rhodesruby/impl/RhoRubyMutableHashImpl.mm +48 -0
  232. data/platform/iphone/rhodesruby/impl/RhoRubyMutableIntegerImpl.h +23 -0
  233. data/platform/iphone/rhodesruby/impl/RhoRubyMutableIntegerImpl.mm +35 -0
  234. data/platform/iphone/rhodesruby/impl/RhoRubyMutableStringImpl.h +23 -0
  235. data/platform/iphone/rhodesruby/impl/RhoRubyMutableStringImpl.mm +35 -0
  236. data/platform/iphone/rhodesruby/impl/RhoRubyNilImpl.h +22 -0
  237. data/platform/iphone/rhodesruby/impl/RhoRubyNilImpl.mm +11 -0
  238. data/platform/iphone/rhodesruby/impl/RhoRubyObjectImpl.h +31 -0
  239. data/platform/iphone/rhodesruby/impl/RhoRubyObjectImpl.mm +49 -0
  240. data/platform/iphone/rhodesruby/impl/RhoRubySingletone.m +19 -0
  241. data/platform/iphone/rhodesruby/impl/RubyServerResponceImpl.h +21 -0
  242. data/platform/iphone/rhodesruby/impl/RubyServerResponceImpl.mm +32 -0
  243. data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +79 -0
  244. data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +91 -0
  245. data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +85 -0
  246. data/platform/osx/bin/RhoSimulator/RhoSimulator.app.zip +0 -0
  247. data/platform/shared/common/IRhoClassFactory.h +2 -0
  248. data/platform/shared/common/ISecurityTokenGenerator.h +16 -0
  249. data/platform/shared/common/RhoFile.cpp +11 -0
  250. data/platform/shared/common/RhoMath.h +14 -0
  251. data/platform/shared/common/RhoMutexLock.h +13 -0
  252. data/platform/shared/common/RhoSystem.h +1 -1
  253. data/platform/shared/common/RhoThread.cpp +25 -0
  254. data/platform/shared/common/RhodesApp.cpp +52 -6
  255. data/platform/shared/common/RhodesApp.h +25 -1
  256. data/platform/shared/common/RhodesAppBase.cpp +4 -2
  257. data/platform/shared/common/RhodesAppBase.h +5 -0
  258. data/platform/shared/common/iphone/RhoClassfactory.h +6 -0
  259. data/platform/shared/common/iphone/RhoCryptImpl.mm +21 -2
  260. data/platform/shared/common/map/BaseMapEngine.cpp +2 -2
  261. data/platform/shared/common/map/GeocodingMapEngine.cpp +1 -1
  262. data/platform/shared/common/map/GoogleMapEngine.cpp +1 -1
  263. data/platform/shared/common/map/OSMMapEngine.cpp +1 -1
  264. data/platform/shared/curl/lib/curl_config.h +28 -0
  265. data/platform/shared/db/DBAdapter.cpp +18 -10
  266. data/platform/shared/json.new/JSONIterator.cpp +2 -2
  267. data/platform/shared/net/HttpServer.cpp +32 -0
  268. data/platform/shared/net/HttpServer.h +15 -0
  269. data/platform/shared/net/INetRequest.cpp +54 -0
  270. data/platform/shared/qt/RhoRubylib.pro +10 -0
  271. data/platform/shared/qt/rhodes/impl/AlertImpl.cpp +13 -0
  272. data/platform/shared/qt/rhodes/impl/CameraImpl.cpp +6 -0
  273. data/platform/shared/qt/rhodes/impl/DateTimePickerImpl.cpp +4 -0
  274. data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +36 -7
  275. data/platform/shared/qt/rhodes/impl/MainWindowImpl.h +12 -1
  276. data/platform/shared/qt/rhodes/impl/NativeTabbarImpl.cpp +21 -2
  277. data/platform/shared/qt/rhodes/impl/NativeTabbarImpl.h +1 -0
  278. data/platform/shared/qt/rhodes/impl/NativeToolbarImpl.cpp +10 -0
  279. data/platform/shared/qt/rhodes/impl/QtSystemImpl.cpp +55 -3
  280. data/platform/shared/qt/rhodes/impl/RhoClassFactoryImpl.h +11 -0
  281. data/platform/shared/qt/rhodes/impl/RhoThreadImpl.cpp +71 -7
  282. data/platform/shared/qt/rhodes/impl/RhoThreadImpl.h +79 -2
  283. data/platform/shared/qt/rhodes/impl/RhodesImpl.cpp +16 -6
  284. data/platform/shared/qt/rhodes/impl/SecurityTokenGeneratorImpl.cpp +37 -0
  285. data/platform/shared/qt/rhodes/impl/SecurityTokenGeneratorImpl.h +25 -0
  286. data/platform/shared/qt/rhodes/impl/SignatureImpl.cpp +2 -0
  287. data/platform/shared/qt/rhodes/impl/WebViewImpl.cpp +27 -0
  288. data/platform/shared/qt/rhodes/impl/notificationsound.cpp +16 -2
  289. data/platform/shared/qt/rhodes/impl/notificationsound.h +11 -1
  290. data/platform/shared/qt/rhodes/newVersion/QtMainWindow.cpp +25 -16
  291. data/platform/shared/qt/rhodes/newVersion/QtMainWindow.h +3 -0
  292. data/platform/shared/qt/rhodes/newVersion/WebUrlRequestInterceptor.cpp +17 -0
  293. data/platform/shared/qt/rhodes/rhodes.pro +68 -14
  294. data/platform/shared/qt/rhodes/rhorubyVersion/rhodeslib.cpp +148 -0
  295. data/platform/shared/qt/rhodes/rhorubyVersion/rhodeslib.h +12 -0
  296. data/platform/shared/qt/rholib/rholib.pro +33 -5
  297. data/platform/shared/qt/rhoruby_win32_build.bat +19 -0
  298. data/platform/shared/qt/rhoruby_win32_build_debug.bat +19 -0
  299. data/platform/shared/qt/rhosimulator_win32_build_debug.bat +19 -0
  300. data/platform/shared/qt/rubylib/rubylib.pro +1 -0
  301. data/platform/shared/qt/sqlite3/sqlite3.pro +1 -0
  302. data/platform/shared/qt/syncengine/syncengine.pro +1 -0
  303. data/platform/shared/rhoruby/api/IArray.h +20 -0
  304. data/platform/shared/rhoruby/api/IBoolean.h +17 -0
  305. data/platform/shared/rhoruby/api/IFloat.h +17 -0
  306. data/platform/shared/rhoruby/api/IHash.h +23 -0
  307. data/platform/shared/rhoruby/api/IInteger.h +18 -0
  308. data/platform/shared/rhoruby/api/IMutableArray.h +18 -0
  309. data/platform/shared/rhoruby/api/IMutableBoolean.h +18 -0
  310. data/platform/shared/rhoruby/api/IMutableFloat.h +17 -0
  311. data/platform/shared/rhoruby/api/IMutableHash.h +18 -0
  312. data/platform/shared/rhoruby/api/IMutableInteger.h +17 -0
  313. data/platform/shared/rhoruby/api/IMutableString.h +17 -0
  314. data/platform/shared/rhoruby/api/INil.h +16 -0
  315. data/platform/shared/rhoruby/api/IObject.h +46 -0
  316. data/platform/shared/rhoruby/api/IRefCountedObject.h +20 -0
  317. data/platform/shared/rhoruby/api/IRhoRuby.h +78 -0
  318. data/platform/shared/rhoruby/api/IRunnable.h +17 -0
  319. data/platform/shared/rhoruby/api/IString.h +17 -0
  320. data/platform/shared/rhoruby/api/RhoRuby.h +29 -0
  321. data/platform/shared/rhoruby/api/RhoRubySingletone.h +19 -0
  322. data/platform/shared/rhoruby/api/SmartPointer.h +27 -0
  323. data/platform/shared/rhoruby/impl/MutableArrayImpl.cpp +54 -0
  324. data/platform/shared/rhoruby/impl/MutableArrayImpl.h +48 -0
  325. data/platform/shared/rhoruby/impl/MutableBooleanImpl.cpp +44 -0
  326. data/platform/shared/rhoruby/impl/MutableBooleanImpl.h +44 -0
  327. data/platform/shared/rhoruby/impl/MutableFloatImpl.cpp +41 -0
  328. data/platform/shared/rhoruby/impl/MutableFloatImpl.h +44 -0
  329. data/platform/shared/rhoruby/impl/MutableHashImpl.cpp +64 -0
  330. data/platform/shared/rhoruby/impl/MutableHashImpl.h +49 -0
  331. data/platform/shared/rhoruby/impl/MutableIntegerImpl.cpp +41 -0
  332. data/platform/shared/rhoruby/impl/MutableIntegerImpl.h +44 -0
  333. data/platform/shared/rhoruby/impl/MutableStringImpl.cpp +52 -0
  334. data/platform/shared/rhoruby/impl/MutableStringImpl.h +44 -0
  335. data/platform/shared/rhoruby/impl/NilImpl.cpp +23 -0
  336. data/platform/shared/rhoruby/impl/NilImpl.h +32 -0
  337. data/platform/shared/rhoruby/impl/ObjectImpl.cpp +77 -0
  338. data/platform/shared/rhoruby/impl/ObjectImpl.h +53 -0
  339. data/platform/shared/rhoruby/impl/RefCountedObjectImpl.cpp +28 -0
  340. data/platform/shared/rhoruby/impl/RefCountedObjectImpl.h +33 -0
  341. data/platform/shared/rhoruby/impl/RhoRubyImpl.cpp +799 -0
  342. data/platform/shared/rhoruby/impl/RhoRubyImpl.h +81 -0
  343. data/platform/shared/rhoruby/impl/RhoRubySingletone.cpp +20 -0
  344. data/platform/shared/rhoruby/impl/RubyServerResponceImpl.cpp +32 -0
  345. data/platform/shared/rhoruby/impl/RubyServerResponceImpl.h +21 -0
  346. data/platform/shared/ruby/android/ruby/config.h +55 -3
  347. data/platform/shared/ruby/error.c +1 -1
  348. data/platform/shared/ruby/ext/rho/rhoruby.c +60 -7
  349. data/platform/shared/ruby/ext/rho/rhoruby.h +3 -0
  350. data/platform/shared/rubyext/NativeToolbarExt.h +1 -0
  351. data/platform/uwp/rhodes/rhodes_TemporaryKey.pfx +0 -0
  352. data/platform/uwp/rhoruntime/common/RhoClassFactory.h +6 -0
  353. data/platform/win32/RhoSimulator/Qt5Core.dll +0 -0
  354. data/platform/win32/RhoSimulator/Qt5Gui.dll +0 -0
  355. data/platform/win32/RhoSimulator/Qt5Multimedia.dll +0 -0
  356. data/platform/win32/RhoSimulator/Qt5Network.dll +0 -0
  357. data/platform/win32/RhoSimulator/Qt5Positioning.dll +0 -0
  358. data/platform/win32/RhoSimulator/Qt5PrintSupport.dll +0 -0
  359. data/platform/win32/RhoSimulator/Qt5Qml.dll +0 -0
  360. data/platform/win32/RhoSimulator/Qt5Quick.dll +0 -0
  361. data/platform/win32/RhoSimulator/Qt5QuickWidgets.dll +0 -0
  362. data/platform/win32/RhoSimulator/Qt5SerialPort.dll +0 -0
  363. data/platform/win32/RhoSimulator/Qt5Svg.dll +0 -0
  364. data/platform/win32/RhoSimulator/Qt5WebChannel.dll +0 -0
  365. data/platform/win32/RhoSimulator/Qt5WebEngine.dll +0 -0
  366. data/platform/win32/RhoSimulator/Qt5WebEngineCore.dll +0 -0
  367. data/platform/win32/RhoSimulator/Qt5WebEngineWidgets.dll +0 -0
  368. data/platform/win32/RhoSimulator/Qt5Widgets.dll +0 -0
  369. data/platform/win32/RhoSimulator/QtWebEngineProcess.exe +0 -0
  370. data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
  371. data/platform/win32/RhoSimulator/audio/qtaudio_wasapi.dll +0 -0
  372. data/platform/win32/RhoSimulator/audio/qtaudio_windows.dll +0 -0
  373. data/platform/win32/RhoSimulator/bearer/qgenericbearer.dll +0 -0
  374. data/platform/win32/RhoSimulator/iconengines/qsvgicon.dll +0 -0
  375. data/platform/win32/RhoSimulator/imageformats/qgif.dll +0 -0
  376. data/platform/win32/RhoSimulator/imageformats/qicns.dll +0 -0
  377. data/platform/win32/RhoSimulator/imageformats/qico.dll +0 -0
  378. data/platform/win32/RhoSimulator/imageformats/qjpeg.dll +0 -0
  379. data/platform/win32/RhoSimulator/imageformats/qsvg.dll +0 -0
  380. data/platform/win32/RhoSimulator/imageformats/qtga.dll +0 -0
  381. data/platform/win32/RhoSimulator/imageformats/qtiff.dll +0 -0
  382. data/platform/win32/RhoSimulator/imageformats/qwbmp.dll +0 -0
  383. data/platform/win32/RhoSimulator/imageformats/qwebp.dll +0 -0
  384. data/platform/win32/RhoSimulator/libEGL.dll +0 -0
  385. data/platform/win32/RhoSimulator/libGLESV2.dll +0 -0
  386. data/platform/win32/RhoSimulator/mediaservice/dsengine.dll +0 -0
  387. data/platform/win32/RhoSimulator/mediaservice/qtmedia_audioengine.dll +0 -0
  388. data/platform/win32/RhoSimulator/mediaservice/wmfengine.dll +0 -0
  389. data/platform/win32/RhoSimulator/platforms/qwindows.dll +0 -0
  390. data/platform/win32/RhoSimulator/playlistformats/qtmultimedia_m3u.dll +0 -0
  391. data/platform/win32/RhoSimulator/position/qtposition_geoclue.dll +0 -0
  392. data/platform/win32/RhoSimulator/position/qtposition_positionpoll.dll +0 -0
  393. data/platform/win32/RhoSimulator/position/qtposition_serialnmea.dll +0 -0
  394. data/platform/win32/RhoSimulator/position/qtposition_winrt.dll +0 -0
  395. data/platform/win32/RhoSimulator/printsupport/windowsprintersupport.dll +0 -0
  396. data/platform/wm/build/wm.rake +110 -5
  397. data/platform/wm/rhodes/rho/common/ExtManager.cpp +30 -0
  398. data/platform/wm/rhodes/rho/common/RhoClassFactory.h +6 -0
  399. data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +3 -0
  400. data/platform/wm/rubylib/rubylib.vcxproj +6 -0
  401. data/platform/wp8/rhoruntime/common/RhoClassFactory.h +6 -0
  402. data/rakefile.rb +14 -10
  403. data/res/build-tools/iphonesim/build/Release/iphonesim_8 +23 -15
  404. data/res/build-tools/maven/LICENSE +18 -89
  405. data/res/build-tools/maven/NOTICE +1 -1
  406. data/res/build-tools/maven/README.txt +12 -12
  407. data/res/build-tools/maven/bin/m2.conf +2 -2
  408. data/res/build-tools/maven/bin/mvn +122 -125
  409. data/res/build-tools/maven/bin/mvn.cmd +205 -0
  410. data/res/build-tools/maven/bin/mvnDebug +10 -176
  411. data/res/build-tools/maven/bin/mvnDebug.cmd +33 -0
  412. data/res/build-tools/maven/bin/mvnyjp +9 -181
  413. data/res/build-tools/maven/boot/plexus-classworlds-2.6.0.jar +0 -0
  414. data/res/build-tools/maven/conf/logging/simplelogger.properties +8 -1
  415. data/res/build-tools/maven/conf/settings.xml +1 -1
  416. data/res/build-tools/maven/conf/toolchains.xml +103 -0
  417. data/res/build-tools/maven/lib/animal-sniffer-annotations-1.14.jar +0 -0
  418. data/res/build-tools/maven/lib/animal-sniffer-annotations.license +14 -0
  419. data/res/build-tools/maven/lib/checker-compat-qual-2.0.0.jar +0 -0
  420. data/res/build-tools/maven/lib/checker-compat-qual.license +14 -0
  421. data/res/build-tools/maven/lib/commons-cli-1.4.jar +0 -0
  422. data/res/build-tools/maven/lib/commons-io-2.5.jar +0 -0
  423. data/res/build-tools/maven/lib/commons-lang3-3.8.1.jar +0 -0
  424. data/res/build-tools/maven/lib/error_prone_annotations-2.1.3.jar +0 -0
  425. data/res/build-tools/maven/lib/guava-25.1-android.jar +0 -0
  426. data/res/build-tools/maven/lib/guice-4.2.1-no_aop.jar +0 -0
  427. data/res/build-tools/maven/lib/j2objc-annotations-1.1.jar +0 -0
  428. data/res/build-tools/maven/lib/jansi-1.17.1.jar +0 -0
  429. data/res/build-tools/maven/lib/jansi-native/README.txt +7 -0
  430. data/res/build-tools/maven/lib/jansi-native/freebsd32/libjansi.so +0 -0
  431. data/res/build-tools/maven/lib/jansi-native/freebsd64/libjansi.so +0 -0
  432. data/res/build-tools/maven/lib/jansi-native/linux32/libjansi.so +0 -0
  433. data/res/build-tools/maven/lib/jansi-native/linux64/libjansi.so +0 -0
  434. data/res/build-tools/maven/lib/jansi-native/osx/libjansi.jnilib +0 -0
  435. data/res/build-tools/maven/lib/jansi-native/windows32/jansi.dll +0 -0
  436. data/res/build-tools/maven/lib/jansi-native/windows64/jansi.dll +0 -0
  437. data/res/build-tools/maven/lib/jcl-over-slf4j-1.7.25.jar +0 -0
  438. data/res/build-tools/maven/lib/jcl-over-slf4j.license +14 -0
  439. data/res/build-tools/maven/lib/jsr250-api.license +383 -405
  440. data/res/build-tools/maven/lib/jsr305-3.0.2.jar +0 -0
  441. data/res/build-tools/maven/lib/maven-artifact-3.6.1.jar +0 -0
  442. data/res/build-tools/maven/lib/maven-builder-support-3.6.1.jar +0 -0
  443. data/res/build-tools/maven/lib/maven-compat-3.6.1.jar +0 -0
  444. data/res/build-tools/maven/lib/maven-core-3.6.1.jar +0 -0
  445. data/res/build-tools/maven/lib/maven-embedder-3.6.1.jar +0 -0
  446. data/res/build-tools/maven/lib/maven-model-3.6.1.jar +0 -0
  447. data/res/build-tools/maven/lib/maven-model-builder-3.6.1.jar +0 -0
  448. data/res/build-tools/maven/lib/maven-plugin-api-3.6.1.jar +0 -0
  449. data/res/build-tools/maven/lib/maven-repository-metadata-3.6.1.jar +0 -0
  450. data/res/build-tools/maven/lib/maven-resolver-api-1.3.3.jar +0 -0
  451. data/res/build-tools/maven/lib/maven-resolver-connector-basic-1.3.3.jar +0 -0
  452. data/res/build-tools/maven/lib/maven-resolver-impl-1.3.3.jar +0 -0
  453. data/res/build-tools/maven/lib/maven-resolver-provider-3.6.1.jar +0 -0
  454. data/res/build-tools/maven/lib/maven-resolver-spi-1.3.3.jar +0 -0
  455. data/res/build-tools/maven/lib/maven-resolver-transport-wagon-1.3.3.jar +0 -0
  456. data/res/build-tools/maven/lib/maven-resolver-util-1.3.3.jar +0 -0
  457. data/res/build-tools/maven/lib/maven-settings-3.6.1.jar +0 -0
  458. data/res/build-tools/maven/lib/maven-settings-builder-3.6.1.jar +0 -0
  459. data/res/build-tools/maven/lib/maven-shared-utils-3.2.1.jar +0 -0
  460. data/res/build-tools/maven/lib/maven-slf4j-provider-3.6.1.jar +0 -0
  461. data/res/build-tools/maven/lib/org.eclipse.sisu.inject-0.3.3.jar +0 -0
  462. data/res/build-tools/maven/lib/org.eclipse.sisu.inject.license +210 -261
  463. data/res/build-tools/maven/lib/org.eclipse.sisu.plexus-0.3.3.jar +0 -0
  464. data/res/build-tools/maven/lib/org.eclipse.sisu.plexus.license +210 -261
  465. data/res/build-tools/maven/lib/plexus-component-annotations-1.7.1.jar +0 -0
  466. data/res/build-tools/maven/lib/plexus-interpolation-1.25.jar +0 -0
  467. data/res/build-tools/maven/lib/plexus-sec-dispatcher-1.4.jar +0 -0
  468. data/res/build-tools/maven/lib/plexus-utils-3.2.0.jar +0 -0
  469. data/res/build-tools/maven/lib/slf4j-api-1.7.25.jar +0 -0
  470. data/res/build-tools/maven/lib/slf4j-api.license +10 -186
  471. data/res/build-tools/maven/lib/wagon-file-3.3.2.jar +0 -0
  472. data/res/build-tools/maven/lib/wagon-http-3.3.2-shaded.jar +0 -0
  473. data/res/build-tools/maven/lib/wagon-provider-api-3.3.2.jar +0 -0
  474. data/res/generators/rhogen.rb +150 -0
  475. data/res/generators/templates/application/AndroidManifest.erb +13 -4
  476. data/res/generators/templates/application/build.yml +9 -0
  477. data/res/generators/templates/application/nodejs_build.yml +1 -1
  478. data/res/generators/templates/application/resources/android/res/xml/network_security_config.xml +7 -0
  479. data/res/generators/templates/application/rhoconfig.txt +13 -6
  480. data/res/generators/templates/application/rhoconfig_rubynode.txt +139 -0
  481. data/res/generators/templates/application/rubynodejs_build.yml +95 -0
  482. data/res/generators/templates/extension/extensions/montana/ext/platform/android/Rakefile +19 -0
  483. data/res/generators/templates/iphone_project/root/Entitlements.plist +1 -1
  484. data/res/generators/templates/iphone_project/root/Info.plist +1 -3
  485. data/res/generators/templates/iphone_project/root/rhorunner_development.entitlements +1 -1
  486. data/res/generators/templates/iphone_project/root/rhorunner_production.entitlements +1 -1
  487. data/rhodes.gemspec +2 -2
  488. data/version +1 -1
  489. metadata +244 -71
  490. data/res/build-tools/maven/bin/mvn.bat +0 -197
  491. data/res/build-tools/maven/bin/mvnDebug.bat +0 -200
  492. data/res/build-tools/maven/boot/plexus-classworlds-2.5.2.jar +0 -0
  493. data/res/build-tools/maven/lib/aether-api-1.0.0.v20140518.jar +0 -0
  494. data/res/build-tools/maven/lib/aether-api.license +0 -261
  495. data/res/build-tools/maven/lib/aether-connector-basic-1.0.0.v20140518.jar +0 -0
  496. data/res/build-tools/maven/lib/aether-connector-basic.license +0 -261
  497. data/res/build-tools/maven/lib/aether-impl-1.0.0.v20140518.jar +0 -0
  498. data/res/build-tools/maven/lib/aether-impl.license +0 -261
  499. data/res/build-tools/maven/lib/aether-spi-1.0.0.v20140518.jar +0 -0
  500. data/res/build-tools/maven/lib/aether-spi.license +0 -261
  501. data/res/build-tools/maven/lib/aether-transport-wagon-1.0.0.v20140518.jar +0 -0
  502. data/res/build-tools/maven/lib/aether-transport-wagon.license +0 -261
  503. data/res/build-tools/maven/lib/aether-util-1.0.0.v20140518.jar +0 -0
  504. data/res/build-tools/maven/lib/aether-util.license +0 -261
  505. data/res/build-tools/maven/lib/cdi-api.license +0 -445
  506. data/res/build-tools/maven/lib/commons-cli-1.2.jar +0 -0
  507. data/res/build-tools/maven/lib/commons-io-2.2.jar +0 -0
  508. data/res/build-tools/maven/lib/commons-lang-2.6.jar +0 -0
  509. data/res/build-tools/maven/lib/guava-18.0.jar +0 -0
  510. data/res/build-tools/maven/lib/jsoup-1.7.2.jar +0 -0
  511. data/res/build-tools/maven/lib/jsoup.license +0 -66
  512. data/res/build-tools/maven/lib/maven-aether-provider-3.2.5.jar +0 -0
  513. data/res/build-tools/maven/lib/maven-aether-provider.license +0 -202
  514. data/res/build-tools/maven/lib/maven-artifact-3.2.5.jar +0 -0
  515. data/res/build-tools/maven/lib/maven-artifact.license +0 -202
  516. data/res/build-tools/maven/lib/maven-compat-3.2.5.jar +0 -0
  517. data/res/build-tools/maven/lib/maven-compat.license +0 -202
  518. data/res/build-tools/maven/lib/maven-core-3.2.5.jar +0 -0
  519. data/res/build-tools/maven/lib/maven-core.license +0 -202
  520. data/res/build-tools/maven/lib/maven-embedder-3.2.5.jar +0 -0
  521. data/res/build-tools/maven/lib/maven-embedder.license +0 -202
  522. data/res/build-tools/maven/lib/maven-model-3.2.5.jar +0 -0
  523. data/res/build-tools/maven/lib/maven-model-builder-3.2.5.jar +0 -0
  524. data/res/build-tools/maven/lib/maven-model-builder.license +0 -202
  525. data/res/build-tools/maven/lib/maven-model.license +0 -202
  526. data/res/build-tools/maven/lib/maven-plugin-api-3.2.5.jar +0 -0
  527. data/res/build-tools/maven/lib/maven-plugin-api.license +0 -202
  528. data/res/build-tools/maven/lib/maven-repository-metadata-3.2.5.jar +0 -0
  529. data/res/build-tools/maven/lib/maven-repository-metadata.license +0 -202
  530. data/res/build-tools/maven/lib/maven-settings-3.2.5.jar +0 -0
  531. data/res/build-tools/maven/lib/maven-settings-builder-3.2.5.jar +0 -0
  532. data/res/build-tools/maven/lib/maven-settings-builder.license +0 -202
  533. data/res/build-tools/maven/lib/maven-settings.license +0 -202
  534. data/res/build-tools/maven/lib/org.eclipse.sisu.inject-0.3.0.M1.jar +0 -0
  535. data/res/build-tools/maven/lib/org.eclipse.sisu.plexus-0.3.0.M1.jar +0 -0
  536. data/res/build-tools/maven/lib/plexus-cipher.license +0 -445
  537. data/res/build-tools/maven/lib/plexus-component-annotations-1.5.5.jar +0 -0
  538. data/res/build-tools/maven/lib/plexus-interpolation-1.21.jar +0 -0
  539. data/res/build-tools/maven/lib/plexus-sec-dispatcher-1.3.jar +0 -0
  540. data/res/build-tools/maven/lib/plexus-sec-dispatcher.license +0 -445
  541. data/res/build-tools/maven/lib/plexus-utils-3.0.20.jar +0 -0
  542. data/res/build-tools/maven/lib/sisu-guice-3.2.3-no_aop.jar +0 -0
  543. data/res/build-tools/maven/lib/slf4j-api-1.7.5.jar +0 -0
  544. data/res/build-tools/maven/lib/slf4j-simple-1.7.5.jar +0 -0
  545. data/res/build-tools/maven/lib/slf4j-simple.license +0 -190
  546. data/res/build-tools/maven/lib/wagon-file-2.8.jar +0 -0
  547. data/res/build-tools/maven/lib/wagon-file.license +0 -202
  548. data/res/build-tools/maven/lib/wagon-http-2.8-shaded.jar +0 -0
  549. data/res/build-tools/maven/lib/wagon-http-shared-2.8.jar +0 -0
  550. data/res/build-tools/maven/lib/wagon-http-shared.license +0 -202
  551. data/res/build-tools/maven/lib/wagon-http.license +0 -202
  552. data/res/build-tools/maven/lib/wagon-provider-api-2.8.jar +0 -0
  553. data/res/build-tools/maven/lib/wagon-provider-api.license +0 -202
@@ -30,6 +30,7 @@
30
30
  #include "rhodes/RhoClassFactory.h"
31
31
  #include "rhodes/sslimpl.h"
32
32
  #include "rhodes/rhocryptimpl.h"
33
+ #include "rhodes/SecurityTokenGenerator.h"
33
34
 
34
35
  static rho::common::CRhoClassFactory g_rhoClassFactory;
35
36
  rho::common::IRhoClassFactory* rho_get_RhoClassFactory()
@@ -57,6 +58,12 @@ IRhoCrypt *CRhoClassFactory::createRhoCrypt()
57
58
  return new CRhoCryptImpl;
58
59
  }
59
60
 
61
+ const ISecurityTokenGenerator* CRhoClassFactory::createSecurityTokenGenerator()
62
+ {
63
+ static SecurityTokenGenerator global_generator;
64
+ return &global_generator;
65
+ }
66
+
60
67
  } // namespace common
61
68
  } // namespace rho
62
69
 
@@ -0,0 +1,60 @@
1
+ #include "rhodes/SecurityTokenGenerator.h"
2
+ #include "rhodes/JNIRhodes.h"
3
+ #include <unistd.h>
4
+
5
+
6
+ namespace rho
7
+ {
8
+ namespace common
9
+ {
10
+
11
+ SecurityTokenGenerator::SecurityTokenGenerator()
12
+ {
13
+ JNIEnv *env = jnienv();
14
+ if (!env) {
15
+ return;
16
+ }
17
+
18
+ size_t tryCount = 5;
19
+ do
20
+ {
21
+ cls = env->FindClass("com/rhomobile/rhodes/SecurityTokenGenerator");
22
+ if(cls) break;
23
+ usleep(1000);
24
+ }while(--tryCount);
25
+
26
+ if (!cls) return;
27
+
28
+ jmethodID midGetInstance = getJNIClassStaticMethod(env, cls, "getInstance", "()Lcom/rhomobile/rhodes/SecurityTokenGenerator;");
29
+ jobject obj = env->CallStaticObjectMethod(cls, midGetInstance);
30
+
31
+ mibGetTokenString = getJNIClassMethod(env, cls, "getTokenString", "()Ljava/lang/String;");
32
+ if(!mibGetTokenString) return;
33
+ mibGetSecureAgent = getJNIClassMethod(env, cls, "getSecureAgent", "()Ljava/lang/String;");
34
+ if(!mibGetSecureAgent) return;
35
+
36
+ generator_object = env->NewGlobalRef(obj);
37
+ env->DeleteLocalRef(obj);
38
+ }
39
+
40
+ SecurityTokenGenerator::~SecurityTokenGenerator()
41
+ {
42
+ if (generator_object)
43
+ jnienv()->DeleteGlobalRef(generator_object);
44
+
45
+ }
46
+
47
+ const rho::String& SecurityTokenGenerator::getSecurityToken() const
48
+ {
49
+ JNIEnv *env = jnienv();
50
+ if(currentTokens.empty())
51
+ {
52
+ jhstring result = static_cast<jstring>(env->CallObjectMethod(generator_object, mibGetTokenString));
53
+ currentTokens = rho_cast<rho::String>(env, result);
54
+ }
55
+
56
+ return currentTokens;
57
+ }
58
+
59
+ }
60
+ }
@@ -36,6 +36,7 @@
36
36
 
37
37
  #include <cstring>
38
38
  #include <algorithm>
39
+ #include <cassert>
39
40
 
40
41
  #if __cplusplus == 201103L
41
42
  #include <unordered_map>
@@ -192,7 +193,9 @@ typedef int (*func_sflags_t)(const char *mode, int *optr);
192
193
  #define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
193
194
  #endif
194
195
 
196
+ #ifndef __aarch64__
195
197
  static func_sflags_t __sflags;
198
+ #endif
196
199
  static func_sfp_t __sfp;
197
200
 
198
201
  // ssize_t pread(int fd, void *buf, size_t count, off_t offset);
@@ -218,7 +221,11 @@ typedef int (*func_fchown_t)(int fd, uid_t uid, gid_t gid);
218
221
  typedef int (*func_lchown_t)(const char *path, uid_t uid, gid_t gid);
219
222
  typedef int (*func_link_t)(const char *src, const char *dst);
220
223
  typedef int (*func_symlink_t)(const char *src, const char *dst);
224
+ #if defined(__aarch64__)
225
+ typedef ssize_t (*func_readlink_t)(const char *path, char *buf, size_t bufsize);
226
+ #else
221
227
  typedef int (*func_readlink_t)(const char *path, char *buf, size_t bufsize);
228
+ #endif
222
229
  typedef int (*func_mkdir_t)(const char *path, mode_t mode);
223
230
  typedef int (*func_fchdir_t)(int fd);
224
231
  typedef int (*func_fcntl_t)(int fd, int command, ...);
@@ -228,6 +235,7 @@ typedef int (*func_flock_t)(int fd, int operation);
228
235
  typedef int (*func_fstat_t)(int filedes, struct stat *buf);
229
236
  typedef int (*func_fsync_t)(int fd);
230
237
  typedef int (*func_ftruncate_t)(int fd, off_t offset);
238
+ typedef int (*func_ftruncate64_t)(int fd, off64_t offset);
231
239
  typedef int (*func_lstat_t)(const char *path, struct stat *buf);
232
240
  typedef int (*func_open_t)(const char *path, int oflag, ...);
233
241
  typedef int (*func_select_t)(int maxfd, fd_set *rfd, fd_set *wfd, fd_set *efd, struct timeval *tv);
@@ -276,6 +284,7 @@ static func_fseek_t real_fseek;
276
284
  static func_ftell_t real_ftell;
277
285
  static func_fclose_t real_fclose;
278
286
  static func_fopen_t real_fopen;
287
+ static func_fopen_t real_fopen64;
279
288
 
280
289
  static func_access_t real_access;
281
290
  static func_close_t real_close;
@@ -296,14 +305,18 @@ static func_flock_t real_flock;
296
305
  static func_fstat_t real_fstat;
297
306
  static func_fsync_t real_fsync;
298
307
  static func_ftruncate_t real_ftruncate;
308
+ static func_ftruncate64_t real_ftruncate64;
299
309
  static func_lseek64_t real_lseek64;
300
310
  static func_lseek_t real_lseek;
301
311
  static func_lstat_t real_lstat;
302
312
  static func_open_t real_open;
313
+ static func_open_t real_open64;
303
314
  static func_read_t real_read;
304
315
 
305
316
  static func_pread_t real_pread;
317
+ static func_pread_t real_pread64;
306
318
  static func_pwrite_t real_pwrite;
319
+ static func_pwrite_t real_pwrite64;
307
320
 
308
321
  static func_sendfile_t real_sendfile;
309
322
 
@@ -510,7 +523,7 @@ void processStatTable(const char* statTablePath, RhoFsSetupMode setupMode, bool
510
523
  strTime.assign(pos, ptr-pos);
511
524
 
512
525
  int type;
513
- unsigned long filesize;
526
+ size_t filesize = 0;
514
527
  unsigned long mtime;
515
528
 
516
529
  if(strType.compare("file") == 0)
@@ -535,7 +548,7 @@ void processStatTable(const char* statTablePath, RhoFsSetupMode setupMode, bool
535
548
  return;
536
549
  }
537
550
 
538
- sscanf(strSize.c_str(), "%u", &filesize);
551
+ sscanf(strSize.c_str(), "%zu", &filesize);
539
552
  sscanf(strTime.c_str(), "%u", &mtime);
540
553
 
541
554
  updateStatTable(strPath, static_cast<rho_fileapi_type_t>(type), filesize, mtime);
@@ -624,9 +637,20 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInit
624
637
  midDeleteRecursively = getJNIClassStaticMethod(env, clsFileApi, "deleteRecursively", "(Ljava/lang/String;)I");
625
638
  if (!midDeleteRecursively) return;
626
639
 
640
+ #if defined(__aarch64__)
641
+ const char *libc = "/system/lib64/libc.so";
642
+ #else
627
643
  const char *libc = "/system/lib/libc.so";
644
+ #endif
628
645
  void *pc = dlopen(libc, RTLD_LAZY);
646
+ if(!pc) {
647
+ RHO_LOG("dlopen return: %s", dlerror());
648
+ assert(false);
649
+ }
650
+ assert(pc != nullptr);
651
+ #ifndef __aarch64__
629
652
  __sflags = (func_sflags_t)dlsym(pc, "__sflags");
653
+ #endif
630
654
  __sfp = (func_sfp_t)dlsym(pc, "__sfp");
631
655
  real_access = (func_access_t)dlsym(pc, "access");
632
656
  real_close = (func_close_t)dlsym(pc, "close");
@@ -650,6 +674,7 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInit
650
674
  real_ftell = (func_ftell_t)dlsym(pc,"ftell");
651
675
  real_fclose = (func_fclose_t)dlsym(pc,"fclose");
652
676
  real_fopen = (func_fopen_t)dlsym(pc,"fopen");
677
+ real_fopen64 = (func_fopen_t)dlsym(pc,"fopen64");
653
678
  if (real_fdatasync == NULL) {
654
679
  //Android 2.1 have no fdatasync call. Use fsync instead
655
680
  RHO_LOG("No fdatasync implementation, using fsync instead");
@@ -659,14 +684,18 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInit
659
684
  real_flock = (func_flock_t)dlsym(pc, "flock");
660
685
  real_fstat = (func_fstat_t)dlsym(pc, "fstat");
661
686
  real_ftruncate = (func_ftruncate_t)dlsym(pc, "ftruncate");
687
+ real_ftruncate64 = (func_ftruncate64_t)dlsym(pc, "ftruncate64");
662
688
  real_lseek = (func_lseek_t)dlsym(pc, "lseek");
663
689
  real_lseek64 = (func_lseek64_t)dlsym(pc, "lseek64");
664
690
  real_lstat = (func_lstat_t)dlsym(pc, "lstat");
665
691
  real_open = (func_open_t)dlsym(pc, "open");
692
+ real_open64 = (func_open_t)dlsym(pc, "open64");
666
693
  real_read = (func_read_t)dlsym(pc, "read");
667
694
 
668
695
  real_pread = (func_pread_t)dlsym(pc, "pread");
696
+ real_pread64 = (func_pread_t)dlsym(pc, "pread64");
669
697
  real_pwrite = (func_pwrite_t)dlsym(pc, "pwrite");
698
+ real_pwrite64 = (func_pwrite_t)dlsym(pc, "pwrite");
670
699
  real_sendfile = (func_sendfile_t)dlsym(pc, "sendfile");
671
700
 
672
701
  real_utime = (func_utime_t)dlsym(pc, "utime");
@@ -979,6 +1008,110 @@ RHO_GLOBAL jboolean JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_needEmulat
979
1008
  return need;
980
1009
  }
981
1010
 
1011
+ RHO_GLOBAL int j_open(const char *path, int oflag, ...)
1012
+ {
1013
+ RAWLOG_INFO("j_open is stub!!!");
1014
+ return -1;
1015
+ }
1016
+
1017
+ RHO_GLOBAL int open64(const char *path, int oflag, ...)
1018
+ {
1019
+ std::string fpath;
1020
+ if (path)
1021
+ fpath = path;
1022
+
1023
+ if (fpath.empty())
1024
+ {
1025
+ RHO_LOG("open: path is empty");
1026
+ errno = EFAULT;
1027
+ return -1;
1028
+ }
1029
+
1030
+ RHO_LOG("open: %s...", path);
1031
+
1032
+ //scoped_lock_t guard(rho_file_mtx);
1033
+
1034
+ fpath = make_full_path(fpath);
1035
+ RHO_LOG("open: %s: fpath: %s", path, fpath.c_str());
1036
+
1037
+ // try to found from opened
1038
+
1039
+
1040
+ bool emulate = need_emulate(fpath);
1041
+ RHO_LOG("open: %s: emulate: %d", path, (int)emulate);
1042
+ if (emulate && has_pending_exception())
1043
+ {
1044
+ RHO_LOG("open: %s: has_pending_exception, return -1", path);
1045
+ errno = EFAULT;
1046
+ return -1;
1047
+ }
1048
+ if (emulate && (oflag & (O_WRONLY | O_RDWR)))
1049
+ //if (emulate)
1050
+ {
1051
+ RHO_LOG("open: %s: copy from Android package", path);
1052
+ JNIEnv *env = jnienv_fileapi();
1053
+ jhstring relPathObj = rho_cast<jstring>(env, make_rel_path(fpath));
1054
+ env->CallStaticBooleanMethod(clsFileApi, midCopy, relPathObj.get());
1055
+ if (has_pending_exception())
1056
+ {
1057
+ RHO_LOG("open: %s: has_pending_exception, return -1", path);
1058
+ errno = EFAULT;
1059
+ return -1;
1060
+ }
1061
+
1062
+ emulate = false;
1063
+ }
1064
+ RHO_LOG("open2: %s: emulate: %d", path, (int)emulate);
1065
+
1066
+ int fd = -1;
1067
+ if (emulate)
1068
+ {
1069
+ RHO_LOG("open3: %s: emulate", path);
1070
+ JNIEnv *env = jnienv_fileapi();
1071
+ jhstring relPathObj = rho_cast<jstring>(env, make_rel_path(fpath));
1072
+ jhobject is = env->CallStaticObjectMethod(clsFileApi, midOpen, relPathObj.get());
1073
+
1074
+ if (!is)
1075
+ {
1076
+ errno = EFAULT;
1077
+ fd = -1;
1078
+ }
1079
+ else
1080
+ {
1081
+ scoped_lock_t guard(rho_file_mtx);
1082
+ if (!rho_fd_free.empty())
1083
+ {
1084
+ fd = rho_fd_free[0];
1085
+ rho_fd_free.erase(rho_fd_free.begin());
1086
+ }
1087
+ else
1088
+ fd = rho_fd_counter++;
1089
+ rho_fd_data_t d;
1090
+ d.type = rho_type_file;
1091
+ d.is = env->NewGlobalRef(is.get());
1092
+ d.dirp = NULL;
1093
+ d.fpath = fpath;
1094
+ d.pos = 0;
1095
+ d.refCount = 1;
1096
+ rho_fd_map[fd] = d;
1097
+ }
1098
+ }
1099
+ else
1100
+ {
1101
+ RHO_LOG("open64: %s: native", path);
1102
+ mode_t mode = 0;
1103
+ if (oflag & O_CREAT)
1104
+ {
1105
+ va_list vl;
1106
+ va_start(vl, oflag);
1107
+ mode = va_arg(vl, int);
1108
+ va_end(vl);
1109
+ }
1110
+ fd = real_open64(path, oflag, mode);
1111
+ }
1112
+ RHO_LOG("openRESULT: %s => %d", path, fd);
1113
+ }
1114
+
982
1115
  RHO_GLOBAL int open(const char *path, int oflag, ...)
983
1116
  {
984
1117
  std::string fpath;
@@ -1087,13 +1220,30 @@ RHO_GLOBAL int creat(const char* path, mode_t mode)
1087
1220
  RHO_GLOBAL int fcntl(int fd, int command, ...)
1088
1221
  {
1089
1222
  RHO_LOG("fcntl: fd %d, command: %d", fd, command);
1223
+
1224
+ int r = -1;
1225
+
1090
1226
  if (rho_fs_mode == RHO_FS_DISK_ONLY || fd < RHO_FD_BASE)
1091
1227
  {
1092
- va_list vl;
1093
- va_start(vl, command);
1094
- int arg = va_arg(vl, int);
1095
- va_end(vl);
1096
- return real_fcntl(fd, command, arg);
1228
+ if ( ( command == F_SETLK ) || ( command == F_GETLK ) || ( command == F_SETLKW ) ) {
1229
+ va_list vl1;
1230
+ va_start(vl1,command);
1231
+ flock* pLock = va_arg(vl1, flock*);
1232
+ va_end(vl1);
1233
+ r = real_fcntl(fd, command, pLock);
1234
+ } else {
1235
+ va_list vl;
1236
+ va_start(vl, command);
1237
+ int arg = va_arg(vl, int);
1238
+ va_end(vl);
1239
+ r = real_fcntl(fd, command, arg);
1240
+ }
1241
+
1242
+ if ( r < 0 ) {
1243
+ RHO_LOG("fcntl: errno %d", errno);
1244
+ }
1245
+
1246
+ return r;
1097
1247
  }
1098
1248
 
1099
1249
  if (has_pending_exception())
@@ -1112,6 +1262,7 @@ RHO_GLOBAL int fcntl(int fd, int command, ...)
1112
1262
  rho_fd_map_t::iterator it = rho_fd_map.find(fd);
1113
1263
  if (it == rho_fd_map.end())
1114
1264
  {
1265
+ RAWLOG_ERROR("fcntl: EBADF");
1115
1266
  errno = EBADF;
1116
1267
  return -1;
1117
1268
  }
@@ -1159,7 +1310,7 @@ RHO_GLOBAL int close(int fd)
1159
1310
  if (it == rho_fd_map.end())
1160
1311
  {
1161
1312
  errno = EBADF;
1162
- RHO_LOG("close: ERROR 2 fd %d", fd);
1313
+ RAWLOG_ERROR1("close: ERROR 2 fd %d", fd);
1163
1314
  return -1;
1164
1315
  }
1165
1316
 
@@ -1180,6 +1331,27 @@ RHO_GLOBAL int close(int fd)
1180
1331
  return 0;
1181
1332
  }
1182
1333
 
1334
+ RHO_GLOBAL ssize_t pread64(int fd, void* buf, size_t count, off64_t offset)
1335
+ {
1336
+ RHO_LOG("pread: BEGIN fd %d: offset: %ld: count: %ld", fd, (long)offset, (long)count);
1337
+ if (rho_fs_mode == RHO_FS_DISK_ONLY || fd < RHO_FD_BASE)
1338
+ {
1339
+ ssize_t ret = real_pread64(fd, buf, count, offset);
1340
+ RHO_LOG("pread: fd %d: offset: %ld: count: %ld: return %ld bytes (native)", fd, (long)offset, (long)count, (long)ret);
1341
+ return ret;
1342
+ }
1343
+
1344
+ off_t saved_offset = lseek(fd, 0, SEEK_CUR);
1345
+ lseek(fd, offset, SEEK_SET);
1346
+
1347
+ ssize_t result = read(fd, buf, count);
1348
+
1349
+ lseek(fd, saved_offset, SEEK_SET);
1350
+
1351
+ RHO_LOG("pread: fd %d: offset: %ld: count: %ld: return %ld bytes (rho): errno: %d", fd, (long)offset, (long)count, (long)result, (int)errno);
1352
+
1353
+ return result;
1354
+ }
1183
1355
 
1184
1356
  RHO_GLOBAL ssize_t pread(int fd, void *buf, size_t count, off_t offset)
1185
1357
  {
@@ -1204,6 +1376,27 @@ RHO_GLOBAL ssize_t pread(int fd, void *buf, size_t count, off_t offset)
1204
1376
  return result;
1205
1377
  }
1206
1378
 
1379
+ RHO_GLOBAL ssize_t pwrite64(int fd, const void* buf, size_t count, off64_t offset)
1380
+ {
1381
+ RHO_LOG("pwrite: BEGIN fd %d: offset: %ld: count: %ld", fd, (long)offset, (long)count);
1382
+ if (rho_fs_mode == RHO_FS_DISK_ONLY || fd < RHO_FD_BASE)
1383
+ {
1384
+ ssize_t ret = real_pwrite64(fd, buf, count, offset);
1385
+ RHO_LOG("pwrite: fd %d: offset: %ld: count: %ld: return %ld bytes (native)", fd, (long)offset, (long)count, (long)ret);
1386
+ return ret;
1387
+ }
1388
+
1389
+ off_t saved_offset = lseek(fd, 0, SEEK_CUR);
1390
+ lseek(fd, offset, SEEK_SET);
1391
+
1392
+ ssize_t result = write(fd, buf, count);
1393
+
1394
+ lseek(fd, saved_offset, SEEK_SET);
1395
+
1396
+ RHO_LOG("pwrite: fd %d: offset: %ld: count: %ld: return %ld bytes (rho)", fd, (long)offset, (long)count, (long)result);
1397
+ return result;
1398
+ }
1399
+
1207
1400
  RHO_GLOBAL ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset)
1208
1401
  {
1209
1402
  RHO_LOG("pwrite: BEGIN fd %d: offset: %ld: count: %ld", fd, (long)offset, (long)count);
@@ -1394,6 +1587,7 @@ RHO_GLOBAL ssize_t read(int fd, void *buf, size_t count)
1394
1587
  if (it == rho_fd_map.end())
1395
1588
  {
1396
1589
  errno = EBADF;
1590
+ RAWLOG_ERROR1("read: ERROR 2 fd %d", fd);
1397
1591
  return (ssize_t)-1;
1398
1592
  }
1399
1593
 
@@ -1444,7 +1638,7 @@ RHO_GLOBAL ssize_t write(int fd, const void *buf, size_t count)
1444
1638
 
1445
1639
  errno = EBADF;
1446
1640
 
1447
- RHO_LOG("write: fd %d: count: %ld UNIMPLEMENTED !!!", fd, (long)count);
1641
+ RAWLOG_ERROR2("write: fd %d: count: %ld UNIMPLEMENTED !!!", fd, (long)count);
1448
1642
 
1449
1643
  return -1;
1450
1644
  }
@@ -1530,6 +1724,7 @@ RHO_GLOBAL int fchown(int fd, uid_t uid, gid_t gid)
1530
1724
  rho_fd_map_t::iterator it = rho_fd_map.find(fd);
1531
1725
  if (it == rho_fd_map.end())
1532
1726
  {
1727
+ RAWLOG_ERROR("fchown: EBADF");
1533
1728
  errno = EBADF;
1534
1729
  return -1;
1535
1730
  }
@@ -1604,7 +1799,11 @@ RHO_GLOBAL int symlink(const char *src, const char *dst)
1604
1799
  return real_symlink(src, dst);
1605
1800
  }
1606
1801
 
1802
+ #if defined(__aarch64__)
1803
+ RHO_GLOBAL ssize_t readlink(const char *path, char *buf, size_t bufsize)
1804
+ #else
1607
1805
  RHO_GLOBAL int readlink(const char *path, char *buf, size_t bufsize)
1806
+ #endif
1608
1807
  {
1609
1808
  RHO_LOG("readlink: path=%s", path);
1610
1809
  if (!need_emulate(path))
@@ -1642,6 +1841,7 @@ RHO_GLOBAL loff_t lseek64(int fd, loff_t offset, int whence)
1642
1841
  rho_fd_map_t::iterator it = rho_fd_map.find(fd);
1643
1842
  if (it == rho_fd_map.end())
1644
1843
  {
1844
+ RAWLOG_ERROR("lseek64: EBADF");
1645
1845
  errno = EBADF;
1646
1846
  return -1;
1647
1847
  }
@@ -1649,6 +1849,7 @@ RHO_GLOBAL loff_t lseek64(int fd, loff_t offset, int whence)
1649
1849
  rho_stat_t *st = rho_stat(make_rel_path(it->second.fpath));
1650
1850
  if (!st || st->type != rho_type_file)
1651
1851
  {
1852
+ RAWLOG_ERROR("lseek64: EBADF");
1652
1853
  errno = EBADF;
1653
1854
  return -1;
1654
1855
  }
@@ -1696,7 +1897,7 @@ RHO_GLOBAL loff_t lseek64(int fd, loff_t offset, int whence)
1696
1897
 
1697
1898
  if (is == NULL)
1698
1899
  {
1699
- RHO_LOG("lseek64: fd %d: return EBADF", fd);
1900
+ RAWLOG_ERROR1("lseek64: fd %d: return EBADF", fd);
1700
1901
  errno = EBADF;
1701
1902
  return -1;
1702
1903
  }
@@ -1775,6 +1976,37 @@ RHO_GLOBAL int fdatasync(int fd)
1775
1976
  RHO_NOT_IMPLEMENTED;
1776
1977
  }
1777
1978
 
1979
+ RHO_GLOBAL int ftruncate64(int fd, off64_t offset)
1980
+ {
1981
+ RHO_LOG("ftruncate64: fd %d", fd);
1982
+ if (offset < 0)
1983
+ {
1984
+ errno = EINVAL;
1985
+ return -1;
1986
+ }
1987
+
1988
+ if (rho_fs_mode == RHO_FS_DISK_ONLY || fd < RHO_FD_BASE) {
1989
+ int res = real_ftruncate64(fd, offset);
1990
+ return res;
1991
+ }
1992
+
1993
+ errno = EINVAL;
1994
+ return -1;
1995
+ }
1996
+
1997
+ RHO_GLOBAL FILE* fdopen(int __fd, const char* __mode)
1998
+ {
1999
+ RAWLOG_ERROR("fdopen stub");
2000
+ return NULL;
2001
+ }
2002
+
2003
+ int dup3(int __old_fd, int __new_fd, int __flags)
2004
+ {
2005
+ RAWLOG_ERROR("dup3 stub");
2006
+ return -1;
2007
+ }
2008
+
2009
+
1778
2010
  RHO_GLOBAL int ftruncate(int fd, off_t offset)
1779
2011
  {
1780
2012
  RHO_LOG("ftruncate: fd %d", fd);
@@ -1784,8 +2016,10 @@ RHO_GLOBAL int ftruncate(int fd, off_t offset)
1784
2016
  return -1;
1785
2017
  }
1786
2018
 
1787
- if (rho_fs_mode == RHO_FS_DISK_ONLY || fd < RHO_FD_BASE)
1788
- return real_ftruncate(fd, offset);
2019
+ if (rho_fs_mode == RHO_FS_DISK_ONLY || fd < RHO_FD_BASE) {
2020
+ int res = real_ftruncate(fd, offset);
2021
+ return res;
2022
+ }
1789
2023
 
1790
2024
  errno = EINVAL;
1791
2025
  return -1;
@@ -1819,6 +2053,7 @@ static int stat_impl(std::string const &fpath, struct stat *buf)
1819
2053
  buf->st_mode |= S_IFDIR|S_IXUSR;
1820
2054
  break;
1821
2055
  default:
2056
+ RAWLOG_ERROR("stat_impl: EBADF");
1822
2057
  errno = EBADF;
1823
2058
  return -1;
1824
2059
  }
@@ -1869,6 +2104,7 @@ RHO_GLOBAL int fstat(int fd, struct stat *buf)
1869
2104
  rho_fd_map_t::iterator it = rho_fd_map.find(fd);
1870
2105
  if (it == rho_fd_map.end())
1871
2106
  {
2107
+ RAWLOG_ERROR("fstat: EBADF");
1872
2108
  errno = EBADF;
1873
2109
  return -1;
1874
2110
  }
@@ -1999,6 +2235,74 @@ FILE* android_fopen(const char* fname, const char* mode) {
1999
2235
  return funopen(asset, android_read, android_write, android_seek, android_close);
2000
2236
  }
2001
2237
 
2238
+ #ifdef __aarch64__
2239
+ int
2240
+ __sflags(const char *mode, int *optr)
2241
+ {
2242
+ int ret, m, o;
2243
+ switch (*mode++) {
2244
+ case 'r': /* open for reading */
2245
+ //ret = __SRD;
2246
+ ret = 1;
2247
+ m = O_RDONLY;
2248
+ o = 0;
2249
+ break;
2250
+ case 'w': /* open for writing */
2251
+ //ret = __SWR;
2252
+ ret = 1;
2253
+ m = O_WRONLY;
2254
+ o = O_CREAT | O_TRUNC;
2255
+ break;
2256
+ case 'a': /* open for appending */
2257
+ //ret = __SWR;
2258
+ ret = 1;
2259
+ m = O_WRONLY;
2260
+ o = O_CREAT | O_APPEND;
2261
+ break;
2262
+ default: /* illegal mode */
2263
+ errno = EINVAL;
2264
+ return (0);
2265
+ }
2266
+ /* [rwa]\+ or [rwa]b\+ means read and write */
2267
+ if (*mode == '+' || (*mode == 'b' && mode[1] == '+')) {
2268
+ //ret = __SRW;
2269
+ ret = 1;
2270
+ m = O_RDWR;
2271
+ }
2272
+ *optr = m | o;
2273
+ return (ret);
2274
+ }
2275
+ #endif
2276
+
2277
+ RHO_GLOBAL FILE *fopen64(const char *path, const char *mode)
2278
+ {
2279
+ int flags, oflags;
2280
+ FILE *fp = 0;
2281
+
2282
+ RHO_LOG("fopen: %s (%s)", path, mode);
2283
+
2284
+ if ((flags = __sflags(mode, &oflags)) == 0) return NULL;
2285
+ rho::String relpath = make_rel_path(make_full_path(path));
2286
+ fp = real_fopen64(path, mode);
2287
+
2288
+ if (fp == NULL) {
2289
+ fp = real_fopen64(relpath.c_str(), mode);
2290
+ }
2291
+
2292
+ if (fp == NULL){
2293
+ fp = android_fopen(path, mode);
2294
+ if (fp == NULL){
2295
+ fp = android_fopen(relpath.c_str(), mode);
2296
+ }
2297
+ }
2298
+ // Do seek at our level as well even though oflags passed to open
2299
+ if (oflags & O_APPEND)
2300
+ fseek(fp, (fpos_t)0, SEEK_END);
2301
+
2302
+
2303
+ return fp;
2304
+ }
2305
+
2002
2306
  RHO_GLOBAL FILE *fopen(const char *path, const char *mode)
2003
2307
  {
2004
2308
  int flags, oflags;
@@ -2254,6 +2558,7 @@ RHO_GLOBAL DIR *fdopendir(int fd)
2254
2558
  }
2255
2559
 
2256
2560
  errno = EBADF;
2561
+ RAWLOG_ERROR("fdopendir: EBADF");
2257
2562
  return NULL;
2258
2563
  }
2259
2564
 
@@ -2350,6 +2655,7 @@ RHO_GLOBAL int closedir(DIR *dirp)
2350
2655
  rho_fd_map_t::iterator itt = rho_fd_map.find(it->second.fd);
2351
2656
  if (itt == rho_fd_map.end())
2352
2657
  {
2658
+ RAWLOG_ERROR("closedir: EBADF");
2353
2659
  errno = EBADF;
2354
2660
  return -1;
2355
2661
  }