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/doc/introduction.txt
CHANGED
@@ -8,19 +8,22 @@ The [Tutorial](tutorial) describes how to install Rhodes and build your apps. Th
|
|
8
8
|
|
9
9
|
## Supported Operating Systems
|
10
10
|
### BlackBerry
|
11
|
-
BlackBerry 4.6, 4.7, 5.0, 6.0
|
11
|
+
BlackBerry 4.6, 4.7, 5.0, 6.0, 7.0
|
12
12
|
|
13
13
|
NOTE: 4.2 and 4.5 are supported but database access is very slow on these devices.
|
14
14
|
|
15
15
|
### Windows Mobile
|
16
|
-
Windows Mobile 6.
|
16
|
+
Windows Mobile 6.x Professional, 6.0 Standard
|
17
17
|
|
18
18
|
### Android
|
19
|
-
Android 1
|
19
|
+
Android 2.1 and greater
|
20
20
|
|
21
21
|
### iPhone
|
22
22
|
All versions of iPhone 3.0 or greater, iPad
|
23
23
|
|
24
|
+
### Windows Phone 7
|
25
|
+
Latest Windows Phone devices
|
26
|
+
|
24
27
|
## Rhodes Application
|
25
28
|
|
26
29
|
A Rhodes application is a web application that runs locally on your mobile device. It is implemented with the standard MVC architecture:
|
data/doc/jqt-jqm-transition.txt
CHANGED
@@ -15,15 +15,16 @@ Target platform should be [supported by jQuery Mobile framework](http://jquerymo
|
|
15
15
|
You need to use [Rhodes application template code](https://github.com/rhomobile/rhodes/tree/master/res/generators/templates/application/) (*rhodes_root_dir/res/generators/templates/application*) as the source of files to copy from.
|
16
16
|
|
17
17
|
1. Backup your application as it is before any changes.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
2. Copy all content of *public/jquery* directory to the *public/jquery* directory of your application.
|
19
|
+
3. Copy all content of *public/jqmobile* directory to the *public/jqmobile* directory of your application.
|
20
|
+
4. Copy all content of *public/css* directory to the *public/css* directory of your application.
|
21
|
+
5. Copy all content of *public/js* directory to the *public/js* directory of your application.
|
22
|
+
6. Rename your *app/layout.erb* to some other name, say *app/layout-legacy.erb*.
|
23
|
+
7. Copy *app/layout.erb* file to the *app* directory of your application.
|
24
|
+
8. Replace all instances of **'<%%'** symbol combination in the new *app/layout.erb* to the **'<%'** combination.
|
25
|
+
9. Replace "<%= class_name %>" inside the title tag in the header for the name of your app, ex "My App"
|
26
|
+
10. Use your *app/layout-legacy.erb* as reference to implement needed customization and styling in the *app/layout.erb* file.
|
27
|
+
11. Change the HTML structure of all application pages so they will meet jQuery Mobile requirements (see below).
|
27
28
|
|
28
29
|
### Application pages structure changes
|
29
30
|
|
data/doc/release.txt
CHANGED
@@ -215,7 +215,10 @@ Same procedure as for plug-in
|
|
215
215
|
|
216
216
|
2. Import project into Eclipse (File/Import/'Existing project into Workspace')
|
217
217
|
|
218
|
-
3. Install
|
218
|
+
3. Install additional components
|
219
|
+
|
220
|
+
3.1 DLTK 2.0 (eclipse update site - http://download.eclipse.org/technology/dltk/updates/)
|
221
|
+
3.2 Egit plugin (eclipse update site - http://download.eclipse.org/egit/updates)
|
219
222
|
|
220
223
|
4. Import into workspace DLTK plugins
|
221
224
|
|
@@ -229,6 +232,7 @@ Same procedure as for plug-in
|
|
229
232
|
org.eclipse.dltk.console
|
230
233
|
org.eclipse.dltk.core
|
231
234
|
org.eclipse.dltk.debug.ui
|
235
|
+
org.eclipse.egit.ui
|
232
236
|
|
233
237
|
After import procedure in workspace should appears seven plugin projects.
|
234
238
|
|
@@ -0,0 +1,130 @@
|
|
1
|
+
Rhodes Command Line
|
2
|
+
========
|
3
|
+
This section describes how to use Rhodes from the command line (as opposed to using RhoStudio, an Eclipse-based IDE) to build native mobile apps for all shipping smartphones. Specifically it describes how to write Rhodes controllers and templates and refers to the RhoConnect tutorial on how to write RhoConnect source adapters to sync data from backend apps to the device. The architecture of this is shown [here](https://img.skitch.com/20110111-1snnuchj3ph1hu41cafkb23jng.png).
|
4
|
+
|
5
|
+
Install Rhodes
|
6
|
+
--------------
|
7
|
+
|
8
|
+
Install and Setup Rhodes following instructions [here](install).
|
9
|
+
|
10
|
+
Generating A Rhodes Application
|
11
|
+
-------------------------------
|
12
|
+
The first step is to generate the application and base files. First we will generate an application called StoreManager with the following command:
|
13
|
+
|
14
|
+
:::term
|
15
|
+
$ rhodes app storemanager http://localhost:9292/application
|
16
|
+
|
17
|
+
This will generate an application directory called "storemanager" with several files. Note also that the third argument above is the URL to the RhoConnect server data source (required if you want to do synchronized data as we describe in the next section). Specifically it will set the rhoconfig.txt file to have the following option:
|
18
|
+
|
19
|
+
syncserver = 'http://localhost:9292/application'
|
20
|
+
|
21
|
+
If you do not need synchronized offline data, you can leave the third argument out.
|
22
|
+
|
23
|
+
|
24
|
+
The default home screen of the app is defined in the storemanager/app/index.erb file. You can edit the HTML there to create what your app displays. You can link to other HTML files and ERB files from there with standard HTML techniques. Then you can build your app with rake tasks. For example, to build for the iPhone and run the simulator, type the following commands:
|
25
|
+
|
26
|
+
:::term
|
27
|
+
$ cd storemanager
|
28
|
+
$ rake run:iphone
|
29
|
+
|
30
|
+
<img src="https://s3.amazonaws.com/rhodocs/rhodes-jquerymobile-tutorial/jquerymobile-index-iphone.png" heigth='300' width='200'/>
|
31
|
+
|
32
|
+
To build for other platforms/simulators, you execute the appropriate rake tasks, such as "rake run:bb" to run it on the BlackBerry emulator. To see all possible rake tasks:
|
33
|
+
|
34
|
+
:::term
|
35
|
+
$ rake -T
|
36
|
+
|
37
|
+
Generating Models
|
38
|
+
-----------------
|
39
|
+
|
40
|
+
Now that your app compiles and runs, you can start adding models and controllers. When the model is generated, Rhodes will also create files for a standard UI for displaying and editing the model. This follows the standard model-view-controller paradigm.
|
41
|
+
|
42
|
+
Let's generate a model called "product" and give it some attributes.
|
43
|
+
|
44
|
+
:::term
|
45
|
+
$ cd storemanager
|
46
|
+
$ rhodes model product brand,name,price,quantity,sku
|
47
|
+
Generating with model generator:
|
48
|
+
[ADDED] app/Product/index.erb
|
49
|
+
[ADDED] app/Product/edit.erb
|
50
|
+
[ADDED] app/Product/new.erb
|
51
|
+
[ADDED] app/Product/show.erb
|
52
|
+
[ADDED] app/Product/index.bb.erb
|
53
|
+
[ADDED] app/Product/edit.bb.erb
|
54
|
+
[ADDED] app/Product/new.bb.erb
|
55
|
+
[ADDED] app/Product/show.bb.erb
|
56
|
+
[ADDED] app/Product/product_controller.rb
|
57
|
+
[ADDED] app/Product/product.rb
|
58
|
+
[ADDED] app/test/product_spec.rb
|
59
|
+
|
60
|
+
Editing Rhodes Views
|
61
|
+
--------------------
|
62
|
+
|
63
|
+
You can edit the generated ERB files to customize the HTML as you see fit. Typically you will provide links to the model index page from the home screen. Below is the generated top level index.erb file for the Store Manager app (app/index.erb).
|
64
|
+
|
65
|
+
|
66
|
+
:::ruby
|
67
|
+
<div data-role="page" data-url="<%= Rho::RhoConfig.start_path %>/">
|
68
|
+
|
69
|
+
<div data-role="header" data-position="inline">
|
70
|
+
<h1>Storemanager</h1>
|
71
|
+
<% if SyncEngine::logged_in > 0 %>
|
72
|
+
<a href="<%= url_for :controller => :Settings, :action => :do_sync %>" class="ui-btn-left" data-icon="refresh">Sync</a>
|
73
|
+
<a href="<%= url_for :controller => :Settings, :action => :logout %>" class="ui-btn-right" data-icon="star">Logout</a>
|
74
|
+
<% else %>
|
75
|
+
<a href="<%= url_for :controller => :Settings, :action => :login %>" class="ui-btn-right" data-icon="star">Login</a>
|
76
|
+
<% end %>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div data-role="content">
|
80
|
+
<ul data-role="listview">
|
81
|
+
<li>
|
82
|
+
<a href="#">Add Links Here...</a>
|
83
|
+
</li>
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div data-role="footer" data-position="inline">
|
88
|
+
<p>it is optional part of page..</p>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
To provide a link to the Product model's index page and templates you can replace the list item with the title "Add links here" with:
|
95
|
+
|
96
|
+
:::ruby
|
97
|
+
<li>
|
98
|
+
<a href="Product">Products</a>
|
99
|
+
</li>
|
100
|
+
|
101
|
+
<img src="https://s3.amazonaws.com/rhodocs/rhodes-jquerymobile-tutorial/ipod.png" heigth='300' width='200' />
|
102
|
+
|
103
|
+
|
104
|
+
**NOTE:** You can edit this top level page or any of the other pages with any arbitrary HTML you wish. We don't attempt to teach you HTML or Ruby here but there are many good external references for both topics.
|
105
|
+
|
106
|
+
Doing More With Rhodes
|
107
|
+
----------------------
|
108
|
+
|
109
|
+
See the comprehensive and exhaustive [Rhodes Developer Reference](/rhodes/introduction) for details on all Rhodes capabilities.
|
110
|
+
|
111
|
+
Code samples of each and every Rhodes capability are in the
|
112
|
+
[Rhodes API samples](http://github.com/rhomobile/rhodes-system-api-samples).
|
113
|
+
|
114
|
+
You should take a look at the [Rhodes 2.0 training webinar](http://vimeo.com/channels/rhomobile#12214213).
|
115
|
+
|
116
|
+
There is a [technical FAQ](/faq) that describes how to perform certain specific tasks in Rhodes.
|
117
|
+
|
118
|
+
The following sections describe how to add synchronized data to our app with RhoConnect.
|
119
|
+
|
120
|
+
Adding Synchronized Data to Your App with RhoConnect
|
121
|
+
----------------------------------------------------
|
122
|
+
To add synchronized data to your application, see the [RhoConnect Tutorial](/rhoconnect/tutorial). Also check out the [RhoConnect training video](http://vimeo.com/channels/rhomobile#28789274).
|
123
|
+
|
124
|
+
More Info
|
125
|
+
---------
|
126
|
+
There are training webinars on various Rhomobile related topics held weekly. Videos of these are on [the Rhomobile Vimeo channel](http://vimeo.com/channels/rhomobile).
|
127
|
+
|
128
|
+
There is also the following [book on Rhomobile](http://www.apress.com/book/view/9781430228684).
|
129
|
+
|
130
|
+
For more questions, [write to us](mailto:info@rhomobile.com) or join the [Rhomobile Google Group](http://groups.google.com/group/rhomobile) and post.
|
data/doc/rhom.txt
CHANGED
@@ -444,13 +444,12 @@ Calls `find` with a limit on the # of records. This emulates rails' classic pag
|
|
444
444
|
:order => 'name'
|
445
445
|
) #=> you can have :conditions and :order as well
|
446
446
|
|
447
|
-
### `sync(callback
|
447
|
+
### `sync(callback, callback_data, show_status_popup, query_params)`
|
448
448
|
Start the sync process for a model. If the callback is set, `SyncEngine.set_notification` is called before `SyncEngine.dosync`.
|
449
|
-
query_params will pass to sync server
|
449
|
+
query_params (this is optional) will pass to sync server. The query_params value must be URL encoded. In this example, the value for @params["sku"] -- the value of the sku -- must be URL encoded.
|
450
450
|
|
451
451
|
:::ruby
|
452
|
-
|
453
|
-
Account.sync( url_for(:action => :sync_callback), "", false, "param1=123¶m2=abc" )
|
452
|
+
Product.sync( url_for(:action => :sync_callback), "", false, "query=#{@params["sku"]}" )
|
454
453
|
|
455
454
|
### `set_notification(url, params = nil)`
|
456
455
|
Set a notification to be called when the sync is complete for this model. This is useful for example if you want to refresh the current list page or display an alert when new data is synchronized. See the [sync notification docs](/rhodes/synchronization#notifications) for more information.
|
@@ -520,12 +519,16 @@ Assigns the [metadata](/rhoconnect/metadata) for a given model.
|
|
520
519
|
|
521
520
|
:::ruby
|
522
521
|
Product.metadata = { 'foo' => 'bar' }.to_json
|
523
|
-
|
524
522
|
|
525
523
|
## Associations
|
526
|
-
For sync-enabled models, Rhom offers associations as a means to automatically trigger sync updates for dependent objects. This is useful where you have relationships between backend service objects.
|
527
524
|
|
528
|
-
|
525
|
+
Rhom does not support Ruby on Rails associations. However, Rhom has a [sync association](/rhodes/rhom#sync-associations) called `belongs_to` which you can use to trigger updates on sync-enabled models.
|
526
|
+
|
527
|
+
## Sync Associations
|
528
|
+
|
529
|
+
For sync-enabled models, Rhom has a `belongs_to` sync association as a means to automatically trigger sync updates for dependent objects. This is useful where you have relationships between backend service objects.
|
530
|
+
|
531
|
+
For example, you can have a list of customers who have purchased a product, and thus you can have them belong to that product:
|
529
532
|
|
530
533
|
:::ruby
|
531
534
|
class Customer
|
@@ -535,7 +538,7 @@ For example, you can have a list of customers who have purchased a product:
|
|
535
538
|
belongs_to :product_id, 'Product'
|
536
539
|
end
|
537
540
|
|
538
|
-
In your `product_controller.rb`, assign the
|
541
|
+
In your `product_controller.rb`, assign the `belongs_to` attribute when a product is created:
|
539
542
|
|
540
543
|
:::ruby
|
541
544
|
def create
|
@@ -548,7 +551,7 @@ In your `product_controller.rb`, assign the `:belongs_to` attribute when a produ
|
|
548
551
|
redirect :action => :index
|
549
552
|
end
|
550
553
|
|
551
|
-
You can also define polymorphic associations, or associations across multiple classes.
|
554
|
+
You can also define polymorphic sync associations, or sync associations across multiple classes.
|
552
555
|
|
553
556
|
Using array notation:
|
554
557
|
|
@@ -561,9 +564,11 @@ Or multiple declarations:
|
|
561
564
|
belongs_to :parent_id, 'Product'
|
562
565
|
belongs_to :parent_id, 'Cases'
|
563
566
|
|
564
|
-
|
565
567
|
**NOTE: After a new product is created, the `:product_id` for the `Customer` records will be updated to the new value.**
|
566
568
|
|
569
|
+
If you are planning to use bulk sync feature for your associated models, then you should take into consideration
|
570
|
+
corresponding support on RhoConnect server side. See [RhoConnect Bulk Sync associations](/rhoconnect/bulk-sync#bulk-sync-associations).
|
571
|
+
|
567
572
|
## Freezed models
|
568
573
|
If you want to limit model attributes by specific list - you can 'freeze' model:
|
569
574
|
|
@@ -593,7 +598,7 @@ For such models if you try to add not listed property - you will get ArgumentErr
|
|
593
598
|
obj.update_attributes(:wrong_address => 'test') #will raise ArgumentError exception
|
594
599
|
|
595
600
|
|
596
|
-
NOTE: FixedSchema models 'freezed' by default
|
601
|
+
**NOTE: FixedSchema models are 'freezed' by default.**
|
597
602
|
|
598
603
|
|
599
604
|
## Accessing Sync Info with RhomSource
|
data/doc/rhostudio-eclipse.txt
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
Installing RhoStudio as an Eclipse Plugin
|
2
2
|
==============
|
3
3
|
|
4
|
-
RhoStudio, which facilitates development of native smartphone applications, can be installed into Eclipse
|
4
|
+
RhoStudio, which facilitates development of native smartphone applications, can be installed into Eclipse as a plug-in.
|
5
5
|
|
6
6
|
Prerequisites
|
7
7
|
----------------
|
8
8
|
You need to have installed:
|
9
9
|
|
10
10
|
* Java Runtime Environment, minimum of Java 5 JRE or JDK.
|
11
|
-
* [Rhodes gem](install#rhodes-
|
12
|
-
* For RhoConnect, you also need the [RhoConnect gem](/rhoconnect/install#rhoconnect-
|
11
|
+
* [Rhodes gem](/install#installing-rhodes-from-the-command-line).
|
12
|
+
* For RhoConnect, you also need the [RhoConnect gem](/rhoconnect/install#installing-rhoconnect-from-the-command-line).
|
13
13
|
|
14
14
|
Checking the Eclipse Installation
|
15
15
|
----------------
|
data/doc/simulator.txt
CHANGED
@@ -4,14 +4,10 @@ RhoSimulator allows to [run](#run-application-in-rhosimulator) Rhodes applicatio
|
|
4
4
|
|
5
5
|
## Install RhoSimulator
|
6
6
|
|
7
|
-
If you have [Rhodes gem](install#rhodes-
|
8
|
-
(Note: If you're going to use RhoSimulator from rhodes-3.1.0 gem on Mac, you need to put missing Qt libraries
|
9
|
-
(QtDBus.framework and QtXml.framework) from [RhoSimulator31Mac_fix.zip](http://rhosimulator.s3.amazonaws.com/RhoSimulator31Mac_fix.zip)
|
10
|
-
to 'platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks' folder within rhodes SDK home directory,
|
11
|
-
e.g. '/Library/Ruby/Gems/1.8/gems/rhodes-3.1.0/')
|
7
|
+
If you have [Rhodes gem](/install#installing-rhodes-from-the-command-line), then RhoSimulator is installed already.
|
12
8
|
|
13
9
|
If you would like to run RhoSimulator without Rhodes gem, download [Windows](http://rhosimulator.s3.amazonaws.com/RhoSimulator.zip) or
|
14
|
-
[Mac OS X](http://rhosimulator.s3.amazonaws.com/
|
10
|
+
[Mac OS X](http://rhosimulator.s3.amazonaws.com/RhoSimulator.tbz2) version, extract it and specify path to `rhosimulator.exe` or `RhoSimulator.app` respectively at `rhodes/rhobuild.yml`:
|
15
11
|
|
16
12
|
env:
|
17
13
|
paths:
|
@@ -70,49 +66,51 @@ Follow these instructions to build your own customized version of RhoSimulator.
|
|
70
66
|
|
71
67
|
### Preliminary steps for Windows
|
72
68
|
|
73
|
-
* Currently only <b>Visual Studio
|
69
|
+
* Currently only <b>Visual Studio 2008</b> is supported
|
74
70
|
* Follow [Build for Windows - Prerequisites](build#build-for-windows), but do not install the Rhodes gem since you're going to use Rhodes SDK source.
|
75
71
|
* Get the `rhodes` source (if haven't done it already) as described [here](build#setup-rhodes-source-code). Don't forget to add the `bin` folder to your path, run `rhodes-setup` and update Rhodes SDK path in `build.yml` at your application root folder.
|
76
|
-
* First build the Qt libraries for VS
|
72
|
+
* First build the Qt libraries for VS 2008:
|
77
73
|
* Download the Qt source:
|
78
74
|
* Go to [http://qt.nokia.com/downloads](http://qt.nokia.com/downloads)
|
79
75
|
* Jump to `Qt libraries`
|
80
|
-
* Download the [source code as a zip](http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.zip) (
|
81
|
-
* Extract the downloaded archive, e.g. into `C:\Qt\4.7.4
|
76
|
+
* Download the [source code as a zip](http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.zip) (237 MB)
|
77
|
+
* Extract the downloaded archive, e.g. into `C:\Qt\4.7.4`
|
82
78
|
* Prepare to build the OpenSSL library:
|
83
|
-
* Download [
|
79
|
+
* Download [v1.0 source code](http://www.openssl.org/source/openssl-1.0.1.tar.gz) from [www.openssl.org](http://www.openssl.org/) and extract the downloaded archive, e.g. into `C:\Qt\openssl-1.0.1`
|
84
80
|
* Install Perl interpreter (if it's not installed yet), e.g. [ActiveState Perl](http://www.activestate.com/activeperl)
|
81
|
+
* Install [Netwide Assembler (NASM)](http://www.nasm.us/pub/nasm/releasebuilds/2.10/win32/nasm-2.10-installer.exe) from [www.nasm.us](http://www.nasm.us/) (if it's not installed yet)
|
85
82
|
* Open Control Panel » System » Advanced system settings » Environment Variables and then:
|
86
|
-
* Create new system variable `QTDIR` = `C:\Qt\4.7.4
|
87
|
-
* Add to the `PATH` variable: `C:\Qt\4.7.4
|
83
|
+
* Create new system variable `QTDIR` = `C:\Qt\4.7.4`
|
84
|
+
* Add to the `PATH` variable: `C:\Qt\4.7.4\bin;C:\Qt\openssl-1.0.1\bin` (it doesn't matter that `C:\Qt\openssl-1.0.1\bin` folder does not exist yet)
|
85
|
+
* Add to the `PATH` variable the path to `nasm.exe` (usually `C:\Program Files\nasm`)
|
88
86
|
* Either close all command prompts and Visual Studio instances, or reboot the computer so the new settings take effect.
|
89
|
-
* Open Visual Studio
|
87
|
+
* Open Visual Studio 2008 Command Prompt. This is accomplished using Start » All Programs » Microsoft Visual Studio 2008 » Visual Studio Tools » Visual Studio 2008 Command Prompt. Run in Visual Studio 2008 Command Prompt:
|
90
88
|
|
91
89
|
> vcvarsall.bat x86
|
92
90
|
> C:
|
93
91
|
|
94
92
|
* To build OpenSSL library run in the same command prompt:
|
95
93
|
|
96
|
-
> cd \Qt\openssl-0.
|
97
|
-
> perl Configure VC-WIN32 --prefix=C:/Qt/openssl-0.
|
98
|
-
> ms\
|
94
|
+
> cd \Qt\openssl-1.0.1
|
95
|
+
> perl Configure VC-WIN32 enable-static-engine --prefix=C:/Qt/openssl-1.0.1
|
96
|
+
> ms\do_nasm
|
99
97
|
> nmake -f ms\ntdll.mak
|
100
98
|
> nmake -f ms\ntdll.mak install
|
101
99
|
> nmake -f ms\ntdll.mak clean
|
102
100
|
|
103
101
|
* To build Qt library run in the same command prompt:
|
104
102
|
|
105
|
-
> cd \Qt\4.7.4
|
106
|
-
> configure -opensource -platform win32-
|
103
|
+
> cd \Qt\4.7.4
|
104
|
+
> configure -opensource -platform win32-msvc2008
|
107
105
|
-nomake examples -nomake demos -nomake docs
|
108
|
-
-qt-libpng -qt-libjpeg -qt-libtiff -qt-
|
109
|
-
-openssl-linked -I C:/Qt/openssl-0.
|
110
|
-
-L C:/Qt/openssl-0.
|
106
|
+
-qt-libpng -qt-libjpeg -qt-libtiff -qt-libmng -qt-gif
|
107
|
+
-openssl-linked -I C:/Qt/openssl-1.0.1/include
|
108
|
+
-L C:/Qt/openssl-1.0.1/lib
|
111
109
|
> nmake
|
112
110
|
> nmake clean
|
113
111
|
|
114
112
|
Be aware that it will take a while to build the Qt libraries from sources (maybe few hours or so). Particularly the `configure` command may run for a few minutes, and the `nmake` command may run for a few hours.
|
115
|
-
* After the build process is completed exit Visual Studio
|
113
|
+
* After the build process is completed exit Visual Studio 2008 Command Prompt
|
116
114
|
|
117
115
|
### Preliminary steps for Mac OS X
|
118
116
|
|
@@ -122,8 +120,8 @@ Follow these instructions to build your own customized version of RhoSimulator.
|
|
122
120
|
* Download the Qt source:
|
123
121
|
* Go to [http://qt.nokia.com/downloads](http://qt.nokia.com/downloads)
|
124
122
|
* Jump to `Qt libraries`
|
125
|
-
* Download the [source code as a
|
126
|
-
* Extract the downloaded archive, e.g. into `~/
|
123
|
+
* Download the [source code as a gzipped tar](http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.8.1.tar.gz) (229 MB)
|
124
|
+
* Extract the downloaded archive, e.g. into `~/qt-4.8.1`
|
127
125
|
* Make sure that your `PATH` environment variable does not contain the path to any previously installed Qt binaries
|
128
126
|
* Add to your `~/.profile` the new environment variable `QTDIR` by adding the line (or by changing the existing `QTDIR` variable):
|
129
127
|
|
@@ -131,12 +129,11 @@ Follow these instructions to build your own customized version of RhoSimulator.
|
|
131
129
|
|
132
130
|
* Open `Terminal.app` and issue commands:
|
133
131
|
|
134
|
-
$ cd ~/
|
135
|
-
$ make confclean
|
132
|
+
$ cd ~/qt-4.8.1
|
136
133
|
$ ./configure -opensource -platform macx-g++
|
137
134
|
-nomake examples -nomake demos -nomake docs
|
138
|
-
-qt-libpng -qt-libjpeg -qt-libtiff -qt-
|
139
|
-
-prefix /Developer/SDKs/Qt -release
|
135
|
+
-qt-libpng -qt-libjpeg -qt-libtiff -qt-libmng
|
136
|
+
-webkit -prefix /Developer/SDKs/Qt -release
|
140
137
|
$ make
|
141
138
|
$ sudo make install
|
142
139
|
|
@@ -160,10 +157,10 @@ When you've finished all the preliminary steps for your OS, the only thing you n
|
|
160
157
|
|
161
158
|
To run Rhodes applications in the custom built RhoSimulator, please ensure that no `env:` » `paths:` » `rhosimulator:` line is present at your `rhobuild.yml` (if present, remove that line).
|
162
159
|
|
163
|
-
### Build RhoSimulator for Windows in Visual Studio
|
160
|
+
### Build RhoSimulator for Windows in Visual Studio 2008:
|
164
161
|
|
165
162
|
* Open the solution:
|
166
|
-
`C:\Rhomobile\rhodes\platform\wm\rhodes
|
163
|
+
`C:\Rhomobile\rhodes\platform\wm\rhodes.sln`
|
167
164
|
* Build solution for the configuration `SimulatorRelease|Win32`
|
168
165
|
* Specify the path to custom built RhoSimulator at `rhobuild.yml`:
|
169
166
|
env:
|
@@ -0,0 +1,246 @@
|
|
1
|
+
# SyncEngine AJAX API
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
SyncEngine AJAX API provides ability for HTML/javascript based application to control SyncEngine using AJAX calls.
|
5
|
+
It is implemented as a plain javascript library which doesn't require to use any side libraries or frameworks.
|
6
|
+
|
7
|
+
NOTE: It is just for SyncEngine control and at the moment it doesn't provide any methods to read or manipulate stored objects.
|
8
|
+
|
9
|
+
## Sample project
|
10
|
+
|
11
|
+
[Rhodes API samples](http://github.com/rhomobile/rhodes-system-api-samples) has [SyncEngine AJAX API demo code](https://github.com/rhomobile/rhodes-system-api-samples/tree/master/app/SyncengineJs).
|
12
|
+
|
13
|
+
## Usage sample code
|
14
|
+
|
15
|
+
:::html
|
16
|
+
<!DOCTYPE html>
|
17
|
+
<html>
|
18
|
+
<head><title>SyncEngine AJAX API sample</title>
|
19
|
+
<script src="/public/js/syncengine.js" type="text/javascript"></script>
|
20
|
+
|
21
|
+
<script type="text/javascript">
|
22
|
+
function put(msg, container) {
|
23
|
+
document.getElementById(container).innerHTML = msg;
|
24
|
+
}
|
25
|
+
api = window.Rho.syncengine;
|
26
|
+
</script>
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
API functions tests:
|
31
|
+
<ul>
|
32
|
+
<li>
|
33
|
+
<a href="#" onclick="api.set_syncserver('http://some.server.url', function(res){put(res, 'result_set_syncserver');}); return false;">
|
34
|
+
set_syncserver('http://rhodes-samples-server.heroku.com/application')</a>
|
35
|
+
<span id="result_set_syncserver"></span>
|
36
|
+
</li>
|
37
|
+
|
38
|
+
<li>
|
39
|
+
<a href="#" onclick="api.set_pollinterval(60, function(res){put(res, 'result_set_pollinterval');}); return false;">
|
40
|
+
set_pollinterval(60)</a>
|
41
|
+
<span id="result_set_pollinterval"></span>
|
42
|
+
</li>
|
43
|
+
|
44
|
+
<li>
|
45
|
+
<a href="#" onclick="api.get_pollinterval(function(res){put(res, 'result_get_pollinterval');}); return false;">
|
46
|
+
get_pollinterval()</a>
|
47
|
+
<span id="result_get_pollinterval"></span>
|
48
|
+
</li>
|
49
|
+
|
50
|
+
<li>
|
51
|
+
<a href="#" onclick="api.login('abc', '123', function(result){alert(result);} ,function(res){put(res, 'result_login');}); return false;">
|
52
|
+
login('abc', '123', '')</a>
|
53
|
+
<span id="result_login"></span>
|
54
|
+
</li>
|
55
|
+
|
56
|
+
<li>
|
57
|
+
<a href="#" onclick="api.logged_in(function(res){put(res, 'result_logged_in');}); return false;">
|
58
|
+
logged_in()</a>
|
59
|
+
<span id="result_logged_in"></span>
|
60
|
+
</li>
|
61
|
+
|
62
|
+
<li>
|
63
|
+
<a href="#" onclick="api.logout(function(res){put(res, 'result_logout');}); return false;">
|
64
|
+
logout()</a>
|
65
|
+
<span id="result_logout"></span>
|
66
|
+
</li>
|
67
|
+
|
68
|
+
<li>
|
69
|
+
<a href="#" onclick="api.dosync(false, '', function(res){put(res, 'result_dosync');}); return false;">
|
70
|
+
dosync()</a>
|
71
|
+
<span id="result_dosync"></span>
|
72
|
+
</li>
|
73
|
+
|
74
|
+
<li>
|
75
|
+
<a href="#" onclick="api.dosync_source('Metadata', false, '', function(res){put(res, 'result_dosync_source');}); return false;">
|
76
|
+
dosync_source('Metadata')</a>
|
77
|
+
<span id="result_dosync_source"></span>
|
78
|
+
</li>
|
79
|
+
|
80
|
+
<li>
|
81
|
+
<a href="#" onclick="api.is_syncing(function(res){put(res, 'result_is_syncing');}); return false;">
|
82
|
+
is_syncing()</a>
|
83
|
+
<span id="result_is_syncing"></span>
|
84
|
+
</li>
|
85
|
+
|
86
|
+
<li>
|
87
|
+
<a href="#" onclick="api.stop_sync(function(res){put(res, 'result_stop_sync');}); return false;">
|
88
|
+
stop_sync()</a>
|
89
|
+
<span id="result_stop_sync"></span>
|
90
|
+
</li>
|
91
|
+
</ul>
|
92
|
+
|
93
|
+
</body>
|
94
|
+
</html>
|
95
|
+
|
96
|
+
|
97
|
+
## API reference
|
98
|
+
|
99
|
+
All API methods are defined in the *Rho.syncengine* namespace. Each method is accessible in javascript as *window.Rho.syncengine.method_name*.
|
100
|
+
Each API method receives callback functions as two last parameters, those are:
|
101
|
+
|
102
|
+
* success - Success handler function. Paremeters are:
|
103
|
+
* result - String value with AJAX response. Contains just "ok" value if different behavior is not described for exact API method as *RETURNED* value.
|
104
|
+
* status - Number value with HTTP response status
|
105
|
+
* xhr - XmlHttpRequest object associated with response
|
106
|
+
|
107
|
+
* error - Error and timeout handler function. Parameters are:
|
108
|
+
* message - String with error message if any. May be empty or null.
|
109
|
+
* status - String with "error" or "timeout" values possible
|
110
|
+
* xhr - XmlHttpRequest object associated with error or timeout
|
111
|
+
|
112
|
+
They are the same for every API method and will not be explained for each method description.
|
113
|
+
|
114
|
+
### set_threaded_mode
|
115
|
+
:::cplusplus
|
116
|
+
set_threaded_mode(/*boolean*/ threaded, /*function*/ success, /*function*/ error);
|
117
|
+
Where:
|
118
|
+
|
119
|
+
* threaded - Boolean value, it defines is threaded mode is used. By default SyncEngine works in threaded mode.
|
120
|
+
|
121
|
+
### enable_status_popup
|
122
|
+
:::cplusplus
|
123
|
+
enable_status_popup(/*boolean*/ enable, /*function*/ success, /*function*/ error);
|
124
|
+
Where:
|
125
|
+
|
126
|
+
* enable - Boolean value, it defines are UI status pop-ups enabled or disabled.
|
127
|
+
|
128
|
+
### set_ssl_verify_peer
|
129
|
+
:::cplusplus
|
130
|
+
set_ssl_verify_peer(/*boolean*/ verify, /*function*/ success, /*function*/ error);
|
131
|
+
Where:
|
132
|
+
|
133
|
+
* verify - Boolean value, it defines will SSL peers verification be performed or not.
|
134
|
+
|
135
|
+
### register_push
|
136
|
+
It register device on push server for push notifications. Have no control parameters, just result handlers.
|
137
|
+
:::cplusplus
|
138
|
+
register_push(/*function*/ success, /*function*/ error);
|
139
|
+
|
140
|
+
### set_syncserver
|
141
|
+
:::cplusplus
|
142
|
+
set_syncserver(/*string*/ syncserver, /*function*/ success, /*function*/ error);
|
143
|
+
Where:
|
144
|
+
|
145
|
+
* syncserver - String value with a new URL of synchronization server to be used.
|
146
|
+
|
147
|
+
### set_pollinterval
|
148
|
+
:::cplusplus
|
149
|
+
set_pollinterval(/*number*/ interval, /*function*/ success, /*function*/ error);
|
150
|
+
Where:
|
151
|
+
|
152
|
+
* interval - Number value with a new poll interval.
|
153
|
+
* RETURNED - String with an old value of poll interval.
|
154
|
+
|
155
|
+
### get_pollinterval
|
156
|
+
:::cplusplus
|
157
|
+
get_pollinterval(/*function*/ success, /*function*/ error);
|
158
|
+
Where:
|
159
|
+
|
160
|
+
* RETURNED - String with a value of poll interval.
|
161
|
+
|
162
|
+
### set_pagesize
|
163
|
+
:::cplusplus
|
164
|
+
set_pagesize(/*number*/ size, /*function*/ success, /*function*/ error);
|
165
|
+
Where:
|
166
|
+
|
167
|
+
* size - Number value with a new sync page size.
|
168
|
+
* RETURNED - String with an old value of sync page size.
|
169
|
+
|
170
|
+
### get_pagesize
|
171
|
+
:::cplusplus
|
172
|
+
get_pagesize(/*function*/ success, /*function*/ error);
|
173
|
+
Where:
|
174
|
+
|
175
|
+
* RETURNED - String with a value of sync page size.
|
176
|
+
|
177
|
+
### set_objectnotify
|
178
|
+
This method make it possible to set handler function to watch for changes in exact object during synchronization process.
|
179
|
+
:::cplusplus
|
180
|
+
set_objectnotify(/*function*/ notify, /*function*/ success, /*function*/ error);
|
181
|
+
Where:
|
182
|
+
|
183
|
+
* notify - Object changes notification handler function. Parameters are:
|
184
|
+
* objectNotifyQuery - String value with URL-encoded parameters for changed object.
|
185
|
+
|
186
|
+
### clean_objectnotify
|
187
|
+
This method cleans all object notifications.
|
188
|
+
:::cplusplus
|
189
|
+
clean_objectnotify(/*function*/ success, /*function*/ error);
|
190
|
+
|
191
|
+
### login
|
192
|
+
This method makes user logged in.
|
193
|
+
:::cplusplus
|
194
|
+
login(/*string*/ login, /*string*/ password, /*function*/ callback, /*function*/ success, /*function*/ error)
|
195
|
+
Where:
|
196
|
+
|
197
|
+
* login - String value with login.
|
198
|
+
* password - String value with password.
|
199
|
+
* callback - Login status callback handler function. Parameters are:
|
200
|
+
* loginStatusQuery - String value with URL-encoded parameters of login status.
|
201
|
+
|
202
|
+
### logged_in
|
203
|
+
This methods checks if user is logged in.
|
204
|
+
:::cplusplus
|
205
|
+
logged_in(/*function*/ success, /*function*/ error);
|
206
|
+
Where:
|
207
|
+
|
208
|
+
* RETURNED - String with a "true" or "false" value.
|
209
|
+
|
210
|
+
### logout
|
211
|
+
This method makes user logged out.
|
212
|
+
:::cplusplus
|
213
|
+
logout(/*function*/ success, /*function*/ error);
|
214
|
+
|
215
|
+
### dosync
|
216
|
+
This method runs synchronization for all sources.
|
217
|
+
:::cplusplus
|
218
|
+
dosync(/*bool*/ show_status_popup, /*string*/ query_params, /*function*/ success, /*function*/ error);
|
219
|
+
Where:
|
220
|
+
|
221
|
+
* show_status_popup - Boolean value, it defines are UI status pop-ups enabled or disabled.
|
222
|
+
* query_params - String with synchronization query parameters
|
223
|
+
|
224
|
+
### dosync_source
|
225
|
+
This method runs synchronization for exact named source.
|
226
|
+
:::cplusplus
|
227
|
+
dosync_source(/*string*/ srcName, /*bool*/ show_status_popup, /*string*/ query_params, /*function*/ success, /*function*/ error);
|
228
|
+
Where:
|
229
|
+
|
230
|
+
* srcName - String value with exact source name.
|
231
|
+
* show_status_popup - Boolean value, it defines are UI status pop-ups enabled or disabled.
|
232
|
+
* query_params - String with synchronization query parameters
|
233
|
+
|
234
|
+
### is_syncing
|
235
|
+
This methods checks if synchronization still in a progress.
|
236
|
+
:::cplusplus
|
237
|
+
is_syncing(/*function*/ success, /*function*/ error);
|
238
|
+
Where:
|
239
|
+
|
240
|
+
* RETURNED - String with a "true" or "false" value.
|
241
|
+
|
242
|
+
### stop_sync
|
243
|
+
This method stops synchronization process.
|
244
|
+
:::cplusplus
|
245
|
+
stop_sync(/*function*/ success, /*function*/ error);
|
246
|
+
|