rhodes 3.4.2 → 3.5.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (705) hide show
  1. data/CHANGELOG +9 -0
  2. data/Rakefile +61 -9
  3. data/doc/build.txt +147 -38
  4. data/doc/configuration.txt +49 -33
  5. data/doc/connect-to-web-services.txt +32 -32
  6. data/doc/contributing.txt +1 -1
  7. data/doc/device-caps.txt +62 -311
  8. data/doc/extensions.txt +104 -5
  9. data/doc/install.txt +17 -61
  10. data/doc/linea.txt +11 -11
  11. data/doc/nfc.txt +3 -3
  12. data/doc/release.txt +4 -4
  13. data/doc/rhom.txt +7 -7
  14. data/doc/rhostudio-test-plan.txt +12 -12
  15. data/doc/simulator.txt +32 -19
  16. data/doc/syncengine-ajax-api.txt +1 -1
  17. data/doc/synchronization.txt +8 -2
  18. data/doc/test-log-debug.txt +34 -3
  19. data/doc/ui.txt +8 -3
  20. data/installer/icon.ico +0 -0
  21. data/lib/build/jake.rb +27 -6
  22. data/lib/extensions/audiocapture/audiocapture.rb +43 -0
  23. data/lib/extensions/audiocapture/ext.yml +5 -0
  24. data/lib/extensions/audiocapture/ext/audiocapture/platform/android/AndroidManifest.xml +10 -0
  25. data/lib/extensions/audiocapture/ext/audiocapture/platform/android/Rakefile +77 -0
  26. data/lib/extensions/audiocapture/ext/audiocapture/platform/android/ext_build.files +2 -0
  27. data/lib/extensions/audiocapture/ext/audiocapture/platform/android/jni/src/audiocapture.cpp +189 -0
  28. data/lib/extensions/audiocapture/ext/audiocapture/platform/android/src/com/audiocapture/Audiocapture.java +236 -0
  29. data/lib/extensions/audiocapture/ext/audiocapture/platform/android/src/com/audiocapture/ExtAudioRecorder.java +573 -0
  30. data/lib/extensions/audiocapture/ext/audiocapture/platform/bb/Audiocapture.files +1 -0
  31. data/lib/extensions/audiocapture/ext/audiocapture/platform/bb/Rakefile +97 -0
  32. data/lib/extensions/audiocapture/ext/audiocapture/platform/bb/audiocapture.jdp +48 -0
  33. data/lib/extensions/audiocapture/ext/audiocapture/platform/bb/src/com/audiocapture/Audiocapture.java +118 -0
  34. data/lib/extensions/audiocapture/ext/audiocapture/platform/iphone/Audiocapture.xcodeproj/project.pbxproj +314 -0
  35. data/lib/extensions/audiocapture/ext/audiocapture/platform/iphone/Audiocapture_Prefix.pch +7 -0
  36. data/lib/extensions/audiocapture/ext/audiocapture/platform/iphone/Classes/audioCapture.h +51 -0
  37. data/lib/extensions/audiocapture/ext/audiocapture/platform/iphone/Classes/audioCapture.m +418 -0
  38. data/lib/extensions/audiocapture/ext/audiocapture/platform/iphone/Rakefile +79 -0
  39. data/lib/extensions/audiocapture/ext/audiocapture/platform/wm/Audiocapture.sln +44 -0
  40. data/lib/extensions/audiocapture/ext/audiocapture/platform/wm/Audiocapture.vcproj +647 -0
  41. data/lib/extensions/audiocapture/ext/audiocapture/platform/wm/Audiocapture.vsprops +15 -0
  42. data/lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile +62 -0
  43. data/lib/extensions/audiocapture/ext/audiocapture/platform/wm/src/audiocapture_wm.cpp +40 -0
  44. data/lib/extensions/audiocapture/ext/audiocapture/platform/wm/src/audiocapture_wm.h +2 -0
  45. data/lib/extensions/audiocapture/ext/audiocapture/shared/ruby/audiocapture.i +29 -0
  46. data/lib/extensions/audiocapture/ext/audiocapture/shared/ruby/audiocapture_wrap.c +2310 -0
  47. data/lib/extensions/audiocapture/ext/audiocapture/shared/src/audiocapture.c +26 -0
  48. data/lib/extensions/audiocapture/ext/build +17 -0
  49. data/lib/extensions/audiocapture/ext/build.bat +36 -0
  50. data/lib/extensions/barcode/ext.yml +5 -3
  51. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/Barcode.java +87 -87
  52. data/lib/extensions/digest-md5/ext/build +1 -1
  53. data/lib/extensions/digest-sha1/ext/build +1 -1
  54. data/lib/extensions/digest-sha2/ext/build +1 -1
  55. data/lib/extensions/digest/ext/build +1 -1
  56. data/lib/extensions/fcntl/ext/fcntl.c +5 -5
  57. data/lib/extensions/gcm-push/ext.yml +8 -0
  58. data/lib/extensions/gcm-push/ext/android/AndroidManifest.rb +5 -0
  59. data/lib/extensions/gcm-push/ext/android/ApplicationManifestAdds.erb +8 -0
  60. data/lib/extensions/gcm-push/ext/android/Rakefile +66 -0
  61. data/lib/extensions/gcm-push/ext/android/ext_build.files +3 -0
  62. data/lib/extensions/gcm-push/ext/android/jni/src/com_rhomobile_rhodes_gcm_GCMRhoListener.h +21 -0
  63. data/lib/extensions/gcm-push/ext/android/jni/src/gcmpushclient.cpp +173 -0
  64. data/lib/extensions/gcm-push/ext/android/jni/src/gcmpushclient.h +62 -0
  65. data/lib/extensions/gcm-push/ext/android/src/com/rhomobile/rhodes/gcm/GCMBroadcastReceiver.java +40 -0
  66. data/lib/extensions/gcm-push/ext/android/src/com/rhomobile/rhodes/gcm/GCMFacade.java +55 -0
  67. data/lib/extensions/gcm-push/ext/android/src/com/rhomobile/rhodes/gcm/GCMIntentService.java +60 -0
  68. data/lib/extensions/gcm-push/ext/build +12 -0
  69. data/lib/extensions/gcm-push/ext/build.bat +8 -0
  70. data/lib/extensions/net-http/net/http.rb +153 -119
  71. data/lib/extensions/net-http/net/https.rb +4 -38
  72. data/lib/extensions/nfc/ext.yml +6 -4
  73. data/lib/extensions/nfc/ext/nfc/platform/android/jni/src/nfc.cpp +2 -2
  74. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcTechActivity.java +0 -1
  75. data/lib/extensions/openssl/openssl/ssl-internal.rb +3 -1
  76. data/lib/extensions/rawsensors/ext.yml +4 -0
  77. data/lib/extensions/rawsensors/ext/build +17 -0
  78. data/lib/extensions/rawsensors/ext/build.bat +36 -0
  79. data/lib/extensions/rawsensors/ext/rawsensors/platform/android/Rakefile +77 -0
  80. data/lib/extensions/rawsensors/ext/rawsensors/platform/android/ext_build.files +1 -0
  81. data/lib/extensions/rawsensors/ext/rawsensors/platform/android/jni/src/rawsensors.cpp +180 -0
  82. data/lib/extensions/rawsensors/ext/rawsensors/platform/android/src/com/rawsensors/Rawsensors.java +355 -0
  83. data/lib/extensions/rawsensors/ext/rawsensors/platform/bb/Rakefile +97 -0
  84. data/lib/extensions/rawsensors/ext/rawsensors/platform/bb/Rawsensors.files +1 -0
  85. data/lib/extensions/rawsensors/ext/rawsensors/platform/bb/rawsensors.jdp +48 -0
  86. data/lib/extensions/rawsensors/ext/rawsensors/platform/bb/src/com/rawsensors/Rawsensors.java +118 -0
  87. data/lib/extensions/rawsensors/ext/rawsensors/platform/iphone/Classes/RawSensors.h +66 -0
  88. data/lib/extensions/rawsensors/ext/rawsensors/platform/iphone/Classes/RawSensors.m +351 -0
  89. data/lib/extensions/rawsensors/ext/rawsensors/platform/iphone/Rakefile +79 -0
  90. data/lib/extensions/rawsensors/ext/rawsensors/platform/iphone/Rawsensors.xcodeproj/project.pbxproj +316 -0
  91. data/lib/extensions/rawsensors/ext/rawsensors/platform/iphone/Rawsensors_Prefix.pch +7 -0
  92. data/lib/extensions/rawsensors/ext/rawsensors/platform/wm/Rakefile +62 -0
  93. data/lib/extensions/rawsensors/ext/rawsensors/platform/wm/Rawsensors.sln +44 -0
  94. data/lib/extensions/rawsensors/ext/rawsensors/platform/wm/Rawsensors.vcproj +647 -0
  95. data/lib/extensions/rawsensors/ext/rawsensors/platform/wm/Rawsensors.vsprops +15 -0
  96. data/lib/extensions/rawsensors/ext/rawsensors/platform/wm/src/rawsensors_wm.cpp +40 -0
  97. data/lib/extensions/rawsensors/ext/rawsensors/platform/wm/src/rawsensors_wm.h +2 -0
  98. data/lib/extensions/rawsensors/ext/rawsensors/shared/ruby/rawsensors.i +22 -0
  99. data/lib/extensions/rawsensors/ext/rawsensors/shared/ruby/rawsensors_wrap.c +2308 -0
  100. data/lib/extensions/rawsensors/ext/rawsensors/shared/src/rawsensors.c +25 -0
  101. data/lib/extensions/rawsensors/rawsensors.rb +36 -0
  102. data/lib/framework/autocomplete/AddressBar.rb +19 -0
  103. data/lib/framework/autocomplete/Alarm.rb +23 -0
  104. data/lib/framework/autocomplete/Alert.rb +19 -0
  105. data/lib/framework/autocomplete/AppApplication.rb +17 -0
  106. data/lib/framework/autocomplete/AppSwitcher.rb +13 -0
  107. data/lib/framework/autocomplete/Application.rb +23 -0
  108. data/lib/framework/autocomplete/AudioCapture.rb +31 -0
  109. data/lib/framework/autocomplete/BackButton.rb +25 -0
  110. data/lib/framework/autocomplete/Backlight.rb +21 -0
  111. data/lib/framework/autocomplete/Barcode.rb +29 -0
  112. data/lib/framework/autocomplete/BasicSocket.rb +87 -0
  113. data/lib/framework/autocomplete/Battery.rb +33 -0
  114. data/lib/framework/autocomplete/BottomCommandArea.rb +19 -0
  115. data/lib/framework/autocomplete/BrowserHelper.rb +19 -0
  116. data/lib/framework/autocomplete/Bsearch.rb +11 -0
  117. data/lib/framework/autocomplete/Camera.rb +17 -0
  118. data/lib/framework/autocomplete/CardReader.rb +29 -0
  119. data/lib/framework/autocomplete/Comm.rb +45 -0
  120. data/lib/framework/autocomplete/Cradle.rb +15 -0
  121. data/lib/framework/autocomplete/Date.rb +50 -0
  122. data/lib/framework/autocomplete/DateTime.rb +24 -0
  123. data/lib/framework/autocomplete/DateTimePicker.rb +15 -0
  124. data/lib/framework/autocomplete/Device.rb +19 -0
  125. data/lib/framework/autocomplete/Digest.rb +28 -0
  126. data/lib/framework/autocomplete/Dir.rb +63 -0
  127. data/lib/framework/autocomplete/Eink.rb +19 -0
  128. data/lib/framework/autocomplete/EmmlProfile.rb +19 -0
  129. data/lib/framework/autocomplete/File.rb +301 -0
  130. data/lib/framework/autocomplete/FileTransfer.rb +27 -0
  131. data/lib/framework/autocomplete/ForwardButton.rb +25 -0
  132. data/lib/framework/autocomplete/GeneratorController.rb +15 -0
  133. data/lib/framework/autocomplete/GeoLocation.rb +27 -0
  134. data/lib/framework/autocomplete/Gesture.rb +71 -0
  135. data/lib/framework/autocomplete/GoButton.rb +25 -0
  136. data/lib/framework/autocomplete/HashWithIndifferentAccess.rb +51 -0
  137. data/lib/framework/autocomplete/History.rb +11 -0
  138. data/lib/framework/autocomplete/HomeButton.rb +25 -0
  139. data/lib/framework/autocomplete/Hourglass.rb +17 -0
  140. data/lib/framework/autocomplete/IPSocket.rb +65 -0
  141. data/lib/framework/autocomplete/Imager.rb +53 -0
  142. data/lib/framework/autocomplete/IoAnalog.rb +73 -0
  143. data/lib/framework/autocomplete/IoDigital.rb +93 -0
  144. data/lib/framework/autocomplete/IoSystem.rb +21 -0
  145. data/lib/framework/autocomplete/JSON.rb +142 -0
  146. data/lib/framework/autocomplete/KeyCapture.rb +25 -0
  147. data/lib/framework/autocomplete/KeyState.rb +23 -0
  148. data/lib/framework/autocomplete/Keylight.rb +17 -0
  149. data/lib/framework/autocomplete/Lightsensor.rb +19 -0
  150. data/lib/framework/autocomplete/LocalizationSimplified.rb +33 -0
  151. data/lib/framework/autocomplete/MapView.rb +23 -0
  152. data/lib/framework/autocomplete/MediaPlayer.rb +19 -0
  153. data/lib/framework/autocomplete/Memory.rb +17 -0
  154. data/lib/framework/autocomplete/MinimizeButton.rb +25 -0
  155. data/lib/framework/autocomplete/NativeBar.rb +31 -0
  156. data/lib/framework/autocomplete/NavBar.rb +15 -0
  157. data/lib/framework/autocomplete/Network.rb +31 -0
  158. data/lib/framework/autocomplete/Notification.rb +35 -0
  159. data/lib/framework/autocomplete/OpenSSL.rb +440 -0
  160. data/lib/framework/autocomplete/Phonebook.rb +39 -0
  161. data/lib/framework/autocomplete/PowerOn.rb +13 -0
  162. data/lib/framework/autocomplete/Push.rb +27 -0
  163. data/lib/framework/autocomplete/QuitButton.rb +25 -0
  164. data/lib/framework/autocomplete/RHO_APPS_DIR.rb +8 -0
  165. data/lib/framework/autocomplete/RHO_ERB_EXT.rb +8 -0
  166. data/lib/framework/autocomplete/RHO_FRAMEWORK.rb +0 -0
  167. data/lib/framework/autocomplete/RHO_RB_EXT.rb +8 -0
  168. data/lib/framework/autocomplete/RawSensors.rb +53 -0
  169. data/lib/framework/autocomplete/Reboot.rb +13 -0
  170. data/lib/framework/autocomplete/Registry.rb +25 -0
  171. data/lib/framework/autocomplete/ReloadButton.rb +25 -0
  172. data/lib/framework/autocomplete/Rfid.rb +173 -0
  173. data/lib/framework/autocomplete/Rho.rb +496 -0
  174. data/lib/framework/autocomplete/RhoBluetooth.rb +41 -0
  175. data/lib/framework/autocomplete/RhoConf.rb +23 -0
  176. data/lib/framework/autocomplete/RhoElementsExt.rb +11 -0
  177. data/lib/framework/autocomplete/RhoLog.rb +13 -0
  178. data/lib/framework/autocomplete/RhoProfiler.rb +21 -0
  179. data/lib/framework/autocomplete/RhoStdout.rb +19 -0
  180. data/lib/framework/autocomplete/Rhodes.rb +13 -0
  181. data/lib/framework/autocomplete/RhodesNativeViewManager.rb +15 -0
  182. data/lib/framework/autocomplete/Rhom.rb +198 -0
  183. data/lib/framework/autocomplete/Rsm.rb +135 -0
  184. data/lib/framework/autocomplete/SQLite3.rb +36 -0
  185. data/lib/framework/autocomplete/SWIG.rb +24 -0
  186. data/lib/framework/autocomplete/ScanError.rb +9 -0
  187. data/lib/framework/autocomplete/Scanner.rb +379 -0
  188. data/lib/framework/autocomplete/ScreenOrientation.rb +23 -0
  189. data/lib/framework/autocomplete/SignatureCapture.rb +47 -0
  190. data/lib/framework/autocomplete/SignatureTool.rb +11 -0
  191. data/lib/framework/autocomplete/Sip.rb +19 -0
  192. data/lib/framework/autocomplete/SipButton.rb +25 -0
  193. data/lib/framework/autocomplete/Sntp.rb +13 -0
  194. data/lib/framework/autocomplete/Socket.rb +356 -0
  195. data/lib/framework/autocomplete/SocketError.rb +9 -0
  196. data/lib/framework/autocomplete/StopButton.rb +25 -0
  197. data/lib/framework/autocomplete/StringIO.rb +139 -0
  198. data/lib/framework/autocomplete/StringScanner.rb +102 -0
  199. data/lib/framework/autocomplete/Stylus.rb +15 -0
  200. data/lib/framework/autocomplete/SyncEngine.rb +77 -0
  201. data/lib/framework/autocomplete/System.rb +79 -0
  202. data/lib/framework/autocomplete/SystemTime.rb +17 -0
  203. data/lib/framework/autocomplete/TCPServer.rb +65 -0
  204. data/lib/framework/autocomplete/TCPSocket.rb +59 -0
  205. data/lib/framework/autocomplete/Telemetry.rb +23 -0
  206. data/lib/framework/autocomplete/Thread.rb +85 -0
  207. data/lib/framework/autocomplete/Time.rb +167 -0
  208. data/lib/framework/autocomplete/Timer.rb +19 -0
  209. data/lib/framework/autocomplete/TopCommandArea.rb +19 -0
  210. data/lib/framework/autocomplete/UDPSocket.rb +65 -0
  211. data/lib/framework/autocomplete/VideoCapture.rb +29 -0
  212. data/lib/framework/autocomplete/Volume.rb +13 -0
  213. data/lib/framework/autocomplete/Wake.rb +15 -0
  214. data/lib/framework/autocomplete/WebView.rb +31 -0
  215. data/lib/framework/autocomplete/Wlan.rb +87 -0
  216. data/lib/framework/autocomplete/Zoom.rb +15 -0
  217. data/lib/framework/autocomplete/ZoomInPageButton.rb +25 -0
  218. data/lib/framework/autocomplete/ZoomOutPageButton.rb +25 -0
  219. data/lib/framework/autocomplete/ZoomTextButton.rb +25 -0
  220. data/lib/framework/rho/render.rb +15 -4
  221. data/lib/framework/rho/rho.rb +17 -8
  222. data/lib/framework/rho/rhoapplication.rb +25 -3
  223. data/lib/framework/rho/rhocontact.rb +13 -0
  224. data/lib/framework/rho/rhoevent.rb +15 -0
  225. data/lib/framework/rho/rhonativeviewmanager.rb +3 -3
  226. data/lib/framework/rhodes.rb +1 -1
  227. data/lib/framework/rhom/rhom.rb +5 -0
  228. data/lib/framework/rhomotoapi.rb +2 -1
  229. data/lib/framework/version.rb +1 -1
  230. data/lib/rhodes.rb +1 -1
  231. data/platform/android/Rhodes/AndroidManifest.xml +4 -3
  232. data/platform/android/Rhodes/AndroidManifest.xml.erb +7 -7
  233. data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +22 -0
  234. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +1 -9
  235. data/platform/android/Rhodes/jni/src/callbacks.cpp +2 -0
  236. data/platform/android/Rhodes/jni/src/camera.cpp +5 -0
  237. data/platform/android/Rhodes/jni/src/event.cpp +10 -0
  238. data/platform/android/Rhodes/jni/src/geolocation.cpp +10 -0
  239. data/platform/android/Rhodes/jni/src/logger.cpp +3 -1
  240. data/platform/android/Rhodes/jni/src/phonebook.cpp +11 -0
  241. data/platform/android/Rhodes/jni/src/rhodes.cpp +1 -1
  242. data/platform/android/Rhodes/jni/src/rhodesapp.cpp +41 -25
  243. data/platform/android/Rhodes/jni/src/signature.cpp +7 -6
  244. data/platform/android/Rhodes/jni/src/webview.cpp +29 -0
  245. data/platform/android/Rhodes/project.properties +1 -1
  246. data/platform/android/Rhodes/res/drawable/icon.png +0 -0
  247. data/platform/android/Rhodes/src/com/rhomobile/rhodes/ConnectionChangeReceiver.java +28 -0
  248. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +1 -1
  249. data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushContract.java +102 -0
  250. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +20 -56
  251. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +9 -124
  252. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +114 -126
  253. data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +26 -0
  254. data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/PopupActivity.java +3 -5
  255. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +31 -13
  256. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +2 -0
  257. data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePicker.java +3 -7
  258. data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/CalendarIDsProvider.java +19 -0
  259. data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/CalendarIDsProviderFroyo.java +5 -0
  260. data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/CalendarIDsProviderICS.java +22 -0
  261. data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +32 -22
  262. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoExtension.java +5 -0
  263. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoListener.java +34 -0
  264. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +11 -2
  265. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +1 -0
  266. data/platform/android/Rhodes/src/com/rhomobile/rhodes/{webview → extmanager}/IRhoWebView.java +5 -1
  267. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +605 -492
  268. data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +16 -0
  269. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +9 -2
  270. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +43 -14
  271. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +82 -64
  272. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +28 -13
  273. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +4 -4
  274. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +0 -1
  275. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality.java +4 -0
  276. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality01.java +6 -0
  277. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality08.java +7 -0
  278. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality12.java +6 -0
  279. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality13.java +6 -0
  280. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality14.java +12 -0
  281. data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionalityManager.java +10 -1
  282. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +3 -6
  283. data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/RhoSocketImpl.java +1 -1
  284. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/LocalFileHandler.java +1 -1
  285. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +43 -0
  286. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebChromeClient.java +5 -0
  287. data/platform/android/build/RhodesSRC_build.files +10 -4
  288. data/platform/android/build/android.rake +46 -193
  289. data/platform/android/build/android_tools.rb +181 -13
  290. data/platform/bb/Hsqldb/src/org/hsqldb/CompiledStatementExecutor.java +3 -3
  291. data/platform/bb/Hsqldb/src/org/hsqldb/Expression.java +4 -2
  292. data/platform/bb/RubyVM/src/com/rho/IRhoRubyHelper.java +2 -0
  293. data/platform/bb/RubyVM/src/com/rho/RhoRuby.java +6 -0
  294. data/platform/bb/RubyVM/src/com/rho/ThreadQueue.java +13 -8
  295. data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +103 -1
  296. data/platform/bb/RubyVM/src/com/rho/db/DBAttrManager.java +18 -0
  297. data/platform/bb/RubyVM/src/com/rho/net/NetRequest.java +9 -2
  298. data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +16 -11
  299. data/platform/bb/RubyVM/src/com/rho/sync/ClientRegister.java +25 -3
  300. data/platform/bb/RubyVM/src/com/rho/sync/ISyncProtocol.java +1 -1
  301. data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +122 -32
  302. data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +44 -14
  303. data/platform/bb/RubyVM/src/com/rho/sync/SyncProtocol_3.java +3 -2
  304. data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +340 -88
  305. data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +62 -15
  306. data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/AttrReader.java +1 -1
  307. data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyFixnum.java +3 -1
  308. data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyHash.java +1 -1
  309. data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyAPI.java +19 -1
  310. data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyBasic.java +9 -0
  311. data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyBinding.java +4 -4
  312. data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyModule.java +13 -1
  313. data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyObject.java +16 -1
  314. data/platform/bb/build/bb.rake +3 -1
  315. data/platform/bb/build/rhodes_build.files +0 -1
  316. data/platform/bb/rhodes/platform/4.7/com/rho/rubyext/SignatureCapture.java +13 -18
  317. data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +13 -3
  318. data/platform/bb/rhodes/platform/5.0/com/rho/RhodesApplicationPlatform.java +1 -1
  319. data/platform/bb/rhodes/platform/common/com/rho/rubyext/SignatureCapture.java +13 -18
  320. data/platform/bb/rhodes/resources/icon.png +0 -0
  321. data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +10 -0
  322. data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +13 -3
  323. data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +5 -0
  324. data/platform/bb/rhodes/src/com/rho/RhodesApplicationPlatform.java +1 -1
  325. data/platform/bb/rhodes/src/com/rho/file/Jsr75File.java +6 -1
  326. data/platform/bb/rhodes/src/com/rho/file/Jsr75RAFileImpl.java +6 -1
  327. data/platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java +38 -9
  328. data/platform/bb/rhodes/src/com/rho/rubyext/SignatureCapture.java +13 -18
  329. data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +16 -1
  330. data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +0 -20
  331. data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +1 -10
  332. data/platform/bb/rhodes/src/rhomobile/camera/CameraScreen.java +40 -35
  333. data/platform/iphone/Classes/AppManager/AppManager.h +1 -1
  334. data/platform/iphone/Classes/AppManager/AppManager.m +46 -29
  335. data/platform/iphone/Classes/Camera/PickImageDelegate.m +9 -0
  336. data/platform/iphone/Classes/Event/Event.h +6 -1
  337. data/platform/iphone/Classes/Event/Event.m +67 -1
  338. data/platform/iphone/Classes/GeoLocation/LocationController.h +2 -1
  339. data/platform/iphone/Classes/GeoLocation/LocationController.m +17 -1
  340. data/platform/iphone/Classes/NetworkStatusMonitor.h +17 -0
  341. data/platform/iphone/Classes/NetworkStatusMonitor.mm +58 -0
  342. data/platform/iphone/Classes/Phonebook/phonebook.h +6 -0
  343. data/platform/iphone/Classes/Phonebook/phonebook.m +62 -6
  344. data/platform/iphone/Classes/Reachability.h +31 -0
  345. data/platform/iphone/Classes/Reachability.m +223 -0
  346. data/platform/iphone/Classes/RhoMainView.h +1 -0
  347. data/platform/iphone/Classes/RhoViewController.m +16 -0
  348. data/platform/iphone/Classes/Rhodes.h +2 -0
  349. data/platform/iphone/Classes/Rhodes.m +89 -10
  350. data/platform/iphone/Classes/Signature/SignatureDelegate.m +4 -7
  351. data/platform/iphone/Classes/SimpleMainView.m +16 -0
  352. data/platform/iphone/Classes/SplashViewController.m +11 -1
  353. data/platform/iphone/Classes/SplitView/RightViewController.m +6 -0
  354. data/platform/iphone/Classes/SplitView/SplittedMainView.m +5 -0
  355. data/platform/iphone/Classes/TabbedMainView.m +4 -0
  356. data/platform/iphone/Classes/WebView.m +14 -0
  357. data/platform/iphone/Info.plist +1 -6
  358. data/platform/iphone/iTunesArtwork.jpg +0 -0
  359. data/platform/iphone/icon.png +0 -0
  360. data/platform/iphone/icon114.png +0 -0
  361. data/platform/iphone/icon57.png +0 -0
  362. data/platform/iphone/icon72.png +0 -0
  363. data/platform/iphone/rbuild/iphone.rake +8 -11
  364. data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +20 -4
  365. data/platform/osx/Rhodes Launcher/rhorunner.app/icon.png +0 -0
  366. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
  367. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
  368. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
  369. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -0
  370. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
  371. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
  372. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib +0 -0
  373. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib +0 -0
  374. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib +0 -0
  375. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib +0 -0
  376. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib +0 -0
  377. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib +0 -0
  378. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib +0 -0
  379. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib +0 -0
  380. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
  381. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
  382. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
  383. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
  384. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtga.dylib +0 -0
  385. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
  386. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_inspector.dylib +0 -0
  387. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib +0 -0
  388. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Resources/rho.icns +0 -0
  389. data/platform/shared/common/ExtManager.h +8 -0
  390. data/platform/shared/common/RhoDefs.h +3 -2
  391. data/platform/shared/common/RhoFile.cpp +14 -1
  392. data/platform/shared/common/RhoMutexLock.h +4 -0
  393. data/platform/shared/common/RhoPort.h +5 -1
  394. data/platform/shared/common/RhoStd.h +12 -0
  395. data/platform/shared/common/RhoThread.cpp +1 -2
  396. data/platform/shared/common/RhoTime.h +4 -0
  397. data/platform/shared/common/RhodesApp.cpp +189 -65
  398. data/platform/shared/common/RhodesApp.h +60 -7
  399. data/platform/shared/common/RhodesAppBase.cpp +2 -8
  400. data/platform/shared/common/RhodesAppBase.h +1 -0
  401. data/platform/shared/common/ThreadQueue.cpp +2 -2
  402. data/platform/shared/common/app_build_configs.c +3 -1
  403. data/platform/shared/common/map/MapEngine.cpp +39 -3
  404. data/platform/shared/common/push/IRhoPushClient.h +3 -3
  405. data/platform/shared/common/push/RhoPushManager.cpp +31 -53
  406. data/platform/shared/common/push/RhoPushManager.h +12 -26
  407. data/platform/shared/curl/lib/curl_config.h +1 -1
  408. data/platform/shared/json/RJSONTokener.c +3 -1
  409. data/platform/shared/json/config.h +4 -4
  410. data/platform/shared/json/json_tokener.c +1 -1
  411. data/platform/shared/logging/RhoLog.cpp +5 -5
  412. data/platform/shared/logging/RhoLogConf.cpp +4 -6
  413. data/platform/shared/logging/RhoLogConf.h +2 -2
  414. data/platform/shared/logging/RhoLogSink.cpp +2 -0
  415. data/platform/shared/net/HttpServer.cpp +54 -7
  416. data/platform/shared/net/HttpServer.h +2 -0
  417. data/platform/shared/qt/rhodes/QtMainWindow.cpp +22 -0
  418. data/platform/shared/qt/rhodes/QtMainWindow.h +1 -0
  419. data/platform/shared/qt/rhodes/impl/CalendarImpl.cpp +4 -0
  420. data/platform/shared/qt/rhodes/impl/CameraImpl.cpp +4 -0
  421. data/platform/shared/qt/rhodes/impl/GeoLocationImpl.cpp +6 -0
  422. data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +7 -0
  423. data/platform/shared/qt/rhodes/impl/MainWindowImpl.h +2 -0
  424. data/platform/shared/qt/rhodes/impl/PhonebookImpl.cpp +4 -0
  425. data/platform/shared/qt/rhodes/impl/SystemImpl.cpp +5 -0
  426. data/platform/shared/qt/rhodes/impl/WebViewImpl.cpp +12 -0
  427. data/platform/shared/qt/rhodes/main.cpp +0 -7
  428. data/platform/shared/qt/rhodes/resources/rho.icns +0 -0
  429. data/platform/shared/qt/rhodes/resources/rho.ico +0 -0
  430. data/platform/shared/qt/rhodes/resources/rho.png +0 -0
  431. data/platform/shared/ruby/encoding.c +4 -0
  432. data/platform/shared/ruby/ext/calendar/calendar.i +3 -0
  433. data/platform/shared/ruby/ext/calendar/calendar_wrap.c +19 -0
  434. data/platform/shared/ruby/ext/camera/camera.i +2 -0
  435. data/platform/shared/ruby/ext/camera/camera_wrap.c +43 -2
  436. data/platform/shared/ruby/ext/geolocation/geolocation.i +4 -0
  437. data/platform/shared/ruby/ext/geolocation/geolocation_wrap.c +24 -4
  438. data/platform/shared/ruby/ext/phonebook/phonebook.i +4 -0
  439. data/platform/shared/ruby/ext/phonebook/phonebook_wrap.c +44 -0
  440. data/platform/shared/ruby/ext/rho/extensions.c +0 -2
  441. data/platform/shared/ruby/ext/rho/rhoruby.c +2 -0
  442. data/platform/shared/ruby/ext/rho/rhosupport.c +8 -0
  443. data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +1 -1
  444. data/platform/shared/ruby/ext/syncengine/syncengine.i +6 -2
  445. data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +19 -6
  446. data/platform/shared/ruby/ext/system/system.i +22 -0
  447. data/platform/shared/ruby/ext/system/system_wrap.c +158 -86
  448. data/platform/shared/ruby/ext/webview/webview.i +13 -8
  449. data/platform/shared/ruby/ext/webview/webview_wrap.c +88 -2
  450. data/platform/shared/ruby/include/ruby/win32.h +3 -1
  451. data/platform/shared/ruby/iphone/ruby/config.h +3 -3
  452. data/platform/shared/ruby/missing/hypot.c +4 -0
  453. data/platform/shared/ruby/random.c +6 -2
  454. data/platform/shared/ruby/thread_win32.c +8 -3
  455. data/platform/shared/ruby/win32/ruby/config.h +0 -3
  456. data/platform/shared/ruby/win32/win32.c +4 -0
  457. data/platform/shared/ruby/wp8/assert.c +12 -0
  458. data/platform/shared/ruby/wp8/assert.h +18 -0
  459. data/platform/shared/ruby/wp8/errno.c +11 -0
  460. data/platform/shared/ruby/wp8/errno.h +59 -0
  461. data/platform/shared/ruby/wp8/missing_wp8.h +74 -0
  462. data/platform/shared/ruby/wp8/signal.h +71 -0
  463. data/platform/shared/ruby/wp8/signal_wp8.c +26 -0
  464. data/platform/shared/ruby/wp8/stdio.c +36 -0
  465. data/platform/shared/ruby/wp8/stdlib.c +61 -0
  466. data/platform/shared/ruby/wp8/string_wp8.c +89 -0
  467. data/platform/shared/ruby/wp8/sys/stat.c +183 -0
  468. data/platform/shared/ruby/wp8/sys/stat.h +70 -0
  469. data/platform/shared/ruby/wp8/sys/timeb.c +31 -0
  470. data/platform/shared/ruby/wp8/sys/timeb.h +27 -0
  471. data/platform/shared/ruby/wp8/sys/types.h +62 -0
  472. data/platform/shared/ruby/wp8/sys/utime.c +44 -0
  473. data/platform/shared/ruby/wp8/sys/utime.h +27 -0
  474. data/platform/shared/ruby/wp8/time_wp8.c +256 -0
  475. data/platform/shared/ruby/wp8/varargs.h +34 -0
  476. data/platform/shared/ruby/wp8/win32/win32.c +5783 -0
  477. data/platform/shared/ruby/wp8/winsock_wp8.c +26 -0
  478. data/platform/shared/ruby/wp8/winsock_wp8.h +23 -0
  479. data/platform/shared/ruby/wp8/wp8.c +516 -0
  480. data/platform/shared/ruby/wp8/wp8.h +274 -0
  481. data/platform/shared/ruby/wp8/wp8main.c +18 -0
  482. data/platform/shared/rubyext/GeoLocation.cpp +1 -1
  483. data/platform/shared/rubyext/System.cpp +18 -4
  484. data/platform/shared/rubyext/ZipFiles.cpp +1 -1
  485. data/platform/shared/sync/ClientRegister.cpp +113 -23
  486. data/platform/shared/sync/ClientRegister.h +27 -16
  487. data/platform/shared/sync/ILoginListener.h +44 -0
  488. data/platform/shared/sync/SyncEngine.cpp +50 -24
  489. data/platform/shared/sync/SyncEngine.h +11 -5
  490. data/platform/shared/sync/SyncSource.cpp +87 -61
  491. data/platform/shared/sync/SyncSource.h +6 -3
  492. data/platform/shared/sync/SyncThread.cpp +8 -15
  493. data/platform/shared/sync/SyncThread.h +13 -7
  494. data/platform/shared/unzip/unzip.cpp +1 -1
  495. data/platform/shared/unzip/zip.h +8 -1
  496. data/platform/shared/xruby/src/com/xruby/runtime/builtin/AttrReader.java +13 -0
  497. data/platform/shared/xruby/src/com/xruby/runtime/builtin/RubyFixnum.java +3 -1
  498. data/platform/shared/xruby/src/com/xruby/runtime/lang/MethodBlockBase.java +9 -0
  499. data/platform/shared/xruby/src/com/xruby/runtime/lang/RubyBasic.java +9 -0
  500. data/platform/shared/xruby/src/com/xruby/runtime/lang/RubyBinding.java +17 -0
  501. data/platform/shared/xruby/src/com/xruby/runtime/lang/RubyMethod.java +22 -2
  502. data/platform/shared/xruby/src/com/xruby/runtime/lang/RubyModule.java +25 -0
  503. data/platform/shared/xruby/src/com/xruby/runtime/lang/RubyObject.java +21 -0
  504. data/platform/shared/xruby/src/com/xruby/runtime/lang/RubyValue.java +8 -0
  505. data/platform/symbian/rhodes/src/phonebook/ruby_phonebook.cpp +6 -0
  506. data/platform/win32/RhoSimulator/Microsoft.VC90.CRT.manifest +12 -5
  507. data/platform/win32/RhoSimulator/Microsoft.VC90.OpenMP.manifest +12 -5
  508. data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
  509. data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
  510. data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
  511. data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
  512. data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
  513. data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
  514. data/platform/win32/RhoSimulator/imageformats/qico4.dll +0 -0
  515. data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
  516. data/platform/win32/RhoSimulator/imageformats/qmng4.dll +0 -0
  517. data/platform/win32/RhoSimulator/imageformats/qsvg4.dll +0 -0
  518. data/platform/win32/RhoSimulator/imageformats/qtiff4.dll +0 -0
  519. data/platform/win32/RhoSimulator/msvcm90.dll +0 -0
  520. data/platform/win32/RhoSimulator/msvcp90.dll +0 -0
  521. data/platform/win32/RhoSimulator/msvcr90.dll +0 -0
  522. data/platform/win32/RhoSimulator/phonon4.dll +0 -0
  523. data/platform/win32/RhoSimulator/vcomp90.dll +0 -0
  524. data/platform/wm/build/wm.rake +67 -22
  525. data/platform/wm/rhodes.sln +485 -493
  526. data/platform/wm/rhodes/IEBrowserEngine.cpp +2 -6
  527. data/platform/wm/rhodes/MainWindow.cpp +86 -35
  528. data/platform/wm/rhodes/MainWindow.h +33 -0
  529. data/platform/wm/rhodes/Rhodes.cpp +288 -215
  530. data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +22 -17
  531. data/platform/wm/rhodes/bluetooth/Bluetooth.h +3 -3
  532. data/platform/wm/rhodes/camera/Camera.cpp +4 -0
  533. data/platform/wm/rhodes/camera/Camera.h +1 -0
  534. data/platform/wm/rhodes/phonebook/phonebook.cpp +9 -0
  535. data/platform/wm/rhodes/phonebook/phonebook.h +2 -0
  536. data/platform/wm/rhodes/resources/icon.ico +0 -0
  537. data/platform/wm/rhodes/rho/common/ExtManager.cpp +5 -1
  538. data/platform/wm/rhodes/rho/common/RhoClassFactory.cpp +1 -11
  539. data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.cpp +5 -0
  540. data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +21 -2
  541. data/platform/wm/rhodes/rho/rubyext/WebView.cpp +12 -0
  542. data/platform/wm/rhodes/rho/rubyext/calendar.cpp +9 -0
  543. data/platform/wm/rhodes/rhodes.vcproj +60 -60
  544. data/platform/wm/rhodes/simulator/MainWindowQt.cpp +91 -6
  545. data/platform/wm/rhodes/simulator/MainWindowQt.h +6 -0
  546. data/platform/wm/rhoelements.sln +624 -623
  547. data/platform/wm/tcmalloc/tcmalloc.vcproj +1230 -1070
  548. data/platform/wp7/RhoRubyLib/rubyext/RhoCamera.cs +6 -3
  549. data/platform/wp7/rhodes/Properties/WMAppManifest.xml +5 -0
  550. data/platform/wp7/rhodes/icon.png +0 -0
  551. data/platform/wp8/RhoAppRunner/Program.cs +99 -0
  552. data/platform/wp8/RhoAppRunner/Properties/AssemblyInfo.cs +36 -0
  553. data/platform/wp8/RhoAppRunner/RhoAppRunner.csproj +69 -0
  554. data/platform/wp8/build/wp.rake +486 -0
  555. data/platform/wp8/rhodes.sln +154 -0
  556. data/platform/wp8/rhodes/App.xaml +20 -0
  557. data/platform/wp8/rhodes/App.xaml.cs +189 -0
  558. data/platform/wp8/rhodes/Assets/ApplicationIcon.png +0 -0
  559. data/platform/wp8/rhodes/Assets/Tiles/FlipCycleTileMedium.png +0 -0
  560. data/platform/wp8/rhodes/Assets/Tiles/FlipCycleTileSmall.png +0 -0
  561. data/platform/wp8/rhodes/LocalizedStrings.cs +37 -0
  562. data/platform/wp8/rhodes/MainPage.xaml +21 -0
  563. data/platform/wp8/rhodes/MainPage.xaml.cs +339 -0
  564. data/platform/wp8/rhodes/Properties/AppManifest.xml +6 -0
  565. data/platform/wp8/rhodes/Properties/AssemblyInfo.cs +37 -0
  566. data/platform/wp8/rhodes/Properties/WMAppManifest.xml +47 -0
  567. data/platform/wp8/rhodes/Resources/AppResources.Designer.cs +127 -0
  568. data/platform/wp8/rhodes/Resources/AppResources.resx +135 -0
  569. data/platform/wp8/rhodes/common/IInputStream.cs +47 -0
  570. data/platform/wp8/rhodes/common/RhoFile.cs +374 -0
  571. data/platform/wp8/rhodes/common/RhoFilePath.cs +115 -0
  572. data/platform/wp8/rhodes/common/RhoResourceMap.cs +92 -0
  573. data/platform/wp8/rhodes/common/RhoStd.cs +237 -0
  574. data/platform/wp8/rhodes/icon.png +0 -0
  575. data/platform/wp8/rhodes/rhodes.csproj +198 -0
  576. data/platform/wp8/rholib/rholib.vcxproj +240 -0
  577. data/platform/wp8/rholib/rholib.vcxproj.filters +289 -0
  578. data/platform/wp8/rhoruntime/FakeDefs.cpp +134 -0
  579. data/platform/wp8/rhoruntime/common/ExtManager.cpp +449 -0
  580. data/platform/wp8/rhoruntime/common/RhoClassFactory.cpp +58 -0
  581. data/platform/wp8/rhoruntime/common/RhoClassFactory.h +60 -0
  582. data/platform/wp8/rhoruntime/common/RhoCryptImpl.cpp +274 -0
  583. data/platform/wp8/rhoruntime/common/RhoCryptImpl.h +78 -0
  584. data/platform/wp8/rhoruntime/common/RhoThreadImpl.cpp +109 -0
  585. data/platform/wp8/rhoruntime/common/RhoThreadImpl.h +56 -0
  586. data/platform/wp8/rhoruntime/pch_rhoruntime.cpp +27 -0
  587. data/platform/wp8/rhoruntime/pch_rhoruntime.h +30 -0
  588. data/platform/wp8/rhoruntime/rhoruntime.cpp +93 -0
  589. data/platform/wp8/rhoruntime/rhoruntime.h +114 -0
  590. data/platform/wp8/rhoruntime/rhoruntime.vcxproj +175 -0
  591. data/platform/wp8/rhoruntime/rhoruntime.vcxproj.filters +44 -0
  592. data/platform/wp8/rubylib/file.c +5459 -0
  593. data/platform/wp8/rubylib/rubylib.vcxproj +286 -0
  594. data/platform/wp8/rubylib/rubylib.vcxproj.filters +307 -0
  595. data/platform/wp8/sqlite3/crypto.c +933 -0
  596. data/platform/wp8/sqlite3/sqlite3.c +136332 -0
  597. data/platform/wp8/sqlite3/sqlite3.vcxproj +149 -0
  598. data/platform/wp8/sqlite3/sqlite3.vcxproj.filters +16 -0
  599. data/platform/wp8/syncengine/syncengine.vcxproj +199 -0
  600. data/platform/wp8/syncengine/syncengine.vcxproj.filters +155 -0
  601. data/rakefile.rb +61 -9
  602. data/res/build-tools/RhoAppRunnerWP8.exe +0 -0
  603. data/res/build-tools/license_rc.dll +0 -0
  604. data/res/build-tools/win32/license_rc.dll +0 -0
  605. data/res/build-tools/xruby-0.3.3.jar +0 -0
  606. data/res/generators/rhogen.rb +36 -0
  607. data/res/generators/templates/application/app/loading-568h@2x.png +0 -0
  608. data/res/generators/templates/application/app/loading-Landscape.png +0 -0
  609. data/res/generators/templates/application/app/loading-LandscapeLeft.png +0 -0
  610. data/res/generators/templates/application/app/loading-LandscapeRight.png +0 -0
  611. data/res/generators/templates/application/app/loading-Portrait.png +0 -0
  612. data/res/generators/templates/application/app/loading-PortraitUpsideDown.png +0 -0
  613. data/res/generators/templates/application/app/loading.png +0 -0
  614. data/res/generators/templates/application/app/loading@2x.png +0 -0
  615. data/res/generators/templates/application/icon/icon.ico +0 -0
  616. data/res/generators/templates/application/icon/icon.png +0 -0
  617. data/res/generators/templates/application/icon/icon114.png +0 -0
  618. data/res/generators/templates/application/icon/icon57.png +0 -0
  619. data/res/generators/templates/application/icon/icon72.png +0 -0
  620. data/res/generators/templates/application/public/css/android.css +1 -1
  621. data/res/generators/templates/application/public/jqmobile/images/icon-search-black.png +0 -0
  622. data/res/generators/templates/application/rhoconfig.txt +3 -1
  623. data/res/generators/templates/model/model.rb +1 -1
  624. data/res/icons/rho.icns +0 -0
  625. data/res/icons/rho.ico +0 -0
  626. data/res/icons/rho.png +0 -0
  627. data/res/icons/rhodes.icns +0 -0
  628. data/res/icons/rhodes.ico +0 -0
  629. data/res/icons/rhodes.png +0 -0
  630. data/res/icons/rhosim.icns +0 -0
  631. data/res/icons/rhosim.ico +0 -0
  632. data/res/icons/rhosim.png +0 -0
  633. data/res/libs/motorolalicence/android/MotorolaLicence.h +2 -1
  634. data/res/libs/motorolalicence/android/libMotorolaLicence.a +0 -0
  635. data/res/libs/motorolalicence/iphone/MotorolaLicence.h +2 -1
  636. data/res/libs/motorolalicence/iphone/libMotorolaLicence.a +0 -0
  637. data/spec/autocomplete_generator/Rakefile +37 -0
  638. data/spec/autocomplete_generator/app/Generator/controller.rb +40 -0
  639. data/spec/autocomplete_generator/app/Generator/generator.rb +236 -0
  640. data/spec/autocomplete_generator/app/Generator/index.erb +21 -0
  641. data/spec/autocomplete_generator/app/Settings/controller.rb +117 -0
  642. data/spec/autocomplete_generator/app/Settings/err_sync.erb +11 -0
  643. data/spec/autocomplete_generator/app/Settings/home.bb.erb +18 -0
  644. data/spec/autocomplete_generator/app/Settings/home.erb +19 -0
  645. data/spec/autocomplete_generator/app/Settings/index.bb.erb +31 -0
  646. data/spec/autocomplete_generator/app/Settings/index.erb +31 -0
  647. data/spec/autocomplete_generator/app/Settings/login.bb.erb +29 -0
  648. data/spec/autocomplete_generator/app/Settings/login.erb +25 -0
  649. data/spec/autocomplete_generator/app/Settings/reset.bb.erb +16 -0
  650. data/spec/autocomplete_generator/app/Settings/reset.erb +14 -0
  651. data/spec/autocomplete_generator/app/Settings/wait.bb.erb +10 -0
  652. data/spec/autocomplete_generator/app/Settings/wait.erb +10 -0
  653. data/spec/autocomplete_generator/app/application.rb +16 -0
  654. data/spec/autocomplete_generator/app/helpers/application_helper.rb +129 -0
  655. data/spec/autocomplete_generator/app/helpers/browser_helper.rb +22 -0
  656. data/spec/autocomplete_generator/app/index.bb.erb +21 -0
  657. data/spec/autocomplete_generator/app/index.erb +24 -0
  658. data/spec/autocomplete_generator/app/layout.erb +94 -0
  659. data/spec/autocomplete_generator/app/loading.html +11 -0
  660. data/spec/autocomplete_generator/build.yml +41 -0
  661. data/spec/autocomplete_generator/icon/icon.ico +0 -0
  662. data/spec/autocomplete_generator/icon/icon.png +0 -0
  663. data/spec/autocomplete_generator/icon/icon.svg +5334 -0
  664. data/spec/autocomplete_generator/icon/icon114.png +0 -0
  665. data/spec/autocomplete_generator/icon/icon57.png +0 -0
  666. data/spec/autocomplete_generator/icon/icon72.png +0 -0
  667. data/spec/autocomplete_generator/readme.txt +1 -0
  668. data/spec/autocomplete_generator/rhoconfig.txt +88 -0
  669. data/spec/autocomplete_generator/rhosimulator/Databases/Databases.db +0 -0
  670. data/spec/autocomplete_generator/rhosimulator/WebpageIcons.db +0 -0
  671. data/spec/autocomplete_generator/rhosimulator/db/syncdbuser.sqlite +0 -0
  672. data/spec/autocomplete_generator/rhosimulator/db/syncdbuser.sqlite.version +1 -0
  673. data/spec/autocomplete_generator/rhosimulator/rholog.txt_pos +1 -0
  674. data/spec/autocomplete_generator/rhosimulator/rhosimconfig.txt +8 -0
  675. data/spec/framework_spec/app/spec/rhomobile/NetHttp_spec.rb +22 -0
  676. data/spec/framework_spec/app/spec_runner.rb +12 -0
  677. data/spec/framework_spec/icon/icon.ico +0 -0
  678. data/spec/framework_spec/icon/icon.png +0 -0
  679. data/spec/perfomance_spec/icon/icon.ico +0 -0
  680. data/spec/perfomance_spec/icon/icon.png +0 -0
  681. data/spec/phone_spec/app/BlobBulkTest/blob_bulk_test.png +0 -0
  682. data/spec/phone_spec/app/BlobBulkTest_s/blob_bulk_test_s.png +0 -0
  683. data/spec/phone_spec/app/PartialTest/_index_partial.erb +5 -0
  684. data/spec/phone_spec/app/PartialTest/_index_partial_nested.erb +2 -0
  685. data/spec/phone_spec/app/PartialTest/index.erb +6 -0
  686. data/spec/phone_spec/app/spec/blob_bulksync_spec.rb +5 -3
  687. data/spec/phone_spec/app/spec/bulksync_spec.rb +33 -41
  688. data/spec/phone_spec/app/spec/database_spec.rb +5 -0
  689. data/spec/phone_spec/app/spec/json_spec.rb +50 -50
  690. data/spec/phone_spec/app/spec/rho_controller_spec.rb +29 -0
  691. data/spec/phone_spec/app/spec/syncengine_spec.rb +184 -47
  692. data/spec/phone_spec/app/spec_runner.rb +3 -2
  693. data/spec/phone_spec/icon/icon.ico +0 -0
  694. data/spec/phone_spec/icon/icon.png +0 -0
  695. data/spec/phone_spec/rhoconfig.txt +2 -0
  696. data/version +1 -1
  697. metadata +339 -47
  698. data/platform/android/Rhodes/PushReceiver.erb +0 -14
  699. data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +0 -126
  700. data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushService.java +0 -83
  701. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/Config.java +0 -246
  702. data/platform/bb/rhodes/src/com/rho/rubyext/PNGEncoder.java +0 -613
  703. data/res/icons/rho.psd +0 -0
  704. data/res/icons/rhodes.psd +0 -0
  705. data/res/icons/rhosim.psd +0 -0
