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
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib
CHANGED
Binary file
|
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib
CHANGED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtga.dylib
ADDED
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib
CHANGED
Binary file
|
Binary file
|
data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib
CHANGED
Binary file
|
data/platform/osx/build/osx.rake
CHANGED
@@ -46,7 +46,7 @@ end
|
|
46
46
|
namespace "build" do
|
47
47
|
namespace "osx" do
|
48
48
|
|
49
|
-
task :extensions
|
49
|
+
task :extensions do
|
50
50
|
ENV['RHO_PLATFORM'] = 'osx'
|
51
51
|
ENV["PLATFORM_DEVELOPER_BIN_DIR"] = "/usr/bin"
|
52
52
|
ENV["SDKROOT"] = $sdkroot
|
@@ -74,7 +74,7 @@ namespace "build" do
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
task :rhosimulator => ["config:set_osx_platform", "config:osx", "config:qt"] do
|
77
|
+
task :rhosimulator => ["config:set_osx_platform", "config:osx", "config:qt", "build:rhosimulator_version"] do
|
78
78
|
$rhosimulator_build = true
|
79
79
|
$config["platform"] = $current_platform
|
80
80
|
chdir $startdir
|
@@ -83,15 +83,13 @@ namespace "build" do
|
|
83
83
|
init_extensions(pwd, nil)
|
84
84
|
Rake::Task["build:osx:extensions"].invoke
|
85
85
|
|
86
|
-
|
87
|
-
|
88
|
-
|
86
|
+
ext_dir = File.join($startdir, 'platform/osx/bin/extensions')
|
87
|
+
mkdir_p ext_dir if not File.exists? ext_dir
|
88
|
+
File.open(File.join(ext_dir, 'extensions.pri'), "wb") do |fextensions|
|
89
|
+
fextensions.write(%{SOURCES += ../../ruby/ext/rho/extensions.c
|
89
90
|
LIBS += -L../../../osx/bin/extensions#{$extensions_lib}
|
90
91
|
PRE_TARGETDEPS += #{$pre_targetdeps}
|
91
92
|
})
|
92
|
-
end
|
93
|
-
else
|
94
|
-
Jake.run($remove,['-Rf', File.join($startdir, 'platform/osx/bin/extensions')])
|
95
93
|
end
|
96
94
|
|
97
95
|
app_path = File.join( $build_dir, 'RhoSimulator/RhoSimulator.app' )
|
@@ -56,6 +56,20 @@ const char* getSyncTypeName( RHOM_SYNC_TYPE sync_type )
|
|
56
56
|
void parseSyncNotify(const char* msg, RHO_CONNECT_NOTIFY* pNotify);
|
57
57
|
String rhom_generate_id();
|
58
58
|
|
59
|
+
IDBResult rhom_executeSQL(const char* szSql, const char* szModel )
|
60
|
+
{
|
61
|
+
Hashtable<String,db::CDBAdapter*>& mapDBPartitions = db::CDBAdapter::getDBPartitions();
|
62
|
+
IDBResult res = db::DBResultPtr(0);
|
63
|
+
for (Hashtable<String,db::CDBAdapter*>::iterator it = mapDBPartitions.begin(); it != mapDBPartitions.end(); ++it )
|
64
|
+
{
|
65
|
+
res = (it->second)->executeSQL(szSql, szModel );
|
66
|
+
if ( !res.isEnd() )
|
67
|
+
break;
|
68
|
+
}
|
69
|
+
|
70
|
+
return res;
|
71
|
+
}
|
72
|
+
|
59
73
|
extern "C"
|
60
74
|
{
|
61
75
|
|
@@ -79,22 +93,37 @@ void rho_connectclient_destroymodel(RHOM_MODEL* model)
|
|
79
93
|
memset( model, 0, sizeof(RHOM_MODEL) );
|
80
94
|
}
|
81
95
|
|
82
|
-
|
96
|
+
static int get_start_id(const String& strPartition)
|
83
97
|
{
|
84
|
-
db::CDBAdapter&
|
98
|
+
db::CDBAdapter& dbPart = db::CDBAdapter::getDB(strPartition.c_str());
|
85
99
|
int nStartModelID = 1;
|
86
100
|
{
|
87
|
-
IDBResult res =
|
101
|
+
IDBResult res = dbPart.executeSQL("SELECT MAX(source_id) AS maxid FROM sources");
|
88
102
|
if ( !res.isEnd() )
|
89
103
|
nStartModelID = res.getIntByIdx(0)+2;
|
90
104
|
}
|
91
105
|
|
106
|
+
if ( strPartition == "user" && nStartModelID < 1 )
|
107
|
+
nStartModelID = 1;
|
108
|
+
else if ( strPartition == "app" && nStartModelID < 20001 )
|
109
|
+
nStartModelID = 20001 + 2;
|
110
|
+
else if ( strPartition == "local" && nStartModelID < 40001 )
|
111
|
+
nStartModelID = 40001 + 2;
|
112
|
+
|
113
|
+
return nStartModelID;
|
114
|
+
}
|
115
|
+
|
116
|
+
static void rho_connectclient_processmodels( RHOM_MODEL* pModels, int nModels, const String& strPartition )
|
117
|
+
{
|
118
|
+
int nStartModelID = get_start_id(strPartition);
|
119
|
+
db::CDBAdapter& dbPart = db::CDBAdapter::getDB(strPartition.c_str());
|
120
|
+
|
92
121
|
//create associations string
|
93
122
|
Hashtable<String, String> hashSrcAssoc;
|
94
123
|
for ( int i = 0; i < nModels; i++ )
|
95
124
|
{
|
96
125
|
RHOM_MODEL& model = pModels[i];
|
97
|
-
if ( !model.associations )
|
126
|
+
if ( !model.associations || strPartition != model.partition )
|
98
127
|
continue;
|
99
128
|
|
100
129
|
Hashtable<String, String>& assocHash = *((Hashtable<String, String>*)model.associations);
|
@@ -113,14 +142,17 @@ void rho_connectclient_processmodels(RHOM_MODEL* pModels, int nModels)
|
|
113
142
|
for ( int i = 0; i < nModels; i++ )
|
114
143
|
{
|
115
144
|
RHOM_MODEL& model = pModels[i];
|
116
|
-
|
145
|
+
if ( strPartition != model.partition )
|
146
|
+
continue;
|
147
|
+
|
148
|
+
IDBResult res = dbPart.executeSQL("SELECT sync_priority,source_id,partition, sync_type, schema_version, associations, blob_attribs FROM sources WHERE name=?",
|
117
149
|
model.name);
|
118
150
|
|
119
151
|
String strAssoc = hashSrcAssoc[model.name];
|
120
152
|
|
121
153
|
if ( !res.isEnd() )
|
122
154
|
{
|
123
|
-
|
155
|
+
dbPart.executeSQL("UPDATE sources SET sync_priority=?, sync_type=?, partition=?, schema=?, schema_version=?, associations=?, blob_attribs=? WHERE name=?",
|
124
156
|
model.sync_priority, getSyncTypeName(model.sync_type), model.partition,
|
125
157
|
(model.type == RMT_PROPERTY_FIXEDSCHEMA ? "schema_model" : ""), "", strAssoc.c_str(), model.blob_attribs, model.name );
|
126
158
|
|
@@ -128,7 +160,7 @@ void rho_connectclient_processmodels(RHOM_MODEL* pModels, int nModels)
|
|
128
160
|
|
129
161
|
}else //new model
|
130
162
|
{
|
131
|
-
|
163
|
+
dbPart.executeSQL("INSERT INTO sources (source_id,name,sync_priority, sync_type, partition, schema,schema_version, associations, blob_attribs) values (?,?,?,?,?,?,?,?,?) ",
|
132
164
|
nStartModelID, model.name, model.sync_priority, getSyncTypeName(model.sync_type), model.partition,
|
133
165
|
(model.type == RMT_PROPERTY_FIXEDSCHEMA ? "schema_model" : ""), "", strAssoc.c_str(), model.blob_attribs );
|
134
166
|
|
@@ -162,7 +194,11 @@ void rho_connectclient_init(RHOM_MODEL* pModels, int nModels)
|
|
162
194
|
}
|
163
195
|
|
164
196
|
//process models
|
165
|
-
|
197
|
+
Hashtable<String,db::CDBAdapter*>& mapDBPartitions = db::CDBAdapter::getDBPartitions();
|
198
|
+
for (Hashtable<String,db::CDBAdapter*>::iterator it = mapDBPartitions.begin(); it != mapDBPartitions.end(); ++it )
|
199
|
+
{
|
200
|
+
rho_connectclient_processmodels(pModels, nModels, it->first);
|
201
|
+
}
|
166
202
|
|
167
203
|
rho_db_init_attr_manager();
|
168
204
|
|
@@ -171,6 +207,23 @@ void rho_connectclient_init(RHOM_MODEL* pModels, int nModels)
|
|
171
207
|
|
172
208
|
}
|
173
209
|
|
210
|
+
void rho_connectclient_updatemodels(RHOM_MODEL* pModels, int nModels)
|
211
|
+
{
|
212
|
+
for( int i = 0; i < nModels; i++ )
|
213
|
+
{
|
214
|
+
RHOM_MODEL& model = pModels[i];
|
215
|
+
|
216
|
+
db::CDBAdapter& db = db::CDBAdapter::getDB( model.partition );
|
217
|
+
//, sync_type, sync_priority, associations, blob_attribs
|
218
|
+
IDBResult res = db.executeSQL( "SELECT source_id from sources WHERE name=?", model.name );
|
219
|
+
if ( res.isEnd() )
|
220
|
+
continue;
|
221
|
+
|
222
|
+
model.source_id = res.getIntByIdx(0);
|
223
|
+
//model.sync_type = (RHOM_SYNC_TYPE)res.getIntByIdx(1);
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
174
227
|
void rho_connectclient_database_client_reset()
|
175
228
|
{
|
176
229
|
int pollInterval = rho_sync_set_pollinterval(0);
|
@@ -356,9 +409,7 @@ unsigned long rhom_load_item_by_object(db::CDBAdapter& db, const String& src_nam
|
|
356
409
|
|
357
410
|
unsigned long rho_connectclient_find(const char* szModel,const char* szObject )
|
358
411
|
{
|
359
|
-
|
360
|
-
|
361
|
-
IDBResult res = db::CDBAdapter::getUserDB().executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", src_name);
|
412
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
362
413
|
if ( res.isEnd())
|
363
414
|
{
|
364
415
|
//TODO: report error - unknown source
|
@@ -371,14 +422,14 @@ unsigned long rho_connectclient_find(const char* szModel,const char* szObject )
|
|
371
422
|
//String tableName = isSchemaSrc ? src_name : "object_values";
|
372
423
|
db::CDBAdapter& db = db::CDBAdapter::getDB(db_partition.c_str());
|
373
424
|
|
374
|
-
return rhom_load_item_by_object( db,
|
425
|
+
return rhom_load_item_by_object( db, szModel, nSrcID, szObject, isSchemaSrc);
|
375
426
|
}
|
376
427
|
|
377
428
|
unsigned long rhom_find(const char* szModel, unsigned long hash, int nCount )
|
378
429
|
{
|
379
430
|
String src_name = szModel;
|
380
431
|
|
381
|
-
IDBResult res =
|
432
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
382
433
|
if ( res.isEnd())
|
383
434
|
{
|
384
435
|
//TODO: report error - unknown source
|
@@ -461,7 +512,7 @@ unsigned long rho_connectclient_findbysql(const char* szModel, const char* szSql
|
|
461
512
|
{
|
462
513
|
String src_name = szModel;
|
463
514
|
|
464
|
-
IDBResult res =
|
515
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
465
516
|
if ( res.isEnd())
|
466
517
|
{
|
467
518
|
//TODO: report error - unknown source
|
@@ -499,7 +550,8 @@ unsigned long rho_connectclient_findbysql(const char* szModel, const char* szSql
|
|
499
550
|
void rho_connectclient_start_bulkupdate(const char* szModel)
|
500
551
|
{
|
501
552
|
String src_name = szModel;
|
502
|
-
|
553
|
+
|
554
|
+
IDBResult res = rhom_executeSQL("SELECT partition from sources WHERE name=?", szModel);
|
503
555
|
if ( res.isEnd())
|
504
556
|
{
|
505
557
|
//TODO: report error - unknown source
|
@@ -514,7 +566,7 @@ void rho_connectclient_start_bulkupdate(const char* szModel)
|
|
514
566
|
void rho_connectclient_stop_bulkupdate(const char* szModel)
|
515
567
|
{
|
516
568
|
String src_name = szModel;
|
517
|
-
IDBResult res =
|
569
|
+
IDBResult res = rhom_executeSQL("SELECT partition from sources WHERE name=?", szModel);
|
518
570
|
if ( res.isEnd())
|
519
571
|
{
|
520
572
|
//TODO: report error - unknown source
|
@@ -534,7 +586,7 @@ void rho_connectclient_itemdestroy( const char* szModel, unsigned long hash )
|
|
534
586
|
String obj = hashObject.get("object");
|
535
587
|
String update_type="delete";
|
536
588
|
|
537
|
-
IDBResult res =
|
589
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
538
590
|
if ( res.isEnd())
|
539
591
|
{
|
540
592
|
//TODO: report error - unknown source
|
@@ -605,9 +657,12 @@ void rho_connectclient_itemdestroy( const char* szModel, unsigned long hash )
|
|
605
657
|
|
606
658
|
void rho_connectclient_on_sync_create_error(const char* szModel, RHO_CONNECT_NOTIFY* pNotify, const char* szAction )
|
607
659
|
{
|
608
|
-
unsigned long hash_create_errors = pNotify->
|
660
|
+
unsigned long hash_create_errors = pNotify->create_errors_messages;
|
661
|
+
if (!hash_create_errors)
|
662
|
+
return;
|
663
|
+
|
609
664
|
String src_name = szModel;
|
610
|
-
IDBResult
|
665
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
611
666
|
if ( res.isEnd())
|
612
667
|
{
|
613
668
|
//TODO: report error - unknown source
|
@@ -653,6 +708,29 @@ void rho_connectclient_on_sync_create_error(const char* szModel, RHO_CONNECT_NOT
|
|
653
708
|
db.endTransaction();
|
654
709
|
}
|
655
710
|
|
711
|
+
void rho_connectclient_push_changes(const char* szModel )
|
712
|
+
{
|
713
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
714
|
+
if ( res.isEnd())
|
715
|
+
{
|
716
|
+
//TODO: report error - unknown source
|
717
|
+
return;
|
718
|
+
}
|
719
|
+
|
720
|
+
int nSrcID = res.getIntByIdx(0);
|
721
|
+
String db_partition = res.getStringByIdx(1);
|
722
|
+
bool isSyncSrc = res.getStringByIdx(3).compare("none") != 0;
|
723
|
+
db::CDBAdapter& db = db::CDBAdapter::getDB(db_partition.c_str());
|
724
|
+
|
725
|
+
if (!isSyncSrc)
|
726
|
+
return;
|
727
|
+
|
728
|
+
Hashtable<String,String> fields;
|
729
|
+
fields.put("update_type", "push_changes");
|
730
|
+
fields.put("source_id", convertToStringA(nSrcID));
|
731
|
+
db_insert_into_table(db, "changed_values", fields);
|
732
|
+
}
|
733
|
+
|
656
734
|
void _insert_or_update_attr(db::CDBAdapter& db, bool isSchemaSrc, const String& tableName, int nSrcID, const String& obj, const String& attrib, const String& new_val)
|
657
735
|
{
|
658
736
|
if ( isSchemaSrc )
|
@@ -688,7 +766,7 @@ void _insert_or_update_attr(db::CDBAdapter& db, bool isSchemaSrc, const String&
|
|
688
766
|
void rho_connectclient_on_sync_update_error(const char* szModel, RHO_CONNECT_NOTIFY* pNotify, const char* szAction )
|
689
767
|
{
|
690
768
|
String src_name = szModel;
|
691
|
-
IDBResult
|
769
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
692
770
|
if ( res.isEnd())
|
693
771
|
{
|
694
772
|
//TODO: report error - unknown source
|
@@ -755,7 +833,7 @@ void rho_connectclient_on_sync_update_error(const char* szModel, RHO_CONNECT_NOT
|
|
755
833
|
void rho_connectclient_on_sync_delete_error(const char* szModel, RHO_CONNECT_NOTIFY* pNotify, const char* szAction )
|
756
834
|
{
|
757
835
|
String src_name = szModel;
|
758
|
-
IDBResult
|
836
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
759
837
|
if ( res.isEnd())
|
760
838
|
{
|
761
839
|
//TODO: report error - unknown source
|
@@ -805,7 +883,7 @@ void rho_connectclient_save( const char* szModel, unsigned long hash )
|
|
805
883
|
Hashtable<String, String>& hashObject = *((Hashtable<String, String>*)hash);
|
806
884
|
String src_name = szModel;
|
807
885
|
|
808
|
-
IDBResult
|
886
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
809
887
|
if ( res.isEnd())
|
810
888
|
{
|
811
889
|
//TODO: report error - unknown source
|
@@ -934,7 +1012,7 @@ void rho_connectclient_create_object(const char* szModel, unsigned long hash)
|
|
934
1012
|
Hashtable<String, String>& hashObject = *((Hashtable<String, String>*)hash);
|
935
1013
|
String src_name = szModel;
|
936
1014
|
|
937
|
-
IDBResult res =
|
1015
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition, schema, sync_type from sources WHERE name=?", szModel);
|
938
1016
|
if ( res.isEnd())
|
939
1017
|
{
|
940
1018
|
//TODO: report error - unknown source
|
@@ -995,7 +1073,7 @@ void rho_connectclient_create_object(const char* szModel, unsigned long hash)
|
|
995
1073
|
int rho_connectclient_is_changed(const char* szModel)
|
996
1074
|
{
|
997
1075
|
String src_name = szModel;
|
998
|
-
IDBResult res =
|
1076
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition from sources WHERE name=?", szModel);
|
999
1077
|
if ( res.isEnd())
|
1000
1078
|
{
|
1001
1079
|
//TODO: report error - unknown source
|
@@ -1011,6 +1089,22 @@ int rho_connectclient_is_changed(const char* szModel)
|
|
1011
1089
|
return resChanged.isEnd() ? 0 : 1;
|
1012
1090
|
}
|
1013
1091
|
|
1092
|
+
void rho_connectclient_set_synctype(const char* szModel, RHOM_SYNC_TYPE sync_type)
|
1093
|
+
{
|
1094
|
+
IDBResult res = rhom_executeSQL("SELECT source_id, partition from sources WHERE name=?", szModel);
|
1095
|
+
if ( res.isEnd())
|
1096
|
+
{
|
1097
|
+
//TODO: report error - unknown source
|
1098
|
+
return;
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
int nSrcID = res.getIntByIdx(0);
|
1102
|
+
String db_partition = res.getStringByIdx(1);
|
1103
|
+
db::CDBAdapter& db = db::CDBAdapter::getDB(db_partition.c_str());
|
1104
|
+
|
1105
|
+
db.executeSQL("UPDATE sources SET sync_type=? WHERE name=?", getSyncTypeName(sync_type), szModel );
|
1106
|
+
}
|
1107
|
+
|
1014
1108
|
void parseServerErrors( const char* szPrefix, const String& name, const String& value, unsigned long& errors_obj, unsigned long& errors_attrs )
|
1015
1109
|
{
|
1016
1110
|
int nPrefixLen = strlen(szPrefix)+1;
|
@@ -1042,6 +1136,24 @@ void parseServerErrors( const char* szPrefix, const String& name, const String&
|
|
1042
1136
|
|
1043
1137
|
}
|
1044
1138
|
}
|
1139
|
+
|
1140
|
+
void parseServerErrorMessage( const char* szPrefix, const String& name, const String& value, unsigned long& errors_obj )
|
1141
|
+
{
|
1142
|
+
int nPrefixLen = strlen(szPrefix)+1;
|
1143
|
+
if (!errors_obj)
|
1144
|
+
errors_obj = rho_connectclient_hash_create();
|
1145
|
+
|
1146
|
+
String strObject = name.substr(nPrefixLen, name.find(']', nPrefixLen)-nPrefixLen );
|
1147
|
+
|
1148
|
+
static const char* messageTag = "[message]";
|
1149
|
+
|
1150
|
+
int nMsg = name.find(messageTag);
|
1151
|
+
if ( nMsg >= 0 )
|
1152
|
+
{
|
1153
|
+
rho_connectclient_hash_put(errors_obj, strObject.c_str(), value.c_str());
|
1154
|
+
}
|
1155
|
+
}
|
1156
|
+
|
1045
1157
|
|
1046
1158
|
void rho_connectclient_parsenotify(const char* msg, RHO_CONNECT_NOTIFY* pNotify)
|
1047
1159
|
{
|
@@ -1078,28 +1190,36 @@ void rho_connectclient_parsenotify(const char* msg, RHO_CONNECT_NOTIFY* pNotify)
|
|
1078
1190
|
pNotify->source_name = strdup(value.c_str());
|
1079
1191
|
else if ( name.compare("sync_type") == 0)
|
1080
1192
|
pNotify->sync_type = strdup(value.c_str());
|
1193
|
+
else if ( name.compare("bulk_status") == 0)
|
1194
|
+
pNotify->bulk_status = strdup(value.c_str());
|
1195
|
+
else if ( name.compare("partition") == 0)
|
1196
|
+
pNotify->partition = strdup(value.c_str());
|
1081
1197
|
else if ( name.compare("status") == 0)
|
1082
1198
|
pNotify->status = strdup(value.c_str());
|
1083
1199
|
else if ( name.compare("error_message") == 0)
|
1084
1200
|
pNotify->error_message = strdup(value.c_str());
|
1085
1201
|
else if ( String_startsWith(name, "server_errors[create-error]") )
|
1086
1202
|
{
|
1087
|
-
|
1088
|
-
pNotify->create_errors = rho_connectclient_hash_create();
|
1089
|
-
|
1090
|
-
String strObject = name.substr(28, name.find(']', 28)-28 );
|
1091
|
-
rho_connectclient_hash_put(pNotify->create_errors, strObject.c_str(), value.c_str());
|
1203
|
+
parseServerErrorMessage("server_errors[create-error]", name, value, pNotify->create_errors_messages);
|
1092
1204
|
}
|
1093
1205
|
else if ( String_startsWith(name, "server_errors[update-error]") || String_startsWith(name, "server_errors[update-rollback]") || String_startsWith(name, "server_errors[delete-error]") )
|
1094
1206
|
{
|
1095
1207
|
if ( String_startsWith(name, "server_errors[update-error]") )
|
1208
|
+
{
|
1096
1209
|
parseServerErrors( "server_errors[update-error]", name, value, pNotify->update_errors_obj, pNotify->update_errors_attrs );
|
1210
|
+
parseServerErrorMessage("server_errors[update-error]", name, value, pNotify->update_errors_messages);
|
1211
|
+
}
|
1097
1212
|
else if ( String_startsWith(name, "server_errors[update-rollback]") )
|
1213
|
+
{
|
1098
1214
|
parseServerErrors( "server_errors[update-rollback]", name, value, pNotify->update_rollback_obj, pNotify->update_rollback_attrs );
|
1215
|
+
}
|
1099
1216
|
else if ( String_startsWith(name, "server_errors[delete-error]") )
|
1217
|
+
{
|
1100
1218
|
parseServerErrors( "server_errors[delete-error]", name, value, pNotify->delete_errors_obj, pNotify->delete_errors_attrs );
|
1219
|
+
parseServerErrorMessage("server_errors[delete-error]", name, value, pNotify->delete_errors_messages);
|
1220
|
+
}
|
1101
1221
|
|
1102
|
-
}else if ( name.compare("rho_callback")
|
1222
|
+
}else if ( name.compare("rho_callback") == 0)
|
1103
1223
|
break;
|
1104
1224
|
|
1105
1225
|
nLastPos = oTokenizer.getCurPos();
|
@@ -1119,7 +1239,13 @@ void rho_connectclient_free_syncnotify(RHO_CONNECT_NOTIFY* pNotify)
|
|
1119
1239
|
|
1120
1240
|
if ( pNotify->sync_type != null )
|
1121
1241
|
free(pNotify->sync_type);
|
1122
|
-
|
1242
|
+
|
1243
|
+
if ( pNotify->bulk_status != null )
|
1244
|
+
free(pNotify->bulk_status);
|
1245
|
+
|
1246
|
+
if ( pNotify->partition != null )
|
1247
|
+
free(pNotify->partition);
|
1248
|
+
|
1123
1249
|
if ( pNotify->status != null )
|
1124
1250
|
free(pNotify->status);
|
1125
1251
|
|
@@ -1129,14 +1255,17 @@ void rho_connectclient_free_syncnotify(RHO_CONNECT_NOTIFY* pNotify)
|
|
1129
1255
|
if ( pNotify->callback_params != null )
|
1130
1256
|
free(pNotify->callback_params);
|
1131
1257
|
|
1132
|
-
if ( pNotify->
|
1133
|
-
rho_connectclient_hash_delete(pNotify->
|
1258
|
+
if ( pNotify->create_errors_messages != null )
|
1259
|
+
rho_connectclient_hash_delete(pNotify->create_errors_messages);
|
1134
1260
|
|
1135
1261
|
if ( pNotify->update_errors_obj != null )
|
1136
1262
|
rho_connectclient_strarray_delete(pNotify->update_errors_obj);
|
1137
1263
|
|
1138
1264
|
if ( pNotify->update_errors_attrs != null )
|
1139
1265
|
rho_connectclient_strhasharray_delete(pNotify->update_errors_attrs);
|
1266
|
+
|
1267
|
+
if ( pNotify->update_errors_messages != null )
|
1268
|
+
rho_connectclient_hash_delete(pNotify->update_errors_messages);
|
1140
1269
|
|
1141
1270
|
if ( pNotify->update_rollback_obj != null )
|
1142
1271
|
rho_connectclient_strarray_delete(pNotify->update_rollback_obj);
|
@@ -1149,6 +1278,9 @@ void rho_connectclient_free_syncnotify(RHO_CONNECT_NOTIFY* pNotify)
|
|
1149
1278
|
|
1150
1279
|
if ( pNotify->delete_errors_attrs != null )
|
1151
1280
|
rho_connectclient_strhasharray_delete(pNotify->delete_errors_attrs);
|
1281
|
+
|
1282
|
+
if ( pNotify->delete_errors_messages != null )
|
1283
|
+
rho_connectclient_hash_delete(pNotify->delete_errors_messages);
|
1152
1284
|
|
1153
1285
|
memset( pNotify, 0, sizeof(RHO_CONNECT_NOTIFY) );
|
1154
1286
|
}
|