rhodes 3.0.2 → 3.1.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1393) hide show
  1. data/CHANGELOG +13 -2
  2. data/Rakefile +200 -18
  3. data/bin/get-rhodes-info +1 -1
  4. data/doc/build.txt +174 -98
  5. data/doc/configuration.txt +13 -2
  6. data/doc/device-caps.txt +184 -24
  7. data/doc/extensions.txt +19 -1
  8. data/doc/generator.txt +18 -18
  9. data/doc/install.txt +15 -4
  10. data/doc/introduction.txt +19 -20
  11. data/doc/nfc.txt +1617 -513
  12. data/doc/release.txt +85 -41
  13. data/doc/rhom.txt +11 -1
  14. data/doc/simulator.txt +15 -5
  15. data/doc/synchronization.txt +21 -7
  16. data/doc/ui.txt +4 -0
  17. data/installer/rhostudio.nsi +464 -0
  18. data/lib/build/compileERB/bb.rb +26 -0
  19. data/lib/build/compileERB/default.rb +26 -0
  20. data/lib/build/compileRB/compileRB.rb +26 -0
  21. data/lib/build/jake.rb +27 -2
  22. data/lib/build/rhodes-build.rb +26 -0
  23. data/lib/extensions/barcode/ext.yml +3 -0
  24. data/lib/extensions/barcode/ext/barcode/platform/android/AndroidManifest.xml +27 -0
  25. data/lib/extensions/barcode/ext/barcode/platform/android/Rakefile +13 -13
  26. data/lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/drawable-hdpi/cancel_icon.png +0 -0
  27. data/{platform/wp7/WPApplication/rho/apps/public/images/android/btn_check_on.png → lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/drawable-hdpi/ok_icon.png} +0 -0
  28. data/lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/drawable-hdpi/retake_icon.png +0 -0
  29. data/{platform/wp7/WPApplication/rho/apps/public/images/android/btn_radio_on.png → lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/drawable/cancel_icon.png} +0 -0
  30. data/{platform/wp7/WPApplication/rho/apps/public/images/android/disclosure.png → lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/drawable/ok_icon.png} +0 -0
  31. data/{platform/wp7/WPApplication/rho/apps/public/images/android/btn_radio_off.png → lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/drawable/retake_icon.png} +0 -0
  32. data/lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/layout/capture.xml +122 -0
  33. data/lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/raw/beep.ogg +0 -0
  34. data/lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/values/attrs.xml +20 -0
  35. data/lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/values/colors.xml +42 -0
  36. data/lib/extensions/barcode/ext/barcode/platform/android/additional_files/res/values/ids.xml +31 -0
  37. data/lib/extensions/barcode/ext/barcode/platform/android/ext_build.files +15 -0
  38. data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/barcode.cpp +16 -0
  39. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/CaptureActivity.java +778 -0
  40. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/CaptureActivityHandler.java +136 -0
  41. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/DecodeHandler.java +99 -0
  42. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/DecodeThread.java +121 -0
  43. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/FinishListener.java +48 -0
  44. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/InactivityTimer.java +71 -0
  45. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/LocaleManager.java +97 -0
  46. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/PlanarYUVLuminanceSource.java +133 -0
  47. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/ViewfinderResultPointCallback.java +34 -0
  48. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/ViewfinderView.java +157 -0
  49. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/camera/AutoFocusCallback.java +51 -0
  50. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java +280 -0
  51. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/camera/CameraManager.java +318 -0
  52. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/camera/FlashlightManager.java +148 -0
  53. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/camera/PreviewCallback.java +59 -0
  54. data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/Barcode.java +44 -1
  55. data/lib/extensions/barcode/ext/barcode/platform/bb/Rakefile +1 -1
  56. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +4 -0
  57. data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode.i +5 -0
  58. data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode_wrap.c +138 -389
  59. data/lib/extensions/barcode/ext/barcode/shared/src/zbar.c +5 -0
  60. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/README.TXT +5 -0
  61. data/lib/extensions/debugger/CHANGELOG +10 -0
  62. data/lib/extensions/debugger/LICENSE +21 -0
  63. data/lib/extensions/debugger/README.md +8 -0
  64. data/lib/extensions/debugger/debugger.rb +57 -9
  65. data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.h +24 -7
  66. data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.m +18 -17
  67. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/Nfc.java +9 -4
  68. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcActivity.java +1 -1
  69. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcMessage.java +0 -1
  70. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcMessagePack.java +0 -1
  71. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcRecord.java +1 -1
  72. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcTechActivity.java +0 -1
  73. data/lib/extensions/nfc/nfc.rb +9 -3
  74. data/lib/extensions/rholang/rholang/lang_cs.rb +3 -3
  75. data/lib/extensions/rholang/rholang/lang_da.rb +3 -3
  76. data/lib/extensions/rholang/rholang/lang_de.rb +3 -3
  77. data/lib/extensions/rholang/rholang/lang_es.rb +3 -3
  78. data/lib/extensions/rholang/rholang/lang_es_ar.rb +3 -3
  79. data/lib/extensions/rholang/rholang/lang_ko.rb +3 -3
  80. data/lib/extensions/rholang/rholang/lang_nl.rb +3 -3
  81. data/lib/extensions/rholang/rholang/lang_no.rb +3 -3
  82. data/lib/extensions/rholang/rholang/lang_pt_br.rb +4 -4
  83. data/lib/extensions/rholang/rholang/lang_se.rb +3 -3
  84. data/lib/extensions/rholang/rholang/lang_sr.rb +3 -3
  85. data/lib/framework/builtinME.rb +31 -2
  86. data/lib/framework/dateME.rb +26 -0
  87. data/lib/framework/res/back_btn.sym.png +0 -0
  88. data/lib/framework/res/blue_pushpin_small.sym.png +0 -0
  89. data/lib/framework/res/callout.sym.png +0 -0
  90. data/lib/framework/res/callout_link.sym.png +0 -0
  91. data/lib/framework/res/esri.sym.png +0 -0
  92. data/lib/framework/res/forward_btn.sym.png +0 -0
  93. data/lib/framework/res/home_btn.sym.png +0 -0
  94. data/{platform/wp7/WPApplication/rho/apps/public/images/android/btn_check_off.png → lib/framework/res/options_btn.sym.png} +0 -0
  95. data/lib/framework/res/refresh_btn.sym.png +0 -0
  96. data/lib/framework/rho/mapview.rb +26 -0
  97. data/lib/framework/rho/render.rb +34 -2
  98. data/lib/framework/rho/rho.rb +28 -2
  99. data/lib/framework/rho/rhoapplication.rb +26 -0
  100. data/lib/framework/rho/rhobluetooth.rb +70 -0
  101. data/lib/framework/rho/rhocontact.rb +26 -0
  102. data/lib/framework/rho/rhocontroller.rb +26 -0
  103. data/lib/framework/rho/rhoerror.rb +26 -0
  104. data/lib/framework/rho/rhoevent.rb +26 -0
  105. data/lib/framework/rho/rhoevent_bb.rb +26 -0
  106. data/lib/framework/rho/rhoevent_c.rb +26 -0
  107. data/lib/framework/rho/rhofsconnector.rb +25 -0
  108. data/lib/framework/rho/rhomsg.rb +26 -0
  109. data/lib/framework/rho/rhonativeviewmanager.rb +25 -0
  110. data/lib/framework/rho/rhosupport.rb +32 -1
  111. data/lib/framework/rho/rhotabbar.rb +27 -1
  112. data/lib/framework/rho/rhotoolbar.rb +26 -1
  113. data/lib/framework/rho/rhoutils.rb +26 -0
  114. data/lib/framework/rho/rhoviewhelpers.rb +26 -0
  115. data/lib/framework/rhoappmanifest.rb +26 -0
  116. data/lib/framework/rhodes.rb +1 -1
  117. data/lib/framework/rhoframework.rb +77 -0
  118. data/lib/framework/rhom/rhom.rb +30 -19
  119. data/lib/framework/rhom/rhom_db_adapter.rb +26 -19
  120. data/lib/framework/rhom/rhom_model.rb +25 -0
  121. data/lib/framework/rhom/rhom_object.rb +26 -19
  122. data/lib/framework/rhom/rhom_object_factory.rb +73 -55
  123. data/lib/framework/rhom/rhom_source.rb +26 -0
  124. data/lib/framework/rhosystem.rb +47 -16
  125. data/lib/framework/version.rb +1 -1
  126. data/lib/rhodes.rb +1 -1
  127. data/platform/android/Rhodes/AndroidManifest.xml +5 -4
  128. data/platform/android/Rhodes/default.properties +1 -1
  129. data/platform/android/Rhodes/jni/Android.mk +365 -0
  130. data/platform/android/Rhodes/jni/Application.mk +3 -0
  131. data/platform/android/Rhodes/jni/genconfig.h +17 -0
  132. data/platform/android/Rhodes/jni/include/rhodes.h +26 -0
  133. data/platform/android/Rhodes/jni/include/rhodes/JNIRhoRuby.h +71 -0
  134. data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +47 -33
  135. data/platform/android/Rhodes/jni/include/rhodes/RhoClassFactory.h +46 -1
  136. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhoLogConf.h +11 -11
  137. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +1 -9
  138. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_camera_Camera.h +2 -2
  139. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_file_RhoFileApi.h +8 -0
  140. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_mainview_SplashScreen.h +39 -0
  141. data/platform/android/Rhodes/jni/include/rhodes/rhocryptimpl.h +26 -0
  142. data/platform/android/Rhodes/jni/include/rhodes/sslimpl.h +26 -0
  143. data/platform/android/Rhodes/jni/rhocaps.inc +12 -0
  144. data/platform/android/Rhodes/jni/src/JNIRhoRuby.cpp +204 -0
  145. data/platform/android/Rhodes/jni/src/RhoClassFactory.cpp +32 -5
  146. data/platform/android/Rhodes/jni/src/alert.cpp +29 -5
  147. data/platform/android/Rhodes/jni/src/bluetooth.cpp +68 -3
  148. data/platform/android/Rhodes/jni/src/callbacks.cpp +40 -15
  149. data/platform/android/Rhodes/jni/src/camera.cpp +84 -7
  150. data/platform/android/Rhodes/jni/src/datetimepicker.cpp +26 -0
  151. data/platform/android/Rhodes/jni/src/event.cpp +27 -0
  152. data/platform/android/Rhodes/jni/src/fileapi.cpp +66 -2
  153. data/platform/android/Rhodes/jni/src/geolocation.cpp +26 -0
  154. data/platform/android/Rhodes/jni/src/logconf.cpp +44 -29
  155. data/platform/android/Rhodes/jni/src/logger.cpp +26 -0
  156. data/platform/android/Rhodes/jni/src/mapview.cpp +30 -0
  157. data/platform/android/Rhodes/jni/src/menu.cpp +26 -0
  158. data/platform/android/Rhodes/jni/src/nativebar.cpp +27 -8
  159. data/platform/android/Rhodes/jni/src/nativeview.cpp +26 -0
  160. data/platform/android/Rhodes/jni/src/navbar.cpp +27 -0
  161. data/platform/android/Rhodes/jni/src/phonebook.cpp +27 -0
  162. data/platform/android/Rhodes/jni/src/rhoconf.cpp +26 -0
  163. data/platform/android/Rhodes/jni/src/rhocryptimpl.cpp +26 -0
  164. data/platform/android/Rhodes/jni/src/rhodes.cpp +40 -593
  165. data/platform/android/Rhodes/jni/src/rhodesapp.cpp +326 -0
  166. data/platform/android/Rhodes/jni/src/rhodessystem.cpp +186 -0
  167. data/platform/android/Rhodes/jni/src/ringtones.cpp +27 -0
  168. data/platform/android/Rhodes/jni/src/signature.cpp +26 -0
  169. data/platform/android/Rhodes/jni/src/socketimpl.cpp +26 -0
  170. data/platform/android/Rhodes/jni/src/splashscreen.cpp +30 -4
  171. data/platform/android/Rhodes/jni/src/sslimpl.cpp +27 -0
  172. data/platform/android/Rhodes/jni/src/webview.cpp +27 -0
  173. data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +26 -0
  174. data/platform/android/Rhodes/src/com/rhomobile/rhodes/HttpLog.java +25 -19
  175. data/platform/android/Rhodes/src/com/rhomobile/rhodes/LocalFileProvider.java +26 -0
  176. data/platform/android/Rhodes/src/com/rhomobile/rhodes/Logger.java +25 -19
  177. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +25 -19
  178. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeLibraries.java +26 -0
  179. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NavBar.java +26 -0
  180. data/platform/android/Rhodes/src/com/rhomobile/rhodes/Push.java +27 -0
  181. data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +26 -0
  182. data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushService.java +26 -0
  183. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoConf.java +26 -0
  184. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +29 -2
  185. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoLogConf.java +36 -30
  186. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMenu.java +26 -0
  187. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +81 -73
  188. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivityListener.java +26 -0
  189. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivityStartupListeners.java +1 -0
  190. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesAppOptions.java +26 -0
  191. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +26 -0
  192. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +83 -38
  193. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RingtoneManager.java +25 -19
  194. data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +25 -19
  195. data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +25 -19
  196. data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/PopupActivity.java +26 -0
  197. data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/StatusNotification.java +26 -0
  198. data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/IRhoBluetoothManager.java +33 -0
  199. data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothDeviceListActivity.java +35 -2
  200. data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManager.java +52 -3
  201. data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerNew.java +182 -56
  202. data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerOld.java +41 -2
  203. data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothSession.java +60 -23
  204. data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/UUIDHelper.java +26 -0
  205. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +162 -27
  206. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraNewService.java +152 -0
  207. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraOldService.java +49 -0
  208. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraSemiService.java +140 -0
  209. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraService.java +49 -0
  210. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraSettings.java +147 -0
  211. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/FileList.java +27 -21
  212. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +124 -53
  213. data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCaptureCallback.java +39 -25
  214. data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePicker.java +25 -19
  215. data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java +25 -19
  216. data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/Event.java +26 -0
  217. data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +26 -0
  218. data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +75 -9
  219. data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +25 -20
  220. data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +25 -20
  221. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +25 -19
  222. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +28 -22
  223. data/platform/android/Rhodes/src/com/rhomobile/rhodes/{SplashScreen.java → mainview/SplashScreen.java} +73 -22
  224. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +27 -21
  225. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Annotation.java +26 -0
  226. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java +26 -0
  227. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/ExtrasHolder.java +51 -0
  228. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +41 -3
  229. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapTouch.java +26 -0
  230. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +26 -0
  231. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MultiTouchHandler.java +26 -0
  232. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/OneTouchHandler.java +26 -0
  233. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/TouchHandler.java +26 -0
  234. data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +26 -0
  235. data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Contact.java +25 -19
  236. data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessor.java +26 -0
  237. data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorNew.java +26 -0
  238. data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorOld.java +26 -0
  239. data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactField.java +25 -19
  240. data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Phonebook.java +25 -19
  241. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +26 -20
  242. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +25 -19
  243. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +25 -19
  244. data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/RhoSockAddr.java +26 -0
  245. data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/RhoSocket.java +26 -0
  246. data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/RhoSocketImpl.java +28 -0
  247. data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +85 -30
  248. data/platform/android/Rhodes/src/com/rhomobile/rhodes/ui/AboutDialog.java +25 -20
  249. data/platform/android/Rhodes/src/com/rhomobile/rhodes/ui/LogOptionsDialog.java +32 -30
  250. data/platform/android/Rhodes/src/com/rhomobile/rhodes/ui/LogViewDialog.java +29 -28
  251. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/ExternalHttpHandler.java +26 -0
  252. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/LocalFileHandler.java +26 -0
  253. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/MailUriHandler.java +25 -20
  254. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/SmsUriHandler.java +25 -20
  255. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java +25 -20
  256. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/UriHandler.java +25 -20
  257. data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/VideoUriHandler.java +25 -20
  258. data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/ContextFactory.java +38 -0
  259. data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +26 -0
  260. data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PhoneId.java +137 -0
  261. data/platform/android/Rhodes/src/com/rhomobile/rhodes/{Utils.java → util/Utils.java} +27 -17
  262. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientNew.java +26 -0
  263. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +26 -0
  264. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettings.java +26 -0
  265. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsNew.java +27 -0
  266. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +26 -0
  267. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +107 -0
  268. data/platform/android/build/RhodesSRC_build.files +11 -4
  269. data/platform/android/build/android.rake +79 -116
  270. data/platform/android/build/android_tools.rb +117 -0
  271. data/platform/android/build/androidcommon.rb +30 -4
  272. data/platform/android/build/libjson_build.files +1 -1
  273. data/platform/android/build/librhodes_build.files +3 -0
  274. data/platform/bb/Hsqldb/src/com/rho/db/FileUtilBB.java +26 -0
  275. data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java +26 -0
  276. data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBRowResult.java +26 -0
  277. data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java +26 -0
  278. data/platform/bb/Hsqldb/src/com/rho/db/Journal.java +26 -0
  279. data/platform/bb/Hsqldb/src/j2me/math/BigDecimal.java +26 -0
  280. data/platform/bb/Hsqldb/src/j2me/math/BigInteger.java +26 -0
  281. data/platform/bb/Hsqldb/src/j2me/sql/Date.java +26 -0
  282. data/platform/bb/Hsqldb/src/j2me/sql/Time.java +26 -0
  283. data/platform/bb/Hsqldb/src/j2me/sql/Timestamp.java +26 -0
  284. data/platform/bb/RubyVM/src/com/rho/DateTimeTokenizer.java +26 -0
  285. data/platform/bb/RubyVM/src/com/rho/FilePath.java +26 -0
  286. data/platform/bb/RubyVM/src/com/rho/IRhoLogSink.java +26 -0
  287. data/platform/bb/RubyVM/src/com/rho/IRhoRubyHelper.java +27 -0
  288. data/platform/bb/RubyVM/src/com/rho/Mutex.java +26 -0
  289. data/platform/bb/RubyVM/src/com/rho/Properties.java +26 -0
  290. data/platform/bb/RubyVM/src/com/rho/RhoAppAdapter.java +26 -0
  291. data/platform/bb/RubyVM/src/com/rho/RhoClassFactory.java +26 -0
  292. data/platform/bb/RubyVM/src/com/rho/RhoConf.java +26 -0
  293. data/platform/bb/RubyVM/src/com/rho/RhoCrypto.java +26 -0
  294. data/platform/bb/RubyVM/src/com/rho/RhoEmptyLogger.java +26 -0
  295. data/platform/bb/RubyVM/src/com/rho/RhoEmptyProfiler.java +26 -0
  296. data/platform/bb/RubyVM/src/com/rho/RhoLogConf.java +52 -1
  297. data/platform/bb/RubyVM/src/com/rho/RhoLogFileSink.java +26 -0
  298. data/platform/bb/RubyVM/src/com/rho/RhoLogOutputSink.java +26 -0
  299. data/platform/bb/RubyVM/src/com/rho/RhoLogger.java +111 -2
  300. data/platform/bb/RubyVM/src/com/rho/RhoParamArray.java +26 -0
  301. data/platform/bb/RubyVM/src/com/rho/RhoParams.java +26 -0
  302. data/platform/bb/RubyVM/src/com/rho/RhoProfiler.java +26 -0
  303. data/platform/bb/RubyVM/src/com/rho/RhoRuby.java +26 -0
  304. data/platform/bb/RubyVM/src/com/rho/RhoThread.java +26 -0
  305. data/platform/bb/RubyVM/src/com/rho/RhoTimer.java +26 -0
  306. data/platform/bb/RubyVM/src/com/rho/RhodesApp.java +32 -3
  307. data/platform/bb/RubyVM/src/com/rho/SplashScreen.java +26 -0
  308. data/platform/bb/RubyVM/src/com/rho/Sprintf.java +26 -0
  309. data/platform/bb/RubyVM/src/com/rho/StringScanner.java +26 -0
  310. data/platform/bb/RubyVM/src/com/rho/TestProfiler.java +26 -0
  311. data/platform/bb/RubyVM/src/com/rho/TestRhoLog.java +26 -0
  312. data/platform/bb/RubyVM/src/com/rho/ThreadQueue.java +26 -0
  313. data/platform/bb/RubyVM/src/com/rho/TimeInterval.java +26 -0
  314. data/platform/bb/RubyVM/src/com/rho/Tokenizer.java +26 -0
  315. data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +32 -0
  316. data/platform/bb/RubyVM/src/com/rho/db/DBAttrManager.java +26 -0
  317. data/platform/bb/RubyVM/src/com/rho/db/DBException.java +26 -0
  318. data/platform/bb/RubyVM/src/com/rho/db/IDBCallback.java +26 -0
  319. data/platform/bb/RubyVM/src/com/rho/db/IDBResult.java +26 -0
  320. data/platform/bb/RubyVM/src/com/rho/db/IDBStorage.java +26 -0
  321. data/platform/bb/RubyVM/src/com/rho/file/FileAccessBB.java +26 -0
  322. data/platform/bb/RubyVM/src/com/rho/file/IFile.java +26 -0
  323. data/platform/bb/RubyVM/src/com/rho/file/IFileAccess.java +26 -0
  324. data/platform/bb/RubyVM/src/com/rho/file/IRAFile.java +26 -0
  325. data/platform/bb/RubyVM/src/com/rho/file/RandomAccessFile.java +26 -0
  326. data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +26 -0
  327. data/platform/bb/RubyVM/src/com/rho/file/SimpleFile.java +26 -0
  328. data/platform/bb/RubyVM/src/com/rho/net/AsyncHttp.java +26 -0
  329. data/platform/bb/RubyVM/src/com/rho/net/IHttpConnection.java +26 -0
  330. data/platform/bb/RubyVM/src/com/rho/net/NetRequest.java +295 -230
  331. data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +29 -16
  332. data/platform/bb/RubyVM/src/com/rho/rjson/RJSONTokener.java +26 -0
  333. data/platform/bb/RubyVM/src/com/rho/sync/ISyncProtocol.java +26 -0
  334. data/platform/bb/RubyVM/src/com/rho/sync/ISyncStatusListener.java +26 -0
  335. data/platform/bb/RubyVM/src/com/rho/sync/JSONArrayIterator.java +26 -0
  336. data/platform/bb/RubyVM/src/com/rho/sync/JSONEntry.java +26 -0
  337. data/platform/bb/RubyVM/src/com/rho/sync/JSONStructIterator.java +26 -0
  338. data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +26 -19
  339. data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +26 -0
  340. data/platform/bb/RubyVM/src/com/rho/sync/SyncProtocol_3.java +31 -5
  341. data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +49 -37
  342. data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +40 -18
  343. data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyDir.java +2 -1
  344. data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyIOFileExecutor.java +7 -2
  345. data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyTime.java +43 -13
  346. data/platform/bb/RubyVM/src/j2me/lang/ArrayMe.java +26 -0
  347. data/platform/bb/RubyVM/src/j2me/lang/AssertMe.java +26 -0
  348. data/platform/bb/RubyVM/src/j2me/lang/CalendarMe.java +28 -1
  349. data/platform/bb/RubyVM/src/j2me/lang/CharacterDataLatin1.java +26 -0
  350. data/platform/bb/RubyVM/src/j2me/lang/CharacterMe.java +26 -0
  351. data/platform/bb/RubyVM/src/j2me/lang/Convert.java +26 -0
  352. data/platform/bb/RubyVM/src/j2me/lang/MathEx.java +26 -0
  353. data/platform/bb/RubyVM/src/j2me/lang/PrintStreamMe.java +26 -0
  354. data/platform/bb/RubyVM/src/j2me/lang/StringBufferMe.java +26 -0
  355. data/platform/bb/RubyVM/src/j2me/lang/StringMe.java +26 -0
  356. data/platform/bb/RubyVM/src/j2me/lang/SystemMe.java +26 -0
  357. data/platform/bb/RubyVM/src/j2me/lang/TimeZoneMe.java +26 -0
  358. data/platform/bb/RubyVM/src/j2me/math/HugeDigit.java +26 -0
  359. data/platform/bb/RubyVM/src/j2me/math/HugeInt.java +26 -0
  360. data/platform/bb/RubyVM/src/j2me/math/HugeIntHelper.java +26 -0
  361. data/platform/bb/RubyVM/src/j2me/math/Number.java +26 -0
  362. data/platform/bb/RubyVM/src/j2me/nio/channels/FileChannel.java +26 -0
  363. data/platform/bb/RubyVM/src/j2me/nio/channels/Pipe.java +26 -0
  364. data/platform/bb/RubyVM/src/j2me/util/WeakHashMap.java +26 -0
  365. data/platform/bb/RubyVM/src/j2me/util/concurrent/ConcurrentHashMap.java +26 -0
  366. data/platform/bb/RubyVM/src/j2me/util/concurrent/locks/ReentrantLock.java +26 -0
  367. data/platform/bb/build/bb.rake +45 -6
  368. data/platform/bb/rhodes/platform/4.2.0/com/rho/BBVersionSpecific.java +26 -0
  369. data/platform/bb/rhodes/platform/4.2.1/com/rho/BBVersionSpecific.java +26 -0
  370. data/platform/bb/rhodes/platform/4.2.2/com/rho/BBVersionSpecific.java +26 -0
  371. data/platform/bb/rhodes/platform/4.2/com/rho/BBVersionSpecific.java +26 -0
  372. data/platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java +26 -0
  373. data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +26 -0
  374. data/platform/bb/rhodes/platform/5.0/com/rho/RhodesApplicationPlatform.java +26 -0
  375. data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteCopyResult.java +26 -0
  376. data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteResult.java +26 -0
  377. data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteStorage.java +26 -0
  378. data/platform/bb/rhodes/platform/common/com/rho/BBVersionSpecific.java +26 -0
  379. data/platform/bb/rhodes/platform/common/com/rho/BrowserAdapter5.java +26 -0
  380. data/platform/bb/rhodes/platform/common/com/rho/RhoMainScreen.java +26 -0
  381. data/platform/bb/rhodes/platform/common/com/rho/RhodesApplicationPlatform.java +26 -0
  382. data/platform/bb/rhodes/platform/common/com/rho/db/SqliteCopyResult.java +26 -0
  383. data/platform/bb/rhodes/platform/common/com/rho/db/SqliteResult.java +26 -0
  384. data/platform/bb/rhodes/platform/common/com/rho/db/SqliteStorage.java +26 -0
  385. data/platform/bb/rhodes/src/com/rho/BBVersionSpecific.java +26 -0
  386. data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +26 -0
  387. data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +26 -0
  388. data/platform/bb/rhodes/src/com/rho/IBrowserAdapter.java +26 -0
  389. data/platform/bb/rhodes/src/com/rho/RhoMainScreen.java +26 -0
  390. data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +45 -1
  391. data/platform/bb/rhodes/src/com/rho/RhodesApplicationPlatform.java +26 -0
  392. data/platform/bb/rhodes/src/com/rho/Version.java +26 -0
  393. data/platform/bb/rhodes/src/com/rho/db/SqliteCopyResult.java +26 -0
  394. data/platform/bb/rhodes/src/com/rho/db/SqliteResult.java +26 -0
  395. data/platform/bb/rhodes/src/com/rho/db/SqliteStorage.java +26 -0
  396. data/platform/bb/rhodes/src/com/rho/file/Jsr75File.java +26 -0
  397. data/platform/bb/rhodes/src/com/rho/file/Jsr75RAFileImpl.java +28 -2
  398. data/platform/bb/rhodes/src/com/rho/file/PersistRAFileImpl.java +29 -2
  399. data/platform/bb/rhodes/src/com/rho/net/BaseSocket.java +26 -0
  400. data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +26 -0
  401. data/platform/bb/rhodes/src/com/rho/net/SSLSocket.java +26 -0
  402. data/platform/bb/rhodes/src/com/rho/net/TCPSocket.java +26 -0
  403. data/platform/bb/rhodes/src/com/rho/net/bb/BBHttpConnection.java +26 -0
  404. data/platform/bb/rhodes/src/com/rho/net/bb/NativeBBHttpConnection.java +26 -0
  405. data/platform/bb/rhodes/src/com/rho/rubyext/Alert.java +26 -0
  406. data/platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java +26 -0
  407. data/platform/bb/rhodes/src/com/rho/rubyext/RhoCalendar.java +26 -0
  408. data/platform/bb/rhodes/src/com/rho/rubyext/RhoPhonebook.java +26 -0
  409. data/platform/bb/rhodes/src/com/rho/rubyext/System.java +27 -1
  410. data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +59 -0
  411. data/platform/bb/rhodes/src/com/rho/rubyext/XMLParser.java +26 -0
  412. data/platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java +26 -0
  413. data/platform/bb/rhodes/src/rhomobile/LogScreen.java +26 -0
  414. data/platform/bb/rhodes/src/rhomobile/NativeBar.java +26 -0
  415. data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +27 -1
  416. data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +26 -0
  417. data/platform/bb/rhodes/src/rhomobile/RingtoneManager.java +26 -0
  418. data/platform/bb/rhodes/src/rhomobile/SecondaryResourceFetchThread.java +26 -0
  419. data/platform/bb/rhodes/src/rhomobile/Utilities.java +26 -0
  420. data/platform/bb/rhodes/src/rhomobile/bluetooth/BluetoothManager.java +26 -0
  421. data/platform/bb/rhodes/src/rhomobile/bluetooth/BluetoothPort.java +26 -0
  422. data/platform/bb/rhodes/src/rhomobile/bluetooth/BluetoothScreen.java +26 -0
  423. data/platform/bb/rhodes/src/rhomobile/camera/Camera.java +26 -0
  424. data/platform/bb/rhodes/src/rhomobile/camera/CameraFilesListener.java +26 -0
  425. data/platform/bb/rhodes/src/rhomobile/camera/CameraScreen.java +26 -0
  426. data/platform/bb/rhodes/src/rhomobile/camera/ImageBrowserScreen.java +26 -0
  427. data/platform/bb/rhodes/src/rhomobile/datetime/DateTimePicker.java +26 -0
  428. data/platform/bb/rhodes/src/rhomobile/datetime/DateTimeScreen.java +26 -0
  429. data/platform/bb/rhodes/src/rhomobile/mapview/Annotation.java +26 -0
  430. data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapField.java +736 -695
  431. data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapProvider.java +40 -14
  432. data/platform/bb/rhodes/src/rhomobile/mapview/GeoCoding.java +39 -13
  433. data/platform/bb/rhodes/src/rhomobile/mapview/GoogleGeoCoding.java +216 -174
  434. data/platform/bb/rhodes/src/rhomobile/mapview/GoogleMapField.java +87 -45
  435. data/platform/bb/rhodes/src/rhomobile/mapview/GoogleMapProvider.java +26 -0
  436. data/platform/bb/rhodes/src/rhomobile/mapview/MapProvider.java +26 -0
  437. data/platform/bb/rhodes/src/rhomobile/mapview/MapTools.java +105 -79
  438. data/platform/bb/rhodes/src/rhomobile/mapview/MapView.java +26 -0
  439. data/platform/bb/rhodes/src/rhomobile/mapview/MapViewParent.java +26 -0
  440. data/platform/bb/rhodes/src/rhomobile/mapview/MapViewScreen.java +26 -0
  441. data/platform/bb/rhodes/src/rhomobile/mapview/RhoMapField.java +26 -0
  442. data/platform/iphone/Classes/AppManager/AppLoader.h +25 -7
  443. data/platform/iphone/Classes/AppManager/AppLoader.m +26 -7
  444. data/platform/iphone/Classes/AppManager/AppManager.h +25 -7
  445. data/platform/iphone/Classes/AppManager/AppManager.m +26 -8
  446. data/platform/iphone/Classes/AppManager/AppManagerI.h +25 -8
  447. data/platform/iphone/Classes/Bluetooth/Bluetooth.h +39 -10
  448. data/platform/iphone/Classes/Bluetooth/Bluetooth.m +158 -28
  449. data/platform/iphone/Classes/Camera/PickImageDelegate.h +72 -9
  450. data/platform/iphone/Classes/Camera/PickImageDelegate.m +432 -15
  451. data/platform/iphone/Classes/DateTime.h +25 -7
  452. data/platform/iphone/Classes/DateTime.m +25 -7
  453. data/platform/iphone/Classes/DateTimePicker.m +25 -7
  454. data/platform/iphone/Classes/DateTimePickerDelegate.h +25 -7
  455. data/platform/iphone/Classes/DateTimePickerDelegate.m +25 -7
  456. data/platform/iphone/Classes/Dispatcher/Dispatcher.c +26 -8
  457. data/platform/iphone/Classes/Dispatcher/Dispatcher.h +25 -8
  458. data/platform/iphone/Classes/Event/Event.h +25 -7
  459. data/platform/iphone/Classes/GeoLocation/LocationController.h +25 -7
  460. data/platform/iphone/Classes/LogOptionsController.h +25 -7
  461. data/platform/iphone/Classes/LogOptionsController.m +25 -7
  462. data/platform/iphone/Classes/LogViewController.h +25 -7
  463. data/platform/iphone/Classes/LogViewController.m +27 -9
  464. data/platform/iphone/Classes/MapView/GoogleGeocoder.h +26 -0
  465. data/platform/iphone/Classes/MapView/GoogleGeocoder.m +26 -0
  466. data/platform/iphone/Classes/MapView/MapAnnotation.h +26 -6
  467. data/platform/iphone/Classes/MapView/MapAnnotation.m +25 -6
  468. data/platform/iphone/Classes/MapView/MapViewController.h +27 -8
  469. data/platform/iphone/Classes/MapView/MapViewController.m +26 -6
  470. data/platform/iphone/Classes/MapView/MapViewManager.h +26 -4
  471. data/platform/iphone/Classes/MapView/MapViewManager.m +25 -5
  472. data/platform/iphone/Classes/NativeBar.h +25 -7
  473. data/platform/iphone/Classes/NativeBar.m +54 -39
  474. data/platform/iphone/Classes/NativeView/NVDelegate.h +25 -7
  475. data/platform/iphone/Classes/NativeView/NVDelegate.m +25 -7
  476. data/platform/iphone/Classes/NativeView/NVViewController.h +25 -7
  477. data/platform/iphone/Classes/NativeView/NVViewController.m +25 -7
  478. data/platform/iphone/Classes/NativeView/RhoNativeViewManager.mm +27 -10
  479. data/platform/iphone/Classes/NativeView/RhoNativeViewManagerOC.h +25 -7
  480. data/platform/iphone/Classes/NavBar.h +25 -7
  481. data/platform/iphone/Classes/NavBar.m +25 -7
  482. data/platform/iphone/Classes/Phonebook/phonebook.h +26 -8
  483. data/platform/iphone/Classes/Phonebook/phonebook.m +25 -8
  484. data/platform/iphone/Classes/RhoAlert.h +25 -7
  485. data/platform/iphone/Classes/RhoAlert.m +27 -9
  486. data/platform/iphone/Classes/RhoDelegate.h +25 -7
  487. data/platform/iphone/Classes/RhoDelegate.m +25 -7
  488. data/platform/iphone/Classes/RhoMainView.h +26 -8
  489. data/platform/iphone/Classes/RhoViewController.h +25 -7
  490. data/platform/iphone/Classes/RhoViewController.m +25 -7
  491. data/platform/iphone/Classes/Rhodes.h +25 -8
  492. data/platform/iphone/Classes/Rhodes.m +50 -6
  493. data/platform/iphone/Classes/RingtoneManager.h +25 -7
  494. data/platform/iphone/Classes/RingtoneManager.m +25 -7
  495. data/platform/iphone/Classes/Signature/SignatureDelegate.h +25 -7
  496. data/platform/iphone/Classes/Signature/SignatureDelegate.m +25 -7
  497. data/platform/iphone/Classes/Signature/SignatureView.h +25 -7
  498. data/platform/iphone/Classes/Signature/SignatureView.m +25 -15
  499. data/platform/iphone/Classes/Signature/SignatureViewController.h +25 -7
  500. data/platform/iphone/Classes/Signature/SignatureViewController.m +25 -7
  501. data/platform/iphone/Classes/SimpleMainView.h +25 -7
  502. data/platform/iphone/Classes/SimpleMainView.m +31 -7
  503. data/platform/iphone/Classes/SplashViewController.h +25 -7
  504. data/platform/iphone/Classes/SplashViewController.m +25 -7
  505. data/platform/iphone/Classes/SplitView/LeftViewController.h +25 -7
  506. data/platform/iphone/Classes/SplitView/LeftViewController.m +25 -7
  507. data/platform/iphone/Classes/SplitView/RightViewController.h +25 -7
  508. data/platform/iphone/Classes/SplitView/RightViewController.m +25 -7
  509. data/platform/iphone/Classes/SplitView/SplitViewDelegate.h +25 -7
  510. data/platform/iphone/Classes/SplitView/SplitViewDelegate.m +25 -7
  511. data/platform/iphone/Classes/SplitView/SplittedMainView.h +25 -7
  512. data/platform/iphone/Classes/SplitView/SplittedMainView.m +29 -7
  513. data/platform/iphone/Classes/TabbedMainView.h +25 -7
  514. data/platform/iphone/Classes/TabbedMainView.m +42 -20
  515. data/platform/iphone/Classes/Utils/ParamsWrapper.h +25 -7
  516. data/platform/iphone/Classes/Utils/ParamsWrapper.m +25 -7
  517. data/platform/iphone/Classes/WebView.m +25 -7
  518. data/platform/iphone/Classes/rho/common/SplashScreenImpl.cpp +25 -8
  519. data/platform/iphone/Classes/rho/common/SplashScreenImpl.h +25 -8
  520. data/platform/iphone/Classes/rho/net/NetRequestImpl.m +26 -19
  521. data/platform/iphone/Info.plist +1 -1
  522. data/platform/iphone/Tests/Classes/TestsAppDelegate.h +25 -7
  523. data/platform/iphone/Tests/Classes/TestsAppDelegate.m +25 -7
  524. data/platform/iphone/main.m +25 -7
  525. data/platform/iphone/rbuild/findRhodesGuid.rb +26 -0
  526. data/platform/iphone/rbuild/iphone.rake +42 -6
  527. data/platform/iphone/rhoextlib/dosyscall.c +26 -0
  528. data/platform/iphone/rhoextlib/syscall.c +26 -0
  529. data/platform/iphone/rhoextlib/syscall.h +26 -7
  530. data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +2 -0
  531. data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +8 -8
  532. data/platform/linux/Rakefile +26 -0
  533. data/platform/linux/tasks/linux.rake +26 -0
  534. data/platform/osx/Rhodes Debugger/DataSource.h +26 -0
  535. data/platform/osx/Rhodes Debugger/DebugConnection.h +25 -4
  536. data/platform/osx/Rhodes Debugger/DebuggerController.h +26 -0
  537. data/platform/osx/Rhodes Debugger/FileSystemItem.h +26 -0
  538. data/platform/osx/Rhodes Debugger/GdbConnection.h +25 -7
  539. data/platform/osx/Rhodes Debugger/LogController.h +25 -3
  540. data/platform/osx/Rhodes Debugger/TcpConnection.h +25 -4
  541. data/platform/osx/Rhodes Launcher/RhodesController.h +25 -7
  542. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
  543. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib/classes.nib +59 -0
  544. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib/info.nib +18 -0
  545. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib/keyedobjects.nib +0 -0
  546. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
  547. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
  548. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -0
  549. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/phonon.framework/Versions/4/phonon +0 -0
  550. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +20 -0
  551. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
  552. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PkgInfo +1 -0
  553. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
  554. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
  555. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
  556. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
  557. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
  558. data/platform/{symbian/build/rhologpath.txt → osx/bin/RhoSimulator/RhoSimulator.app/Contents/Resources/empty.lproj} +0 -0
  559. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Resources/qt.conf +2 -0
  560. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Resources/rho.icns +0 -0
  561. data/platform/osx/build/osx.rake +88 -0
  562. data/platform/shared/{SyncClient/SyncClient.cpp → RhoConnectClient/RhoConnectClient.cpp} +78 -52
  563. data/platform/shared/RhoConnectClient/RhoConnectClient.h +121 -0
  564. data/platform/shared/RhoConnectClient/RhoError.h +55 -0
  565. data/platform/shared/common/AppMenu.cpp +26 -0
  566. data/platform/shared/common/AppMenu.h +26 -0
  567. data/platform/shared/common/AutoPointer.h +26 -0
  568. data/platform/shared/common/IRhoBrowser.h +26 -0
  569. data/platform/shared/common/IRhoClassFactory.h +26 -0
  570. data/platform/shared/common/IRhoCrypt.h +26 -0
  571. data/platform/shared/common/IRhoThreadImpl.h +26 -0
  572. data/platform/shared/common/InputStream.h +26 -0
  573. data/platform/shared/common/PosixThreadImpl.cpp +31 -0
  574. data/platform/shared/common/PosixThreadImpl.h +26 -0
  575. data/platform/shared/common/RhoAppAdapter.h +26 -0
  576. data/platform/shared/common/RhoConf.cpp +28 -2
  577. data/platform/shared/common/RhoConf.h +32 -1
  578. data/platform/shared/common/RhoDefs.h +32 -0
  579. data/platform/shared/common/RhoFatalError.h +27 -1
  580. data/platform/shared/common/RhoFile.cpp +30 -4
  581. data/platform/shared/common/RhoFile.h +26 -0
  582. data/platform/shared/common/RhoFilePath.h +26 -0
  583. data/platform/shared/common/RhoMath.cpp +26 -0
  584. data/platform/shared/common/RhoMath.h +26 -0
  585. data/platform/shared/common/RhoMutexLock.h +39 -3
  586. data/platform/shared/common/RhoNativeViewManager.h +26 -0
  587. data/platform/shared/common/RhoPort.h +55 -17
  588. data/platform/shared/common/RhoSimConf.cpp +58 -0
  589. data/platform/shared/common/RhoSimConf.h +62 -0
  590. data/platform/shared/common/RhoStd.h +26 -0
  591. data/platform/shared/common/RhoSystem.h +28 -2
  592. data/platform/shared/common/RhoThread.cpp +26 -0
  593. data/platform/shared/common/RhoThread.h +26 -0
  594. data/platform/shared/common/RhoTime.cpp +26 -0
  595. data/platform/shared/common/RhoTime.h +33 -4
  596. data/platform/shared/common/RhodesApp.cpp +170 -68
  597. data/platform/shared/common/RhodesApp.h +34 -6
  598. data/platform/shared/common/RhodesAppBase.cpp +77 -8
  599. data/platform/shared/common/RhodesAppBase.h +31 -4
  600. data/platform/shared/common/SplashScreen.cpp +29 -0
  601. data/platform/shared/common/SplashScreen.h +26 -0
  602. data/platform/shared/common/StringConverter.h +26 -0
  603. data/platform/shared/common/ThreadQueue.cpp +26 -0
  604. data/platform/shared/common/ThreadQueue.h +26 -0
  605. data/platform/shared/common/Tokenizer.cpp +26 -0
  606. data/platform/shared/common/Tokenizer.h +26 -0
  607. data/platform/shared/common/iphone/RhoClassFactory.cpp +26 -0
  608. data/platform/shared/common/iphone/RhoClassfactory.h +44 -4
  609. data/platform/shared/common/iphone/RhoCryptImpl.h +26 -0
  610. data/platform/shared/common/iphone/RhoCryptImpl.mm +26 -0
  611. data/platform/shared/common/iphone/RhoFileImpl.m +26 -7
  612. data/platform/shared/common/iphone/RhoThreadImpl.m +26 -7
  613. data/platform/shared/common/map/ESRIMapEngine.cpp +26 -0
  614. data/platform/shared/common/map/ESRIMapEngine.h +26 -0
  615. data/platform/shared/common/map/GoogleMapEngine.cpp +26 -0
  616. data/platform/shared/common/map/GoogleMapEngine.h +26 -0
  617. data/platform/shared/common/map/MapEngine.cpp +28 -2
  618. data/platform/shared/common/map/MapEngine.h +26 -0
  619. data/platform/shared/common/rhoparams.cpp +26 -0
  620. data/platform/shared/common/rhoparams.h +26 -0
  621. data/platform/shared/common/stat.h +26 -0
  622. data/platform/shared/curl/lib/config-symbian.h +824 -0
  623. data/platform/shared/curl/lib/hostip.c +7 -0
  624. data/platform/shared/curl/lib/http.c +6 -0
  625. data/platform/shared/curl/lib/setup_once.h +4 -0
  626. data/platform/shared/db/DBAdapter.cpp +34 -2
  627. data/platform/shared/db/DBAdapter.h +26 -0
  628. data/platform/shared/db/DBAttrManager.cpp +26 -0
  629. data/platform/shared/db/DBAttrManager.h +26 -0
  630. data/platform/shared/db/DBResult.cpp +26 -0
  631. data/platform/shared/db/DBResult.h +26 -0
  632. data/platform/shared/json/JSONIterator.cpp +26 -0
  633. data/platform/shared/json/JSONIterator.h +26 -0
  634. data/platform/shared/json/RJSONTokener.c +3 -3
  635. data/platform/shared/json/json.h +1 -1
  636. data/platform/shared/json/{debug.c → json_debug.c} +2 -2
  637. data/platform/shared/json/{debug.h → json_debug.h} +1 -1
  638. data/platform/shared/json/json_object.c +1 -1
  639. data/platform/shared/json/json_tokener.c +1 -1
  640. data/platform/shared/json/json_util.c +1 -1
  641. data/platform/shared/json/printbuf.c +1 -1
  642. data/platform/shared/logging/RhoATLTrace.h +26 -0
  643. data/platform/shared/logging/RhoLog.cpp +90 -0
  644. data/platform/shared/logging/RhoLog.h +29 -1
  645. data/platform/shared/logging/RhoLogCat.h +26 -0
  646. data/platform/shared/logging/RhoLogConf.cpp +72 -10
  647. data/platform/shared/logging/RhoLogConf.h +39 -5
  648. data/platform/shared/logging/RhoLogSink.cpp +26 -0
  649. data/platform/shared/logging/RhoLogSink.h +26 -0
  650. data/platform/shared/logging/RhoPlainLog.cpp +36 -8
  651. data/platform/shared/logging/test/TestLog.cpp +26 -0
  652. data/platform/shared/logging/test/TestPlainLog.c +26 -0
  653. data/platform/shared/logging/test/main.cpp +26 -0
  654. data/platform/shared/net/AsyncHttp.cpp +27 -0
  655. data/platform/shared/net/AsyncHttp.h +28 -1
  656. data/platform/shared/net/CURLNetRequest.cpp +81 -11
  657. data/platform/shared/net/CURLNetRequest.h +30 -0
  658. data/platform/shared/net/CompatWince.cpp +26 -0
  659. data/platform/shared/net/CompatWince.h +26 -0
  660. data/platform/shared/net/HttpServer.cpp +82 -23
  661. data/platform/shared/net/HttpServer.h +27 -1
  662. data/platform/shared/net/INetRequest.cpp +26 -0
  663. data/platform/shared/net/INetRequest.h +26 -0
  664. data/platform/shared/net/RawSocket.cpp +38 -12
  665. data/platform/shared/net/RawSocket.h +28 -2
  666. data/platform/shared/net/URI.cpp +26 -6
  667. data/platform/shared/net/URI.h +26 -2
  668. data/platform/shared/net/iphone/sslimpl.cpp +39 -10
  669. data/platform/shared/net/iphone/sslimpl.h +25 -8
  670. data/platform/shared/net/ssl.cpp +26 -0
  671. data/platform/shared/net/ssl.h +26 -0
  672. data/platform/shared/qt/RhoSimulator.pro +7 -0
  673. data/platform/shared/qt/curl/curl.pro +181 -0
  674. data/platform/shared/qt/pbxproj2pro.pl +21 -0
  675. data/platform/shared/qt/pro_vcproj_diff.pl +59 -0
  676. data/platform/shared/qt/rhodes/DateTimeDialog.cpp +91 -0
  677. data/platform/shared/qt/rhodes/DateTimeDialog.h +54 -0
  678. data/platform/shared/qt/rhodes/DateTimeDialog.ui +68 -0
  679. data/platform/shared/qt/rhodes/ExternalWebView.cpp +46 -0
  680. data/platform/shared/qt/rhodes/ExternalWebView.h +49 -0
  681. data/platform/{wm/rhodes/emulator → shared/qt/rhodes}/ExternalWebView.ui +0 -0
  682. data/platform/shared/qt/rhodes/MainWindowCallback.h +51 -0
  683. data/platform/shared/qt/rhodes/QtMainWindow.cpp +819 -0
  684. data/platform/shared/qt/rhodes/QtMainWindow.h +148 -0
  685. data/platform/{wm/rhodes/emulator → shared/qt/rhodes}/QtMainWindow.ui +13 -1
  686. data/platform/shared/qt/rhodes/QtNativeTabBar.cpp +112 -0
  687. data/platform/shared/qt/rhodes/QtNativeTabBar.h +37 -0
  688. data/platform/shared/qt/rhodes/QtWebInspector.cpp +71 -0
  689. data/platform/shared/qt/rhodes/QtWebInspector.h +53 -0
  690. data/platform/shared/qt/rhodes/QtWebInspector.ui +41 -0
  691. data/platform/shared/qt/rhodes/impl/AlertImpl.cpp +153 -0
  692. data/platform/shared/qt/rhodes/impl/AlertImpl.h +65 -0
  693. data/platform/shared/qt/rhodes/impl/BluetoothImpl.cpp +109 -0
  694. data/platform/shared/qt/rhodes/impl/CalendarImpl.cpp +52 -0
  695. data/platform/shared/qt/rhodes/impl/CameraImpl.cpp +54 -0
  696. data/platform/shared/qt/rhodes/impl/DateTimePickerImpl.cpp +61 -0
  697. data/platform/shared/qt/rhodes/impl/DateTimePickerImpl.h +70 -0
  698. data/platform/shared/qt/rhodes/impl/GeoLocationImpl.cpp +65 -0
  699. data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +727 -0
  700. data/platform/shared/qt/rhodes/impl/MainWindowImpl.h +160 -0
  701. data/platform/shared/qt/rhodes/impl/MapViewImpl.cpp +60 -0
  702. data/platform/shared/qt/rhodes/impl/NativeTabbarImpl.cpp +131 -0
  703. data/platform/shared/qt/rhodes/impl/NativeTabbarImpl.h +96 -0
  704. data/platform/shared/qt/rhodes/impl/NativeToolbarImpl.cpp +124 -0
  705. data/platform/shared/qt/rhodes/impl/NativeToolbarImpl.h +71 -0
  706. data/platform/shared/qt/rhodes/impl/PhonebookImpl.cpp +103 -0
  707. data/platform/shared/qt/rhodes/impl/RhoClassFactoryImpl.cpp +56 -0
  708. data/platform/shared/qt/rhodes/impl/RhoClassFactoryImpl.h +82 -0
  709. data/platform/shared/qt/rhodes/impl/RhoFileImpl.cpp +63 -0
  710. data/platform/shared/qt/rhodes/impl/RhoNativeViewManagerImpl.cpp +86 -0
  711. data/platform/shared/qt/rhodes/impl/RhoThreadImpl.cpp +114 -0
  712. data/platform/shared/qt/rhodes/impl/RhoThreadImpl.h +72 -0
  713. data/platform/shared/qt/rhodes/impl/RhodesImpl.cpp +193 -0
  714. data/platform/shared/qt/rhodes/impl/RingtoneManagerImpl.cpp +51 -0
  715. data/platform/shared/qt/rhodes/impl/SignatureImpl.cpp +43 -0
  716. data/platform/shared/qt/rhodes/impl/SystemImpl.cpp +229 -0
  717. data/platform/shared/qt/rhodes/impl/WebViewImpl.cpp +114 -0
  718. data/platform/shared/qt/rhodes/main.cpp +208 -0
  719. data/platform/shared/qt/rhodes/resources/rho.icns +0 -0
  720. data/platform/shared/qt/rhodes/resources/rho.ico +0 -0
  721. data/platform/shared/qt/rhodes/rhodes.pro +133 -0
  722. data/platform/shared/qt/rholib/rholib.pro +138 -0
  723. data/platform/shared/qt/rubylib/rubylib.pro +183 -0
  724. data/platform/shared/qt/sqlite3/sqlite3.pro +40 -0
  725. data/platform/shared/qt/syncengine/syncengine.pro +82 -0
  726. data/platform/shared/ruby/ext/alert/alert.i +13 -5
  727. data/platform/shared/ruby/ext/alert/alert_wrap.c +100 -11
  728. data/platform/shared/ruby/ext/asynchttp/asynchttp_wrap.c +391 -111
  729. data/platform/shared/ruby/ext/bluetooth/bluetooth.i +28 -14
  730. data/platform/shared/ruby/ext/bluetooth/bluetooth_wrap.c +311 -424
  731. data/platform/shared/ruby/ext/calendar/calendar_wrap.c +2278 -2278
  732. data/platform/shared/ruby/ext/calendar/event_wrap.c +2152 -2151
  733. data/platform/shared/ruby/ext/camera/camera.i +22 -2
  734. data/platform/shared/ruby/ext/camera/camera_wrap.c +448 -115
  735. data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +404 -126
  736. data/platform/shared/ruby/ext/geolocation/geolocation_wrap.c +17 -14
  737. data/platform/shared/ruby/ext/mapview/mapview_wrap.c +384 -104
  738. data/platform/shared/ruby/ext/nativebar/nativebar.i +0 -3
  739. data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +0 -35
  740. data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager_wrap.c +5 -5
  741. data/platform/shared/ruby/ext/navbar/navbar_wrap.c +384 -104
  742. data/platform/shared/ruby/ext/phonebook/phonebook.h +26 -0
  743. data/platform/shared/ruby/ext/phonebook/phonebook_wrap.c +422 -144
  744. data/platform/shared/ruby/ext/rho/rhoruby.c +56 -13
  745. data/platform/shared/ruby/ext/rho/rhoruby.h +30 -10
  746. data/platform/shared/ruby/ext/rho/rhosupport.c +106 -33
  747. data/platform/shared/ruby/ext/rhoconf/rhoconf.i +6 -2
  748. data/platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c +24 -8
  749. data/platform/shared/ruby/ext/ringtones/ringtones_wrap.c +389 -109
  750. data/platform/shared/ruby/ext/signature/signature.i +1 -1
  751. data/platform/shared/ruby/ext/signature/signature_wrap.c +5 -5
  752. data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +26 -0
  753. data/platform/shared/ruby/ext/syncengine/syncengine.i +4 -0
  754. data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +25 -5
  755. data/platform/shared/ruby/ext/system/system_wrap.c +3 -3
  756. data/platform/shared/ruby/ext/webview/webview.i +4 -0
  757. data/platform/shared/ruby/ext/webview/webview_wrap.c +428 -134
  758. data/platform/shared/ruby/gc.c +4 -0
  759. data/platform/shared/ruby/hash.c +3 -0
  760. data/platform/shared/ruby/include/ruby/defines.h +20 -1
  761. data/platform/shared/ruby/include/ruby/intern.h +2 -0
  762. data/platform/shared/ruby/include/ruby/ruby.h +7 -4
  763. data/platform/shared/ruby/io.c +2 -1
  764. data/platform/shared/ruby/iphone/ruby/config.h +2 -0
  765. data/platform/shared/ruby/missing/dup2.c +1 -0
  766. data/platform/shared/ruby/signal.c +5 -5
  767. data/platform/shared/ruby/symbian/assert.h +2 -2
  768. data/platform/shared/ruby/symbian/ruby/config.h +13 -3
  769. data/platform/shared/ruby/symbian/symbian.h +2 -2
  770. data/platform/shared/ruby/thread_pthread.c +1 -1
  771. data/platform/shared/ruby/win32/assert.h +27 -1
  772. data/platform/shared/rubyext/GeoLocation.cpp +26 -0
  773. data/platform/shared/rubyext/GeoLocation.h +26 -0
  774. data/platform/shared/rubyext/NativeToolbarExt.h +35 -0
  775. data/platform/shared/rubyext/RhoAppAdapter.cpp +26 -0
  776. data/platform/shared/rubyext/System.cpp +54 -1
  777. data/platform/shared/rubyext/WebView.h +26 -0
  778. data/platform/shared/sqlite/crypto.c +26 -0
  779. data/platform/shared/sqlite/sqlite3.c +9706 -4596
  780. data/platform/shared/sqlite/sqlite3.h +521 -119
  781. data/platform/shared/statistic/RhoProfiler.cpp +26 -0
  782. data/platform/shared/statistic/RhoProfiler.h +26 -0
  783. data/platform/shared/statistic/test/TestProfiling.cpp +26 -0
  784. data/platform/shared/sync/ClientRegister.cpp +29 -1
  785. data/platform/shared/sync/ClientRegister.h +26 -0
  786. data/platform/shared/sync/ISyncProtocol.h +27 -1
  787. data/platform/shared/sync/SyncEngine.cpp +26 -0
  788. data/platform/shared/sync/SyncEngine.h +27 -1
  789. data/platform/shared/sync/SyncNotify.cpp +28 -1
  790. data/platform/shared/sync/SyncNotify.h +26 -0
  791. data/platform/shared/sync/SyncProtocol_3.h +34 -6
  792. data/platform/shared/sync/SyncSource.cpp +52 -17
  793. data/platform/shared/sync/SyncSource.h +26 -0
  794. data/platform/shared/sync/SyncThread.cpp +41 -0
  795. data/platform/shared/sync/SyncThread.h +27 -2
  796. data/platform/shared/sync/Test/NetDataStub.h +26 -0
  797. data/platform/shared/sync/Test/SyncEngine_test.cpp +26 -0
  798. data/platform/shared/sync/Test/SyncSource_test.cpp +26 -0
  799. data/platform/shared/tcmalloc/rhomem.h +1 -1
  800. data/platform/shared/test/Tests.cpp +28 -2
  801. data/platform/shared/test/test_helper.cpp +26 -0
  802. data/platform/shared/test/test_helper.h +26 -0
  803. data/platform/shared/unzip/unzip.cpp +10 -4
  804. data/platform/shared/unzip/unzip.h +8 -0
  805. data/platform/shared/xruby/src/com/xruby/compiler/parser/RubyParser.java +97 -97
  806. data/platform/symbian/build/symbian.rake +202 -0
  807. data/platform/symbian/curl/curl.pro +179 -0
  808. data/platform/symbian/qtscroller/include/QtScrollEvent +5 -0
  809. data/platform/symbian/qtscroller/include/QtScrollPrepareEvent +5 -0
  810. data/platform/symbian/qtscroller/include/QtScroller +5 -0
  811. data/platform/symbian/qtscroller/include/QtScrollerProperties +5 -0
  812. data/platform/symbian/qtscroller/qtscroller.pri +13 -0
  813. data/platform/symbian/qtscroller/qtscroller.pro +3 -0
  814. data/platform/symbian/qtscroller/src/qtflickgesture.cpp +696 -0
  815. data/platform/symbian/qtscroller/src/qtflickgesture_p.h +107 -0
  816. data/platform/symbian/qtscroller/src/qtscroller.cpp +2081 -0
  817. data/platform/symbian/qtscroller/src/qtscroller.h +138 -0
  818. data/platform/symbian/qtscroller/src/qtscroller_p.h +206 -0
  819. data/platform/symbian/qtscroller/src/qtscrollerfilter.cpp +351 -0
  820. data/platform/symbian/qtscroller/src/qtscrollerfilter_p.h +111 -0
  821. data/platform/symbian/qtscroller/src/qtscrollerproperties.cpp +413 -0
  822. data/platform/symbian/qtscroller/src/qtscrollerproperties.h +135 -0
  823. data/platform/symbian/qtscroller/src/qtscrollerproperties_p.h +91 -0
  824. data/platform/symbian/qtscroller/src/qtscrollevent.cpp +191 -0
  825. data/platform/symbian/qtscroller/src/qtscrollevent.h +100 -0
  826. data/platform/symbian/qtscroller/src/qtscrollevent_p.h +33 -0
  827. data/platform/symbian/qtscroller/src/src.pro +24 -0
  828. data/platform/symbian/rhodes.pro +4 -0
  829. data/platform/symbian/rhodes.sln +72 -0
  830. data/platform/symbian/rhodes/deployment.pri +115 -0
  831. data/platform/symbian/rhodes/rhodes.pro +141 -0
  832. data/platform/symbian/rhodes/rhodes.vcproj +385 -0
  833. data/platform/symbian/rhodes/{inc → src}/ContactsConstants.h +0 -0
  834. data/platform/symbian/rhodes/src/RhoThreadImpl.cpp +19 -0
  835. data/platform/symbian/rhodes/src/phonebook/Phonebook.cpp +19 -19
  836. data/platform/symbian/rhodes/{inc → src}/phonebook/Phonebook.h +1 -1
  837. data/platform/symbian/rhodes/src/qkineticscroller.cpp +1245 -0
  838. data/platform/symbian/rhodes/src/qkineticscroller.h +165 -0
  839. data/platform/symbian/rhodes/src/qkineticscroller_p.h +168 -0
  840. data/platform/symbian/rhodes/src/qwebviewkineticscroller.cpp +347 -0
  841. data/platform/symbian/rhodes/src/qwebviewkineticscroller.h +89 -0
  842. data/platform/symbian/rhodes/src/qwebviewselectionsuppressor.h +113 -0
  843. data/platform/symbian/rhodes_win32.pro +4 -0
  844. data/platform/symbian/rholib/rholib.pro +108 -0
  845. data/platform/symbian/rholib/rholib.vcproj +1466 -0
  846. data/platform/symbian/rubylib/rubylib.pro +163 -0
  847. data/platform/symbian/rubylib/rubylib.vcproj +1166 -0
  848. data/platform/symbian/rubylib/src/symbian_stubs.c +45 -3
  849. data/platform/symbian/sqlite3/sqlite3.pro +38 -0
  850. data/platform/symbian/sqlite3/sqlite3.vcproj +254 -0
  851. data/platform/symbian/{SQLite60 → sqlite3}/src/mutex.cpp +0 -0
  852. data/platform/symbian/{SQLite60 → sqlite3}/src/os_symbian.cpp +0 -0
  853. data/platform/symbian/{SQLite60 → sqlite3}/src/os_symbian.h +0 -0
  854. data/platform/symbian/{SQLite60 → sqlite3}/src/sqlite3.c +1 -0
  855. data/platform/symbian/{SQLite60 → sqlite3}/src/sqlite3.h +0 -0
  856. data/platform/symbian/syncengine/syncengine.pro +64 -0
  857. data/platform/symbian/syncengine/syncengine.vcproj +842 -0
  858. data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
  859. data/platform/win32/replaceicon/replaceicon.cpp +25 -2
  860. data/platform/win32/replaceicon/stdafx.cpp +25 -3
  861. data/platform/win32/replaceicon/stdafx.h +25 -4
  862. data/platform/win32/updateresstring/stdafx.cpp +25 -3
  863. data/platform/win32/updateresstring/stdafx.h +25 -4
  864. data/platform/win32/updateresstring/updateresstring.cpp +25 -2
  865. data/platform/wm/RhoLib/RhoLib.vcproj +38 -8
  866. data/platform/wm/build/wm.rake +92 -76
  867. data/platform/wm/rhodes.sln +139 -139
  868. data/platform/wm/rhodes/Alert.cpp +31 -5
  869. data/platform/wm/rhodes/Alert.h +27 -1
  870. data/platform/wm/rhodes/AppManager.cpp +26 -0
  871. data/platform/wm/rhodes/AppManager.h +26 -0
  872. data/platform/wm/rhodes/DateTimePicker.cpp +26 -0
  873. data/platform/wm/rhodes/DateTimePicker.h +30 -0
  874. data/platform/wm/rhodes/LogOptionsDlg.cpp +26 -0
  875. data/platform/wm/rhodes/LogOptionsDlg.h +26 -0
  876. data/platform/wm/rhodes/LogView.cpp +26 -2
  877. data/platform/wm/rhodes/LogView.h +25 -1
  878. data/platform/wm/rhodes/Macros.h +25 -1
  879. data/platform/wm/rhodes/MainWindow.cpp +37 -2
  880. data/platform/wm/rhodes/MainWindow.h +29 -2
  881. data/platform/wm/rhodes/MapView/Graphics.cpp +25 -1
  882. data/platform/wm/rhodes/MapView/Graphics.h +26 -0
  883. data/platform/wm/rhodes/MapView/MapViewManager.cpp +26 -0
  884. data/platform/wm/rhodes/MapView/MapViewManager.h +25 -0
  885. data/platform/wm/rhodes/MetaHandler.cpp +26 -0
  886. data/platform/wm/rhodes/MetaHandler.h +26 -0
  887. data/platform/wm/rhodes/OkCancelModalDialog.h +26 -0
  888. data/platform/wm/rhodes/OutlookApp.cpp +26 -0
  889. data/platform/wm/rhodes/OutlookApp.h +26 -0
  890. data/platform/wm/rhodes/RhoNativeViewManager.cpp +26 -0
  891. data/platform/wm/rhodes/RhoNativeViewManagerWM.h +25 -8
  892. data/platform/wm/rhodes/Rhodes.cpp +127 -24
  893. data/platform/wm/rhodes/RingtoneManager.cpp +26 -0
  894. data/platform/wm/rhodes/RingtoneManager.h +26 -0
  895. data/platform/wm/rhodes/SyncStatusDlg.cpp +26 -0
  896. data/platform/wm/rhodes/SyncStatusDlg.h +26 -0
  897. data/platform/wm/rhodes/Utils.cpp +26 -0
  898. data/platform/wm/rhodes/Utils.h +26 -0
  899. data/platform/wm/rhodes/Vibrate.cpp +30 -9
  900. data/platform/wm/rhodes/Vibrate.h +27 -2
  901. data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +63 -4
  902. data/platform/wm/rhodes/bluetooth/Bluetooth.h +32 -1
  903. data/platform/wm/rhodes/camera/Camera.cpp +40 -6
  904. data/platform/wm/rhodes/camera/Camera.h +32 -1
  905. data/platform/wm/rhodes/memory_helper.cpp +26 -0
  906. data/platform/wm/rhodes/menubar.cpp +26 -0
  907. data/platform/wm/rhodes/menubar.h +26 -0
  908. data/platform/wm/rhodes/phonebook/NativeAddressBook.cpp +26 -0
  909. data/platform/wm/rhodes/phonebook/NativeAddressBook.h +26 -0
  910. data/platform/wm/rhodes/phonebook/phonebook.cpp +26 -8
  911. data/platform/wm/rhodes/phonebook/phonebook.h +26 -8
  912. data/platform/wm/rhodes/resource.h +1 -0
  913. data/platform/wm/rhodes/rho/common/RhoClassFactory.cpp +26 -0
  914. data/platform/wm/rhodes/rho/common/RhoClassFactory.h +26 -0
  915. data/platform/wm/rhodes/rho/common/RhoCryptImpl.cpp +26 -0
  916. data/platform/wm/rhodes/rho/common/RhoCryptImpl.h +26 -0
  917. data/platform/wm/rhodes/rho/common/RhoThreadImpl.cpp +26 -0
  918. data/platform/wm/rhodes/rho/common/RhoThreadImpl.h +26 -0
  919. data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +30 -1
  920. data/platform/wm/rhodes/rho/net/NetRequestImpl.h +29 -0
  921. data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.cpp +26 -0
  922. data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.h +26 -0
  923. data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +27 -1
  924. data/platform/wm/rhodes/rho/rubyext/NativeToolbar.h +26 -0
  925. data/platform/wm/rhodes/rho/rubyext/NativeToolbarExt.cpp +71 -7
  926. data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +36 -4
  927. data/platform/wm/rhodes/rho/rubyext/WebView.cpp +48 -2
  928. data/platform/wm/rhodes/rho/rubyext/calendar.cpp +26 -0
  929. data/platform/wm/rhodes/rhodes.vcproj +2491 -579
  930. data/platform/wm/rhodes/signature/Signature.cpp +26 -0
  931. data/platform/wm/rhodes/signature/Signature.h +26 -0
  932. data/platform/wm/rhodes/simulator/MainWindowQt.cpp +852 -0
  933. data/platform/wm/rhodes/{emulator → simulator}/MainWindowQt.h +76 -11
  934. data/platform/wm/rhodes/simulator/NativeTabbarQt.cpp +91 -0
  935. data/platform/wm/rhodes/simulator/NativeTabbarQt.h +102 -0
  936. data/platform/wm/rhodes/simulator/NativeToolbarQt.cpp +82 -0
  937. data/platform/wm/rhodes/simulator/NativeToolbarQt.h +78 -0
  938. data/platform/wm/rhodes/stdafx.cpp +25 -16
  939. data/platform/wm/rhodes/stdafx.h +26 -4
  940. data/platform/wm/rubylib/rubylib.vcproj +94 -78
  941. data/platform/wm/sqlite3/sqlite3.vcproj +8 -8
  942. data/platform/wm/syncengine/syncengine.vcproj +33 -11
  943. data/platform/wm/tools/detool/LogServer.cpp +33 -3
  944. data/platform/wm/tools/detool/LogServer.h +29 -1
  945. data/platform/wm/tools/detool/detool.cpp +105 -14
  946. data/platform/wm/tools/detool/detool.h +26 -0
  947. data/platform/wm/tools/detool/detool.vcproj +243 -242
  948. data/platform/wm/tools/detool/stdafx.cpp +25 -3
  949. data/platform/wm/tools/detool/stdafx.h +26 -0
  950. data/platform/wm/tools/detool/targetver.h +26 -0
  951. data/platform/wm/tools/rhosetup/rhosetup.cpp +25 -2
  952. data/platform/wm/tools/rhosetup/stdafx.cpp +25 -3
  953. data/platform/wm/tools/rhosetup/stdafx.h +25 -4
  954. data/platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.Libraries.dll +0 -0
  955. data/platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.dll +0 -0
  956. data/platform/wp7/RhoAppRunner/Program.cs +27 -1
  957. data/platform/wp7/RhoLogServer/Program.cs +27 -1
  958. data/platform/wp7/RhoLogServer/SocketServer.cs +27 -1
  959. data/platform/wp7/RhoRubyExtGen/RhoAsyncHttp.cs +27 -1
  960. data/platform/wp7/RhoRubyExtGen/RhoConfig.cs +84 -0
  961. data/platform/wp7/RhoRubyExtGen/RhoDatabase.cs +27 -1
  962. data/platform/wp7/RhoRubyExtGen/RhoJSON.cs +26 -0
  963. data/platform/wp7/RhoRubyExtGen/RhoNativeBar.cs +35 -3
  964. data/platform/wp7/RhoRubyExtGen/RhoRubyExtGen.csproj +2 -0
  965. data/platform/wp7/RhoRubyExtGen/RhoSyncEngine.cs +34 -2
  966. data/platform/wp7/RhoRubyExtGen/RhoSystem.cs +144 -0
  967. data/platform/wp7/RhoRubyExtGen/RhoWebView.cs +33 -2
  968. data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +149 -5
  969. data/platform/wp7/RhoRubyLib/RhoAppAdapter.cs +27 -1
  970. data/platform/wp7/RhoRubyLib/RhoRuby.cs +27 -1
  971. data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +24 -1
  972. data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +26 -15
  973. data/platform/wp7/RhoRubyLib/common/IInputStream.cs +27 -1
  974. data/platform/wp7/RhoRubyLib/common/Mutex.cs +27 -1
  975. data/platform/wp7/RhoRubyLib/common/RhoConf.cs +27 -1
  976. data/platform/wp7/RhoRubyLib/common/RhoEmptyProfiler.cs +27 -1
  977. data/platform/wp7/RhoRubyLib/common/RhoFile.cs +27 -1
  978. data/platform/wp7/RhoRubyLib/common/RhoFilePath.cs +27 -1
  979. data/platform/wp7/RhoRubyLib/common/RhoParamArray.cs +27 -1
  980. data/platform/wp7/RhoRubyLib/common/RhoParams.cs +27 -1
  981. data/platform/wp7/RhoRubyLib/common/RhoProfiler.cs +27 -1
  982. data/platform/wp7/RhoRubyLib/common/RhoResourceMap.cs +27 -1
  983. data/platform/wp7/RhoRubyLib/common/RhoStd.cs +27 -1
  984. data/platform/wp7/RhoRubyLib/common/RhoThread.cs +27 -1
  985. data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +232 -16
  986. data/platform/wp7/RhoRubyLib/common/ThreadQueue.cs +27 -1
  987. data/platform/wp7/RhoRubyLib/common/TimeInterval.cs +27 -1
  988. data/platform/wp7/RhoRubyLib/common/Tokenizer.cs +27 -1
  989. data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +33 -1
  990. data/platform/wp7/RhoRubyLib/db/DBAttrManager.cs +27 -1
  991. data/platform/wp7/RhoRubyLib/db/DBCommand.cs +428 -0
  992. data/platform/wp7/RhoRubyLib/db/DBException.cs +27 -1
  993. data/platform/wp7/RhoRubyLib/db/IDBCallback.cs +27 -1
  994. data/platform/wp7/RhoRubyLib/db/IDBResult.cs +27 -1
  995. data/platform/wp7/RhoRubyLib/db/IDBStorage.cs +27 -1
  996. data/platform/wp7/RhoRubyLib/db/SqliteCopyResult.cs +27 -1
  997. data/platform/wp7/RhoRubyLib/db/SqliteResult.cs +27 -1
  998. data/platform/wp7/RhoRubyLib/db/SqliteStorage.cs +27 -1
  999. data/platform/wp7/RhoRubyLib/json/JSONArrayIterator.cs +27 -1
  1000. data/platform/wp7/RhoRubyLib/json/JSONEntry.cs +27 -1
  1001. data/platform/wp7/RhoRubyLib/json/JSONStructIterator.cs +27 -1
  1002. data/platform/wp7/RhoRubyLib/json/JsonParser.cs +26 -0
  1003. data/platform/wp7/RhoRubyLib/json/RJSONTokener.cs +26 -0
  1004. data/platform/wp7/RhoRubyLib/logging/IRhoLogSink.cs +27 -1
  1005. data/platform/wp7/RhoRubyLib/logging/RhoEmptyLogger.cs +26 -0
  1006. data/platform/wp7/RhoRubyLib/logging/RhoLogConf.cs +27 -1
  1007. data/platform/wp7/RhoRubyLib/logging/RhoLogFileSink.cs +27 -1
  1008. data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +27 -1
  1009. data/platform/wp7/RhoRubyLib/logging/RhoLogger.cs +27 -1
  1010. data/platform/wp7/RhoRubyLib/net/AsyncHttp.cs +27 -1
  1011. data/platform/wp7/RhoRubyLib/net/HttpServer.cs +28 -2
  1012. data/platform/wp7/RhoRubyLib/net/NetRequest.cs +28 -2
  1013. data/platform/wp7/RhoRubyLib/net/NetResponse.cs +27 -1
  1014. data/platform/wp7/RhoRubyLib/net/URI.cs +27 -1
  1015. data/platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs +27 -1
  1016. data/platform/wp7/RhoRubyLib/rubyext/RhoConfig.cs +188 -0
  1017. data/platform/wp7/RhoRubyLib/rubyext/RhoDatabase.cs +27 -1
  1018. data/platform/wp7/RhoRubyLib/rubyext/RhoJSON.cs +26 -0
  1019. data/platform/wp7/RhoRubyLib/rubyext/RhoKernelOps.cs +27 -1
  1020. data/platform/wp7/RhoRubyLib/rubyext/RhoNativeBar.cs +130 -6
  1021. data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +42 -2
  1022. data/platform/wp7/RhoRubyLib/rubyext/RhoSystem.cs +153 -0
  1023. data/platform/wp7/RhoRubyLib/rubyext/RhoWebView.cs +49 -4
  1024. data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +17 -17
  1025. data/platform/wp7/RhoRubyLib/views/RhoTabHeader.xaml +18 -0
  1026. data/platform/wp7/RhoRubyLib/views/RhoTabHeader.xaml.cs +56 -0
  1027. data/platform/wp7/RhoRubyLib/views/RhoView.xaml +16 -0
  1028. data/platform/wp7/RhoRubyLib/views/RhoView.xaml.cs +153 -0
  1029. data/platform/wp7/build/wp.rake +31 -0
  1030. data/platform/wp7/rhodes/App.xaml.cs +28 -2
  1031. data/platform/wp7/rhodes/MainPage.xaml +4 -3
  1032. data/platform/wp7/rhodes/MainPage.xaml.cs +50 -11
  1033. data/platform/wp7/sqlite3/SQLiteClient.cs +27 -1
  1034. data/rakefile.rb +200 -18
  1035. data/res/build-tools/detool.exe +0 -0
  1036. data/res/generators/rhogen.rb +2 -1
  1037. data/res/generators/templates/application/app/Settings/home.bb.erb +14 -13
  1038. data/res/generators/templates/application/app/Settings/home.erb +16 -17
  1039. data/res/generators/templates/application/app/Settings/index.bb.erb +26 -27
  1040. data/res/generators/templates/application/app/Settings/index.erb +28 -27
  1041. data/res/generators/templates/application/app/Settings/login.bb.erb +25 -31
  1042. data/res/generators/templates/application/app/Settings/login.erb +20 -22
  1043. data/res/generators/templates/application/app/Settings/reset.bb.erb +12 -11
  1044. data/res/generators/templates/application/app/Settings/reset.erb +10 -13
  1045. data/res/generators/templates/application/app/Settings/wait.bb.erb +9 -2
  1046. data/res/generators/templates/application/app/Settings/wait.erb +9 -4
  1047. data/res/generators/templates/application/app/index.erb +17 -24
  1048. data/res/generators/templates/application/app/layout.erb +51 -21
  1049. data/res/generators/templates/application/build.yml +3 -1
  1050. data/res/generators/templates/application/icon/icon.svg +5334 -0
  1051. data/res/generators/templates/application/public/css/android.css +6 -1
  1052. data/res/generators/templates/application/public/css/blackberry.css +6 -1
  1053. data/res/generators/templates/application/public/css/iphone.css +4 -0
  1054. data/res/generators/templates/application/public/jqmobile/images/ajax-loader.png +0 -0
  1055. data/res/generators/templates/application/public/jqmobile/images/icon-search-black.png +0 -0
  1056. data/res/generators/templates/application/public/jqmobile/images/icons-18-black.png +0 -0
  1057. data/res/generators/templates/application/public/jqmobile/images/icons-18-white.png +0 -0
  1058. data/res/generators/templates/application/public/jqmobile/images/icons-36-black.png +0 -0
  1059. data/res/generators/templates/application/public/jqmobile/images/icons-36-white.png +0 -0
  1060. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0b1.css +1661 -0
  1061. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0b1.js +5626 -0
  1062. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0b1.min.css +8 -0
  1063. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0b1.min.js +146 -0
  1064. data/res/generators/templates/application/public/{jqtouch/jqtouch-iphone.css → jqmobile/jquery.mobile.iphone.css} +1 -1
  1065. data/res/generators/templates/application/public/jquery/jquery-1.6.2.js +8981 -0
  1066. data/res/generators/templates/application/public/jquery/jquery-1.6.2.min.js +18 -0
  1067. data/res/generators/templates/application/public/js/jqmobile-patch.js +231 -0
  1068. data/res/generators/templates/model/controller.rb +3 -2
  1069. data/res/generators/templates/model/edit.bb.erb +17 -17
  1070. data/res/generators/templates/model/edit.erb +15 -20
  1071. data/res/generators/templates/model/index.bb.erb +19 -19
  1072. data/res/generators/templates/model/index.erb +23 -26
  1073. data/res/generators/templates/model/new.bb.erb +18 -19
  1074. data/res/generators/templates/model/new.erb +17 -19
  1075. data/res/generators/templates/model/show.bb.erb +10 -11
  1076. data/res/generators/templates/model/show.erb +16 -19
  1077. data/rhobuild.yml.example +2 -1
  1078. data/rhodes.gemspec +4 -3
  1079. data/rhomobile-debug.gemspec +22 -0
  1080. data/spec/framework_spec/app/layout.erb +1 -1
  1081. data/spec/perfomance_spec/app/layout.erb +1 -1
  1082. data/spec/phone_spec/app/spec/asynchttp_spec.rb +1 -1
  1083. data/spec/phone_spec/app/spec/mapview_spec.rb +43 -0
  1084. data/spec/phone_spec/app/spec/rho_spec.rb +23 -0
  1085. data/spec/phone_spec/app/spec/syncengine_spec.rb +49 -8
  1086. metadata +244 -344
  1087. data/Manifest.txt +0 -6409
  1088. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/COPYING +0 -27
  1089. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/README +0 -95
  1090. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar.h +0 -1415
  1091. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/Decoder.h +0 -201
  1092. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/Exception.h +0 -187
  1093. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/Image.h +0 -321
  1094. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/ImageScanner.h +0 -130
  1095. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/Processor.h +0 -223
  1096. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/QZBar.h +0 -169
  1097. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/QZBarImage.h +0 -72
  1098. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/Scanner.h +0 -162
  1099. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/Symbol.h +0 -529
  1100. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/Video.h +0 -170
  1101. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/Window.h +0 -136
  1102. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/ZBarCaptureReader.h +0 -99
  1103. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/ZBarImage.h +0 -69
  1104. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/ZBarImageScanner.h +0 -50
  1105. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/ZBarReaderController.h +0 -142
  1106. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/ZBarReaderView.h +0 -119
  1107. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/ZBarReaderViewController.h +0 -99
  1108. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/ZBarSymbol.h +0 -67
  1109. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/include/zbar/zbargtk.h +0 -205
  1110. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/config.c +0 -157
  1111. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/convert.c +0 -1172
  1112. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/debug.h +0 -87
  1113. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder.c +0 -409
  1114. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder.h +0 -219
  1115. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/code128.c +0 -528
  1116. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/code128.h +0 -49
  1117. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/code39.c +0 -335
  1118. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/code39.h +0 -50
  1119. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/ean.c +0 -660
  1120. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/ean.h +0 -86
  1121. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/i25.c +0 -243
  1122. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/i25.h +0 -50
  1123. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/pdf417.c +0 -223
  1124. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/pdf417.h +0 -49
  1125. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/pdf417_hash.h +0 -545
  1126. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/qr_finder.c +0 -102
  1127. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/decoder/qr_finder.h +0 -23
  1128. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/error.c +0 -183
  1129. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/error.h +0 -240
  1130. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/event.h +0 -62
  1131. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/image.c +0 -358
  1132. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/image.h +0 -142
  1133. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/img_scanner.c +0 -819
  1134. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/img_scanner.h +0 -38
  1135. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/jpeg.c +0 -241
  1136. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/mutex.h +0 -160
  1137. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/processor.c +0 -700
  1138. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/processor.h +0 -126
  1139. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/processor/lock.c +0 -227
  1140. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/processor/null.c +0 -62
  1141. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/processor/posix.c +0 -337
  1142. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/processor/posix.h +0 -138
  1143. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/processor/win.c +0 -335
  1144. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/processor/x.c +0 -269
  1145. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode.h +0 -66
  1146. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/bch15_5.c +0 -184
  1147. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/bch15_5.h +0 -20
  1148. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/binarize.c +0 -639
  1149. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/binarize.h +0 -17
  1150. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/isaac.c +0 -139
  1151. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/isaac.h +0 -41
  1152. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/qrdec.c +0 -3957
  1153. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/qrdec.h +0 -168
  1154. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/qrdectxt.c +0 -405
  1155. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/rs.c +0 -799
  1156. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/rs.h +0 -66
  1157. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/util.c +0 -140
  1158. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/qrcode/util.h +0 -48
  1159. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/refcnt.c +0 -48
  1160. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/refcnt.h +0 -96
  1161. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/scanner.c +0 -317
  1162. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/svg.c +0 -184
  1163. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/svg.h +0 -65
  1164. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/symbol.c +0 -325
  1165. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/symbol.h +0 -93
  1166. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/thread.h +0 -127
  1167. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/timer.h +0 -151
  1168. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/unistd.h +0 -1
  1169. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/video.c +0 -384
  1170. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/video.h +0 -160
  1171. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/video/null.c +0 -37
  1172. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/video/v4l1.c +0 -435
  1173. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/video/v4l2.c +0 -509
  1174. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/video/vfw.c +0 -494
  1175. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window.c +0 -318
  1176. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window.h +0 -144
  1177. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/dib.c +0 -75
  1178. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/null.c +0 -103
  1179. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/vfw.c +0 -104
  1180. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/win.c +0 -334
  1181. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/win.h +0 -46
  1182. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/x.c +0 -356
  1183. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/x.h +0 -74
  1184. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/ximage.c +0 -219
  1185. data/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/zbar/window/xv.c +0 -273
  1186. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_SplashScreen.h +0 -39
  1187. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NetworkConnectivityListener.java +0 -222
  1188. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NetworkStateTracker.java +0 -185
  1189. data/platform/shared/SyncClient/RhoError.h +0 -29
  1190. data/platform/shared/SyncClient/SyncClient.h +0 -95
  1191. data/platform/symbian/RhoLib/group/RhoLib.mmp +0 -41
  1192. data/platform/symbian/RhoLib/group/bld.inf +0 -15
  1193. data/platform/symbian/SQLite60/group/SQLite60.mmp +0 -21
  1194. data/platform/symbian/SQLite60/group/bld.inf +0 -7
  1195. data/platform/symbian/build/build.properties +0 -80
  1196. data/platform/symbian/build/build.xml +0 -649
  1197. data/platform/symbian/build/insertRhoBundle2pkg.rb +0 -26
  1198. data/platform/symbian/build/lib/stlport.zip +0 -0
  1199. data/platform/symbian/build/logfile.template +0 -1
  1200. data/platform/symbian/build/release.properties +0 -7
  1201. data/platform/symbian/lib/pips_nokia_1_3_ss.sis +0 -0
  1202. data/platform/symbian/rhodes/data/loading.html +0 -11
  1203. data/platform/symbian/rhodes/data/rhodes.rls +0 -91
  1204. data/platform/symbian/rhodes/data/rhodes.rss +0 -537
  1205. data/platform/symbian/rhodes/data/rhodes_reg.rss +0 -40
  1206. data/platform/symbian/rhodes/gfx/qgn_menu_rhodes.svg +0 -55
  1207. data/platform/symbian/rhodes/group/Icons_scalable_dc.mk +0 -50
  1208. data/platform/symbian/rhodes/group/bld.inf +0 -10
  1209. data/platform/symbian/rhodes/group/rhodes.mmp +0 -180
  1210. data/platform/symbian/rhodes/help/Custom.xml +0 -18
  1211. data/platform/symbian/rhodes/help/build_help.mk +0 -45
  1212. data/platform/symbian/rhodes/help/rhodes.cshlp +0 -19
  1213. data/platform/symbian/rhodes/help/rhodes.xml +0 -13
  1214. data/platform/symbian/rhodes/inc/AppManager.h +0 -89
  1215. data/platform/symbian/rhodes/inc/AppSoftkeysObserver.h +0 -95
  1216. data/platform/symbian/rhodes/inc/ConnectionManager.h +0 -115
  1217. data/platform/symbian/rhodes/inc/GeoLocationService.h +0 -89
  1218. data/platform/symbian/rhodes/inc/HttpClient.h +0 -161
  1219. data/platform/symbian/rhodes/inc/HttpConstants.h +0 -72
  1220. data/platform/symbian/rhodes/inc/HttpEventHandler.h +0 -130
  1221. data/platform/symbian/rhodes/inc/HttpFileManager.h +0 -116
  1222. data/platform/symbian/rhodes/inc/HttpServer.h +0 -119
  1223. data/platform/symbian/rhodes/inc/LogOptionsDialog.h +0 -59
  1224. data/platform/symbian/rhodes/inc/RhoCamera.h +0 -321
  1225. data/platform/symbian/rhodes/inc/SpecialLoadObserver.h +0 -115
  1226. data/platform/symbian/rhodes/inc/SyncEngineWrap.h +0 -107
  1227. data/platform/symbian/rhodes/inc/geolocation/GeoLocation.h +0 -91
  1228. data/platform/symbian/rhodes/inc/ports_mngt.h +0 -23
  1229. data/platform/symbian/rhodes/inc/posix_http_client.h +0 -37
  1230. data/platform/symbian/rhodes/inc/rhodes.hrh +0 -106
  1231. data/platform/symbian/rhodes/inc/rhodes.pan +0 -42
  1232. data/platform/symbian/rhodes/inc/rhodesAppUi.h +0 -153
  1233. data/platform/symbian/rhodes/inc/rhodesAppView.h +0 -242
  1234. data/platform/symbian/rhodes/inc/rhodesApplication.h +0 -69
  1235. data/platform/symbian/rhodes/inc/rhodesDocument.h +0 -103
  1236. data/platform/symbian/rhodes/sis/backup_registration.xml +0 -5
  1237. data/platform/symbian/rhodes/sis/cert/rhodes_cert.cer +0 -27
  1238. data/platform/symbian/rhodes/sis/cert/rhodes_pid.key +0 -23
  1239. data/platform/symbian/rhodes/sis/rhodes.pkg +0 -42
  1240. data/platform/symbian/rhodes/src/AppManager.cpp +0 -153
  1241. data/platform/symbian/rhodes/src/AppSoftkeysObserver.cpp +0 -88
  1242. data/platform/symbian/rhodes/src/ConnectionManager.cpp +0 -337
  1243. data/platform/symbian/rhodes/src/GeoLocationService.cpp +0 -151
  1244. data/platform/symbian/rhodes/src/HttpClient.cpp +0 -489
  1245. data/platform/symbian/rhodes/src/HttpConstants.cpp +0 -35
  1246. data/platform/symbian/rhodes/src/HttpEventHandler.cpp +0 -587
  1247. data/platform/symbian/rhodes/src/HttpFileManager.cpp +0 -282
  1248. data/platform/symbian/rhodes/src/HttpServer.cpp +0 -275
  1249. data/platform/symbian/rhodes/src/LogOptionsDialog.cpp +0 -179
  1250. data/platform/symbian/rhodes/src/RhoCamera.cpp +0 -675
  1251. data/platform/symbian/rhodes/src/SpecialLoadObserver.cpp +0 -95
  1252. data/platform/symbian/rhodes/src/SyncEngineWrap.cpp +0 -400
  1253. data/platform/symbian/rhodes/src/camera/camera.cpp +0 -23
  1254. data/platform/symbian/rhodes/src/geolocation/GeoLocation.cpp +0 -110
  1255. data/platform/symbian/rhodes/src/geolocation/ruby_geolocation.cpp +0 -38
  1256. data/platform/symbian/rhodes/src/notification.cpp +0 -117
  1257. data/platform/symbian/rhodes/src/ports_mngt.c +0 -103
  1258. data/platform/symbian/rhodes/src/posix_http_client.c +0 -460
  1259. data/platform/symbian/rhodes/src/rhodes.cpp +0 -43
  1260. data/platform/symbian/rhodes/src/rhodesAppUi.cpp +0 -436
  1261. data/platform/symbian/rhodes/src/rhodesAppView.cpp +0 -851
  1262. data/platform/symbian/rhodes/src/rhodesApplication.cpp +0 -51
  1263. data/platform/symbian/rhodes/src/rhodesDocument.cpp +0 -97
  1264. data/platform/symbian/rhodes/src/rsyncengine.c +0 -11
  1265. data/platform/symbian/rhodes/src/webview/webview.cpp +0 -44
  1266. data/platform/symbian/rubylib/group/bld.inf +0 -7
  1267. data/platform/symbian/rubylib/group/rubylib.mmp +0 -143
  1268. data/platform/symbian/shttpd/group/bld.inf +0 -5
  1269. data/platform/symbian/shttpd/group/shttpd.mmp +0 -24
  1270. data/platform/symbian/tcmalloc/group/bld.inf +0 -15
  1271. data/platform/symbian/tcmalloc/group/tcmalloc.mmp +0 -31
  1272. data/platform/wm/rhodes/emulator/ExternalWebView.cpp +0 -20
  1273. data/platform/wm/rhodes/emulator/ExternalWebView.h +0 -23
  1274. data/platform/wm/rhodes/emulator/MainWindowCallback.h +0 -19
  1275. data/platform/wm/rhodes/emulator/MainWindowProxy.cpp +0 -270
  1276. data/platform/wm/rhodes/emulator/MainWindowProxy.h +0 -34
  1277. data/platform/wm/rhodes/emulator/MainWindowQt.cpp +0 -356
  1278. data/platform/wm/rhodes/emulator/NativeToolbarQt.cpp +0 -57
  1279. data/platform/wm/rhodes/emulator/NativeToolbarQt.h +0 -52
  1280. data/platform/wm/rhodes/emulator/QtMainWindow.cpp +0 -252
  1281. data/platform/wm/rhodes/emulator/QtMainWindow.h +0 -62
  1282. data/platform/wm/rhodes/rho/rubyext/NativeToolbarExt.h +0 -6
  1283. data/platform/wp7/WPApplication.sln +0 -50
  1284. data/platform/wp7/WPApplication/App.xaml +0 -19
  1285. data/platform/wp7/WPApplication/App.xaml.cs +0 -211
  1286. data/platform/wp7/WPApplication/ApplicationIcon.png +0 -0
  1287. data/platform/wp7/WPApplication/Background.png +0 -0
  1288. data/platform/wp7/WPApplication/MainPage.xaml +0 -44
  1289. data/platform/wp7/WPApplication/MainPage.xaml.cs +0 -132
  1290. data/platform/wp7/WPApplication/Properties/AppManifest.xml +0 -6
  1291. data/platform/wp7/WPApplication/Properties/AssemblyInfo.cs +0 -35
  1292. data/platform/wp7/WPApplication/Properties/WMAppManifest.xml +0 -32
  1293. data/platform/wp7/WPApplication/SplashScreenImage.jpg +0 -0
  1294. data/platform/wp7/WPApplication/WPApplication.csproj +0 -201
  1295. data/platform/wp7/WPApplication/WP_PlatformAdaptationLayer.cs +0 -88
  1296. data/platform/wp7/WPApplication/app_manifest.txt +0 -1
  1297. data/platform/wp7/WPApplication/readme.htm +0 -40
  1298. data/platform/wp7/WPApplication/readme2.htm +0 -37
  1299. data/platform/wp7/WPApplication/rho/apps/app/Model1/edit.bb.erb +0 -29
  1300. data/platform/wp7/WPApplication/rho/apps/app/Model1/edit.erb +0 -32
  1301. data/platform/wp7/WPApplication/rho/apps/app/Model1/index.bb.erb +0 -21
  1302. data/platform/wp7/WPApplication/rho/apps/app/Model1/index.erb +0 -26
  1303. data/platform/wp7/WPApplication/rho/apps/app/Model1/model1.rb +0 -10
  1304. data/platform/wp7/WPApplication/rho/apps/app/Model1/model1_controller.rb +0 -58
  1305. data/platform/wp7/WPApplication/rho/apps/app/Model1/new.bb.erb +0 -29
  1306. data/platform/wp7/WPApplication/rho/apps/app/Model1/new.erb +0 -31
  1307. data/platform/wp7/WPApplication/rho/apps/app/Model1/show.bb.erb +0 -26
  1308. data/platform/wp7/WPApplication/rho/apps/app/Model1/show.erb +0 -28
  1309. data/platform/wp7/WPApplication/rho/apps/app/Settings/controller.rb +0 -75
  1310. data/platform/wp7/WPApplication/rho/apps/app/Settings/home.bb.erb +0 -17
  1311. data/platform/wp7/WPApplication/rho/apps/app/Settings/home.erb +0 -20
  1312. data/platform/wp7/WPApplication/rho/apps/app/Settings/index.bb.erb +0 -32
  1313. data/platform/wp7/WPApplication/rho/apps/app/Settings/index.erb +0 -30
  1314. data/platform/wp7/WPApplication/rho/apps/app/Settings/login.bb.erb +0 -35
  1315. data/platform/wp7/WPApplication/rho/apps/app/Settings/login.erb +0 -27
  1316. data/platform/wp7/WPApplication/rho/apps/app/Settings/reset.bb.erb +0 -15
  1317. data/platform/wp7/WPApplication/rho/apps/app/Settings/reset.erb +0 -17
  1318. data/platform/wp7/WPApplication/rho/apps/app/Settings/wait.bb.erb +0 -3
  1319. data/platform/wp7/WPApplication/rho/apps/app/Settings/wait.erb +0 -5
  1320. data/platform/wp7/WPApplication/rho/apps/app/application.rb +0 -16
  1321. data/platform/wp7/WPApplication/rho/apps/app/helpers/application_helper.rb +0 -126
  1322. data/platform/wp7/WPApplication/rho/apps/app/helpers/browser_helper.rb +0 -18
  1323. data/platform/wp7/WPApplication/rho/apps/app/index.bb.erb +0 -26
  1324. data/platform/wp7/WPApplication/rho/apps/app/index.erb +0 -26
  1325. data/platform/wp7/WPApplication/rho/apps/app/layout.erb +0 -47
  1326. data/platform/wp7/WPApplication/rho/apps/app/loading.html +0 -11
  1327. data/platform/wp7/WPApplication/rho/apps/app_manifest.txt +0 -1
  1328. data/platform/wp7/WPApplication/rho/apps/public/css/android.css +0 -330
  1329. data/platform/wp7/WPApplication/rho/apps/public/css/blackberry.css +0 -115
  1330. data/platform/wp7/WPApplication/rho/apps/public/css/iphone.css +0 -410
  1331. data/platform/wp7/WPApplication/rho/apps/public/css/windows_mobile.css +0 -222
  1332. data/platform/wp7/WPApplication/rho/apps/public/images/IUI_LICENSE.txt +0 -21
  1333. data/platform/wp7/WPApplication/rho/apps/public/images/android/ic_menu_more.png +0 -0
  1334. data/platform/wp7/WPApplication/rho/apps/public/images/backButton.png +0 -0
  1335. data/platform/wp7/WPApplication/rho/apps/public/images/blueButton.png +0 -0
  1336. data/platform/wp7/WPApplication/rho/apps/public/images/cancel.png +0 -0
  1337. data/platform/wp7/WPApplication/rho/apps/public/images/grayButton.png +0 -0
  1338. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/disclosure.png +0 -0
  1339. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/disclosure_detail.png +0 -0
  1340. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/backButton.png +0 -0
  1341. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/blueButton.png +0 -0
  1342. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/cancel.png +0 -0
  1343. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/chevron.png +0 -0
  1344. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/grayButton.png +0 -0
  1345. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/listArrowSel.png +0 -0
  1346. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/listGroup.png +0 -0
  1347. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/loading.gif +0 -0
  1348. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/on_off.png +0 -0
  1349. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/pinstripes.png +0 -0
  1350. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/selection.png +0 -0
  1351. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/thumb.png +0 -0
  1352. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/toggle.png +0 -0
  1353. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/toggleOn.png +0 -0
  1354. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/toolButton.png +0 -0
  1355. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/toolbar.png +0 -0
  1356. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/jqtouch/whiteButton.png +0 -0
  1357. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/radiobutton.png +0 -0
  1358. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/select.png +0 -0
  1359. data/platform/wp7/WPApplication/rho/apps/public/images/iphone/switch.png +0 -0
  1360. data/platform/wp7/WPApplication/rho/apps/public/images/iui-logo-touch-icon.png +0 -0
  1361. data/platform/wp7/WPApplication/rho/apps/public/images/listArrow.png +0 -0
  1362. data/platform/wp7/WPApplication/rho/apps/public/images/listArrowDown.png +0 -0
  1363. data/platform/wp7/WPApplication/rho/apps/public/images/listArrowSel.png +0 -0
  1364. data/platform/wp7/WPApplication/rho/apps/public/images/listGroup.png +0 -0
  1365. data/platform/wp7/WPApplication/rho/apps/public/images/loading.gif +0 -0
  1366. data/platform/wp7/WPApplication/rho/apps/public/images/pinstripes.png +0 -0
  1367. data/platform/wp7/WPApplication/rho/apps/public/images/right_button.png +0 -0
  1368. data/platform/wp7/WPApplication/rho/apps/public/images/selection.png +0 -0
  1369. data/platform/wp7/WPApplication/rho/apps/public/images/thumb.png +0 -0
  1370. data/platform/wp7/WPApplication/rho/apps/public/images/toggle.png +0 -0
  1371. data/platform/wp7/WPApplication/rho/apps/public/images/toggleOn.png +0 -0
  1372. data/platform/wp7/WPApplication/rho/apps/public/images/toolButton.png +0 -0
  1373. data/platform/wp7/WPApplication/rho/apps/public/images/toolButton_new.png +0 -0
  1374. data/platform/wp7/WPApplication/rho/apps/public/images/toolbar.png +0 -0
  1375. data/platform/wp7/WPApplication/rho/apps/public/images/whiteButton.png +0 -0
  1376. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jqtouch-iphone.css +0 -9
  1377. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jqtouch.css +0 -374
  1378. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jqtouch.js +0 -742
  1379. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jqtouch.transitions.js +0 -60
  1380. data/platform/wp7/WPApplication/rho/apps/public/jqtouch/jquery.1.3.2.min.js +0 -19
  1381. data/platform/wp7/WPApplication/rho/apps/public/js/application.js +0 -1
  1382. data/platform/wp7/WPApplication/rho/apps/public/js/rho.js +0 -4
  1383. data/platform/wp7/WPApplication/rho/apps/public/js/rhogeolocation-wm.js +0 -59
  1384. data/platform/wp7/WPApplication/rho/apps/public/js/rhogeolocation.js +0 -11
  1385. data/platform/wp7/WPApplication/rho/apps/rhoconfig.txt +0 -32
  1386. data/platform/wp7/WPApplication/rhoconfig.txt +0 -32
  1387. data/platform/wp7/WPApplication/windows_mobile.css +0 -222
  1388. data/res/generators/templates/application/public/jqtouch/changes.txt +0 -20
  1389. data/res/generators/templates/application/public/jqtouch/jqtouch.css +0 -374
  1390. data/res/generators/templates/application/public/jqtouch/jqtouch.js +0 -771
  1391. data/res/generators/templates/application/public/jqtouch/jqtouch.transitions.js +0 -60
  1392. data/res/generators/templates/application/public/jqtouch/jquery.1.3.2.min.js +0 -19
  1393. data/res/generators/templates/application/public/js/wp7.js +0 -7
