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
@@ -0,0 +1,146 @@
|
|
1
|
+
#--
|
2
|
+
# Transaction::Simple
|
3
|
+
# Simple object transaction support for Ruby
|
4
|
+
# http://rubyforge.org/projects/trans-simple/
|
5
|
+
# Version 1.4.0
|
6
|
+
#
|
7
|
+
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
|
+
# distribution for full licensing information.
|
9
|
+
#
|
10
|
+
# Copyright (c) 2003 - 2007 Austin Ziegler
|
11
|
+
#
|
12
|
+
# $Id: group.rb 47 2007-02-03 15:02:51Z austin $
|
13
|
+
#++
|
14
|
+
require 'transaction/simple'
|
15
|
+
|
16
|
+
# A transaction group is an object wrapper that manages a group of objects
|
17
|
+
# as if they were a single object for the purpose of transaction
|
18
|
+
# management. All transactions for this group of objects should be
|
19
|
+
# performed against the transaction group object, not against individual
|
20
|
+
# objects in the group.
|
21
|
+
#
|
22
|
+
# == Transaction Group Usage
|
23
|
+
# require 'transaction/simple/group'
|
24
|
+
#
|
25
|
+
# x = "Hello, you."
|
26
|
+
# y = "And you, too."
|
27
|
+
#
|
28
|
+
# g = Transaction::Simple::Group.new(x, y)
|
29
|
+
# g.start_transaction(:first) # -> [ x, y ]
|
30
|
+
# g.transaction_open?(:first) # -> true
|
31
|
+
# x.transaction_open?(:first) # -> true
|
32
|
+
# y.transaction_open?(:first) # -> true
|
33
|
+
#
|
34
|
+
# x.gsub!(/you/, "world") # -> "Hello, world."
|
35
|
+
# y.gsub!(/you/, "me") # -> "And me, too."
|
36
|
+
#
|
37
|
+
# g.start_transaction(:second) # -> [ x, y ]
|
38
|
+
# x.gsub!(/world/, "HAL") # -> "Hello, HAL."
|
39
|
+
# y.gsub!(/me/, "Dave") # -> "And Dave, too."
|
40
|
+
# g.rewind_transaction(:second) # -> [ x, y ]
|
41
|
+
# x # -> "Hello, world."
|
42
|
+
# y # -> "And me, too."
|
43
|
+
#
|
44
|
+
# x.gsub!(/world/, "HAL") # -> "Hello, HAL."
|
45
|
+
# y.gsub!(/me/, "Dave") # -> "And Dave, too."
|
46
|
+
#
|
47
|
+
# g.commit_transaction(:second) # -> [ x, y ]
|
48
|
+
# x # -> "Hello, HAL."
|
49
|
+
# y # -> "And Dave, too."
|
50
|
+
#
|
51
|
+
# g.abort_transaction(:first) # -> [ x, y ]
|
52
|
+
# x = -> "Hello, you."
|
53
|
+
# y = -> "And you, too."
|
54
|
+
class Transaction::Simple::Group
|
55
|
+
# Creates a transaction group for the provided objects. If a block is
|
56
|
+
# provided, the transaction group object is yielded to the block; when
|
57
|
+
# the block is finished, the transaction group object will be cleared
|
58
|
+
# with #clear.
|
59
|
+
def initialize(*objects)
|
60
|
+
@objects = objects || []
|
61
|
+
@objects.freeze
|
62
|
+
@objects.each { |obj| obj.extend(Transaction::Simple) }
|
63
|
+
|
64
|
+
if block_given?
|
65
|
+
begin
|
66
|
+
yield self
|
67
|
+
ensure
|
68
|
+
self.clear
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Returns the objects that are covered by this transaction group.
|
74
|
+
attr_reader :objects
|
75
|
+
|
76
|
+
# Clears the object group. Removes references to the objects so that
|
77
|
+
# they can be garbage collected.
|
78
|
+
def clear
|
79
|
+
@objects = @objects.dup.clear
|
80
|
+
end
|
81
|
+
|
82
|
+
# Tests to see if all of the objects in the group have an open
|
83
|
+
# transaction. See Transaction::Simple#transaction_open? for more
|
84
|
+
# information.
|
85
|
+
def transaction_open?(name = nil)
|
86
|
+
@objects.inject(true) do |val, obj|
|
87
|
+
val = val and obj.transaction_open?(name)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Returns the current name of the transaction for the group.
|
92
|
+
# Transactions not explicitly named are named +nil+.
|
93
|
+
def transaction_name
|
94
|
+
@objects[0].transaction_name
|
95
|
+
end
|
96
|
+
|
97
|
+
# Starts a transaction for the group. Stores the current object state.
|
98
|
+
# If a transaction name is specified, the transaction will be named.
|
99
|
+
# Transaction names must be unique. Transaction names of +nil+ will be
|
100
|
+
# treated as unnamed transactions.
|
101
|
+
def start_transaction(name = nil)
|
102
|
+
@objects.each { |obj| obj.start_transaction(name) }
|
103
|
+
end
|
104
|
+
|
105
|
+
# Rewinds the transaction. If +name+ is specified, then the intervening
|
106
|
+
# transactions will be aborted and the named transaction will be
|
107
|
+
# rewound. Otherwise, only the current transaction is rewound.
|
108
|
+
def rewind_transaction(name = nil)
|
109
|
+
@objects.each { |obj| obj.rewind_transaction(name) }
|
110
|
+
end
|
111
|
+
|
112
|
+
# Aborts the transaction. Resets the object state to what it was before
|
113
|
+
# the transaction was started and closes the transaction. If +name+ is
|
114
|
+
# specified, then the intervening transactions and the named transaction
|
115
|
+
# will be aborted. Otherwise, only the current transaction is aborted.
|
116
|
+
#
|
117
|
+
# If the current or named transaction has been started by a block
|
118
|
+
# (Transaction::Simple.start), then the execution of the block will be
|
119
|
+
# halted with +break+ +self+.
|
120
|
+
def abort_transaction(name = nil)
|
121
|
+
@objects.each { |obj| obj.abort_transaction(name) }
|
122
|
+
end
|
123
|
+
|
124
|
+
# If +name+ is +nil+ (default), the current transaction level is closed
|
125
|
+
# out and the changes are committed.
|
126
|
+
#
|
127
|
+
# If +name+ is specified and +name+ is in the list of named
|
128
|
+
# transactions, then all transactions are closed and committed until the
|
129
|
+
# named transaction is reached.
|
130
|
+
def commit_transaction(name = nil)
|
131
|
+
@objects.each { |obj| obj.commit_transaction(name) }
|
132
|
+
end
|
133
|
+
|
134
|
+
# Alternative method for calling the transaction methods. An optional
|
135
|
+
# name can be specified for named transaction support.
|
136
|
+
#
|
137
|
+
# #transaction(:start):: #start_transaction
|
138
|
+
# #transaction(:rewind):: #rewind_transaction
|
139
|
+
# #transaction(:abort):: #abort_transaction
|
140
|
+
# #transaction(:commit):: #commit_transaction
|
141
|
+
# #transaction(:name):: #transaction_name
|
142
|
+
# #transaction:: #transaction_open?
|
143
|
+
def transaction(action = nil, name = nil)
|
144
|
+
@objects.each { |obj| obj.transaction(action, name) }
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
#--
|
2
|
+
# Transaction::Simple
|
3
|
+
# Simple object transaction support for Ruby
|
4
|
+
# http://rubyforge.org/projects/trans-simple/
|
5
|
+
# Version 1.4.0
|
6
|
+
#
|
7
|
+
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
|
+
# distribution for full licensing information.
|
9
|
+
#
|
10
|
+
# Copyright (c) 2003 - 2007 Austin Ziegler
|
11
|
+
#
|
12
|
+
# $Id: threadsafe.rb 50 2007-02-03 20:26:19Z austin $
|
13
|
+
#++
|
14
|
+
require 'transaction/simple'
|
15
|
+
require 'thread'
|
16
|
+
|
17
|
+
module Transaction
|
18
|
+
# A standard exception for transaction errors involving threadsafe
|
19
|
+
# transactions.
|
20
|
+
class TransactionThreadError < TransactionError; end
|
21
|
+
end
|
22
|
+
|
23
|
+
# = Transaction::Simple::ThreadSafe
|
24
|
+
# Thread-safe simple object transaction support for Ruby.
|
25
|
+
# Transaction::Simple::ThreadSafe is used in the same way as
|
26
|
+
# Transaction::Simple. Transaction::Simple::ThreadSafe uses a Mutex object
|
27
|
+
# to ensure atomicity at the cost of performance in threaded applications.
|
28
|
+
#
|
29
|
+
# Transaction::Simple::ThreadSafe will not wait to obtain a lock; if the
|
30
|
+
# lock cannot be obtained immediately, a
|
31
|
+
# Transaction::TransactionThreadError will be raised.
|
32
|
+
#
|
33
|
+
# Thanks to Mauricio Fernandez for help with getting this part working.
|
34
|
+
#
|
35
|
+
# Threadsafe transactions can be used in any place that normal
|
36
|
+
# transactions would. The main difference would be in setup:
|
37
|
+
#
|
38
|
+
# require 'transaction/simple/threadsafe'
|
39
|
+
#
|
40
|
+
# x = "Hello, you."
|
41
|
+
# x.extend(Transaction::Simple::ThreadSafe) # Threadsafe
|
42
|
+
#
|
43
|
+
# y = "Hello, you."
|
44
|
+
# y.extend(Transaction::Simple) # Not threadsafe
|
45
|
+
module Transaction::Simple::ThreadSafe
|
46
|
+
include Transaction::Simple
|
47
|
+
|
48
|
+
SKIP_TRANSACTION_VARS = Transaction::Simple::SKIP_TRANSACTION_VARS.dup #:nodoc:
|
49
|
+
SKIP_TRANSACTION_VARS << "@__transaction_mutex__"
|
50
|
+
|
51
|
+
Transaction::Simple.instance_methods(false) do |meth|
|
52
|
+
next if meth == "transaction"
|
53
|
+
arg = "(name = nil)" unless meth == "transaction_name"
|
54
|
+
module_eval <<-EOS
|
55
|
+
def #{meth}#{arg}
|
56
|
+
if (@__transaction_mutex__ ||= Mutex.new).try_lock
|
57
|
+
result = super
|
58
|
+
@__transaction_mutex__.unlock
|
59
|
+
return result
|
60
|
+
else
|
61
|
+
raise TransactionThreadError, Messages[:cannot_obtain_transaction_lock] % meth
|
62
|
+
end
|
63
|
+
ensure
|
64
|
+
@__transaction_mutex__.unlock
|
65
|
+
end
|
66
|
+
EOS
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#--
|
2
|
+
# Transaction::Simple
|
3
|
+
# Simple object transaction support for Ruby
|
4
|
+
# http://rubyforge.org/projects/trans-simple/
|
5
|
+
# Version 1.4.0
|
6
|
+
#
|
7
|
+
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
|
+
# distribution for full licensing information.
|
9
|
+
#
|
10
|
+
# Copyright (c) 2003 - 2007 Austin Ziegler
|
11
|
+
#
|
12
|
+
# $Id: group.rb 47 2007-02-03 15:02:51Z austin $
|
13
|
+
#++
|
14
|
+
require 'transaction/simple/threadsafe'
|
15
|
+
|
16
|
+
# A transaction group is an object wrapper that manages a group of objects
|
17
|
+
# as if they were a single object for the purpose of transaction
|
18
|
+
# management. All transactions for this group of objects should be
|
19
|
+
# performed against the transaction group object, not against individual
|
20
|
+
# objects in the group. This is the threadsafe version of a transaction
|
21
|
+
# group.
|
22
|
+
class Transaction::Simple::ThreadSafe::Group < Transaction::Simple::Group
|
23
|
+
def initialize(*objects)
|
24
|
+
@objects = objects || []
|
25
|
+
@objects.freeze
|
26
|
+
@objects.each { |obj| obj.extend(Transaction::Simple::ThreadSafe) }
|
27
|
+
|
28
|
+
if block_given?
|
29
|
+
begin
|
30
|
+
yield self
|
31
|
+
ensure
|
32
|
+
self.clear
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/framework/builtinME.rb
CHANGED
File without changes
|
data/lib/framework/dateOrig.rb
CHANGED
@@ -1800,8 +1800,11 @@ class Time
|
|
1800
1800
|
|
1801
1801
|
def to_datetime
|
1802
1802
|
jd = DateTime.__send__(:civil_to_jd, year(), mon(), mday(), DateTime::ITALY)
|
1803
|
-
fr = DateTime.__send__(:time_to_day_fraction, hour(), min(), [sec(), 59].min)
|
1803
|
+
fr = DateTime.__send__(:time_to_day_fraction, hour(), min(), [sec(), 59].min)
|
1804
|
+
if !defined?(RHO_WP7)
|
1805
|
+
+
|
1804
1806
|
Rational(subsec(), 86400)
|
1807
|
+
end
|
1805
1808
|
of = Rational(utc_offset(), 86400)
|
1806
1809
|
DateTime.new!(DateTime.__send__(:jd_to_ajd, jd, fr, of),
|
1807
1810
|
of, DateTime::ITALY)
|
@@ -1830,8 +1833,11 @@ class Date
|
|
1830
1833
|
def self.now(sg=ITALY)
|
1831
1834
|
t = Time.now
|
1832
1835
|
jd = civil_to_jd(t.year(), t.mon(), t.mday(), sg)
|
1833
|
-
fr = time_to_day_fraction(t.hour(), t.min(), [t.sec(), 59].min())
|
1836
|
+
fr = time_to_day_fraction(t.hour(), t.min(), [t.sec(), 59].min())
|
1837
|
+
if !defined?(RHO_WP7)
|
1838
|
+
+
|
1834
1839
|
Rational(t.subsec, 86400)
|
1840
|
+
end
|
1835
1841
|
of = Rational(t.utc_offset(), 86400)
|
1836
1842
|
new!(jd_to_ajd(jd, fr, of), of, sg)
|
1837
1843
|
end
|
data/lib/framework/rational.rb
CHANGED
File without changes
|
File without changes
|
data/lib/framework/rho/rho.rb
CHANGED
@@ -1254,6 +1254,12 @@ module SyncEngine
|
|
1254
1254
|
Object.const_get(src_name).on_sync_create_error(objects, action)
|
1255
1255
|
end
|
1256
1256
|
|
1257
|
+
def self.push_changes( src_name )
|
1258
|
+
raise ArgumentError, 'push_changes src_name should be string' unless src_name.is_a?(String)
|
1259
|
+
|
1260
|
+
Object.const_get(src_name).push_changes()
|
1261
|
+
end
|
1262
|
+
|
1257
1263
|
def self.on_sync_update_error( src_name, objects, action, rollback_data = nil )
|
1258
1264
|
raise ArgumentError, 'on_sync_update_error src_name should be string' unless src_name.is_a?(String)
|
1259
1265
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1246,6 +1246,14 @@ module Rhom
|
|
1246
1246
|
raise
|
1247
1247
|
end
|
1248
1248
|
end
|
1249
|
+
|
1250
|
+
def push_changes()
|
1251
|
+
return unless is_sync_source()
|
1252
|
+
nSrcID = get_source_id()
|
1253
|
+
db = ::Rho::RHO.get_src_db(get_source_name)
|
1254
|
+
|
1255
|
+
db.insert_into_table('changed_values', {'update_type'=>'push_changes', 'source_id' => nSrcID } )
|
1256
|
+
end
|
1249
1257
|
|
1250
1258
|
def on_sync_create_error( objects, action )
|
1251
1259
|
raise ArgumentError, 'on_sync_create_error action should be :delete or :recreate' unless action == :delete || action == :recreate
|
data/lib/framework/rhomotoapi.rb
CHANGED
@@ -24,8 +24,8 @@
|
|
24
24
|
# http://rhomobile.com
|
25
25
|
#------------------------------------------------------------------------
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
if Object.const_defined?('RhoElementsExt')
|
28
|
+
|
29
29
|
module Barcode
|
30
30
|
|
31
31
|
class << self
|
@@ -107,4 +107,5 @@ class << self
|
|
107
107
|
end
|
108
108
|
end
|
109
109
|
end
|
110
|
+
|
110
111
|
end
|
@@ -48,7 +48,8 @@ JavaVM *jvm();
|
|
48
48
|
void store_thr_jnienv(JNIEnv *env);
|
49
49
|
|
50
50
|
extern "C" {
|
51
|
-
void android_set_path(const rho::String& root, const rho::String& sqlite);
|
51
|
+
void android_set_path(const rho::String& root, const rho::String& sqlite, const rho::String& shared);
|
52
|
+
void android_set_log_path(const rho::String& path);
|
52
53
|
void android_setup(JNIEnv *env);
|
53
54
|
}
|
54
55
|
|
@@ -90,6 +91,13 @@ public:
|
|
90
91
|
void clear() {}
|
91
92
|
};
|
92
93
|
|
94
|
+
class AndroidMemoryInfoCollector : public IMemoryInfoCollector
|
95
|
+
{
|
96
|
+
public:
|
97
|
+
virtual String collect();
|
98
|
+
};
|
99
|
+
|
100
|
+
|
93
101
|
|
94
102
|
} // namespace common
|
95
103
|
} // namespace rho
|
@@ -41,3 +41,4 @@ RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_SSLIMPL, "com/rhomobile/rhodes/socket
|
|
41
41
|
RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_STRING, "java/lang/String")
|
42
42
|
RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_VECTOR, "java/util/Vector")
|
43
43
|
RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_WEB_VIEW, "com/rhomobile/rhodes/WebView")
|
44
|
+
RHODES_DEFINE_JAVA_CLASS(RHODES_JAVA_CLASS_MEMORY_INFO_COLLECTOR, "com/rhomobile/rhodes/MemoryInfoCollector")
|
@@ -12,10 +12,18 @@ extern "C" {
|
|
12
12
|
/*
|
13
13
|
* Class: com_rhomobile_rhodes_file_RhoFileApi
|
14
14
|
* Method: nativeInitPath
|
15
|
-
* Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
15
|
+
* Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
16
16
|
*/
|
17
17
|
JNIEXPORT void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInitPath
|
18
|
-
(JNIEnv *, jclass, jstring, jstring, jstring);
|
18
|
+
(JNIEnv *, jclass, jstring, jstring, jstring, jstring);
|
19
|
+
|
20
|
+
/*
|
21
|
+
* Class: com_rhomobile_rhodes_file_RhoFileApi
|
22
|
+
* Method: nativeInitLogPath
|
23
|
+
* Signature: (Ljava/lang/String;)V
|
24
|
+
*/
|
25
|
+
JNIEXPORT void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInitLogPath
|
26
|
+
(JNIEnv *, jclass, jstring);
|
19
27
|
|
20
28
|
/*
|
21
29
|
* Class: com_rhomobile_rhodes_file_RhoFileApi
|
@@ -65,6 +73,22 @@ JNIEXPORT jboolean JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_needEmulate
|
|
65
73
|
JNIEXPORT jstring JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_makeRelativePath
|
66
74
|
(JNIEnv *, jclass, jstring);
|
67
75
|
|
76
|
+
/*
|
77
|
+
* Class: com_rhomobile_rhodes_file_RhoFileApi
|
78
|
+
* Method: setFsModeTransparrent
|
79
|
+
* Signature: (Z)V
|
80
|
+
*/
|
81
|
+
JNIEXPORT void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_setFsModeTransparrent
|
82
|
+
(JNIEnv *, jclass, jboolean);
|
83
|
+
|
84
|
+
/*
|
85
|
+
* Class: com_rhomobile_rhodes_file_RhoFileApi
|
86
|
+
* Method: removeBundleUpgrade
|
87
|
+
* Signature: ()V
|
88
|
+
*/
|
89
|
+
JNIEXPORT void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_removeBundleUpgrade
|
90
|
+
(JNIEnv *, jclass);
|
91
|
+
|
68
92
|
#ifdef __cplusplus
|
69
93
|
}
|
70
94
|
#endif
|
@@ -68,7 +68,7 @@ RHO_GLOBAL void take_picture(char* callback_url, rho_param *options_hash )
|
|
68
68
|
|
69
69
|
}
|
70
70
|
|
71
|
-
RHO_GLOBAL void choose_picture(char* callback_url)
|
71
|
+
RHO_GLOBAL void choose_picture(char* callback_url, rho_param *options_hash)
|
72
72
|
{
|
73
73
|
JNIEnv *env = jnienv();
|
74
74
|
jclass cls = getJNIClass(RHODES_JAVA_CLASS_CAMERA);
|
@@ -120,6 +120,10 @@ static jmethodID midGetChildren;
|
|
120
120
|
typedef FILE *(*func_sfp_t)();
|
121
121
|
typedef int (*func_sflags_t)(const char *mode, int *optr);
|
122
122
|
|
123
|
+
#ifndef DEFFILEMODE
|
124
|
+
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
125
|
+
#endif
|
126
|
+
|
123
127
|
static func_sflags_t __sflags;
|
124
128
|
static func_sfp_t __sfp;
|
125
129
|
|
@@ -255,12 +259,18 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_updateStatTabl
|
|
255
259
|
}
|
256
260
|
|
257
261
|
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInitPath
|
258
|
-
(JNIEnv *env, jclass, jstring root_path, jstring sqlite_journals_path, jstring apk_path)
|
262
|
+
(JNIEnv *env, jclass, jstring root_path, jstring sqlite_journals_path, jstring apk_path, jstring shared_path)
|
259
263
|
{
|
260
|
-
android_set_path(rho_cast<std::string>(env, root_path), rho_cast<std::string>(env, sqlite_journals_path));
|
264
|
+
android_set_path(rho_cast<std::string>(env, root_path), rho_cast<std::string>(env, sqlite_journals_path), rho_cast<std::string>(env, shared_path));
|
261
265
|
g_apk_path = (apk_path != NULL) ? rho_cast<std::string>(env, apk_path) : std::string();
|
262
266
|
}
|
263
267
|
|
268
|
+
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInitLogPath
|
269
|
+
(JNIEnv *env, jclass, jstring path)
|
270
|
+
{
|
271
|
+
android_set_log_path(rho_cast<std::string>(env, path));
|
272
|
+
}
|
273
|
+
|
264
274
|
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInit
|
265
275
|
(JNIEnv *env, jclass)
|
266
276
|
{
|
@@ -339,11 +349,25 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInit
|
|
339
349
|
librhodes_st.st_uid = getuid();
|
340
350
|
librhodes_st.st_gid = getgid();
|
341
351
|
|
342
|
-
rho_file_set_fs_mode(RHO_FS_TRANSPARRENT);
|
343
|
-
|
344
352
|
RHO_LOG("Library stat (mode: %d, uid: %d, gid: %d)", librhodes_st.st_mode, librhodes_st.st_uid, librhodes_st.st_gid);
|
345
353
|
}
|
346
354
|
|
355
|
+
|
356
|
+
extern "C" void rho_sysimpl_remove_bundle_files(const char* rootPath, const char* listFileName);
|
357
|
+
|
358
|
+
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_removeBundleUpgrade
|
359
|
+
(JNIEnv *env, jclass)
|
360
|
+
{
|
361
|
+
rho_sysimpl_remove_bundle_files((rho_root_path() + "apps").c_str(), "rhofilelist.txt");
|
362
|
+
}
|
363
|
+
|
364
|
+
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_setFsModeTransparrent
|
365
|
+
(JNIEnv *env, jclass , jboolean transparrent)
|
366
|
+
{
|
367
|
+
rho_file_set_fs_mode(transparrent ? RHO_FS_TRANSPARRENT : RHO_FS_DISK_ONLY);
|
368
|
+
}
|
369
|
+
|
370
|
+
|
347
371
|
static std::string normalize_path(std::string path)
|
348
372
|
{
|
349
373
|
//RHO_LOG("normalize_path: (1): path: %s", path.c_str());
|
@@ -522,15 +546,6 @@ static bool need_emulate(std::string const &path)
|
|
522
546
|
}
|
523
547
|
|
524
548
|
}
|
525
|
-
else if (S_ISREG(st.st_mode))
|
526
|
-
{
|
527
|
-
rho_stat_t *rst = rho_stat(fpath);
|
528
|
-
if (rst && rst->mtime > st.st_mtime)
|
529
|
-
{
|
530
|
-
real_unlink(fpath.c_str());
|
531
|
-
return true;
|
532
|
-
}
|
533
|
-
}
|
534
549
|
}
|
535
550
|
|
536
551
|
return false;
|
@@ -1296,20 +1311,21 @@ static int __sclose(void *cookie)
|
|
1296
1311
|
|
1297
1312
|
RHO_GLOBAL FILE *fopen(const char *path, const char *mode)
|
1298
1313
|
{
|
1314
|
+
int flags, oflags;
|
1315
|
+
FILE *fp = 0;
|
1316
|
+
|
1299
1317
|
RHO_LOG("fopen: %s (%s)", path, mode);
|
1300
1318
|
|
1301
|
-
int flags, oflags;
|
1302
1319
|
if ((flags = __sflags(mode, &oflags)) == 0)
|
1303
1320
|
return NULL;
|
1321
|
+
if((fp = __sfp()) == 0)
|
1322
|
+
return NULL;
|
1304
1323
|
|
1305
|
-
int fd = open(path, oflags,
|
1324
|
+
int fd = open(path, oflags, DEFFILEMODE);
|
1306
1325
|
RHO_LOG("fopen: %s (%s): fd: %d", path, mode, fd);
|
1307
|
-
if (fd
|
1326
|
+
if (fd < 0)
|
1308
1327
|
return NULL;
|
1309
1328
|
|
1310
|
-
FILE *fp = __sfp();
|
1311
|
-
if (!fp)
|
1312
|
-
return NULL;
|
1313
1329
|
|
1314
1330
|
fp->_flags = flags;
|
1315
1331
|
fp->_file = fd;
|
@@ -1319,6 +1335,10 @@ RHO_GLOBAL FILE *fopen(const char *path, const char *mode)
|
|
1319
1335
|
fp->_seek = __sseek;
|
1320
1336
|
fp->_close = __sclose;
|
1321
1337
|
|
1338
|
+
// Do seek at our level as well even though oflags passed to open
|
1339
|
+
if (oflags & O_APPEND)
|
1340
|
+
(void) __sseek((void *)fp, (fpos_t)0, SEEK_END);
|
1341
|
+
|
1322
1342
|
RHO_LOG("fopen: %s (%s): fp: %p", path, mode, fp);
|
1323
1343
|
return fp;
|
1324
1344
|
}
|