rhoconnect-client 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +9 -0
  3. data/CREDITS +0 -0
  4. data/LICENSE +9 -0
  5. data/README.md +47 -0
  6. data/ext/rhoconnect-client/RhoConnectClient.rb +190 -0
  7. data/ext/rhoconnect-client/ext/RhoConnectClient.xml +726 -0
  8. data/ext/rhoconnect-client/ext/build +26 -0
  9. data/ext/rhoconnect-client/ext/build.bat +30 -0
  10. data/ext/rhoconnect-client/ext/platform/android/ext_java.files +1 -0
  11. data/ext/rhoconnect-client/ext/platform/android/ext_native.files +14 -0
  12. data/ext/rhoconnect-client/ext/platform/android/src/com/rhoconnectclient/RhoconnectClient.java +1 -0
  13. data/ext/rhoconnect-client/ext/platform/iphone/.gitignore +1 -0
  14. data/ext/rhoconnect-client/ext/platform/iphone/Rakefile +74 -0
  15. data/ext/rhoconnect-client/ext/platform/iphone/RhoconnectClient.xcodeproj/project.pbxproj +390 -0
  16. data/ext/rhoconnect-client/ext/platform/iphone/RhoconnectClient_Prefix.pch +7 -0
  17. data/ext/rhoconnect-client/ext/platform/iphone/impl/readme.txt +7 -0
  18. data/ext/rhoconnect-client/ext/platform/qt/Rakefile +35 -0
  19. data/ext/rhoconnect-client/ext/platform/qt/rhoconnect-client.pro +88 -0
  20. data/ext/rhoconnect-client/ext/platform/wm/Rhoconnect-client.sln +36 -0
  21. data/ext/rhoconnect-client/ext/platform/wm/Rhoconnect-client.vcproj +774 -0
  22. data/ext/rhoconnect-client/ext/platform/wm/Rhoconnect-client.vsprops +15 -0
  23. data/ext/rhoconnect-client/ext/platform/wm/src/rhoconnectclient_wm.cpp +40 -0
  24. data/ext/rhoconnect-client/ext/platform/wm/src/rhoconnectclient_wm.h +2 -0
  25. data/ext/rhoconnect-client/ext/platform/wp8/Rhoconnect-client.props +22 -0
  26. data/ext/rhoconnect-client/ext/platform/wp8/Rhoconnect-client.sln +32 -0
  27. data/ext/rhoconnect-client/ext/platform/wp8/Rhoconnect-client.vcxproj +220 -0
  28. data/ext/rhoconnect-client/ext/platform/wp8/Rhoconnect-client.vcxproj.filters +103 -0
  29. data/ext/rhoconnect-client/ext/shared/RhoConnectClientImpl.cpp +273 -0
  30. data/ext/rhoconnect-client/ext/shared/RhoConnectClientImpl.h +60 -0
  31. data/ext/rhoconnect-client/ext/shared/RhoConnectClientSingletonImpl.h +53 -0
  32. data/ext/rhoconnect-client/ext/shared/initRhoconnectClient.cpp +207 -0
  33. data/ext/rhoconnect-client/ext/shared/rhoconnectclient.c +18 -0
  34. data/ext/rhoconnect-client/ext/shared/sync/ClientRegister.cpp +398 -0
  35. data/ext/rhoconnect-client/ext/shared/sync/ClientRegister.h +147 -0
  36. data/ext/rhoconnect-client/ext/shared/sync/ISyncProtocol.h +91 -0
  37. data/ext/rhoconnect-client/ext/shared/sync/SyncEngine.cpp +1245 -0
  38. data/ext/rhoconnect-client/ext/shared/sync/SyncEngine.h +213 -0
  39. data/ext/rhoconnect-client/ext/shared/sync/SyncNotify.cpp +737 -0
  40. data/ext/rhoconnect-client/ext/shared/sync/SyncNotify.h +209 -0
  41. data/ext/rhoconnect-client/ext/shared/sync/SyncProtocol_3.h +220 -0
  42. data/ext/rhoconnect-client/ext/shared/sync/SyncProtocol_4.h +259 -0
  43. data/ext/rhoconnect-client/ext/shared/sync/SyncSource.cpp +1694 -0
  44. data/ext/rhoconnect-client/ext/shared/sync/SyncSource.h +212 -0
  45. data/ext/rhoconnect-client/ext/shared/sync/SyncThread.cpp +583 -0
  46. data/ext/rhoconnect-client/ext/shared/sync/SyncThread.h +250 -0
  47. data/ext/rhoconnect-client/ext.yml +12 -0
  48. data/lib/build/run_rhoconnect_spec.rb +135 -0
  49. data/lib/rhoconnect-client.rb +3 -0
  50. data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1673 -0
  51. data/platform/shared/RhoConnectClient/RhoConnectClient.h +181 -0
  52. data/platform/shared/RhoConnectClient/RhoError.h +77 -0
  53. data/rhoconnect-client/C++/Tests/RhoConnectClientTest.cpp +830 -0
  54. data/rhoconnect-client/C++/Tests/win32/.gitignore +3 -0
  55. data/rhoconnect-client/C++/Tests/win32/RhoConnectClient.sln +65 -0
  56. data/rhoconnect-client/C++/Tests/win32/RhoConnectClient.vcproj +634 -0
  57. data/rhoconnect-client/C++/Tests/win32/RhoConnectClientTest/RhoConnectClientTest.vcproj +222 -0
  58. data/rhoconnect-client/C++/Tests/win32/RhoConnectClientTest/stdafx.h +65 -0
  59. data/rhoconnect-client/C++/Tests/win32/stdafx.h +65 -0
  60. data/rhoconnect-client/CHANGELOG +18 -0
  61. data/rhoconnect-client/Java/Android/build/android.rake +387 -0
  62. data/rhoconnect-client/Java/Android/build/android_sdk.rb +582 -0
  63. data/rhoconnect-client/Java/Android/build/libcurl_build.files +73 -0
  64. data/rhoconnect-client/Java/Android/build/libjson_build.files +9 -0
  65. data/rhoconnect-client/Java/Android/build/librhocommon_build.files +14 -0
  66. data/rhoconnect-client/Java/Android/build/librhodb_build.files +5 -0
  67. data/rhoconnect-client/Java/Android/build/librhoimpl_build.files +13 -0
  68. data/rhoconnect-client/Java/Android/build/librholog_build.files +4 -0
  69. data/rhoconnect-client/Java/Android/build/libsqlite_build.files +1 -0
  70. data/rhoconnect-client/Java/Android/build/libsync_build.files +7 -0
  71. data/rhoconnect-client/Java/Android/build/libunzip_build.files +1 -0
  72. data/rhoconnect-client/Java/Android/build/rhoconnectclient_build.files +3 -0
  73. data/rhoconnect-client/Java/Android/build/rhoimpljava_build.files +21 -0
  74. data/rhoconnect-client/Java/Android/src/com/rhomobile/rhodes/Capabilities.java +63 -0
  75. data/rhoconnect-client/Java/Android/src/com/rhomobile/rhodes/MemoryInfoCollector.java +79 -0
  76. data/rhoconnect-client/Java/Android/src/com/rhomobile/rhodes/util/ContextFactory.java +63 -0
  77. data/rhoconnect-client/Java/Android/test/.classpath +9 -0
  78. data/rhoconnect-client/Java/Android/test/.project +33 -0
  79. data/rhoconnect-client/Java/Android/test/AndroidManifest.xml +14 -0
  80. data/rhoconnect-client/Java/Android/test/assets/apps/androidtest.png +0 -0
  81. data/rhoconnect-client/Java/Android/test/assets/apps/rhoconfig.txt +19 -0
  82. data/rhoconnect-client/Java/Android/test/assets/apps/rhoconfig.txt.timestamp +1 -0
  83. data/rhoconnect-client/Java/Android/test/assets/db/syncdb.schema +44 -0
  84. data/rhoconnect-client/Java/Android/test/assets/db/syncdb.triggers +10 -0
  85. data/rhoconnect-client/Java/Android/test/assets/db/syncdb_java.triggers +21 -0
  86. data/rhoconnect-client/Java/Android/test/assets/rho.dat +9 -0
  87. data/rhoconnect-client/Java/Android/test/proguard.cfg +36 -0
  88. data/rhoconnect-client/Java/Android/test/project.properties +11 -0
  89. data/rhoconnect-client/Java/Android/test/res/drawable-hdpi/icon.png +0 -0
  90. data/rhoconnect-client/Java/Android/test/res/drawable-ldpi/icon.png +0 -0
  91. data/rhoconnect-client/Java/Android/test/res/drawable-mdpi/icon.png +0 -0
  92. data/rhoconnect-client/Java/Android/test/res/layout/main.xml +12 -0
  93. data/rhoconnect-client/Java/Android/test/res/values/strings.xml +5 -0
  94. data/rhoconnect-client/Java/Android/test/rhoimpl.jar +0 -0
  95. data/rhoconnect-client/Java/Android/test/src/com/rhomobile/rhoconnect_client_test/TestRhoConnectClient.java +343 -0
  96. data/rhoconnect-client/Java/Android/test/src/com/rhomobile/rhoconnect_client_test/TestRhoConnectClientBlobs.java +219 -0
  97. data/rhoconnect-client/Java/RhoConnect/.classpath +6 -0
  98. data/rhoconnect-client/Java/RhoConnect/.project +93 -0
  99. data/rhoconnect-client/Java/RhoConnect/assets/apps/rhoconfig.txt +19 -0
  100. data/rhoconnect-client/Java/RhoConnect/assets/apps/rhoconfig.txt.timestamp +1 -0
  101. data/rhoconnect-client/Java/RhoConnect/assets/db/syncdb.schema +44 -0
  102. data/rhoconnect-client/Java/RhoConnect/assets/db/syncdb.triggers +10 -0
  103. data/rhoconnect-client/Java/RhoConnect/assets/db/syncdb_java.triggers +21 -0
  104. data/rhoconnect-client/Java/RhoConnect/assets/rho.dat +8 -0
  105. data/rhoconnect-client/Java/RhoConnect/jni/include/RhoConnectJniNotify.h +61 -0
  106. data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectClient.h +181 -0
  107. data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectNotify.h +13 -0
  108. data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectNotify_IDelegate.h +13 -0
  109. data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectObjectNotify.h +13 -0
  110. data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectObjectNotify_IDelegate.h +13 -0
  111. data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhomModel.h +103 -0
  112. data/rhoconnect-client/Java/RhoConnect/jni/include/rhojava.inc +76 -0
  113. data/rhoconnect-client/Java/RhoConnect/jni/src/RhoConnectJniClient.cpp +401 -0
  114. data/rhoconnect-client/Java/RhoConnect/jni/src/RhoConnectJniModel.cpp +332 -0
  115. data/rhoconnect-client/Java/RhoConnect/jni/src/RhoConnectJniNotify.cpp +223 -0
  116. data/rhoconnect-client/Java/RhoConnect/jni/src/RhoConnectUtil.cpp +82 -0
  117. data/rhoconnect-client/Java/RhoConnect/jni/src/RhodesApp.cpp +114 -0
  118. data/rhoconnect-client/Java/RhoConnect/src/com/rhomobile/rhoconnect/RhoConnectClient.java +108 -0
  119. data/rhoconnect-client/Java/RhoConnect/src/com/rhomobile/rhoconnect/RhoConnectNotify.java +78 -0
  120. data/rhoconnect-client/Java/RhoConnect/src/com/rhomobile/rhoconnect/RhoConnectObjectNotify.java +71 -0
  121. data/rhoconnect-client/Java/RhoConnect/src/com/rhomobile/rhoconnect/RhomModel.java +195 -0
  122. data/rhoconnect-client/JavaScript/.classpath +10 -0
  123. data/rhoconnect-client/JavaScript/.gitignore +4 -0
  124. data/rhoconnect-client/JavaScript/.project +17 -0
  125. data/rhoconnect-client/JavaScript/README.textile +1 -0
  126. data/rhoconnect-client/JavaScript/build.xml +185 -0
  127. data/rhoconnect-client/JavaScript/doc/fsm-sample.js +44 -0
  128. data/rhoconnect-client/JavaScript/doc/fsm-sample.png +0 -0
  129. data/rhoconnect-client/JavaScript/src/RhoSyncJS.gwt.xml +21 -0
  130. data/rhoconnect-client/JavaScript/stubs/RhoSyncStubsJS.gwt.xml +21 -0
  131. data/rhoconnect-client/JavaScript/stubs/com/rho/Capabilities.java +7 -0
  132. data/rhoconnect-client/JavaScript/stubs/com/rho/IRhoRubyHelper.java +7 -0
  133. data/rhoconnect-client/JavaScript/stubs/com/rho/Mutex.java +5 -0
  134. data/rhoconnect-client/JavaScript/stubs/com/rho/RhoAppAdapter.java +39 -0
  135. data/rhoconnect-client/JavaScript/stubs/com/rho/RhoClassFactory.java +29 -0
  136. data/rhoconnect-client/JavaScript/stubs/com/rho/RhoConf.java +100 -0
  137. data/rhoconnect-client/JavaScript/stubs/com/rho/RhoEmptyLogger.java +7 -0
  138. data/rhoconnect-client/JavaScript/stubs/com/rho/RhoEmptyProfiler.java +5 -0
  139. data/rhoconnect-client/JavaScript/stubs/com/rho/RhoLogger.java +32 -0
  140. data/rhoconnect-client/JavaScript/stubs/com/rho/RhoProfiler.java +27 -0
  141. data/rhoconnect-client/JavaScript/stubs/com/rho/RhodesApp.java +25 -0
  142. data/rhoconnect-client/JavaScript/stubs/com/rho/TimeInterval.java +22 -0
  143. data/rhoconnect-client/JavaScript/stubs/com/rho/Tokenizer.java +23 -0
  144. data/rhoconnect-client/JavaScript/stubs/com/rho/db/DBAdapter.java +174 -0
  145. data/rhoconnect-client/JavaScript/stubs/com/rho/db/DBAttrManager.java +15 -0
  146. data/rhoconnect-client/JavaScript/stubs/com/rho/db/DBException.java +5 -0
  147. data/rhoconnect-client/JavaScript/stubs/com/rho/db/IDBResult.java +27 -0
  148. data/rhoconnect-client/JavaScript/stubs/com/rho/file/IFileAccess.java +7 -0
  149. data/rhoconnect-client/JavaScript/stubs/com/rho/file/SimpleFile.java +15 -0
  150. data/rhoconnect-client/JavaScript/stubs/com/rho/net/IHttpConnection.java +22 -0
  151. data/rhoconnect-client/JavaScript/stubs/com/rho/net/NetRequest.java +324 -0
  152. data/rhoconnect-client/JavaScript/stubs/com/rho/net/NetResponse.java +51 -0
  153. data/rhoconnect-client/JavaScript/stubs/com/rho/net/URI.java +64 -0
  154. data/rhoconnect-client/JavaScript/stubs/com/rho/sync/ClientRegister.java +15 -0
  155. data/rhoconnect-client/JavaScript/stubs/com/rho/sync/JSONArrayIterator.java +37 -0
  156. data/rhoconnect-client/JavaScript/stubs/com/rho/sync/JSONEntry.java +48 -0
  157. data/rhoconnect-client/JavaScript/stubs/com/rho/sync/JSONStructIterator.java +41 -0
  158. data/rhoconnect-client/JavaScript/stubs/com/rho/sync/SyncNotify.java +98 -0
  159. data/rhoconnect-client/JavaScript/stubs/com/rho/sync/SyncThread.java +92 -0
  160. data/rhoconnect-client/JavaScript/war/WEB-INF/lib/gwt-servlet-deps.jar +0 -0
  161. data/rhoconnect-client/JavaScript/war/WEB-INF/lib/gwt-servlet.jar +0 -0
  162. data/rhoconnect-client/JavaScript/war/js/fsm-sample.js +54 -0
  163. data/rhoconnect-client/JavaScript/war/js/rhosync-api.js +237 -0
  164. data/rhoconnect-client/JavaScript/war/js/rhosync-fsm.js +307 -0
  165. data/rhoconnect-client/JavaScript/war/rhosyncjs/4C71D69C9BBC9E6F05C6BA49B01BCBC1.cache.html +3122 -0
  166. data/rhoconnect-client/JavaScript/war/rhosyncjs/5146F4FFF34511C8BB2661E920B49E3A.cache.html +3254 -0
  167. data/rhoconnect-client/JavaScript/war/rhosyncjs/5248C67481D9D27AD0703D15CDBD2A1C.cache.html +3147 -0
  168. data/rhoconnect-client/JavaScript/war/rhosyncjs/EE1DC2692C9C32367B53A39E2358AF23.cache.html +3195 -0
  169. data/rhoconnect-client/JavaScript/war/rhosyncjs/clear.cache.gif +0 -0
  170. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/corner.png +0 -0
  171. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/corner_ie6.png +0 -0
  172. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/hborder.png +0 -0
  173. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/hborder_ie6.png +0 -0
  174. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/corner_dialog_topleft.png +0 -0
  175. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/corner_dialog_topright.png +0 -0
  176. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/hborder_blue_shadow.png +0 -0
  177. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/hborder_gray_shadow.png +0 -0
  178. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/vborder_blue_shadow.png +0 -0
  179. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/vborder_gray_shadow.png +0 -0
  180. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/splitPanelThumb.png +0 -0
  181. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/vborder.png +0 -0
  182. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/vborder_ie6.png +0 -0
  183. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/standard.css +1144 -0
  184. data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/standard_rtl.css +1145 -0
  185. data/rhoconnect-client/JavaScript/war/rhosyncjs/hosted.html +350 -0
  186. data/rhoconnect-client/JavaScript/war/rhosyncjs/rhosyncjs.nocache.js +314 -0
  187. data/rhoconnect-client/JavaScript/war/test/SpecRunner.html +35 -0
  188. data/rhoconnect-client/JavaScript/war/test/dbtest.html +38 -0
  189. data/rhoconnect-client/JavaScript/war/test/lib/jasmine-1.0.1/MIT.LICENSE +20 -0
  190. data/rhoconnect-client/JavaScript/war/test/lib/jasmine-1.0.1/jasmine-html.js +188 -0
  191. data/rhoconnect-client/JavaScript/war/test/lib/jasmine-1.0.1/jasmine.css +166 -0
  192. data/rhoconnect-client/JavaScript/war/test/lib/jasmine-1.0.1/jasmine.js +2421 -0
  193. data/rhoconnect-client/JavaScript/war/test/spec/SpecHelper.js +7 -0
  194. data/rhoconnect-client/JavaScript/war/test/spec/SyncApiSpec.js +573 -0
  195. data/rhoconnect-client/JavaScript/war/test/spec/samples/PlayerSpec.js +58 -0
  196. data/rhoconnect-client/JavaScript/war/test/worker-test.js +17 -0
  197. data/rhoconnect-client/LICENSE +41 -0
  198. data/rhoconnect-client/ObjectiveC/RhoConnectClient.h +118 -0
  199. data/rhoconnect-client/ObjectiveC/RhoConnectClient.m +641 -0
  200. data/rhoconnect-client/ObjectiveC/RhoConnectClient.xcodeproj/project.pbxproj +1434 -0
  201. data/rhoconnect-client/ObjectiveC/RhoConnectNotify.h +83 -0
  202. data/rhoconnect-client/ObjectiveC/RhoConnectNotify.m +181 -0
  203. data/rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.h +65 -0
  204. data/rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m +73 -0
  205. data/rhoconnect-client/ObjectiveC/RhomModel.h +101 -0
  206. data/rhoconnect-client/ObjectiveC/RhomModel.m +320 -0
  207. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/MainWindow.xib +198 -0
  208. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTest-Info.plist +30 -0
  209. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTest.xcodeproj/project.pbxproj +373 -0
  210. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTestAppDelegate.h +58 -0
  211. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTestAppDelegate.m +84 -0
  212. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTest_Prefix.pch +8 -0
  213. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/invalid_import_db.zip +0 -0
  214. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/main.m +1096 -0
  215. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/test.png +0 -0
  216. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/test2.png +0 -0
  217. data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/valid_import_db.zip +0 -0
  218. data/rhoconnect-client/ObjectiveC/Tests/ptests/Classes/ptestsAppDelegate.h +62 -0
  219. data/rhoconnect-client/ObjectiveC/Tests/ptests/Classes/ptestsAppDelegate.m +35 -0
  220. data/rhoconnect-client/ObjectiveC/Tests/ptests/Classes/ptestsViewController.h +78 -0
  221. data/rhoconnect-client/ObjectiveC/Tests/ptests/Classes/ptestsViewController.m +549 -0
  222. data/rhoconnect-client/ObjectiveC/Tests/ptests/MainWindow.xib +227 -0
  223. data/rhoconnect-client/ObjectiveC/Tests/ptests/main.m +17 -0
  224. data/rhoconnect-client/ObjectiveC/Tests/ptests/ptests-Info.plist +30 -0
  225. data/rhoconnect-client/ObjectiveC/Tests/ptests/ptests.xcodeproj/project.pbxproj +363 -0
  226. data/rhoconnect-client/ObjectiveC/Tests/ptests/ptestsViewController.xib +641 -0
  227. data/rhoconnect-client/ObjectiveC/Tests/ptests/ptests_Prefix.pch +8 -0
  228. data/rhoconnect-client/README.textile +23 -0
  229. data/rhoconnect-client/Rakefile +20 -0
  230. data/rhoconnect-client/Samples/Java/android_store/.classpath +8 -0
  231. data/rhoconnect-client/Samples/Java/android_store/.project +33 -0
  232. data/rhoconnect-client/Samples/Java/android_store/AndroidManifest.xml +24 -0
  233. data/rhoconnect-client/Samples/Java/android_store/assets/apps/rhoconfig.txt +19 -0
  234. data/rhoconnect-client/Samples/Java/android_store/assets/apps/rhoconfig.txt.timestamp +1 -0
  235. data/rhoconnect-client/Samples/Java/android_store/assets/db/syncdb.schema +44 -0
  236. data/rhoconnect-client/Samples/Java/android_store/assets/db/syncdb.triggers +10 -0
  237. data/rhoconnect-client/Samples/Java/android_store/assets/db/syncdb_java.triggers +21 -0
  238. data/rhoconnect-client/Samples/Java/android_store/assets/rho.dat +8 -0
  239. data/rhoconnect-client/Samples/Java/android_store/default.properties +11 -0
  240. data/rhoconnect-client/Samples/Java/android_store/project.properties +14 -0
  241. data/rhoconnect-client/Samples/Java/android_store/res/drawable-hdpi/icon.png +0 -0
  242. data/rhoconnect-client/Samples/Java/android_store/res/drawable-ldpi/icon.png +0 -0
  243. data/rhoconnect-client/Samples/Java/android_store/res/drawable-mdpi/icon.png +0 -0
  244. data/rhoconnect-client/Samples/Java/android_store/res/layout/main.xml +12 -0
  245. data/rhoconnect-client/Samples/Java/android_store/res/values/strings.xml +5 -0
  246. data/rhoconnect-client/Samples/Java/android_store/rhoimpl.jar +0 -0
  247. data/rhoconnect-client/Samples/Java/android_store/src/com/rhomobile/android_store/StoreActivity.java +68 -0
  248. data/rhoconnect-client/Samples/Java/android_store/src/com/rhomobile/android_store/StoreApplication.java +15 -0
  249. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/LoginViewController.h +70 -0
  250. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/LoginViewController.m +94 -0
  251. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/RhoConnectEngine.h +82 -0
  252. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/RhoConnectEngine.m +119 -0
  253. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/RootViewController.h +63 -0
  254. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/RootViewController.m +314 -0
  255. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/WaitLoginController.h +65 -0
  256. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/WaitLoginController.m +110 -0
  257. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/storeAppDelegate.h +61 -0
  258. data/rhoconnect-client/Samples/ObjectiveC/store/Classes/storeAppDelegate.m +171 -0
  259. data/rhoconnect-client/Samples/ObjectiveC/store/LoginViewController.xib +779 -0
  260. data/rhoconnect-client/Samples/ObjectiveC/store/MainWindow.xib +580 -0
  261. data/rhoconnect-client/Samples/ObjectiveC/store/RootViewController.xib +384 -0
  262. data/rhoconnect-client/Samples/ObjectiveC/store/WaitLoginController.xib +557 -0
  263. data/rhoconnect-client/Samples/ObjectiveC/store/icon.png +0 -0
  264. data/rhoconnect-client/Samples/ObjectiveC/store/main.m +22 -0
  265. data/rhoconnect-client/Samples/ObjectiveC/store/store-Info.plist +30 -0
  266. data/rhoconnect-client/Samples/ObjectiveC/store/store.xcodeproj/project.pbxproj +367 -0
  267. data/rhoconnect-client/Samples/ObjectiveC/store/store_Prefix.pch +14 -0
  268. data/rhoconnect-client/build.yml +3 -0
  269. data/rhoconnect-client/version +1 -0
  270. metadata +314 -0