@@ -1,3 +1,29 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
1
27
  package rhomobile.camera;
2
28
 
3
29
  import java.util.Date;
@@ -1,3 +1,29 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
1
27
  package rhomobile.datetime;
2
28
 
3
29
  import net.rim.device.api.i18n.DateFormat;
@@ -1,3 +1,29 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
1
27
  package rhomobile.datetime;
2
28
 
3
29
  import com.rho.RhoEmptyLogger;
@@ -1,3 +1,29 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
1
27
  package rhomobile.mapview;
2
28
 
3
29
  public class Annotation {
@@ -1,695 +1,736 @@
1
- package rhomobile.mapview;
2
-
3
- import java.io.IOException;
4
- import java.io.InputStream;
5
- import java.util.Enumeration;
6
- import java.util.Hashtable;
7
- import java.util.Vector;
8
-
9
- import com.rho.RhoClassFactory;
10
- import com.rho.RhoConf;
11
- import com.rho.RhoEmptyLogger;
12
- import com.rho.RhoLogger;
13
- import com.rho.net.IHttpConnection;
14
-
15
- import net.rim.device.api.math.Fixed32;
16
- import net.rim.device.api.system.Bitmap;
17
- import net.rim.device.api.system.EncodedImage;
18
- import net.rim.device.api.ui.Field;
19
- import net.rim.device.api.ui.Graphics;
20
- import net.rim.device.api.util.Comparator;
21
- import net.rim.device.api.util.SimpleSortingVector;
22
-
23
- public class ESRIMapField extends Field implements RhoMapField {
24
-
25
- private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() :
26
- new RhoLogger("ESRIMapField");
27
-
28
- private static final int TILE_SIZE = 256;
29
- private static final int MIN_ZOOM = 0;
30
- private static final int MAX_ZOOM = 19;
31
-
32
- private static final int CACHE_UPDATE_INTERVAL = 500;
33
-
34
- // Maximum size of image cache (number of images stored locally)
35
- private static final int MAX_IMAGE_CACHE_SIZE = 32;
36
-
37
- // Mode of decoding EncodedImage to bitmap
38
- private static final int DECODE_MODE = EncodedImage.DECODE_NATIVE |
39
- EncodedImage.DECODE_NO_DITHER | EncodedImage.DECODE_READONLY |
40
- EncodedImage.DECODE_ALPHA;
41
-
42
- // Constants required to coordinates calculations
43
- private static final long MIN_LATITUDE = degreesToPixelsY(90, MAX_ZOOM);
44
- private static final long MAX_LATITUDE = degreesToPixelsY(-90, MAX_ZOOM);
45
- private static final long MAX_LONGITUDE = degreesToPixelsX(180, MAX_ZOOM);
46
-
47
- // DON'T CHANGE THIS CONSTANT!!!
48
- // This is maximum absolute value of sine ( == sin(85*PI/180) ) allowed by Merkator projection
49
- private static final double MAX_SIN = 0.99627207622;
50
-
51
- private static final double PI = Math.PI;
52
-
53
- private Hashtable mMapUrls = new Hashtable();
54
-
55
- private String mMapType;
56
-
57
- //===============================================================================
58
- // Coordinates of center in pixels of maximum zoom level
59
- private long mLatitude = degreesToPixelsY(0, MAX_ZOOM);
60
- private long mLongitude = degreesToPixelsX(0, MAX_ZOOM);
61
- private int mZoom = 0;
62
-
63
- private int mWidth;
64
- private int mHeight;
65
-
66
- private Bitmap mapLogoImage;
67
-
68
- private static class ByCoordinatesComparator implements Comparator {
69
-
70
- public int compare (Object o1, Object o2) {
71
- CachedImage img1 = (CachedImage)o1;
72
- CachedImage img2 = (CachedImage)o2;
73
- if (img1.latitude < img2.latitude) return -1;
74
- if (img1.latitude > img2.latitude) return 1;
75
- if (img1.longitude < img2.longitude) return 1;
76
- if (img1.longitude > img2.longitude) return -1;
77
- if (img1.zoom < img2.zoom) return -1;
78
- if (img1.zoom > img2.zoom) return 1;
79
- return 0;
80
- }
81
-
82
- }
83
-
84
- private static class ByAccessTimeComparator implements Comparator {
85
-
86
- public int compare (Object o1, Object o2) {
87
- long l1 = ((CachedImage)o1).lastUsed;
88
- long l2 = ((CachedImage)o2).lastUsed;
89
- return l1 < l2 ? -1 : l1 > l2 ? 1 : 0;
90
- }
91
-
92
- };
93
-
94
- private class CachedImage {
95
- public EncodedImage image;
96
- public Bitmap bitmap;
97
- public long latitude;
98
- public long longitude;
99
- public int zoom;
100
- public String key;
101
- public long lastUsed;
102
-
103
- public CachedImage(EncodedImage img, long lat, long lon, int z) {
104
- image = img;
105
- bitmap = null;
106
- latitude = lat;
107
- longitude = lon;
108
- zoom = z;
109
- key = makeCacheKey(latitude, longitude, zoom);
110
- lastUsed = System.currentTimeMillis();
111
- }
112
- };
113
-
114
- private class ImageCache {
115
- private Hashtable hash;
116
- private SimpleSortingVector cvec;
117
- private SimpleSortingVector tvec;
118
-
119
- public ImageCache() {
120
- reinit();
121
- }
122
-
123
- private void reinit() {
124
- hash = new Hashtable();
125
- cvec = new SimpleSortingVector();
126
- cvec.setSortComparator(new ByCoordinatesComparator());
127
- cvec.setSort(true);
128
- tvec = new SimpleSortingVector();
129
- tvec.setSortComparator(new ByAccessTimeComparator());
130
- tvec.setSort(true);
131
- }
132
-
133
- public ImageCache clone() {
134
- ImageCache cloned = new ImageCache();
135
- for (Enumeration e = hash.elements(); e.hasMoreElements();)
136
- cloned.put((CachedImage)e.nextElement());
137
- return cloned;
138
- }
139
-
140
- public Enumeration sortedByCoordinates() {
141
- return cvec.elements();
142
- }
143
-
144
- public CachedImage get(String key) {
145
- return (CachedImage)hash.get(key);
146
- }
147
-
148
- public void put(CachedImage img) {
149
- put(img, true);
150
- }
151
-
152
- private void put(CachedImage img, boolean doCheck) {
153
- hash.put(img.key, img);
154
- cvec.addElement(img);
155
- tvec.addElement(img);
156
- if (doCheck) check();
157
- }
158
-
159
- private void check() {
160
- if (hash.size() < MAX_IMAGE_CACHE_SIZE)
161
- return;
162
-
163
- SimpleSortingVector vec = tvec;
164
- reinit();
165
-
166
- Enumeration e = vec.elements();
167
- while (e.hasMoreElements()) {
168
- CachedImage img = (CachedImage)e.nextElement();
169
- put(img, false);
170
- }
171
- }
172
- };
173
-
174
- private ImageCache mImgCache = new ImageCache();
175
-
176
- private static abstract class MapCommand {
177
- public abstract String type();
178
- public abstract String description();
179
- }
180
-
181
- private static class MapFetchCommand extends MapCommand {
182
-
183
- public String baseUrl;
184
- public int zoom;
185
- public long latitude;
186
- public long longitude;
187
-
188
- public MapFetchCommand(String baseUrl, int zoom, long latitude, long longitude) {
189
- this.baseUrl = baseUrl;
190
- this.zoom = zoom;
191
- this.latitude = latitude;
192
- this.longitude = longitude;
193
- }
194
-
195
- private String makeDescription() {
196
- return "" + zoom + "/" + latitude + "/" + longitude;
197
- }
198
-
199
- public String type() {
200
- return "fetch";
201
- }
202
-
203
- public String description() {
204
- return "fetch:" + makeDescription();
205
- }
206
-
207
- };
208
-
209
- private class MapThread extends Thread {
210
-
211
- private static final int BLOCK_SIZE = 1024;
212
-
213
- private Vector commands = new Vector();
214
- private boolean active = true;
215
-
216
- public void process(MapCommand cmd) {
217
- synchronized (commands) {
218
- commands.addElement(cmd);
219
- commands.notify();
220
- }
221
- }
222
-
223
- public void stop() {
224
- active = false;
225
- interrupt();
226
- }
227
-
228
- public void run() {
229
- try {
230
- while (active) {
231
- MapCommand cmd = null;
232
- synchronized (commands) {
233
- if (commands.isEmpty()) {
234
- try {
235
- commands.wait();
236
- } catch (InterruptedException e) {
237
- // Nothing
238
- }
239
- continue;
240
- }
241
- int last = commands.size() - 1;
242
- cmd = (MapCommand)commands.elementAt(last);
243
- commands.removeElementAt(last);
244
- if (cmd == null)
245
- continue;
246
- }
247
-
248
- try {
249
- if (cmd instanceof MapFetchCommand)
250
- processCommand((MapFetchCommand)cmd);
251
- else
252
- LOG.INFO("Received unknown command: " + cmd.type() + ", ignore it");
253
- }
254
- catch (Exception e) {
255
- LOG.ERROR("Processing of map command failed", e);
256
- }
257
- }
258
- }
259
- catch (Exception e) {
260
- LOG.ERROR("Fatal error in map thread", e);
261
- }
262
- finally {
263
- LOG.INFO("Map thread exit");
264
- }
265
- }
266
-
267
- private byte[] fetchData(String url) throws IOException
268
- {
269
- IHttpConnection conn = null;
270
- InputStream is = null;
271
-
272
- try
273
- {
274
- conn = RhoClassFactory.getNetworkAccess().connect(url,false);
275
-
276
- conn.setRequestMethod("GET");
277
-
278
- //conn.setRequestProperty("User-Agent", "Blackberry");
279
- //conn.setRequestProperty("Accept", "*/*");
280
-
281
- is = conn.openInputStream();
282
-
283
- int code = conn.getResponseCode();
284
- if (code/100 != 2)
285
- throw new IOException("ESRI map server respond with " + code + " " + conn.getResponseMessage());
286
-
287
- int size = conn.getHeaderFieldInt("Content-Length", 0);
288
- byte[] data = new byte[size];
289
- if (size == 0)
290
- size = 1073741824; // 1Gb :)
291
-
292
- byte[] buf = new byte[BLOCK_SIZE];
293
- for (int offset = 0; offset < size;) {
294
- int n = is.read(buf, 0, BLOCK_SIZE);
295
- if (n <= 0)
296
- break;
297
- if (offset + n > data.length) {
298
- byte[] newData = new byte[offset + n];
299
- System.arraycopy(data, 0, newData, 0, data.length);
300
- data = newData;
301
- }
302
- System.arraycopy(buf, 0, data, offset, n);
303
- offset += n;
304
- }
305
-
306
- return data;
307
- }finally
308
- {
309
- if ( is != null )
310
- try{ is.close(); }catch(IOException e){}
311
-
312
- if ( conn != null )
313
- try{ conn.close(); }catch(IOException e){}
314
-
315
- is = null;
316
- conn = null;
317
- }
318
- }
319
-
320
- private void processCommand(MapFetchCommand cmd) throws IOException {
321
- LOG.TRACE("Processing map fetch command (thread #" + hashCode() + "): " + cmd.description());
322
-
323
- long ts = toMaxZoom(TILE_SIZE, cmd.zoom);
324
- int row = (int)(cmd.latitude/ts);
325
- int column = (int)(cmd.longitude/ts);
326
- StringBuffer url = new StringBuffer();
327
- url.append(cmd.baseUrl);
328
- url.append("/MapServer/tile/");
329
- url.append(cmd.zoom);
330
- url.append('/');
331
- url.append(row);
332
- url.append('/');
333
- url.append(column);
334
-
335
- String finalUrl = url.toString();
336
- byte[] data = fetchData(finalUrl);
337
-
338
- EncodedImage img = EncodedImage.createEncodedImage(data, 0, data.length);
339
- img.setDecodeMode(DECODE_MODE);
340
-
341
- long lat = row*ts + ts/2;
342
- long lon = column*ts + ts/2;
343
- LOG.TRACE("Map request done, draw just received image: zoom=" + cmd.zoom + ", lat=" + lat + ", lon=" + lon);
344
- CachedImage cachedImage = new CachedImage(img, lat, lon, cmd.zoom);
345
- // Put image to the cache and trigger redraw
346
- synchronized (ESRIMapField.this) {
347
- mImgCache.put(cachedImage);
348
- }
349
- redraw();
350
- }
351
-
352
- };
353
-
354
- private MapThread mMapThread = new MapThread();
355
-
356
- private class CacheUpdate extends Thread {
357
-
358
- private boolean active = true;
359
-
360
- public void stop() throws InterruptedException {
361
- active = false;
362
- join();
363
- }
364
-
365
- public void run() {
366
- LOG.TRACE("Cache update thread started");
367
- while (active) {
368
- try {
369
- Thread.sleep(CACHE_UPDATE_INTERVAL);
370
- }
371
- catch (InterruptedException e) {
372
- // Ignore
373
- }
374
-
375
- //LOG.TRACE("Cache update: next loop; mLatitude=" + mLatitude +
376
- // ", mLongitude=" + mLongitude + ", mZoom=" + mZoom);
377
-
378
- long ts = toMaxZoom(TILE_SIZE, mZoom);
379
- //LOG.TRACE("Tile size on the maximum zoom level: " + ts);
380
- long h = toMaxZoom(mHeight, mZoom);
381
- //LOG.TRACE("Height of the screen on the maximum zoom level: " + h);
382
- long w = toMaxZoom(mWidth, mZoom);
383
- //LOG.TRACE("Width of the screen on the maximum zoom level: " + w);
384
-
385
- long totalTiles = MapTools.math_pow2(mZoom);
386
- //LOG.TRACE("Total tiles count on zoom level " + mZoom + ": " + totalTiles);
387
-
388
- long tlLat = mLatitude - h/2;
389
- if (tlLat < 0) tlLat = 0;
390
- long tlLon = mLongitude - w/2;
391
- if (tlLon < 0) tlLon = 0;
392
- //LOG.TRACE("tlLat=" + tlLat + ", tlLon=" + tlLon);
393
- for (long lat = (tlLat/ts)*ts, latLim = Math.min(tlLat + h + ts, ts*totalTiles); lat < latLim; lat += ts) {
394
- for (long lon = (tlLon/ts)*ts, lonLim = Math.min(tlLon + w + ts, ts*totalTiles); lon < lonLim; lon += ts) {
395
- String key = makeCacheKey(lat, lon, mZoom);
396
- MapFetchCommand cmd = null;
397
- synchronized (ESRIMapField.this) {
398
- CachedImage img = mImgCache.get(key);
399
- if (img == null) {
400
- //LOG.TRACE("lat=" + lat + ", lon=" + lon + "; key=" + key);
401
- String baseUrl = getMapUrl();
402
- cmd = new MapFetchCommand(baseUrl, mZoom, lat, lon);
403
-
404
- CachedImage dummy = new CachedImage(null, lat, lon, mZoom);
405
- mImgCache.put(dummy);
406
- }
407
- }
408
- if (cmd != null)
409
- mMapThread.process(cmd);
410
- }
411
- }
412
- }
413
- LOG.INFO("Cache update thread stopped");
414
- }
415
-
416
- };
417
-
418
- private CacheUpdate mCacheUpdate = new CacheUpdate();
419
-
420
- public ESRIMapField() {
421
- String url = RhoConf.getInstance().getString("esri_map_url_roadmap");
422
- if (url == null || url.length() == 0)
423
- url = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/";
424
- mMapUrls.put("roadmap", url);
425
-
426
- url = RhoConf.getInstance().getString("esri_map_url_satellite");
427
- if (url == null || url.length() == 0)
428
- url = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/";
429
- mMapUrls.put("satellite", url);
430
-
431
- mMapType = "roadmap";
432
-
433
- mapLogoImage = Bitmap.getBitmapResource("esri.png");
434
-
435
- LOG.TRACE("ESRIMapField ctor: mLatitude=" + mLatitude + ", mLongitude=" + mLongitude);
436
-
437
- mMapThread.start();
438
- mCacheUpdate.start();
439
- }
440
-
441
- public void close() {
442
- mMapThread.stop();
443
- try {
444
- mCacheUpdate.stop();
445
- }
446
- catch (InterruptedException e) {
447
- LOG.ERROR("Stopping of cache update thread was interrupted", e);
448
- }
449
- }
450
-
451
- public void redraw() {
452
- invalidate();
453
- }
454
-
455
- private String getMapUrl() {
456
- String url = (String)mMapUrls.get(mMapType);
457
- if (url == null)
458
- url = (String)mMapUrls.get("roadmap");
459
- return url;
460
- }
461
-
462
- protected void paint(Graphics graphics) {
463
- // Draw background
464
- for (int i = 1, lim = 2*Math.max(mWidth, mHeight); i < lim; i += 5) {
465
- graphics.drawLine(0, i, i, 0);
466
- }
467
-
468
- ImageCache imgCache;
469
- synchronized (this) {
470
- imgCache = mImgCache.clone();
471
- }
472
-
473
- // Draw map tiles
474
- Enumeration e = imgCache.sortedByCoordinates();
475
- while (e.hasMoreElements()) {
476
- // Draw map
477
- CachedImage img = (CachedImage)e.nextElement();
478
- if (img.image == null)
479
- continue;
480
-
481
- paintImage(graphics, img);
482
- }
483
-
484
- int logoWidth = mapLogoImage.getWidth();
485
- int logoHeight = mapLogoImage.getHeight();
486
- graphics.drawBitmap(0, mHeight - logoHeight, logoWidth, logoHeight, mapLogoImage, 0, 0);
487
-
488
- }
489
-
490
- private void paintImage(Graphics graphics, CachedImage img) {
491
- // Skip images with zoom level which differ from the current zoom level
492
- if (img.zoom != mZoom)
493
- return;
494
-
495
- long left = -toCurrentZoom(mLongitude - img.longitude, mZoom);
496
- long top = -toCurrentZoom(mLatitude - img.latitude, mZoom);
497
-
498
- if (img.zoom != mZoom) {
499
- double x = MapTools.math_pow2d(img.zoom - mZoom);
500
- int factor = Fixed32.tenThouToFP((int)(x*10000));
501
- img.image = img.image.scaleImage32(factor, factor);
502
- img.bitmap = null;
503
- }
504
-
505
- int imgWidth = img.image.getScaledWidth();
506
- int imgHeight = img.image.getScaledHeight();
507
- left += (mWidth - imgWidth)/2;
508
- top += (mHeight - imgHeight)/2;
509
-
510
- int w = mWidth - (int)left;
511
- int h = mHeight - (int)top;
512
-
513
- int maxW = mWidth + TILE_SIZE;
514
- int maxH = mHeight + TILE_SIZE;
515
- if (w < 0 || h < 0 || w > maxW || h > maxH) {
516
- // Image will not be displayed, free its bitmap and skip it
517
- img.bitmap = null;
518
- return;
519
- }
520
-
521
- if (img.bitmap == null)
522
- img.bitmap = img.image.getBitmap();
523
- graphics.drawBitmap((int)left, (int)top, w, h, img.bitmap, 0, 0);
524
- }
525
-
526
- protected void layout(int w, int h) {
527
- mWidth = Math.min(mWidth, w);
528
- mHeight = Math.min(mHeight, h);
529
- setExtent(mWidth, mHeight);
530
- }
531
-
532
- public int calculateZoom(double latDelta, double lonDelta) {
533
- int zoom1 = calcZoom(latDelta, mWidth);
534
- int zoom2 = calcZoom(lonDelta, mHeight);
535
- return zoom1 < zoom2 ? zoom1 : zoom2;
536
- }
537
-
538
- public Field getBBField() {
539
- return this;
540
- }
541
-
542
- public double getCenterLatitude() {
543
- return pixelsToDegreesY(mLatitude, MAX_ZOOM);
544
- }
545
-
546
- public double getCenterLongitude() {
547
- return pixelsToDegreesX(mLongitude, MAX_ZOOM);
548
- }
549
-
550
- private void validateCoordinates() {
551
- if (mLatitude < MIN_LATITUDE) mLatitude = MIN_LATITUDE;
552
- if (mLatitude > MAX_LATITUDE) mLatitude = MAX_LATITUDE;
553
- }
554
-
555
- public void moveTo(double lat, double lon) {
556
- mLatitude = degreesToPixelsY(lat, MAX_ZOOM);
557
- mLongitude = degreesToPixelsX(lon, MAX_ZOOM);
558
- validateCoordinates();
559
-
560
- //LOG.TRACE("moveTo(" + lat + ", " + lon + "): mLatitude=" + mLatitude + ", mLongitude=" + mLongitude);
561
- }
562
-
563
- public void move(int dx, int dy) {
564
- mLatitude += toMaxZoom(dy, mZoom);
565
- mLongitude += toMaxZoom(dx, mZoom);
566
- validateCoordinates();
567
-
568
- //LOG.TRACE("move(" + dx + ", " + dy + "): mLatitude=" + mLatitude + ", mLongitude=" + mLongitude);
569
- }
570
-
571
- public void setMapType(String type) {
572
- mMapType = type;
573
- //LOG.TRACE("setMapType: " + mMapType);
574
- }
575
-
576
- public void setPreferredSize(int width, int height) {
577
- mWidth = width;
578
- mHeight = height;
579
- }
580
-
581
- public int getPreferredWidth() {
582
- return mWidth;
583
- }
584
-
585
- public int getPreferredHeight() {
586
- return mHeight;
587
- }
588
-
589
- public void setZoom(int zoom) {
590
- mZoom = zoom;
591
- if (mZoom < MIN_ZOOM) mZoom = MIN_ZOOM;
592
- if (mZoom > MAX_ZOOM) mZoom = MAX_ZOOM;
593
- LOG.TRACE("setZoom: " + mZoom);
594
- }
595
-
596
- public int getMaxZoom() {
597
- return MAX_ZOOM;
598
- }
599
-
600
- public int getMinZoom() {
601
- return MIN_ZOOM;
602
- }
603
-
604
- public int getZoom() {
605
- return mZoom;
606
- }
607
-
608
- private static int calcZoom(double degrees, int pixels) {
609
- double angleRatio = degrees*TILE_SIZE/pixels;
610
-
611
- double twoInZoomExp = 360/angleRatio;
612
- int zoom = (int)MapTools.math_log2(twoInZoomExp);
613
- return zoom;
614
- }
615
-
616
- private static long toMaxZoom(long n, int zoom) {
617
- if (n == 0) return 0;
618
- long pow = MapTools.math_pow2(MAX_ZOOM - zoom);
619
- return n*pow;
620
- }
621
-
622
- private static long toCurrentZoom(long coord, int zoom) {
623
- if (coord == 0) return 0;
624
- long pow = MapTools.math_pow2(MAX_ZOOM - zoom);
625
- return coord/pow;
626
- }
627
-
628
- private static long degreesToPixelsX(double n, int z) {
629
- while (n < -180.0) n += 360.0;
630
- while (n > 180.0) n -= 360.0;
631
- double angleRatio = 360d/MapTools.math_pow2(z);
632
- double val = (n + 180)*TILE_SIZE/angleRatio;
633
- return (long)val;
634
- }
635
-
636
- private static long degreesToPixelsY(double n, int z) {
637
- // Merkator projection
638
- double sin_phi = MapTools.math_sin(n*PI/180);
639
- // MAX_SIN - maximum value of sine allowed by Merkator projection
640
- // (~85.0 degrees of north latitude)
641
- if (sin_phi < -MAX_SIN) sin_phi = -MAX_SIN;
642
- if (sin_phi > MAX_SIN) sin_phi = MAX_SIN;
643
-
644
- double ath = MapTools.math_atanh(sin_phi);
645
- double val = TILE_SIZE * MapTools.math_pow2(z) * (1 - ath/PI)/2;
646
- return (long)val;
647
- }
648
-
649
- private static double pixelsToDegreesX(long n, int z) {
650
- while (n < 0) n += MAX_LONGITUDE;
651
- while (n > MAX_LONGITUDE) n -= MAX_LONGITUDE;
652
- double angleRatio = 360d/MapTools.math_pow2(z);
653
- double val = n*angleRatio/TILE_SIZE - 180.0;
654
- return val;
655
- }
656
-
657
- private static double pixelsToDegreesY(long n, int z) {
658
- // Revert calculation of Merkator projection
659
- double ath = PI - 2*PI*n/(TILE_SIZE*MapTools.math_pow2(z));
660
- double th = MapTools.math_tanh(ath);
661
- double val = 180*MapTools.math_asin(th)/PI;
662
- return val;
663
- }
664
-
665
- private String makeCacheKey(long lat, long lon, int z) {
666
- while (lon < 0) lon += MAX_LONGITUDE;
667
- while (lon > MAX_LONGITUDE) lon -= MAX_LONGITUDE;
668
- long ts = toMaxZoom(TILE_SIZE, z);
669
- long x = lon/ts;
670
- long y = lat/ts;
671
- StringBuffer buf = new StringBuffer();
672
- buf.append(z);
673
- buf.append(';');
674
- buf.append(x);
675
- buf.append(';');
676
- buf.append(y);
677
- String key = buf.toString();
678
- return key;
679
- }
680
-
681
- public long toScreenCoordinateX(double n) {
682
- long v = degreesToPixelsX(n, mZoom);
683
- long center = toCurrentZoom(mLongitude, mZoom);
684
- long begin = center - mWidth/2;
685
- return v - begin;
686
- }
687
-
688
- public long toScreenCoordinateY(double n) {
689
- long v = degreesToPixelsY(n, mZoom);
690
- long center = toCurrentZoom(mLatitude, mZoom);
691
- long begin = center - mHeight/2;
692
- return v - begin;
693
- }
694
-
695
- }
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
27
+ package rhomobile.mapview;
28
+
29
+ import java.io.IOException;
30
+ import java.io.InputStream;
31
+ import java.util.Enumeration;
32
+ import java.util.Hashtable;
33
+ import java.util.Vector;
34
+
35
+ import com.rho.RhoClassFactory;
36
+ import com.rho.RhoConf;
37
+ import com.rho.RhoEmptyLogger;
38
+ import com.rho.RhoLogger;
39
+ import com.rho.net.IHttpConnection;
40
+
41
+ import net.rim.device.api.math.Fixed32;
42
+ import net.rim.device.api.system.Bitmap;
43
+ import net.rim.device.api.system.EncodedImage;
44
+ import net.rim.device.api.ui.Field;
45
+ import net.rim.device.api.ui.Graphics;
46
+ import net.rim.device.api.util.Comparator;
47
+ import net.rim.device.api.util.SimpleSortingVector;
48
+
49
+ public class ESRIMapField extends Field implements RhoMapField {
50
+
51
+ private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() :
52
+ new RhoLogger("ESRIMapField");
53
+
54
+ private static final int TILE_SIZE = 256;
55
+ private static final int MIN_ZOOM = 0;
56
+ private static final int MAX_ZOOM = 19;
57
+
58
+ private static final int CACHE_UPDATE_INTERVAL = 500;
59
+
60
+ // Maximum size of image cache (number of images stored locally)
61
+ private static final int MAX_IMAGE_CACHE_SIZE = 32;
62
+
63
+ // Mode of decoding EncodedImage to bitmap
64
+ private static final int DECODE_MODE = EncodedImage.DECODE_NATIVE |
65
+ EncodedImage.DECODE_NO_DITHER | EncodedImage.DECODE_READONLY |
66
+ EncodedImage.DECODE_ALPHA;
67
+
68
+ // Constants required to coordinates calculations
69
+ private static final long MIN_LATITUDE = degreesToPixelsY(90, MAX_ZOOM);
70
+ private static final long MAX_LATITUDE = degreesToPixelsY(-90, MAX_ZOOM);
71
+ private static final long MAX_LONGITUDE = degreesToPixelsX(180, MAX_ZOOM);
72
+
73
+ // DON'T CHANGE THIS CONSTANT!!!
74
+ // This is maximum absolute value of sine ( == sin(85*PI/180) ) allowed by Merkator projection
75
+ private static final double MAX_SIN = 0.99627207622;
76
+
77
+ private static final double PI = Math.PI;
78
+
79
+ private Hashtable mMapUrls = new Hashtable();
80
+
81
+ private String mMapType;
82
+
83
+ //===============================================================================
84
+ // Coordinates of center in pixels of maximum zoom level
85
+ private long mLatitude = degreesToPixelsY(0, MAX_ZOOM);
86
+ private long mLongitude = degreesToPixelsX(0, MAX_ZOOM);
87
+ private int mZoom = 0;
88
+
89
+ private int mWidth;
90
+ private int mHeight;
91
+
92
+ private Bitmap mapLogoImage;
93
+
94
+ private static class ByCoordinatesComparator implements Comparator {
95
+
96
+ public int compare (Object o1, Object o2) {
97
+ CachedImage img1 = (CachedImage)o1;
98
+ CachedImage img2 = (CachedImage)o2;
99
+ if (img1.latitude < img2.latitude) return -1;
100
+ if (img1.latitude > img2.latitude) return 1;
101
+ if (img1.longitude < img2.longitude) return 1;
102
+ if (img1.longitude > img2.longitude) return -1;
103
+ if (img1.zoom < img2.zoom) return -1;
104
+ if (img1.zoom > img2.zoom) return 1;
105
+ return 0;
106
+ }
107
+
108
+ }
109
+
110
+ private static class ByAccessTimeComparator implements Comparator {
111
+
112
+ public int compare (Object o1, Object o2) {
113
+ long l1 = ((CachedImage)o1).lastUsed;
114
+ long l2 = ((CachedImage)o2).lastUsed;
115
+ return l1 < l2 ? -1 : l1 > l2 ? 1 : 0;
116
+ }
117
+
118
+ };
119
+
120
+ private class CachedImage {
121
+ public EncodedImage image;
122
+ public Bitmap bitmap;
123
+ public long latitude;
124
+ public long longitude;
125
+ public int zoom;
126
+ public String key;
127
+ public long lastUsed;
128
+
129
+ public CachedImage(EncodedImage img, long lat, long lon, int z) {
130
+ image = img;
131
+ bitmap = null;
132
+ latitude = lat;
133
+ longitude = lon;
134
+ zoom = z;
135
+ key = makeCacheKey(latitude, longitude, zoom);
136
+ lastUsed = System.currentTimeMillis();
137
+ }
138
+ };
139
+
140
+ private class ImageCache {
141
+ private Hashtable hash;
142
+ private SimpleSortingVector cvec;
143
+ private SimpleSortingVector tvec;
144
+
145
+ public ImageCache() {
146
+ reinit();
147
+ }
148
+
149
+ private void reinit() {
150
+ hash = new Hashtable();
151
+ cvec = new SimpleSortingVector();
152
+ cvec.setSortComparator(new ByCoordinatesComparator());
153
+ cvec.setSort(true);
154
+ tvec = new SimpleSortingVector();
155
+ tvec.setSortComparator(new ByAccessTimeComparator());
156
+ tvec.setSort(true);
157
+ }
158
+
159
+ public ImageCache clone() {
160
+ ImageCache cloned = new ImageCache();
161
+ for (Enumeration e = hash.elements(); e.hasMoreElements();)
162
+ cloned.put((CachedImage)e.nextElement());
163
+ return cloned;
164
+ }
165
+
166
+ public Enumeration sortedByCoordinates() {
167
+ return cvec.elements();
168
+ }
169
+
170
+ public CachedImage get(String key) {
171
+ return (CachedImage)hash.get(key);
172
+ }
173
+
174
+ public void put(CachedImage img) {
175
+ put(img, true);
176
+ }
177
+
178
+ private void put(CachedImage img, boolean doCheck) {
179
+ hash.put(img.key, img);
180
+ cvec.addElement(img);
181
+ tvec.addElement(img);
182
+ if (doCheck) check();
183
+ }
184
+
185
+ private void check() {
186
+ if (hash.size() < MAX_IMAGE_CACHE_SIZE)
187
+ return;
188
+
189
+ SimpleSortingVector vec = tvec;
190
+ reinit();
191
+
192
+ Enumeration e = vec.elements();
193
+ while (e.hasMoreElements()) {
194
+ CachedImage img = (CachedImage)e.nextElement();
195
+ put(img, false);
196
+ }
197
+ }
198
+ };
199
+
200
+ private ImageCache mImgCache = new ImageCache();
201
+
202
+ private static abstract class MapCommand {
203
+ public abstract String type();
204
+ public abstract String description();
205
+ }
206
+
207
+ private static class MapFetchCommand extends MapCommand {
208
+
209
+ public String baseUrl;
210
+ public int zoom;
211
+ public long latitude;
212
+ public long longitude;
213
+
214
+ public MapFetchCommand(String baseUrl, int zoom, long latitude, long longitude) {
215
+ this.baseUrl = baseUrl;
216
+ this.zoom = zoom;
217
+ this.latitude = latitude;
218
+ this.longitude = longitude;
219
+ }
220
+
221
+ private String makeDescription() {
222
+ return "" + zoom + "/" + latitude + "/" + longitude;
223
+ }
224
+
225
+ public String type() {
226
+ return "fetch";
227
+ }
228
+
229
+ public String description() {
230
+ return "fetch:" + makeDescription();
231
+ }
232
+
233
+ };
234
+
235
+ private class MapThread extends Thread {
236
+
237
+ private static final int BLOCK_SIZE = 1024;
238
+
239
+ private Vector commands = new Vector();
240
+ private boolean active = true;
241
+
242
+ public void process(MapCommand cmd) {
243
+ synchronized (commands) {
244
+ commands.addElement(cmd);
245
+ commands.notify();
246
+ }
247
+ }
248
+
249
+ public void stop() {
250
+ active = false;
251
+ interrupt();
252
+ }
253
+
254
+ public void run() {
255
+ try {
256
+ while (active) {
257
+ MapCommand cmd = null;
258
+ synchronized (commands) {
259
+ if (commands.isEmpty()) {
260
+ try {
261
+ commands.wait();
262
+ } catch (InterruptedException e) {
263
+ // Nothing
264
+ }
265
+ continue;
266
+ }
267
+ int last = commands.size() - 1;
268
+ cmd = (MapCommand)commands.elementAt(last);
269
+ commands.removeElementAt(last);
270
+ if (cmd == null)
271
+ continue;
272
+ }
273
+
274
+ try {
275
+ if (cmd instanceof MapFetchCommand)
276
+ processCommand((MapFetchCommand)cmd);
277
+ else
278
+ LOG.INFO("Received unknown command: " + cmd.type() + ", ignore it");
279
+ }
280
+ catch (Exception e) {
281
+ LOG.ERROR("Processing of map command failed", e);
282
+ }
283
+ }
284
+ }
285
+ catch (Exception e) {
286
+ LOG.ERROR("Fatal error in map thread", e);
287
+ }
288
+ finally {
289
+ LOG.INFO("Map thread exit");
290
+ }
291
+ }
292
+
293
+ private byte[] fetchData(String url) throws IOException
294
+ {
295
+ byte[] data = null;
296
+ int nTry = 0;
297
+ do
298
+ {
299
+ IHttpConnection conn = null;
300
+ InputStream is = null;
301
+
302
+ try
303
+ {
304
+ conn = RhoClassFactory.getNetworkAccess().connect(url,false);
305
+
306
+ conn.setRequestMethod("GET");
307
+
308
+ //conn.setRequestProperty("User-Agent", "Blackberry");
309
+ //conn.setRequestProperty("Accept", "*/*");
310
+
311
+ is = conn.openInputStream();
312
+
313
+ int code = conn.getResponseCode();
314
+ if (code/100 != 2)
315
+ throw new IOException("ESRI map server respond with " + code + " " + conn.getResponseMessage());
316
+
317
+ int size = conn.getHeaderFieldInt("Content-Length", 0);
318
+ data = new byte[size];
319
+ if (size == 0)
320
+ size = 1073741824; // 1Gb :)
321
+
322
+ byte[] buf = new byte[BLOCK_SIZE];
323
+ for (int offset = 0; offset < size;) {
324
+ int n = is.read(buf, 0, BLOCK_SIZE);
325
+ if (n <= 0)
326
+ break;
327
+ if (offset + n > data.length) {
328
+ byte[] newData = new byte[offset + n];
329
+ System.arraycopy(data, 0, newData, 0, data.length);
330
+ data = newData;
331
+ }
332
+ System.arraycopy(buf, 0, data, offset, n);
333
+ offset += n;
334
+ }
335
+ break;
336
+ }catch(IOException exc)
337
+ {
338
+ String strError = exc.getMessage();
339
+ LOG.INFO("openInputStream failed: " + strError);
340
+ if ( strError != null && strError.indexOf("General socket error") >= 0)
341
+ {
342
+ LOG.INFO("Try connect one more time.");
343
+ }else
344
+ throw exc;
345
+ }finally
346
+ {
347
+ if ( is != null )
348
+ try{ is.close(); }catch(IOException e){}
349
+
350
+ if ( conn != null )
351
+ try{ conn.close(); }catch(IOException e){}
352
+
353
+ is = null;
354
+ conn = null;
355
+ }
356
+ }while( nTry <= 3 );
357
+
358
+ return data;
359
+ }
360
+
361
+ private void processCommand(MapFetchCommand cmd) throws IOException {
362
+ LOG.TRACE("Processing map fetch command (thread #" + hashCode() + "): " + cmd.description());
363
+
364
+ long ts = toMaxZoom(TILE_SIZE, cmd.zoom);
365
+ int row = (int)(cmd.latitude/ts);
366
+ int column = (int)(cmd.longitude/ts);
367
+ StringBuffer url = new StringBuffer();
368
+ url.append(cmd.baseUrl);
369
+ url.append("/MapServer/tile/");
370
+ url.append(cmd.zoom);
371
+ url.append('/');
372
+ url.append(row);
373
+ url.append('/');
374
+ url.append(column);
375
+
376
+ String finalUrl = url.toString();
377
+ byte[] data = fetchData(finalUrl);
378
+
379
+ EncodedImage img = EncodedImage.createEncodedImage(data, 0, data.length);
380
+ img.setDecodeMode(DECODE_MODE);
381
+
382
+ long lat = row*ts + ts/2;
383
+ long lon = column*ts + ts/2;
384
+ LOG.TRACE("Map request done, draw just received image: zoom=" + cmd.zoom + ", lat=" + lat + ", lon=" + lon);
385
+ CachedImage cachedImage = new CachedImage(img, lat, lon, cmd.zoom);
386
+ // Put image to the cache and trigger redraw
387
+ synchronized (ESRIMapField.this) {
388
+ mImgCache.put(cachedImage);
389
+ }
390
+ redraw();
391
+ }
392
+
393
+ };
394
+
395
+ private MapThread mMapThread = new MapThread();
396
+
397
+ private class CacheUpdate extends Thread {
398
+
399
+ private boolean active = true;
400
+
401
+ public void stop() throws InterruptedException {
402
+ active = false;
403
+ join();
404
+ }
405
+
406
+ public void run() {
407
+ LOG.TRACE("Cache update thread started");
408
+ while (active) {
409
+ try {
410
+ Thread.sleep(CACHE_UPDATE_INTERVAL);
411
+ }
412
+ catch (InterruptedException e) {
413
+ // Ignore
414
+ }
415
+
416
+ //LOG.TRACE("Cache update: next loop; mLatitude=" + mLatitude +
417
+ // ", mLongitude=" + mLongitude + ", mZoom=" + mZoom);
418
+
419
+ long ts = toMaxZoom(TILE_SIZE, mZoom);
420
+ //LOG.TRACE("Tile size on the maximum zoom level: " + ts);
421
+ long h = toMaxZoom(mHeight, mZoom);
422
+ //LOG.TRACE("Height of the screen on the maximum zoom level: " + h);
423
+ long w = toMaxZoom(mWidth, mZoom);
424
+ //LOG.TRACE("Width of the screen on the maximum zoom level: " + w);
425
+
426
+ long totalTiles = MapTools.math_pow2(mZoom);
427
+ //LOG.TRACE("Total tiles count on zoom level " + mZoom + ": " + totalTiles);
428
+
429
+ long tlLat = mLatitude - h/2;
430
+ if (tlLat < 0) tlLat = 0;
431
+ long tlLon = mLongitude - w/2;
432
+ if (tlLon < 0) tlLon = 0;
433
+ //LOG.TRACE("tlLat=" + tlLat + ", tlLon=" + tlLon);
434
+ for (long lat = (tlLat/ts)*ts, latLim = Math.min(tlLat + h + ts, ts*totalTiles); lat < latLim; lat += ts) {
435
+ for (long lon = (tlLon/ts)*ts, lonLim = Math.min(tlLon + w + ts, ts*totalTiles); lon < lonLim; lon += ts) {
436
+ String key = makeCacheKey(lat, lon, mZoom);
437
+ MapFetchCommand cmd = null;
438
+ synchronized (ESRIMapField.this) {
439
+ CachedImage img = mImgCache.get(key);
440
+ if (img == null) {
441
+ //LOG.TRACE("lat=" + lat + ", lon=" + lon + "; key=" + key);
442
+ String baseUrl = getMapUrl();
443
+ cmd = new MapFetchCommand(baseUrl, mZoom, lat, lon);
444
+
445
+ CachedImage dummy = new CachedImage(null, lat, lon, mZoom);
446
+ mImgCache.put(dummy);
447
+ }
448
+ }
449
+ if (cmd != null)
450
+ mMapThread.process(cmd);
451
+ }
452
+ }
453
+ }
454
+ LOG.INFO("Cache update thread stopped");
455
+ }
456
+
457
+ };
458
+
459
+ private CacheUpdate mCacheUpdate = new CacheUpdate();
460
+
461
+ public ESRIMapField() {
462
+ String url = RhoConf.getInstance().getString("esri_map_url_roadmap");
463
+ if (url == null || url.length() == 0)
464
+ url = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/";
465
+ mMapUrls.put("roadmap", url);
466
+
467
+ url = RhoConf.getInstance().getString("esri_map_url_satellite");
468
+ if (url == null || url.length() == 0)
469
+ url = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/";
470
+ mMapUrls.put("satellite", url);
471
+
472
+ mMapType = "roadmap";
473
+
474
+ mapLogoImage = Bitmap.getBitmapResource("esri.png");
475
+
476
+ LOG.TRACE("ESRIMapField ctor: mLatitude=" + mLatitude + ", mLongitude=" + mLongitude);
477
+
478
+ mMapThread.start();
479
+ mCacheUpdate.start();
480
+ }
481
+
482
+ public void close() {
483
+ mMapThread.stop();
484
+ try {
485
+ mCacheUpdate.stop();
486
+ }
487
+ catch (InterruptedException e) {
488
+ LOG.ERROR("Stopping of cache update thread was interrupted", e);
489
+ }
490
+ }
491
+
492
+ public void redraw() {
493
+ invalidate();
494
+ }
495
+
496
+ private String getMapUrl() {
497
+ String url = (String)mMapUrls.get(mMapType);
498
+ if (url == null)
499
+ url = (String)mMapUrls.get("roadmap");
500
+ return url;
501
+ }
502
+
503
+ protected void paint(Graphics graphics) {
504
+ // Draw background
505
+ for (int i = 1, lim = 2*Math.max(mWidth, mHeight); i < lim; i += 5) {
506
+ graphics.drawLine(0, i, i, 0);
507
+ }
508
+
509
+ ImageCache imgCache;
510
+ synchronized (this) {
511
+ imgCache = mImgCache.clone();
512
+ }
513
+
514
+ // Draw map tiles
515
+ Enumeration e = imgCache.sortedByCoordinates();
516
+ while (e.hasMoreElements()) {
517
+ // Draw map
518
+ CachedImage img = (CachedImage)e.nextElement();
519
+ if (img.image == null)
520
+ continue;
521
+
522
+ paintImage(graphics, img);
523
+ }
524
+
525
+ int logoWidth = mapLogoImage.getWidth();
526
+ int logoHeight = mapLogoImage.getHeight();
527
+ graphics.drawBitmap(0, mHeight - logoHeight, logoWidth, logoHeight, mapLogoImage, 0, 0);
528
+
529
+ }
530
+
531
+ private void paintImage(Graphics graphics, CachedImage img) {
532
+ // Skip images with zoom level which differ from the current zoom level
533
+ if (img.zoom != mZoom)
534
+ return;
535
+
536
+ long left = -toCurrentZoom(mLongitude - img.longitude, mZoom);
537
+ long top = -toCurrentZoom(mLatitude - img.latitude, mZoom);
538
+
539
+ if (img.zoom != mZoom) {
540
+ double x = MapTools.math_pow2d(img.zoom - mZoom);
541
+ int factor = Fixed32.tenThouToFP((int)(x*10000));
542
+ img.image = img.image.scaleImage32(factor, factor);
543
+ img.bitmap = null;
544
+ }
545
+
546
+ int imgWidth = img.image.getScaledWidth();
547
+ int imgHeight = img.image.getScaledHeight();
548
+ left += (mWidth - imgWidth)/2;
549
+ top += (mHeight - imgHeight)/2;
550
+
551
+ int w = mWidth - (int)left;
552
+ int h = mHeight - (int)top;
553
+
554
+ int maxW = mWidth + TILE_SIZE;
555
+ int maxH = mHeight + TILE_SIZE;
556
+ if (w < 0 || h < 0 || w > maxW || h > maxH) {
557
+ // Image will not be displayed, free its bitmap and skip it
558
+ img.bitmap = null;
559
+ return;
560
+ }
561
+
562
+ if (img.bitmap == null)
563
+ img.bitmap = img.image.getBitmap();
564
+ graphics.drawBitmap((int)left, (int)top, w, h, img.bitmap, 0, 0);
565
+ }
566
+
567
+ protected void layout(int w, int h) {
568
+ mWidth = Math.min(mWidth, w);
569
+ mHeight = Math.min(mHeight, h);
570
+ setExtent(mWidth, mHeight);
571
+ }
572
+
573
+ public int calculateZoom(double latDelta, double lonDelta) {
574
+ int zoom1 = calcZoom(latDelta, mWidth);
575
+ int zoom2 = calcZoom(lonDelta, mHeight);
576
+ return zoom1 < zoom2 ? zoom1 : zoom2;
577
+ }
578
+
579
+ public Field getBBField() {
580
+ return this;
581
+ }
582
+
583
+ public double getCenterLatitude() {
584
+ return pixelsToDegreesY(mLatitude, MAX_ZOOM);
585
+ }
586
+
587
+ public double getCenterLongitude() {
588
+ return pixelsToDegreesX(mLongitude, MAX_ZOOM);
589
+ }
590
+
591
+ private void validateCoordinates() {
592
+ if (mLatitude < MIN_LATITUDE) mLatitude = MIN_LATITUDE;
593
+ if (mLatitude > MAX_LATITUDE) mLatitude = MAX_LATITUDE;
594
+ }
595
+
596
+ public void moveTo(double lat, double lon) {
597
+ mLatitude = degreesToPixelsY(lat, MAX_ZOOM);
598
+ mLongitude = degreesToPixelsX(lon, MAX_ZOOM);
599
+ validateCoordinates();
600
+
601
+ //LOG.TRACE("moveTo(" + lat + ", " + lon + "): mLatitude=" + mLatitude + ", mLongitude=" + mLongitude);
602
+ }
603
+
604
+ public void move(int dx, int dy) {
605
+ mLatitude += toMaxZoom(dy, mZoom);
606
+ mLongitude += toMaxZoom(dx, mZoom);
607
+ validateCoordinates();
608
+
609
+ //LOG.TRACE("move(" + dx + ", " + dy + "): mLatitude=" + mLatitude + ", mLongitude=" + mLongitude);
610
+ }
611
+
612
+ public void setMapType(String type) {
613
+ mMapType = type;
614
+ //LOG.TRACE("setMapType: " + mMapType);
615
+ }
616
+
617
+ public void setPreferredSize(int width, int height) {
618
+ mWidth = width;
619
+ mHeight = height;
620
+ }
621
+
622
+ public int getPreferredWidth() {
623
+ return mWidth;
624
+ }
625
+
626
+ public int getPreferredHeight() {
627
+ return mHeight;
628
+ }
629
+
630
+ public void setZoom(int zoom) {
631
+ mZoom = zoom;
632
+ if (mZoom < MIN_ZOOM) mZoom = MIN_ZOOM;
633
+ if (mZoom > MAX_ZOOM) mZoom = MAX_ZOOM;
634
+ LOG.TRACE("setZoom: " + mZoom);
635
+ }
636
+
637
+ public int getMaxZoom() {
638
+ return MAX_ZOOM;
639
+ }
640
+
641
+ public int getMinZoom() {
642
+ return MIN_ZOOM;
643
+ }
644
+
645
+ public int getZoom() {
646
+ return mZoom;
647
+ }
648
+
649
+ private static int calcZoom(double degrees, int pixels) {
650
+ double angleRatio = degrees*TILE_SIZE/pixels;
651
+
652
+ double twoInZoomExp = 360/angleRatio;
653
+ int zoom = (int)MapTools.math_log2(twoInZoomExp);
654
+ return zoom;
655
+ }
656
+
657
+ private static long toMaxZoom(long n, int zoom) {
658
+ if (n == 0) return 0;
659
+ long pow = MapTools.math_pow2(MAX_ZOOM - zoom);
660
+ return n*pow;
661
+ }
662
+
663
+ private static long toCurrentZoom(long coord, int zoom) {
664
+ if (coord == 0) return 0;
665
+ long pow = MapTools.math_pow2(MAX_ZOOM - zoom);
666
+ return coord/pow;
667
+ }
668
+
669
+ private static long degreesToPixelsX(double n, int z) {
670
+ while (n < -180.0) n += 360.0;
671
+ while (n > 180.0) n -= 360.0;
672
+ double angleRatio = 360d/MapTools.math_pow2(z);
673
+ double val = (n + 180)*TILE_SIZE/angleRatio;
674
+ return (long)val;
675
+ }
676
+
677
+ private static long degreesToPixelsY(double n, int z) {
678
+ // Merkator projection
679
+ double sin_phi = MapTools.math_sin(n*PI/180);
680
+ // MAX_SIN - maximum value of sine allowed by Merkator projection
681
+ // (~85.0 degrees of north latitude)
682
+ if (sin_phi < -MAX_SIN) sin_phi = -MAX_SIN;
683
+ if (sin_phi > MAX_SIN) sin_phi = MAX_SIN;
684
+
685
+ double ath = MapTools.math_atanh(sin_phi);
686
+ double val = TILE_SIZE * MapTools.math_pow2(z) * (1 - ath/PI)/2;
687
+ return (long)val;
688
+ }
689
+
690
+ private static double pixelsToDegreesX(long n, int z) {
691
+ while (n < 0) n += MAX_LONGITUDE;
692
+ while (n > MAX_LONGITUDE) n -= MAX_LONGITUDE;
693
+ double angleRatio = 360d/MapTools.math_pow2(z);
694
+ double val = n*angleRatio/TILE_SIZE - 180.0;
695
+ return val;
696
+ }
697
+
698
+ private static double pixelsToDegreesY(long n, int z) {
699
+ // Revert calculation of Merkator projection
700
+ double ath = PI - 2*PI*n/(TILE_SIZE*MapTools.math_pow2(z));
701
+ double th = MapTools.math_tanh(ath);
702
+ double val = 180*MapTools.math_asin(th)/PI;
703
+ return val;
704
+ }
705
+
706
+ private String makeCacheKey(long lat, long lon, int z) {
707
+ while (lon < 0) lon += MAX_LONGITUDE;
708
+ while (lon > MAX_LONGITUDE) lon -= MAX_LONGITUDE;
709
+ long ts = toMaxZoom(TILE_SIZE, z);
710
+ long x = lon/ts;
711
+ long y = lat/ts;
712
+ StringBuffer buf = new StringBuffer();
713
+ buf.append(z);
714
+ buf.append(';');
715
+ buf.append(x);
716
+ buf.append(';');
717
+ buf.append(y);
718
+ String key = buf.toString();
719
+ return key;
720
+ }
721
+
722
+ public long toScreenCoordinateX(double n) {
723
+ long v = degreesToPixelsX(n, mZoom);
724
+ long center = toCurrentZoom(mLongitude, mZoom);
725
+ long begin = center - mWidth/2;
726
+ return v - begin;
727
+ }
728
+
729
+ public long toScreenCoordinateY(double n) {
730
+ long v = degreesToPixelsY(n, mZoom);
731
+ long center = toCurrentZoom(mLatitude, mZoom);
732
+ long begin = center - mHeight/2;
733
+ return v - begin;
734
+ }
735
+
736
+ }