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
data/doc/install.txt CHANGED
@@ -1,25 +1,36 @@
1
1
  # Install Rhodes
2
2
 
3
3
  ## Instant Rhodes (Windows)
4
- The easiest way to install Rhodes on Windows is to use the [Instant Rhodes installer](http://rhomobile.com/instant-rhodes). This will install Ruby, Rubygems, Redis, Rhodes and Rhosync gems and dependencies.
4
+ The easiest way to install Rhodes on Windows is to use the [Instant Rhodes installer](http://rhomobile.com/instant-rhodes). This will install Ruby, Rubygems, Redis, Rhodes and Rhosync gems and dependencies.
5
5
 
6
6
  Once the installer has completed, you can skip to the [Setup Rhodes section](#setup-rhodes).
7
7
 
8
+ ## Java Development Kit
9
+
10
+ You need to have the Java Development Kit (JDK) installed.
11
+
12
+ If you are planning to build for Blackberry or Android, make sure you have JDK version 1.6.0_2 or higher installed. The recommended version is 6.0 update 11.
13
+
14
+ For Macintosh, JDK version 1.6.0_24 for Mac OSX 10.6 is available [here](http://support.apple.com/downloads/DL1360/en_US/JavaForMacOSX10.6Update4.dmg). Install it and then run "Java Preferences" utility to change default version.
15
+
16
+ The Sun JDK for Windows or Linux is available [here](http://java.sun.com/javase/downloads/index.jsp). The 32-bit Windows version of the JDK is required for Blackberry tools.
17
+
18
+ You will want to have your JAVA_HOME variable set; have JAVA_HOME/bin set on your path.
19
+
8
20
  ## Rhodes Gem
9
21
  To install the Rhodes gem, you will need the following tools installed:
10
22
 
11
23
  * [Ruby](http://www.ruby-lang.org/en/) (On Windows, [RubyInstaller](http://rubyinstaller.org) is a convenient way to install Ruby)
12
24
  * [RubyGems](http://docs.rubygems.org/) (RubyGems offers a .tgz, a .zip, and a .gem download. You want the .zip.)
13
25
 
14
- NOTE: Windows doesn't come with the necessary build tools to install gems ('make', for example). There are various ways to get these tools, but the [GnuWin32](http://gnuwin32.sourceforge.net/) project provides the tools, and can be conveniently installed via the [GetGnuWin32](http://sourceforge.net/projects/getgnuwin32/files/) installer.
26
+ NOTE: Windows doesn't come with the necessary build tools to install gems ('make', for example). There are various ways to get these tools, but the GnuWin32 project at http://gnuwin32.sourceforge.net/ provides the tools, and can be conveniently installed via the GetGnuWin32 installer at http://sourceforge.net/projects/getgnuwin32/files/.
15
27
 
16
28
  The first step in using Rhodes is to install the Rhodes gem (you may want to put "sudo" in the front of this command on OS X):
17
29
 
18
30
  :::term
19
31
  $ gem install rhodes
20
32
 
21
-
22
- NOTE: If you get any "`no such file to load -- something`" messages while running the rake tasks or rhodes commands, this can usually be resolved by running '[sudo] gem install something'.
33
+ NOTE: If you get any `no such file to load -- something` messages while running the rake tasks or rhodes commands, this can usually be resolved by putting "sudo" in front of the command, as in `sudo gem install something`.
23
34
 
24
35
  ## Setup Rhodes
25
36
 
data/doc/introduction.txt CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  ## Introduction
4
4
 
5
- Rhodes is a framework for building locally executing, device-optimized mobile applications. These applications are optimized for interacting with transactional enterprise application backends. It is also designed to work with synced local data using a local database such as SQLite or HSQLDB and a generic backend synchronization framework such as [RhoSync](../rhosync) (another open source component available from [Rhomobile](http://rhomobile.com)). Rhodes is available for iPhone, Research in Motion (Blackberry), Windows Mobile, and Android phones.
5
+ Rhodes is a framework for building locally executing, device-optimized mobile applications. These applications are optimized to interact with transactional enterprise application backends. They are also designed to work with synced local data using a local database, such as SQLite or HSQLDB, and a generic backend synchronization framework, such as [RhoSync](../rhosync) (another open source component available from [Rhomobile](http://rhomobile.com)). Rhodes is available for iPhone, Research in Motion (Blackberry), Windows Mobile, and Android phones.
6
6
 
7
- The [Tutorial](tutorial) describes how to install Rhodes and start on building your apps. The rest of this Developer Reference covers all Rhodes features.
7
+ The [Tutorial](tutorial) describes how to install Rhodes and build your apps. The rest of this Developer Reference covers all Rhodes features.
8
8
 
9
9
  ## Supported Operating Systems
10
10
  ### BlackBerry
11
11
  BlackBerry 4.6, 4.7, 5.0, 6.0
12
12
 
13
- NOTE: 4.2 and 4.5 are supported but database access is very slow on this devices.
13
+ NOTE: 4.2 and 4.5 are supported but database access is very slow on these devices.
14
14
 
15
15
  ### Windows Mobile
16
16
  Windows Mobile 6.1 Professional, 6.0 Standard
@@ -23,26 +23,26 @@ All versions of iPhone 3.0 or greater, iPad
23
23
 
24
24
  ## Rhodes Application
25
25
 
26
- Rhodes Application is a web application running locally on the device. It is implement standard MVC architecture:
26
+ A Rhodes application is a web application that runs locally on your mobile device. It is implemented with the standard MVC architecture:
27
27
 
28
- * Views are set of ERB templates, HTML, CSS, and JavaScript files executed by the WebView control available on the device and served by the local web server. That server is very lightweight web server running on the device. See [User Interface](ui) section for more details on [Layouts](ui#view-layouts), [CSS framework](ui#css-framework), [JavaScrip frameworks](ui#javascript-frameworks), [Menus](ui#menu), and [Native UI elements](ui#native-toolbar-control) you may use in the View.
29
- * Controllers are set of usually very simple Ruby scripts in controller.rb files. You have access to many [native device capabilities](device-caps) from your controllers.
30
- * Models are defined by a Ruby script in model.rb file.
28
+ * Views are sets of ERB templates: HTML, CSS, and JavaScript files executed by the WebView control available on the device and served by the local web server. This server is a very lightweight web server running on the device. See [User Interface](ui) section for more details on [Layouts](ui#view-layouts), [CSS framework](ui#css-framework), [JavaScript frameworks](ui#javascript-frameworks), [Menus](ui#menu), and [Native UI elements](ui#native-toolbar-control) that you may use in the View.
29
+ * Controllers are sets of usually very simple Ruby scripts in controller.rb files. You have access to many [native device capabilities](device-caps) from your controllers.
30
+ * Models are defined by a Ruby script in the model.rb file.
31
31
 
32
- See Rhodes [App Structure](application) topic for more details.
32
+ See Rhodes [App Structure](application) for more details.
33
33
 
34
- You may generate Rhodes Application using [rhodes](generator) utility.
34
+ You may generate a Rhodes application using the [rhodes](generator) utility.
35
35
 
36
36
  ## Contributing
37
- Want to add features to Rhodes? Found a bug that you want report or fix?
37
+ Do you want to add features to Rhodes? Have you found a bug that you want report or fix? Read on.
38
38
 
39
- ### Report Rhodes Issues
39
+ ### Reporting Rhodes Issues
40
40
  Please report bugs/features/enhancements to the [google group](http://groups.google.com/group/rhomobile).
41
41
 
42
42
  ### Run Rhodes Specs
43
- First run the rhodes specs to make sure your environment is up-to-date for development (currently the specs only run on OSX):
43
+ You should run the rhodes specs to make sure your development environment is up-to-date (currently the specs only run on OSX):
44
44
 
45
- [Fork](http://help.github.com/forking/) the [Rhodes repository](http://github.com/rhomobile/rhodes).
45
+ [Fork](http://help.github.com/forking/) the [Rhodes repository](http://github.com/rhomobile/rhodes).
46
46
 
47
47
  Clone your new repo:
48
48
  :::term
@@ -54,21 +54,20 @@ Run Rhodes framework_spec and phone_spec targets
54
54
  :::term
55
55
  $ rake run:allspecs
56
56
 
57
-
58
- If everything passes (pending specs are OK), then your environment is ready for development. If you have trouble installing a particular gem or the specs just won't run properly, please feel free to ping the [rhomobile google group](mailto:rhomobile@googlegroups.com) or [hop on IRC](http://webchat.freenode.net/?channels=rhomobile) to chat with other Rhodes developers.
57
+ If everything passes (pending specs are OK), then your environment is ready for development. If you have trouble installing a particular gem, or the specs won't run properly, please feel free to email the [Rhomobile google group](mailto:rhomobile@googlegroups.com) or [hop on IRC](http://webchat.freenode.net/?channels=rhomobile) to chat with other Rhodes developers.
59
58
 
60
59
  ### Contributing your Patch
61
- Now that you're environment is ready, make your changes!
60
+ Now that your environment is ready, make your changes!
62
61
 
63
62
  Create a topic branch:
64
63
  :::term
65
64
  $ git checkout -b cool_new_feature
66
65
 
67
- Write tests, [for example](http://github.com/rhomobile/rhodes/blob/a905e9c9781bfe6e5003e8c8a11cd5418b08df73/spec/framework_spec/app/spec/rhom_object_spec.rb#L239).
66
+ Write tests, [such as this code in a Rhom example](http://github.com/rhomobile/rhodes/blob/a905e9c9781bfe6e5003e8c8a11cd5418b08df73/spec/framework_spec/app/spec/rhom_object_spec.rb#L239).
68
67
 
69
- Make changes...
68
+ Make changes to your project to ready it for others to use.
70
69
 
71
- Add relevant documentation (RDoc, update the README if relevant)
70
+ Add relevant documentation for your project (use RDoc, update the README if relevant).
72
71
 
73
72
  Push to your branch:
74
73
  :::term
@@ -78,7 +77,7 @@ Send a note to the [google group](http://groups.google.com/group/rhomobile)
78
77
 
79
78
  That's it! We recommend following [these ruby style guidelines](http://github.com/chneukirchen/styleguide/blob/master/RUBY-STYLE) when coding.
80
79
 
81
- If you are interested us using your patch to Rhodes you will need to submit a [contribution agreement](http://rhomobile.com/community/contributing/) to us.
80
+ If you are interested in having us use your patch to Rhodes, you will need to submit a [contribution agreement](http://rhomobile.com/community/contributing/) to us.
82
81
 
83
82
  ## Framework Architecture
84
83
 
data/doc/nfc.txt CHANGED
@@ -1,544 +1,1648 @@
1
- # NFC
1
+ # NFC Developer Guide
2
2
 
3
- ## NFC Overview
4
- NFC (Near Field Communication). NFC API provide access to NFC functionality. You can check NFC availability on current device and register callback for listen event when NFC tag near of device. Currently NFC supported only on Android. And also Android version must be 2.3.3 or later.
5
- NFC API implemented in native extension. You should add "nfc" to extension list in your nuild.yml before start using NFC in your application. And also do not forget enable NFC for start process NFC events - Rho::NFCManager.enable.
6
- NFC Ruby API based on Android NFC API. We recommended investigate Android doc for understand NFC Techs etc. See [Android NFC](http://developer.android.com/guide/topics/nfc/index.html)
3
+ The Near Field Communications (NFC) API allows you to use NFC functionality in your Rhodes application. With the NFC API, you can check to see if the mobile device supports NFC, and if so, have it listen for an NFC tag and register a callback if it finds one. You can also have your device push out an NFC tag.
7
4
 
8
- NOTE: Before start using of NFC functionality, do not forget check current platform for supporting of NFC ! Use this : Rho::NFCManager.is_supported
5
+ Example Code
6
+ -----------
7
+ Example code for NFC is located here.
9
8
 
10
- ## NFC events
11
- There are two different NFC callback can be received (you should setup callbacks before!) :
12
- * NFC callback : it executed when Android ACTION_NDEF_DISCOVERED or ACTION_TAG_DISCOVERED events processed.
13
- * NFC Tech callback : it executed when Android ACTION_TECH_DISCOVERED event processed.
14
- In case of current state of NFC support in Android you can receive NFC callback only if your application in foreground. If your application is not run or in background - only ACTION_TECH_DISCOVERED is processed.
15
- For process ACTION_TECH_DISCOVERED event you should setup list of techs in special resource file : [Rhodes ROOT]/lib/extensions/nfc/ext/nfc/platform/android/additional_files/res/xml/filter_nfc.xml. See according Android documentation - [Android ACTION_TECH_DISCOVERED description](http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_TECH_DISCOVERED)
16
- For processing events received when application not run or in background, after start/activate use special method of NfcManager :
9
+ * [Rhodes Webinar Sample: NFC](https://github.com/rhomobile/webinar-samples/tree/master/nfc-rhodes)
10
+ * [Rhodes System API Samples: NFC](https://github.com/rhomobile/rhodes-system-api-samples/tree/master/app/Nfc)
11
+
12
+ ## Generating a Container Model for NFC
13
+
14
+ To create a Rhodes NFC application, you generate a Rhodes application, then you generate an NFC model in that application. Note that the model attributes are stubs in this case; you might not use the model attribute code that is generated.
15
+
16
+ :::term
17
+ $ rhodes app nfc
18
+
19
+ $ (the command line now shows the app being generated)
20
+
21
+ $ cd nfc
22
+ $ rhodes model stub1 stub2
23
+
24
+ ## Setting up build.yml
25
+
26
+ NFC is currently supported only on the Android platform, OS version 2.3.3 or later. You must edit the Android section in your build.yml file for NFC. The version must be 2.3.3 or later, and NFC must be in the extension list.
27
+
28
+ :::text
29
+ android:
30
+ version: 2.3.3
31
+ extensions:
32
+ - nfc
33
+
34
+ ## Enabling NFC on the Mobile Device
35
+
36
+ Before you can send or receive NFC tags on your NFC-capable mobile device, you must enable NFC on the device with the method NFCManager.enable. Also, when your application is in the background, you should enable it to receive NFC tag messages with the method NFCManager.perform_open_application_event.
37
+
38
+ Rhodes has a hook called on_activate_app that is called every time an application using this hook launches, and when that application comes in from the background. You can call this hook in app/application.rb.
39
+
40
+ :::ruby
41
+ def on_activate_app
42
+ # enable NFC on your NFC-capable mobile device
43
+ Rho::NFCManager.enable
44
+
45
+ # Set the method to call for nfc callback
46
+ Rho::NFCManager.set_nfc_callback("/app/Nfc/nfc_callback")
47
+
48
+ # Enable listening for events when the application is in the background
49
+ Rho::NFCManager.perform_open_application_event
50
+ end
51
+
52
+ You can use the method NFCManager.is_supported to see if NFC is supported on your mobile device, and the method NFCManager.is_enabled to see if NFC has been enabled. The method NFCManager.disable disables NFC on your mobile device.
53
+
54
+ ## Setting NFC Callback Methods
55
+
56
+ If your method is going to read or write NFC tags, it also needs to set the callback methods that process the NFC tag. The NFCManager.set_nfc_tech_callback is for reading and writing NFC tags (when the Android ACTION_TECH_DISCOVERED event is processed). NFCManager.set_nfc_callback is for peer-to-peer communication (when the Android ACTION_NDEF_DISCOVERED or ACTION_TAG_DISCOVERED events are processed).
57
+
58
+ For NFCManager.set_nfc_tech_callback (the Android ACTION_TECH_DISCOVERED event), set up your list of techs in a resource file : [Rhodes ROOT]/lib/extensions/nfc/ext/nfc/platform/android/additional_files/res/xml/filter_nfc.xml. Refet to the Android documentation - [Android ACTION_TECH_DISCOVERED description](http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_TECH_DISCOVERED). Here is an example.
59
+
60
+ :::xml
61
+ <?xml version="1.0" encoding="utf-8"?>
62
+ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
63
+ <!-- capture all MIFARE Classics with NDEF payloads -->
64
+ <tech-list>
65
+ <tech>android.nfc.tech.MifareClassic</tech>
66
+ <tech>android.nfc.tech.Ndef</tech>
67
+ </tech-list>
68
+ </resources>
69
+
70
+ You will write the callback methods in your NFC controller method to process your NFC tags: the example below points to the callback methods nfc_callback and nfc_tech_callback in the app/Nfc/nfc_controller.rb file. You can set the NFC callback methods in on_activate_app.
71
+
72
+ :::ruby
73
+ def on_activate_app
74
+ # enable NFC on your NFC-capable mobile device
75
+ Rho::NFCManager.enable
76
+
77
+ # Set the method to call upon an nfc callback
78
+ Rho::NFCManager.set_nfc_callback("/app/Nfc/nfc_callback")
79
+
80
+ # Set the method to call upon an nfc tech callback
81
+ Rho::NFCManager.set_nfc_tech_callback("/app/Nfc/nfc_tech_callback")
82
+
83
+ # Enable listening for events when the application is in the background
84
+ Rho::NFCManager.perform_open_application_event
85
+ end
86
+
87
+ Callbacks can be simple. You could just have the callback method say that it received a tag:
88
+
89
+ :::ruby
90
+ def nfc_callback
91
+ @log = "TAG received: #{Time.now.strftime('%H:%M:%S')}"
92
+ add_to_log(@log)
93
+ end
94
+
95
+ But to read or write NFC message and records from the NFC tag, you first get the current tag, determine the type of tag, and connect to the tag.
96
+
97
+ ## Getting, Determining Type of, and Connecting to a Tag
98
+
99
+ Before you read from or write to a tag, get the tag with the method NFCManager method get_current_Tag. Find out what tech the tag uses with the method NFCTag.get_tech; the tag techs are listed in the NFCTagTechnology class. In this example, the tag is Ndef tech. Connect to the tag with the method NFCTagTechnology.connect.
100
+
101
+ :::ruby
102
+ tag = Rho::NFCManager.get_current_Tag
103
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
104
+ if ndef != nil
105
+ ndef.connect
106
+ # read or write the NFC tag
107
+ end
108
+
109
+ You can now read from or write to the NFC tag.
110
+
111
+ ## Reading an NFC Tag
112
+
113
+ After you get a tag, determine its type, and connect to the tag, you can read from the tag.
114
+
115
+ ### Read the Tag Message and Get Its Records
116
+
117
+ In this example, it is an Ndef tag, so use the NTagTechnology_Ndef.read_NdefMessage method (subclass of NFCTechnology) to read the message. Then get the records from that message: since this is an Ndef tag, use the NTagTechnology_Ndef.get_records method.
118
+
119
+ :::ruby
120
+ # read the ndef tag message and get the records from it.
121
+ msg = ndef.read_NdefMessage
122
+ records = msg.get_records
123
+
124
+ ### Iterate Through the Records and Hash Them
125
+
126
+ Iterate through the records in the message (in the following example, the message has only one record). And since this is an Ndef record, use the NdefRecord method make_hash to make a hash of the record.
127
+
128
+ :::ruby
129
+ # iterate through the array of records and hash the record
130
+ # this example has only one tag, so the array has only one element
131
+ r_a = []
132
+ records.each do |record|
133
+ r_a << record.make_hash
134
+ end
135
+
136
+ ### Grab the Payload from the Hash
137
+
138
+ In the case of the Ndef record, grab the payload from the hash with the payload_as_string part of the hash.
139
+
140
+ :::ruby
141
+ # assign to a variable and print it out
142
+ msg_hash = { 'records' => r_a }
143
+ puts "records after processing: #{msg_hash.inspect}"
144
+ # Assign the string payload from the hash to the result
145
+ result = "Tag Result: " + msg_hash['records'][0]['payload_as_string'] if msg_hash['records'].size > 0
146
+
147
+ ## Writing an NFC tag
148
+
149
+ After you get a tag, determine its type, and connect to the tag, you can write to the tag.
150
+
151
+ To write to an NFC tag, you fill the tag with a message that you create and load with payloads.
152
+
153
+ ### Creating a Message for the NFC tag
154
+
155
+ For an Ndef record, you make payloads for the records in the message. You have several methods you can use to make the payload; the example here uses the NFCManager.make_payload_with_well_known_uri method. The NFC tag will contain the URL for Rhomobile.
156
+
157
+ :::ruby
158
+ payload = Rho::NFCManager.make_payload_with_well_known_uri(0, 'http://www.rhomobile.com')
159
+
160
+ ### Putting the Payload Into The Record
161
+
162
+ For a Ndef record, make a hash and put the payload into it.
163
+
164
+ :::ruby
165
+ hash = { 'id' => [0], 'type' => Rho::NdefRecord::RTD_URI, 'tnf' => Rho::NdefRecord::TNF_WELL_KNOWN, 'payload' => payload}
166
+
167
+ ### Making the Records, Put Records into an Array, Make a Message
168
+
169
+ Then make a record from the hash with the NFCManager method make_NdefRecord_from_hash, put the record(s) into an array, and make a message from the array with the NFCManager method make_NdefMessage_from_array_of_NdefRecord(records).
170
+
171
+ :::ruby
172
+ record = Rho::NFCManager.make_NdefRecord_from_hash(hash)
173
+ records = [record]
174
+ msg = Rho::NFCManager.make_NdefMessage_from_array_of_NdefRecord(records)
175
+
176
+ ### Writing the NFC Message
177
+
178
+ Once an Ndef message is created, you can write it with the NFCTagTechnology_Ndef method write.
179
+
180
+ :::ruby
181
+ ndef.write_NdefMessage(msg)
182
+ puts ' finish write NdefMessage'
183
+
184
+ ## Closing the Connection to the Tag
185
+
186
+ When you are done reading or writing to the NFC tag, close the connection to it with the NFCTagTechnology method close.
187
+
188
+ :::ruby
189
+ ndef.close
190
+
191
+ For example, you can have the following code in your NFC controller method to process NFC tech callbacks.
192
+
193
+ :::ruby
194
+ def nfc_tech_callback
195
+ # Get the current tag
196
+ tag = Rho::NFCManager.get_current_Tag
197
+ # get the tag technology to find out how to process it; it is an ndef tag
198
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
199
+ if ndef != nil
200
+ # connect to the ndef tag
201
+ ndef.connect
202
+ #... read from or write to the NFC tag
203
+ ndef.close
204
+ end
205
+ #...
206
+ end
207
+
208
+ ## Pushing a Peer-to-Peer NFC Tag
209
+
210
+ You can push an NFC tag to another NFC-enabled device with the NFCManager. p2p_enable_foreground_nde_push(msg) method.
211
+
212
+ First, you need to make the payload for the message.
213
+
214
+ :::ruby
215
+ def start_nfc_push
216
+ puts "Sending #{@params['push'].inspect}..."
217
+ payload = Rho::NFCManager.make_payload_with_well_known_text("en", @params['push'])
218
+ #... more processing
219
+ end
220
+
221
+ Then put the payload into the record. This is an Ndef example, so we make a hash, then use the NFCManager.make_NdefRecord_from_hash method to create the record.
222
+
223
+ :::ruby
224
+ hash = {
225
+ 'id' => [0],
226
+ 'type' => Rho::NdefRecord:: RTD_TEXT,
227
+ 'tnf' => Rho::NdefRecord::TNF_WELL_KNOWN,
228
+ 'payload' => payload
229
+ }
230
+ record = Rho::NFCManager.make_NdefRecord_from_hash(hash)
231
+
232
+ Make the record array, then use the NFCManager. make_NdefMessage_from_array_of_NdefRecord(records) method to make the message from the record array.
233
+
234
+ :::ruby
235
+ records = [record]
236
+ msg = Rho::NFCManager.make_NdefMessage_from_array_of_NdefRecord(records)
237
+
238
+ Now you can push the message with the NFCManager. p2p_enable_foreground_nde_push(msg) method.
239
+
240
+ :::ruby
241
+ # start push message
242
+ Rho::NFCManager.p2p_enable_foreground_nde_push(msg)
243
+ @notice = "Started push."
244
+ render :action => :index
245
+ end
246
+
247
+ And when you want to stop pushing the message, use the NFCManager. p2p_disable_foreground_nde_push method.
248
+
249
+ :::ruby
250
+ def stop_nfc_push
251
+ Rho::NFCManager.p2p_disable_foreground_nde_push
252
+ @notice = "Stopped push."
253
+ render :action => :index
254
+ end
255
+
256
+ ## NdefRecord Class API
257
+
258
+ The NdefRecord class contains methods for getting data from NFC Ndef tag records.
259
+
260
+ An Ndef record consists of a hash:
261
+
262
+ :::ruby
263
+ ID = 'id'
264
+ TNF = 'tnf'
265
+ TYPE = 'type'
266
+ PAYLOAD = 'payload'
267
+
268
+ The Type Name Format (TNF part of the hash) is a 3-bit field that indicates how you interprete the type field (TYPE). Here is a list of the TNF values.
269
+
270
+ :::ruby
271
+ TNF_ABSOLUTE_URI = 3
272
+ TNF_EMPTY = 0
273
+ TNF_EXTERNAL_TYPE = 4
274
+ TNF_MIME_MEDIA = 2
275
+ TNF_UNCHANGED = 6
276
+ TNF_UNKNOWN = 5
277
+ TNF_WELL_KNOWN = 1
278
+
279
+ The RTD text type (TYPE part of the hash) is used with the TNF_WELL_KNOWN value.
280
+
281
+ :::ruby
282
+ RTD_TEXT = [0x54] # "T"
283
+ RTD_URI = [0x55] # "U"
284
+ RTD_SMART_POSTER = [0x53, 0x70] # "Sp"
285
+ RTD_ALTERNATIVE_CARRIER = [0x61, 0x63] # "ac"
286
+ RTD_HANDOVER_CARRIER = [0x48, 0x63] # "Hc"
287
+ RTD_HANDOVER_REQUEST = [0x48, 0x72] # "Hr"
288
+ RTD_HANDOVER_SELECT = [0x48, 0x73] # "Hs"
289
+
290
+ Here is some code that creates a hash for an NdefRecord, which will be part of an NFCMessage to be pushed to an NFC-capable mobile device.
291
+
292
+ :::ruby
293
+ hash = { 'id' => [0], 'type' => Rho::NdefRecord::RTD_URI, 'tnf' => Rho::NdefRecord::TNF_WELL_KNOWN, 'payload' => payload}
294
+
295
+ ### NdefRecord get methods
296
+
297
+ You can extract data from an Ndef record with the following methods:
298
+
299
+ :::ruby
300
+ get_id # returns byte[]
301
+ get_tnf # return int
302
+ get_type # returns byte[]
303
+ get_payload # returns byte[]
304
+ get_payload_as_string # returns string
305
+ get_byte_array # returns byte[]
306
+
307
+ Example:
308
+
309
+ :::ruby
310
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
311
+ if ndef != nil
312
+ ndef.connect
313
+ type = ndef.get_type
314
+ #...
315
+ end
316
+
317
+ ### NdefRecord.make_hash
318
+
319
+ The make_hash method returns a hash from an Ndef record, from which you can then extract data with the NdefRecord get methods.
320
+
321
+ #### Returns
322
+
323
+ A hash of the following format:
324
+
325
+ * 'id' - byte[]
326
+ * 'tnf' - int
327
+ * 'type' - byte[]
328
+ * 'payload' - byte[]
329
+ * 'payload_as_string' - string
330
+
331
+ #### Parameters
332
+
333
+ None.
334
+
335
+ #### Example
336
+
337
+ This example steps through a records array, makes a hash of each record, and puts the hash into an array.
338
+
339
+ :::ruby
340
+ r_a = []
341
+ i = 0
342
+ while i < records.size do
343
+ r_a << records[i].make_hash
344
+ i = i+1
345
+ end
346
+
347
+ ### NdefRecord.convert_Tnf_to_string(int)
348
+
349
+ Converts the int value of tnf from an Ndef record hash to a string.
350
+
351
+ #### Returns
352
+
353
+ A string. Text description of the Type Name Format (TNF).
354
+
355
+ #### Parameters
356
+
357
+ int: The tnf from a NdefRecord hash.
358
+
359
+ #### Example
360
+
361
+ :::ruby
362
+ puts 'tnf = '+Rho::NdefRecord.convert_Tnf_to_string(record['tnf'])
363
+
364
+ ### NdefRecord.convert_RTD_to_string(byte[])
365
+
366
+ Converts the byte[] value of rtd from an Ndef record hash to a string.
367
+
368
+ #### Returns
369
+
370
+ A string. Text description of the rtd (type part of the NdefRecord hash).
371
+
372
+ #### Parameters
373
+
374
+ byte[]: The rtd (type) from an NdefRecord hash.
375
+
376
+ #### Example
377
+
378
+ :::ruby
379
+ puts 'type = '+Rho::NdefRecord.convert_RTD_to_string(record['type'])
380
+
381
+ ## NdefMessage Class API
382
+
383
+ Use the NdefMesage class to convert an NdefMessage into a format from which you can extract data.
384
+
385
+ ### NdefMessage.get_byte_array
386
+
387
+ Converts an NdefMessage into a raw byte array.
388
+
389
+ #### Returns
390
+
391
+ byte[] - byte array containing the Ndef message.
392
+
393
+ #### Parameters
394
+
395
+ None.
396
+
397
+ ### NdefMessage.get_records
398
+
399
+ Converts an NdefMessage into an NdefRecord array containing the records in the Ndef Message.
400
+
401
+ #### Returns
402
+
403
+ NdefRecord[] - NdefRecord array containing the records in an NdefMessage.
404
+
405
+ #### Parameters
406
+
407
+ None.
408
+
409
+ #### Example
410
+
411
+ :::ruby
412
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
413
+ if ndef != nil
414
+ ndef.connect
415
+ msg = ndef.read_NdefMessage
416
+ records = msg.get_records
417
+ #...
418
+ end
419
+
420
+ ## NFCTagTechnology Class API
421
+
422
+ Use the NFCTagTechnology to connect to NFC tags and to determine their type.
423
+
424
+ ### NFCTagTechnology Properties
425
+
426
+ The NFCTagTechnology class has several properties to determine the type of the NFC tag.
427
+
428
+ * ISODEP = 'IsoDep'
429
+ * MIFARE_CLASSIC = 'MifareClassic'
430
+ * MIFARE_ULTRALIGHT = 'MifareUltralight'
431
+ * NDEF = 'Ndef'
432
+ * NDEF_FORMATABLE = 'NdefFormatable'
433
+ * NFCA = 'NfcA'
434
+ * NFCB = 'NfcB'
435
+ * NFCF = 'NfcF'
436
+ * NFCV = 'NfcV'
437
+
438
+ ### NFCTagTechnology.get_name
439
+
440
+ This method gets the name of an NFC tag.
441
+
442
+ #### Returns
443
+
444
+ String - the name of the NFC tag.
445
+
446
+ #### Parameters
447
+
448
+ None.
449
+
450
+ ### NFCTagTechnology.connect
451
+
452
+ This method connects to an NFC tag.
453
+
454
+ #### Returns
455
+
456
+ None.
457
+
458
+ #### Parameters
459
+
460
+ None.
461
+
462
+ #### Example
463
+
464
+ :::ruby
465
+ tag = Rho::NFCManager.get_current_Tag
466
+ if tag != nil
467
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
468
+ if ndef != nil
469
+ puts ' Ndef is supported !'
470
+ ndef.connect
471
+ connected = ndef.is_connected
472
+ puts ' Ndef.isConnected() = '+connected.to_s
473
+ #...
474
+ end
475
+ #...
476
+ end
477
+
478
+ ### NFCTagTechnology.close
479
+
480
+ Closes a connection with an NFC tag.
481
+
482
+ #### Returns
483
+
484
+ None.
485
+
486
+ #### Parameters
487
+
488
+ None.
489
+
490
+ #### Example
491
+
492
+ :::ruby
493
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
494
+ if ndef != nil
495
+ ndef.connect
496
+ msg = ndef.read_NdefMessage
497
+ records = msg.get_records
498
+ r_a = []
499
+ records.each do |record|
500
+ r_a << record.make_hash
501
+ end
502
+ msg_hash = { 'records' => r_a }
503
+ result = "Tag Result: " + msg_hash['records'][0]['payload_as_string'] if msg_hash['records'].size > 0
504
+
505
+ ndef.close
506
+
507
+ ### NFCTagTechnology.is_connected
508
+
509
+ This method returns true if the application is connected with an NFC tag, false otherwise.
510
+
511
+ #### Returns
512
+
513
+ True or false.
514
+
515
+ #### Parameters
516
+
517
+ None.
518
+
519
+ #### Example
520
+
521
+ :::ruby
522
+ tag = Rho::NFCManager.get_current_Tag
523
+ if tag != nil
524
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
525
+ if ndef != nil
526
+ ndef.connect
527
+ connected = ndef.is_connected
528
+ puts ' Ndef.isConnected() = '+connected.to_s
529
+
530
+ ## NFCTagTechnology_NfcA Class API
531
+
532
+ Subset of NFCTagTechnology class.
533
+
534
+ ### NFCTagTechnology_NfcA.get_Atqa
535
+
536
+ Gets a byte array containing Atqa.
537
+
538
+ #### Returns
539
+
540
+ byte[] - Atqa.
541
+
542
+ #### Parameters
543
+
544
+ None.
545
+
546
+ ### NFCTagTechnology_NfcA.get_Sak
547
+
548
+ Gets a int containing Sak.
549
+
550
+ #### Returns
551
+
552
+ int - Sak.
553
+
554
+ #### Parameters
555
+
556
+ None.
557
+
558
+ ### NFCTagTechnology_NfcA.transceive(data)
559
+
560
+ Sends data (a byte array) to a tag and receives result in a byte array.
561
+
562
+ #### Returns
563
+
564
+ byte[] - data received from the tag.
565
+
566
+ #### Parameters
567
+
568
+ data - byte[] sent to the tag.
569
+
570
+ ## NFCTagTechnology_Ndef Class API
571
+
572
+ Subset of NFCTagTechnology class.
573
+
574
+ MIFARE_CLASSIC = 'com.nxp.ndef.mifareclassic'
575
+ NFC_FORUM_TYPE_1 = 'org.nfcforum.ndef.type1'
576
+ NFC_FORUM_TYPE_2 = 'org.nfcforum.ndef.type2'
577
+ NFC_FORUM_TYPE_3 = 'org.nfcforum.ndef.type3'
578
+ NFC_FORUM_TYPE_4 = 'org.nfcforum.ndef.type4'
579
+
580
+ ### NFCTagTechnology_Ndef.get_max_size
581
+
582
+ Gets the maximum size of the Ndef tag.
583
+
584
+ #### Returns
585
+
586
+ int - Maximum size of the Ndef tag.
587
+
588
+ #### Parameters
589
+
590
+ None.
591
+
592
+ #### Example
593
+
594
+ :::ruby
595
+ tag = Rho::NFCManager.get_current_Tag
596
+ if tag != nil
597
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
598
+ if ndef != nil
599
+ puts ' Ndef is supported !'
600
+ ndef.connect
601
+ puts ' max_size = '+ndef.get_max_size.to_s
602
+ #...
603
+ end
604
+ #...
605
+ end
606
+
607
+ ### NFCTagTechnology_Ndef.is_writable
608
+
609
+ Returns true if the Ndef tag is writeable, false otherwise.
610
+
611
+ #### Returns
612
+
613
+ bool - True if the tag is writeable, false otherwise.
614
+
615
+ #### Parameters
616
+
617
+ None.
618
+
619
+ #### Example
620
+
621
+ :::ruby
622
+ tag = Rho::NFCManager.get_current_Tag
623
+ if tag != nil
624
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
625
+ if ndef != nil
626
+ puts ' Ndef is supported !'
627
+ ndef.connect
628
+ puts ' is_writable = '+ndef.is_writable.to_s
629
+ #...
630
+ end
631
+ #...
632
+ end
633
+
634
+ ### NFCTagTechnology_Ndef.can_make_read_only
635
+
636
+ Returns true if the Ndef tag can be made read only, false otherwise.
637
+
638
+ #### Returns
639
+
640
+ bool - True if the tag can be made read only, false otherwise.
641
+
642
+ #### Parameters
643
+
644
+ None.
645
+
646
+ #### Example
647
+
648
+ :::ruby
649
+ tag = Rho::NFCManager.get_current_Tag
650
+ if tag != nil
651
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
652
+ if ndef != nil
653
+ puts ' Ndef is supported !'
654
+ ndef.connect
655
+ puts ' can_make_read_only = '+ndef.can_make_read_only.to_s
656
+ #...
657
+ end
658
+ #...
659
+ end
660
+
661
+ ### NFCTagTechnology_Ndef.make_read_only
662
+
663
+ Returns true if the Ndef tag is made read only, false otherwise.
664
+
665
+ #### Returns
666
+
667
+ bool - True if the tag is made read only, false otherwise.
668
+
669
+ #### Parameters
670
+
671
+ None.
672
+
673
+ ### NFCTagTechnology_Ndef.get_type
674
+
675
+ Returns a string containing the type of the Ndef tag.
676
+
677
+ #### Returns
678
+
679
+ string - The type of the Ndef tag.
680
+
681
+ #### Parameters
682
+
683
+ None.
684
+
685
+ #### Example
686
+
687
+ :::ruby
688
+ tag = Rho::NFCManager.get_current_Tag
689
+ if tag != nil
690
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
691
+ if ndef != nil
692
+ puts ' Ndef is supported !'
693
+ ndef.connect
694
+ type = ndef.get_type
695
+ puts ' type = '+type
696
+ #...
697
+ end
698
+ #...
699
+ end
700
+
701
+ ### NFCTagTechnology_Ndef.read_NdefMessage
702
+
703
+ Returns an NdefMessage read from an Ndef tag.
704
+
705
+ #### Returns
706
+
707
+ NdefMessage - The message contained in the Ndef tag.
708
+
709
+ #### Parameters
710
+
711
+ None.
712
+
713
+ #### Example
714
+
715
+ :::ruby
716
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
717
+ if ndef != nil
718
+ ndef.connect
719
+ msg = ndef.read_NdefMessage
720
+ #... process the message
721
+ end
722
+
723
+ ### NFCTagTechnology_Ndef.write_NdefMessage(msg)
724
+
725
+ Returns an NdefMessage read from an Ndef tag.
726
+
727
+ #### Returns
728
+
729
+ None.
730
+
731
+ #### Parameters
732
+
733
+ msg - an NdefMessage written to an Ndef tag.
734
+
735
+ #### Example
736
+
737
+ :::ruby
738
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
739
+ if ndef != nil
740
+ ndef.connect
741
+ #... create the message to write
742
+ ndef.write_NdefMessage(msg)
743
+ end
744
+
745
+ ## NFCTagTechnology_MifareClassic Class API
746
+
747
+ Subset of NFCTagTechnology.
748
+
749
+ ### Constants
750
+
751
+ :::term
752
+ KEY_DEFAULT = [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]
753
+ KEY_MIFARE_APPLICATION_DIRECTORY = [0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5]
754
+ KEY_NFC_FORUM =[0xD3, 0xF7, 0xD3, 0xF7, 0xD3, 0xF7]
755
+
756
+ ### Types
757
+
758
+ :::term
759
+ TYPE_CLASSIC = 0
760
+ TYPE_PLUS = 1
761
+ TYPE_PRO = 2
762
+ TYPE_UNKNOWN = -1
763
+
764
+ ### NFCTagTechnology_MifareClassic.get_type
765
+
766
+ Returns the type of a MifareClassic tag.
767
+
768
+ #### Returns
769
+
770
+ int - the tag type.
771
+
772
+ #### Parameters
773
+
774
+ None.
775
+
776
+ ### NFCTagTechnology_MifareClassic.convert_type_to_string(type)
777
+
778
+ Returns the named type of a MifareClassic tag.
779
+
780
+ #### Returns
781
+
782
+ type - A string containing the tag type.
783
+
784
+ #### Parameters
785
+
786
+ None.
787
+
788
+ ### NFCTagTechnology_MifareClassic.write_block(index, block)
789
+
790
+ Writes a block to a MifareClassic tag.
791
+
792
+ #### Returns
793
+
794
+ None.
795
+
796
+ #### Parameters
797
+
798
+ index - integer, the index to where in the tag sector the block will be written.
799
+ block - a 16 byte array written to the tag.
800
+
801
+ ### NFCTagTechnology_MifareClassic.read_block(index)
802
+
803
+ Reads a block from a MifareClassic tag.
804
+
805
+ #### Returns
806
+
807
+ A 16 byte array.
808
+
809
+ #### Parameters
810
+
811
+ index - integer, the index to where in the tag sector the block is read from.
812
+
813
+ ### NFCTagTechnology_MifareClassic.get_size
814
+
815
+ Return the size in bytes of a MifareClassic tag.
816
+
817
+ #### Returns
818
+
819
+ The size in bytes of a MifareClassic tag.
820
+
821
+ #### Parameters
822
+
823
+ None.
824
+
825
+ ### NFCTagTechnology_MifareClassic.get_block_count
826
+
827
+ Return the number of blocks in a MifareClassic tag.
828
+
829
+ #### Returns
830
+
831
+ The number of blocks in a MifareClassic tag.
832
+
833
+ #### Parameters
834
+
835
+ None.
836
+
837
+ ### NFCTagTechnology_MifareClassic.get_sector_count
838
+
839
+ Return the sector count in a MifareClassic tag.
840
+
841
+ #### Returns
842
+
843
+ The sector count in a MifareClassic tag.
844
+
845
+ #### Parameters
846
+
847
+ None.
848
+
849
+ ### NFCTagTechnology_MifareClassic.get_blocks_in_sector_count(index)
850
+
851
+ Returns the number of blocks in a sector in a MifareClassic tag.
852
+
853
+ #### Returns
854
+
855
+ The number of blocks in the sector.
856
+
857
+ #### Parameters
858
+
859
+ index - the index to a sector.
860
+
861
+ ### NFCTagTechnology_MifareClassic.sector_to_block(index)
862
+
863
+ Returns the index of the first block in a sector in a MifareClassic tag.
864
+
865
+ #### Returns
866
+
867
+ The index of the first block in a sector.
868
+
869
+ #### Parameters
870
+
871
+ index - the index to the current sector.
872
+
873
+ ### NFCTagTechnology_MifareClassic.authenticate_sector_with_key_A(index, key)
874
+
875
+ Authenticates a sector with a key. Returns true if the authenticate was passed.
876
+
877
+ #### Returns
878
+
879
+ True if the authenticate was passed.
880
+
881
+ #### Parameters
882
+
883
+ index - the index to the current sector.
884
+ key - a 6 byte array containing the key.
885
+
886
+ ### NFCTagTechnology_MifareClassic.authenticate_sector_with_key_B(index, key)
887
+
888
+ Authenticates a sector with a key. Returns true if the authenticate was passed.
889
+
890
+ #### Returns
891
+
892
+ True if the authenticate was passed.
893
+
894
+ #### Parameters
895
+
896
+ index - the index to the current sector.
897
+ key - a 6 byte array containing the key.
898
+
899
+ ### NFCTagTechnology_MifareClassic.transceive(data)
900
+
901
+ Sends data (a byte array) to a tag and receives result in a byte array.
902
+
903
+ #### Returns
904
+
905
+ byte[] - data received from the tag.
906
+
907
+ #### Parameters
908
+
909
+ data - byte[] sent to the tag.
910
+
911
+ ## NFCTagTechnology_MifareUltralight Class API
912
+
913
+ Subclass of NFCTagTechnology.
914
+
915
+ TYPE_ULTRALIGHT = 1
916
+ TYPE_ULTRALIGHT_C = 2
917
+ TYPE_UNKNOWN = -1
918
+
919
+ ### NFCTagTechnology_MifareUltralight.get_type
920
+
921
+ Returns the type of a MifareUltralight tag.
922
+
923
+ #### Returns
924
+
925
+ int - the tag type.
926
+
927
+ #### Parameters
928
+
929
+ None.
930
+
931
+ ### NFCTagTechnology_MifareUltralight.write_page(index, block)
932
+
933
+ Write a page to a MifareUltralight tag.
934
+
935
+ #### Returns
936
+
937
+ None.
938
+
939
+ #### Parameters
940
+
941
+ index - integer
942
+ block - 4 byte array
943
+
944
+ ### NFCTagTechnology_MifareUltralight.read_page(index)
945
+
946
+ Reads a page from a MifareUltralight tag.
947
+
948
+ #### Returns
949
+
950
+ 16 byte array.
951
+
952
+ #### Parameters
953
+
954
+ index - integer
955
+
956
+ ### NFCTagTechnology_MifareUltralight.transceive(data)
957
+
958
+ Sends data (a byte array) to a tag and receives result in a byte array.
959
+
960
+ #### Returns
961
+
962
+ byte[] - data received from the tag.
963
+
964
+ #### Parameters
965
+
966
+ data - byte[] sent to the tag.
967
+
968
+ ## NFCTagTechnology_IsoDep Class API
969
+
970
+ Subclass of NFCTagTechnology.
971
+
972
+ ### NFCTagTechnology_IsoDep.get_hi_layer_responce
973
+
974
+ Returns the hi layer response.
975
+
976
+ #### Returns
977
+
978
+ byte[] - hi layer response.
979
+
980
+ #### Parameters
981
+
982
+ None.
983
+
984
+ ### NFCTagTechnology_IsoDep.get_historical_bytes
985
+
986
+ Returns the historical bytes.
987
+
988
+ #### Returns
989
+
990
+ byte[] - historical bytes.
991
+
992
+ #### Parameters
993
+
994
+ None.
995
+
996
+ ### NFCTagTechnology_IsoDep.set_timeout(timeout)
997
+
998
+ Sets a timeout.
999
+
1000
+ #### Returns
1001
+
1002
+ None.
1003
+
1004
+ #### Parameters
1005
+
1006
+ int - the timeout.
1007
+
1008
+ ### NFCTagTechnology_IsoDep.transceive(data)
1009
+
1010
+ Sends data (a byte array) to a tag and receives result in a byte array.
1011
+
1012
+ #### Returns
1013
+
1014
+ byte[] - data received from the tag.
1015
+
1016
+ #### Parameters
1017
+
1018
+ data - byte[] sent to the tag.
1019
+
1020
+ ## NFCTagTechnology_NdefFormatable Class API
1021
+
1022
+ Subclass of NFCTagTechnology.
1023
+
1024
+ ### NFCTagTechnology_NdefFormatable.format(msg)
1025
+
1026
+ Formats a NdefMessage to NdefFormatable format.
1027
+ QUESTION: Needs a correct definition.
1028
+
1029
+ #### Returns
1030
+
1031
+ None.
1032
+
1033
+ #### Parameters
1034
+
1035
+ msg - NdefMessage.
1036
+
1037
+ ### NFCTagTechnology_NdefFormatable.format_read_only(msg)
1038
+
1039
+ Formats a NdefMessage to NdefFormatable read-only format.
1040
+ QUESTION: Needs a correct definition.
1041
+
1042
+ #### Returns
1043
+
1044
+ None.
1045
+
1046
+ #### Parameters
1047
+
1048
+ msg - NdefMessage.
1049
+
1050
+ ## NFCTagTechnology_NfcB Class API
1051
+
1052
+ Subclass of NFCTagTechnology.
1053
+
1054
+ ### NFCTagTechnology_NfcB.get_application_data
1055
+
1056
+ Gets application data from an NfcB tag.
1057
+
1058
+ #### Returns
1059
+
1060
+ byte[] - the application data.
1061
+
1062
+ #### Parameters
1063
+
1064
+ None.
1065
+
1066
+ ### NFCTagTechnology_NfcB.get_protocol_info
1067
+
1068
+ Gets protocol information from an NfcB tag.
1069
+
1070
+ #### Returns
1071
+
1072
+ byte[] - the protocol information.
1073
+
1074
+ #### Parameters
1075
+
1076
+ None.
1077
+
1078
+ ### NFCTagTechnology_NfcB.transceive(data)
1079
+
1080
+ Sends data (a byte array) to a tag and receives result in a byte array.
1081
+
1082
+ #### Returns
1083
+
1084
+ byte[] - data received from the tag.
1085
+
1086
+ #### Parameters
1087
+
1088
+ data - byte[] sent to the tag.
1089
+
1090
+ ## NFCTagTechnology_NfcF Class API
1091
+
1092
+ Subset of NFCTagTechnology.
1093
+
1094
+ ### NFCTagTechnology_NfcF.get_manufacturer
1095
+
1096
+ #### Returns
1097
+
1098
+ byte[] - the manufacturer.
1099
+
1100
+ #### Parameters
1101
+
1102
+ None.
1103
+
1104
+ ### NFCTagTechnology_NfcF.get_system_code
1105
+
1106
+ #### Returns
1107
+
1108
+ byte[] - the system code.
1109
+
1110
+ #### Parameters
1111
+
1112
+ None.
1113
+
1114
+ ### NFCTagTechnology_NfcF.transceive(data)
1115
+
1116
+ Sends data (a byte array) to a tag and receives result in a byte array.
1117
+
1118
+ #### Returns
1119
+
1120
+ byte[] - data received from the tag.
1121
+
1122
+ #### Parameters
1123
+
1124
+ data - byte[] sent to the tag.
1125
+
1126
+ ## NFCTagTechnology_NfcV Class API
1127
+
1128
+ Subset of NFCTagTechnology.
1129
+
1130
+ ### NFCTagTechnology_NfcV.get_dsf_id
1131
+
1132
+ #### Returns
1133
+
1134
+ int - the dsf ID.
1135
+
1136
+ #### Parameters
1137
+
1138
+ None.
1139
+
1140
+ ### NFCTagTechnology_NfcV.get_responce_flags
1141
+
1142
+ #### Returns
1143
+
1144
+ int - the response flags.
1145
+
1146
+ #### Parameters
1147
+
1148
+ None.
1149
+
1150
+ ### NFCTagTechnology_NfcV.transceive(data)
1151
+
1152
+ Sends data (a byte array) to a tag and receives result in a byte array.
1153
+
1154
+ #### Returns
1155
+
1156
+ byte[] - data received from the tag.
1157
+
1158
+ #### Parameters
1159
+
1160
+ data - byte[] sent to the tag.
1161
+
1162
+ ## NFCTag Class API
1163
+
1164
+ Use the NFCTag class to get the NFC tag in certain formats, such as Ndef.
1165
+
1166
+ ### NFCTag.get_tech(tech_name)
1167
+
1168
+ This method returns an object with the implementation of the requested NFC tech based on the NFCTagTechnology class.
1169
+
1170
+ #### Returns
1171
+
1172
+ An object with the implementation of the requested NFC tech based on the NFCTagTechnology class. Refer to the NFCTagTechnology class for the types of NFC tech you can request.
1173
+
1174
+ #### Parameters
1175
+
1176
+ tech_name - Tech name based on the NFCTagTechnology class.
1177
+
1178
+ #### Example
1179
+
1180
+ :::ruby
1181
+ tag = Rho::NFCManager.get_current_Tag
1182
+ if tag != nil
1183
+ ndef = tag.get_tech(Rho::NFCTagTechnology::NDEF)
1184
+ if ndef != nil
1185
+ puts ' Ndef is supported !'
1186
+ ndef.connect
1187
+ connected = ndef.is_connected
1188
+ puts ' Ndef.isConnected() = '+connected.to_s
1189
+ #... read from or write to the tag
1190
+ end
1191
+
1192
+ ### NFCTag.get_tech_list
1193
+
1194
+ This method returns a string array containing the NFC tag.
1195
+
1196
+ #### Returns
1197
+
1198
+ A string array containing the NFC tag.
1199
+
1200
+ #### Parameters
1201
+
1202
+ None.
1203
+
1204
+ ### NFCTag.get_ID
1205
+
1206
+ This method returns a byte array containing the NFC tag ID.
1207
+
1208
+ #### Returns
1209
+
1210
+ byte[] - A byte array containing the NFC tag ID.
1211
+
1212
+ #### Parameters
1213
+
1214
+ None.
1215
+
1216
+ ## NFCManager Class API
1217
+
1218
+ Use NFCManager to manage NFC messages and records that your NFC application sends and receives.
1219
+
1220
+ Methods:
1221
+
1222
+ * is_supported
1223
+ * enable
1224
+ * is_enabled
1225
+ * disable
1226
+ * set_nfc_callback(url)
1227
+ * set_nfc_tech_callback(url)
1228
+ * get_current_Tag
1229
+ * perform_open_application_event
1230
+ * p2p_enable_foreground_nde_push
1231
+ * p2p_disable_foreground_nde_push
1232
+ * make_NdefRecord_from_byte_array(array)
1233
+ * make_NdefRecord_from_hash(hash)
1234
+ * make_NdefMessage_from_array_of_NdefRecord(array)
1235
+ * make_string_from_payload(payload, tnf, type)
1236
+ * make_payload_with_absolute_uri(uri_string)
1237
+ * make_payload_with_well_known_uri(prefix_code, uri_string)
1238
+ * make_payload_with_well_known_text(language, text)
1239
+
1240
+ ### Callback Tag Message Storage
1241
+
1242
+ The NFC callback stores the NFC tag messages in a hash array:
1243
+
1244
+ @params['messages'] - array of NFC tag messages. Each message is a hash.
1245
+
1246
+ The messages can be picked up in 'raw_message', an array of bytes containing the raw message. The messages can also be picked up in 'records', an array of records where each record is a hash. The records use the NFC Data Exchange Format. Each record has the following hash items.
1247
+
1248
+ * 'raw_record' - Array of bytes. The raw record.
1249
+ * 'id' - Array of bytes. The tag ID.
1250
+ * 'payload' - Array of bytes.
1251
+ * 'tnf' - Int. The Type Name Format.
1252
+ * 'type' - array of bytes
1253
+ * 'payload_as_string' - String. The message payload in a string (support special formats for URI, TEXT).
1254
+ * 'subrecords' - message hash (only for SMART_POSTER type)
1255
+
1256
+ ### NFCManager.is_supported
1257
+
1258
+ This method returns true if the mobile device supports NFC, false otherwise.
1259
+
1260
+ #### Returns
1261
+
1262
+ True or false.
1263
+
1264
+ #### Parameters
1265
+
1266
+ None.
1267
+
1268
+ #### Example
1269
+
1270
+ :::ruby
1271
+ def index
1272
+ $status = Rho::NFCManager.is_enabled.to_s
1273
+ # See if NFC supported and save that info in a string
1274
+ $supported = Rho::NFCManager.is_supported.to_s
1275
+ $log = ''
1276
+ Rho::NFCManager.set_nfc_callback(url_for(:action => :nfc_callback))
1277
+ Rho::NFCManager.set_nfc_tech_callback(url_for(:action => :nfc_tech_callback))
1278
+
1279
+ puts 'NfcController.index'
1280
+ render
1281
+ end
1282
+
1283
+ ### NFCManager.enable
1284
+
1285
+ The enable method enables NFC event processing on your mobile device. Your nfc and nfc_tech callback methods are executed only if Rhodes NFC is enabled. On Android, when Rhodes NFC is enabled and the application activity is in the foreground, the activity gets high priority for NFC events. Android will not show additional UI for the select Activity for Tag processing; the Rhodes applciation will processed the tag.
1286
+
1287
+ #### Returns
1288
+
1289
+ None.
1290
+
1291
+ #### Parameters
1292
+
1293
+ None.
1294
+
1295
+ #### Example
1296
+
1297
+ :::ruby
1298
+ # Enable NFC functionality and set up callbacks.
1299
+ def on_activate_app
1300
+ Rho::NFCManager.enable
1301
+ Rho::NFCManager.set_nfc_callback("/app/Nfc/nfc_callback")
1302
+ Rho::NFCManager.set_nfc_tech_callback("/app/Nfc/nfc_tech_callback")
1303
+ Rho::NFCManager.perform_open_application_event
1304
+ end
1305
+
1306
+ ### NFCManager.disable
1307
+
1308
+ This method disables your application from receiving NFC events. Your application will not be able to receive NFC tags.
1309
+
1310
+ #### Returns
1311
+
1312
+ None.
1313
+
1314
+ #### Parameters
1315
+
1316
+ None.
1317
+
1318
+ #### Example
17
1319
 
18
1320
  :::ruby
19
- Rho::NFCManager.perform_open_application_event
1321
+ # Disable the NFC functionality and set a status string accordingly
1322
+ def do_disable
1323
+ Rho::NFCManager.disable
1324
+ $status = Rho::NFCManager.is_disabled.to_s
1325
+ set_status($status)
1326
+ end
1327
+
1328
+ ### NFCManager.is_enabled
1329
+
1330
+ This method returns true if the mobile device has been enabled for NFC, false otherwise.
1331
+
1332
+ #### Returns
1333
+
1334
+ True or false.
1335
+
1336
+ #### Parameters
1337
+
1338
+ None.
20
1339
 
21
- In Tech callback access to Techs by get current Tag and request tech list/tech suport objects like this :
1340
+ #### Example
22
1341
 
23
1342
  :::ruby
24
- tag = Rho::NFCManager.get_current_Tag
25
- mifareClassic = tag.get_tech(Rho::NFCTagTechnology::MIFARE_CLASSIC)
26
- if mifareClassic != nil
27
- puts 'MifareClassic is supported !'
28
- mifareClassic.connect
1343
+ def do_enable
1344
+ Rho::NFCManager.enable
1345
+ $status = Rho::NFCManager.is_enabled.to_s
1346
+ set_status($status)
1347
+ end
1348
+
1349
+ ### NFCManager.set_nfc_callback(string), NFCManager.set_nfc_tech_callback(string)
1350
+
1351
+ The set_nfc_callback method tells your application what callback to perform when it receives an NFC tag and your application is in the foreground. set_nfc_callback executes when the Android events ACTION_NDEF_DISCOVERED or ACTION_TAG_DISCOVERED are processed.
1352
+
1353
+ The set_nfc_tech_callback method tells your application what callback to perform when it receives an NFC tag and your application is in the background. The set_nfc_tech_callback method executes when the Android event ACTION_TECH_DISCOVERED is processed.
1354
+
1355
+ #### Returns
1356
+
1357
+ None.
1358
+
1359
+ ### Parameters
29
1360
 
30
- ## NdefMessage NdefRecord
1361
+ string - url. The path to the method in the NFC controller that is executed on NFC callback.
31
1362
 
32
- NFC Message contain list of NdefRecord. You can read/write NdefMessage when you access to Tag via Ndef/NdefFormatable techs. Also you should send NdefMessage when you use P2P NFC functionality.
33
- Example of construct NdefMessage for P2P send:
1363
+ ### Example:
34
1364
 
35
1365
  :::ruby
36
- payload = Rho::NFCManager.make_payload_with_well_known_uri(0, 'http://www.rhomobile.com')
37
- hash = { 'id' => [0], 'type' => Rho::NdefRecord::RTD_URI, 'tnf' => Rho::NdefRecord::TNF_WELL_KNOWN, 'payload' => payload}
38
- record = Rho::NFCManager.make_NdefRecord_from_hash(hash)
39
- records = [record]
40
- msg = Rho::NFCManager.make_NdefMessage_from_array_of_NdefRecord(records)
41
- # start push message
42
- Rho::NFCManager.p2p_enable_foreground_nde_push(msg)
43
-
1366
+ def on_activate_app
1367
+ Rho::NFCManager.enable
1368
+
1369
+ # Perform the nfc_callback or nfc_tech_callback method in
1370
+ # nfc_controller.rb on nfc callback
1371
+ Rho::NFCManager.set_nfc_callback("/app/Nfc/nfc_callback")
1372
+ Rho::NFCManager.set_nfc_tech_callback("/app/Nfc/nfc_tech_callback")
1373
+
1374
+ Rho::NFCManager.perform_open_application_event
1375
+ end
1376
+
1377
+ ### NFCManager.get_current_Tag
1378
+
1379
+ This method returns the current NFCTag that the mobile device has just read, or returns nil if no tag has been discovered.
1380
+
1381
+ #### Returns
1382
+
1383
+ NFCTag. An NFC tag.
44
1384
 
45
- ## NFC API
1385
+ #### Parameters
1386
+
1387
+ None.
1388
+
1389
+ #### Example
46
1390
 
47
1391
  :::ruby
48
- module Rho
49
-
50
-
51
- class NdefRecord
52
-
53
- # 3-bit TNF (Type Name Format) field: Indicates how to interpret the type field
54
- TNF_ABSOLUTE_URI = 3
55
- TNF_EMPTY = 0
56
- TNF_EXTERNAL_TYPE = 4
57
- TNF_MIME_MEDIA = 2
58
- TNF_UNCHANGED = 6
59
- TNF_UNKNOWN = 5
60
- TNF_WELL_KNOWN = 1
61
-
62
- # RTD Text types. For use with TNF_WELL_KNOWN
63
- RTD_TEXT = [0x54] # "T"
64
- RTD_URI = [0x55] # "U"
65
- RTD_SMART_POSTER = [0x53, 0x70] # "Sp"
66
- RTD_ALTERNATIVE_CARRIER = [0x61, 0x63] # "ac"
67
- RTD_HANDOVER_CARRIER = [0x48, 0x63] # "Hc"
68
- RTD_HANDOVER_REQUEST = [0x48, 0x72] # "Hr"
69
- RTD_HANDOVER_SELECT = [0x48, 0x73] # "Hs"
70
-
71
- ID = 'id'
72
- TNF = 'tnf'
73
- TYPE = 'type'
74
- PAYLOAD = 'payload'
75
-
76
-
77
- # return byte[]
78
- def get_id
79
- end
80
-
81
- # return int
82
- def get_tnf
83
- end
84
-
85
- # return byte[]
86
- def get_type
87
- end
88
-
89
- # return byte[]
90
- def get_payload
91
- end
92
-
93
- # return string
94
- def get_payload_as_string
95
- end
96
-
97
- # return raw byte[]
98
- def get_byte_array
99
- end
100
-
101
- # return hash
102
- # hash :
103
- # 'id' - byte[]
104
- # 'tnf' - int
105
- # 'type' - byte[]
106
- # 'payload' - byte[]
107
- # 'payload_as_string' - string
108
- def make_hash
109
- end
110
-
111
- # convert int tnf to string
112
- def self.convert_Tnf_to_string(tnf)
113
- end
114
-
115
- # convert byte[] type to string
116
- def self.convert_RTD_to_string(rtd)
117
- end
118
-
119
- end
120
-
121
-
122
- class NdefMessage
123
-
124
-
125
- # return raw byte[]
126
- def get_byte_array
127
- end
128
-
129
- # return array of NdefRecord
130
- def get_records
131
- end
132
-
133
-
134
- end
135
-
136
-
137
-
138
- class NFCTagTechnology
139
-
140
- ISODEP = 'IsoDep'
141
- MIFARE_CLASSIC = 'MifareClassic'
142
- MIFARE_ULTRALIGHT = 'MifareUltralight'
143
- NDEF = 'Ndef'
144
- NDEF_FORMATABLE = 'NdefFormatable'
145
- NFCA = 'NfcA'
146
- NFCB = 'NfcB'
147
- NFCF = 'NfcF'
148
- NFCV = 'NfcV'
149
-
150
- # return string
151
- def get_name
152
- end
153
-
154
- # connect - only after it you can make any I/O operation
155
- def connect
156
- end
157
-
158
- # close connect - make it after your I/O operations
159
- def close
1392
+ def nfc_tech_callback
1393
+ @msg = 'Tech received! Reading tag...'
1394
+ add_to_log(@msg)
1395
+ tag = Rho::NFCManager.get_current_Tag
1396
+ if tag != nil
1397
+ @msg = test_ndef_read(tag)
1398
+ else
1399
+ @msg = "Tag is nil!"
160
1400
  end
161
-
162
- # return true if tech connected and ready for I/O operations
163
- def is_connected
164
- end
165
-
1401
+ add_to_log(@msg)
166
1402
  end
167
-
168
-
169
- class NFCTagTechnology_NfcA < NFCTagTechnology
170
-
171
- # return byte[]
172
- def get_Atqa
173
- end
174
-
175
- # return int
176
- def get_Sak
177
- end
178
-
179
- # data - byte[]
180
- # return byte[]
181
- def transceive(data)
182
- end
183
-
184
- end
185
-
186
- class NFCTagTechnology_Ndef < NFCTagTechnology
187
-
188
- MIFARE_CLASSIC = 'com.nxp.ndef.mifareclassic'
189
- NFC_FORUM_TYPE_1 = 'org.nfcforum.ndef.type1'
190
- NFC_FORUM_TYPE_2 = 'org.nfcforum.ndef.type2'
191
- NFC_FORUM_TYPE_3 = 'org.nfcforum.ndef.type3'
192
- NFC_FORUM_TYPE_4 = 'org.nfcforum.ndef.type4'
193
-
194
- # return int
195
- def get_max_size
196
- end
197
-
198
- # return bool
199
- def is_writable
200
- end
201
-
202
- # return bool
203
- def can_make_read_only
204
- end
205
-
206
- # return bool
207
- def make_read_only
208
- end
209
-
210
- # return string
211
- def get_type
212
- end
213
-
214
- # return NdefMessage
215
- def read_NdefMessage
216
- end
217
-
218
- # msg - NdefMessage
219
- def write_NdefMessage(msg)
220
- end
221
-
222
-
223
- end
224
-
225
-
226
- class NFCTagTechnology_MifareClassic < NFCTagTechnology
227
-
228
- KEY_DEFAULT = [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]
229
- KEY_MIFARE_APPLICATION_DIRECTORY = [0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5]
230
- KEY_NFC_FORUM =[0xD3, 0xF7, 0xD3, 0xF7, 0xD3, 0xF7]
231
-
232
- TYPE_CLASSIC = 0
233
- TYPE_PLUS = 1
234
- TYPE_PRO = 2
235
- TYPE_UNKNOWN = -1
236
-
237
- # return int type type
238
- def get_type
239
- end
240
-
241
- # return named type (for known types)
242
- def self.convert_type_to_string(type)
243
- end
244
-
245
- # index - integer
246
- # block - 16 byte array
247
- def write_block(index, block)
248
- end
249
-
250
- # index - integer
251
- # return 16 byte array
252
- def read_block(index)
253
- end
254
-
255
- # return size in bytes
256
- def get_size
257
- end
258
-
259
- #return number of blocks
260
- def get_block_count
261
- end
262
-
263
- # return count of sectors
264
- def get_sector_count
265
- end
266
-
267
- # return count of blocks in sector
268
- def get_blocks_in_sector_count(index)
269
- end
270
-
271
- # return index of first block in sector
272
- def sector_to_block(index)
273
- end
274
-
275
- # authenticate sector with key
276
- # key is 6 byte array
277
- # return true if authenticate was passed
278
- def authenticate_sector_with_key_A(index, key)
279
- end
280
-
281
- # authenticate sector with key
282
- # key is 6 byte array
283
- # return true if authenticate was passed
284
- def authenticate_sector_with_key_B(index, key)
285
- end
286
-
287
- # send data (byte array) to Tag and receive result - byte array
288
- def transceive(data)
289
- end
290
-
1403
+
1404
+ ### NFCManager.perform_open_application_event
1405
+
1406
+ Call the perform_open_application_event method to have your application listen for NFC tags when it is in the background. When your application is in the background or it has not started, then the NFC event was saved, and the application open/start process is executed. To process that NFC event, your application needs to call perform_open_application_event.
1407
+
1408
+ #### Returns
1409
+
1410
+ None.
1411
+
1412
+ #### Parameters
1413
+
1414
+ None.
1415
+
1416
+ #### Example:
1417
+
1418
+ :::ruby
1419
+ def on_activate_app
1420
+ Rho::NFCManager.enable
1421
+
1422
+ # Perform the nfc_callback or nfc_tech_callback method in
1423
+ # nfc_controller.rb on nfc callback
1424
+ Rho::NFCManager.set_nfc_callback("/app/Nfc/nfc_callback")
1425
+ Rho::NFCManager.set_nfc_tech_callback("/app/Nfc/nfc_tech_callback")
1426
+
1427
+ Rho::NFCManager.perform_open_application_event
291
1428
  end
292
-
293
- class NFCTagTechnology_MifareUltralight < NFCTagTechnology
294
-
295
- TYPE_ULTRALIGHT = 1
296
- TYPE_ULTRALIGHT_C = 2
297
- TYPE_UNKNOWN = -1
298
-
299
- # return int
300
- def get_type
301
- end
302
-
303
- # index - integer
304
- # block - 4 byte array
305
- def write_page(index, block)
306
- end
307
-
308
- # index - integer
309
- # return 16 byte array
310
- def read_pages(index)
311
- end
312
-
313
- # send data (byte array) to Tag and receive result - byte array
314
- def transceive(data)
315
- end
316
-
1429
+
1430
+ ### NFCManager.p2p_enable_foreground_nde_push(NDefMessage)
1431
+
1432
+ The p2p_enable_foreground_nde_push method causes your mobile device to push an NFC message (NdefMessage) for any NFC-enabled device to receive.
1433
+
1434
+ #### Returns
1435
+
1436
+ None.
1437
+
1438
+ #### Parameters
1439
+
1440
+ NdefMessage - The NFC message that is pushed.
1441
+
1442
+ #### Example
1443
+
1444
+ :::ruby
1445
+ def do_p2p_enable
1446
+ # prepare NdefMessage for send to another device
1447
+ payload = Rho::NFCManager.make_payload_with_well_known_uri(0, 'http://www.rhomobile.com')
1448
+ hash = { 'id' => [0], 'type' => Rho::NdefRecord::RTD_URI, 'tnf' => Rho::NdefRecord::TNF_WELL_KNOWN, 'payload' => payload}
1449
+ record = Rho::NFCManager.make_NdefRecord_from_hash(hash)
1450
+ records = [record]
1451
+ msg = Rho::NFCManager.make_NdefMessage_from_array_of_NdefRecord(records)
1452
+ # start push message
1453
+ Rho::NFCManager.p2p_enable_foreground_nde_push(msg)
1454
+ add_to_log('Enable PUSH P2P')
1455
+ set_log($log)
317
1456
  end
318
-
319
-
320
- class NFCTagTechnology_IsoDep < NFCTagTechnology
321
-
322
- # return byte[]
323
- def get_hi_layer_responce
324
- end
325
-
326
- # return byte[]
327
- def get_historical_bytes
328
- end
329
-
330
-
331
- # timeout - int
332
- def set_timeout(timeout)
333
- end
334
-
335
- # data - byte[]
336
- # return byte[]
337
- def transceive(data)
338
- end
339
-
340
- end
341
-
342
-
343
- class NFCTagTechnology_NdefFormatable < NFCTagTechnology
344
-
345
- # msg - NdefMessage
346
- def format(msg)
347
- end
348
-
349
- # msg - NdefMessage
350
- def format_read_only(msg)
351
- end
352
-
353
- end
354
-
355
-
356
- class NFCTagTechnology_NfcB < NFCTagTechnology
357
-
358
- # return byte[]
359
- def get_application_data
360
- end
361
-
362
- # return byte[]
363
- def get_protocol_info
364
- end
365
-
366
-
367
- # data - byte[]
368
- # return byte[]
369
- def transceive(data)
370
- end
371
-
372
- end
373
-
374
-
375
- class NFCTagTechnology_NfcF < NFCTagTechnology
376
-
377
- # return byte[]
378
- def get_manufacturer
379
- end
380
-
381
- # return byte[]
382
- def get_system_code
383
- end
384
-
385
-
386
- # data - byte[]
387
- # return byte[]
388
- def transceive(data)
389
- end
390
-
391
- end
392
-
393
-
394
- class NFCTagTechnology_NfcV < NFCTagTechnology
395
-
396
- # return int
397
- def get_dsf_id
398
- end
399
-
400
- # return int
401
- def get_responce_flags
402
- end
403
-
404
-
405
- # data - byte[]
406
- # return byte[]
407
- def transceive(data)
408
- end
409
-
410
- end
411
-
412
-
413
-
414
- class NFCTag
415
-
416
- # return array of string
417
- def get_tech_list
418
- end
419
-
420
- # return byte[]
421
- def get_ID
422
- end
423
-
424
- # return object with implementation of requested tech (based on NFCTagTechnology)
425
- def get_tech(tech_name)
426
- end
427
-
1457
+
1458
+ ### NFCManager.p2p_disable_foreground_nde_push
1459
+
1460
+ The p2p_disable_foreground_nde_push method causes your mobile device to stop pushing NFC messages to any other NFC-enabled devices that can receive them.
1461
+
1462
+ #### Returns
1463
+
1464
+ None.
1465
+
1466
+ #### Parameters
1467
+
1468
+ None.
1469
+
1470
+ #### Example
1471
+
1472
+ :::ruby
1473
+ def do_p2p_disable
1474
+ # stop push message
1475
+ Rho::NFCManager.p2p_disable_foreground_nde_push
1476
+ add_to_log('Disable PUSH P2P')
1477
+ set_log($log)
428
1478
  end
429
-
430
-
431
-
432
-
433
-
434
- class NFCManager
435
-
436
-
437
- # return true/false
438
- def self.is_supported
439
- end
1479
+
1480
+ ### NFCManager.make_NdefRecord_from_byte_array(array)
1481
+
1482
+ The make_NdefRecord_from_byte_array method creates a record for an NFC tag message (NdefRecord) from a byte array.
1483
+
1484
+ #### Returns
1485
+
1486
+ NdefRecord - An Ndef record.
1487
+
1488
+ #### Parameters
1489
+
1490
+ array - a byte array containing a raw NFC record.
1491
+
1492
+ ### NFCManager.make_NdefRecord_from_hash(hash)
1493
+
1494
+ The make_NdefRecord_from_hash method creates a record for an NFC tag message (NdefRecord) from a hash.
1495
+
1496
+ #### Returns
1497
+
1498
+ NdefRecord - An Ndef record.
1499
+
1500
+ #### Parameters
1501
+
1502
+ @params['Tag_event'] - 'discovered'
1503
+
1504
+ @params['messages'] - array of messages. Each message is a hash.
1505
+ * 'id' - Array of bytes. The tag ID.
1506
+ * 'tnf' - Int. The Type Name Format.
1507
+ * 'type' - Array of bytes. The payload type.
1508
+ * 'payload' - Array of bytes. The message payload.
1509
+
1510
+ #### Example
1511
+
1512
+ :::ruby
1513
+ def do_p2p_enable
1514
+ # prepare an NdefMessage for sending to another device
1515
+ payload = Rho::NFCManager.make_payload_with_well_known_uri(0, 'http://www.rhomobile.com')
440
1516
 
441
- def self.enable
442
- end
443
-
444
- def self.disable
445
- end
446
-
447
- # return true/false
448
- def self.is_enabled
449
- end
450
-
451
- # in callback
452
- # @params['messages'] - array of messages (each message is hash)
453
- # message hash items :
454
- # 'raw_message' - array of bytes (raw message)
455
- # 'records' - array of records (each record is hash)
456
- # record hash items :
457
- # 'raw_record' - array of bytes (raw record)
458
- # 'id' - array of bytes
459
- # 'payload' - array of bytes
460
- # 'tnf' - int
461
- # 'type' - array of bytes
462
- # 'payload_as_string' - string, payload prepared to string (support specail formats for URI, TEXT)
463
- # 'subrecords' - message hash (only for SMART_POSTER type)
1517
+ # Create a hash -- id, tnf, type, payload -- for an NFC record
1518
+ hash = { 'id' => [0], 'type' => Rho::NdefRecord::RTD_URI, 'tnf' => Rho::NdefRecord::TNF_WELL_KNOWN, 'payload' => payload}
464
1519
 
465
- # set callback for tech events (Tag discovered/lost, tech special events)
466
- def self.set_nfc_callback(callback_url)
467
- end
468
-
469
- # in callback
470
- # @params['Tag_event'] - 'discovered'
471
- def self.set_nfc_tech_callback(callback_url)
472
- end
473
-
474
- # return current discovered Tag or nil if not any Tag discovered now
475
- def self.get_current_Tag
476
- end
477
-
478
- # call this function after application is started and you setup all functionality for process NFC event
479
- # when application in background or not started, then NFC event was saved and application open/start process executed
480
- # for process saved event - call this function
481
- def self.perform_open_application_event
482
- end
483
-
484
- # ndef_message - NdefMessage
485
- # start push NdefMessage to any receivers
486
- def self.p2p_enable_foreground_nde_push(ndef_message)
487
- end
488
-
489
- # stop any push NdefMessage to receivers
490
- def self.p2p_disable_foreground_nde_push
491
- end
492
-
493
-
494
- # make NdefRecord from byte[]
495
- def self.make_NdefRecord_from_byte_array(array)
496
- end
497
-
498
- # make NdefRecord from hash
499
- # hash :
500
- # 'id' - byte[]
501
- # 'tnf' - int
502
- # 'type' - byte[]
503
- # 'payload' - byte[]
504
- def self.make_NdefRecord_from_hash(hash)
505
- end
506
-
507
- # make NdefMessage from byte[]
508
- def self.make_NdefMessage_from_byte_array(array)
509
- end
510
-
511
- # make NdefMessage from NdefRecord[]
512
- def self.make_NdefMessage_from_array_of_NdefRecord(array)
513
- end
514
-
515
- # make string from byte[] payload
516
- # tnf - int (from NdefRecord)
517
- # type - byte[] (from NdefRecord)
518
- def self.make_string_from_payload(payload, tnf, type)
519
- end
1520
+ # Create the NFC record with that hash
1521
+ record = Rho::NFCManager.make_NdefRecord_from_hash(hash)
1522
+ records = [record]
520
1523
 
521
- # prepare byte[] payload from string with Absolute URI
522
- def self.make_payload_with_absolute_uri(uri_string)
523
- end
524
-
525
- # prepare byte[] payload from int prefix code and string URI
526
- def self.make_payload_with_well_known_uri(prefix_code, uri_string)
527
- end
528
-
529
- # prepare byte[] payload from string language code and string text
530
- def self.make_payload_with_well_known_text(language, text)
531
- end
532
-
533
-
1524
+ msg = Rho::NFCManager.make_NdefMessage_from_array_of_NdefRecord(records)
1525
+
1526
+ # start push message
1527
+ Rho::NFCManager.p2p_enable_foreground_nde_push(msg)
534
1528
  end
535
-
1529
+
1530
+
1531
+ ### NFCManager.make_NdefMessage_from_byte_array(array)
1532
+
1533
+ The make_NdefMessage_from_byte_array method creates an NFC tag message (NdefMessage) from a byte array.
1534
+
1535
+ #### Returns
1536
+
1537
+ A NFC message (NdefMessage).
1538
+
1539
+ #### Parameters
1540
+
1541
+ array - a byte array containing a raw NFC message.
1542
+
1543
+ ### NFCManager.make_NdefMessage_from_array_of_NdefRecord(array)
1544
+
1545
+ The make_NdefMessage_from_byte_array method creates an NFC tag message (NdefMessage) from an array of records (NdefRecord, such as what you get from make_NdefRecord_from_hash).
1546
+
1547
+ #### Returns
1548
+
1549
+ An NFC message (NdefMessage).
1550
+
1551
+ #### Parameters
1552
+
1553
+ array - an array of records (NdefRecord).
1554
+
1555
+ #### Example
1556
+
1557
+ :::ruby
1558
+ def do_p2p_enable
1559
+ # prepare an NdefMessage for sending to another device
1560
+ payload = Rho::NFCManager.make_payload_with_well_known_uri(0, 'http://www.rhomobile.com')
1561
+ # Create a hash -- id, tnf, type, payload -- for an NFC record
1562
+ hash = { 'id' => [0], 'type' => Rho::NdefRecord::RTD_URI, 'tnf' => Rho::NdefRecord::TNF_WELL_KNOWN, 'payload' => payload}
1563
+ # Create the NFC record with that hash
1564
+ record = Rho::NFCManager.make_NdefRecord_from_hash(hash)
1565
+ records = [record]
1566
+ # Create the NdefMessage from the NdefRecord (just one record in array)
1567
+ msg = Rho::NFCManager.make_NdefMessage_from_array_of_NdefRecord(records)
1568
+ # start push message
1569
+ Rho::NFCManager.p2p_enable_foreground_nde_push(msg)
1570
+ add_to_log('Enable PUSH P2P')
1571
+ set_log($log)
1572
+ end
1573
+
1574
+ ### NFCManager.make_string_from_payload(payload, tnf, type)
1575
+
1576
+ The make_string_from_payload method creates a string from the payload of an NFC tag message record (NdefRecord).
1577
+
1578
+ #### Returns
1579
+
1580
+ A string containing the payload of an NFC tag message record.
1581
+
1582
+ #### Parameters
1583
+
1584
+ * payload - a byte array containing the payload.
1585
+ * tnf - int. The Type Name Format. From NdefRecord.
1586
+ * type - Array of bytes. The payload type. From NdefRecord.
1587
+
1588
+ ### NFCManager.make_payload_with_absolute_uri(uri_string)
1589
+
1590
+ The make_payload_with_absolute_uri method prepares a byte array for an NFC record payload from a string with an absolute URI.
1591
+
1592
+ #### Returns
1593
+
1594
+ A byte array for an NFC record payload.
1595
+
1596
+ #### Parameters
1597
+
1598
+ uri_string - a string containing an absolute URI.
1599
+
1600
+ #### Example
1601
+
1602
+ :::ruby
1603
+ payload = Rho::NFCManager.make_payload_with_absolute_uri('http://www.rhomobile.com')
1604
+
1605
+ ### NFCManager.make_payload_with_well_known_uri(prefix_code, uri_string)
1606
+
1607
+ The make_payload_with_absolute_uri method prepares a byte array for an NFC record payload from a string with an absolute URI.
1608
+
1609
+ #### Returns
1610
+
1611
+ A byte array for an NFC record payload.
1612
+
1613
+ #### Parameters
1614
+
1615
+ * prefix_code - an int containing a prefix code.
1616
+ * uri_string - a string containing an absolute URI.
1617
+
1618
+ #### Example
1619
+
1620
+ :::ruby
1621
+ def do_p2p_enable
1622
+ # prepare an NdefMessage for sending to another device
1623
+ payload = Rho::NFCManager.make_payload_with_well_known_uri(0, 'http://www.rhomobile.com')
1624
+ # Create a hash -- id, tnf, type, payload -- for an NFC record
1625
+ hash = { 'id' => [0], 'type' => Rho::NdefRecord::RTD_URI, 'tnf' => Rho::NdefRecord::TNF_WELL_KNOWN, 'payload' => payload}
1626
+ # Create the NFC record with that hash
1627
+ record = Rho::NFCManager.make_NdefRecord_from_hash(hash)
1628
+ records = [record]
1629
+ # Create the NdefMessage from the NdefRecord (just one record in array)
1630
+ msg = Rho::NFCManager.make_NdefMessage_from_array_of_NdefRecord(records)
1631
+ # start push message
1632
+ Rho::NFCManager.p2p_enable_foreground_nde_push(msg)
1633
+ add_to_log('Enable PUSH P2P')
1634
+ set_log($log)
536
1635
  end
537
1636
 
1637
+ ### NFCManager.make_payload_with_well_known_text(language, text)
538
1638
 
1639
+ The make_payload_with_well_known_text method prepares a byte array for an NFC record payload from a string language code and a string text.
539
1640
 
540
- ## Example of NFC API using
1641
+ #### Returns
541
1642
 
542
- You can find complete example of using NFC API in [Rhodes-System-Api-Samples](http://github.com/rhomobile/rhodes-system-api-samples). See NFC Demo page - [NFC Demo](http://github.com/rhomobile/rhodes-system-api-samples/tree/master/app/Nfc/).
1643
+ A byte array for an NFC record payload.
543
1644
 
1645
+ #### Parameters
544
1646
 
1647
+ * language - a string containing a language code.
1648
+ * text - a string containing an absolute URI.