rhodes 3.3.3.beta.4 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -5
- data/CREDITS +2215 -0
- data/Rakefile +225 -59
- data/bin/c2dm.rb +0 -0
- data/bin/get-rhodes-info.bat +0 -0
- data/bin/migrate-rhodes-app +0 -0
- data/bin/migrate-rhodes-app.bat +0 -0
- data/bin/rhodes +0 -0
- data/bin/rhodes-setup +0 -0
- data/bin/rhodes-setup.bat +0 -0
- data/bin/rhogen +0 -0
- data/bin/rhogen.bat +0 -0
- data/bin/set-rhodes-sdk +0 -0
- data/bin/set-rhodes-sdk.bat +0 -0
- data/bin/upgrade-rhodes-app +0 -0
- data/bin/upgrade-rhodes-app.bat +0 -0
- data/doc/build.txt +20 -9
- data/doc/configuration.txt +8 -8
- data/doc/connect-to-web-services.txt +1 -1
- data/doc/device-caps.txt +63 -26
- data/doc/extensions.txt +14 -2
- data/doc/install.txt +28 -19
- data/doc/introduction.txt +6 -3
- data/doc/jqt-jqm-transition.txt +10 -9
- data/doc/release.txt +5 -1
- data/doc/rhodes-command-line.txt +130 -0
- data/doc/rhom.txt +16 -11
- data/doc/rhostudio-eclipse.txt +3 -3
- data/doc/simulator.txt +28 -31
- data/doc/syncengine-ajax-api.txt +246 -0
- data/doc/synchronization.txt +21 -3
- data/doc/test-log-debug.txt +3 -1
- data/doc/ui.txt +16 -16
- data/ext/extconf.rb +8 -0
- data/lib/build/jake.rb +5 -5
- data/lib/extensions/barcode/ext/barcode/platform/android/Rakefile +9 -9
- data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/barcode.cpp +81 -1
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/CaptureActivityHandler.java +6 -13
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/DecodeHandler.java +2 -6
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/Barcode.java +12 -1
- data/lib/extensions/barcode/ext/barcode/platform/bb/run.bat +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeCallbackHelper.h +2 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeCallbackHelper.mm +36 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.h +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.m +15 -5
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +64 -1
- data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode.i +35 -1
- data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode_wrap.c +126 -2
- data/lib/extensions/barcode/ext/barcode/shared/src/zbar.c +18 -1
- data/lib/extensions/barcode/ext/build +0 -0
- data/lib/extensions/barcode/ext/build.bat +0 -0
- data/lib/extensions/digest-md5/ext/Rakefile +12 -10
- data/lib/extensions/digest-md5/ext/build +0 -0
- data/lib/extensions/digest-md5/ext/build.bat +0 -0
- data/lib/extensions/digest-md5/ext/digest-md5.sln +2 -2
- data/lib/extensions/digest-md5/ext/digest-md5.vcproj +41 -28
- data/lib/extensions/digest-sha1/ext/Rakefile +11 -10
- data/lib/extensions/digest-sha1/ext/build +0 -0
- data/lib/extensions/digest-sha1/ext/build.bat +0 -0
- data/lib/extensions/digest-sha1/ext/digest-sha1.sln +2 -2
- data/lib/extensions/digest-sha1/ext/digest-sha1.vcproj +41 -28
- data/lib/extensions/digest/ext/Rakefile +12 -11
- data/lib/extensions/digest/ext/build +0 -0
- data/lib/extensions/digest/ext/build.bat +0 -0
- data/lib/extensions/digest/ext/digest.sln +44 -0
- data/lib/extensions/digest/ext/digest.vcproj +40 -27
- data/lib/extensions/esri/ext/build +0 -0
- data/lib/extensions/esri/ext/build.bat +0 -0
- data/lib/extensions/fcntl/ext/Rakefile +10 -9
- data/lib/extensions/fcntl/ext/build +0 -0
- data/lib/extensions/fcntl/ext/build.bat +0 -0
- data/lib/extensions/fcntl/ext/fcntl.vcproj +1 -1
- data/lib/extensions/nfc/ext/build +0 -0
- data/lib/extensions/nfc/ext/build.bat +0 -0
- data/lib/extensions/nfc/ext/nfc/platform/android/Rakefile +11 -11
- data/lib/extensions/nfc/ext/nfc/platform/android/jni/src/nfc.cpp +0 -0
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/Nfc.java +12 -10
- data/lib/extensions/nfc/ext/nfc/shared/ruby/nfc_wrap.c +16 -9
- data/lib/extensions/pdf-writer/color.rb +145 -0
- data/lib/extensions/pdf-writer/color/cmyk.rb +279 -0
- data/lib/extensions/pdf-writer/color/css.rb +28 -0
- data/lib/extensions/pdf-writer/color/grayscale.rb +212 -0
- data/lib/extensions/pdf-writer/color/hsl.rb +221 -0
- data/lib/extensions/pdf-writer/color/palette.rb +16 -0
- data/lib/extensions/pdf-writer/color/palette/adobecolor.rb +272 -0
- data/lib/extensions/pdf-writer/color/palette/gimp.rb +116 -0
- data/lib/extensions/pdf-writer/color/palette/monocontrast.rb +180 -0
- data/lib/extensions/pdf-writer/color/rgb-colors.rb +355 -0
- data/lib/extensions/pdf-writer/color/rgb.rb +453 -0
- data/lib/extensions/pdf-writer/color/rgb/metallic.rb +43 -0
- data/lib/extensions/pdf-writer/color/yiq.rb +84 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/color/Licence.txt +27 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/color/README.txt +32 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/pdf-writer/LICENCE +131 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/pdf-writer/README +33 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/transaction-simple/Licence.txt +25 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/transaction-simple/Readme.txt +204 -0
- data/lib/extensions/pdf-writer/pdf/charts.rb +13 -0
- data/lib/extensions/pdf-writer/pdf/charts/stddev.rb +430 -0
- data/lib/extensions/pdf-writer/pdf/math.rb +108 -0
- data/lib/extensions/pdf-writer/pdf/quickref.rb +332 -0
- data/lib/extensions/pdf-writer/pdf/simpletable.rb +947 -0
- data/lib/extensions/pdf-writer/pdf/techbook.rb +901 -0
- data/lib/extensions/pdf-writer/pdf/writer.rb +2729 -0
- data/lib/extensions/pdf-writer/pdf/writer/arc4.rb +63 -0
- data/lib/extensions/pdf-writer/pdf/writer/fontmetrics.rb +203 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Courier-Bold.afm +342 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Courier-BoldOblique.afm +342 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Courier-Oblique.afm +342 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Courier.afm +342 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Helvetica-Bold.afm +2827 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Helvetica-BoldOblique.afm +2827 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Helvetica-Oblique.afm +3051 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Helvetica.afm +3051 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/MustRead.html +19 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Symbol.afm +213 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Times-Bold.afm +2588 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Times-BoldItalic.afm +2384 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Times-Italic.afm +2667 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Times-Roman.afm +2419 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/ZapfDingbats.afm +225 -0
- data/lib/extensions/pdf-writer/pdf/writer/graphics.rb +813 -0
- data/lib/extensions/pdf-writer/pdf/writer/graphics/imageinfo.rb +365 -0
- data/lib/extensions/pdf-writer/pdf/writer/lang.rb +43 -0
- data/lib/extensions/pdf-writer/pdf/writer/lang/en.rb +99 -0
- data/lib/extensions/pdf-writer/pdf/writer/object.rb +23 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/action.rb +35 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/annotation.rb +42 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/catalog.rb +39 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/contents.rb +65 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/destination.rb +40 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/encryption.rb +53 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/font.rb +72 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/fontdescriptor.rb +34 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/fontencoding.rb +40 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/image.rb +304 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/info.rb +51 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/outline.rb +30 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/outlines.rb +30 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/page.rb +195 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/pages.rb +115 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/procset.rb +46 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/viewerpreferences.rb +74 -0
- data/lib/extensions/pdf-writer/pdf/writer/ohash.rb +58 -0
- data/lib/extensions/pdf-writer/pdf/writer/oreader.rb +25 -0
- data/lib/extensions/pdf-writer/pdf/writer/state.rb +48 -0
- data/lib/extensions/pdf-writer/pdf/writer/strokestyle.rb +138 -0
- data/lib/extensions/pdf-writer/transaction/simple.rb +486 -0
- data/lib/extensions/pdf-writer/transaction/simple/group.rb +146 -0
- data/lib/extensions/pdf-writer/transaction/simple/threadsafe.rb +68 -0
- data/lib/extensions/pdf-writer/transaction/simple/threadsafe/group.rb +36 -0
- data/lib/framework/builtinME.rb +0 -0
- data/lib/framework/dateOrig.rb +8 -2
- data/lib/framework/rational.rb +0 -0
- data/lib/framework/res/esri.wm.png +0 -0
- data/lib/framework/rho/rho.rb +6 -0
- data/lib/framework/rho/rhobluetooth.rb +0 -0
- data/lib/framework/rho/rhofsconnector.rb +0 -0
- data/lib/framework/rho/rhonativeviewmanager.rb +0 -0
- data/lib/framework/rhofsconnector.rb +0 -0
- data/lib/framework/rhom/rhom_object_factory.rb +8 -0
- data/lib/framework/rhomotoapi.rb +3 -2
- data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +9 -1
- data/platform/android/Rhodes/jni/include/rhodes/details/rhojava.inc +1 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_file_RhoFileApi.h +26 -2
- data/platform/android/Rhodes/jni/src/callbacks.cpp +0 -5
- data/platform/android/Rhodes/jni/src/camera.cpp +1 -1
- data/platform/android/Rhodes/jni/src/fileapi.cpp +39 -19
- data/platform/android/Rhodes/jni/src/geolocation.cpp +3 -3
- data/platform/android/Rhodes/jni/src/mapview.cpp +206 -64
- data/platform/android/Rhodes/jni/src/nativeview.cpp +1 -1
- data/platform/android/Rhodes/jni/src/rhodes.cpp +13 -0
- data/platform/android/Rhodes/jni/src/rhodesapp.cpp +20 -0
- data/platform/android/Rhodes/jni/src/rhodessystem.cpp +36 -3
- data/platform/android/Rhodes/jni/src/signature.cpp +22 -2
- data/platform/android/Rhodes/res/drawable/alert_info.png +0 -0
- data/platform/android/Rhodes/res/drawable/esri.png +0 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +17 -16
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Logger.java +4 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/MemoryInfoCollector.java +67 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +139 -114
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +106 -13
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +11 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +71 -16
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraNewService.java +4 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraSemiService.java +4 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoExtension.java +22 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/Config.java +243 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +19 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +9 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/{RhodesActivityListener.java → extmanager/IRhoListener.java} +16 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManager.java +63 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +239 -14
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhodesStartupListeners.java +9 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/WebkitExtension.java +53 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +27 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +124 -62
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +49 -137
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +84 -114
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +75 -82
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +3 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Callout.java +4 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapBitmapManager.java +124 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +232 -43
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Request.java +193 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/IRhoCustomView.java +13 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +32 -23
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoVideoView.java +74 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality.java +6 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality01.java +37 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality03.java +14 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality05.java +51 -38
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality07.java +9 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality08.java +48 -31
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionalityManager.java +15 -16
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +52 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/LocalFileHandler.java +20 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +77 -34
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/IRhoWebView.java +9 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebChromeClient.java +105 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +1 -1
- data/platform/android/build/RhodesSRC_build.files +8 -7
- data/platform/android/build/android.rake +326 -216
- data/platform/android/build/androidcommon.rb +27 -13
- data/platform/bb/RubyVM/src/com/rho/file/SimpleFile.java +27 -1
- data/platform/bb/RubyVM/src/j2me/io/File.java +104 -38
- data/platform/bb/build/bb.rake +1 -0
- data/platform/bb/build/runRAPC.bat +0 -0
- data/platform/bb/rhodes/resources/background.png +0 -0
- data/platform/bb/rhodes/resources/esri.png +0 -0
- data/platform/bb/rhodes/resources/mappin.png +0 -0
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +5 -1
- data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +2 -2
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapField.java +0 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapProvider.java +0 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GeoCoding.java +0 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleGeoCoding.java +0 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/MapTools.java +0 -0
- data/platform/iphone/Classes/AppManager/AppManager.m +7 -1
- data/platform/iphone/Classes/Camera/PickImageDelegate.h +9 -0
- data/platform/iphone/Classes/Camera/PickImageDelegate.m +75 -4
- data/platform/iphone/Classes/GeoLocation/LocationController.h +8 -2
- data/platform/iphone/Classes/GeoLocation/LocationController.m +74 -76
- data/platform/iphone/Classes/InitMemoryInfoCollector.h +33 -0
- data/platform/iphone/Classes/InitMemoryInfoCollector.mm +52 -0
- data/platform/iphone/Classes/NativeView/NVViewController.h +0 -0
- data/platform/iphone/Classes/NativeView/NVViewController.m +34 -2
- data/platform/iphone/Classes/Rhodes.m +22 -2
- data/platform/iphone/Classes/Signature/SignatureDelegate.m +19 -0
- data/platform/iphone/Classes/Signature/SignatureViewController.h +0 -0
- data/platform/iphone/Classes/Signature/SignatureViewController.m +0 -0
- data/platform/iphone/Classes/SimpleMainView.h +0 -0
- data/platform/iphone/Classes/SimpleMainView.m +3 -3
- 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/rbuild/iphone.rake +75 -7
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +13 -4
- data/platform/linux/target/compiler/rubylinux +0 -0
- data/platform/mac/target/compiler/RubyMac +0 -0
- data/platform/osx/Rhodes Launcher/rhorunner.app/rhorunner b/data/platform/osx/Rhodes → Launcher/rhorunner.app/rhorunner +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib/keyedobjects.nib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -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/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtga.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_inspector.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib +0 -0
- data/platform/osx/build/osx.rake +6 -8
- data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +165 -33
- data/platform/shared/RhoConnectClient/RhoConnectClient.h +10 -1
- data/platform/shared/common/BundleManager.cpp +27 -16
- data/platform/shared/common/ExtManager.h +15 -2
- data/platform/shared/common/RhoConf.cpp +17 -2
- data/platform/shared/common/RhoConf.h +3 -1
- data/platform/shared/common/RhoDefs.h +6 -6
- data/platform/shared/common/RhoFatalError.h +1 -1
- data/platform/shared/common/RhoFile.cpp +9 -9
- data/platform/shared/common/RhoFilePath.h +7 -3
- data/platform/shared/common/RhoPort.h +3 -3
- data/platform/shared/common/RhoSystem.h +1 -1
- data/platform/shared/common/RhodesApp.cpp +426 -26
- data/platform/shared/common/RhodesApp.h +11 -3
- data/platform/shared/common/RhodesAppBase.cpp +4 -1
- data/platform/shared/common/StringConverter.h +3 -3
- data/platform/shared/common/app_build_capabilities.h +8 -0
- data/platform/shared/common/map/BaseMapEngine.cpp +302 -21
- data/platform/shared/common/map/BaseMapEngine.h +132 -6
- data/platform/shared/common/map/ESRIMapEngine.cpp +2 -1
- data/platform/shared/common/map/GeocodingMapEngine.cpp +22 -4
- data/platform/shared/common/map/GeocodingMapEngine.h +40 -0
- data/platform/shared/common/map/GoogleMapEngine.cpp +13 -1
- data/platform/shared/common/map/MapEngine.h +7 -0
- data/platform/shared/common/map/OSMMapEngine.cpp +12 -1
- data/platform/shared/json/JSONIterator.cpp +1 -1
- data/platform/shared/json/RJSONTokener.c +2 -0
- data/platform/shared/json/config.h +3 -3
- data/platform/shared/logging/RhoLog.cpp +12 -3
- data/platform/shared/logging/RhoLog.h +2 -1
- data/platform/shared/logging/RhoLogConf.cpp +147 -11
- data/platform/shared/logging/RhoLogConf.h +39 -1
- data/platform/shared/logging/RhoLogSink.cpp +1 -1
- data/platform/shared/net/HttpServer.cpp +8 -4
- data/platform/shared/net/INetRequest.cpp +7 -0
- data/platform/shared/net/INetRequest.h +2 -0
- data/platform/shared/net/RawSocket.cpp +1 -1
- data/platform/shared/qt/pbxproj2pro.pl +0 -0
- data/platform/shared/qt/pro_vcproj_diff.pl +0 -0
- data/platform/shared/qt/rhodes/QtMainWindow.cpp +1 -1
- data/platform/shared/qt/rhodes/impl/RhoClassFactoryImpl.h +2 -2
- data/platform/shared/qt/rhodes/impl/RhoThreadImpl.cpp +2 -2
- data/platform/shared/qt/rhodes/impl/SystemImpl.cpp +11 -1
- data/platform/shared/qt/rhodes/main.cpp +5 -5
- data/platform/shared/ruby/ext/alert/alert_wrap.c +8 -8
- data/platform/shared/ruby/ext/bluetooth/bluetooth.i +0 -0
- data/platform/shared/ruby/ext/bluetooth/bluetooth_wrap.c +16 -9
- data/platform/shared/ruby/ext/camera/camera.i +2 -2
- data/platform/shared/ruby/ext/camera/camera_wrap.c +18 -3
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +37 -8
- data/platform/shared/ruby/ext/geolocation/geolocation_wrap.c +8 -8
- data/platform/shared/ruby/ext/mapview/mapview_wrap.c +16 -9
- data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +16 -9
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager.i +0 -0
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager_wrap.c +16 -9
- data/platform/shared/ruby/ext/phonebook/phonebook_wrap.c +8 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +7 -1
- data/platform/shared/ruby/ext/rho/rhoruby.h +1 -0
- data/platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c +16 -9
- data/platform/shared/ruby/ext/signature/signature.i +0 -0
- data/platform/shared/ruby/ext/signature/signature_wrap.c +9 -9
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +16 -9
- data/platform/shared/ruby/ext/system/system_wrap.c +16 -9
- data/platform/shared/ruby/ext/webview/webview_wrap.c +16 -9
- data/platform/shared/ruby/gc.c +1 -0
- data/platform/shared/ruby/regint.h +6 -4
- data/platform/shared/ruby/vm.c +1 -0
- data/platform/shared/ruby/wince/wince.h +1 -1
- data/platform/shared/rubyext/System.cpp +1 -1
- data/platform/shared/shttpd/src/rdispatcher.c +3 -3
- data/platform/shared/shttpd/src/std_includes.h +1 -1
- data/platform/shared/sqlite/sqlite3.c +1 -0
- data/platform/shared/statistic/test/TestProfiling.cpp +1 -1
- data/platform/shared/stlport/build/lib/configure +0 -0
- data/platform/shared/stlport/build/lib/configure.bat +0 -0
- data/platform/shared/sync/SyncEngine.cpp +9 -12
- data/platform/shared/sync/SyncNotify.cpp +36 -3
- data/platform/shared/sync/SyncNotify.h +11 -4
- data/platform/shared/sync/SyncSource.cpp +32 -16
- data/platform/shared/sync/SyncSource.h +2 -3
- data/platform/shared/sync/SyncThread.cpp +13 -4
- data/platform/shared/sync/SyncThread.h +4 -0
- data/platform/shared/tcmalloc/page_heap.h +1 -1
- data/platform/shared/tcmalloc/rhomem.h +1 -1
- data/platform/shared/tcmalloc/windows/port.cpp +12 -3
- data/platform/shared/test/Tests.cpp +4 -4
- data/platform/shared/test/test_helper.cpp +4 -4
- data/platform/symbian/sqlite3/src/sqlite3.h +1 -1
- data/platform/win32/RhoSimulator/Microsoft.VC90.CRT.manifest +6 -0
- data/platform/win32/RhoSimulator/Microsoft.VC90.OpenMP.manifest +6 -0
- data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
- data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
- data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
- data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qico4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qmng4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qsvg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qtiff4.dll +0 -0
- data/platform/win32/RhoSimulator/libeay32.dll +0 -0
- data/platform/win32/RhoSimulator/msvcm90.dll +0 -0
- data/platform/win32/RhoSimulator/msvcp90.dll +0 -0
- data/platform/win32/RhoSimulator/msvcr90.dll +0 -0
- data/platform/win32/RhoSimulator/phonon4.dll +0 -0
- data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
- data/platform/win32/RhoSimulator/vcomp90.dll +0 -0
- data/platform/win32/target/replaceicon/replaceicon.exe +0 -0
- data/platform/win32/target/updateresstring/updateresstring.exe +0 -0
- data/platform/wm/RhoLib/RhoLib.vcproj +394 -69
- data/platform/wm/build/build_inf.js +83 -23
- data/platform/wm/build/wm.rake +127 -81
- data/platform/wm/rhodes.sln +6 -6
- data/platform/wm/rhodes/DateTimePicker.h +2 -2
- data/platform/wm/rhodes/IBrowserEngine.h +3 -0
- data/platform/wm/rhodes/IEBrowserEngine.cpp +34 -2
- data/platform/wm/rhodes/IEBrowserEngine.h +4 -1
- data/platform/wm/rhodes/LicenseStub.cpp +73 -0
- data/platform/{android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientNew.java → wm/rhodes/LogMemory.cpp} +32 -20
- data/platform/{android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettings.java → wm/rhodes/LogMemory.h} +11 -8
- data/platform/wm/rhodes/LogOptionsDlg.h +1 -1
- data/platform/wm/rhodes/LogView.cpp +10 -10
- data/platform/wm/rhodes/LogView.h +10 -10
- data/platform/wm/rhodes/MainWindow.cpp +431 -173
- data/platform/wm/rhodes/MainWindow.h +37 -19
- data/platform/wm/rhodes/MapView/MapViewManager.h +1 -1
- data/platform/wm/rhodes/OkCancelModalDialog.h +1 -1
- data/platform/wm/rhodes/Rhodes.cpp +210 -47
- data/platform/wm/rhodes/Rhodes.rc +38 -0
- data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +2 -2
- data/platform/wm/rhodes/bluetooth/Bluetooth.h +3 -3
- data/platform/wm/rhodes/camera/Camera.cpp +2 -1
- data/platform/wm/rhodes/camera/Camera.h +1 -1
- data/platform/wm/rhodes/resource.h +1 -1
- data/platform/wm/rhodes/rho/common/ExtManager.cpp +93 -5
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +2 -2
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +2 -2
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +13 -7
- data/platform/wm/rhodes/rhodes.vcproj +1409 -1008
- data/platform/wm/rhodes/simulator/MainWindowQt.h +1 -1
- data/platform/wm/rhodes/stdafx.h +2 -2
- data/platform/wm/rhoelements.sln +7 -9
- data/platform/wm/rubylib/rubylib.vcproj +62 -1
- data/platform/wm/sqlite3/sqlite3.vcproj +62 -1
- data/platform/wm/syncengine/syncengine.vcproj +62 -1
- data/platform/wm/tcmalloc/tcmalloc.vcproj +72 -53
- data/platform/wm/tools/detool/detool.cpp +1435 -1357
- data/platform/wp7/RhoRubyExtGen/GenerateInitializers.cmd +0 -0
- data/platform/wp7/RhoRubyLib/common/RhoLicense.cs +105 -0
- data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +23 -5
- data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +5 -0
- data/platform/wp7/RhoRubyLib/views/RhoView.xaml.cs +22 -3
- data/platform/wp7/build/wp.rake +1 -0
- data/platform/wp7/rhodes/MainPage.xaml.cs +11 -0
- data/rakefile.rb +225 -59
- data/res/build-tools/7za.exe +0 -0
- data/res/build-tools/RhoAppRunner.exe +0 -0
- data/res/build-tools/RhoLogServer.exe +0 -0
- data/res/build-tools/RhoRuby.exe +0 -0
- data/res/build-tools/RubyMac +0 -0
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/iphonesim/Source/iPhoneSimulator.m +1 -1
- data/res/build-tools/iphonesim/build/Release/iphonesim +0 -0
- data/res/build-tools/iphonesim/build/Release/iphonesim_43 +0 -0
- data/res/build-tools/license_rc.dll +0 -0
- data/res/build-tools/make.exe +0 -0
- data/res/build-tools/rubylinux +0 -0
- data/res/build-tools/swig_patch/Lib/typemaps/fragments.swg +235 -0
- data/res/build-tools/wmdc_connect.exe +0 -0
- data/res/build-tools/wp7explorer.exe +0 -0
- data/res/generators/rhogen.rb +2 -2
- data/res/generators/templates/application/app/Settings/controller.rb +1 -1
- data/res/generators/templates/application/app/layout.erb +1 -1
- data/res/generators/templates/application/app/loading.png +0 -0
- data/res/generators/templates/application/public/css/re_webkit.css +736 -0
- data/res/generators/templates/application/public/css/windows_mobile.css +0 -0
- data/res/generators/templates/application/public/images/listArrow.png +0 -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/js/syncengine.js +409 -52
- data/res/generators/templates/extension/extensions/montana/ext/build +0 -0
- data/res/generators/templates/extension/extensions/montana/ext/build.bat +0 -0
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/android/Rakefile +10 -10
- data/res/generators/templates/spec/app/SpecRunner/controller.rb +2 -0
- data/res/libs/motorolalicence/android/MotorolaLicence.h +13 -0
- data/res/libs/motorolalicence/android/libMotorolaLicence.a +0 -0
- data/res/libs/motorolalicence/iphone/MotorolaLicence.h +13 -0
- data/res/libs/motorolalicence/iphone/libMotorolaLicence.a +0 -0
- data/rhodes.gemspec +1 -1
- data/spec/framework_spec/app/SpecRunner/controller.rb +2 -0
- data/spec/phone_spec/app/SpecRunner/controller.rb +2 -0
- data/version +1 -1
- metadata +487 -412
- data/Manifest.txt +0 -7960
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivityStartupListeners.java +0 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsNew.java +0 -52
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +0 -62
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/phonon.framework/Versions/4/phonon +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/phonon_backend/libphonon_qt7.dylib +0 -0
- data/platform/win32/RhoSimulator/Microsoft.VC80.CRT.manifest +0 -8
- data/platform/win32/RhoSimulator/Microsoft.VC80.OpenMP.manifest +0 -7
- data/platform/win32/RhoSimulator/msvcm80.dll +0 -0
- data/platform/win32/RhoSimulator/msvcp80.dll +0 -0
- data/platform/win32/RhoSimulator/msvcr80.dll +0 -0
- data/platform/win32/RhoSimulator/vcomp.dll +0 -0
- data/rhomobile-debug-1.0.6.gem +0 -0
data/platform/shared/ruby/gc.c
CHANGED
@@ -85,10 +85,12 @@
|
|
85
85
|
/* escape other system UChar definition */
|
86
86
|
#ifndef RUBY_DEFINES_H
|
87
87
|
#include "ruby/ruby.h"
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
88
|
+
//RHO
|
89
|
+
//#undef xmalloc
|
90
|
+
//#undef xrealloc
|
91
|
+
//#undef xcalloc
|
92
|
+
//#undef xfree
|
93
|
+
//RHO
|
92
94
|
#endif
|
93
95
|
#ifdef ONIG_ESCAPE_UCHAR_COLLISION
|
94
96
|
#undef ONIG_ESCAPE_UCHAR_COLLISION
|
data/platform/shared/ruby/vm.c
CHANGED
@@ -134,7 +134,7 @@ VALUE rho_sys_get_property(char* szPropName)
|
|
134
134
|
return rho_ruby_create_boolean(passed);
|
135
135
|
}
|
136
136
|
|
137
|
-
if (strcasecmp("
|
137
|
+
if (strcasecmp("is_motorola_device",szPropName) == 0)
|
138
138
|
#ifdef APP_BUILD_CAPABILITY_MOTOROLA
|
139
139
|
return rho_ruby_create_boolean(1);
|
140
140
|
#else
|
@@ -11,7 +11,7 @@
|
|
11
11
|
#undef DEFAULT_LOGCATEGORY
|
12
12
|
#define DEFAULT_LOGCATEGORY "RDispatcher"
|
13
13
|
|
14
|
-
#if defined(__SYMBIAN32__) || defined(
|
14
|
+
#if defined(__SYMBIAN32__) || defined(WINDOWS_PLATFORM)
|
15
15
|
extern char* get_home_url();
|
16
16
|
#else
|
17
17
|
/*static char* localhost = "http://localhost:8080";*/
|
@@ -274,7 +274,7 @@ char* rho_resolve_url(char* url, const char* root,const char *index_names) {
|
|
274
274
|
}
|
275
275
|
}
|
276
276
|
|
277
|
-
#if defined(__SYMBIAN32__) || defined(
|
277
|
+
#if defined(__SYMBIAN32__) || defined(WINDOWS_PLATFORM)
|
278
278
|
full_len = strlen(get_home_url())+strlen(tmp_url)+1;
|
279
279
|
ret = malloc(full_len);
|
280
280
|
_shttpd_snprintf(ret, full_len, "%s%s", get_home_url(), tmp_url);
|
@@ -408,7 +408,7 @@ void rho_create_write_state(struct shttpd_arg *arg, VALUE data)
|
|
408
408
|
|
409
409
|
state->data = data;
|
410
410
|
state->nDataLen = getStringLenFromValue(data);
|
411
|
-
#if defined(
|
411
|
+
#if defined(OS_WINDOWS_DESKTOP)
|
412
412
|
{
|
413
413
|
char* reply = getStringFromValue(state->data);
|
414
414
|
RAWTRACE1("Reply: [%s]",reply);
|
File without changes
|
File without changes
|
@@ -252,7 +252,10 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
|
|
252
252
|
|
253
253
|
const char* szData = null;
|
254
254
|
if ( strTestResp.length() > 0 )
|
255
|
+
{
|
255
256
|
szData = strTestResp.c_str();
|
257
|
+
getNotify().setFakeServerResponse(true);
|
258
|
+
}
|
256
259
|
else
|
257
260
|
szData = resp.getCharData();
|
258
261
|
|
@@ -311,15 +314,6 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
|
|
311
314
|
pSrc->processServerResponse_ver3(oSrcArr);
|
312
315
|
|
313
316
|
nSearchCount += pSrc->getCurPageCount();
|
314
|
-
|
315
|
-
if ( pSrc->getServerError().length() > 0 )
|
316
|
-
{
|
317
|
-
if ( m_strServerError.length() > 0 )
|
318
|
-
m_strServerError += "&";
|
319
|
-
|
320
|
-
m_strServerError += pSrc->getServerError();
|
321
|
-
m_nErrCode = pSrc->getErrorCode();
|
322
|
-
}
|
323
317
|
}
|
324
318
|
|
325
319
|
if ( nSearchCount == 0 )
|
@@ -333,6 +327,9 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
|
|
333
327
|
|
334
328
|
break;
|
335
329
|
}
|
330
|
+
|
331
|
+
if ( strTestResp.length() > 0 )
|
332
|
+
break;
|
336
333
|
}
|
337
334
|
|
338
335
|
getNotify().fireAllSyncNotifications(true, m_nErrCode, m_strError, m_strServerError);
|
@@ -637,7 +634,7 @@ void CSyncEngine::doBulkSync()//throws Exception
|
|
637
634
|
if (isContinueSync())
|
638
635
|
{
|
639
636
|
RHOCONF().setInt("bulksync_state", 1, true);
|
640
|
-
getNotify().fireBulkSyncNotification(true, "", "", RhoAppAdapter.ERR_NONE);
|
637
|
+
getNotify().fireBulkSyncNotification(true, "complete", "", RhoAppAdapter.ERR_NONE);
|
641
638
|
}
|
642
639
|
}
|
643
640
|
|
@@ -687,7 +684,7 @@ void CSyncEngine::loadBulkPartition(const String& strPartition )
|
|
687
684
|
if ( strCmd.compare("nop") == 0)
|
688
685
|
{
|
689
686
|
LOG(INFO) + "Bulk sync return no data.";
|
690
|
-
getNotify().fireBulkSyncNotification(true, "", strPartition, RhoAppAdapter.ERR_NONE);
|
687
|
+
getNotify().fireBulkSyncNotification(true, "ok", strPartition, RhoAppAdapter.ERR_NONE);
|
691
688
|
|
692
689
|
return;
|
693
690
|
}
|
@@ -734,7 +731,7 @@ void CSyncEngine::loadBulkPartition(const String& strPartition )
|
|
734
731
|
processServerSources(String("{\"partition\":\"") + strPartition + "\"}");
|
735
732
|
|
736
733
|
LOG(INFO) + "Bulk sync: end change db";
|
737
|
-
getNotify().fireBulkSyncNotification(false, "", strPartition, RhoAppAdapter.ERR_NONE);
|
734
|
+
getNotify().fireBulkSyncNotification(false, "ok", strPartition, RhoAppAdapter.ERR_NONE);
|
738
735
|
}
|
739
736
|
|
740
737
|
String CSyncEngine::makeBulkDataFileName(String strDataUrl, String strDbPath, String strExt)
|
@@ -31,6 +31,10 @@
|
|
31
31
|
#include "common/RhoAppAdapter.h"
|
32
32
|
#include "common/RhodesApp.h"
|
33
33
|
|
34
|
+
#ifndef RHO_NO_RUBY
|
35
|
+
#include "rubyext/WebView.h"
|
36
|
+
#endif
|
37
|
+
|
34
38
|
namespace rho {
|
35
39
|
namespace sync {
|
36
40
|
IMPLEMENT_LOGCLASS(CSyncNotify,"Sync");
|
@@ -163,7 +167,9 @@ void CSyncNotify::fireObjectsNotification()
|
|
163
167
|
callNotify( CSyncNotification(strUrl,"",false), strBody);
|
164
168
|
}else if (m_pObjectNotify->m_cCallback)
|
165
169
|
{
|
170
|
+
m_isInsideCallback = true;
|
166
171
|
(*m_pObjectNotify->m_cCallback)(strBody.c_str(), m_pObjectNotify->m_cCallbackData);
|
172
|
+
m_isInsideCallback = false;
|
167
173
|
//callNotify( CSyncNotification(m_pObjectNotify->m_cCallback,m_pObjectNotify->m_cCallbackData,false), strBody);
|
168
174
|
}
|
169
175
|
}
|
@@ -438,6 +444,11 @@ CSyncNotification* CSyncNotify::getSyncNotifyBySrc(CSyncSource* src)
|
|
438
444
|
return pSN != null ? pSN : &m_emptyNotify;
|
439
445
|
}
|
440
446
|
|
447
|
+
void CSyncNotify::fireSyncNotification2( CSyncSource* src, boolean bFinish, int nErrCode, String strServerError)
|
448
|
+
{
|
449
|
+
doFireSyncNotification(src, bFinish, nErrCode, "", "", strServerError);
|
450
|
+
}
|
451
|
+
|
441
452
|
void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int nErrCode, String strError, String strParams, String strServerError)
|
442
453
|
{
|
443
454
|
if ( getSync().isStoppedByUser() )
|
@@ -495,8 +506,6 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
|
|
495
506
|
|
496
507
|
if ( strServerError.length() > 0 )
|
497
508
|
strBody += "&" + strServerError;
|
498
|
-
else if ( src != null && (*src).m_strServerError.length() > 0 )
|
499
|
-
strBody += "&" + (*src).m_strServerError;
|
500
509
|
}
|
501
510
|
|
502
511
|
if ( src != null )
|
@@ -523,22 +532,45 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
|
|
523
532
|
clearNotification(src);
|
524
533
|
}
|
525
534
|
|
535
|
+
const String& CSyncNotify::getNotifyBody()
|
536
|
+
{
|
537
|
+
const static String emptyBody = String();
|
538
|
+
if ( m_arNotifyBody.size() == 0 )
|
539
|
+
return emptyBody;
|
540
|
+
|
541
|
+
if ( isFakeServerResponse() )
|
542
|
+
return m_arNotifyBody[0];
|
543
|
+
|
544
|
+
return m_arNotifyBody[m_arNotifyBody.size()-1];
|
545
|
+
}
|
546
|
+
|
526
547
|
boolean CSyncNotify::callNotify(const CSyncNotification& oNotify, const String& strBody )
|
527
548
|
{
|
528
549
|
String strUrl = oNotify.m_strUrl; //Need to copy url since notify may be cleared in callback
|
529
550
|
if ( getSync().isNoThreadedMode() )
|
530
551
|
{
|
531
|
-
|
552
|
+
m_arNotifyBody.addElement( strBody );
|
532
553
|
return false;
|
533
554
|
}
|
534
555
|
if ( oNotify.m_cCallback )
|
535
556
|
{
|
557
|
+
m_isInsideCallback = true;
|
536
558
|
int nRet = (*oNotify.m_cCallback)(strBody.c_str(), oNotify.m_cCallbackData);
|
559
|
+
m_isInsideCallback = false;
|
537
560
|
return nRet == 1;
|
538
561
|
}
|
539
562
|
if ( strUrl.length() == 0 )
|
540
563
|
return true;
|
541
564
|
|
565
|
+
#ifndef RHO_NO_RUBY
|
566
|
+
if (0 == strUrl.find("javascript:"))
|
567
|
+
{
|
568
|
+
String js = strUrl.substr(11) + "('" + strBody + "');";
|
569
|
+
rho_webview_execute_js(js.c_str(), -1);
|
570
|
+
return true;
|
571
|
+
}
|
572
|
+
#endif
|
573
|
+
|
542
574
|
NetResponse resp = getNet().pushData( strUrl, strBody, null );
|
543
575
|
if ( !resp.isOK() )
|
544
576
|
LOG(ERROR) + "Fire notification failed. Code: " + resp.getRespCode() + "; Error body: " + resp.getCharData();
|
@@ -627,6 +659,7 @@ void CSyncNotify::callLoginCallback(const CSyncNotification& oNotify, int nErrCo
|
|
627
659
|
// LOG.ERROR("Call Login callback failed.", exc);
|
628
660
|
//}
|
629
661
|
}
|
662
|
+
|
630
663
|
}
|
631
664
|
}
|
632
665
|
|
@@ -104,8 +104,10 @@ private:
|
|
104
104
|
common::CAutoPtr<CSyncNotification> m_pSearchNotification;
|
105
105
|
CSyncNotification m_emptyNotify;
|
106
106
|
common::CMutex m_mxSyncNotifications;
|
107
|
-
String
|
107
|
+
Vector<String> m_arNotifyBody;
|
108
108
|
String m_strStatusHide;
|
109
|
+
boolean m_bFakeServerResponse;
|
110
|
+
boolean m_isInsideCallback;
|
109
111
|
|
110
112
|
NetRequest m_NetRequest;
|
111
113
|
|
@@ -113,7 +115,7 @@ private:
|
|
113
115
|
CSyncEngine& getSync(){ return m_syncEngine; }
|
114
116
|
public:
|
115
117
|
CSyncNotify( CSyncEngine& syncEngine ) : m_syncEngine(syncEngine), m_bEnableReporting(false),
|
116
|
-
m_bEnableReportingGlobal(false){}
|
118
|
+
m_bEnableReportingGlobal(false), m_bFakeServerResponse(false), m_isInsideCallback(false) {}
|
117
119
|
|
118
120
|
//Object notifications
|
119
121
|
void fireObjectsNotification();
|
@@ -135,6 +137,7 @@ public:
|
|
135
137
|
|
136
138
|
void onSyncSourceEnd( int nSrc, VectorPtr<CSyncSource*>& sources );
|
137
139
|
void fireSyncNotification( CSyncSource* psrc, boolean bFinish, int nErrCode, String strMessage);
|
140
|
+
void fireSyncNotification2( CSyncSource* src, boolean bFinish, int nErrCode, String strServerError);
|
138
141
|
|
139
142
|
void fireBulkSyncNotification( boolean bFinish, String status, String partition, int nErrCode );
|
140
143
|
|
@@ -148,12 +151,16 @@ public:
|
|
148
151
|
void enableReporting(boolean bEnable){m_bEnableReporting = bEnable;}
|
149
152
|
void enableStatusPopup(boolean bEnable){m_bEnableReportingGlobal = bEnable;}
|
150
153
|
|
151
|
-
const String& getNotifyBody()
|
152
|
-
void cleanNotifyBody(){
|
154
|
+
const String& getNotifyBody();
|
155
|
+
void cleanNotifyBody(){ m_arNotifyBody.removeAllElements(); setFakeServerResponse(false); }
|
156
|
+
boolean isFakeServerResponse(){ return m_bFakeServerResponse; }
|
157
|
+
void setFakeServerResponse(boolean bFakeServerResponse){ m_bFakeServerResponse = bFakeServerResponse; }
|
153
158
|
|
154
159
|
void fireAllSyncNotifications( boolean bFinish, int nErrCode, String strError, String strServerError );
|
155
160
|
void reportSyncStatus(String status, int error, String strDetails);
|
156
161
|
void showStatusPopup(const String& status);
|
162
|
+
|
163
|
+
bool isInsideCallback() const { return m_isInsideCallback; }
|
157
164
|
private:
|
158
165
|
CSyncNotification* getSyncNotifyBySrc(CSyncSource* src);
|
159
166
|
|
@@ -329,6 +329,14 @@ void CSyncSource::doSyncClientChanges()
|
|
329
329
|
bSend = true;
|
330
330
|
}
|
331
331
|
}
|
332
|
+
|
333
|
+
if (!bSend)
|
334
|
+
{
|
335
|
+
//check for push_changes
|
336
|
+
IDBResult res = getDB().executeSQL("SELECT attrib_type FROM changed_values where source_id=? and update_type =?", getID(), "push_changes" );
|
337
|
+
bSend = !res.isEnd();
|
338
|
+
}
|
339
|
+
|
332
340
|
strBody += "}";
|
333
341
|
|
334
342
|
getDB().Unlock();
|
@@ -379,6 +387,8 @@ void CSyncSource::doSyncClientChanges()
|
|
379
387
|
}
|
380
388
|
}
|
381
389
|
|
390
|
+
if (m_nErrCode == RhoAppAdapter.ERR_NONE)
|
391
|
+
getDB().executeSQL("DELETE FROM changed_values WHERE source_id=? and update_type=?", getID(), "push_changes" );
|
382
392
|
}
|
383
393
|
|
384
394
|
m_arMultipartItems.removeAllElements();
|
@@ -554,7 +564,10 @@ void CSyncSource::syncServerChanges()
|
|
554
564
|
const char* szData = null;
|
555
565
|
String strTestResp = getSync().getSourceOptions().getProperty(getID(), "rho_server_response");
|
556
566
|
if ( strTestResp.length() > 0 )
|
567
|
+
{
|
557
568
|
szData = strTestResp.c_str();
|
569
|
+
getNotify().setFakeServerResponse(true);
|
570
|
+
}
|
558
571
|
else
|
559
572
|
szData = resp.getCharData();
|
560
573
|
|
@@ -570,6 +583,9 @@ void CSyncSource::syncServerChanges()
|
|
570
583
|
|
571
584
|
if ( getToken() == 0 )
|
572
585
|
break;
|
586
|
+
|
587
|
+
if ( strTestResp.length() > 0 )
|
588
|
+
break;
|
573
589
|
}
|
574
590
|
|
575
591
|
if ( getSync().isSchemaChanged() )
|
@@ -577,10 +593,10 @@ void CSyncSource::syncServerChanges()
|
|
577
593
|
}
|
578
594
|
|
579
595
|
//{"create-error":{"0_broken_object_id":{"name":"wrongname","an_attribute":"error create"},"0_broken_object_id-error":{"message":"error create"}}}
|
580
|
-
|
596
|
+
void CSyncSource::processServerErrors(CJSONEntry& oCmds)
|
581
597
|
{
|
598
|
+
String strServerError;
|
582
599
|
const char* arErrTypes[] = {"source-error", "search-error", "create-error", "update-error", "delete-error", "update-rollback", null};
|
583
|
-
boolean bRes = false;
|
584
600
|
for( int i = 0; ; i++ )
|
585
601
|
{
|
586
602
|
if ( arErrTypes[i] == null )
|
@@ -588,9 +604,6 @@ boolean CSyncSource::processServerErrors(CJSONEntry& oCmds)
|
|
588
604
|
if ( !oCmds.hasName(arErrTypes[i]) )
|
589
605
|
continue;
|
590
606
|
|
591
|
-
bRes = true;
|
592
|
-
m_nErrCode = RhoAppAdapter.ERR_CUSTOMSYNCSERVER;
|
593
|
-
|
594
607
|
CJSONEntry errSrc = oCmds.getEntry(arErrTypes[i]);
|
595
608
|
CJSONStructIterator errIter(errSrc);
|
596
609
|
for( ; !errIter.isEnd(); errIter.next() )
|
@@ -601,10 +614,10 @@ boolean CSyncSource::processServerErrors(CJSONEntry& oCmds)
|
|
601
614
|
{
|
602
615
|
if ( errIter.getCurValue().hasName("message") )
|
603
616
|
{
|
604
|
-
if (
|
605
|
-
|
617
|
+
if ( strServerError.length() > 0 )
|
618
|
+
strServerError += "&";
|
606
619
|
|
607
|
-
|
620
|
+
strServerError += "server_errors[" + URI::urlEncode(strKey) + "][message]=" + URI::urlEncode(errIter.getCurValue().getString("message"));
|
608
621
|
}
|
609
622
|
}else
|
610
623
|
{
|
@@ -614,9 +627,9 @@ boolean CSyncSource::processServerErrors(CJSONEntry& oCmds)
|
|
614
627
|
if ( String_endsWith(strObject, "-error") )
|
615
628
|
{
|
616
629
|
strObject = strObject.substr(0, strKey.length()-6);
|
617
|
-
if (
|
618
|
-
|
619
|
-
|
630
|
+
if ( strServerError.length() > 0 )
|
631
|
+
strServerError += "&";
|
632
|
+
strServerError += "server_errors[" + String(arErrTypes[i]) + "][" + URI::urlEncode(strObject) + "][message]=" + URI::urlEncode(errIter.getCurValue().getString("message"));
|
620
633
|
}else
|
621
634
|
{
|
622
635
|
CJSONStructIterator attrIter(errIter.getCurValue());
|
@@ -625,17 +638,18 @@ boolean CSyncSource::processServerErrors(CJSONEntry& oCmds)
|
|
625
638
|
String strAttrName = attrIter.getCurKey();
|
626
639
|
String strAttrValue = attrIter.getCurString();
|
627
640
|
|
628
|
-
if (
|
629
|
-
|
641
|
+
if ( strServerError.length() > 0 )
|
642
|
+
strServerError += "&";
|
630
643
|
|
631
|
-
|
644
|
+
strServerError += "server_errors[" + String(arErrTypes[i]) + "][" + URI::urlEncode(strObject) + "][attributes][" + URI::urlEncode(strAttrName) + "]=" + URI::urlEncode(strAttrValue);
|
632
645
|
}
|
633
646
|
}
|
634
647
|
}
|
635
648
|
}
|
636
649
|
}
|
637
650
|
|
638
|
-
|
651
|
+
if ( strServerError.length() > 0 )
|
652
|
+
getNotify().fireSyncNotification2(this, true, RhoAppAdapter.ERR_CUSTOMSYNCSERVER, strServerError);
|
639
653
|
}
|
640
654
|
|
641
655
|
void CSyncSource::processServerResponse_ver3(CJSONArrayIterator& oJsonArr)
|
@@ -732,8 +746,10 @@ void CSyncSource::processServerResponse_ver3(CJSONArrayIterator& oJsonArr)
|
|
732
746
|
if ( oCmds.hasName("schema-changed") )
|
733
747
|
{
|
734
748
|
getSync().setSchemaChanged(true);
|
735
|
-
}else
|
749
|
+
}else
|
736
750
|
{
|
751
|
+
processServerErrors(oCmds);
|
752
|
+
|
737
753
|
getDB().startTransaction();
|
738
754
|
|
739
755
|
if (getSync().getSourceOptions().getBoolProperty(getID(), "pass_through"))
|