rhoconnect-client 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +9 -0
- data/CREDITS +0 -0
- data/LICENSE +9 -0
- data/README.md +47 -0
- data/ext/rhoconnect-client/RhoConnectClient.rb +190 -0
- data/ext/rhoconnect-client/ext/RhoConnectClient.xml +726 -0
- data/ext/rhoconnect-client/ext/build +26 -0
- data/ext/rhoconnect-client/ext/build.bat +30 -0
- data/ext/rhoconnect-client/ext/platform/android/ext_java.files +1 -0
- data/ext/rhoconnect-client/ext/platform/android/ext_native.files +14 -0
- data/ext/rhoconnect-client/ext/platform/android/src/com/rhoconnectclient/RhoconnectClient.java +1 -0
- data/ext/rhoconnect-client/ext/platform/iphone/.gitignore +1 -0
- data/ext/rhoconnect-client/ext/platform/iphone/Rakefile +74 -0
- data/ext/rhoconnect-client/ext/platform/iphone/RhoconnectClient.xcodeproj/project.pbxproj +390 -0
- data/ext/rhoconnect-client/ext/platform/iphone/RhoconnectClient_Prefix.pch +7 -0
- data/ext/rhoconnect-client/ext/platform/iphone/impl/readme.txt +7 -0
- data/ext/rhoconnect-client/ext/platform/qt/Rakefile +35 -0
- data/ext/rhoconnect-client/ext/platform/qt/rhoconnect-client.pro +88 -0
- data/ext/rhoconnect-client/ext/platform/wm/Rhoconnect-client.sln +36 -0
- data/ext/rhoconnect-client/ext/platform/wm/Rhoconnect-client.vcproj +774 -0
- data/ext/rhoconnect-client/ext/platform/wm/Rhoconnect-client.vsprops +15 -0
- data/ext/rhoconnect-client/ext/platform/wm/src/rhoconnectclient_wm.cpp +40 -0
- data/ext/rhoconnect-client/ext/platform/wm/src/rhoconnectclient_wm.h +2 -0
- data/ext/rhoconnect-client/ext/platform/wp8/Rhoconnect-client.props +22 -0
- data/ext/rhoconnect-client/ext/platform/wp8/Rhoconnect-client.sln +32 -0
- data/ext/rhoconnect-client/ext/platform/wp8/Rhoconnect-client.vcxproj +220 -0
- data/ext/rhoconnect-client/ext/platform/wp8/Rhoconnect-client.vcxproj.filters +103 -0
- data/ext/rhoconnect-client/ext/shared/RhoConnectClientImpl.cpp +273 -0
- data/ext/rhoconnect-client/ext/shared/RhoConnectClientImpl.h +60 -0
- data/ext/rhoconnect-client/ext/shared/RhoConnectClientSingletonImpl.h +53 -0
- data/ext/rhoconnect-client/ext/shared/initRhoconnectClient.cpp +207 -0
- data/ext/rhoconnect-client/ext/shared/rhoconnectclient.c +18 -0
- data/ext/rhoconnect-client/ext/shared/sync/ClientRegister.cpp +398 -0
- data/ext/rhoconnect-client/ext/shared/sync/ClientRegister.h +147 -0
- data/ext/rhoconnect-client/ext/shared/sync/ISyncProtocol.h +91 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncEngine.cpp +1245 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncEngine.h +213 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncNotify.cpp +737 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncNotify.h +209 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncProtocol_3.h +220 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncProtocol_4.h +259 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncSource.cpp +1694 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncSource.h +212 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncThread.cpp +583 -0
- data/ext/rhoconnect-client/ext/shared/sync/SyncThread.h +250 -0
- data/ext/rhoconnect-client/ext.yml +12 -0
- data/lib/build/run_rhoconnect_spec.rb +135 -0
- data/lib/rhoconnect-client.rb +3 -0
- data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1673 -0
- data/platform/shared/RhoConnectClient/RhoConnectClient.h +181 -0
- data/platform/shared/RhoConnectClient/RhoError.h +77 -0
- data/rhoconnect-client/C++/Tests/RhoConnectClientTest.cpp +830 -0
- data/rhoconnect-client/C++/Tests/win32/.gitignore +3 -0
- data/rhoconnect-client/C++/Tests/win32/RhoConnectClient.sln +65 -0
- data/rhoconnect-client/C++/Tests/win32/RhoConnectClient.vcproj +634 -0
- data/rhoconnect-client/C++/Tests/win32/RhoConnectClientTest/RhoConnectClientTest.vcproj +222 -0
- data/rhoconnect-client/C++/Tests/win32/RhoConnectClientTest/stdafx.h +65 -0
- data/rhoconnect-client/C++/Tests/win32/stdafx.h +65 -0
- data/rhoconnect-client/CHANGELOG +18 -0
- data/rhoconnect-client/Java/Android/build/android.rake +387 -0
- data/rhoconnect-client/Java/Android/build/android_sdk.rb +582 -0
- data/rhoconnect-client/Java/Android/build/libcurl_build.files +73 -0
- data/rhoconnect-client/Java/Android/build/libjson_build.files +9 -0
- data/rhoconnect-client/Java/Android/build/librhocommon_build.files +14 -0
- data/rhoconnect-client/Java/Android/build/librhodb_build.files +5 -0
- data/rhoconnect-client/Java/Android/build/librhoimpl_build.files +13 -0
- data/rhoconnect-client/Java/Android/build/librholog_build.files +4 -0
- data/rhoconnect-client/Java/Android/build/libsqlite_build.files +1 -0
- data/rhoconnect-client/Java/Android/build/libsync_build.files +7 -0
- data/rhoconnect-client/Java/Android/build/libunzip_build.files +1 -0
- data/rhoconnect-client/Java/Android/build/rhoconnectclient_build.files +3 -0
- data/rhoconnect-client/Java/Android/build/rhoimpljava_build.files +21 -0
- data/rhoconnect-client/Java/Android/src/com/rhomobile/rhodes/Capabilities.java +63 -0
- data/rhoconnect-client/Java/Android/src/com/rhomobile/rhodes/MemoryInfoCollector.java +79 -0
- data/rhoconnect-client/Java/Android/src/com/rhomobile/rhodes/util/ContextFactory.java +63 -0
- data/rhoconnect-client/Java/Android/test/.classpath +9 -0
- data/rhoconnect-client/Java/Android/test/.project +33 -0
- data/rhoconnect-client/Java/Android/test/AndroidManifest.xml +14 -0
- data/rhoconnect-client/Java/Android/test/assets/apps/androidtest.png +0 -0
- data/rhoconnect-client/Java/Android/test/assets/apps/rhoconfig.txt +19 -0
- data/rhoconnect-client/Java/Android/test/assets/apps/rhoconfig.txt.timestamp +1 -0
- data/rhoconnect-client/Java/Android/test/assets/db/syncdb.schema +44 -0
- data/rhoconnect-client/Java/Android/test/assets/db/syncdb.triggers +10 -0
- data/rhoconnect-client/Java/Android/test/assets/db/syncdb_java.triggers +21 -0
- data/rhoconnect-client/Java/Android/test/assets/rho.dat +9 -0
- data/rhoconnect-client/Java/Android/test/proguard.cfg +36 -0
- data/rhoconnect-client/Java/Android/test/project.properties +11 -0
- data/rhoconnect-client/Java/Android/test/res/drawable-hdpi/icon.png +0 -0
- data/rhoconnect-client/Java/Android/test/res/drawable-ldpi/icon.png +0 -0
- data/rhoconnect-client/Java/Android/test/res/drawable-mdpi/icon.png +0 -0
- data/rhoconnect-client/Java/Android/test/res/layout/main.xml +12 -0
- data/rhoconnect-client/Java/Android/test/res/values/strings.xml +5 -0
- data/rhoconnect-client/Java/Android/test/rhoimpl.jar +0 -0
- data/rhoconnect-client/Java/Android/test/src/com/rhomobile/rhoconnect_client_test/TestRhoConnectClient.java +343 -0
- data/rhoconnect-client/Java/Android/test/src/com/rhomobile/rhoconnect_client_test/TestRhoConnectClientBlobs.java +219 -0
- data/rhoconnect-client/Java/RhoConnect/.classpath +6 -0
- data/rhoconnect-client/Java/RhoConnect/.project +93 -0
- data/rhoconnect-client/Java/RhoConnect/assets/apps/rhoconfig.txt +19 -0
- data/rhoconnect-client/Java/RhoConnect/assets/apps/rhoconfig.txt.timestamp +1 -0
- data/rhoconnect-client/Java/RhoConnect/assets/db/syncdb.schema +44 -0
- data/rhoconnect-client/Java/RhoConnect/assets/db/syncdb.triggers +10 -0
- data/rhoconnect-client/Java/RhoConnect/assets/db/syncdb_java.triggers +21 -0
- data/rhoconnect-client/Java/RhoConnect/assets/rho.dat +8 -0
- data/rhoconnect-client/Java/RhoConnect/jni/include/RhoConnectJniNotify.h +61 -0
- data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectClient.h +181 -0
- data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectNotify.h +13 -0
- data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectNotify_IDelegate.h +13 -0
- data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectObjectNotify.h +13 -0
- data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhoConnectObjectNotify_IDelegate.h +13 -0
- data/rhoconnect-client/Java/RhoConnect/jni/include/com_rhomobile_rhoconnect_RhomModel.h +103 -0
- data/rhoconnect-client/Java/RhoConnect/jni/include/rhojava.inc +76 -0
- data/rhoconnect-client/Java/RhoConnect/jni/src/RhoConnectJniClient.cpp +401 -0
- data/rhoconnect-client/Java/RhoConnect/jni/src/RhoConnectJniModel.cpp +332 -0
- data/rhoconnect-client/Java/RhoConnect/jni/src/RhoConnectJniNotify.cpp +223 -0
- data/rhoconnect-client/Java/RhoConnect/jni/src/RhoConnectUtil.cpp +82 -0
- data/rhoconnect-client/Java/RhoConnect/jni/src/RhodesApp.cpp +114 -0
- data/rhoconnect-client/Java/RhoConnect/src/com/rhomobile/rhoconnect/RhoConnectClient.java +108 -0
- data/rhoconnect-client/Java/RhoConnect/src/com/rhomobile/rhoconnect/RhoConnectNotify.java +78 -0
- data/rhoconnect-client/Java/RhoConnect/src/com/rhomobile/rhoconnect/RhoConnectObjectNotify.java +71 -0
- data/rhoconnect-client/Java/RhoConnect/src/com/rhomobile/rhoconnect/RhomModel.java +195 -0
- data/rhoconnect-client/JavaScript/.classpath +10 -0
- data/rhoconnect-client/JavaScript/.gitignore +4 -0
- data/rhoconnect-client/JavaScript/.project +17 -0
- data/rhoconnect-client/JavaScript/README.textile +1 -0
- data/rhoconnect-client/JavaScript/build.xml +185 -0
- data/rhoconnect-client/JavaScript/doc/fsm-sample.js +44 -0
- data/rhoconnect-client/JavaScript/doc/fsm-sample.png +0 -0
- data/rhoconnect-client/JavaScript/src/RhoSyncJS.gwt.xml +21 -0
- data/rhoconnect-client/JavaScript/stubs/RhoSyncStubsJS.gwt.xml +21 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/Capabilities.java +7 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/IRhoRubyHelper.java +7 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/Mutex.java +5 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/RhoAppAdapter.java +39 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/RhoClassFactory.java +29 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/RhoConf.java +100 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/RhoEmptyLogger.java +7 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/RhoEmptyProfiler.java +5 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/RhoLogger.java +32 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/RhoProfiler.java +27 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/RhodesApp.java +25 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/TimeInterval.java +22 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/Tokenizer.java +23 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/db/DBAdapter.java +174 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/db/DBAttrManager.java +15 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/db/DBException.java +5 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/db/IDBResult.java +27 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/file/IFileAccess.java +7 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/file/SimpleFile.java +15 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/net/IHttpConnection.java +22 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/net/NetRequest.java +324 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/net/NetResponse.java +51 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/net/URI.java +64 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/sync/ClientRegister.java +15 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/sync/JSONArrayIterator.java +37 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/sync/JSONEntry.java +48 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/sync/JSONStructIterator.java +41 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/sync/SyncNotify.java +98 -0
- data/rhoconnect-client/JavaScript/stubs/com/rho/sync/SyncThread.java +92 -0
- data/rhoconnect-client/JavaScript/war/WEB-INF/lib/gwt-servlet-deps.jar +0 -0
- data/rhoconnect-client/JavaScript/war/WEB-INF/lib/gwt-servlet.jar +0 -0
- data/rhoconnect-client/JavaScript/war/js/fsm-sample.js +54 -0
- data/rhoconnect-client/JavaScript/war/js/rhosync-api.js +237 -0
- data/rhoconnect-client/JavaScript/war/js/rhosync-fsm.js +307 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/4C71D69C9BBC9E6F05C6BA49B01BCBC1.cache.html +3122 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/5146F4FFF34511C8BB2661E920B49E3A.cache.html +3254 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/5248C67481D9D27AD0703D15CDBD2A1C.cache.html +3147 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/EE1DC2692C9C32367B53A39E2358AF23.cache.html +3195 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/clear.cache.gif +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/corner.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/corner_ie6.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/hborder.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/hborder_ie6.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/corner_dialog_topleft.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/corner_dialog_topright.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/hborder_blue_shadow.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/hborder_gray_shadow.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/vborder_blue_shadow.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/ie6/vborder_gray_shadow.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/splitPanelThumb.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/vborder.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/images/vborder_ie6.png +0 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/standard.css +1144 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/gwt/standard/standard_rtl.css +1145 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/hosted.html +350 -0
- data/rhoconnect-client/JavaScript/war/rhosyncjs/rhosyncjs.nocache.js +314 -0
- data/rhoconnect-client/JavaScript/war/test/SpecRunner.html +35 -0
- data/rhoconnect-client/JavaScript/war/test/dbtest.html +38 -0
- data/rhoconnect-client/JavaScript/war/test/lib/jasmine-1.0.1/MIT.LICENSE +20 -0
- data/rhoconnect-client/JavaScript/war/test/lib/jasmine-1.0.1/jasmine-html.js +188 -0
- data/rhoconnect-client/JavaScript/war/test/lib/jasmine-1.0.1/jasmine.css +166 -0
- data/rhoconnect-client/JavaScript/war/test/lib/jasmine-1.0.1/jasmine.js +2421 -0
- data/rhoconnect-client/JavaScript/war/test/spec/SpecHelper.js +7 -0
- data/rhoconnect-client/JavaScript/war/test/spec/SyncApiSpec.js +573 -0
- data/rhoconnect-client/JavaScript/war/test/spec/samples/PlayerSpec.js +58 -0
- data/rhoconnect-client/JavaScript/war/test/worker-test.js +17 -0
- data/rhoconnect-client/LICENSE +41 -0
- data/rhoconnect-client/ObjectiveC/RhoConnectClient.h +118 -0
- data/rhoconnect-client/ObjectiveC/RhoConnectClient.m +641 -0
- data/rhoconnect-client/ObjectiveC/RhoConnectClient.xcodeproj/project.pbxproj +1434 -0
- data/rhoconnect-client/ObjectiveC/RhoConnectNotify.h +83 -0
- data/rhoconnect-client/ObjectiveC/RhoConnectNotify.m +181 -0
- data/rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.h +65 -0
- data/rhoconnect-client/ObjectiveC/RhoConnectObjectNotify.m +73 -0
- data/rhoconnect-client/ObjectiveC/RhomModel.h +101 -0
- data/rhoconnect-client/ObjectiveC/RhomModel.m +320 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/MainWindow.xib +198 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTest-Info.plist +30 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTest.xcodeproj/project.pbxproj +373 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTestAppDelegate.h +58 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTestAppDelegate.m +84 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/RhoConnectClientTest_Prefix.pch +8 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/invalid_import_db.zip +0 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/main.m +1096 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/test.png +0 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/test2.png +0 -0
- data/rhoconnect-client/ObjectiveC/Tests/RhoConnectClientTest/valid_import_db.zip +0 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/Classes/ptestsAppDelegate.h +62 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/Classes/ptestsAppDelegate.m +35 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/Classes/ptestsViewController.h +78 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/Classes/ptestsViewController.m +549 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/MainWindow.xib +227 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/main.m +17 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/ptests-Info.plist +30 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/ptests.xcodeproj/project.pbxproj +363 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/ptestsViewController.xib +641 -0
- data/rhoconnect-client/ObjectiveC/Tests/ptests/ptests_Prefix.pch +8 -0
- data/rhoconnect-client/README.textile +23 -0
- data/rhoconnect-client/Rakefile +20 -0
- data/rhoconnect-client/Samples/Java/android_store/.classpath +8 -0
- data/rhoconnect-client/Samples/Java/android_store/.project +33 -0
- data/rhoconnect-client/Samples/Java/android_store/AndroidManifest.xml +24 -0
- data/rhoconnect-client/Samples/Java/android_store/assets/apps/rhoconfig.txt +19 -0
- data/rhoconnect-client/Samples/Java/android_store/assets/apps/rhoconfig.txt.timestamp +1 -0
- data/rhoconnect-client/Samples/Java/android_store/assets/db/syncdb.schema +44 -0
- data/rhoconnect-client/Samples/Java/android_store/assets/db/syncdb.triggers +10 -0
- data/rhoconnect-client/Samples/Java/android_store/assets/db/syncdb_java.triggers +21 -0
- data/rhoconnect-client/Samples/Java/android_store/assets/rho.dat +8 -0
- data/rhoconnect-client/Samples/Java/android_store/default.properties +11 -0
- data/rhoconnect-client/Samples/Java/android_store/project.properties +14 -0
- data/rhoconnect-client/Samples/Java/android_store/res/drawable-hdpi/icon.png +0 -0
- data/rhoconnect-client/Samples/Java/android_store/res/drawable-ldpi/icon.png +0 -0
- data/rhoconnect-client/Samples/Java/android_store/res/drawable-mdpi/icon.png +0 -0
- data/rhoconnect-client/Samples/Java/android_store/res/layout/main.xml +12 -0
- data/rhoconnect-client/Samples/Java/android_store/res/values/strings.xml +5 -0
- data/rhoconnect-client/Samples/Java/android_store/rhoimpl.jar +0 -0
- data/rhoconnect-client/Samples/Java/android_store/src/com/rhomobile/android_store/StoreActivity.java +68 -0
- data/rhoconnect-client/Samples/Java/android_store/src/com/rhomobile/android_store/StoreApplication.java +15 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/LoginViewController.h +70 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/LoginViewController.m +94 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/RhoConnectEngine.h +82 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/RhoConnectEngine.m +119 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/RootViewController.h +63 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/RootViewController.m +314 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/WaitLoginController.h +65 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/WaitLoginController.m +110 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/storeAppDelegate.h +61 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/Classes/storeAppDelegate.m +171 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/LoginViewController.xib +779 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/MainWindow.xib +580 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/RootViewController.xib +384 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/WaitLoginController.xib +557 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/icon.png +0 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/main.m +22 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/store-Info.plist +30 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/store.xcodeproj/project.pbxproj +367 -0
- data/rhoconnect-client/Samples/ObjectiveC/store/store_Prefix.pch +14 -0
- data/rhoconnect-client/build.yml +3 -0
- data/rhoconnect-client/version +1 -0
- metadata +314 -0
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
|
|
50
|
+
package com.rhomobile.rhoconnect;
|
|
51
|
+
|
|
52
|
+
import java.util.Collection;
|
|
53
|
+
import java.util.Iterator;
|
|
54
|
+
import java.util.List;
|
|
55
|
+
import java.util.Map;
|
|
56
|
+
import java.util.Set;
|
|
57
|
+
import java.util.TreeMap;
|
|
58
|
+
|
|
59
|
+
public class RhomModel {
|
|
60
|
+
public final static int MODEL_TYPE_PROPERTY_BAG = 0;
|
|
61
|
+
public final static int MODEL_TYPE_FIXED_SCHEMA = 1;
|
|
62
|
+
|
|
63
|
+
public final static int SYNC_TYPE_NONE = 0;
|
|
64
|
+
public final static int SYNC_TYPE_INCREMENTAL = 1;
|
|
65
|
+
public final static int SYNC_TYPE_BULK_ONLY = 2;
|
|
66
|
+
|
|
67
|
+
private String mName;
|
|
68
|
+
private int mModelType;
|
|
69
|
+
|
|
70
|
+
private int mSyncType;
|
|
71
|
+
private int mSyncPriority;
|
|
72
|
+
|
|
73
|
+
private String mPartition;
|
|
74
|
+
private Map<String, Boolean> mBlobAttribs = new TreeMap<String, Boolean>();
|
|
75
|
+
private Map<String, String> mAssociations = new TreeMap<String, String>();
|
|
76
|
+
|
|
77
|
+
private native void init();
|
|
78
|
+
private static native RhoConnectNotify syncByName(String modelName);
|
|
79
|
+
private static native Map<String, String> findByName(String modelName, String objectId);
|
|
80
|
+
private static native Map<String, String> findFirstByName(String modelName, String condKeys[], String condVals[]);
|
|
81
|
+
private static native Collection<Map<String, String> > findAllByName(String modelName, String condKeys[], String condVals[]);
|
|
82
|
+
private static native Collection<Map<String, String> > findBySqlByName(String modelName, String query, String params[]);
|
|
83
|
+
private static native Map<String, String> createByName(String modelName, String keys[], String values[]);
|
|
84
|
+
private static native void saveByName(String modelName, String keys[], String values[]);
|
|
85
|
+
private static native void destroyByName(String modelName, String keys[], String values[]);
|
|
86
|
+
private static native void startBulkUpdateByName(String modelName);
|
|
87
|
+
private static native void stopBulkUpdateByName(String modelName);
|
|
88
|
+
|
|
89
|
+
public RhomModel(String name, int syncType) {
|
|
90
|
+
init();
|
|
91
|
+
mName = name;
|
|
92
|
+
mSyncType = syncType;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
public String getName() { return mName; }
|
|
96
|
+
public int getModelType() { return mModelType; }
|
|
97
|
+
public void setModelType(int type) { mModelType = type; }
|
|
98
|
+
public int getSyncType() { return mSyncType; }
|
|
99
|
+
public void setSyncType(int type) { mSyncType = type; }
|
|
100
|
+
public int getSyncPriority() { return mSyncPriority; }
|
|
101
|
+
public void setSyncPriority(int prio) { mSyncPriority = prio; }
|
|
102
|
+
public String getPartition() { return mPartition; }
|
|
103
|
+
public void setPartition(String part) { mPartition = part; }
|
|
104
|
+
public Map<String, Boolean> getBlobAttribs() { return mBlobAttribs; }
|
|
105
|
+
public String getBlobAttribsAsString()
|
|
106
|
+
{
|
|
107
|
+
Set<Map.Entry<String, Boolean> > entries = mBlobAttribs.entrySet();
|
|
108
|
+
Iterator<Map.Entry<String, Boolean> > entryIt = entries.iterator();
|
|
109
|
+
StringBuilder blobAttribs = new StringBuilder();
|
|
110
|
+
|
|
111
|
+
while(entryIt.hasNext()) {
|
|
112
|
+
Map.Entry<String, Boolean> entry = entryIt.next();
|
|
113
|
+
|
|
114
|
+
if(blobAttribs.length() > 0)
|
|
115
|
+
blobAttribs.append(',');
|
|
116
|
+
|
|
117
|
+
blobAttribs.append(entry.getKey()).append(',').append(entry.getValue()?'1':'0');
|
|
118
|
+
}
|
|
119
|
+
return blobAttribs.toString();
|
|
120
|
+
}
|
|
121
|
+
public Map<String, String> getAssociations() { return mAssociations; }
|
|
122
|
+
|
|
123
|
+
public RhoConnectNotify sync() { return syncByName(mName); }
|
|
124
|
+
|
|
125
|
+
private void mapToArrays(Map<String, String> item,
|
|
126
|
+
String[] keys, String[] vals)
|
|
127
|
+
{
|
|
128
|
+
int n = 0;
|
|
129
|
+
for (String key : item.keySet()) {
|
|
130
|
+
keys[n] = key;
|
|
131
|
+
vals[n] = item.get(key);
|
|
132
|
+
++n;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
public Map<String, String> find(String objectId) { return findByName(mName, objectId); }
|
|
137
|
+
public Map<String, String> findFirst(Map<String, String> condition)
|
|
138
|
+
{
|
|
139
|
+
String keys[] = new String[condition.size()];
|
|
140
|
+
String vals[] = new String[condition.size()];
|
|
141
|
+
mapToArrays(condition, keys, vals);
|
|
142
|
+
return findFirstByName(mName, keys, vals);
|
|
143
|
+
}
|
|
144
|
+
public Collection<Map<String, String> > findAll(Map<String, String> condition)
|
|
145
|
+
{
|
|
146
|
+
String keys[];
|
|
147
|
+
String vals[];
|
|
148
|
+
if (condition != null) {
|
|
149
|
+
keys = new String[condition.size()];
|
|
150
|
+
vals = new String[condition.size()];
|
|
151
|
+
mapToArrays(condition, keys, vals);
|
|
152
|
+
} else {
|
|
153
|
+
keys = vals = new String[0];
|
|
154
|
+
}
|
|
155
|
+
return findAllByName(mName, keys, vals);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
public Collection<Map<String, String> > findBySql(String query, List<String> params)
|
|
159
|
+
{
|
|
160
|
+
String arrayParams[] = null;
|
|
161
|
+
if (params != null) {
|
|
162
|
+
arrayParams = new String[params.size()];
|
|
163
|
+
params.toArray(arrayParams);
|
|
164
|
+
}
|
|
165
|
+
return findBySqlByName(mName, query, arrayParams);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
public void create(Map<String, String> item) {
|
|
169
|
+
String keys[] = new String[item.size()];
|
|
170
|
+
String vals[] = new String[item.size()];
|
|
171
|
+
mapToArrays(item, keys, vals);
|
|
172
|
+
Map<String, String> created = createByName(mName, keys, vals);
|
|
173
|
+
|
|
174
|
+
if (created != null) {
|
|
175
|
+
item.clear();
|
|
176
|
+
item.putAll(created);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
public void save(Map<String, String> item) {
|
|
180
|
+
String keys[] = new String[item.size()];
|
|
181
|
+
String vals[] = new String[item.size()];
|
|
182
|
+
mapToArrays(item, keys, vals);
|
|
183
|
+
saveByName(mName, keys, vals);
|
|
184
|
+
}
|
|
185
|
+
public void destroy(Map<String, String> item) {
|
|
186
|
+
String keys[] = new String[item.size()];
|
|
187
|
+
String vals[] = new String[item.size()];
|
|
188
|
+
mapToArrays(item, keys, vals);
|
|
189
|
+
destroyByName(mName, keys, vals);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
public void startBulkUpdate() { startBulkUpdateByName(mName); }
|
|
193
|
+
public void stopBulkUpdate() { stopBulkUpdateByName(mName); }
|
|
194
|
+
|
|
195
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<classpath>
|
|
3
|
+
<classpathentry kind="src" path="stubs"/>
|
|
4
|
+
<classpathentry kind="src" path="src"/>
|
|
5
|
+
<classpathentry kind="lib" path="E:/_proj/rhomobile/gwt-2.1.1/gwt-user.jar"/>
|
|
6
|
+
<classpathentry kind="lib" path="E:/_proj/rhomobile/gwt-2.1.1/gwt-dev.jar"/>
|
|
7
|
+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
|
8
|
+
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
|
|
9
|
+
<classpathentry kind="output" path="war/WEB-INF/classes"/>
|
|
10
|
+
</classpath>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<projectDescription>
|
|
3
|
+
<name>RhoSyncJS</name>
|
|
4
|
+
<comment>RhoSyncJS project</comment>
|
|
5
|
+
<projects>
|
|
6
|
+
</projects>
|
|
7
|
+
<buildSpec>
|
|
8
|
+
<buildCommand>
|
|
9
|
+
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
10
|
+
<arguments>
|
|
11
|
+
</arguments>
|
|
12
|
+
</buildCommand>
|
|
13
|
+
</buildSpec>
|
|
14
|
+
<natures>
|
|
15
|
+
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
16
|
+
</natures>
|
|
17
|
+
</projectDescription>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
It's just a proof of concept for now.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<project name="RhoSyncJS-mini" default="build" basedir=".">
|
|
3
|
+
<property environment="env"/>
|
|
4
|
+
<property name="src" value="src" />
|
|
5
|
+
<property name="stubs" value="stubs" />
|
|
6
|
+
|
|
7
|
+
<!-- Arguments to gwtc and devmode targets -->
|
|
8
|
+
<property name="gwt.devmode.args" value="-logLevel DEBUG" />
|
|
9
|
+
<property name="gwt.gwtc.args" value="-style DETAILED -optimize 0 -draftCompile" />
|
|
10
|
+
|
|
11
|
+
<!-- Configure path to GWT SDK -->
|
|
12
|
+
<property name="gwt.sdk" location="E:/_proj/rhomobile/gwt-2.1.1" />
|
|
13
|
+
|
|
14
|
+
<path id="project.class.path">
|
|
15
|
+
<pathelement location="war/WEB-INF/classes"/>
|
|
16
|
+
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
|
|
17
|
+
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
|
|
18
|
+
<!-- Add any additional non-server libs (such as JUnit) -->
|
|
19
|
+
<fileset dir="war/WEB-INF/lib" includes="**/*.jar"/>
|
|
20
|
+
</path>
|
|
21
|
+
|
|
22
|
+
<fileset id="rho.src.originals" dir="../../platform/bb/RubyVM/src">
|
|
23
|
+
<include name="com/rho/sync/ISyncProtocol.java"/>
|
|
24
|
+
<include name="com/rho/sync/SyncEngine.java"/>
|
|
25
|
+
<include name="com/rho/sync/SyncProtocol_3.java"/>
|
|
26
|
+
<include name="com/rho/sync/SyncSource.java"/>
|
|
27
|
+
<include name="com/rho/FilePath.java"/>
|
|
28
|
+
</fileset>
|
|
29
|
+
|
|
30
|
+
<fileset id="rho.src.copy" dir="${src}">
|
|
31
|
+
<include name="com/rho/**/*"/>
|
|
32
|
+
</fileset>
|
|
33
|
+
|
|
34
|
+
<target name="copy.rho" description="Copy libs to WEB-INF/lib">
|
|
35
|
+
<delete>
|
|
36
|
+
<fileset refid="rho.src.copy"/>
|
|
37
|
+
</delete>
|
|
38
|
+
|
|
39
|
+
<copy todir="${src}">
|
|
40
|
+
<fileset refid="rho.src.originals"/>
|
|
41
|
+
<filterchain>
|
|
42
|
+
<tokenfilter>
|
|
43
|
+
<replacestring from="Hashtable" to="HashMap"/>
|
|
44
|
+
</tokenfilter>
|
|
45
|
+
</filterchain>
|
|
46
|
+
</copy>
|
|
47
|
+
</target>
|
|
48
|
+
|
|
49
|
+
<target name="libs" depends="copy.rho" description="Copy libs to WEB-INF/lib">
|
|
50
|
+
<mkdir dir="war/WEB-INF/lib" />
|
|
51
|
+
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
|
|
52
|
+
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet-deps.jar" />
|
|
53
|
+
<!-- Add any additional server libs that need to be copied -->
|
|
54
|
+
</target>
|
|
55
|
+
|
|
56
|
+
<target name="javac" depends="libs" description="Compile java source to bytecode">
|
|
57
|
+
<mkdir dir="war/WEB-INF/classes"/>
|
|
58
|
+
<javac includes="**" encoding="utf-8"
|
|
59
|
+
destdir="war/WEB-INF/classes"
|
|
60
|
+
source="1.5" target="1.5" nowarn="true"
|
|
61
|
+
debug="true" debuglevel="lines,vars,source">
|
|
62
|
+
<src path="${stubs}"/>
|
|
63
|
+
<src path="${src}"/>
|
|
64
|
+
<classpath refid="project.class.path"/>
|
|
65
|
+
</javac>
|
|
66
|
+
<copy todir="war/WEB-INF/classes">
|
|
67
|
+
<fileset dir="${stubs}" excludes="**/*.java"/>
|
|
68
|
+
<fileset dir="${src}" excludes="**/*.java"/>
|
|
69
|
+
</copy>
|
|
70
|
+
</target>
|
|
71
|
+
|
|
72
|
+
<target name="gwtc" depends="javac" description="GWT compile to JavaScript (production mode)">
|
|
73
|
+
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
|
|
74
|
+
<classpath>
|
|
75
|
+
<pathelement location="${stubs}"/>
|
|
76
|
+
<pathelement location="${src}"/>
|
|
77
|
+
<path refid="project.class.path"/>
|
|
78
|
+
</classpath>
|
|
79
|
+
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
|
|
80
|
+
<jvmarg value="-Xmx256M"/>
|
|
81
|
+
<arg line="-war"/>
|
|
82
|
+
<arg value="war"/>
|
|
83
|
+
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
|
|
84
|
+
<arg line="${gwt.gwtc.args}"/>
|
|
85
|
+
<arg value="RhoSyncJS"/>
|
|
86
|
+
</java>
|
|
87
|
+
</target>
|
|
88
|
+
|
|
89
|
+
<target name="devmode" depends="javac" description="Run development mode">
|
|
90
|
+
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
|
|
91
|
+
<classpath>
|
|
92
|
+
<pathelement location="{src}"/>
|
|
93
|
+
<path refid="project.class.path"/>
|
|
94
|
+
</classpath>
|
|
95
|
+
<jvmarg value="-Xmx256M"/>
|
|
96
|
+
<arg value="-startupUrl"/>
|
|
97
|
+
<arg value="RhoSyncJS.html"/>
|
|
98
|
+
<arg line="-war"/>
|
|
99
|
+
<arg value="war"/>
|
|
100
|
+
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
|
|
101
|
+
<arg line="${gwt.devmode.args}"/>
|
|
102
|
+
<arg value="RhoSyncJS"/>
|
|
103
|
+
</java>
|
|
104
|
+
</target>
|
|
105
|
+
|
|
106
|
+
<!--
|
|
107
|
+
Test targets suppressed because -junit argument was not specified when running webAppCreator.
|
|
108
|
+
|
|
109
|
+
<target name="javac.tests" depends="javac" description="Compiles test code">
|
|
110
|
+
<javac srcdir="test" includes="**" encoding="utf-8"
|
|
111
|
+
source="1.5" target="1.5" nowarn="true"
|
|
112
|
+
destdir="war/WEB-INF/classes"
|
|
113
|
+
debug="true" debuglevel="lines,vars,source">
|
|
114
|
+
<classpath location="path_to_the_junit_jar"/>
|
|
115
|
+
<classpath refid="project.class.path"/>
|
|
116
|
+
</javac>
|
|
117
|
+
</target>
|
|
118
|
+
|
|
119
|
+
<target name="test.dev" depends="javac.tests" description="Run development mode tests">
|
|
120
|
+
<mkdir dir="reports/htmlunit.dev" />
|
|
121
|
+
<junit fork="yes" printsummary="yes" haltonfailure="yes">
|
|
122
|
+
<jvmarg line="-Xmx256m" />
|
|
123
|
+
<sysproperty key="gwt.args" value="-standardsMode -logLevel WARN" />
|
|
124
|
+
<sysproperty key="java.awt.headless" value="true" />
|
|
125
|
+
<classpath>
|
|
126
|
+
<pathelement location="{src}" />
|
|
127
|
+
<pathelement location="test" />
|
|
128
|
+
<path refid="project.class.path" />
|
|
129
|
+
<pathelement location="path_to_the_junit_jar" />
|
|
130
|
+
</classpath>
|
|
131
|
+
<batchtest todir="reports/htmlunit.dev" >
|
|
132
|
+
<fileset dir="test" >
|
|
133
|
+
<include name="**/*Test.java" />
|
|
134
|
+
</fileset>
|
|
135
|
+
</batchtest>
|
|
136
|
+
<formatter type="plain" />
|
|
137
|
+
<formatter type="xml" />
|
|
138
|
+
</junit>
|
|
139
|
+
</target>
|
|
140
|
+
|
|
141
|
+
<target name="test.prod" depends="javac.tests" description="Run production mode tests">
|
|
142
|
+
<mkdir dir="reports/htmlunit.prod" />
|
|
143
|
+
<junit fork="yes" printsummary="yes" haltonfailure="yes">
|
|
144
|
+
<jvmarg line="-Xmx256m" />
|
|
145
|
+
<sysproperty key="gwt.args" value="-prod -standardsMode -logLevel WARN -standardsMode -out www-test" />
|
|
146
|
+
<sysproperty key="java.awt.headless" value="true" />
|
|
147
|
+
<classpath>
|
|
148
|
+
<pathelement location="{src}" />
|
|
149
|
+
<pathelement location="test" />
|
|
150
|
+
<path refid="project.class.path" />
|
|
151
|
+
<pathelement location="path_to_the_junit_jar" />
|
|
152
|
+
</classpath>
|
|
153
|
+
<batchtest todir="reports/htmlunit.prod" >
|
|
154
|
+
<fileset dir="test" >
|
|
155
|
+
<include name="**/*Test.java" />
|
|
156
|
+
</fileset>
|
|
157
|
+
</batchtest>
|
|
158
|
+
<formatter type="plain" />
|
|
159
|
+
<formatter type="xml" />
|
|
160
|
+
</junit>
|
|
161
|
+
</target>
|
|
162
|
+
|
|
163
|
+
<target name="test" description="Run development and production mode tests">
|
|
164
|
+
<antcall target="test.dev" />
|
|
165
|
+
<antcall target="test.prod" />
|
|
166
|
+
</target>
|
|
167
|
+
-->
|
|
168
|
+
|
|
169
|
+
<target name="hosted" depends="devmode" description="Run development mode (NOTE: the 'hosted' target is deprecated)" />
|
|
170
|
+
|
|
171
|
+
<target name="build" depends="gwtc" description="Build this project" />
|
|
172
|
+
|
|
173
|
+
<target name="war" depends="build" description="Create a war file">
|
|
174
|
+
<zip destfile="RhoSyncJS.war" basedir="war"/>
|
|
175
|
+
</target>
|
|
176
|
+
|
|
177
|
+
<target name="clean" description="Cleans this project">
|
|
178
|
+
<delete dir="war/WEB-INF/classes" failonerror="false" />
|
|
179
|
+
<delete dir="war/rhosync" failonerror="false" />
|
|
180
|
+
<delete>
|
|
181
|
+
<fileset refid="rho.src.copy"/>
|
|
182
|
+
</delete>
|
|
183
|
+
</target>
|
|
184
|
+
|
|
185
|
+
</project>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// FSM definition
|
|
2
|
+
var lampSwitchFsm = api.define('Lamp switch FSM', function(fsm){
|
|
3
|
+
|
|
4
|
+
fsm.state('some fake intact state w/o transitions');
|
|
5
|
+
|
|
6
|
+
fsm.state('Light is OFF')
|
|
7
|
+
.on('turn switch on').transitsTo('ON click sound produced')
|
|
8
|
+
.withEntryAction('turn off', function(){
|
|
9
|
+
SomeAPIforExample.turnOff();
|
|
10
|
+
})
|
|
11
|
+
;
|
|
12
|
+
|
|
13
|
+
fsm.state('ON click sound produced')
|
|
14
|
+
.immediateTransitsTo('Light is ON')
|
|
15
|
+
.withEntryAction('do click', function(){
|
|
16
|
+
SomeAPIforExample.doClick();
|
|
17
|
+
})
|
|
18
|
+
.withEntryAction('one more action', function(){
|
|
19
|
+
//something else..
|
|
20
|
+
})
|
|
21
|
+
;
|
|
22
|
+
|
|
23
|
+
fsm.state('Light is ON')
|
|
24
|
+
.on('turn switch off').transitsTo('OFF click sound produced');
|
|
25
|
+
|
|
26
|
+
fsm.state('OFF click sound produced')
|
|
27
|
+
.immediateTransitsTo('Light is OFF')
|
|
28
|
+
.withEntryAction('turn on', function(){
|
|
29
|
+
SomeAPIforExample.turnOn();
|
|
30
|
+
})
|
|
31
|
+
;
|
|
32
|
+
|
|
33
|
+
}).withInitialState('Light is OFF').reset();
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
// render fsm to DOT
|
|
37
|
+
var dot = lampSwitchFsm.renderAsDot();
|
|
38
|
+
|
|
39
|
+
// It returns graph definition in a DOT notation, then it could
|
|
40
|
+
// be rendered to an image file using Graphviz tool. Look at
|
|
41
|
+
// http://www.graphviz.org for Graphviz.
|
|
42
|
+
//
|
|
43
|
+
// Here is fsm-sample.png file rendered from lampSwitchFsm.
|
|
44
|
+
|