@@ -0,0 +1,181 @@
1
+ /* DO NOT EDIT THIS FILE - it is machine generated */
2
+ #include <jni.h>
3
+ /* Header for class com_rhomobile_rhoconnect_RhoConnectClient */
4
+
5
+ #ifndef _Included_com_rhomobile_rhoconnect_RhoConnectClient
6
+ #define _Included_com_rhomobile_rhoconnect_RhoConnectClient
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+ /*
11
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
12
+ * Method: initialize
13
+ * Signature: ([Lcom/rhomobile/rhoconnect/RhomModel;)V
14
+ */
15
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_initialize
16
+ (JNIEnv *, jobject, jobjectArray);
17
+
18
+ /*
19
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
20
+ * Method: destroy
21
+ * Signature: ()V
22
+ */
23
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_destroy
24
+ (JNIEnv *, jobject);
25
+
26
+ /*
27
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
28
+ * Method: setSyncServer
29
+ * Signature: (Ljava/lang/String;)V
30
+ */
31
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setSyncServer
32
+ (JNIEnv *, jobject, jstring);
33
+
34
+ /*
35
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
36
+ * Method: setThreadedMode
37
+ * Signature: (Z)V
38
+ */
39
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setThreadedMode
40
+ (JNIEnv *, jobject, jboolean);
41
+
42
+ /*
43
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
44
+ * Method: setPollInterval
45
+ * Signature: (I)V
46
+ */
47
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setPollInterval
48
+ (JNIEnv *, jobject, jint);
49
+
50
+ /*
51
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
52
+ * Method: getPollInterval
53
+ * Signature: ()I
54
+ */
55
+ JNIEXPORT jint JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_getPollInterval
56
+ (JNIEnv *, jobject);
57
+
58
+ /*
59
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
60
+ * Method: setBulkSyncState
61
+ * Signature: (I)V
62
+ */
63
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setBulkSyncState
64
+ (JNIEnv *, jobject, jint);
65
+
66
+ /*
67
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
68
+ * Method: getBulkSyncState
69
+ * Signature: ()I
70
+ */
71
+ JNIEXPORT jint JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_getBulkSyncState
72
+ (JNIEnv *, jobject);
73
+
74
+ /*
75
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
76
+ * Method: setConfigString
77
+ * Signature: (Ljava/lang/String;Ljava/lang/String;)V
78
+ */
79
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setConfigString
80
+ (JNIEnv *, jobject, jstring, jstring);
81
+
82
+ /*
83
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
84
+ * Method: getConfigString
85
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
86
+ */
87
+ JNIEXPORT jstring JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_getConfigString
88
+ (JNIEnv *, jobject, jstring);
89
+
90
+ /*
91
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
92
+ * Method: databaseFullResetAndLogout
93
+ * Signature: ()V
94
+ */
95
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_databaseFullResetAndLogout
96
+ (JNIEnv *, jobject);
97
+
98
+ /*
99
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
100
+ * Method: isLoggedIn
101
+ * Signature: ()Z
102
+ */
103
+ JNIEXPORT jboolean JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_isLoggedIn
104
+ (JNIEnv *, jobject);
105
+
106
+ /*
107
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
108
+ * Method: setObjectNotification
109
+ * Signature: (Lcom/rhomobile/rhoconnect/RhoConnectObjectNotify/IDelegate;)V
110
+ */
111
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setObjectNotification
112
+ (JNIEnv *, jobject, jobject);
113
+
114
+ /*
115
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
116
+ * Method: clearObjectNotification
117
+ * Signature: ()V
118
+ */
119
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_clearObjectNotification
120
+ (JNIEnv *, jobject);
121
+
122
+ /*
123
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
124
+ * Method: addObjectNotify
125
+ * Signature: (ILjava/lang/String;)V
126
+ */
127
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_addObjectNotify
128
+ (JNIEnv *, jobject, jint, jstring);
129
+
130
+ /*
131
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
132
+ * Method: setNotification
133
+ * Signature: (Lcom/rhomobile/rhoconnect/RhoConnectNotify/IDelegate;)V
134
+ */
135
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setNotification
136
+ (JNIEnv *, jobject, jobject);
137
+
138
+ /*
139
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
140
+ * Method: clearNotification
141
+ * Signature: ()V
142
+ */
143
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_clearNotification
144
+ (JNIEnv *, jobject);
145
+
146
+ /*
147
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
148
+ * Method: loginWithUserSync
149
+ * Signature: (Ljava/lang/String;Ljava/lang/String;)Lcom/rhomobile/rhoconnect/RhoConnectNotify;
150
+ */
151
+ JNIEXPORT jobject JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_loginWithUserSync
152
+ (JNIEnv *, jobject, jstring, jstring);
153
+
154
+ /*
155
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
156
+ * Method: loginWithUserAsync
157
+ * Signature: (Ljava/lang/String;Ljava/lang/String;Lcom/rhomobile/rhoconnect/RhoConnectNotify/IDelegate;)V
158
+ */
159
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_loginWithUserAsync
160
+ (JNIEnv *, jobject, jstring, jstring, jobject);
161
+
162
+ /*
163
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
164
+ * Method: syncAll
165
+ * Signature: ()Lcom/rhomobile/rhoconnect/RhoConnectNotify;
166
+ */
167
+ JNIEXPORT jobject JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_syncAll
168
+ (JNIEnv *, jobject);
169
+
170
+ /*
171
+ * Class: com_rhomobile_rhoconnect_RhoConnectClient
172
+ * Method: nativeInit
173
+ * Signature: ()V
174
+ */
175
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_nativeInit
176
+ (JNIEnv *, jclass);
177
+
178
+ #ifdef __cplusplus
179
+ }
180
+ #endif
181
+ #endif
@@ -0,0 +1,13 @@
1
+ /* DO NOT EDIT THIS FILE - it is machine generated */
2
+ #include <jni.h>
3
+ /* Header for class com_rhomobile_rhoconnect_RhoConnectNotify */
4
+
5
+ #ifndef _Included_com_rhomobile_rhoconnect_RhoConnectNotify
6
+ #define _Included_com_rhomobile_rhoconnect_RhoConnectNotify
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+ #endif
@@ -0,0 +1,13 @@
1
+ /* DO NOT EDIT THIS FILE - it is machine generated */
2
+ #include <jni.h>
3
+ /* Header for class com_rhomobile_rhoconnect_RhoConnectNotify_IDelegate */
4
+
5
+ #ifndef _Included_com_rhomobile_rhoconnect_RhoConnectNotify_IDelegate
6
+ #define _Included_com_rhomobile_rhoconnect_RhoConnectNotify_IDelegate
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+ #endif
@@ -0,0 +1,13 @@
1
+ /* DO NOT EDIT THIS FILE - it is machine generated */
2
+ #include <jni.h>
3
+ /* Header for class com_rhomobile_rhoconnect_RhoConnectObjectNotify */
4
+
5
+ #ifndef _Included_com_rhomobile_rhoconnect_RhoConnectObjectNotify
6
+ #define _Included_com_rhomobile_rhoconnect_RhoConnectObjectNotify
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+ #endif
@@ -0,0 +1,13 @@
1
+ /* DO NOT EDIT THIS FILE - it is machine generated */
2
+ #include <jni.h>
3
+ /* Header for class com_rhomobile_rhoconnect_RhoConnectObjectNotify_IDelegate */
4
+
5
+ #ifndef _Included_com_rhomobile_rhoconnect_RhoConnectObjectNotify_IDelegate
6
+ #define _Included_com_rhomobile_rhoconnect_RhoConnectObjectNotify_IDelegate
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+ #endif
@@ -0,0 +1,103 @@
1
+ /* DO NOT EDIT THIS FILE - it is machine generated */
2
+ #include <jni.h>
3
+ /* Header for class com_rhomobile_rhoconnect_RhomModel */
4
+
5
+ #ifndef _Included_com_rhomobile_rhoconnect_RhomModel
6
+ #define _Included_com_rhomobile_rhoconnect_RhomModel
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+ #undef com_rhomobile_rhoconnect_RhomModel_MODEL_TYPE_PROPERTY_BAG
11
+ #define com_rhomobile_rhoconnect_RhomModel_MODEL_TYPE_PROPERTY_BAG 0L
12
+ #undef com_rhomobile_rhoconnect_RhomModel_MODEL_TYPE_FIXED_SCHEMA
13
+ #define com_rhomobile_rhoconnect_RhomModel_MODEL_TYPE_FIXED_SCHEMA 1L
14
+ #undef com_rhomobile_rhoconnect_RhomModel_SYNC_TYPE_NONE
15
+ #define com_rhomobile_rhoconnect_RhomModel_SYNC_TYPE_NONE 0L
16
+ #undef com_rhomobile_rhoconnect_RhomModel_SYNC_TYPE_INCREMENTAL
17
+ #define com_rhomobile_rhoconnect_RhomModel_SYNC_TYPE_INCREMENTAL 1L
18
+ #undef com_rhomobile_rhoconnect_RhomModel_SYNC_TYPE_BULK_ONLY
19
+ #define com_rhomobile_rhoconnect_RhomModel_SYNC_TYPE_BULK_ONLY 2L
20
+ /*
21
+ * Class: com_rhomobile_rhoconnect_RhomModel
22
+ * Method: init
23
+ * Signature: ()V
24
+ */
25
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhomModel_init
26
+ (JNIEnv *, jobject);
27
+
28
+ /*
29
+ * Class: com_rhomobile_rhoconnect_RhomModel
30
+ * Method: syncByName
31
+ * Signature: (Ljava/lang/String;)Lcom/rhomobile/rhoconnect/RhoConnectNotify;
32
+ */
33
+ JNIEXPORT jobject JNICALL Java_com_rhomobile_rhoconnect_RhomModel_syncByName
34
+ (JNIEnv *, jclass, jstring);
35
+
36
+ /*
37
+ * Class: com_rhomobile_rhoconnect_RhomModel
38
+ * Method: findByName
39
+ * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;
40
+ */
41
+ JNIEXPORT jobject JNICALL Java_com_rhomobile_rhoconnect_RhomModel_findByName
42
+ (JNIEnv *, jclass, jstring, jstring);
43
+
44
+ /*
45
+ * Class: com_rhomobile_rhoconnect_RhomModel
46
+ * Method: findFirstByName
47
+ * Signature: (Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)Ljava/util/Map;
48
+ */
49
+ JNIEXPORT jobject JNICALL Java_com_rhomobile_rhoconnect_RhomModel_findFirstByName
50
+ (JNIEnv *, jclass, jstring, jobjectArray, jobjectArray);
51
+
52
+ /*
53
+ * Class: com_rhomobile_rhoconnect_RhomModel
54
+ * Method: findAllByName
55
+ * Signature: (Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)Ljava/util/Collection;
56
+ */
57
+ JNIEXPORT jobject JNICALL Java_com_rhomobile_rhoconnect_RhomModel_findAllByName
58
+ (JNIEnv *, jclass, jstring, jobjectArray, jobjectArray);
59
+
60
+ /*
61
+ * Class: com_rhomobile_rhoconnect_RhomModel
62
+ * Method: createByName
63
+ * Signature: (Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)Ljava/util/Map;
64
+ */
65
+ JNIEXPORT jobject JNICALL Java_com_rhomobile_rhoconnect_RhomModel_createByName
66
+ (JNIEnv *, jclass, jstring, jobjectArray, jobjectArray);
67
+
68
+ /*
69
+ * Class: com_rhomobile_rhoconnect_RhomModel
70
+ * Method: saveByName
71
+ * Signature: (Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)V
72
+ */
73
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhomModel_saveByName
74
+ (JNIEnv *, jclass, jstring, jobjectArray, jobjectArray);
75
+
76
+ /*
77
+ * Class: com_rhomobile_rhoconnect_RhomModel
78
+ * Method: destroyByName
79
+ * Signature: (Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)V
80
+ */
81
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhomModel_destroyByName
82
+ (JNIEnv *, jclass, jstring, jobjectArray, jobjectArray);
83
+
84
+ /*
85
+ * Class: com_rhomobile_rhoconnect_RhomModel
86
+ * Method: startBulkUpdateByName
87
+ * Signature: (Ljava/lang/String;)V
88
+ */
89
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhomModel_startBulkUpdateByName
90
+ (JNIEnv *, jclass, jstring);
91
+
92
+ /*
93
+ * Class: com_rhomobile_rhoconnect_RhomModel
94
+ * Method: stopBulkUpdateByName
95
+ * Signature: (Ljava/lang/String;)V
96
+ */
97
+ JNIEXPORT void JNICALL Java_com_rhomobile_rhoconnect_RhomModel_stopBulkUpdateByName
98
+ (JNIEnv *, jclass, jstring);
99
+
100
+ #ifdef __cplusplus
101
+ }
102
+ #endif
103
+ #endif
@@ -0,0 +1,76 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+
26
+ * Copyright (c) 2011-2016 Symbol Technologies, Inc.
27
+ *
28
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ * of this software and associated documentation files (the "Software"), to deal
30
+ * in the Software without restriction, including without limitation the rights
31
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+ * copies of the Software, and to permit persons to whom the Software is
33
+ * furnished to do so, subject to the following conditions:
34
+ *
35
+ * The above copyright notice and this permission notice shall be included in
36
+ * all copies or substantial portions of the Software.
37
+ *
38
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44
+ * THE SOFTWARE.
45
+ *
46
+ * http://symbol.com
47
+ *------------------------------------------------------------------------*/
48
+
49
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_BOOLEAN, "java/lang/Boolean")
50
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_INTEGER, "java/lang/Integer")
51
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_FLOAT, "java/lang/Float")
52
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_DOUBLE, "java/lang/Double")
53
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_STRING, "java/lang/String")
54
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_RUNTIME_EXCEPTION, "java/lang/RuntimeException")
55
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_ARRAYLIST, "java/util/ArrayList")
56
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_VECTOR, "java/util/Vector")
57
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_SET, "java/util/Set")
58
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_MAP, "java/util/Map")
59
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_HASHMAP, "java/util/HashMap")
60
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_ITERATOR, "java/util/Iterator")
61
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_DATE, "java/util/Date")
62
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_BUFFEREDREADER, "java/io/BufferedReader")
63
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_FILEDESCRIPTOR, "java/io/FileDescriptor")
64
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_INPUTSTREAMREADER, "java/io/InputStreamReader")
65
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_INET4ADDRESS, "java/net/Inet4Address")
66
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_RHOCRYPTIMPL, "com/rhomobile/rhodes/RhoCryptImpl")
67
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_RHOSOCKADDR, "com/rhomobile/rhodes/socket/RhoSockAddr")
68
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_SSLIMPL, "com/rhomobile/rhodes/socket/SSLImpl")
69
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_RHOFILEAPI, "com/rhomobile/rhodes/file/RhoFileApi")
70
+ RHODES_DEFINE_JAVA_CLASS(RHOCONNECT_JAVA_CLASS_CLIENT, "com/rhomobile/rhoconnect/RhoConnectClient")
71
+ RHODES_DEFINE_JAVA_CLASS(RHOCONNECT_JAVA_CLASS_RHOMMODEL, "com/rhomobile/rhoconnect/RhomModel")
72
+ RHODES_DEFINE_JAVA_CLASS(RHOCONNECT_JAVA_CLASS_NOTIFY, "com/rhomobile/rhoconnect/RhoConnectNotify")
73
+ RHODES_DEFINE_JAVA_CLASS(RHOCONNECT_JAVA_CLASS_NOTIFY_DELEGATE, "com/rhomobile/rhoconnect/RhoConnectNotify$IDelegate")
74
+ RHODES_DEFINE_JAVA_CLASS(RHOCONNECT_JAVA_CLASS_OBJECTNOTIFY, "com/rhomobile/rhoconnect/RhoConnectObjectNotify")
75
+ RHODES_DEFINE_JAVA_CLASS(RHOCONNECT_JAVA_CLASS_OBJECTNOTIFY_DELEGATE, "com/rhomobile/rhoconnect/RhoConnectObjectNotify$IDelegate")
76
+ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_MEMORY_INFO_COLLECTOR, "com/rhomobile/rhodes/MemoryInfoCollector")
@@ -0,0 +1,401 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+
26
+ * Copyright (c) 2011-2016 Symbol Technologies, Inc.
27
+ *
28
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ * of this software and associated documentation files (the "Software"), to deal
30
+ * in the Software without restriction, including without limitation the rights
31
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+ * copies of the Software, and to permit persons to whom the Software is
33
+ * furnished to do so, subject to the following conditions:
34
+ *
35
+ * The above copyright notice and this permission notice shall be included in
36
+ * all copies or substantial portions of the Software.
37
+ *
38
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44
+ * THE SOFTWARE.
45
+ *
46
+ * http://symbol.com
47
+ *------------------------------------------------------------------------*/
48
+
49
+ #include <vector>
50
+ #include <algorithm>
51
+
52
+ #include "common/RhoStd.h"
53
+ #include "common/RhoConf.h"
54
+ #include "rhodes/JNIRhodes.h"
55
+ #include "sync/SyncThread.h"
56
+ #include "RhoConnectClient/RhoConnectClient.h"
57
+ #include "logging/RhoLog.h"
58
+
59
+ #include "com_rhomobile_rhoconnect_RhoConnectClient.h"
60
+
61
+ #include "RhoConnectJniNotify.h"
62
+
63
+ #undef DEFAULT_LOGCATEGORY
64
+ #define DEFAULT_LOGCATEGORY "RhoConnectClientJNI"
65
+
66
+ typedef std::vector<RHOM_MODEL> model_vector;
67
+ typedef std::vector<rho::String> string_vector;
68
+
69
+ static jobject s_jNotifyDelegate = 0;
70
+ static jobject s_jObjectNotifyDelegate = 0;
71
+
72
+
73
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_initialize
74
+ (JNIEnv * env, jobject, jobjectArray jmodels)
75
+ {
76
+ jclass& clsmodel = getJNIClass(RHOCONNECT_JAVA_CLASS_RHOMMODEL);
77
+ if (!clsmodel) return;
78
+ static jmethodID midname = getJNIClassMethod(env, clsmodel, "getName", "()Ljava/lang/String;");
79
+ if (!midname) return;
80
+ static jmethodID midmodeltype = getJNIClassMethod(env, clsmodel, "getModelType", "()I");
81
+ if (!midmodeltype) return;
82
+ static jmethodID midsynctype = getJNIClassMethod(env, clsmodel, "getSyncType", "()I");
83
+ if (!midsynctype) return;
84
+ static jmethodID midsyncpri = getJNIClassMethod(env, clsmodel, "getSyncPriority", "()I");
85
+ if (!midsyncpri) return;
86
+ static jmethodID midpart = getJNIClassMethod(env, clsmodel, "getPartition", "()Ljava/lang/String;");
87
+ if (!midpart) return;
88
+ static jmethodID midblobattribs = getJNIClassMethod(env, clsmodel, "getBlobAttribsAsString", "()Ljava/lang/String;");
89
+ if (!midblobattribs) return;
90
+ static jmethodID midassocs = getJNIClassMethod(env, clsmodel, "getAssociations", "()Ljava/util/Map;");
91
+ if (!midblobattribs) return;
92
+
93
+ size_t cnt = static_cast<model_vector::size_type>(env->GetArrayLength(jmodels));
94
+ model_vector models(cnt);
95
+ string_vector names(cnt);
96
+ string_vector partitions(cnt);
97
+ string_vector blob_attribs(cnt);
98
+
99
+ for(model_vector::size_type i = 0, cnt = models.size(); i < cnt; ++i)
100
+ {
101
+ jobject jmodel = env->GetObjectArrayElement(jmodels, i);
102
+ RHOM_MODEL& model = models[i];
103
+ rho::String& name = names[i];
104
+ rho::String& partition = partitions[i];
105
+ rho::String& cur_blob_attribs = blob_attribs[i];
106
+
107
+ jhobject jname = env->CallObjectMethod(jmodel, midname);
108
+ name = rho_cast<rho::String>(env, static_cast<jstring>(jname.get()));
109
+ model.name = /*const_cast<char*>*/(name.c_str());
110
+
111
+ RAWTRACE1("Model name: %s", name.c_str());
112
+
113
+ model.type = static_cast<RHOM_MODEL_TYPE>(env->CallIntMethod(jmodel, midmodeltype));
114
+ model.sync_type = static_cast<RHOM_SYNC_TYPE>(env->CallIntMethod(jmodel, midsynctype));
115
+ model.sync_priority = env->CallIntMethod(jmodel, midsyncpri);
116
+
117
+ jhobject jpart = env->CallObjectMethod(jmodel, midpart);
118
+ partition = rho_cast<rho::String>(env, static_cast<jstring>(jpart.get()));
119
+ model.partition = /*const_cast<char*>*/(partition.c_str());
120
+
121
+ RAWTRACE1("Model partition: %s", partition.c_str());
122
+
123
+ jhobject jattribs = env->CallObjectMethod(jmodel, midblobattribs);
124
+ cur_blob_attribs = rho_cast<rho::String>(env, static_cast<jstring>(jattribs.get()));
125
+ model.blob_attribs = cur_blob_attribs.c_str();
126
+
127
+ RAWTRACE1("Model blob attributes: %s", cur_blob_attribs.c_str());
128
+
129
+ jhobject jhassociations = env->CallObjectMethod(jmodel, midassocs);
130
+ hashtableholder assocs = rho_cast<hashtableholder>(env, jhassociations.get());
131
+
132
+ if(assocs.get())
133
+ {
134
+ LOG(TRACE) + name + " association count: " + assocs->size();
135
+ model.associations = reinterpret_cast<unsigned long>(assocs.release());
136
+ }
137
+ }
138
+
139
+ rho_connectclient_init(&models.front(), models.size());
140
+
141
+ for(model_vector::size_type i = 0, cnt = models.size(); i < cnt; ++i)
142
+ {
143
+ rho_connectclient_destroymodel(&models[i]);
144
+ }
145
+ }
146
+
147
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_destroy
148
+ (JNIEnv *, jobject)
149
+ {
150
+ void rho_connectclient_destroy();
151
+ }
152
+
153
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setSyncServer
154
+ (JNIEnv * env, jobject, jstring host)
155
+ {
156
+ rho_sync_set_syncserver(rho_cast<std::string>(env, host).c_str());
157
+ }
158
+
159
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setThreadedMode
160
+ (JNIEnv *, jobject, jboolean jmode)
161
+ {
162
+ bool mode = jmode;
163
+ rho_sync_set_threaded_mode(mode ? 1 : 0);
164
+ }
165
+
166
+ //RHO_GLOBAL jboolean JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_getThreadedMode
167
+ // (JNIEnv *, jobject)
168
+ //{
169
+ // return (jboolean)(rho_sync_get_threaded_mode() != 0);
170
+ //}
171
+
172
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setPollInterval
173
+ (JNIEnv *, jobject, jint time)
174
+ {
175
+ rho_sync_set_pollinterval(time);
176
+ }
177
+
178
+ RHO_GLOBAL jint JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_getPollInterval
179
+ (JNIEnv *, jobject)
180
+ {
181
+ return (jint)rho_sync_get_pollinterval();
182
+ }
183
+
184
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setBulkSyncState
185
+ (JNIEnv *, jobject, jint state)
186
+ {
187
+ rho_conf_setInt("bulksync_state", state);
188
+ }
189
+
190
+ RHO_GLOBAL jint JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_getBulkSyncState
191
+ (JNIEnv *, jobject)
192
+ {
193
+ return rho_conf_getInt("bulksync_state");
194
+ }
195
+
196
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setConfigString
197
+ (JNIEnv * env, jobject, jstring jname, jstring jvalue)
198
+ {
199
+ std::string name = rho_cast<std::string>(env, jname);
200
+ std::string value = rho_cast<std::string>(env, jvalue);
201
+ if (name.compare("MinSeverity") == 0) {
202
+ int severity;
203
+ rho::common::convertFromStringA(value.c_str(), severity);
204
+ rho_logconf_setSeverity(severity);
205
+ } else
206
+ rho_conf_setString(name.c_str(), value.c_str());
207
+ }
208
+
209
+ RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_getConfigString
210
+ (JNIEnv * env, jobject, jstring jname)
211
+ {
212
+ std::string name = rho_cast<std::string>(env, jname);
213
+ const char* value = rho_conf_getString(name.c_str());
214
+
215
+ jhstring jhvalue = rho_cast<jhstring>(env, value ? value : "");
216
+ if (value)
217
+ rho_conf_freeString(const_cast<char*>(value));
218
+
219
+ return jhvalue.release();}
220
+
221
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_databaseFullResetAndLogout
222
+ (JNIEnv *, jobject)
223
+ {
224
+ rho_connectclient_database_full_reset_and_logout();
225
+ }
226
+
227
+ RHO_GLOBAL jboolean JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_isLoggedIn
228
+ (JNIEnv *, jobject)
229
+ {
230
+ return (jboolean)rho_sync_logged_in() == 1;
231
+ }
232
+
233
+ RHO_GLOBAL jobject JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_loginWithUserSync
234
+ (JNIEnv * env, jobject, jstring juser, jstring jpass)
235
+ {
236
+ char* res = reinterpret_cast<char*>(rho_sync_login(rho_cast<std::string>(env, juser).c_str(),
237
+ rho_cast<std::string>(env, jpass).c_str(),
238
+ ""));
239
+ jobject jNotify = rho::connect_jni::rhoconnect_jni_parsenotify(env, res);
240
+ rho_sync_free_string(res);
241
+ return jNotify;
242
+ }
243
+ //----------------------------------------------------------------------------------------------------------------------
244
+
245
+ template <int JAVACLASS>
246
+ int rhoconnect_jni_callback(const char* res,
247
+ jobject jNotifyDelegate,
248
+ jobject (*parse_notify)(JNIEnv*, const char*),
249
+ const char* param_sig)
250
+ {
251
+ static jclass clsDelegate = getJNIClass(JAVACLASS);
252
+ if (!clsDelegate) {
253
+ LOG(ERROR) + "Cannot get Java delegate class";
254
+ return 1;
255
+ }
256
+
257
+ JNIEnv * env = jnienv();
258
+ static jmethodID midCall = getJNIClassMethod(env, clsDelegate, "call", param_sig);
259
+ if (!midCall) {
260
+ LOG(ERROR) + "Cannot get Java delegate 'call' method, param signature: " + param_sig;
261
+ return 1;
262
+ }
263
+
264
+ jobject jNotify = parse_notify(env, res);
265
+ if (!jNotify) {
266
+ LOG(ERROR) + "Parsing notify object failed";
267
+ return 1;
268
+ }
269
+
270
+ LOG(TRACE) + "Calling Java callback";
271
+ env->CallVoidMethod(jNotifyDelegate, midCall, jNotify);
272
+
273
+ return 0;
274
+ }
275
+ //----------------------------------------------------------------------------------------------------------------------
276
+
277
+ int login_callback(const char* res, void* data)
278
+ {
279
+ using namespace rho::connect_jni;
280
+ LOG(TRACE) + "login_callback, res: " + res + ", data: " + (int)data;
281
+ if (data == 0) {
282
+ LOG(ERROR) + "notify_callback: data is NULL, cannot call Java callback";
283
+ return 1;
284
+ }
285
+ jobject jNotifyDelegate = reinterpret_cast<jobject>(data);
286
+ int result = rhoconnect_jni_callback<(int)RHOCONNECT_JAVA_CLASS_NOTIFY_DELEGATE>(res, jNotifyDelegate,
287
+ &rhoconnect_jni_parsenotify,
288
+ "(Lcom/rhomobile/rhoconnect/RhoConnectNotify;)V");
289
+ JNIEnv * env = jnienv();
290
+ env->DeleteGlobalRef(jNotifyDelegate);
291
+ return result;
292
+ }
293
+ //----------------------------------------------------------------------------------------------------------------------
294
+
295
+ int notify_callback(const char* res, void* data)
296
+ {
297
+ using namespace rho::connect_jni;
298
+ LOG(TRACE) + "notify_callback, res: " + res + ", data: " + (int)data;
299
+ if (data == 0) {
300
+ LOG(ERROR) + "notify_callback: data is NULL, cannot call Java callback";
301
+ return 1;
302
+ }
303
+ return rhoconnect_jni_callback<(int)RHOCONNECT_JAVA_CLASS_NOTIFY_DELEGATE>(res, reinterpret_cast<jobject>(data),
304
+ &rhoconnect_jni_parsenotify,
305
+ "(Lcom/rhomobile/rhoconnect/RhoConnectNotify;)V");
306
+ }
307
+ //----------------------------------------------------------------------------------------------------------------------
308
+
309
+ int object_notify_callback(const char* res, void* data)
310
+ {
311
+ using namespace rho::connect_jni;
312
+ LOG(TRACE) + "object_notify_callback, res: " + res + ", data: " + (int)data;
313
+ if (data == 0) {
314
+ LOG(ERROR) + "object_notify_callback: data is NULL, cannot call Java callback";
315
+ return 1;
316
+ }
317
+ return rhoconnect_jni_callback<RHOCONNECT_JAVA_CLASS_OBJECTNOTIFY_DELEGATE>(res, reinterpret_cast<jobject>(data),
318
+ rhoconnect_jni_parseobjectnotify,
319
+ "(Lcom/rhomobile/rhoconnect/RhoConnectObjectNotify;)V");
320
+ }
321
+ //----------------------------------------------------------------------------------------------------------------------
322
+
323
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_loginWithUserAsync
324
+ (JNIEnv * env, jobject, jstring jUser, jstring jPass, jobject jref)
325
+ {
326
+ jobject jNotifyDelegate = env->NewGlobalRef(jref);
327
+
328
+ rho_sync_login_c(rho_cast<std::string>(env, jUser).c_str(),
329
+ rho_cast<std::string>(env, jPass).c_str(),
330
+ reinterpret_cast<void*>(login_callback), jNotifyDelegate);
331
+ }
332
+ //----------------------------------------------------------------------------------------------------------------------
333
+
334
+ RHO_GLOBAL jobject JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_syncAll
335
+ (JNIEnv * env, jobject)
336
+ {
337
+ char* res = reinterpret_cast<char*>(rho_sync_doSyncAllSources(0, "", false));
338
+ jhobject jhNotify = rho::connect_jni::rhoconnect_jni_parsenotify(env, res);
339
+ rho_sync_free_string(res);
340
+ return jhNotify.release();
341
+ }
342
+ //----------------------------------------------------------------------------------------------------------------------
343
+
344
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setObjectNotification
345
+ (JNIEnv * env, jobject, jobject jref)
346
+ {
347
+ if(s_jObjectNotifyDelegate)
348
+ env->DeleteGlobalRef(s_jObjectNotifyDelegate);
349
+
350
+ s_jObjectNotifyDelegate = env->NewGlobalRef(jref);
351
+ rho_sync_setobjectnotify_url_c(reinterpret_cast<void*>(object_notify_callback), s_jObjectNotifyDelegate);
352
+ }
353
+ //----------------------------------------------------------------------------------------------------------------------
354
+
355
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_clearObjectNotification
356
+ (JNIEnv * env, jobject)
357
+ {
358
+ rho_sync_clear_object_notification();
359
+ if(s_jObjectNotifyDelegate)
360
+ {
361
+ env->DeleteGlobalRef(s_jObjectNotifyDelegate);
362
+ s_jObjectNotifyDelegate = 0;
363
+ }
364
+ }
365
+ //----------------------------------------------------------------------------------------------------------------------
366
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_addObjectNotify
367
+ (JNIEnv * env, jobject, jint jSrcId, jstring jObject)
368
+ {
369
+ std::string object = rho_cast<std::string>(env, jObject);
370
+ rho_sync_addobjectnotify(jSrcId, object.c_str());
371
+ }
372
+ //----------------------------------------------------------------------------------------------------------------------
373
+
374
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_setNotification
375
+ (JNIEnv * env, jobject, jobject jref)
376
+ {
377
+ if(s_jNotifyDelegate)
378
+ env->DeleteGlobalRef(s_jNotifyDelegate);
379
+
380
+ s_jNotifyDelegate = env->NewGlobalRef(jref);
381
+ rho_sync_set_notification_c(-1, reinterpret_cast<void*>(notify_callback), s_jNotifyDelegate);
382
+ }
383
+ //----------------------------------------------------------------------------------------------------------------------
384
+
385
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_clearNotification
386
+ (JNIEnv * env, jobject)
387
+ {
388
+ rho_sync_clear_notification(-1);
389
+ if(s_jNotifyDelegate)
390
+ {
391
+ env->DeleteGlobalRef(s_jNotifyDelegate);
392
+ s_jNotifyDelegate = 0;
393
+ }
394
+ }
395
+ //----------------------------------------------------------------------------------------------------------------------
396
+
397
+ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhoconnect_RhoConnectClient_nativeInit
398
+ (JNIEnv * env, jclass)
399
+ {
400
+ android_setup(env);
401
+ }