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
@@ -30,7 +30,7 @@
|
|
30
30
|
#ifndef RHO_NO_RUBY
|
31
31
|
#include "ruby/ext/rho/rhoruby.h"
|
32
32
|
#endif //RHO_NO_RUBY
|
33
|
-
#if defined(
|
33
|
+
#if defined(WINDOWS_PLATFORM)
|
34
34
|
#define rho_atoi64 _atoi64
|
35
35
|
#elif defined(OS_SYMBIAN)
|
36
36
|
long long int rho_atoi64(const char *instr)
|
@@ -143,9 +143,9 @@
|
|
143
143
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
144
144
|
/* #undef size_t */
|
145
145
|
|
146
|
-
|
147
|
-
|
148
|
-
|
146
|
+
//#if !defined(OS_ANDROID)
|
147
|
+
//#include "tcmalloc/rhomem.h"
|
148
|
+
//#endif
|
149
149
|
|
150
150
|
#if defined(WIN32)
|
151
151
|
|
@@ -38,15 +38,24 @@ const char*const LogSeverityNames[L_NUM_SEVERITIES] = {
|
|
38
38
|
|
39
39
|
namespace rho {
|
40
40
|
|
41
|
-
LogMessage::LogMessage(const char* file, int line, LogSeverity severity, LogSettings& oSettings, const LogCategory& category
|
42
|
-
m_severity(severity), m_category(category), m_oLogConf(oSettings){
|
41
|
+
LogMessage::LogMessage(const char* file, int line, LogSeverity severity, LogSettings& oSettings, const LogCategory& category) :
|
42
|
+
m_severity(severity), m_category(category), m_oLogConf(oSettings), m_bForceEnable(false){
|
43
|
+
if ( getLogConf().isLogPrefix() && isEnabled() )
|
44
|
+
addPrefix( file, line );
|
45
|
+
}
|
46
|
+
|
47
|
+
LogMessage::LogMessage(const char* file, int line, LogSeverity severity, LogSettings& oSettings, const LogCategory& category, boolean bForceEnable) :
|
48
|
+
m_severity(severity), m_category(category), m_oLogConf(oSettings), m_bForceEnable(bForceEnable){
|
43
49
|
if ( getLogConf().isLogPrefix() && isEnabled() )
|
44
50
|
addPrefix( file, line );
|
45
51
|
}
|
46
52
|
|
47
53
|
bool LogMessage::isEnabled()const{
|
48
54
|
if(m_category.getName() == "NO_LOGGING" || common::CThreadQueue::getLogThreadId() == common::CSystem::getThreadID()) return false;
|
49
|
-
|
55
|
+
|
56
|
+
if ( m_bForceEnable )
|
57
|
+
return true;
|
58
|
+
|
50
59
|
if ( m_severity >= getLogConf().getMinSeverity() ){
|
51
60
|
if ( m_category.isEmpty() || m_severity >= L_ERROR )
|
52
61
|
return true;
|
@@ -85,13 +85,14 @@ private:
|
|
85
85
|
LogSeverity m_severity;
|
86
86
|
LogCategory m_category;
|
87
87
|
String m_strMessage;
|
88
|
-
|
88
|
+
boolean m_bForceEnable;
|
89
89
|
LogFormat m_lastFmt;
|
90
90
|
|
91
91
|
LogSettings& m_oLogConf;
|
92
92
|
public:
|
93
93
|
|
94
94
|
LogMessage(const char* file, int line, LogSeverity severity, LogSettings& oSettings, const LogCategory& category);
|
95
|
+
LogMessage(const char* file, int line, LogSeverity severity, LogSettings& oSettings, const LogCategory& category, boolean bForceEnable);
|
95
96
|
|
96
97
|
~LogMessage(){ flushLog(); }
|
97
98
|
|
@@ -41,9 +41,70 @@ namespace rho{
|
|
41
41
|
common::CMutex LogSettings::m_FlushLock;
|
42
42
|
common::CMutex LogSettings::m_CatLock;
|
43
43
|
|
44
|
+
|
45
|
+
LogSettings::MemoryInfoCollectorThread::MemoryInfoCollectorThread( LogSettings& logSettings ) :
|
46
|
+
m_pCollector(0), m_logSettings(logSettings), m_collectMemoryIntervalMilliseconds(0)
|
47
|
+
{
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
void LogSettings::MemoryInfoCollectorThread::run()
|
52
|
+
{
|
53
|
+
while( !isStopping() )
|
54
|
+
{
|
55
|
+
unsigned int toWait = 0;
|
56
|
+
{
|
57
|
+
common::CMutexLock lock(m_accessLock);
|
58
|
+
toWait = m_collectMemoryIntervalMilliseconds;
|
59
|
+
}
|
60
|
+
|
61
|
+
if ( 0 == toWait )
|
62
|
+
{
|
63
|
+
continue;
|
64
|
+
}
|
65
|
+
|
66
|
+
wait(toWait / 1000);
|
67
|
+
|
68
|
+
if (!isStopping())
|
69
|
+
{
|
70
|
+
common::CMutexLock lock(m_accessLock);
|
71
|
+
if ( m_pCollector!=0 )
|
72
|
+
{
|
73
|
+
String str = m_pCollector->collect();
|
74
|
+
|
75
|
+
LogCategory oLogCat("MEMORY");
|
76
|
+
rho::LogMessage oLogMsg(__FILE__, __LINE__, L_INFO, LOGCONF(), oLogCat, true );
|
77
|
+
oLogMsg + str;
|
78
|
+
|
79
|
+
//m_logSettings.sinkLogMessage( str );
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
void LogSettings::MemoryInfoCollectorThread::setCollectMemoryInfoInterval( unsigned int interval )
|
86
|
+
{
|
87
|
+
common::CMutexLock lock(m_accessLock);
|
88
|
+
m_collectMemoryIntervalMilliseconds = interval;
|
89
|
+
}
|
90
|
+
|
91
|
+
void LogSettings::MemoryInfoCollectorThread::setMemoryInfoCollector( IMemoryInfoCollector* memInfoCollector )
|
92
|
+
{
|
93
|
+
common::CMutexLock lock(m_accessLock);
|
94
|
+
m_pCollector = memInfoCollector;
|
95
|
+
}
|
96
|
+
|
97
|
+
boolean LogSettings::MemoryInfoCollectorThread::willCollect() const
|
98
|
+
{
|
99
|
+
common::CMutexLock lock(m_accessLock);
|
100
|
+
return (m_collectMemoryIntervalMilliseconds>0) && (m_pCollector!=0);
|
101
|
+
}
|
102
|
+
|
103
|
+
|
44
104
|
LogSettings g_LogSettings;
|
45
105
|
|
46
|
-
LogSettings::LogSettings()
|
106
|
+
LogSettings::LogSettings()
|
107
|
+
{
|
47
108
|
m_nMinSeverity = 0;
|
48
109
|
m_bLogToOutput = true;
|
49
110
|
m_bLogToFile = false;
|
@@ -58,9 +119,17 @@ LogSettings::LogSettings(){
|
|
58
119
|
m_pOutputSink = new CLogOutputSink(*this);
|
59
120
|
m_pLogViewSink = NULL;
|
60
121
|
m_pSocketSink = NULL;
|
122
|
+
m_pMemoryInfoCollector = NULL;
|
123
|
+
m_pMemoryCollectorThread = NULL;
|
61
124
|
}
|
62
125
|
|
63
126
|
LogSettings::~LogSettings(){
|
127
|
+
|
128
|
+
if ( m_pMemoryCollectorThread != 0 )
|
129
|
+
{
|
130
|
+
m_pMemoryCollectorThread->stop(1);
|
131
|
+
delete m_pMemoryCollectorThread;
|
132
|
+
}
|
64
133
|
delete m_pFileSink;
|
65
134
|
delete m_pOutputSink;
|
66
135
|
if(m_pSocketSink)
|
@@ -93,6 +162,13 @@ void LogSettings::initRemoteLog()
|
|
93
162
|
m_pSocketSink = new CLogSocketSink(*this);
|
94
163
|
}
|
95
164
|
|
165
|
+
void LogSettings::reinitRemoteLog() {
|
166
|
+
closeRemoteLog();
|
167
|
+
if(!m_pSocketSink && m_strLogURL != "")
|
168
|
+
m_pSocketSink = new CLogSocketSink(*this);
|
169
|
+
}
|
170
|
+
|
171
|
+
|
96
172
|
void LogSettings::getLogTextW(StringW& strTextW)
|
97
173
|
{
|
98
174
|
boolean bOldSaveToFile = isLogToFile();
|
@@ -126,7 +202,7 @@ void LogSettings::saveToFile(){
|
|
126
202
|
RHOCONF().setInt("MinSeverity", getMinSeverity(), true );
|
127
203
|
RHOCONF().setBool("LogToOutput", isLogToOutput(), true );
|
128
204
|
RHOCONF().setBool("LogToFile", isLogToFile(), true );
|
129
|
-
#if !defined(OS_MACOSX)
|
205
|
+
#if !defined(OS_MACOSX)
|
130
206
|
RHOCONF().setString("LogFilePath", getLogFilePath(), true );
|
131
207
|
#endif
|
132
208
|
RHOCONF().setInt("MaxLogFileSize", getMaxLogFileSize(), true );
|
@@ -154,6 +230,11 @@ void LogSettings::loadFromConf(rho::common::RhoSettings& oRhoConf)
|
|
154
230
|
setLogToSocket( oRhoConf.getBool("LogToSocket") );
|
155
231
|
if ( oRhoConf.isExist( "log_exclude_filter") )
|
156
232
|
setExcludeFilter( oRhoConf.getString("log_exclude_filter") );
|
233
|
+
if ( oRhoConf.isExist( "LogMemPeriod" ) )
|
234
|
+
{
|
235
|
+
int milliseconds = oRhoConf.getInt("LogMemPeriod");
|
236
|
+
setCollectMemoryInfoInterval(milliseconds);
|
237
|
+
}
|
157
238
|
}
|
158
239
|
|
159
240
|
void LogSettings::setLogFilePath(const char* szLogFilePath){
|
@@ -179,9 +260,20 @@ void LogSettings::clearLog(){
|
|
179
260
|
}
|
180
261
|
|
181
262
|
void LogSettings::sinkLogMessage( String& strMsg ){
|
263
|
+
/*
|
264
|
+
String logMemory ("");
|
265
|
+
processMemoryInfo( logMemory );
|
266
|
+
if (logMemory.length() > 0)
|
267
|
+
internalSinkLogMessage(logMemory);
|
268
|
+
*/
|
269
|
+
|
270
|
+
internalSinkLogMessage(strMsg);
|
271
|
+
}
|
272
|
+
|
273
|
+
void LogSettings::internalSinkLogMessage( String& strMsg ){
|
182
274
|
common::CMutexLock oLock(m_FlushLock);
|
183
275
|
|
184
|
-
|
276
|
+
if ( isLogToFile() )
|
185
277
|
m_pFileSink->writeLogMessage(strMsg);
|
186
278
|
|
187
279
|
if (m_pLogViewSink)
|
@@ -239,12 +331,48 @@ void LogSettings::setExcludeFilter( const String& strExcludeFilter )
|
|
239
331
|
|
240
332
|
//m_arExcludeAttribs.addElement( "\"" + tok + "\"=>\"" );
|
241
333
|
m_arExcludeAttribs.addElement( tok );
|
242
|
-
}
|
334
|
+
}
|
243
335
|
}
|
244
336
|
else
|
245
337
|
m_arExcludeAttribs.removeAllElements();
|
246
338
|
}
|
247
339
|
|
340
|
+
void LogSettings::setCollectMemoryInfoInterval( unsigned int interval )
|
341
|
+
{
|
342
|
+
if ( 0 == m_pMemoryCollectorThread )
|
343
|
+
{
|
344
|
+
m_pMemoryCollectorThread = new MemoryInfoCollectorThread(*this);
|
345
|
+
}
|
346
|
+
|
347
|
+
m_pMemoryCollectorThread->setCollectMemoryInfoInterval(interval);
|
348
|
+
if ( m_pMemoryCollectorThread->willCollect() )
|
349
|
+
{
|
350
|
+
m_pMemoryCollectorThread->start(common::IRhoRunnable::epLow);
|
351
|
+
}
|
352
|
+
else
|
353
|
+
{
|
354
|
+
m_pMemoryCollectorThread->stop(0);
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
358
|
+
void LogSettings::setMemoryInfoCollector( IMemoryInfoCollector* memInfoCollector )
|
359
|
+
{
|
360
|
+
if ( 0 == m_pMemoryCollectorThread )
|
361
|
+
{
|
362
|
+
m_pMemoryCollectorThread = new MemoryInfoCollectorThread(*this);
|
363
|
+
}
|
364
|
+
|
365
|
+
m_pMemoryCollectorThread->setMemoryInfoCollector(memInfoCollector);
|
366
|
+
if ( m_pMemoryCollectorThread->willCollect() )
|
367
|
+
{
|
368
|
+
m_pMemoryCollectorThread->start(common::IRhoRunnable::epLow);
|
369
|
+
}
|
370
|
+
else
|
371
|
+
{
|
372
|
+
m_pMemoryCollectorThread->stop(0);
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
248
376
|
}
|
249
377
|
|
250
378
|
extern "C" {
|
@@ -253,7 +381,7 @@ using namespace rho::common;
|
|
253
381
|
|
254
382
|
void rho_logconf_Init_with_separate_user_path(const char* szLogPath, const char* szRootPath, const char* szLogPort, const char* szUserPath)
|
255
383
|
{
|
256
|
-
|
384
|
+
|
257
385
|
#ifdef RHODES_EMULATOR
|
258
386
|
String strRootPath = szLogPath;
|
259
387
|
strRootPath += RHO_EMULATOR_DIR"/";
|
@@ -261,7 +389,7 @@ void rho_logconf_Init_with_separate_user_path(const char* szLogPath, const char*
|
|
261
389
|
#else
|
262
390
|
rho::common::CFilePath oLogPath( szLogPath );
|
263
391
|
#endif
|
264
|
-
|
392
|
+
|
265
393
|
//Set defaults
|
266
394
|
#ifdef RHO_DEBUG
|
267
395
|
LOGCONF().setMinSeverity( L_TRACE );
|
@@ -273,19 +401,19 @@ void rho_logconf_Init_with_separate_user_path(const char* szLogPath, const char*
|
|
273
401
|
LOGCONF().setLogToOutput(false);
|
274
402
|
LOGCONF().setEnabledCategories("");
|
275
403
|
#endif//!RHO_DEBUG
|
276
|
-
|
404
|
+
|
277
405
|
LOGCONF().setLogPrefix(true);
|
278
|
-
|
406
|
+
|
279
407
|
rho::String logPath = oLogPath.makeFullPath("rholog.txt");
|
280
408
|
LOGCONF().setLogToFile(true);
|
281
409
|
LOGCONF().setLogFilePath( logPath.c_str() );
|
282
410
|
LOGCONF().setMaxLogFileSize(1024*50);
|
283
|
-
|
411
|
+
|
284
412
|
rho_conf_Init_with_separate_user_path(szRootPath, szUserPath);
|
285
|
-
|
413
|
+
|
286
414
|
LOGCONF().loadFromConf(RHOCONF());
|
287
415
|
}
|
288
|
-
|
416
|
+
|
289
417
|
void rho_logconf_Init(const char* szLogPath, const char* szRootPath, const char* szLogPort){
|
290
418
|
rho_logconf_Init_with_separate_user_path(szLogPath, szRootPath, szLogPort, szRootPath);
|
291
419
|
}
|
@@ -406,6 +534,14 @@ VALUE rho_conf_read_log(int limit)
|
|
406
534
|
|
407
535
|
return res;
|
408
536
|
}
|
537
|
+
|
538
|
+
|
539
|
+
void rho_log_resetup_http_url(const char* http_log_url) {
|
540
|
+
LOGCONF().setLogURL(http_log_url);
|
541
|
+
LOGCONF().reinitRemoteLog();
|
542
|
+
}
|
543
|
+
|
544
|
+
|
409
545
|
#endif //RHO_NO_RUBY
|
410
546
|
|
411
547
|
}
|
@@ -32,6 +32,8 @@
|
|
32
32
|
#include "common/RhoStd.h"
|
33
33
|
//#include "RhoPlainLog.h"
|
34
34
|
#include "common/RhoMutexLock.h"
|
35
|
+
#include "common/RhoTime.h"
|
36
|
+
#include "common/RhoThread.h"
|
35
37
|
|
36
38
|
namespace rho {
|
37
39
|
|
@@ -45,7 +47,32 @@ struct ILogSink{
|
|
45
47
|
virtual void clear() = 0;
|
46
48
|
};
|
47
49
|
|
50
|
+
class IMemoryInfoCollector
|
51
|
+
{
|
52
|
+
public:
|
53
|
+
virtual ~IMemoryInfoCollector() {}
|
54
|
+
virtual String collect() = 0;
|
55
|
+
};
|
56
|
+
|
48
57
|
class LogSettings{
|
58
|
+
|
59
|
+
class MemoryInfoCollectorThread : public common::CRhoThread
|
60
|
+
{
|
61
|
+
unsigned int m_collectMemoryIntervalMilliseconds;
|
62
|
+
IMemoryInfoCollector* m_pCollector;
|
63
|
+
LogSettings& m_logSettings;
|
64
|
+
|
65
|
+
mutable common::CMutex m_accessLock;
|
66
|
+
public:
|
67
|
+
MemoryInfoCollectorThread( LogSettings& logSettings );
|
68
|
+
virtual void run();
|
69
|
+
|
70
|
+
void setCollectMemoryInfoInterval( unsigned int interval );
|
71
|
+
void setMemoryInfoCollector( IMemoryInfoCollector* memInfoCollector );
|
72
|
+
|
73
|
+
boolean willCollect() const;
|
74
|
+
};
|
75
|
+
|
49
76
|
LogSeverity m_nMinSeverity;
|
50
77
|
bool m_bLogToOutput;
|
51
78
|
bool m_bLogToSocket;
|
@@ -54,6 +81,8 @@ class LogSettings{
|
|
54
81
|
String m_strLogFilePath;
|
55
82
|
// String m_strLogConfFilePath;
|
56
83
|
unsigned int m_nMaxLogFileSize;
|
84
|
+
|
85
|
+
MemoryInfoCollectorThread* m_pMemoryCollectorThread;
|
57
86
|
|
58
87
|
String m_strLogURL;
|
59
88
|
|
@@ -66,6 +95,7 @@ class LogSettings{
|
|
66
95
|
ILogSink* m_pOutputSink;
|
67
96
|
ILogSink* m_pLogViewSink;
|
68
97
|
ILogSink* m_pSocketSink;
|
98
|
+
IMemoryInfoCollector* m_pMemoryInfoCollector;
|
69
99
|
|
70
100
|
static common::CMutex m_FlushLock;
|
71
101
|
static common::CMutex m_CatLock;
|
@@ -102,6 +132,7 @@ public:
|
|
102
132
|
void setLogURL(const char* szLogURL) { m_strLogURL = rho::String(szLogURL); }
|
103
133
|
|
104
134
|
void initRemoteLog();
|
135
|
+
void reinitRemoteLog();
|
105
136
|
void closeRemoteLog();
|
106
137
|
|
107
138
|
void setEnabledCategories( const char* szCatList );
|
@@ -109,6 +140,9 @@ public:
|
|
109
140
|
const String& getEnabledCategories(){ return m_strEnabledCategories; }
|
110
141
|
const String& getDisabledCategories(){ return m_strDisabledCategories; }
|
111
142
|
bool isCategoryEnabled(const LogCategory& cat)const;
|
143
|
+
|
144
|
+
void setCollectMemoryInfoInterval( unsigned int interval );
|
145
|
+
void setMemoryInfoCollector( IMemoryInfoCollector* memInfoCollector );
|
112
146
|
|
113
147
|
void setExcludeFilter( const String& strExcludeFilter );
|
114
148
|
Vector<String>& getExcludeAttribs(){ return m_arExcludeAttribs; }
|
@@ -118,7 +152,7 @@ public:
|
|
118
152
|
void getLogText(String& strText);
|
119
153
|
void getLogTextW(StringW& strTextW);
|
120
154
|
int getLogTextPos();
|
121
|
-
|
155
|
+
|
122
156
|
void setLogView(ILogSink* logView) {
|
123
157
|
m_pLogViewSink = logView;
|
124
158
|
}
|
@@ -132,6 +166,8 @@ public:
|
|
132
166
|
void saveToFile();
|
133
167
|
void loadFromConf(rho::common::RhoSettings& oRhoConf);
|
134
168
|
|
169
|
+
private:
|
170
|
+
void internalSinkLogMessage( String& strMsg );
|
135
171
|
};
|
136
172
|
|
137
173
|
extern LogSettings g_LogSettings;
|
@@ -167,6 +203,8 @@ void rho_logconf_freeString(char* str);
|
|
167
203
|
|
168
204
|
int rho_conf_send_log(const char* callback_url);
|
169
205
|
void rho_conf_clean_log();
|
206
|
+
|
207
|
+
void rho_log_resetup_http_url(const char* http_log_url);
|
170
208
|
|
171
209
|
#ifdef __cplusplus
|
172
210
|
}
|
@@ -145,7 +145,7 @@ void CLogOutputSink::writeLogMessage( String& strMsg )
|
|
145
145
|
|
146
146
|
const char* szMsg = strMsg.c_str();
|
147
147
|
|
148
|
-
#if defined(
|
148
|
+
#if defined( OS_WINDOWS_DESKTOP )
|
149
149
|
::OutputDebugStringA(szMsg);
|
150
150
|
#elif defined( OS_PLATFORM_MOTCE )
|
151
151
|
::OutputDebugStringW(common::convertToStringW(strMsg).c_str());
|
@@ -81,7 +81,7 @@ using namespace rho::common;
|
|
81
81
|
|
82
82
|
IMPLEMENT_LOGCLASS(CHttpServer, "HttpServer");
|
83
83
|
|
84
|
-
#if defined(
|
84
|
+
#if defined(WINDOWS_PLATFORM)
|
85
85
|
static size_t const FILE_BUF_SIZE = 64*1024;
|
86
86
|
#else
|
87
87
|
static size_t const FILE_BUF_SIZE = 256*1024;
|
@@ -463,8 +463,12 @@ bool CHttpServer::run()
|
|
463
463
|
return false;
|
464
464
|
}
|
465
465
|
|
466
|
-
|
466
|
+
if ( bProcessed )
|
467
|
+
{
|
468
|
+
LOG(INFO) + "GC Start.";
|
467
469
|
rb_gc();
|
470
|
+
LOG(INFO) + "GC End.";
|
471
|
+
}
|
468
472
|
}
|
469
473
|
}
|
470
474
|
|
@@ -1109,7 +1113,7 @@ bool CHttpServer::send_file(String const &path, HeaderList const &hdrs)
|
|
1109
1113
|
fclose(fp);
|
1110
1114
|
delete buf;
|
1111
1115
|
if (verbose) RAWTRACE1("File %s was sent successfully", path.c_str());
|
1112
|
-
return
|
1116
|
+
return false;
|
1113
1117
|
}
|
1114
1118
|
|
1115
1119
|
bool CHttpServer::call_ruby_method(String const &uri, String const &body, String& strReply)
|
@@ -1137,7 +1141,7 @@ bool CHttpServer::decide(String const &method, String const &arg_uri, String con
|
|
1137
1141
|
if (callback) {
|
1138
1142
|
RAWTRACE1("Uri %s is registered callback, so handle it appropriately", arg_uri.c_str());
|
1139
1143
|
callback(this, query.length() ? query : body);
|
1140
|
-
return
|
1144
|
+
return false;
|
1141
1145
|
}
|
1142
1146
|
|
1143
1147
|
String uri = arg_uri;
|