rhodes 3.2.3 → 3.3.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +10 -0
- data/Rakefile +153 -46
- data/doc/build.txt +261 -102
- data/doc/configuration.txt +5 -2
- data/doc/device-caps.txt +134 -23
- data/doc/extensions.txt +922 -69
- data/doc/generator.txt +96 -39
- data/doc/install.txt +35 -19
- data/doc/jqt-jqm-transition.txt +17 -1
- data/doc/rhom.txt +23 -2
- data/doc/rhostudio-eclipse.txt +49 -0
- data/doc/rhostudio-test-plan.txt +440 -0
- data/doc/simulator.txt +1 -1
- data/doc/synchronization.txt +40 -1
- data/lib/build/jake.rb +108 -7
- data/lib/extensions/barcode/ext/barcode/platform/android/Rakefile +0 -35
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +8 -2
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeCallbackHelper.mm +195 -195
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.m +6 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Rakefile +5 -0
- data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode_wrap.c +64 -20
- data/lib/extensions/debugger/CHANGELOG +3 -0
- data/lib/extensions/debugger/debugger.rb +26 -21
- data/lib/extensions/digest-md5/ext/Rakefile +5 -5
- data/lib/extensions/digest-md5/ext/build +10 -1
- data/lib/extensions/digest-md5/ext/defs.h +19 -0
- data/lib/extensions/digest-md5/ext/digest-md5.vcproj +317 -9
- data/lib/extensions/digest-md5/ext/iphone/Dmd5.xcodeproj/project.pbxproj +290 -0
- data/lib/extensions/digest-md5/ext/iphone/Dmd5_Prefix.pch +7 -0
- data/lib/extensions/digest-md5/ext/iphone/Rakefile +79 -0
- data/lib/extensions/digest-sha1/ext/Rakefile +5 -5
- data/lib/extensions/digest-sha1/ext/build +10 -1
- data/lib/extensions/digest-sha1/ext/defs.h +19 -0
- data/lib/extensions/digest-sha1/ext/digest-sha1.vcproj +317 -9
- data/lib/extensions/digest-sha1/ext/iphone/Dsha1.xcodeproj/project.pbxproj +278 -0
- data/lib/extensions/digest-sha1/ext/iphone/Dsha1_Prefix.pch +7 -0
- data/lib/extensions/digest-sha1/ext/iphone/Rakefile +79 -0
- data/lib/extensions/digest/ext/Rakefile +5 -5
- data/lib/extensions/digest/ext/build +10 -1
- data/lib/extensions/digest/ext/digest.vcproj +317 -9
- data/lib/extensions/digest/ext/iphone/Digest.xcodeproj/project.pbxproj +270 -0
- data/lib/extensions/digest/ext/iphone/Digest_Prefix.pch +7 -0
- data/lib/extensions/digest/ext/iphone/Rakefile +79 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/ESRI.xcodeproj/project.pbxproj +10 -2
- data/lib/extensions/esri/ext/esri/platform/iphone/Rakefile +6 -0
- data/lib/extensions/fcntl/ext/Rakefile +5 -5
- data/lib/extensions/fcntl/ext/build +9 -1
- data/lib/extensions/fcntl/ext/iphone/Fcntl.xcodeproj/project.pbxproj +262 -0
- data/lib/extensions/fcntl/ext/iphone/Fcntl_Prefix.pch +7 -0
- data/lib/extensions/fcntl/ext/iphone/Rakefile +79 -0
- data/lib/extensions/net-http/net/http.rb +9 -7
- data/lib/extensions/nfc/ext/nfc/shared/ruby/nfc_wrap.c +64 -20
- data/lib/extensions/rhoxml/rexml/document.rb +3 -2
- data/lib/extensions/rhoxml/rexml/instruction.rb +70 -0
- data/lib/framework/builtinME.rb +9 -0
- data/lib/framework/date/format.rb +1 -1
- data/lib/framework/dateME.rb +19 -2
- data/lib/framework/rho/rho.rb +15 -4
- data/lib/framework/rho/rhoapplication.rb +1 -0
- data/lib/framework/rho/rhocontact.rb +10 -27
- data/lib/framework/rho/rhoevent_c.rb +8 -2
- data/lib/framework/rho/rhosupport.rb +25 -0
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rhoframework.rb +15 -0
- data/lib/framework/rholang/localization_simplified.rb +8 -10
- data/lib/framework/rhom/rhom_object_factory.rb +8 -2
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/jni/Application.mk +2 -1
- data/platform/android/Rhodes/jni/include/rhodes.h +9 -0
- data/platform/android/Rhodes/jni/src/callbacks.cpp +31 -1
- data/platform/android/Rhodes/jni/src/event.cpp +75 -31
- data/platform/android/Rhodes/jni/src/nativeview.cpp +1 -1
- data/platform/android/Rhodes/jni/src/phonebook.cpp +73 -9
- data/platform/android/Rhodes/jni/src/rhodes.cpp +21 -0
- data/platform/android/Rhodes/jni/src/rhodesapp.cpp +16 -24
- data/platform/android/Rhodes/jni/src/signature.cpp +27 -1
- data/platform/android/Rhodes/{default.properties → project.properties} +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +14 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +14 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +38 -115
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +69 -52
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +9 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraNewService.java +21 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraOldService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraSemiService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +38 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/Event.java +212 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +82 -125
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +2 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +39 -19
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +106 -136
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +26 -25
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality.java +40 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality01.java +47 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality02.java +33 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality03.java +33 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality04.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality05.java +75 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality06.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality07.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality08.java +44 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality09.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality10.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionalityManager.java +73 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Contact.java +57 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessor.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorNew.java +322 -76
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorOld.java +11 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Phonebook.java +5 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +2 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +125 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +2 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebView.java +16 -0
- data/platform/android/build/RhodesSRC_build.files +14 -0
- data/platform/android/build/android.rake +149 -147
- data/platform/android/build/android_tools.rb +58 -0
- data/platform/android/build/librhocommon_build.files +1 -0
- data/platform/android/build/libruby_build.files +3 -0
- data/platform/bb/RubyVM/src/com/rho/RhoConf.java +11 -1
- data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +11 -5
- data/platform/bb/RubyVM/src/com/rho/db/DBAttrManager.java +3 -2
- data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +2 -0
- data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +20 -8
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +9 -6
- data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +45 -18
- data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +1 -2
- data/platform/bb/build/bb.rake +84 -70
- data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +106 -14
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +1 -1
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +108 -16
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +10 -5
- data/platform/bb/rhodes/src/rhomobile/camera/CameraScreen.java +21 -4
- data/platform/bb/rhodes/src/rhomobile/mapview/Annotation.java +17 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/MapView.java +8 -5
- data/platform/bb/rhodes/src/rhomobile/mapview/MapViewScreen.java +3 -1
- data/platform/iphone/Classes/AppManager/AppManager.m +15 -3
- data/platform/iphone/Classes/Event/Event.m +45 -2
- data/platform/iphone/Classes/MapView/MapViewController.m +8 -4
- data/platform/iphone/Classes/Phonebook/phonebook.m +30 -7
- data/platform/iphone/Classes/Rhodes.h +11 -1
- data/platform/iphone/Classes/Rhodes.m +141 -9
- data/platform/iphone/Classes/Signature/SignatureDelegate.m +27 -1
- data/platform/iphone/Classes/SimpleMainView.h +1 -0
- data/platform/iphone/Classes/SimpleMainView.m +4 -0
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +31 -1
- data/platform/iphone/curl/curl.xcodeproj/project.pbxproj +10 -0
- data/platform/iphone/rbuild/iphone.rake +33 -6
- data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +10 -2
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +22 -2
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +14 -0
- data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +10 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
- data/platform/osx/build/osx.rake +58 -7
- data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +427 -69
- data/platform/shared/RhoConnectClient/RhoConnectClient.h +21 -2
- data/platform/shared/common/Android.mk +2 -1
- data/platform/shared/common/AutoPointer.h +23 -0
- data/platform/shared/common/BundleManager.cpp +333 -0
- data/platform/shared/common/RhoFile.cpp +206 -23
- data/platform/shared/common/RhoFile.h +14 -4
- data/platform/shared/common/RhoFilePath.h +18 -0
- data/platform/shared/common/RhoStd.h +11 -1
- data/platform/shared/common/RhoThread.h +4 -1
- data/platform/shared/common/RhodesApp.cpp +31 -8
- data/platform/shared/common/RhodesApp.h +14 -0
- data/platform/shared/common/RhodesAppBase.cpp +6 -6
- data/platform/shared/common/RhodesAppBase.h +1 -1
- data/platform/shared/common/emml.h +34 -0
- data/platform/shared/common/iphone/RhoFileImpl.m +30 -2
- data/platform/shared/common/map/BaseMapEngine.cpp +3 -3
- data/platform/shared/common/map/GeocodingMapEngine.cpp +205 -14
- data/platform/shared/common/map/GeocodingMapEngine.h +25 -2
- data/platform/shared/common/map/MapEngine.cpp +24 -2
- data/platform/shared/common/map/MapEngine.h +23 -12
- data/platform/shared/common/phonebook/PhonebookParams.cpp +99 -0
- data/platform/shared/common/phonebook/PhonebookParams.h +52 -0
- data/platform/shared/common/rhoparams.cpp +14 -0
- data/platform/shared/common/rhoparams.h +1 -0
- data/platform/shared/db/DBAdapter.cpp +43 -24
- data/platform/shared/db/DBAdapter.h +6 -1
- data/platform/shared/db/DBAttrManager.cpp +50 -1
- data/platform/shared/logging/RhoLog.h +3 -0
- data/platform/shared/logging/RhoLogSink.cpp +5 -1
- data/platform/shared/net/CURLNetRequest.cpp +2 -0
- data/platform/shared/qt/rhodes/QtMainWindow.cpp +14 -1
- data/platform/shared/qt/rhodes/impl/PhonebookImpl.cpp +2 -2
- data/platform/shared/qt/rhodes/impl/RhoFileImpl.cpp +1 -1
- data/platform/shared/qt/rhodes/impl/SignatureImpl.cpp +14 -2
- data/platform/shared/qt/rhodes/impl/SystemImpl.cpp +16 -2
- data/platform/shared/qt/rhodes/main.cpp +28 -0
- data/platform/shared/qt/rhodes/rhodes.pro +3 -0
- data/platform/shared/qt/rholib/rholib.pro +2 -1
- data/platform/shared/qt/rubylib/rubylib.pro +2 -1
- data/platform/shared/ruby/Android.mk +3 -0
- data/platform/shared/ruby/class.c +7 -0
- data/platform/shared/ruby/compile.c +18 -10
- data/platform/shared/ruby/encdb.h +18 -8
- data/platform/shared/ruby/eval.c +108 -2
- data/platform/shared/ruby/ext/alert/alert_wrap.c +64 -20
- data/platform/shared/ruby/ext/asynchttp/asynchttp_wrap.c +64 -20
- data/platform/shared/ruby/ext/bluetooth/bluetooth_wrap.c +67 -23
- data/platform/shared/ruby/ext/calendar/calendar_wrap.c +64 -20
- data/platform/shared/ruby/ext/calendar/event_wrap.c +64 -20
- data/platform/shared/ruby/ext/camera/camera_wrap.c +64 -20
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +64 -20
- data/platform/shared/ruby/ext/geolocation/geolocation.i +16 -0
- data/platform/shared/ruby/ext/geolocation/geolocation_wrap.c +127 -26
- data/platform/shared/ruby/ext/mapview/mapview_wrap.c +64 -20
- data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +65 -21
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager_wrap.c +64 -20
- data/platform/shared/ruby/ext/navbar/navbar_wrap.c +64 -20
- data/platform/shared/ruby/ext/phonebook/phonebook.i +7 -7
- data/platform/shared/ruby/ext/phonebook/phonebook_wrap.c +95 -120
- data/platform/shared/ruby/ext/rho/rhoruby.c +4 -4
- data/platform/shared/ruby/ext/rho/rhoruby.h +2 -0
- data/platform/shared/ruby/ext/rho/rhosupport.c +39 -6
- data/platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c +65 -21
- data/platform/shared/ruby/ext/ringtones/ringtones_wrap.c +64 -20
- data/platform/shared/ruby/ext/signature/signature.i +37 -5
- data/platform/shared/ruby/ext/signature/signature_wrap.c +274 -45
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +65 -21
- data/platform/shared/ruby/ext/system/system.i +14 -2
- data/platform/shared/ruby/ext/system/system_wrap.c +146 -25
- data/platform/shared/ruby/ext/webview/webview_wrap.c +65 -21
- data/platform/shared/ruby/include/ruby/ruby.h +15 -4
- data/platform/shared/ruby/inits.c +1 -0
- data/platform/shared/ruby/io.c +13 -3
- data/platform/shared/ruby/win32/win32.c +3 -3
- data/platform/shared/ruby/wince/io_wce.c +2 -2
- data/platform/shared/rubyext/System.cpp +9 -5
- data/platform/shared/sync/ClientRegister.cpp +18 -8
- data/platform/shared/sync/SyncEngine.cpp +25 -11
- data/platform/shared/sync/SyncEngine.h +2 -0
- data/platform/shared/sync/SyncSource.cpp +40 -15
- data/platform/shared/sync/SyncSource.h +3 -2
- data/platform/shared/sync/SyncThread.cpp +9 -4
- data/platform/shared/sync/SyncThread.h +3 -1
- data/platform/symbian/build/symbian.rake +14 -9
- data/platform/symbian/rhodes/rhodes.pro +11 -8
- data/platform/symbian/rhodes/src/phonebook/ruby_phonebook.cpp +2 -2
- data/platform/symbian/rubylib/rubylib.pro +3 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/wm/RhoLib/RhoLib.vcproj +315 -2
- data/platform/wm/build/build_inf.js +235 -187
- data/platform/wm/build/wm.rake +388 -233
- data/platform/wm/rhodes.sln +56 -0
- data/platform/wm/rhodes/MainWindow.cpp +139 -77
- data/platform/wm/rhodes/MainWindow.h +27 -22
- data/platform/wm/rhodes/MapView/{Graphics.cpp → Bitmap.cpp} +15 -253
- data/platform/wm/rhodes/MapView/Bitmap.h +86 -0
- data/platform/wm/rhodes/MapView/MapViewManager.cpp +7 -2
- data/platform/wm/rhodes/MapView/MapViewManager.h +1 -1
- data/platform/wm/rhodes/MapView/Win32Graphics.cpp +263 -0
- data/platform/wm/rhodes/MapView/Win32Graphics.h +133 -0
- data/platform/wm/rhodes/MapView/WmGraphics.cpp +291 -0
- data/platform/wm/rhodes/MapView/{Graphics.h → WmGraphics.h} +14 -56
- data/platform/wm/rhodes/Rhodes.cpp +128 -32
- data/platform/wm/rhodes/Rhodes.rc +6 -2
- data/platform/wm/rhodes/camera/Camera.cpp +1 -0
- data/platform/wm/rhodes/phonebook/phonebook.cpp +2 -2
- data/platform/wm/rhodes/phonebook/phonebook.h +2 -2
- data/platform/wm/rhodes/resource.h +3 -2
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +6 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +4 -0
- data/platform/wm/rhodes/rho/rubyext/RhoSignature.cpp +675 -0
- data/platform/wm/rhodes/rho/rubyext/RhoSignature.h +123 -0
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +12 -2
- data/platform/wm/rhodes/rhodes.vcproj +2732 -1113
- data/platform/wm/rhodes/simulator/MainWindowQt.h +1 -1
- data/platform/wm/rhodes/stdafx.h +1 -0
- data/platform/wm/rhoelements.sln +118 -62
- data/platform/wm/rubylib/rubylib.vcproj +345 -16
- data/platform/wm/sqlite3/sqlite3.vcproj +305 -0
- data/platform/wm/syncengine/syncengine.vcproj +309 -0
- data/platform/wm/tools/detool/LogServer.cpp +19 -2
- data/platform/wm/tools/detool/detool.cpp +131 -6
- data/platform/wm/tools/detool/detool.vcproj +3 -1
- data/platform/wm/tools/detool/stdafx.h +1 -0
- data/platform/wp7/IronRuby/Languages/Ruby/Libraries/Builtins/RangeOps.cs +589 -0
- data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Builtins/RubyEncoding.cs +678 -0
- data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs +271 -0
- data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Runtime/RubyUtils.cs +31 -1
- data/platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.Libraries.dll +0 -0
- data/platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.dll +0 -0
- data/platform/wp7/RhoRubyLib/common/RhoStd.cs +6 -0
- data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +16 -2
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +2 -0
- data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +1 -2
- data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +13 -10
- data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +30 -8
- data/platform/wp7/build/wp.rake +5 -0
- data/rakefile.rb +153 -46
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubyerrors.swg +155 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubyhead.swg +158 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubyiterators.swg +932 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubyrun.swg +448 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubystdfunctors.swg +162 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubytracking.swg +159 -0
- data/res/build-tools/swig_patch/Lib/ruby/std_basic_string.i +97 -0
- data/res/build-tools/swig_patch/Lib/ruby/std_map.i +418 -0
- data/res/build-tools/swig_patch/Lib/ruby/std_multimap.i +227 -0
- data/res/build-tools/swig_patch/Lib/swiginit.swg +269 -0
- data/res/build-tools/swig_patch/README +7 -0
- data/res/generators/templates/application/app/Settings/controller.rb +42 -1
- data/res/generators/templates/application/app/Settings/wait.erb +1 -1
- data/res/generators/templates/application/app/application.rb +1 -1
- data/res/generators/templates/application/app/layout.erb +8 -8
- data/res/generators/templates/application/build.yml +0 -1
- data/res/generators/templates/application/public/css/android.css +6 -0
- data/res/generators/templates/application/public/css/blackberry.css +6 -0
- data/res/generators/templates/application/public/css/iphone.css +6 -0
- data/res/generators/templates/application/public/css/jqmobile-patch.css +14 -0
- data/res/generators/templates/application/public/jqmobile/images/ajax-loader.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-18-black.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-18-white.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-36-black.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-36-white.png +0 -0
- data/res/generators/templates/application/public/jqmobile/{jquery.mobile-1.0rc1.css → jquery.mobile-1.0.css} +452 -354
- data/res/generators/templates/application/public/jqmobile/{jquery.mobile-1.0rc1.js → jquery.mobile-1.0.js} +629 -442
- data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.min.css +2 -0
- data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.min.js +172 -0
- data/res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.css +714 -0
- data/res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.min.css +2 -0
- data/res/generators/templates/application/public/js/jqmobile-patch.js +136 -7
- data/res/generators/templates/extension/app/MontanaTest/controller.rb +20 -20
- data/res/generators/templates/extension/app/MontanaTest/index.erb +17 -17
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Montana.xcodeproj/project.pbxproj +8 -2
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Rakefile +5 -0
- data/res/generators/templates/extension/extensions/montana/ext/montana/shared/ruby/montana_wrap.c +64 -20
- data/rhomobile-debug.gemspec +1 -1
- data/spec/framework_spec/app/layout.erb +1 -1
- data/spec/framework_spec/app/spec/core/rational/Rational_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/stringio/shared/each_char.rb +6 -2
- data/spec/framework_spec/app/spec/shared/rational/{Rational.rb → rational_main.rb} +0 -0
- data/spec/framework_spec/build.yml +0 -3
- data/spec/perfomance_spec/app/Benchmark/controller.rb +1 -1
- data/spec/perfomance_spec/app/layout.erb +1 -1
- data/spec/phone_spec/app/BlobTest_s/blob_test_s.rb +13 -0
- data/spec/phone_spec/app/BlobTest_s/test.png +0 -0
- data/spec/phone_spec/app/BlobTest_s/test2.png +0 -0
- data/spec/phone_spec/app/spec/blobsync_spec.rb +27 -15
- data/spec/phone_spec/app/spec/date_spec.rb +27 -1
- data/spec/phone_spec/app/spec/rho_spec.rb +6 -0
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +64 -26
- data/spec/phone_spec/app/spec/syncengine_spec.rb +28 -7
- data/spec/phone_spec/app/spec/uri_spec.rb +4 -4
- data/spec/phone_spec/app/spec_runner.rb +4 -2
- data/spec/phone_spec/build.yml +7 -9
- data/spec/phone_spec/rhoconfig.txt +1 -0
- data/version +1 -1
- metadata +75 -22
- data/Manifest.txt +0 -7853
- data/platform/wm/rhodes/rhoelements/RhoWKBrowserEngine.cpp +0 -384
- data/platform/wm/rhodes/rhoelements/RhoWKBrowserEngine.h +0 -41
- data/platform/wm/rhodes/signature/Signature.cpp +0 -396
- data/platform/wm/rhodes/signature/Signature.h +0 -84
- data/platform/wm/rubylib/rubylib.vcproj.VLAD.Vladimir.user +0 -429
- data/platform/wm/sqlite3/sqlite3.vcproj.VLAD.Vladimir.user +0 -429
- data/platform/wm/syncengine/syncengine.vcproj.VLAD.Vladimir.user +0 -429
- data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0rc1.min.css +0 -12
- data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0rc1.min.js +0 -170
- data/rhomobile-debug-1.0.5.gem +0 -0
@@ -0,0 +1,271 @@
|
|
1
|
+
/* ****************************************************************************
|
2
|
+
*
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
4
|
+
*
|
5
|
+
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A
|
6
|
+
* copy of the license can be found in the License.html file at the root of this distribution. If
|
7
|
+
* you cannot locate the Apache License, Version 2.0, please send an email to
|
8
|
+
* ironruby@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
|
9
|
+
* by the terms of the Apache License, Version 2.0.
|
10
|
+
*
|
11
|
+
* You must not remove this notice, or any other, from this software.
|
12
|
+
*
|
13
|
+
*
|
14
|
+
* ***************************************************************************/
|
15
|
+
|
16
|
+
using System;
|
17
|
+
using System.Collections.Generic;
|
18
|
+
using System.Diagnostics;
|
19
|
+
using System.IO;
|
20
|
+
using System.Reflection;
|
21
|
+
using System.Runtime.CompilerServices;
|
22
|
+
using System.Security;
|
23
|
+
using System.Security.Permissions;
|
24
|
+
using System.Threading;
|
25
|
+
using IronRuby.Builtins;
|
26
|
+
using IronRuby.Runtime.Calls;
|
27
|
+
using Microsoft.Scripting;
|
28
|
+
using Microsoft.Scripting.Interpreter;
|
29
|
+
using Microsoft.Scripting.Utils;
|
30
|
+
using System.Globalization;
|
31
|
+
|
32
|
+
namespace IronRuby.Runtime {
|
33
|
+
/// <summary>
|
34
|
+
/// Stores extra instance data associated with Ruby exceptions
|
35
|
+
/// </summary>
|
36
|
+
[Serializable]
|
37
|
+
public sealed class RubyExceptionData {
|
38
|
+
private static readonly object/*!*/ _DataKey = typeof(RubyExceptionData);
|
39
|
+
|
40
|
+
// An exception class can implement singleton method "new" that returns an arbitrary instance of an exception.
|
41
|
+
// This mapping needs to be applied on exceptions created in libraries as well (they should be created "dynamically").
|
42
|
+
// That would however need to pass RubyContext to every method that might throw an exception. Instead, we call
|
43
|
+
// "new" on the exception's class as soon as it gets to the first Ruby EH handler (rescue/ensure/else).
|
44
|
+
//
|
45
|
+
// True if the exception has already been handled by Ruby EH clause or if it was constructed "dynamically" via Class#new.
|
46
|
+
internal bool Handled { get; set; }
|
47
|
+
|
48
|
+
// Real exception begin propagated by the CLR. Needed for lazy initialization of message, backtrace
|
49
|
+
private Exception/*!*/ _exception;
|
50
|
+
// For asynchronous exceptions (Thread#raise), the user-visible exception (accessible via _visibleException)
|
51
|
+
// is wrapped in a TheadAbortException (accessible via _exception)
|
52
|
+
private Exception/*!*/ _visibleException;
|
53
|
+
|
54
|
+
#if DEBUG
|
55
|
+
#pragma warning disable 414 // msc: unused field
|
56
|
+
// For asynchronous exceptions, this is useful to figure out which thread raised the exception
|
57
|
+
[NonSerialized]
|
58
|
+
private Thread/*!*/ _throwingThread;
|
59
|
+
#pragma warning restore 414
|
60
|
+
#endif
|
61
|
+
|
62
|
+
// if this is set to null we need to initialize it
|
63
|
+
private object _message;
|
64
|
+
|
65
|
+
// can be set explicitly by the user (even to nil):
|
66
|
+
private RubyArray _backtrace;
|
67
|
+
|
68
|
+
//RHO
|
69
|
+
private static RubyArray m_orig_backtrace;
|
70
|
+
private static object m_orig_message;
|
71
|
+
//RHO
|
72
|
+
|
73
|
+
[NonSerialized]
|
74
|
+
private CallSite<Func<CallSite, RubyContext, Exception, RubyArray, object>> _setBacktraceCallSite;
|
75
|
+
|
76
|
+
private RubyExceptionData(Exception/*!*/ exception) {
|
77
|
+
_exception = exception;
|
78
|
+
_visibleException = exception;
|
79
|
+
#if DEBUG
|
80
|
+
_throwingThread = Thread.CurrentThread;
|
81
|
+
#endif
|
82
|
+
}
|
83
|
+
|
84
|
+
public static RubyArray/*!*/ CreateBacktrace(RubyContext/*!*/ context, int skipFrames) {
|
85
|
+
return new RubyStackTraceBuilder(context, skipFrames).RubyTrace;
|
86
|
+
}
|
87
|
+
|
88
|
+
/// <summary>
|
89
|
+
/// Builds backtrace for the exception if it wasn't built yet.
|
90
|
+
/// Captures a full stack trace starting with the current frame and combines it with the trace of the exception.
|
91
|
+
/// Called from compiled code.
|
92
|
+
/// </summary>
|
93
|
+
internal void CaptureExceptionTrace(RubyScope/*!*/ scope) {
|
94
|
+
if (_backtrace == null) {
|
95
|
+
StackTrace catchSiteTrace = RubyStackTraceBuilder.GetClrStackTrace(null);
|
96
|
+
_backtrace = new RubyStackTraceBuilder(scope.RubyContext, _exception, catchSiteTrace, scope.InterpretedFrame != null).RubyTrace;
|
97
|
+
DynamicSetBacktrace(scope.RubyContext, _backtrace);
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
/// <summary>
|
102
|
+
/// This is called by the IronRuby runtime to set the backtrace for an exception that has being raised.
|
103
|
+
/// Note that the backtrace may be set directly by user code as well. However, that uses a different code path.
|
104
|
+
/// </summary>
|
105
|
+
private void DynamicSetBacktrace(RubyContext/*!*/ context, RubyArray backtrace) {
|
106
|
+
if (_setBacktraceCallSite == null) {
|
107
|
+
Interlocked.CompareExchange(ref _setBacktraceCallSite, CallSite<Func<CallSite, RubyContext, Exception, RubyArray, object>>.
|
108
|
+
Create(RubyCallAction.MakeShared("set_backtrace", RubyCallSignature.WithImplicitSelf(1))), null);
|
109
|
+
}
|
110
|
+
_setBacktraceCallSite.Target(_setBacktraceCallSite, context, _exception, backtrace);
|
111
|
+
}
|
112
|
+
|
113
|
+
/// <summary>
|
114
|
+
/// Gets the instance data associated with the exception
|
115
|
+
/// </summary>
|
116
|
+
public static RubyExceptionData/*!*/ GetInstance(Exception/*!*/ e) {
|
117
|
+
RubyExceptionData result = TryGetInstance(e);
|
118
|
+
if (result == null) {
|
119
|
+
result = AssociateInstance(e);
|
120
|
+
}
|
121
|
+
return result;
|
122
|
+
}
|
123
|
+
|
124
|
+
internal static RubyExceptionData/*!*/ AssociateInstance(Exception/*!*/ e) {
|
125
|
+
RubyExceptionData result;
|
126
|
+
|
127
|
+
Exception visibleException = RubyUtils.GetVisibleException(e);
|
128
|
+
if (e == visibleException || visibleException == null) {
|
129
|
+
result = new RubyExceptionData(e);
|
130
|
+
} else {
|
131
|
+
// Async exception
|
132
|
+
|
133
|
+
Debug.Assert(e is ThreadAbortException);
|
134
|
+
result = GetInstance(visibleException);
|
135
|
+
|
136
|
+
if (result._exception == visibleException) {
|
137
|
+
// A different instance of ThreadAbortException is thrown at the end of every catch block (as long as
|
138
|
+
// Thread.ResetAbort is not called). However, we only want to remember the first one
|
139
|
+
// as it will have the most complete stack trace.
|
140
|
+
result._exception = e;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
e.Data[_DataKey] = result;
|
145
|
+
return result;
|
146
|
+
}
|
147
|
+
|
148
|
+
internal static RubyExceptionData TryGetInstance(Exception/*!*/ e) {
|
149
|
+
return e.Data[_DataKey] as RubyExceptionData;
|
150
|
+
}
|
151
|
+
|
152
|
+
public object Message {
|
153
|
+
get {
|
154
|
+
//RHO
|
155
|
+
if (m_orig_message != null)
|
156
|
+
return m_orig_message;
|
157
|
+
//RHO
|
158
|
+
|
159
|
+
if (_message == null) {
|
160
|
+
_message = MutableString.Create(_visibleException.Message, RubyEncoding.UTF8);
|
161
|
+
}
|
162
|
+
return _message;
|
163
|
+
}
|
164
|
+
set {
|
165
|
+
ContractUtils.RequiresNotNull(value, "value");
|
166
|
+
_message = value;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
public RubyArray Backtrace {
|
171
|
+
get {
|
172
|
+
//RHO
|
173
|
+
if (m_orig_backtrace != null)
|
174
|
+
return m_orig_backtrace;
|
175
|
+
//RHO
|
176
|
+
return _backtrace;
|
177
|
+
}
|
178
|
+
set {
|
179
|
+
//RHO
|
180
|
+
if (!_visibleException.Message.Equals("TargetInvocationException"))
|
181
|
+
{
|
182
|
+
m_orig_backtrace = _backtrace;
|
183
|
+
m_orig_message = _visibleException.Message;
|
184
|
+
}
|
185
|
+
//RHO
|
186
|
+
_backtrace = value;
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
public static string/*!*/ GetClrMessage(RubyContext/*!*/ context, object message) {
|
191
|
+
return Protocols.ToClrStringNoThrow(context, message);
|
192
|
+
}
|
193
|
+
|
194
|
+
public static string/*!*/ GetClrMessage(RubyClass/*!*/ exceptionClass, object message) {
|
195
|
+
return GetClrMessage(exceptionClass.Context, message ?? exceptionClass.Name);
|
196
|
+
}
|
197
|
+
|
198
|
+
public static Exception/*!*/ InitializeException(Exception/*!*/ exception, object message) {
|
199
|
+
RubyExceptionData data = RubyExceptionData.GetInstance(exception);
|
200
|
+
// only set it if message is non-null. Otherwise, let lazy initialization create the default message from CLR exception message
|
201
|
+
if (message != null) {
|
202
|
+
data.Message = message;
|
203
|
+
}
|
204
|
+
|
205
|
+
return exception;
|
206
|
+
}
|
207
|
+
|
208
|
+
internal static Exception/*!*/ HandleException(RubyContext/*!*/ context, Exception/*!*/ exception) {
|
209
|
+
// already handled:
|
210
|
+
var instanceData = GetInstance(exception);
|
211
|
+
if (instanceData.Handled) {
|
212
|
+
return exception;
|
213
|
+
}
|
214
|
+
|
215
|
+
RubyClass exceptionClass = context.GetClass(exception.GetType());
|
216
|
+
|
217
|
+
// new resolves to Class#new built-in method:
|
218
|
+
var newMethod = exceptionClass.ImmediateClass.ResolveMethod("new", VisibilityContext.AllVisible);
|
219
|
+
if (newMethod.Found && newMethod.Info.DeclaringModule == context.ClassClass && newMethod.Info is RubyCustomMethodInfo) {
|
220
|
+
// initialize resolves to a built-in method:
|
221
|
+
var initializeMethod = exceptionClass.ResolveMethod("initialize", VisibilityContext.AllVisible);
|
222
|
+
if (initializeMethod.Found && initializeMethod.Info is RubyLibraryMethodInfo) {
|
223
|
+
instanceData.Handled = true;
|
224
|
+
return exception;
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
var site = exceptionClass.NewSite;
|
229
|
+
Exception newException;
|
230
|
+
try {
|
231
|
+
newException = site.Target(site, exceptionClass, instanceData.Message) as Exception;
|
232
|
+
} catch (Exception e) {
|
233
|
+
// MRI: this can lead to stack overflow:
|
234
|
+
return HandleException(context, e);
|
235
|
+
}
|
236
|
+
|
237
|
+
// MRI doesn't handle this correctly, see http://redmine.ruby-lang.org/issues/show/1886:
|
238
|
+
if (newException == null) {
|
239
|
+
newException = RubyExceptions.CreateTypeError("exception object expected");
|
240
|
+
}
|
241
|
+
|
242
|
+
var newInstanceData = GetInstance(newException);
|
243
|
+
|
244
|
+
newInstanceData.Handled = true;
|
245
|
+
newInstanceData._backtrace = instanceData._backtrace;
|
246
|
+
return newException;
|
247
|
+
}
|
248
|
+
|
249
|
+
#if SILVERLIGHT // Thread.ExceptionState
|
250
|
+
public static void ActiveExceptionHandled(Exception visibleException) {}
|
251
|
+
#else
|
252
|
+
public static void ActiveExceptionHandled(Exception visibleException) {
|
253
|
+
Debug.Assert(RubyUtils.GetVisibleException(visibleException) == visibleException);
|
254
|
+
|
255
|
+
RubyExceptionData data = RubyExceptionData.GetInstance(visibleException);
|
256
|
+
if (data._exception != visibleException) {
|
257
|
+
// The exception was raised asynchronously with Thread.Abort. We can not just catch and ignore
|
258
|
+
// the ThreadAbortException as the CLR keeps trying to re-raise it unless ResetAbort is called.
|
259
|
+
//
|
260
|
+
// Note that ResetAbort can cause ThreadAbortException.ExceptionState to be cleared (though it may
|
261
|
+
// not be cleared under some circustances), and we use that to squirrel away the Ruby exception
|
262
|
+
// that the user is expecting. Hence, ResetAbort should only be called when
|
263
|
+
// ThreadAbortException.ExceptionState no longer needs to be accessed.
|
264
|
+
if ((Thread.CurrentThread.ThreadState & System.Threading.ThreadState.AbortRequested) != 0) {
|
265
|
+
Thread.ResetAbort();
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
#endif
|
270
|
+
}
|
271
|
+
}
|
@@ -978,8 +978,10 @@ namespace IronRuby.Runtime {
|
|
978
978
|
|
979
979
|
Type baseType = theclass.GetUnderlyingSystemType();
|
980
980
|
object obj;
|
981
|
+
#if SILVERLIGHT // serialization
|
982
|
+
if (typeof(ISerializable).IsAssignableFrom(baseType) && !typeof(RubyObject).IsAssignableFrom(baseType)) {
|
983
|
+
#else
|
981
984
|
if (typeof(ISerializable).IsAssignableFrom(baseType)) {
|
982
|
-
#if !SILVERLIGHT // serialization
|
983
985
|
BindingFlags bindingFlags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;
|
984
986
|
ConstructorInfo ci = baseType.GetConstructor(bindingFlags, null, _serializableTypeSignature, null);
|
985
987
|
if (ci == null) {
|
@@ -1185,6 +1187,34 @@ namespace IronRuby.Runtime {
|
|
1185
1187
|
return path[0] == '/';
|
1186
1188
|
}
|
1187
1189
|
|
1190
|
+
public static bool IsRelativeToCurrentDirectory(string path) {
|
1191
|
+
if (String.IsNullOrEmpty(path)) {
|
1192
|
+
return false;
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
if (path.Length == 1) {
|
1196
|
+
return path[0] == '.';
|
1197
|
+
}
|
1198
|
+
|
1199
|
+
if (path[0] != '.') {
|
1200
|
+
return false;
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
if (path[1] == '/' || path[1] == '\\') {
|
1204
|
+
return true;
|
1205
|
+
}
|
1206
|
+
|
1207
|
+
if (path.Length == 2) {
|
1208
|
+
return path[1] == '.';
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
if (path[2] == '/' || path[2] == '\\') {
|
1212
|
+
return true;
|
1213
|
+
}
|
1214
|
+
|
1215
|
+
return false;
|
1216
|
+
}
|
1217
|
+
|
1188
1218
|
// Is path something like "c:/foo/bar" (on Windows)
|
1189
1219
|
public static bool IsAbsoluteDriveLetterPath(string path) {
|
1190
1220
|
if (String.IsNullOrEmpty(path)) {
|
Binary file
|
Binary file
|
@@ -152,6 +152,12 @@ namespace rho.common
|
|
152
152
|
{
|
153
153
|
base.Insert(nPos, value);
|
154
154
|
}
|
155
|
+
|
156
|
+
public int indexOf(TValue item)
|
157
|
+
{
|
158
|
+
return base.IndexOf(item);
|
159
|
+
}
|
160
|
+
|
155
161
|
}
|
156
162
|
|
157
163
|
public class Hashtable<TKey, TValue> : System.Collections.Generic.Dictionary<TKey, TValue>
|
@@ -261,18 +261,32 @@ namespace rho.common
|
|
261
261
|
|
262
262
|
public void processInvokeScript(String strScript, int index)
|
263
263
|
{
|
264
|
+
String[] arr = strScript.Split('(');
|
265
|
+
String[] arrParams = null;
|
266
|
+
if (arr.Length > 1)
|
267
|
+
{
|
268
|
+
arrParams = arr[1].Split(',');
|
269
|
+
if (arrParams.Length == 1)
|
270
|
+
{
|
271
|
+
arrParams[0] = arrParams[0].Replace('"', ' ');
|
272
|
+
arrParams[0] = arrParams[0].Replace(')', ' ');
|
273
|
+
arrParams[0] = arrParams[0].Replace(';', ' ');
|
274
|
+
arrParams[0] = arrParams[0].Trim();
|
275
|
+
}
|
276
|
+
}
|
277
|
+
|
264
278
|
m_webBrowser.Dispatcher.BeginInvoke(() =>
|
265
279
|
{
|
266
280
|
if (index > 0)
|
267
281
|
{
|
268
282
|
if (m_tabControl != null && m_tabControl.Items.Count > 0)
|
269
283
|
{
|
270
|
-
((RhoView)((TabItem)m_tabControl.Items[index]).Content).webBrowser1.InvokeScript(
|
284
|
+
((RhoView)((TabItem)m_tabControl.Items[index]).Content).webBrowser1.InvokeScript(arr[0], arrParams);
|
271
285
|
}
|
272
286
|
}
|
273
287
|
else
|
274
288
|
{
|
275
|
-
m_webBrowser.InvokeScript(
|
289
|
+
m_webBrowser.InvokeScript(arr[0], arrParams);
|
276
290
|
}
|
277
291
|
});
|
278
292
|
}
|
@@ -907,7 +907,7 @@ namespace rho.sync
|
|
907
907
|
/*bError = !*/syncOneSource(i);
|
908
908
|
}
|
909
909
|
|
910
|
-
|
910
|
+
if (!isSchemaChanged() && getState() != SyncEngine.esStop )
|
911
911
|
getNotify().fireSyncNotification(null, true, RhoAppAdapter.ERR_NONE, RhoAppAdapter.getMessageText("sync_completed"));
|
912
912
|
}
|
913
913
|
|
@@ -1010,14 +1010,17 @@ namespace rho.sync
|
|
1010
1010
|
|
1011
1011
|
public void logout()
|
1012
1012
|
{
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1013
|
+
stopSync();
|
1014
|
+
logout_int();
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
public void logout_int()
|
1018
|
+
{
|
1019
|
+
getUserDB().executeSQL("UPDATE client_info SET session = NULL");
|
1020
|
+
m_strSession = "";
|
1021
|
+
|
1022
|
+
//loadAllSources();
|
1023
|
+
}
|
1021
1024
|
|
1022
1025
|
public void setSyncServer(String syncserver)
|
1023
1026
|
{
|
@@ -1030,7 +1033,7 @@ namespace rho.sync
|
|
1030
1033
|
|
1031
1034
|
getUserDB().executeSQL("DELETE FROM client_info");
|
1032
1035
|
|
1033
|
-
|
1036
|
+
logout_int();
|
1034
1037
|
}
|
1035
1038
|
}
|
1036
1039
|
|
@@ -48,7 +48,7 @@ namespace rho.sync
|
|
48
48
|
public String m_strError = "", m_strServerError = "";
|
49
49
|
|
50
50
|
int m_nRefreshTime = 0;
|
51
|
-
int m_nProgressStep =
|
51
|
+
int m_nProgressStep = 0;
|
52
52
|
boolean m_bSchemaSource;
|
53
53
|
|
54
54
|
public class CAssociation
|
@@ -107,6 +107,7 @@ namespace rho.sync
|
|
107
107
|
m_nID = 0;
|
108
108
|
|
109
109
|
m_bTokenFromDB = true;
|
110
|
+
m_nProgressStep = 0;
|
110
111
|
|
111
112
|
m_nCurPageCount = 0;
|
112
113
|
m_nInserted = 0;
|
@@ -125,7 +126,8 @@ namespace rho.sync
|
|
125
126
|
m_nID = id;
|
126
127
|
m_strName = name;
|
127
128
|
m_strSyncType = strSyncType;
|
128
|
-
|
129
|
+
m_nProgressStep = 0;
|
130
|
+
|
129
131
|
m_nCurPageCount = 0;
|
130
132
|
m_nInserted = 0;
|
131
133
|
m_nDeleted = 0;
|
@@ -470,7 +472,9 @@ namespace rho.sync
|
|
470
472
|
oItem.m_strContentType = "application/octet-stream";
|
471
473
|
oItem.m_strName = strAttrib + "-" + strObject;
|
472
474
|
|
473
|
-
|
475
|
+
if (m_arBlobAttrs.indexOf(strAttrib) == -1)
|
476
|
+
m_arBlobAttrs.addElement(strAttrib);
|
477
|
+
|
474
478
|
m_arMultipartItems.addElement(oItem);
|
475
479
|
}
|
476
480
|
|
@@ -825,18 +829,36 @@ namespace rho.sync
|
|
825
829
|
|
826
830
|
if ( bCheckUIRequest )
|
827
831
|
{
|
828
|
-
int nSyncObjectCount = getNotify().incLastSyncObjectCount(getID());
|
829
|
-
if ( getProgressStep() > 0 && (nSyncObjectCount%getProgressStep() == 0) )
|
830
|
-
getNotify().fireSyncNotification(this, false, RhoAppAdapter.ERR_NONE, "");
|
831
|
-
|
832
832
|
if ( getDB().isUIWaitDB() )
|
833
833
|
{
|
834
834
|
LOG.INFO("Commit transaction because of UI request.");
|
835
835
|
getDB().endTransaction();
|
836
|
+
|
837
|
+
checkProgressStepNotify(false);
|
838
|
+
|
836
839
|
SyncThread.sleep(1000);
|
837
840
|
getDB().startTransaction();
|
838
|
-
}
|
841
|
+
}else
|
842
|
+
checkProgressStepNotify(true);
|
843
|
+
}
|
844
|
+
}
|
845
|
+
}
|
846
|
+
|
847
|
+
void checkProgressStepNotify(boolean bEndTransaction)//throws Exception
|
848
|
+
{
|
849
|
+
int nSyncObjectCount = getNotify().incLastSyncObjectCount(getID());
|
850
|
+
if ( getProgressStep() > 0 && (nSyncObjectCount%getProgressStep() == 0) )
|
851
|
+
{
|
852
|
+
if ( bEndTransaction )
|
853
|
+
{
|
854
|
+
LOG.INFO("Commit transaction because of Sync Progress notification.");
|
855
|
+
getDB().endTransaction();
|
839
856
|
}
|
857
|
+
|
858
|
+
getNotify().fireSyncNotification(this, false, RhoAppAdapter.ERR_NONE, "");
|
859
|
+
|
860
|
+
if ( bEndTransaction )
|
861
|
+
getDB().startTransaction();
|
840
862
|
}
|
841
863
|
}
|
842
864
|
|