rhodes 2.2.6 → 2.3.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +20 -0
- data/README.md +46 -0
- data/Rakefile +85 -80
- data/bin/rhodes +2 -2
- data/bin/rhogen +1 -1
- data/doc/application.txt +277 -0
- data/doc/bb-css.txt +209 -0
- data/doc/build.txt +785 -0
- data/doc/configuration.txt +236 -0
- data/doc/connect-to-web-services.txt +282 -0
- data/doc/contributing.txt +64 -0
- data/doc/css-framework.txt +144 -0
- data/doc/device-caps.txt +1152 -0
- data/doc/extensions.txt +528 -0
- data/doc/files.txt +4 -0
- data/doc/generator.txt +141 -0
- data/doc/install.txt +35 -0
- data/doc/introduction.txt +88 -0
- data/doc/rhom.txt +826 -0
- data/doc/standard-css.txt +392 -0
- data/doc/synchronization.txt +542 -0
- data/doc/test-log-debug.txt +148 -0
- data/doc/tutorial.txt +136 -0
- data/doc/ui.txt +766 -0
- data/installer/EnvVarUpdate.nsh +328 -0
- data/installer/README.html +81 -0
- data/installer/RHOSYNC-LICENSE.txt +675 -0
- data/installer/icon.ico +0 -0
- data/installer/instant-rhodes.nsi +427 -0
- data/lib/build/jake.rb +15 -1
- data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/imageprovider.cpp +1 -1
- data/lib/extensions/barcode/ext/barcode/platform/bb/Barcode6.files +45 -0
- data/lib/extensions/barcode/ext/barcode/platform/bb/Rakefile +6 -0
- data/lib/extensions/barcode/ext/barcode/platform/bb/barcode6.jdp +92 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +7 -4
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Rakefile +2 -1
- data/lib/extensions/barcode/ext/barcode/platform/wm/src/wm_imageprovider.cpp +1 -1
- data/lib/extensions/digest-sha1/ext/build.bat +1 -0
- data/lib/extensions/digest-sha1/ext/digest-sha1.vcproj +335 -0
- data/lib/extensions/esri/ext/build +17 -0
- data/lib/extensions/esri/ext/build.bat +29 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactory.h +7 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactory.mm +58 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactoryRegister.mm +22 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewManager.h +21 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewManager.mm +32 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/InitESRI.c +5 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.h +143 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.m +919 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/ESRI.xcodeproj/project.pbxproj +320 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/ESRI_Prefix.pch +7 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Rakefile +76 -0
- data/lib/extensions/esri/ext.yml +3 -0
- data/lib/extensions/net-http/monitor.rb +265 -0
- data/lib/extensions/net-http/net/ftp.rb +981 -0
- data/lib/extensions/net-http/thread.rb +367 -0
- data/lib/extensions/rhocgi/cgi.rb +16 -0
- data/lib/extensions/rhospec/rhospec.rb +118 -0
- data/lib/framework/base64.rb +91 -0
- data/lib/framework/builtinME.rb +13 -10
- data/lib/framework/ostruct.rb +145 -0
- data/lib/framework/res/back_btn.wm.png +0 -0
- data/lib/framework/res/blue_pushpin.wm.png +0 -0
- data/lib/framework/res/blue_pushpin_small.wm.png +0 -0
- data/lib/framework/res/callout.wm.png +0 -0
- data/lib/framework/res/callout_link.wm.png +0 -0
- data/lib/framework/res/forward_btn.wm.png +0 -0
- data/lib/framework/res/home_btn.wm.png +0 -0
- data/lib/framework/res/options_btn.wm.png +0 -0
- data/lib/framework/res/refresh_btn.wm.png +0 -0
- data/lib/framework/rho/render.rb +5 -2
- data/lib/framework/rho/rho.rb +320 -50
- data/lib/framework/rho/rhoapplication.rb +48 -10
- data/lib/framework/rho/rhonativeviewmanager.rb +73 -0
- data/lib/framework/rho/rhosupport.rb +15 -1
- data/lib/framework/rho/rhotabbar.rb +29 -0
- data/lib/framework/rho/rhotoolbar.rb +17 -0
- data/lib/framework/rho/rhoutils.rb +22 -6
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rholang/rhomsg_de.rb +4 -3
- data/lib/framework/rholang/rhomsg_en.rb +1 -0
- data/lib/framework/rholang/rhomsg_es.rb +1 -0
- data/lib/framework/rholang/rhomsg_it.rb +1 -0
- data/lib/framework/rhom/rhom.rb +31 -10
- data/lib/framework/rhom/rhom_db_adapter.rb +33 -23
- data/lib/framework/rhom/rhom_object_factory.rb +465 -249
- data/lib/framework/rhom/rhom_source.rb +22 -7
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml +83 -20
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +5 -0
- data/platform/android/Rhodes/jni/include/rhodes/RhoClassFactory.h +2 -0
- data/platform/android/Rhodes/jni/include/rhodes/details/rhojava.inc +9 -5
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesAppOptions.h +53 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +46 -56
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_SplashScreen.h +10 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_mapview_MapView.h +93 -0
- data/platform/android/Rhodes/jni/include/rhodes/rhocryptimpl.h +38 -0
- data/platform/android/Rhodes/jni/include/rhodes.h +64 -8
- data/platform/android/Rhodes/jni/src/RhoClassFactory.cpp +6 -0
- data/platform/android/Rhodes/jni/src/alert.cpp +5 -11
- data/platform/android/Rhodes/jni/src/bluetooth.cpp +66 -29
- data/platform/android/Rhodes/jni/src/callbacks.cpp +24 -21
- data/platform/android/Rhodes/jni/src/camera.cpp +2 -6
- data/platform/android/Rhodes/jni/src/datetimepicker.cpp +13 -11
- data/platform/android/Rhodes/jni/src/event.cpp +9 -15
- data/platform/android/Rhodes/jni/src/fileapi.cpp +13 -27
- data/platform/android/Rhodes/jni/src/logconf.cpp +3 -3
- data/platform/android/Rhodes/jni/src/mapview.cpp +696 -16
- data/platform/android/Rhodes/jni/src/menu.cpp +3 -3
- data/platform/android/Rhodes/jni/src/nativebar.cpp +55 -4
- data/platform/android/Rhodes/jni/src/nativeview.cpp +33 -0
- data/platform/android/Rhodes/jni/src/phonebook.cpp +6 -11
- data/platform/android/Rhodes/jni/src/rhoconf.cpp +4 -4
- data/platform/android/Rhodes/jni/src/rhocryptimpl.cpp +87 -0
- data/platform/android/Rhodes/jni/src/rhodes.cpp +55 -34
- data/platform/android/Rhodes/jni/src/ringtones.cpp +2 -3
- data/platform/android/Rhodes/jni/src/signature.cpp +3 -5
- data/platform/android/Rhodes/jni/src/splashscreen.cpp +7 -0
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +17 -20
- data/platform/android/Rhodes/jni/src/webview.cpp +13 -12
- data/platform/android/Rhodes/res/drawable/callout.png +0 -0
- data/platform/android/Rhodes/res/drawable/callout_link.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_cancel.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_clear.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_ok.png +0 -0
- data/platform/android/Rhodes/res/layout/datetime.xml +4 -0
- data/platform/android/Rhodes/res/layout/signature.xml +24 -17
- data/platform/android/Rhodes/res/layout/status_bar_ongoing_event_progress_bar.xml +102 -0
- data/platform/android/Rhodes/res/values/strings.xml +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java +6 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Base64.java +575 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +83 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +21 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +23 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushService.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +151 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMenu.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +372 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesAppOptions.java +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +58 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +705 -523
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RingtoneManager.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/SplashScreen.java +167 -85
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Utils.java +36 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +4 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +33 -20
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/IRhoBluetoothManager.java +2 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManager.java +2 -24
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerNew.java +106 -36
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerOld.java +15 -58
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothSession.java +0 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +6 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/FileList.java +4 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +91 -27
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePicker.java +6 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java +275 -42
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +1 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +120 -43
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +518 -28
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +434 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapTouch.java +20 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +296 -336
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MultiTouchHandler.java +111 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/OneTouchHandler.java +77 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/TouchHandler.java +10 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +0 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Contact.java +5 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorNew.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorOld.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +6 -11
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +6 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +0 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/ui/LogViewDialog.java +9 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +8 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientNew.java +5 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +11 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsNew.java +3 -5
- data/platform/android/build/RhodesSRC_build.files +32 -23
- data/platform/android/build/android.rake +28 -11
- data/platform/android/build/androidcommon.rb +2 -0
- data/platform/android/build/librhocommon_build.files +9 -5
- data/platform/android/build/librhodes_build.files +1 -0
- data/platform/android/build/libruby_build.files +1 -0
- data/platform/bb/Hsqldb/Hsqldb.jdp +0 -2
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java +10 -2
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java +37 -5
- data/platform/bb/Hsqldb/src/org/hsqldb/Column.java +5 -5
- data/platform/bb/Hsqldb/src/org/hsqldb/Expression.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/Function.java +73 -78
- data/platform/bb/Hsqldb/src/org/hsqldb/Library.java +288 -8
- data/platform/bb/RubyVM/RubyVM.jdp +3 -0
- data/platform/bb/RubyVM/src/com/rho/FilePath.java +13 -1
- data/platform/bb/RubyVM/src/com/rho/IRhoRubyHelper.java +2 -2
- data/platform/bb/RubyVM/src/com/rho/RhoAppAdapter.java +12 -0
- data/platform/bb/RubyVM/src/com/rho/RhoClassFactory.java +18 -1
- data/platform/bb/RubyVM/src/com/rho/RhoConf.java +128 -108
- data/platform/bb/RubyVM/src/com/rho/RhoLogConf.java +9 -10
- data/platform/bb/RubyVM/src/com/rho/RhoLogger.java +16 -1
- data/platform/bb/RubyVM/src/com/rho/RhoProfiler.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/RhoRuby.java +20 -0
- data/platform/bb/RubyVM/src/com/rho/RhodesApp.java +5 -2
- data/platform/bb/RubyVM/src/com/rho/ThreadQueue.java +65 -46
- data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +192 -50
- data/platform/bb/RubyVM/src/com/rho/db/DBAttrManager.java +8 -114
- data/platform/bb/RubyVM/src/com/rho/db/DBException.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/db/IDBCallback.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/db/IDBResult.java +5 -3
- data/platform/bb/RubyVM/src/com/rho/db/IDBStorage.java +5 -1
- data/platform/bb/RubyVM/src/com/rho/file/FileAccessBB.java +109 -0
- data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +85 -0
- data/platform/bb/RubyVM/src/com/rho/net/NetRequest.java +12 -4
- data/platform/bb/RubyVM/src/com/rho/net/NetResponse.java +5 -0
- data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +37 -23
- data/platform/bb/RubyVM/src/com/rho/net/URI.java +84 -0
- data/platform/bb/RubyVM/src/com/rho/sync/ClientRegister.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +119 -61
- data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +61 -24
- data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +108 -54
- data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +121 -163
- data/platform/bb/RubyVM/src/com/xruby/GeneratedMethods/RubyString_Methods.java +23 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyMutex.java +1 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyRange.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyRegexp.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyString.java +208 -25
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyTime.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RhoSupport.java +5 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyAPI.java +12 -5
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyID.java +1 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyKernelModule.java +16 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyKernelModule_Methods.java +5 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyValue.java +1 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/stdlib/RubyStringIO.java +4 -1
- data/platform/bb/{Hsqldb → RubyVM}/src/j2me/math/Number.java +33 -0
- data/platform/bb/build/RubyVM_build.files +3 -0
- data/platform/bb/build/bb.rake +140 -62
- data/platform/bb/build/hsqldb_build.files +0 -2
- data/platform/bb/build/rhodes_build.files +5 -0
- data/platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java +43 -7
- data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +23 -2
- data/platform/bb/rhodes/platform/5.0/com/rho/RhodesApplicationPlatform.java +5 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteCopyResult.java +143 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteResult.java +269 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteStorage.java +446 -0
- data/platform/bb/rhodes/platform/common/com/rho/BrowserAdapter5.java +3 -0
- data/platform/bb/rhodes/platform/common/com/rho/RhoMainScreen.java +12 -2
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteCopyResult.java +2 -0
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteResult.java +2 -0
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteStorage.java +2 -0
- data/platform/bb/rhodes/resources/mappin.png +0 -0
- data/platform/bb/rhodes/rhodes.jdp +3 -0
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +21 -18
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +150 -0
- data/platform/bb/rhodes/src/com/rho/IBrowserAdapter.java +1 -0
- data/platform/bb/rhodes/src/com/rho/RhoMainScreen.java +63 -4
- data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +6 -5
- data/platform/bb/rhodes/src/com/rho/RhodesApplicationPlatform.java +242 -2
- data/platform/bb/rhodes/src/com/rho/db/SqliteCopyResult.java +143 -0
- data/platform/bb/rhodes/src/com/rho/db/SqliteResult.java +269 -0
- data/platform/bb/rhodes/src/com/rho/db/SqliteStorage.java +446 -0
- data/platform/bb/rhodes/src/com/rho/file/Jsr75File.java +1 -1
- data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +71 -14
- data/platform/bb/rhodes/src/com/rho/net/bb/BBHttpConnection.java +4 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/Alert.java +28 -12
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +100 -4
- data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +3 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/XMLParser.java +1 -1
- data/platform/bb/rhodes/src/rhomobile/NativeBar.java +32 -0
- data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +9 -2
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +174 -41
- data/platform/bb/rhodes/src/rhomobile/datetime/DateTimePicker.java +52 -3
- data/platform/bb/rhodes/src/rhomobile/datetime/DateTimeScreen.java +33 -1
- data/platform/bb/rhodes/src/rhomobile/mapview/Annotation.java +2 -14
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapField.java +686 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapProvider.java +14 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GeoCoding.java +13 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleGeoCoding.java +174 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleMapField.java +104 -330
- data/platform/bb/rhodes/src/rhomobile/mapview/MapTools.java +79 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/MapView.java +35 -12
- data/platform/bb/rhodes/src/rhomobile/mapview/MapViewParent.java +2 -1
- data/platform/bb/rhodes/src/rhomobile/mapview/MapViewScreen.java +336 -44
- data/platform/bb/rhodes/src/rhomobile/mapview/RhoMapField.java +3 -6
- data/platform/iphone/Classes/AppManager/AppManager.m +19 -4
- data/platform/iphone/Classes/DateTime.h +4 -0
- data/platform/iphone/Classes/DateTime.m +1 -1
- data/platform/iphone/Classes/DateTimePicker.m +8 -1
- data/platform/iphone/Classes/DateTimePickerDelegate.m +7 -1
- data/platform/iphone/Classes/Event/Event.m +2 -2
- data/platform/iphone/Classes/MapView/MapViewController.h +4 -1
- data/platform/iphone/Classes/MapView/MapViewController.m +6 -46
- data/platform/iphone/Classes/MapView/MapViewManager.h +26 -0
- data/platform/iphone/Classes/MapView/MapViewManager.m +172 -0
- data/platform/iphone/Classes/NativeBar.h +34 -0
- data/platform/iphone/Classes/NativeBar.m +131 -26
- data/platform/iphone/Classes/NativeView/NVDelegate.h +26 -0
- data/platform/iphone/Classes/NativeView/NVDelegate.m +40 -0
- data/platform/iphone/Classes/NativeView/NVViewController.h +24 -0
- data/platform/iphone/Classes/NativeView/NVViewController.m +90 -0
- data/platform/iphone/Classes/NativeView/RhoNativeViewManager.mm +449 -0
- data/platform/iphone/Classes/{RhoNativeViewManagerOC.h → NativeView/RhoNativeViewManagerOC.h} +15 -0
- data/platform/iphone/Classes/RhoAlert.m +3 -3
- data/platform/iphone/Classes/RhoMainView.h +3 -0
- data/platform/iphone/Classes/Rhodes.h +6 -2
- data/platform/iphone/Classes/Rhodes.m +47 -79
- data/platform/iphone/Classes/Signature/SignatureViewController.m +1 -0
- data/platform/iphone/Classes/SimpleMainView.h +18 -1
- data/platform/iphone/Classes/SimpleMainView.m +180 -35
- data/platform/iphone/Classes/SplitView/LeftViewController.h +1 -1
- data/platform/iphone/Classes/SplitView/LeftViewController.m +13 -7
- data/platform/iphone/Classes/SplitView/RightViewController.h +1 -1
- data/platform/iphone/Classes/SplitView/RightViewController.m +26 -11
- data/platform/iphone/Classes/SplitView/SplittedMainView.h +1 -6
- data/platform/iphone/Classes/SplitView/SplittedMainView.m +14 -52
- data/platform/iphone/Classes/TabbedMainView.h +25 -3
- data/platform/iphone/Classes/TabbedMainView.m +340 -14
- data/platform/iphone/ESRI/BluePushpin.png +0 -0
- data/platform/iphone/ESRI/BluePushpin@2x.png +0 -0
- data/platform/iphone/ESRI/esri.png +0 -0
- data/platform/iphone/ESRI/esri@2x.png +0 -0
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +26 -3
- data/platform/iphone/rbuild/iphone.rake +100 -4
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +12 -0
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +116 -12
- data/platform/shared/SyncClient/SyncClient.cpp +29 -3
- data/platform/shared/SyncClient/SyncClient.h +2 -1
- data/platform/shared/common/IRhoClassFactory.h +3 -0
- data/platform/shared/common/IRhoCrypt.h +16 -0
- data/platform/shared/common/IRhoThreadImpl.h +1 -0
- data/platform/shared/common/RhoAppAdapter.h +2 -0
- data/platform/shared/common/RhoConf.cpp +97 -46
- data/platform/shared/common/RhoConf.h +14 -13
- data/platform/shared/common/RhoFile.cpp +10 -0
- data/platform/shared/common/RhoFile.h +1 -0
- data/platform/shared/common/RhoMath.cpp +43 -0
- data/platform/shared/common/RhoMath.h +27 -0
- data/platform/shared/common/RhoNativeViewManager.h +27 -1
- data/platform/shared/common/RhoPort.h +11 -0
- data/platform/shared/common/RhoStd.h +5 -0
- data/platform/shared/common/RhoThread.cpp +1 -1
- data/platform/shared/common/RhoThread.h +1 -1
- data/platform/shared/common/RhodesApp.cpp +381 -139
- data/platform/shared/common/RhodesApp.h +24 -10
- data/platform/shared/common/RhodesAppBase.cpp +72 -1
- data/platform/shared/common/RhodesAppBase.h +5 -1
- data/platform/shared/common/SplashScreen.h +4 -4
- data/platform/shared/common/ThreadQueue.cpp +44 -17
- data/platform/shared/common/ThreadQueue.h +4 -0
- data/platform/shared/common/app_build_configs.c +0 -1
- data/platform/shared/common/iphone/RhoClassfactory.h +6 -0
- data/platform/shared/common/iphone/RhoCryptImpl.h +47 -0
- data/platform/shared/common/iphone/RhoCryptImpl.mm +286 -0
- data/platform/shared/common/map/ESRIMapEngine.cpp +921 -0
- data/platform/shared/common/map/ESRIMapEngine.h +255 -0
- data/platform/shared/common/map/GoogleMapEngine.cpp +160 -0
- data/platform/shared/common/map/GoogleMapEngine.h +52 -0
- data/platform/shared/common/map/MapEngine.cpp +304 -0
- data/platform/shared/common/map/MapEngine.h +214 -0
- data/platform/shared/db/DBAdapter.cpp +147 -18
- data/platform/shared/db/DBAdapter.h +38 -12
- data/platform/shared/db/DBAttrManager.cpp +4 -3
- data/platform/shared/db/DBAttrManager.h +7 -7
- data/platform/shared/db/res/db/syncdb.triggers +0 -5
- data/platform/shared/db/res/db/syncdb_java.triggers +21 -0
- data/platform/shared/json/JSONIterator.cpp +11 -1
- data/platform/shared/json/JSONIterator.h +1 -0
- data/platform/shared/logging/RhoLogConf.cpp +29 -12
- data/platform/shared/net/CURLNetRequest.cpp +80 -25
- data/platform/shared/net/CURLNetRequest.h +6 -2
- data/platform/shared/net/HttpServer.cpp +12 -6
- data/platform/shared/net/HttpServer.h +2 -1
- data/platform/shared/net/INetRequest.h +1 -0
- data/platform/shared/ruby/ext/alert/alert.i +5 -0
- data/platform/shared/ruby/ext/alert/alert_wrap.c +439 -108
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker.i +42 -0
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +521 -120
- data/platform/shared/ruby/ext/nativebar/nativebar.i +16 -0
- data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +623 -128
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager.i +18 -0
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager_wrap.c +2321 -0
- data/platform/shared/ruby/ext/rho/extensions.c +0 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +53 -0
- data/platform/shared/ruby/ext/rho/rhoruby.h +6 -0
- data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +6 -3
- data/platform/shared/ruby/ext/syncengine/syncengine.i +9 -1
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +61 -0
- data/platform/shared/ruby/ext/system/system.i +4 -0
- data/platform/shared/ruby/ext/system/system_wrap.c +33 -5
- data/platform/shared/rubyext/RhoAppAdapter.cpp +11 -1
- data/platform/shared/rubyext/System.cpp +9 -0
- data/platform/shared/rubyext/WebView.h +1 -0
- data/platform/shared/sqlite/crypto.c +907 -0
- data/platform/shared/sqlite/sqlite3.c +6 -0
- data/platform/shared/sync/SyncEngine.cpp +49 -19
- data/platform/shared/sync/SyncEngine.h +0 -1
- data/platform/shared/sync/SyncNotify.cpp +14 -5
- data/platform/shared/sync/SyncNotify.h +2 -2
- data/platform/shared/sync/SyncSource.cpp +79 -33
- data/platform/shared/sync/SyncSource.h +1 -0
- data/platform/shared/sync/SyncThread.cpp +26 -11
- data/platform/shared/xruby/src/com/xruby/compiler/codedom/StringExpression.java +4 -2
- data/platform/wm/RhoLib/RhoLib.vcproj +108 -72
- data/platform/wm/build/wm.rake +6 -0
- data/platform/wm/rhodes/Alert.cpp +4 -3
- data/platform/wm/rhodes/Alert.h +1 -1
- data/platform/wm/rhodes/DateTimePicker.cpp +30 -3
- data/platform/wm/rhodes/DateTimePicker.h +9 -1
- data/platform/wm/rhodes/MainWindow.cpp +121 -61
- data/platform/wm/rhodes/MainWindow.h +29 -4
- data/platform/wm/rhodes/MapView/Graphics.cpp +547 -0
- data/platform/wm/rhodes/MapView/Graphics.h +136 -0
- data/platform/wm/rhodes/MapView/MapViewManager.cpp +391 -0
- data/platform/wm/rhodes/MapView/MapViewManager.h +158 -0
- data/platform/wm/rhodes/RhoCryptImpl.cpp +248 -0
- data/platform/wm/rhodes/RhoCryptImpl.h +51 -0
- data/platform/wm/rhodes/RhoNativeViewManager.cpp +208 -0
- data/platform/wm/rhodes/Rhodes.cpp +94 -102
- data/platform/wm/rhodes/Rhodes.rc +27 -0
- data/platform/wm/rhodes/SyncStatusDlg.cpp +1 -0
- data/platform/wm/rhodes/SyncStatusDlg.h +2 -1
- data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +7 -4
- data/platform/wm/rhodes/camera/Camera.cpp +36 -15
- data/platform/wm/rhodes/camera/Camera.h +0 -4
- data/platform/wm/rhodes/resource.h +10 -2
- data/platform/wm/rhodes/rho/common/RhoClassFactory.cpp +7 -0
- data/platform/wm/rhodes/rho/common/RhoClassFactory.h +1 -0
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +10 -2
- data/platform/wm/rhodes/rho/net/NetRequestImpl.h +10 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +513 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.h +74 -0
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +22 -10
- data/platform/wm/rhodes/rho/rubyext/WebView.cpp +5 -0
- data/platform/wm/rhodes/rhodes.vcproj +38 -2
- data/platform/wm/rhodes/stdafx.h +2 -1
- data/platform/wm/rubylib/rubylib.vcproj +12 -0
- data/rakefile.rb +85 -80
- data/res/build-tools/iphonesim/Source/iPhoneSimulator.m +14 -3
- data/res/build-tools/iphonesim/build/Release/iphonesim +0 -0
- data/res/build-tools/iphonesim/iphonesim.xcodeproj/project.pbxproj +2 -0
- data/res/build-tools/xruby-0.3.3.jar +0 -0
- data/res/generators/templates/application/app/application.rb +2 -2
- data/res/generators/templates/application/app/helpers/application_helper.rb +1 -1
- data/res/generators/templates/application/public/css/android.css +1 -0
- data/res/generators/templates/application/public/jqtouch/jquery.1.3.2.min.js +1 -1
- data/res/generators/templates/application/rhoconfig.txt +66 -14
- data/rhodes.gemspec +3 -3
- data/spec/framework_spec/app/spec/core/file/expand_path_spec.rb +7 -3
- data/spec/framework_spec/build.yml +1 -1
- data/spec/phone_spec/Rakefile +1 -0
- data/spec/phone_spec/app/Account/account.rb +2 -0
- data/spec/phone_spec/app/Account_s/account_s.rb +7 -0
- data/spec/phone_spec/app/spec/{fixtures → array/fixtures}/classes.rb +0 -0
- data/spec/phone_spec/app/spec/{array_pack_spec.rb → array/pack_spec.rb} +2 -1
- data/spec/phone_spec/app/spec/bulksync_spec.rb +1 -0
- data/spec/phone_spec/app/spec/contacts_spec.rb +2 -0
- data/spec/phone_spec/app/spec/rho_spec.rb +34 -233
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +396 -87
- data/spec/phone_spec/app/spec/string/element_set_spec.rb +251 -0
- data/spec/phone_spec/app/spec/string/end_with_spec.rb +49 -0
- data/spec/phone_spec/app/spec/string/fixtures/classes.rb +27 -0
- data/spec/phone_spec/app/spec/{lstrip_spec.rb → string/lstrip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/string/replace_spec.rb +52 -0
- data/spec/phone_spec/app/spec/{rstrip_spec.rb → string/rstrip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/string/slice_spec.rb +473 -0
- data/spec/phone_spec/app/spec/string/split_spec.rb +302 -0
- data/spec/phone_spec/app/spec/string/start_with_spec.rb +48 -0
- data/spec/phone_spec/app/spec/{strip_spec.rb → string/strip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/syncengine_spec.rb +30 -1
- data/spec/phone_spec/app/spec_runner.rb +15 -7
- data/spec/phone_spec/build.yml +2 -2
- metadata +154 -25
- data/README.textile +0 -45
- data/platform/android/Rhodes/AndroidManifest.full.xml +0 -62
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/Manifest.java +0 -14
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoActivity.java +0 -20
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java +0 -193
- data/platform/bb/Hsqldb/src/com/rho/file/FileAccessBB.java +0 -25
- data/platform/bb/RubyVM/src/com/rho/AppBuildConfig.java +0 -22
- data/platform/bb/RubyVM/src/com/rho/Capabilities.java +0 -6
- data/platform/bb/RubyVM/src/com/rho/Extensions.java +0 -11
- data/platform/iphone/Classes/RhoNativeViewManager.mm +0 -226
@@ -14,6 +14,9 @@
|
|
14
14
|
#include "net/AsyncHttp.h"
|
15
15
|
#include "rubyext/WebView.h"
|
16
16
|
#include "rubyext/GeoLocation.h"
|
17
|
+
#include "common/app_build_configs.h"
|
18
|
+
|
19
|
+
#include <algorithm>
|
17
20
|
|
18
21
|
#ifdef OS_WINCE
|
19
22
|
#include <winsock.h>
|
@@ -34,6 +37,192 @@ namespace rho {
|
|
34
37
|
namespace common{
|
35
38
|
|
36
39
|
IMPLEMENT_LOGCLASS(CRhodesApp,"RhodesApp");
|
40
|
+
String CRhodesApp::m_strStartParameters;
|
41
|
+
|
42
|
+
class CAppCallbacksQueue : public CThreadQueue
|
43
|
+
{
|
44
|
+
DEFINE_LOGCLASS;
|
45
|
+
public:
|
46
|
+
enum callback_t
|
47
|
+
{
|
48
|
+
app_deactivated,
|
49
|
+
local_server_restart,
|
50
|
+
local_server_started,
|
51
|
+
ui_created,
|
52
|
+
app_activated
|
53
|
+
};
|
54
|
+
|
55
|
+
public:
|
56
|
+
CAppCallbacksQueue(IRhoClassFactory *factory);
|
57
|
+
~CAppCallbacksQueue();
|
58
|
+
|
59
|
+
//void call(callback_t type);
|
60
|
+
|
61
|
+
friend class Command;
|
62
|
+
struct Command : public IQueueCommand
|
63
|
+
{
|
64
|
+
callback_t type;
|
65
|
+
Command(callback_t t) :type(t) {}
|
66
|
+
|
67
|
+
boolean equals(IQueueCommand const &) {return false;}
|
68
|
+
String toString() {return CAppCallbacksQueue::toString(type);}
|
69
|
+
};
|
70
|
+
|
71
|
+
private:
|
72
|
+
|
73
|
+
void processCommand(IQueueCommand* pCmd);
|
74
|
+
|
75
|
+
static char const *toString(int type);
|
76
|
+
|
77
|
+
private:
|
78
|
+
callback_t m_expected;
|
79
|
+
Vector<int> m_commands;
|
80
|
+
};
|
81
|
+
IMPLEMENT_LOGCLASS(CAppCallbacksQueue,"AppCallbacks");
|
82
|
+
|
83
|
+
char const *CAppCallbacksQueue::toString(int type)
|
84
|
+
{
|
85
|
+
switch (type)
|
86
|
+
{
|
87
|
+
case local_server_started:
|
88
|
+
return "LOCAL-SERVER-STARTED";
|
89
|
+
case ui_created:
|
90
|
+
return "UI-CREATED";
|
91
|
+
case app_activated:
|
92
|
+
return "APP-ACTIVATED";
|
93
|
+
case app_deactivated:
|
94
|
+
return "APP-DEACTIVATED";
|
95
|
+
case local_server_restart:
|
96
|
+
return "LOCAL-SERVER-RESTART";
|
97
|
+
default:
|
98
|
+
return "UNKNOWN";
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
CAppCallbacksQueue::CAppCallbacksQueue(IRhoClassFactory *factory)
|
103
|
+
:CThreadQueue(factory), m_expected(local_server_started)
|
104
|
+
{
|
105
|
+
CThreadQueue::setLogCategory(getLogCategory());
|
106
|
+
//setPollInterval(1);
|
107
|
+
start(epNormal);
|
108
|
+
}
|
109
|
+
|
110
|
+
CAppCallbacksQueue::~CAppCallbacksQueue()
|
111
|
+
{
|
112
|
+
}
|
113
|
+
/*
|
114
|
+
void CAppCallbacksQueue::call(CAppCallbacksQueue::callback_t type)
|
115
|
+
{
|
116
|
+
addQueueCommand(new Command(type));
|
117
|
+
}*/
|
118
|
+
|
119
|
+
void CAppCallbacksQueue::processCommand(IQueueCommand* pCmd)
|
120
|
+
{
|
121
|
+
Command *cmd = (Command *)pCmd;
|
122
|
+
if (!cmd)
|
123
|
+
return;
|
124
|
+
/*
|
125
|
+
if (cmd->type < m_expected)
|
126
|
+
{
|
127
|
+
LOG(ERROR) + "received command " + toString(cmd->type) + " which is less than expected "+toString(m_expected)+" - ignore it";
|
128
|
+
return;
|
129
|
+
}
|
130
|
+
*/
|
131
|
+
if ( m_expected == app_deactivated && cmd->type == app_activated )
|
132
|
+
{
|
133
|
+
LOG(INFO) + "received duplicate activate skip it";
|
134
|
+
return;
|
135
|
+
}
|
136
|
+
|
137
|
+
if ( m_expected == local_server_restart )
|
138
|
+
{
|
139
|
+
RHODESAPP().restartLocalServer(*this);
|
140
|
+
m_expected = local_server_started;
|
141
|
+
}
|
142
|
+
|
143
|
+
if (cmd->type > m_expected)
|
144
|
+
{
|
145
|
+
boolean bDuplicate = false;
|
146
|
+
for( int i = 0; i < m_commands.size() ; i++)
|
147
|
+
{
|
148
|
+
if ( m_commands.elementAt(i) == cmd->type )
|
149
|
+
{
|
150
|
+
bDuplicate = true;
|
151
|
+
break;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
if ( bDuplicate )
|
156
|
+
{
|
157
|
+
LOG(INFO) + "Received duplicate command " + toString(cmd->type) + "skip it";
|
158
|
+
}else
|
159
|
+
{
|
160
|
+
// Don't do that now
|
161
|
+
LOG(INFO) + "Received command " + toString(cmd->type) + " which is greater than expected (" + toString(m_expected) + ") - postpone it";
|
162
|
+
m_commands.push_back(cmd->type);
|
163
|
+
std::sort(m_commands.begin(), m_commands.end());
|
164
|
+
}
|
165
|
+
return;
|
166
|
+
}
|
167
|
+
|
168
|
+
m_commands.insert(m_commands.begin(), cmd->type);
|
169
|
+
for (Vector<int>::const_iterator it = m_commands.begin(), lim = m_commands.end(); it != lim; ++it)
|
170
|
+
{
|
171
|
+
int type = *it;
|
172
|
+
LOG(INFO) + "process command: " + toString(type);
|
173
|
+
switch (type)
|
174
|
+
{
|
175
|
+
case app_deactivated:
|
176
|
+
#if !defined( OS_WINCE ) && !defined (OS_WINDOWS)
|
177
|
+
m_expected = local_server_restart;
|
178
|
+
#else
|
179
|
+
m_expected = app_activated;
|
180
|
+
#endif
|
181
|
+
break;
|
182
|
+
|
183
|
+
case local_server_started:
|
184
|
+
// Nothing
|
185
|
+
break;
|
186
|
+
case ui_created:
|
187
|
+
{
|
188
|
+
common::CAutoPtr<common::IRhoClassFactory> factory = rho_impl_createClassFactory();
|
189
|
+
common::CAutoPtr<net::INetRequest> pNetRequest = factory->createNetRequest();
|
190
|
+
String strUrl = RHODESAPP().getBaseUrl();
|
191
|
+
strUrl += "/system/uicreated";
|
192
|
+
NetResponse(resp, pNetRequest->pullData( strUrl, null ) );
|
193
|
+
if ( !resp.isOK() )
|
194
|
+
LOG(ERROR) + "activate app failed. Code: " + resp.getRespCode() + "; Error body: " + resp.getCharData();
|
195
|
+
|
196
|
+
m_expected = app_activated;
|
197
|
+
}
|
198
|
+
break;
|
199
|
+
case app_activated:
|
200
|
+
{
|
201
|
+
/* static bool navigatedToStartUrl = false;
|
202
|
+
if (!navigatedToStartUrl)
|
203
|
+
{
|
204
|
+
LOG(INFO) + "navigate to first start url";
|
205
|
+
RHODESAPP().navigateToUrl(RHODESAPP().getFirstStartUrl());
|
206
|
+
navigatedToStartUrl = true;
|
207
|
+
}*/
|
208
|
+
|
209
|
+
common::CAutoPtr<common::IRhoClassFactory> factory = rho_impl_createClassFactory();
|
210
|
+
common::CAutoPtr<net::INetRequest> pNetRequest = factory->createNetRequest();
|
211
|
+
String strUrl = RHODESAPP().getBaseUrl();
|
212
|
+
strUrl += "/system/activateapp";
|
213
|
+
NetResponse(resp, pNetRequest->pullData( strUrl, null ) );
|
214
|
+
if ( !resp.isOK() )
|
215
|
+
LOG(ERROR) + "activate app failed. Code: " + resp.getRespCode() + "; Error body: " + resp.getCharData();
|
216
|
+
|
217
|
+
m_expected = app_deactivated;
|
218
|
+
}
|
219
|
+
break;
|
220
|
+
}
|
221
|
+
//if (type < app_activated && type != app_deactivated)
|
222
|
+
// m_expected = (callback_t)(type + 1);
|
223
|
+
}
|
224
|
+
m_commands.clear();
|
225
|
+
}
|
37
226
|
|
38
227
|
/*static*/ CRhodesApp* CRhodesApp::Create(const String& strRootPath)
|
39
228
|
{
|
@@ -52,14 +241,17 @@ IMPLEMENT_LOGCLASS(CRhodesApp,"RhodesApp");
|
|
52
241
|
m_pInstance = 0;
|
53
242
|
}
|
54
243
|
|
55
|
-
CRhodesApp::CRhodesApp(const String& strRootPath)
|
244
|
+
CRhodesApp::CRhodesApp(const String& strRootPath)
|
245
|
+
:CRhodesAppBase(strRootPath)
|
56
246
|
{
|
57
247
|
m_bExit = false;
|
58
248
|
m_bDeactivationMode = false;
|
59
|
-
|
249
|
+
m_bRestartServer = false;
|
250
|
+
//m_activateCounter = 0;
|
60
251
|
|
61
252
|
m_ptrFactory = rho_impl_createClassFactory();
|
62
253
|
m_NetRequest = m_ptrFactory->createNetRequest();
|
254
|
+
m_appCallbacksQueue = new CAppCallbacksQueue(rho_impl_createClassFactory());
|
63
255
|
|
64
256
|
#if defined( OS_WINCE ) || defined (OS_WINDOWS)
|
65
257
|
//initializing winsock
|
@@ -92,19 +284,20 @@ void CRhodesApp::run()
|
|
92
284
|
|
93
285
|
LOG(INFO) + "RhoRubyInitApp...";
|
94
286
|
RhoRubyInitApp();
|
95
|
-
|
96
|
-
|
97
|
-
//rho_clientregister_create("iphone_client");
|
98
|
-
#if defined( OS_WINCE ) || defined( OS_WINDOWS )
|
99
|
-
LOG(INFO) + "navigate to first start url";
|
100
|
-
RHODESAPP().navigateToUrl(RHODESAPP().getFirstStartUrl());
|
101
|
-
#endif
|
287
|
+
rho_ruby_call_config_conflicts();
|
288
|
+
RHOCONF().conflictsResolved();
|
102
289
|
|
103
290
|
while (!m_bExit) {
|
104
291
|
m_httpServer->run();
|
105
292
|
if (m_bExit)
|
106
293
|
break;
|
107
|
-
|
294
|
+
|
295
|
+
if ( !m_bRestartServer )
|
296
|
+
{
|
297
|
+
LOG(INFO) + "RhodesApp thread wait.";
|
298
|
+
wait(-1);
|
299
|
+
}
|
300
|
+
m_bRestartServer = false;
|
108
301
|
}
|
109
302
|
|
110
303
|
LOG(INFO) + "RhodesApp thread shutdown";
|
@@ -124,8 +317,17 @@ CRhodesApp::~CRhodesApp(void)
|
|
124
317
|
|
125
318
|
}
|
126
319
|
|
320
|
+
void CRhodesApp::restartLocalServer(common::CThreadQueue& waitThread)
|
321
|
+
{
|
322
|
+
LOG(INFO) + "restart local server.";
|
323
|
+
m_bRestartServer = true;
|
324
|
+
m_httpServer->stop();
|
325
|
+
}
|
326
|
+
|
127
327
|
void CRhodesApp::stopApp()
|
128
328
|
{
|
329
|
+
m_appCallbacksQueue->stop(1000);
|
330
|
+
|
129
331
|
if (!m_bExit)
|
130
332
|
{
|
131
333
|
m_bExit = true;
|
@@ -199,6 +401,18 @@ static void callback_deactivateapp(void *arg, String const &strQuery)
|
|
199
401
|
rho_http_sendresponse(arg, strMsg.c_str());
|
200
402
|
}
|
201
403
|
|
404
|
+
static void callback_uicreated(void *arg, String const &strQuery)
|
405
|
+
{
|
406
|
+
rho_ruby_uiCreated();
|
407
|
+
rho_http_sendresponse(arg, "");
|
408
|
+
}
|
409
|
+
|
410
|
+
static void callback_uidestroyed(void *arg, String const &strQuery)
|
411
|
+
{
|
412
|
+
rho_ruby_uiDestroyed();
|
413
|
+
rho_http_sendresponse(arg, "");
|
414
|
+
}
|
415
|
+
|
202
416
|
static void callback_loadserversources(void *arg, String const &strQuery)
|
203
417
|
{
|
204
418
|
RhoAppAdapter.loadServerSources(strQuery);
|
@@ -206,32 +420,34 @@ static void callback_loadserversources(void *arg, String const &strQuery)
|
|
206
420
|
rho_http_sendresponse(arg, strMsg.c_str());
|
207
421
|
}
|
208
422
|
|
209
|
-
|
423
|
+
static void callback_loadallsyncsources(void *arg, String const &strQuery)
|
210
424
|
{
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
{
|
216
|
-
while (!rho_is_local_server_started())
|
217
|
-
thisThread.wait(1);
|
425
|
+
RhoAppAdapter.loadAllSyncSources();
|
426
|
+
String strMsg;
|
427
|
+
rho_http_sendresponse(arg, strMsg.c_str());
|
428
|
+
}
|
218
429
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
}
|
226
|
-
// RHODESAPP().getSplashScreen().hide();
|
430
|
+
static void callback_resetDBOnSyncUserChanged(void *arg, String const &strQuery)
|
431
|
+
{
|
432
|
+
RhoAppAdapter.resetDBOnSyncUserChanged();
|
433
|
+
String strMsg;
|
434
|
+
rho_http_sendresponse(arg, strMsg.c_str());
|
435
|
+
}
|
227
436
|
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
437
|
+
void CRhodesApp::callUiCreatedCallback()
|
438
|
+
{
|
439
|
+
m_appCallbacksQueue->addQueueCommand(new CAppCallbacksQueue::Command(CAppCallbacksQueue::ui_created));
|
440
|
+
}
|
441
|
+
|
442
|
+
void CRhodesApp::callUiDestroyedCallback()
|
443
|
+
{
|
444
|
+
String strUrl = m_strHomeUrl + "/system/uidestroyed";
|
445
|
+
NetResponse(resp,getNet().pullData( strUrl, null ));
|
446
|
+
if ( !resp.isOK() )
|
447
|
+
{
|
448
|
+
LOG(ERROR) + "UI destroy callback failed. Code: " + resp.getRespCode() + "; Error body: " + resp.getCharData();
|
233
449
|
}
|
234
|
-
}
|
450
|
+
}
|
235
451
|
|
236
452
|
void CRhodesApp::callAppActiveCallback(boolean bActive)
|
237
453
|
{
|
@@ -239,17 +455,16 @@ void CRhodesApp::callAppActiveCallback(boolean bActive)
|
|
239
455
|
if (bActive)
|
240
456
|
{
|
241
457
|
// Restart server each time when we go to foreground
|
242
|
-
if (m_activateCounter++ > 0)
|
458
|
+
/* if (m_activateCounter++ > 0)
|
243
459
|
{
|
460
|
+
#if !defined( OS_WINCE ) && !defined (OS_WINDOWS)
|
244
461
|
m_httpServer->stop();
|
462
|
+
#endif
|
245
463
|
this->stopWait();
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
// Otherwise UI thread will be blocked. This can cause deadlock if user defined
|
251
|
-
// activate callback contains code which need to hold UI thread for execute
|
252
|
-
rho_rhodesapp_call_in_thread( new CRhoActivateApp( strUrl ) );
|
464
|
+
|
465
|
+
} */
|
466
|
+
|
467
|
+
m_appCallbacksQueue->addQueueCommand(new CAppCallbacksQueue::Command(CAppCallbacksQueue::app_activated));
|
253
468
|
}
|
254
469
|
else
|
255
470
|
{
|
@@ -261,6 +476,8 @@ void CRhodesApp::callAppActiveCallback(boolean bActive)
|
|
261
476
|
// To fix this problem, new mode 'deactivation' introduced. When this mode active, no UI operations allowed.
|
262
477
|
// All such operation will throw exception in ruby code when calling in 'deactivate' mode.
|
263
478
|
m_bDeactivationMode = true;
|
479
|
+
m_appCallbacksQueue->addQueueCommand(new CAppCallbacksQueue::Command(CAppCallbacksQueue::app_deactivated));
|
480
|
+
|
264
481
|
String strUrl = m_strHomeUrl + "/system/deactivateapp";
|
265
482
|
NetResponse(resp,getNet().pullData( strUrl, null ));
|
266
483
|
if ( !resp.isOK() )
|
@@ -450,7 +667,11 @@ void CRhodesApp::initHttpServer()
|
|
450
667
|
m_httpServer->register_uri("/system/getrhomessage", callback_getrhomessage);
|
451
668
|
m_httpServer->register_uri("/system/activateapp", callback_activateapp);
|
452
669
|
m_httpServer->register_uri("/system/deactivateapp", callback_deactivateapp);
|
670
|
+
m_httpServer->register_uri("/system/uicreated", callback_uicreated);
|
671
|
+
m_httpServer->register_uri("/system/uidestroyed", callback_uidestroyed);
|
453
672
|
m_httpServer->register_uri("/system/loadserversources", callback_loadserversources);
|
673
|
+
m_httpServer->register_uri("/system/resetDBOnSyncUserChanged", callback_resetDBOnSyncUserChanged);
|
674
|
+
m_httpServer->register_uri("/system/loadallsyncsources", callback_loadallsyncsources);
|
454
675
|
}
|
455
676
|
|
456
677
|
const char* CRhodesApp::getFreeListeningPort()
|
@@ -595,8 +816,7 @@ void CRhodesApp::keepLastVisitedUrl(String strUrl)
|
|
595
816
|
if ( nFragment != String::npos )
|
596
817
|
strUrl = strUrl.substr(0, nFragment);
|
597
818
|
|
598
|
-
RHOCONF().setString("LastVisitedPage",strUrl);
|
599
|
-
RHOCONF().saveToFile();
|
819
|
+
RHOCONF().setString("LastVisitedPage",strUrl, true);
|
600
820
|
}
|
601
821
|
}
|
602
822
|
|
@@ -614,22 +834,33 @@ void CRhodesApp::setAppBackUrl(const String& url)
|
|
614
834
|
}
|
615
835
|
}
|
616
836
|
|
617
|
-
String CRhodesApp::
|
837
|
+
String CRhodesApp::getAppName()
|
618
838
|
{
|
619
|
-
String
|
620
|
-
if ( strTitle.length() == 0 )
|
621
|
-
{
|
839
|
+
String strAppName;
|
622
840
|
#ifdef OS_WINCE
|
623
|
-
|
624
|
-
|
841
|
+
String path = rho_native_rhopath();
|
842
|
+
int last, pre_last;
|
625
843
|
|
626
|
-
|
627
|
-
|
628
|
-
|
844
|
+
last = path.find_last_of('\\');
|
845
|
+
pre_last = path.substr(0, last).find_last_of('\\');
|
846
|
+
strAppName = path.substr(pre_last + 1, last - pre_last - 1);
|
629
847
|
#else
|
630
|
-
|
848
|
+
strAppName = "Rhodes";
|
631
849
|
#endif
|
632
|
-
|
850
|
+
|
851
|
+
return strAppName;
|
852
|
+
}
|
853
|
+
|
854
|
+
StringW CRhodesApp::getAppNameW()
|
855
|
+
{
|
856
|
+
return convertToStringW( RHODESAPP().getAppName() );
|
857
|
+
}
|
858
|
+
|
859
|
+
String CRhodesApp::getAppTitle()
|
860
|
+
{
|
861
|
+
String strTitle = RHOCONF().getString("title_text");
|
862
|
+
if ( strTitle.length() == 0 )
|
863
|
+
strTitle = getAppName();
|
633
864
|
|
634
865
|
return strTitle;
|
635
866
|
}
|
@@ -640,6 +871,36 @@ const String& CRhodesApp::getStartUrl()
|
|
640
871
|
return m_strStartUrl;
|
641
872
|
}
|
642
873
|
|
874
|
+
boolean CRhodesApp::isOnStartPage()
|
875
|
+
{
|
876
|
+
String strStart = getStartUrl();
|
877
|
+
String strCurUrl = getCurrentUrl(0);
|
878
|
+
|
879
|
+
if ( strStart.compare(strCurUrl) == 0 )
|
880
|
+
return true;
|
881
|
+
|
882
|
+
//check for index
|
883
|
+
int nIndexLen = CHttpServer::isIndex(strStart);
|
884
|
+
if ( nIndexLen > 0 && String_startsWith(strStart, strCurUrl) )
|
885
|
+
{
|
886
|
+
return strncmp(strStart.c_str(), strCurUrl.c_str(), strStart.length() - nIndexLen - 1) == 0;
|
887
|
+
}
|
888
|
+
|
889
|
+
nIndexLen = CHttpServer::isIndex(strCurUrl);
|
890
|
+
if ( nIndexLen > 0 && String_startsWith(strCurUrl, strStart) )
|
891
|
+
{
|
892
|
+
return strncmp(strCurUrl.c_str(), strStart.c_str(), strCurUrl.length() - nIndexLen - 1) == 0;
|
893
|
+
}
|
894
|
+
|
895
|
+
return false;
|
896
|
+
|
897
|
+
}
|
898
|
+
|
899
|
+
const String& CRhodesApp::getBaseUrl()
|
900
|
+
{
|
901
|
+
return m_strHomeUrl;
|
902
|
+
}
|
903
|
+
|
643
904
|
const String& CRhodesApp::getOptionsUrl()
|
644
905
|
{
|
645
906
|
m_strOptionsUrl = canonicalizeRhoUrl( RHOCONF().getString("options_path") );
|
@@ -650,7 +911,7 @@ const String& CRhodesApp::getCurrentUrl(int /*index*/)
|
|
650
911
|
{
|
651
912
|
return m_currentUrls[m_currentTabIndex];
|
652
913
|
}
|
653
|
-
|
914
|
+
/*
|
654
915
|
const String& CRhodesApp::getFirstStartUrl()
|
655
916
|
{
|
656
917
|
m_strFirstStartUrl = getStartUrl();
|
@@ -661,8 +922,9 @@ const String& CRhodesApp::getFirstStartUrl()
|
|
661
922
|
m_strFirstStartUrl = canonicalizeRhoUrl(strLastPage);
|
662
923
|
}
|
663
924
|
|
925
|
+
LOG(INFO) + "Start url: " + m_strFirstStartUrl;
|
664
926
|
return m_strFirstStartUrl;
|
665
|
-
}
|
927
|
+
}*/
|
666
928
|
|
667
929
|
const String& CRhodesApp::getRhobundleReloadUrl()
|
668
930
|
{
|
@@ -832,6 +1094,9 @@ void CRhodesApp::callScreenRotationCallback(int width, int height, int degrees)
|
|
832
1094
|
|
833
1095
|
void CRhodesApp::loadUrl(String url)
|
834
1096
|
{
|
1097
|
+
if ( url.length() == 0 )
|
1098
|
+
return;
|
1099
|
+
|
835
1100
|
boolean callback = false;
|
836
1101
|
if (String_startsWith(url, "callback:") )
|
837
1102
|
{
|
@@ -841,6 +1106,22 @@ void CRhodesApp::loadUrl(String url)
|
|
841
1106
|
{
|
842
1107
|
rho_sys_app_exit();
|
843
1108
|
return;
|
1109
|
+
}else if ( strcasecmp(url.c_str(), "options")==0 )
|
1110
|
+
{
|
1111
|
+
rho_webview_navigate(getOptionsUrl().c_str(), 0);
|
1112
|
+
return;
|
1113
|
+
}else if ( strcasecmp(url.c_str(), "home")==0 )
|
1114
|
+
{
|
1115
|
+
rho_webview_navigate(getStartUrl().c_str(), 0);
|
1116
|
+
return;
|
1117
|
+
}else if ( strcasecmp(url.c_str(), "refresh")==0 )
|
1118
|
+
{
|
1119
|
+
rho_webview_refresh(0);
|
1120
|
+
return;
|
1121
|
+
}else if ( strcasecmp(url.c_str(), "back")==0 )
|
1122
|
+
{
|
1123
|
+
navigateBack();
|
1124
|
+
return;
|
844
1125
|
}
|
845
1126
|
|
846
1127
|
url = canonicalizeRhoUrl(url);
|
@@ -854,11 +1135,9 @@ void CRhodesApp::loadUrl(String url)
|
|
854
1135
|
navigateToUrl(url);
|
855
1136
|
}
|
856
1137
|
|
857
|
-
|
1138
|
+
void CRhodesApp::notifyLocalServerStarted()
|
858
1139
|
{
|
859
|
-
|
860
|
-
return false;
|
861
|
-
return m_httpServer->started();
|
1140
|
+
m_appCallbacksQueue->addQueueCommand(new CAppCallbacksQueue::Command(CAppCallbacksQueue::local_server_started));
|
862
1141
|
}
|
863
1142
|
|
864
1143
|
} //namespace common
|
@@ -866,6 +1145,7 @@ boolean CRhodesApp::isLocalServerStarted()
|
|
866
1145
|
|
867
1146
|
extern "C" {
|
868
1147
|
|
1148
|
+
using namespace rho;
|
869
1149
|
using namespace rho::common;
|
870
1150
|
unsigned long rho_rhodesapp_GetCallbackObject(int nIndex)
|
871
1151
|
{
|
@@ -970,11 +1250,11 @@ void rho_rhodesapp_destroy()
|
|
970
1250
|
{
|
971
1251
|
rho::common::CRhodesApp::Destroy();
|
972
1252
|
}
|
973
|
-
|
1253
|
+
/*
|
974
1254
|
const char* rho_rhodesapp_getfirststarturl()
|
975
1255
|
{
|
976
1256
|
return RHODESAPP().getFirstStartUrl().c_str();
|
977
|
-
}
|
1257
|
+
}*/
|
978
1258
|
|
979
1259
|
const char* rho_rhodesapp_getstarturl()
|
980
1260
|
{
|
@@ -1048,6 +1328,18 @@ void rho_rhodesapp_callAppActiveCallback(int nActive)
|
|
1048
1328
|
RHODESAPP().callAppActiveCallback(nActive!=0);
|
1049
1329
|
}
|
1050
1330
|
|
1331
|
+
void rho_rhodesapp_callUiCreatedCallback()
|
1332
|
+
{
|
1333
|
+
if ( rho::common::CRhodesApp::getInstance() )
|
1334
|
+
RHODESAPP().callUiCreatedCallback();
|
1335
|
+
}
|
1336
|
+
|
1337
|
+
void rho_rhodesapp_callUiDestroyedCallback()
|
1338
|
+
{
|
1339
|
+
if ( rho::common::CRhodesApp::getInstance() )
|
1340
|
+
RHODESAPP().callUiDestroyedCallback();
|
1341
|
+
}
|
1342
|
+
|
1051
1343
|
void rho_rhodesapp_setViewMenu(unsigned long valMenu)
|
1052
1344
|
{
|
1053
1345
|
RHODESAPP().getAppMenu().setAppMenu(valMenu);
|
@@ -1093,77 +1385,6 @@ int rho_conf_send_log()
|
|
1093
1385
|
return RHODESAPP().sendLog();
|
1094
1386
|
}
|
1095
1387
|
|
1096
|
-
static const char table64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
1097
|
-
|
1098
|
-
int rho_base64_encode(const char *src, int srclen, char *dst)
|
1099
|
-
{
|
1100
|
-
if (srclen < 0)
|
1101
|
-
srclen = strlen(src);
|
1102
|
-
if (!dst)
|
1103
|
-
return (srclen/3)*4 + (srclen%3 ? 4 : 0) + 1;
|
1104
|
-
|
1105
|
-
int out = 0;
|
1106
|
-
for(int in = 0; in < srclen; in += 3, out += 4) {
|
1107
|
-
|
1108
|
-
unsigned x = 0;
|
1109
|
-
int actual = 0;
|
1110
|
-
for (int i = 0; i < 3; ++i) {
|
1111
|
-
char c;
|
1112
|
-
if (in + i >= srclen)
|
1113
|
-
c = 0;
|
1114
|
-
else {
|
1115
|
-
c = src[in + i];
|
1116
|
-
actual += 8;
|
1117
|
-
}
|
1118
|
-
x = (x << 8) + (unsigned char)c;
|
1119
|
-
}
|
1120
|
-
|
1121
|
-
for (int i = 0; i < 4; ++i) {
|
1122
|
-
if (actual <= 0) {
|
1123
|
-
dst[out + i] = '=';
|
1124
|
-
}
|
1125
|
-
else {
|
1126
|
-
dst[out + i] = table64[(x >> 18) & 0x3F];
|
1127
|
-
x <<= 6;
|
1128
|
-
actual -= 6;
|
1129
|
-
}
|
1130
|
-
}
|
1131
|
-
}
|
1132
|
-
|
1133
|
-
dst[out++] = '\0';
|
1134
|
-
return out;
|
1135
|
-
}
|
1136
|
-
|
1137
|
-
int rho_base64_decode(const char *src, int srclen, char *dst)
|
1138
|
-
{
|
1139
|
-
if (srclen < 0)
|
1140
|
-
srclen = strlen(src);
|
1141
|
-
// Do not decode in case if srclen can not be divided by 4
|
1142
|
-
if (srclen%4)
|
1143
|
-
return 0;
|
1144
|
-
if (!dst)
|
1145
|
-
return srclen*3/4 + 1;
|
1146
|
-
|
1147
|
-
char *found;
|
1148
|
-
int out = 0;
|
1149
|
-
for (int in = 0; in < srclen; in += 4, out += 3) {
|
1150
|
-
unsigned x = 0;
|
1151
|
-
for (int i = 0; i < 4; ++i) {
|
1152
|
-
if ((found = strchr(const_cast<char*>(table64), src[in + i])) != NULL)
|
1153
|
-
x = (x << 6) + (unsigned int)(found - table64);
|
1154
|
-
else if (src[in + i] == '=')
|
1155
|
-
x <<= 6;
|
1156
|
-
}
|
1157
|
-
|
1158
|
-
for (int i = 0; i < 3; ++i) {
|
1159
|
-
dst[out + i] = (unsigned char)((x >> 16) & 0xFF);
|
1160
|
-
x <<= 8;
|
1161
|
-
}
|
1162
|
-
}
|
1163
|
-
dst[out++] = '\0';
|
1164
|
-
return out;
|
1165
|
-
}
|
1166
|
-
|
1167
1388
|
void rho_net_request(const char *url)
|
1168
1389
|
{
|
1169
1390
|
rho::common::CAutoPtr<rho::common::IRhoClassFactory> factory = rho_impl_createClassFactory();
|
@@ -1177,7 +1398,6 @@ void rho_net_request_with_data(const char *url, const char *str_body) {
|
|
1177
1398
|
request->pushData(url, str_body, null);
|
1178
1399
|
}
|
1179
1400
|
|
1180
|
-
|
1181
1401
|
void rho_rhodesapp_load_url(const char *url)
|
1182
1402
|
{
|
1183
1403
|
RHODESAPP().loadUrl(url);
|
@@ -1193,11 +1413,6 @@ int rho_rhodesapp_check_mode()
|
|
1193
1413
|
return 1;
|
1194
1414
|
}
|
1195
1415
|
|
1196
|
-
int rho_is_local_server_started()
|
1197
|
-
{
|
1198
|
-
return RHODESAPP().isLocalServerStarted();
|
1199
|
-
}
|
1200
|
-
|
1201
1416
|
#if defined(OS_ANDROID) && defined(RHO_LOG_ENABLED)
|
1202
1417
|
int rho_log(const char *fmt, ...)
|
1203
1418
|
{
|
@@ -1220,5 +1435,32 @@ void rho_free_callbackdata(void* pData)
|
|
1220
1435
|
{
|
1221
1436
|
//It is used in SyncClient.
|
1222
1437
|
}
|
1223
|
-
|
1438
|
+
|
1439
|
+
int rho_rhodesapp_canstartapp(const char* szCmdLine, const char* szSeparators)
|
1440
|
+
{
|
1441
|
+
CRhodesApp::setStartParameters(szCmdLine);
|
1442
|
+
|
1443
|
+
const char* szAppSecToken = get_app_build_config_item("security_token");
|
1444
|
+
if ( !szAppSecToken || !*szAppSecToken)
|
1445
|
+
return 1;
|
1446
|
+
|
1447
|
+
String strCmdLineSecToken;
|
1448
|
+
String security_key = "security_token=";
|
1449
|
+
String strCmdLine = szCmdLine ? szCmdLine : "";
|
1450
|
+
|
1451
|
+
int skpos = strCmdLine.find(security_key);
|
1452
|
+
if ((String::size_type)skpos != String::npos)
|
1453
|
+
{
|
1454
|
+
String tmp = strCmdLine.substr(skpos+security_key.length(), strCmdLine.length() - security_key.length() - skpos);
|
1455
|
+
|
1456
|
+
int divider = tmp.find_first_of(szSeparators);
|
1457
|
+
if ((String::size_type)divider != String::npos)
|
1458
|
+
strCmdLineSecToken = tmp.substr(0, divider);
|
1459
|
+
else
|
1460
|
+
strCmdLineSecToken = tmp;
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
return strCmdLineSecToken.compare(szAppSecToken) != 0 ? 0 : 1;
|
1464
|
+
}
|
1465
|
+
|
1224
1466
|
} //extern "C"
|