@@ -45,6 +45,43 @@
45
45
 
46
46
  namespace rho {
47
47
  namespace common {
48
+
49
+ enum enNetworkStatus {
50
+ networkStatusUnknown,
51
+ networkStatusConnected,
52
+ networkStatusDisconnected
53
+ };
54
+
55
+ class INetworkStatusReceiver
56
+ {
57
+ public:
58
+ virtual ~INetworkStatusReceiver() {}
59
+ virtual void onNetworkStatusChanged(enNetworkStatus currentStatus) = 0;
60
+ };
61
+
62
+ class INetworkStatusMonitor
63
+ {
64
+ public:
65
+ virtual ~INetworkStatusMonitor() {}
66
+ virtual void setPollInterval(int pollInterval) = 0;
67
+ virtual void setNetworkStatusReceiver(INetworkStatusReceiver* receiver) = 0;
68
+ };
69
+
70
+ class NetworkStatusReceiver : public INetworkStatusReceiver
71
+ {
72
+ private:
73
+ enNetworkStatus m_prevStatus;
74
+ String m_callbackUrl;
75
+ common::CMutex& m_mxAccess;
76
+
77
+ public:
78
+ NetworkStatusReceiver( common::CMutex& mxAccess );
79
+ virtual void onNetworkStatusChanged(enNetworkStatus currentStatus);
80
+ void setCallbackUrl( const String& url ) { m_callbackUrl = url; }
81
+
82
+ private:
83
+ static String networkStatusToString( enNetworkStatus status );
84
+ };
48
85
 
49
86
  class CRhodesApp : public CRhodesAppBase
50
87
  {
@@ -77,7 +114,7 @@ private:
77
114
 
78
115
  mutable common::CMutex m_mxPushCallback;
79
116
  String m_strPushCallback, m_strPushCallbackParams;
80
- RhoPushManager m_appPushMgr;
117
+ PushManager m_appPushMgr;
81
118
 
82
119
  common::CMutex m_mxScreenRotationCallback;
83
120
  String m_strScreenRotationCallback, m_strScreenRotationCallbackParams;
@@ -87,6 +124,11 @@ private:
87
124
 
88
125
  common::CAutoPtr<common::CThreadQueue> m_appCallbacksQueue;
89
126
  CExtManager* m_pExtManager;
127
+
128
+ common::CMutex m_mxNetworkStatus;
129
+ NetworkStatusReceiver m_networkStatusReceiver;
130
+ INetworkStatusMonitor* m_pNetworkStatusMonitor;
131
+ static const int c_defaultNetworkStatusPollInterval = 20;
90
132
 
91
133
  public:
92
134
  ~CRhodesApp(void);
@@ -157,12 +199,15 @@ public:
157
199
 
158
200
  IRhoPushClient* getDefaultPushClient() {return m_appPushMgr.getDefaultClient(); }
159
201
  void addPushClient(IRhoPushClient* pClient) { m_appPushMgr.addClient(pClient); }
202
+ void initPushClients();
160
203
  void setPushNotification(const String& strUrl, const String& strParams, const String& types);
161
204
  //void checkPushRegistration(const String& strUrl, const String& strParams, const String& type);
162
205
 
163
206
  // Deprecated
164
207
  boolean callPushCallback(const String& strData) const;
165
- boolean callPushCallbackWithJsonBody(const String& strUrl, const String& strData);
208
+ boolean callPushCallbackWithJsonBody(const String& strUrl, const String& strData, const String& strParams);
209
+
210
+ boolean callPushCallback(const String& strType, const String& strJson, const String& strData);
166
211
 
167
212
  void setScreenRotationNotification(String strUrl, String strParams);
168
213
  void callScreenRotationCallback(int width, int height, int degrees);
@@ -172,6 +217,10 @@ public:
172
217
  void notifyLocalServerStarted();
173
218
  const char* getFreeListeningPort();
174
219
  int determineFreeListeningPort();
220
+
221
+ void setNetworkStatusNotify(const String& url, int poll_interval);
222
+ void clearNetworkStatusNotify();
223
+ void setNetworkStatusMonitor(INetworkStatusMonitor* netMonitor);
175
224
 
176
225
  protected:
177
226
  virtual void run();
@@ -246,7 +295,7 @@ void rho_rhodesapp_setViewMenu(unsigned long valMenu);
246
295
  const char* rho_rhodesapp_getappbackurl();
247
296
 
248
297
  int rho_rhodesapp_callPushCallback(const char* szData);
249
- int rho_rhodesapp_callPushCallbackWithJsonBody(const char* szUrl, const char* szData);
298
+ //int rho_rhodesapp_callPushCallbackWithJsonBody(const char* szUrl, const char* szData, const char* szParam);
250
299
 
251
300
  void rho_rhodesapp_callScreenRotationCallback(int width, int height, int degrees);
252
301
  void rho_rhodesapp_callPopupCallback(const char *strCallbackUrl, const char *id, const char *title);
@@ -255,6 +304,7 @@ int rho_conf_send_log(const char* callback_url);
255
304
 
256
305
  void rho_net_request(const char *url);
257
306
  void rho_net_request_with_data(const char *url, const char *str_body);
307
+ void rho_net_request_with_data_in_separated_thread(const char *url, const char *str_body);
258
308
 
259
309
  void rho_rhodesapp_load_url(const char *url);
260
310
 
@@ -263,14 +313,17 @@ int rho_rhodesapp_check_mode();
263
313
  int rho_rhodesapp_canstartapp(const char* szCmdLine, const char* szSeparators);
264
314
 
265
315
  // return 1 only if "motorola_licence" and "motorola_licence" property is exist and correct !
266
- int rho_is_motorola_licence_checked();
316
+ int rho_is_motorola_licence_checked(const char* szLicence, const char* szCompany, const char* szAppName);
267
317
 
268
- int rho_can_app_started_with_current_licence();
269
- int rho_is_rho_elements_extension_can_be_used();
318
+ int rho_can_app_started_with_current_licence(const char* szLicence, const char* szCompany, const char* szAppName);
319
+ int rho_is_rho_elements_extension_can_be_used(const char* szLicence);
270
320
 
271
321
 
272
322
  // should be implemented in platforms code
273
- void rho_platform_restart_application();
323
+ void rho_platform_restart_application();
324
+
325
+ void rho_sys_set_network_status_notify(const char* url, int poll_interval);
326
+ void rho_sys_clear_network_status_notify();
274
327
 
275
328
  #ifdef __cplusplus
276
329
  };
@@ -32,13 +32,7 @@
32
32
  #include "sync/SyncThread.h"
33
33
  #include "unzip/unzip.h"
34
34
 
35
- extern "C" {
36
- void rho_net_request_with_data(const char *url, const char *str_body)
37
- {
38
- getNetRequest().pushData(url, str_body, null);
39
- }
40
-
41
- }
35
+ extern "C" void rho_net_request_with_data(const char *url, const char *str_body);
42
36
 
43
37
  namespace rho {
44
38
  namespace common{
@@ -152,7 +146,7 @@ boolean CRhodesAppBase::isBaseUrl(const String& strUrl)
152
146
 
153
147
  void rho_do_send_log(const String& strCallback)
154
148
  {
155
- String strDevicePin = rho::sync::CClientRegister::getInstance() ? rho::sync::CClientRegister::getInstance()->getDevicePin() : "";
149
+ String strDevicePin = rho::sync::CClientRegister::Get()->getDevicePin();
156
150
  String strClientID = rho::sync::CSyncThread::getSyncEngine().readClientID();
157
151
 
158
152
  String strLogUrl = RHOCONF().getPath("logserver");
@@ -131,6 +131,7 @@ extern "C" {
131
131
 
132
132
  const char* rho_native_reruntimepath();
133
133
  const char* rho_native_rhopath();
134
+ const char* rho_native_get_appname();
134
135
  const char* rho_native_rhouserpath();
135
136
  const char* rho_native_rhodbpath();
136
137
 
@@ -158,7 +158,7 @@ void CThreadQueue::run()
158
158
  nWait = nWait2;
159
159
  }
160
160
 
161
- if ( !isStopping() && isNoCommands() )
161
+ if ( !m_bNoThreaded && !isStopping() && isNoCommands() )
162
162
  {
163
163
  LOG(INFO) + "ThreadQueue blocked for " + nWait + " seconds...";
164
164
  if ( wait(nWait) == 1 )
@@ -166,7 +166,7 @@ void CThreadQueue::run()
166
166
  }
167
167
  nLastPollInterval = 0;
168
168
 
169
- if ( !isStopping() )
169
+ if ( !m_bNoThreaded && !isStopping() )
170
170
  processCommands();
171
171
  }
172
172
 
@@ -5,12 +5,14 @@
5
5
  #include "app_build_configs.h"
6
6
 
7
7
  static const char* keys[] = { ""
8
+ ,"name"
8
9
  };
9
10
 
10
11
  static const char* values[] = { ""
12
+ ,"testwp8"
11
13
  };
12
14
 
13
- #define APP_BUILD_CONFIG_COUNT 1
15
+ #define APP_BUILD_CONFIG_COUNT 2
14
16
 
15
17
  const char* get_app_build_config_item(const char* key) {
16
18
  int i;
@@ -223,6 +223,8 @@ rhomap::IMapView *rho_map_create(rho_param *p, rhomap::IDrawingDevice *device, i
223
223
  bool scroll_enabled = true;
224
224
  bool shows_user_location = true;
225
225
 
226
+ bool region_setted = false;
227
+
226
228
  if (settings)
227
229
  {
228
230
  if (settings->type != RHO_PARAM_HASH)
@@ -267,6 +269,8 @@ rhomap::IMapView *rho_map_create(rho_param *p, rhomap::IDrawingDevice *device, i
267
269
  latitudeSpan = latSpan->type == RHO_PARAM_STRING ? strtod(latSpan->v.string, NULL) : 0;
268
270
  longitudeSpan = lonSpan->type == RHO_PARAM_STRING ? strtod(lonSpan->v.string, NULL) : 0;
269
271
 
272
+ region_setted = true;
273
+
270
274
  use_center_radius = false;
271
275
  }
272
276
  else if (value->type == RHO_PARAM_HASH)
@@ -486,9 +490,12 @@ private:
486
490
 
487
491
  int mapview_preload_map_tiles(rho_param* p, const char* callback)
488
492
  {
493
+
489
494
  if (p == NULL) {
490
495
  return 0;
491
496
  }
497
+
498
+
492
499
  if (p->type != RHO_PARAM_HASH) {
493
500
  RAWLOG_ERROR("preload_map_tiles: first params must be HASH!");
494
501
  return 0;
@@ -504,6 +511,13 @@ int mapview_preload_map_tiles(rho_param* p, const char* callback)
504
511
  int min_zoom = 0;
505
512
  int max_zoom = 0;
506
513
 
514
+ bool top_latitude_setted = false;
515
+ bool left_longitude_setted = false;
516
+ bool bottom_latitude_setted = false;
517
+ bool right_longitude_setted = false;
518
+ bool min_zoom_setted = false;
519
+ bool max_zoom_setted = false;
520
+
507
521
 
508
522
  for (int j = 0, limm = p->v.hash->size; j < limm; ++j) {
509
523
  char *name = p->v.hash->name[j];
@@ -522,24 +536,41 @@ int mapview_preload_map_tiles(rho_param* p, const char* callback)
522
536
  }
523
537
  else if (strcasecmp(name, "top_latitude") == 0) {
524
538
  top_latitude = strtod(v, NULL);
539
+ top_latitude_setted = true;
525
540
  }
526
541
  else if (strcasecmp(name, "left_longitude") == 0) {
527
542
  left_longitude = strtod(v, NULL);
543
+ left_longitude_setted = true;
528
544
  }
529
545
  else if (strcasecmp(name, "bottom_latitude") == 0) {
530
546
  bottom_latitude = strtod(v, NULL);
547
+ bottom_latitude_setted = true;
531
548
  }
532
549
  else if (strcasecmp(name, "right_longitude") == 0) {
533
550
  right_longitude = strtod(v, NULL);
551
+ right_longitude_setted = true;
534
552
  }
535
553
  else if (strcasecmp(name, "min_zoom") == 0) {
536
554
  min_zoom = (int)strtod(v, NULL);
555
+ min_zoom_setted = true;
537
556
  }
538
557
  else if (strcasecmp(name, "max_zoom") == 0) {
539
558
  max_zoom = (int)strtod(v, NULL);
559
+ max_zoom_setted = true;
540
560
  }
541
561
  }
542
562
 
563
+ const char* s_google = "google";
564
+ const char* s_type = "roadmap";
565
+
566
+ if (engine == NULL) {
567
+ engine = (char*)s_google;
568
+ }
569
+
570
+ if (map_type == NULL) {
571
+ map_type = (char*)s_type;
572
+ }
573
+
543
574
 
544
575
  rhomap::EmptyDrawingDevice empty_device;
545
576
  std::string providerId = engine;
@@ -550,13 +581,18 @@ int mapview_preload_map_tiles(rho_param* p, const char* callback)
550
581
  RAWLOG_ERROR1("Can not create MapView for provider=%s", engine);
551
582
  return 0;
552
583
  }
553
-
584
+
585
+ if (!( top_latitude_setted && left_longitude_setted && bottom_latitude_setted && right_longitude_setted && min_zoom_setted && max_zoom_setted )) {
586
+ RAWLOG_ERROR("Invalid parameters in preload_map_tiles()");
587
+ return 0;
588
+ }
589
+
554
590
  mapview->setMapType(map_type);
555
591
  mapview->set_file_caching_enable(true);
556
592
 
557
593
  int count = mapview->preloadMapTiles(top_latitude, left_longitude, bottom_latitude, right_longitude, min_zoom, max_zoom);
558
-
559
- CheckProgress* cp = new CheckProgress(mapview, callback, count);
594
+
595
+ CheckProgress* cp = new CheckProgress(mapview, callback, count);
560
596
 
561
597
  cp->start(rho::common::IRhoRunnable::epNormal);
562
598
 
@@ -34,9 +34,9 @@ namespace rho { namespace common {
34
34
  class IRhoPushClient {
35
35
  public:
36
36
  virtual const String& getType() const = 0;
37
- virtual void doRegister(const String& callBackUrl, const String& urlParams) = 0;
38
- virtual void doUnregister() = 0;
39
- //virtual void checkRegistered(const String& callBackUrl, const String& urlParams) = 0;
37
+ virtual void init() = 0;
38
+ virtual void setNotificationUrl(const String& callBackUrl, const String& urlParams) = 0;
39
+ virtual bool callNotification(const String& json, const String& data) = 0;
40
40
  virtual ~IRhoPushClient() {};
41
41
  };
42
42
 
@@ -25,37 +25,25 @@
25
25
  *------------------------------------------------------------------------*/
26
26
 
27
27
  #include "common/RhoStd.h"
28
+ #include "common/RhodesApp.h"
28
29
  #include "logging/RhoLog.h"
29
30
 
30
31
  #include "common/push/RhoPushManager.h"
31
32
  #include "common/push/IRhoPushClient.h"
32
33
 
33
-
34
34
  namespace rho { namespace common {
35
35
 
36
+ IMPLEMENT_LOGCLASS(PushManager, "RhoPush");
36
37
 
37
- IMPLEMENT_LOGCLASS(RhoPushManager, "RhoPush");
38
38
 
39
39
  //----------------------------------------------------------------------------------------------------------------------
40
- RhoPushManager::~RhoPushManager()
40
+ IRhoPushClient* PushManager::getDefaultClient()
41
41
  {
42
- for(Vector<IRhoPushClient*>::iterator I = m_Clients.begin(); I != m_Clients.end(); ++I)
43
- {
44
- delete *I;
45
- }
46
- }
47
-
48
- //----------------------------------------------------------------------------------------------------------------------
49
- IRhoPushClient* RhoPushManager::getDefaultClient() {
50
- for(Vector<IRhoPushClient*>::iterator I = m_Clients.begin(); I != m_Clients.end(); ++I)
51
- {
52
- return *I;
53
- }
54
- return 0;
42
+ return m_Clients.empty() ? 0 : m_Clients.front();
55
43
  }
56
44
 
57
45
  //----------------------------------------------------------------------------------------------------------------------
58
- void RhoPushManager::addClient(IRhoPushClient* pClient)
46
+ void PushManager::addClient(IRhoPushClient* pClient)
59
47
  {
60
48
  if(getClient(pClient->getType()))
61
49
  {
@@ -67,72 +55,61 @@ void RhoPushManager::addClient(IRhoPushClient* pClient)
67
55
  }
68
56
 
69
57
  //----------------------------------------------------------------------------------------------------------------------
70
- void RhoPushManager::registerClient(const String& url, const String& urlParams, const String& pushType)
58
+ void PushManager::initClients()
71
59
  {
72
- IRhoPushClient* pClient = getClient(pushType);
73
- if(pClient)
74
- {
75
- pClient->doRegister(url, urlParams);
76
- LOG(INFO) + "Push client registration has requested ("+pushType+")";
77
- }
78
- else
60
+ for(Vector<IRhoPushClient*>::iterator I = m_Clients.begin(); I != m_Clients.end(); ++I)
79
61
  {
80
- LOG(WARNING) + "Cannot register Push client ("+pushType+"): not exist";
62
+ (*I)->init();
81
63
  }
82
64
  }
83
65
 
84
66
  //----------------------------------------------------------------------------------------------------------------------
85
- void RhoPushManager::unregisterClient(const String& pushType)
67
+ void PushManager::setNotificationUrl(const String& pushType, const String& url, const String& urlParams)
86
68
  {
87
69
  IRhoPushClient* pClient = getClient(pushType);
88
70
  if(pClient)
89
71
  {
90
- pClient->doUnregister();
91
- LOG(INFO) + "Push client unregistration has requested ("+pushType+")";
72
+ pClient->setNotificationUrl(url, urlParams);
73
+ LOG(INFO) + "Push notification URL is set for: client \'"+pushType+"\'";
92
74
  }
93
75
  else
94
76
  {
95
- LOG(WARNING) + "Cannot unregister Push client ("+pushType+"): not exist";
77
+ LOG(WARNING) + "Cannot set push notification: client \'"+pushType+"\' does not exist";
96
78
  }
97
79
  }
98
80
 
99
81
  //----------------------------------------------------------------------------------------------------------------------
100
- //void RhoPushManager::checkClientRegistered(const String& pushType)
101
- //{
102
- // IRhoPushClient* pClient = getClient(pushType);
103
- // if(pClient)
104
- // {
105
- // pClient->checkRegistered(url);
106
- // LOG(INFO) + "Push client registration check has requested ("+pushType+")";
107
- // }
108
- // else
109
- // {
110
- // LOG(WARNING) + "Cannot check Push client registration ("+pushType+"): not exist";
111
- // }
112
- //}
113
-
114
- //----------------------------------------------------------------------------------------------------------------------
115
- void RhoPushManager::registerAllClients(const String& url, const String& urlParams)
82
+ void PushManager::setNotificationUrl(const String& url, const String& urlParams)
116
83
  {
117
84
  for(Vector<IRhoPushClient*>::iterator I = m_Clients.begin(); I != m_Clients.end(); ++I)
118
85
  {
119
- (*I)->doRegister(url, urlParams);
120
- LOG(INFO) + "Push client registration has requested ("+(*I)->getType()+")";
86
+ (*I)->setNotificationUrl(url, urlParams);
87
+ LOG(INFO) + "Push notification URL is set for: client \'"+(*I)->getType()+"\'";
121
88
  }
122
89
  }
123
90
 
124
91
  //----------------------------------------------------------------------------------------------------------------------
125
- void RhoPushManager::unregisterAllClients()
92
+ bool PushManager::callNotification(const String& type, const String& json, const String& data)
126
93
  {
127
- for(Vector<IRhoPushClient*>::iterator I = m_Clients.begin(); I != m_Clients.end(); ++I)
94
+ if(type.length() > 0)
128
95
  {
129
- (*I)->doUnregister();
130
- LOG(INFO) + "Push client unregistration has requested ("+(*I)->getType()+")";
96
+ IRhoPushClient* pClient = getClient(type);
97
+ if(pClient)
98
+ {
99
+ return pClient->callNotification(json, data);
100
+ } else
101
+ {
102
+ LOG(WARNING) + "Wrong push message type: " + type;
103
+ return false;
104
+ }
105
+ } else
106
+ {
107
+ return m_rhoApp.callPushCallback(data);
131
108
  }
132
109
  }
133
110
 
134
111
  //----------------------------------------------------------------------------------------------------------------------
135
- IRhoPushClient* RhoPushManager::getClient(const String& pushType)
112
+ IRhoPushClient* PushManager::getClient(const String& pushType)
136
113
  {
137
114
  for(Vector<IRhoPushClient*>::iterator I = m_Clients.begin(); I != m_Clients.end(); ++I)
138
115
  {
@@ -141,6 +118,7 @@ IRhoPushClient* RhoPushManager::getClient(const String& pushType)
141
118
  return 0;
142
119
  }
143
120
 
121
+ //----------------------------------------------------------------------------------------------------------------------
144
122
 
145
123
  }}
146
124