<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>bin/rhodes-setup</filename>
    </added>
    <added>
      <filename>bin/rhodes-setup.bat</filename>
    </added>
    <added>
      <filename>bin/rhogen</filename>
    </added>
    <added>
      <filename>bin/rhogen.bat</filename>
    </added>
    <added>
      <filename>bin/set-rhodes-sdk</filename>
    </added>
    <added>
      <filename>bin/set-rhodes-sdk.bat</filename>
    </added>
    <added>
      <filename>bin/upgrade-rhodes-app</filename>
    </added>
    <added>
      <filename>bin/upgrade-rhodes-app.bat</filename>
    </added>
    <added>
      <filename>ext/extconf.rb</filename>
    </added>
    <added>
      <filename>lib/build/compileERB/bb.rb</filename>
    </added>
    <added>
      <filename>lib/build/compileERB/default.rb</filename>
    </added>
    <added>
      <filename>lib/build/compileRB/compileRB.rb</filename>
    </added>
    <added>
      <filename>lib/build/jake.rb</filename>
    </added>
    <added>
      <filename>lib/build/manifest/createAppManifest.rb</filename>
    </added>
    <added>
      <filename>lib/build/rhodes-build.rb</filename>
    </added>
    <added>
      <filename>lib/build/tasks/android.rake</filename>
    </added>
    <added>
      <filename>lib/build/tasks/blackberry.rake</filename>
    </added>
    <added>
      <filename>lib/build/tasks/common.rake</filename>
    </added>
    <added>
      <filename>lib/build/tasks/iphone.rake</filename>
    </added>
    <added>
      <filename>lib/build/tasks/linux.rake</filename>
    </added>
    <added>
      <filename>lib/build/tasks/rhodes-build.rb</filename>
    </added>
    <added>
      <filename>lib/build/tasks/rspec.rake</filename>
    </added>
    <added>
      <filename>lib/build/tasks/symbian.rake</filename>
    </added>
    <added>
      <filename>lib/build/tasks/wm.rake</filename>
    </added>
    <added>
      <filename>lib/build/version.rb</filename>
    </added>
    <added>
      <filename>lib/framework/ServeME.rb</filename>
    </added>
    <added>
      <filename>lib/framework/bsearch.rb</filename>
    </added>
    <added>
      <filename>lib/framework/builtinME.rb</filename>
    </added>
    <added>
      <filename>lib/framework/date.rb</filename>
    </added>
    <added>
      <filename>lib/framework/date/format.rb</filename>
    </added>
    <added>
      <filename>lib/framework/dateME.rb</filename>
    </added>
    <added>
      <filename>lib/framework/erb.rb</filename>
    </added>
    <added>
      <filename>lib/framework/find.rb</filename>
    </added>
    <added>
      <filename>lib/framework/indifferent_access.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rational.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rationalME.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/render.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rho.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rhoapplication.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rhocontact.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rhocontroller.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rhoerror.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rhofsconnector.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rhosupport.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rhoutils.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rho/rhoviewhelpers.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhodes-framework.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhodes.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhoframework.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhofsconnector.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhom.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhom/rhom.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhom/rhom_db_adapter.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhom/rhom_object.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhom/rhom_object_factory.rb</filename>
    </added>
    <added>
      <filename>lib/framework/rhom/rhom_source.rb</filename>
    </added>
    <added>
      <filename>lib/framework/singleton.rb</filename>
    </added>
    <added>
      <filename>lib/framework/time.rb</filename>
    </added>
    <added>
      <filename>lib/framework/version.rb</filename>
    </added>
    <added>
      <filename>lib/rhodes.rb</filename>
    </added>
    <added>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/FileAccess.java</filename>
    </added>
    <added>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/RAFile.java</filename>
    </added>
    <added>
      <filename>platform/bb/Hsqldb/src/com/rho/file/FileAccessBB.java</filename>
    </added>
    <added>
      <filename>platform/bb/Hsqldb/src/com/rho/file/Jsr75RAFileImpl.java</filename>
    </added>
    <added>
      <filename>platform/bb/Hsqldb/src/com/rho/file/PersistRAFileImpl.java</filename>
    </added>
    <added>
      <filename>platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java</filename>
    </added>
    <added>
      <filename>platform/bb/rhodes/platform/common/com/rho/RhoMainScreen.java</filename>
    </added>
    <added>
      <filename>platform/bb/rhodes/src/com/rho/RhoMainScreen.java</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/JSString.h</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/JSString.m</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/MapView/GoogleGeocoder.h</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/MapView/GoogleGeocoder.m</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/MapView/MapAnnotation.h</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/MapView/MapAnnotation.m</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/MapView/MapViewController.h</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/MapView/MapViewController.m</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/RhoFileImpl.m</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/Server/WebViewUrl.h</filename>
    </added>
    <added>
      <filename>platform/iphone/Classes/Server/WebViewUrl.m</filename>
    </added>
    <added>
      <filename>platform/linux/tasks/linux.rake</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/English.lproj/InfoPlist.strings</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/English.lproj/MainMenu.xib</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/Info.plist</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/Rhodes Launcher.xcodeproj/TemplateIcon.icns</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/Rhodes Launcher.xcodeproj/project.pbxproj</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/Rhodes Launcher_Prefix.pch</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/RhodesController.h</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/RhodesController.m</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/icon.icns</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/launch.rb</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/main.m</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/Info.plist</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/MainWindow.nib</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/PkgInfo</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/Settings.bundle/Root.plist</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/Settings.bundle/en.lproj/Root.strings</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/app/loading.html</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/app_manifest.txt</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/css/base.css</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/css/blackberry.css</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/css/iphone.css</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/css/rho.css</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/css/xhtml.css</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/IUI_LICENSE.txt</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/backButton.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/blueButton.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/cancel.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/grayButton.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/iui-logo-touch-icon.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/listArrow.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/listArrowSel.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/listGroup.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/loading.gif</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/pinstripes.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/right_button.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/selection.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/thumb.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/toggle.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/toggleOn.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/toolButton.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/toolButton_new.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/toolbar.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/images/whiteButton.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/js/application.js</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/js/jquery-1.2.6.min.js</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/js/rho.js</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/js/rhogeolocation-wm.js</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/public/js/rhogeolocation.js</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/apps/rhoconfig.txt</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/back_btn.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/db/syncdb.sqlite</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/forward_btn.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/gears.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/home_btn.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/icon.png</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/rhorunner.app/rhorunner</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/unzipbundle.rb</filename>
    </added>
    <added>
      <filename>platform/osx/Rhodes Launcher/version.plist</filename>
    </added>
    <added>
      <filename>platform/shared/common/Tokenizer.cpp</filename>
    </added>
    <added>
      <filename>platform/shared/common/Tokenizer.h</filename>
    </added>
    <added>
      <filename>platform/shared/db/DBAttrManager.cpp</filename>
    </added>
    <added>
      <filename>platform/shared/db/DBAttrManager.h</filename>
    </added>
    <added>
      <filename>platform/shared/net/URI.cpp</filename>
    </added>
    <added>
      <filename>platform/shared/net/URI.h</filename>
    </added>
    <added>
      <filename>platform/shared/ruby/ext/mapview/mapview.i</filename>
    </added>
    <added>
      <filename>platform/shared/ruby/ext/mapview/mapview_wrap.c</filename>
    </added>
    <added>
      <filename>platform/shared/rubyJVM/src/com/rho/IFileAccess.java</filename>
    </added>
    <added>
      <filename>platform/shared/rubyJVM/src/com/rho/IRAFile.java</filename>
    </added>
    <added>
      <filename>platform/shared/rubyJVM/src/com/rho/db/DBAttrManager.java</filename>
    </added>
    <added>
      <filename>platform/shared/rubyJVM/src/com/rho/sync/SyncNotify.java</filename>
    </added>
    <added>
      <filename>platform/shared/sync/SyncNotify.cpp</filename>
    </added>
    <added>
      <filename>platform/shared/sync/SyncNotify.h</filename>
    </added>
    <added>
      <filename>rakefile.rb</filename>
    </added>
    <added>
      <filename>res/build-tools/RhoRuby.exe</filename>
    </added>
    <added>
      <filename>res/build-tools/RubyMac</filename>
    </added>
    <added>
      <filename>res/build-tools/build_inf.js</filename>
    </added>
    <added>
      <filename>res/build-tools/db/syncdb.schema</filename>
    </added>
    <added>
      <filename>res/build-tools/insertRhoBundle2pkg.rb</filename>
    </added>
    <added>
      <filename>res/build-tools/rhodes_pid.key</filename>
    </added>
    <added>
      <filename>res/build-tools/xruby-0.3.3.jar</filename>
    </added>
    <added>
      <filename>res/generators/rhogen.rb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/Rakefile</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/Settings/controller.rb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/Settings/index.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/Settings/login.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/Settings/reset.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/Settings/wait.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/application.rb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/helpers/application_helper.rb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/index.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/layout.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/app/loading.html</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/build.yml</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/icon/icon.ico</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/icon/icon.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/css/base.css</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/css/blackberry.css</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/css/iphone.css</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/css/rho.css</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/css/xhtml.css</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/IUI_LICENSE.txt</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/backButton.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/blueButton.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/cancel.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/grayButton.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/iui-logo-touch-icon.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/listArrow.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/listArrowSel.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/listGroup.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/loading.gif</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/pinstripes.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/right_button.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/selection.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/thumb.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/toggle.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/toggleOn.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/toolButton.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/toolButton_new.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/toolbar.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/images/whiteButton.png</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/js/application.js</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/js/jquery-1.2.6.min.js</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/js/rho.js</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/js/rhogeolocation-wm.js</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/public/js/rhogeolocation.js</filename>
    </added>
    <added>
      <filename>res/generators/templates/application/rhoconfig.txt</filename>
    </added>
    <added>
      <filename>res/generators/templates/bundle/db/syncdb.sqlite</filename>
    </added>
    <added>
      <filename>res/generators/templates/model/config.rb</filename>
    </added>
    <added>
      <filename>res/generators/templates/model/controller.rb</filename>
    </added>
    <added>
      <filename>res/generators/templates/model/edit.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/model/index.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/model/new.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/model/show.erb</filename>
    </added>
    <added>
      <filename>res/generators/templates/source/source_adapter.rb</filename>
    </added>
    <added>
      <filename>rhodes.gemspec</filename>
    </added>
    <added>
      <filename>spec/README</filename>
    </added>
    <added>
      <filename>spec/Rakefile</filename>
    </added>
    <added>
      <filename>spec/app/Account/config.rb</filename>
    </added>
    <added>
      <filename>spec/app/Case/config.rb</filename>
    </added>
    <added>
      <filename>spec/app/Question/config.rb</filename>
    </added>
    <added>
      <filename>spec/app/Settings/controller.rb</filename>
    </added>
    <added>
      <filename>spec/app/Settings/index.erb</filename>
    </added>
    <added>
      <filename>spec/app/SpecRunner/controller.rb</filename>
    </added>
    <added>
      <filename>spec/app/SpecRunner/index.erb</filename>
    </added>
    <added>
      <filename>spec/app/application.rb</filename>
    </added>
    <added>
      <filename>spec/app/index.erb</filename>
    </added>
    <added>
      <filename>spec/app/layout.erb</filename>
    </added>
    <added>
      <filename>spec/app/loading.html</filename>
    </added>
    <added>
      <filename>spec/app/mspec.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/expectations.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/expectations/expectations.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/expectations/should.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/fileutils.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/background.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/bug.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/compliance.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/conflict.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/endian.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/extensions.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/guard.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/noncompliance.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/platform.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/quarantine.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/runner.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/superuser.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/support.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/tty.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/guards/version.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/argv.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/bignum.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/const_lookup.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/environment.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/fixture.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/flunk.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/io.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/language_version.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/ruby_exe.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/scratch.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/helpers/tmp.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/base.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/be_an_instance_of.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/be_ancestor_of.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/be_close.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/be_empty.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/be_false.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/be_kind_of.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/be_nil.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/be_true.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/complain.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/eql.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/equal.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/equal_element.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/equal_utf16.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/have_constant.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/have_instance_method.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/have_method.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/have_private_instance_method.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/include.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/match_yaml.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/method.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/output.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/output_to_fd.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/raise_error.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/respond_to.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/matchers/stringsymboladapter.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/mocks.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/mocks/mock.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/mocks/object.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/mocks/proxy.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/pp.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions/debug.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions/filter.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions/gdb.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions/tag.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions/taglist.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions/tagpurge.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions/tally.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/actions/timer.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/context.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/example.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/exception.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/filters.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/filters/match.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/filters/profile.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/filters/regexp.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/filters/tag.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/describe.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/dotted.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/file.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/html.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/method.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/specdoc.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/spinner.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/summary.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/unit.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/formatters/yaml.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/mspec.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/object.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/shared.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/runner/tag.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/utils/name_map.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/utils/options.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/utils/ruby_name.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/utils/script.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/utils/version.rb</filename>
    </added>
    <added>
      <filename>spec/app/mspec/version.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/fixtures/client_info.txt</filename>
    </added>
    <added>
      <filename>spec/app/spec/fixtures/object_values.txt</filename>
    </added>
    <added>
      <filename>spec/app/spec/pagination/fixtures/object_values.txt</filename>
    </added>
    <added>
      <filename>spec/app/spec/rho_controller_spec.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/rho_spec.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/rhom_db_adapter_spec.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/rhom_object_spec.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/rhom_spec.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/rhoruby_spec.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/spec_helper.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/syncengine_spec.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec/webview_spec.rb</filename>
    </added>
    <added>
      <filename>spec/app/spec_runner.rb</filename>
    </added>
    <added>
      <filename>spec/app_generator_spec.rb</filename>
    </added>
    <added>
      <filename>spec/build.yml</filename>
    </added>
    <added>
      <filename>spec/generator_spec_helper.rb</filename>
    </added>
    <added>
      <filename>spec/model_generator_spec.rb</filename>
    </added>
    <added>
      <filename>spec/public/css/base.css</filename>
    </added>
    <added>
      <filename>spec/public/css/blackberry.css</filename>
    </added>
    <added>
      <filename>spec/public/css/iphone.css</filename>
    </added>
    <added>
      <filename>spec/public/css/rho.css</filename>
    </added>
    <added>
      <filename>spec/public/css/xhtml.css</filename>
    </added>
    <added>
      <filename>spec/public/images/IUI_LICENSE.txt</filename>
    </added>
    <added>
      <filename>spec/public/images/backButton.png</filename>
    </added>
    <added>
      <filename>spec/public/images/blueButton.png</filename>
    </added>
    <added>
      <filename>spec/public/images/cancel.png</filename>
    </added>
    <added>
      <filename>spec/public/images/grayButton.png</filename>
    </added>
    <added>
      <filename>spec/public/images/iui-logo-touch-icon.png</filename>
    </added>
    <added>
      <filename>spec/public/images/listArrow.png</filename>
    </added>
    <added>
      <filename>spec/public/images/listArrowSel.png</filename>
    </added>
    <added>
      <filename>spec/public/images/listGroup.png</filename>
    </added>
    <added>
      <filename>spec/public/images/loading.gif</filename>
    </added>
    <added>
      <filename>spec/public/images/pinstripes.png</filename>
    </added>
    <added>
      <filename>spec/public/images/right_button.png</filename>
    </added>
    <added>
      <filename>spec/public/images/selection.png</filename>
    </added>
    <added>
      <filename>spec/public/images/thumb.png</filename>
    </added>
    <added>
      <filename>spec/public/images/toggle.png</filename>
    </added>
    <added>
      <filename>spec/public/images/toggleOn.png</filename>
    </added>
    <added>
      <filename>spec/public/images/toolButton.png</filename>
    </added>
    <added>
      <filename>spec/public/images/toolButton_new.png</filename>
    </added>
    <added>
      <filename>spec/public/images/toolbar.png</filename>
    </added>
    <added>
      <filename>spec/public/images/whiteButton.png</filename>
    </added>
    <added>
      <filename>spec/public/js/application.js</filename>
    </added>
    <added>
      <filename>spec/public/js/jquery-1.2.6.min.js</filename>
    </added>
    <added>
      <filename>spec/public/js/rho.js</filename>
    </added>
    <added>
      <filename>spec/public/js/rhogeolocation-wm.js</filename>
    </added>
    <added>
      <filename>spec/public/js/rhogeolocation.js</filename>
    </added>
    <added>
      <filename>spec/rhoconfig.txt</filename>
    </added>
    <added>
      <filename>spec/source_generator_spec.rb</filename>
    </added>
    <added>
      <filename>spec/spec.opts</filename>
    </added>
    <added>
      <filename>spec/spec_helper.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,15 @@
 require 'find'
 require 'erb'
-require 'rhodes/rhodes-build/lib/jake.rb'
+
+chdir File.dirname(__FILE__)
+
+require 'lib/build/jake.rb'
 
 load 'platform/bb/build/bb.rake'
 load 'platform/android/build/android.rake'
 load 'platform/iphone/rbuild/iphone.rake'
 load 'platform/wm/build/wm.rake'
+load 'platform/linux/tasks/linux.rake'
 
 namespace &quot;config&quot; do
   task :common do
@@ -19,13 +23,30 @@ namespace &quot;config&quot; do
     else
       $all_files_mask = &quot;*&quot;
     end
+    if $app_path.nil? #if we are called from the rakefile directly, this wont be set
+      #load the apps path and config
 
+      $app_path = $config[&quot;env&quot;][&quot;app&quot;]
+      $app_config = YAML::load_file($app_path + &quot;/build.yml&quot;)
+
+    end
+    Jake.set_bbver($app_config[&quot;bbver&quot;].to_s)
   end
 end
 
+def copy_assets(asset)
+  
+  dest = File.join($srcdir,'apps/public')
+  
+  cp_r asset + &quot;/.&quot;, dest, :remove_destination =&gt; true 
+  
+end
+
+
+
 def common_bundle_start(startdir, dest)
-  app = $config[&quot;env&quot;][&quot;app&quot;]
-  rhodeslib = &quot;rhodes/rhodes-framework/lib&quot;
+  app = $app_path
+  rhodeslib = &quot;lib/framework&quot;
 
   rm_rf $srcdir
   mkdir_p $srcdir
@@ -50,6 +71,8 @@ def common_bundle_start(startdir, dest)
   cp_r app + '/app',File.join($srcdir,'apps')
   cp_r app + '/public', File.join($srcdir,'apps')
   cp   app + '/rhoconfig.txt', File.join($srcdir,'apps')
+
+  copy_assets($assetfolder) if ($assetfolder and File.exists? $assetfolder)
 end
 
 def create_manifest
@@ -75,17 +98,23 @@ namespace &quot;build&quot; do
   namespace &quot;bundle&quot; do
     task :xruby do
       #needs $config, $srcdir, $excludelib, $bindir
-      app = $config[&quot;env&quot;][&quot;app&quot;]
+      app = $app_path
       startdir = pwd
-      dest = startdir + &quot;/&quot; + $srcdir
-      xruby =  File.dirname(__FILE__) + '/rhodes/rhodes-build/res/xruby-0.3.3.jar'
+      dest =  $srcdir
+      xruby =  File.dirname(__FILE__) + '/res/build-tools/xruby-0.3.3.jar'
 
       common_bundle_start(startdir,dest)
 
-      chdir File.join($srcdir,'apps/public')
-      rm_rf 'js/iui'
-      Dir.glob(&quot;js/jquery*&quot;).each {|f| rm_rf f}
-      Dir.glob(&quot;js/prototype*&quot;).each {|f| rm f}
+      if not $config[&quot;excludedirs&quot;].nil?
+        if $config[&quot;excludedirs&quot;].has_key?($config[&quot;platform&quot;])
+          chdir File.join($srcdir, 'apps')
+
+          excl = $config[&quot;excludedirs&quot;][$config[&quot;platform&quot;]]
+          excl.each do |mask|
+            Dir.glob(mask).each {|f| rm_rf f}
+          end
+        end
+      end
       chdir startdir
       
       #create manifest
@@ -126,24 +155,35 @@ namespace &quot;build&quot; do
     end
 
     task :noxruby do
-      app = $config[&quot;env&quot;][&quot;app&quot;]
-      rhodeslib = &quot;rhodes/rhodes-framework/lib&quot;
-      compileERB = &quot;rhodes/rhodes-build/lib/compileERB/default.rb&quot;
-      compileRB = &quot;rhodes/rhodes-build/lib/compileRB/compileRB.rb&quot;
+      app = $app_path
+      rhodeslib = File.dirname(__FILE__) + &quot;/lib/framework&quot;
+      compileERB = &quot;lib/build/compileERB/default.rb&quot;
+      compileRB = &quot;lib/build/compileRB/compileRB.rb&quot;
       startdir = pwd
-      dest = startdir + &quot;/&quot; + $srcdir + &quot;/lib&quot;      
+      dest = $srcdir + &quot;/lib&quot;      
 
       common_bundle_start(startdir,dest)
 
       create_manifest
       
       cp   compileERB, $srcdir
-      puts `#{$rubypath} -R#{rhodeslib} #{$srcdir}/default.rb` 
+      puts &quot;Running default.rb&quot;
+
+      puts `#{$rubypath} -I#{rhodeslib} #{$srcdir}/default.rb` 
+      unless $? == 0
+        puts &quot;Error interpreting erb code&quot;
+        exit 1
+      end
 
       rm &quot;#{$srcdir}/default.rb&quot;
 
       cp   compileRB, $srcdir
-      puts `#{$rubypath} -R#{rhodeslib} #{$srcdir}/compileRB.rb` 
+      puts &quot;Running compileRB&quot;
+      puts `#{$rubypath} -I#{rhodeslib} #{$srcdir}/compileRB.rb` 
+      unless $? == 0
+        puts &quot;Error interpreting ruby code&quot;
+        exit 1
+      end
 
       chdir $srcdir
       Dir.glob(&quot;**/*.rb&quot;) { |f| rm f }
@@ -151,7 +191,7 @@ namespace &quot;build&quot; do
   
       chdir startdir
 
-      cp_r &quot;rhodes/rhodes-build/res/prebuilt/common/db&quot;, $srcdir 
+      cp_r &quot;res/build-tools/db&quot;, $srcdir 
     end
   end
 end
@@ -160,7 +200,7 @@ end
 # Simple rakefile that loads subdirectory 'rhodes' Rakefile
 # run &quot;rake -T&quot; to see list of available tasks
 
-desc &quot;Get versions&quot;
+#desc &quot;Get versions&quot;
 task :get_version do
   bbver = &quot;unknown&quot;
   iphonever = &quot;unknown&quot;
@@ -221,14 +261,14 @@ task :get_version do
     end
   end
 
-  File.open(&quot;rhodes/rhodes-build/lib/version.rb&quot;,&quot;r&quot;) do |f|
+  File.open(&quot;lib/build/version.rb&quot;,&quot;r&quot;) do |f|
     file = f.read
     if file.match(/VERSION = '(\d+\.\d+\.*\d*)'/)
       rbuildver =  $1
     end
   end
 
-  File.open(&quot;rhodes/rhodes-framework/lib/version.rb&quot;,&quot;r&quot;) do |f|
+  File.open(&quot;lib/framework/version.rb&quot;,&quot;r&quot;) do |f|
     file = f.read
     if file.match(/VERSION = '(\d+\.\d+\.*\d*)'/)
       rframever =  $1
@@ -255,7 +295,7 @@ task :get_version do
   puts &quot;  Rhodes Generator: &quot; + rgenver
 end
 
-desc &quot;Set version&quot;
+#desc &quot;Set version&quot;
 task :set_version, [:version] do |t,args|
   throw &quot;You must pass in version&quot; if args.version.nil?
   ver = args.version.split(/\./)
@@ -302,9 +342,9 @@ task :set_version, [:version] do |t,args|
   end
 
   [&quot;rhodes/rhodes/lib/rhodes.rb&quot;,
-    &quot;rhodes/rhodes-build/lib/version.rb&quot;,
-    &quot;rhodes/rhodes-framework/lib/version.rb&quot;,
-    &quot;rhodes/rhodes-framework/lib/rhodes.rb&quot;,
+    &quot;lib/build/version.rb&quot;,
+    &quot;lib/framework/version.rb&quot;,
+    &quot;lib/framework/rhodes.rb&quot;,
     &quot;rhodes/rhodes-generator/lib/version.rb&quot;].each do |versionfile|
   
     File.open(versionfile,&quot;r&quot;) { |f| origfile = f.read }
@@ -317,145 +357,16 @@ task :set_version, [:version] do |t,args|
   Rake::Task[:get_version].invoke  
 end
 
-namespace &quot;prebuild&quot; do
-  desc &quot;Prebuild binaries for WM gems&quot;
-  task :wm do
-    basedir = pwd
-    if RUBY_PLATFORM =~ /(win|w)32$/
-      rake = &quot;cmd.exe /c rake&quot;
-      ant = &quot;ant.bat&quot;
-    else
-      rake = &quot;rake&quot;
-      ant = &quot;ant&quot;
-    end
-
-    chdir 'platform/wm/build'
-
-    zip = File.join(basedir,'rhodes/rhodes-build/res/7z.exe')
-
-    puts `#{rake} compile`
-      unless $? == 0
-        puts &quot;Error compiling WM code&quot;
-        exit 1
-      end
-    chdir '../bin'
-    throw &quot;windows build missing&quot; if not File.exists? 'Windows Mobile 6 Professional SDK (ARMV4I)'
-  
-    puts `#{zip} a -mx=9 -r wm6.7z &quot;Windows Mobile 6 Professional SDK (ARMV4I)&quot;`
-    throw &quot;windows zip missing&quot; if not File.exists? 'wm6.7z'
-  
-    cp &quot;wm6.7z&quot;, &quot;../../../rhodes/rhodes-build/res/prebuilt/wm&quot;
-
-    chdir basedir
-
-    #   chdir &quot;platform/symbian/build&quot;
-    #   filecontents = &quot;&quot;
-    #   File.open(&quot;build.properties&quot;,&quot;r&quot;) { |f| filecontents = f.read }
-    #   File.open(&quot;build.properties&quot;,&quot;w&quot;) do |f|
-    #     filecontents.gsub!(/build\.target=[A-Z ]+/,&quot;build.target=GCCE UREL&quot;)
-    #     f.write filecontents
-    #   end
-    #   if filecontents.match(/S60_3rd_FP1=(.+)/)
-    #     epoc32 = $1
-    #   else
-    #     epoc32 = &quot;\\Symbian\\9.2\\S60_3rd_FP1\\&quot;
-    #   end
-    #
-    #   epoc32.gsub!(/\\\\/,&quot;\\&quot;)
-    #
-    #   puts `#{ant} build-prebuilt  -DSDK=S60_3rd_FP1`
-    #   puts &quot;Looking for: &quot; + File.join(epoc32,&quot;Epoc32\\release\\gcce\\urel\\rhodes.exe&quot;)
-    #   throw &quot;symbian rhodes.exe missing&quot; if not File.exists?(File.join(epoc32,&quot;Epoc32\\release\\gcce\\urel\\rhodes.exe&quot;))
-    #
-    #   prebuilt = &quot;../../../rhodes/rhodes-build/res/prebuilt/symbian/&quot;
-    #
-    #   rm_rf prebuilt + &quot;Epoc32&quot;
-    #
-    #   mkdir_p prebuilt + &quot;Epoc32/data/z/private/10003a3f&quot;
-    #   mkdir_p prebuilt + &quot;Epoc32/data/z/resource&quot;
-    #   mkdir_p prebuilt + &quot;Epoc32/data/z/system&quot;
-    #   mkdir_p prebuilt + &quot;Epoc32/release/gcce/urel&quot;
-    #
-    #   cp_r epoc32 + &quot;Epoc32\\data\\z\\private\\10003a3f\\apps\\&quot;, prebuilt + &quot;Epoc32/data/z/private/10003a3f/&quot;, :verbose =&gt; true
-    #   cp_r epoc32 + &quot;Epoc32\\data\\z\\resource\\apps\\&quot;, prebuilt + &quot;Epoc32/data/z/resource/&quot;
-    #   cp_r epoc32 + &quot;Epoc32\\data\\z\\system\\data\\&quot;, prebuilt + &quot;Epoc32/data/z/system/&quot;
-    #   cp_r epoc32 + &quot;Epoc32\\release\\gcce\\urel\\rhodes.exe&quot;, prebuilt + &quot;Epoc32/release/gcce/urel/&quot;
-    #
-    #
-    #
-    #   File.open(&quot;build.properties&quot;,&quot;w&quot;) do |f|
-    #     filecontents.gsub!(/build\.target=[A-Z ]+/,&quot;build.target=WINSCW UDEB&quot;)
-    #     f.write filecontents
-    #   end
-    #
-    #
-    #
-    #   puts `#{ant} build-prebuilt  -DSDK=S60_3rd_FP1`
-    #   puts &quot;Looking for: &quot; + File.join(epoc32,&quot;Epoc32\\release\\winscw\\deb\\rhodes.exe&quot;)
-    #   throw &quot;symbian rhodes.exe missing&quot; if not File.exists?(File.join(epoc32,&quot;Epoc32\\release\\winscw\\udeb\\rhodes.exe&quot;))
-    #
-    #   mkdir_p prebuilt + &quot;Epoc32/winscw/c/Data/Rho&quot;
-    #   mkdir_p prebuilt + &quot;Epoc32/release/winscw/udeb&quot;
-    #
-    #   cp_r epoc32 + &quot;Epoc32\\winscw\\c\\Data\\Rho\\rhologpath.txt&quot;, prebuilt + &quot;Epoc32/winscw/c/data/Rho&quot;
-    #   cp_r epoc32 + &quot;Epoc32\\release\\winscw\\udeb\\rhodes.exe&quot;, prebuilt + &quot;Epoc32/release/winscw/udeb/&quot;
-
-
-  end
-
-  desc &quot;Prebuild iPhone binaries for gems&quot;
-  task :iphone do
-    basedir = pwd
-    rake = &quot;rake&quot;
-    ant = &quot;ant&quot;
-    prebuilt = &quot;../../../rhodes/rhodes-build/res/prebuilt/iphone/&quot;
-
-    chdir 'platform/iphone/rbuild'
-	# Simulator
-    puts `#{ant} clean -Diphone.sdk=iphonesimulator3.0 -Diphone.config=Debug`
-    unless $? == 0
-      puts &quot;Error cleaning iphone&quot;
-      exit 1
-    end
-    puts `#{ant} buildapp -Diphone.sdk=iphonesimulator3.0 -Diphone.config=Debug`
-
-    throw &quot;cant find rhorunner.app!&quot; if not File.exists? &quot;../build/Debug-iphonesimulator/rhorunner.app&quot;
-
-	mkdir_p prebuilt + &quot;sim&quot;
-    rm_rf prebuilt + &quot;sim/rhorunner.app&quot;
-    cp_r  &quot;../build/Debug-iphonesimulator/rhorunner.app&quot;, prebuilt + &quot;sim/&quot;
-
-    rm_rf prebuilt + &quot;sim/rhorunner.app/apps&quot;
-    rm_rf prebuilt + &quot;sim/rhorunner.app/lib&quot;
-    chdir basedir
-	
-	# Device
-    #chdir 'platform/iphone/rbuild'	
-    #puts `#{ant} clean -Diphone.sdk=iphoneos2.2.1 -Diphone.config=Release`
-    #puts `#{ant} buildapp -Diphone.sdk=iphoneos2.2.1 -Diphone.config=Release`
-
-    #throw &quot;cant find rhorunner.app!&quot; if not File.exists? &quot;../build/Release-iphoneos/rhorunner.app&quot;
-
-	#mkdir_p prebuilt + &quot;device&quot;
-    #rm_rf prebuilt + &quot;device/rhorunner.app&quot;
-    #cp_r  &quot;../build/Release-iphoneos/rhorunner.app&quot;, prebuilt + &quot;device/&quot;
 
-    #rm_rf prebuilt + &quot;device/rhorunner.app/apps&quot;
-    #rm_rf prebuilt + &quot;device/rhorunner.app/lib&quot;
-
-    #chdir basedir
-  end
-
-end
 
 namespace &quot;buildall&quot; do
   namespace &quot;bb&quot; do
-    desc &quot;Build all jdk versions for blackberry&quot;
+#    desc &quot;Build all jdk versions for blackberry&quot;
     task :production =&gt; &quot;config:common&quot; do
       $config[&quot;env&quot;][&quot;paths&quot;].each do |k,v|
         if k.to_s =~ /^4/
           puts &quot;BUILDING VERSION: #{k}&quot;
-          $config[&quot;env&quot;][&quot;bbver&quot;] = k
+          $app_config[&quot;bbver&quot;] = k
           Jake.reconfig($config)
  
           #reset all tasks used for building
@@ -483,3 +394,38 @@ namespace &quot;buildall&quot; do
   end
 end
 
+task :gem do
+  puts &quot;Removing old gem&quot;
+  rm_rf Dir.glob(&quot;*.gem&quot;)
+  puts &quot;Copying Rakefile&quot;
+  cp &quot;Rakefile&quot;, &quot;rakefile.rb&quot;
+  
+  puts &quot;Building manifest&quot;
+  out = &quot;&quot;
+  Dir.glob(&quot;**/*&quot;) {|fname| out &lt;&lt; fname + &quot;\n&quot; if File.file? fname}
+  File.open(&quot;Manifest.txt&quot;,'w') {|f| f.write(out)}
+
+  puts &quot;Loading gemspec&quot;
+  spec = Gem::Specification.load('rhodes.gemspec')
+
+  puts &quot;Building gem&quot;
+  gemfile = Gem::Builder.new(spec).build
+end
+
+task :tasks do
+  Rake::Task.tasks.each {|t| puts t.to_s}
+end
+
+task :switch_app =&gt; &quot;config:common&quot; do
+  rhobuildyml = File.dirname(__FILE__) + &quot;/rhobuild.yml&quot;
+  if File.exists? rhobuildyml
+    config = YAML::load_file(rhobuildyml)
+  else
+    puts &quot;Cant find rhobuild.yml&quot;
+    exit 1
+  end
+  config[&quot;env&quot;][&quot;app&quot;] = $app_path.gsub(/\\/,&quot;/&quot;)
+  File.open(  rhobuildyml, 'w' ) do |out|
+    YAML.dump( config, out )
+  end
+end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -76,17 +76,18 @@ public final class R {
         public static final int about_rhodes=0x7f04000e;
         public static final int app_name=0x7f040000;
         public static final int back=0x7f040004;
-        public static final int cancel=0x7f040012;
+        public static final int cancel=0x7f040013;
         public static final int db_schema=0x7f04000f;
         public static final int deleteTrigger=0x7f040010;
         public static final int exit=0x7f040007;
         public static final int forward=0x7f040003;
         public static final int home=0x7f040001;
+        public static final int insertTrigger=0x7f040011;
         public static final int logoptions=0x7f04000b;
         public static final int logview=0x7f04000a;
         public static final int navigation=0x7f040005;
         public static final int no_files=0x7f04000c;
-        public static final int ok=0x7f040011;
+        public static final int ok=0x7f040012;
         public static final int options=0x7f040009;
         public static final int refresh=0x7f040002;
         public static final int sync=0x7f040008;</diff>
      <filename>platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java</filename>
    </modified>
    <modified>
      <diff>@@ -19,17 +19,31 @@
 	Drop Table If Exists [object_values_to_delete];
 	CREATE TABLE 'object_values_to_delete' (
 	 'id' INTEGER PRIMARY KEY NOT NULL,
-	 'value' text default NULL,
-	 'update_type' varchar(255) default NULL,
+	 'source_id' INTEGER default NULL,
+	 'attrib' varchar(255) default NULL,
+	 'object' varchar(255) default NULL,
+	 'value' varchar(255) default NULL,
 	 'attrib_type' varchar(255) default NULL);
+	DROP TABLE IF EXISTS [object_attribs_to_load];
+	CREATE TABLE 'object_attribs_to_load' (
+	 'id' INTEGER PRIMARY KEY NOT NULL,
+	 'source_id' INTEGER NOT NULL,
+	 'name' varchar(255) default NULL);
     &lt;/string&gt;
 	&lt;string name=&quot;deleteTrigger&quot;&gt;
 	CREATE TRIGGER rhodeleteTrigger BEFORE DELETE ON object_values
 	FOR EACH ROW
 	BEGIN
-	INSERT INTO object_values_to_delete VALUES (OLD.id, OLD.value,OLD.attrib_type,OLD.update_type);
+	INSERT INTO object_values_to_delete VALUES (OLD.id, OLD.source_id, OLD.attrib, OLD.object, OLD.value, OLD.attrib_type);
 	END;
 	&lt;/string&gt;    
+	&lt;string name=&quot;insertTrigger&quot;&gt;
+	CREATE TRIGGER rhoinsertTrigger BEFORE INSERT ON object_values
+	FOR EACH ROW
+	BEGIN
+	INSERT INTO object_attribs_to_load VALUES (NEW.id, NEW.source_id, NEW.attrib);
+	END;
+	&lt;/string&gt;
 &lt;string name=&quot;ok&quot;&gt;   Ok   &lt;/string&gt;
 &lt;string name=&quot;cancel&quot;&gt;Cancel&lt;/string&gt;
 &lt;/resources&gt;</diff>
      <filename>platform/android/Rhodes/res/values/strings.xml</filename>
    </modified>
    <modified>
      <diff>@@ -71,6 +71,7 @@ public final class AndroidR {
         public static final int back=R.string.back;
         public static final int db_schema=R.string.db_schema;
         public static final int deleteTrigger=R.string.deleteTrigger;
+        public static final int insertTrigger=R.string.insertTrigger;
         public static final int exit=R.string.exit;
         public static final int forward=R.string.forward;
         public static final int home=R.string.home;</diff>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,8 @@ import java.net.URL;
 
 import com.rho.net.IHttpConnection;
 import com.rho.net.INetworkAccess;
+import com.rho.net.RhoConnection;
+import com.rho.net.URI;
 import com.rhomobile.rhodes.http.HttpHeader;
 
 public class NetworkAccessImpl implements INetworkAccess {
@@ -21,6 +23,7 @@ public class NetworkAccessImpl implements INetworkAccess {
 		return RhodesInstance.getInstance().getHomeUrl();
 	}
 	
+	/*
 	public boolean doLocalRequest(String strUrl, String strBody)
 	{
 		HttpHeader headers = new HttpHeader();
@@ -30,6 +33,7 @@ public class NetworkAccessImpl implements INetworkAccess {
 		
 		return true;
 	}
+	*/
 	
 	public IHttpConnection connect(String server) throws IOException {
 		
@@ -38,6 +42,11 @@ public class NetworkAccessImpl implements INetworkAccess {
 			server = server.substring(0, fragment);
 		}
 		
+		if (URI.isLocalHost(server)) {
+			URI uri = new URI(server);
+			return new RhoConnection(uri);
+		}
+		
 		URL url = new URL(server);
 		
 		HttpURLConnection urlc = (HttpURLConnection)url.openConnection();</diff>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/NetworkAccessImpl.java</filename>
    </modified>
    <modified>
      <diff>@@ -424,6 +424,9 @@ public class Platform extends Activity {
         thread.start();                       
     }
 
+    public void executeJs(String js) {
+    	this.webView.loadUrl(&quot;javascript:&quot; + js);
+    }
 	
 	public String getStartPage() {
 		return startPage;</diff>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/Platform.java</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,10 @@ package com.rhomobile.rhodes;
 import android.content.Context;
 import android.telephony.*; 
 
+import com.rho.IFileAccess;
+import com.rho.IRAFile;
 import com.rho.IRhoRubyHelper;
+import com.rho.RhoConf;
 import com.rho.db.IDBStorage;
 import com.rhomobile.rhodes.camera.Camera;
 import com.rhomobile.rhodes.datetime.DateTimePicker;
@@ -30,6 +33,7 @@ public class RhoRubyHelper implements IRhoRubyHelper {
 		RhoPhonebook.initMethods(RubyRuntime.PhonebookClass);
 		Camera.initMethods(RubyRuntime.CameraClass);
 		WebView.initMethods(RubyRuntime.WebViewClass);
+		RhoConf.initMethods(RubyRuntime.RhoConfClass);
 		DateTimePicker.initMethods(RubyRuntime.DateTimePickerClass);
 		RingtoneManager.initMethods(RubyRuntime.RingtoneManagerClass);
 		NativeBar.initMethods(RubyRuntime.NativeBarClass);
@@ -109,4 +113,12 @@ public class RhoRubyHelper implements IRhoRubyHelper {
 		return new DBStorage();
 	}
 
+	public IFileAccess createFileAccess() {
+		return new FileAccess();
+	}
+
+	public IRAFile createRAFile() {
+		return new RAFile();
+	}
+
 }</diff>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/RhoRubyHelper.java</filename>
    </modified>
    <modified>
      <diff>@@ -39,6 +39,12 @@ public class WebView extends RubyBasic {
 		return RubyConstant.QTRUE;
 	}
 	
+	public static RubyValue execute_js(RubyValue arg0) {
+		String js = arg0.toString();
+		RhodesInstance.getInstance().executeJs(js);
+		return RubyConstant.QNIL;
+	}
+	
 	
 	public static RubyValue current_location() {
 		String url = RhodesInstance.getInstance().getCurrentUrl();
@@ -66,6 +72,11 @@ public class WebView extends RubyBasic {
 				return WebView.set_menu_items(arg0);
 			}
 		});
+		klass.getSingletonClass().defineMethod(&quot;execute_js&quot;, new RubyOneArgMethod() {
+			protected RubyValue run(RubyValue receiver, RubyValue arg0, RubyBlock block) {
+				return WebView.execute_js(arg0);
+			}
+		});
 		
 	}
 	</diff>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,12 @@ public class DBStorage implements IDBStorage {
 		    rhoDB.endTransaction();
 	}
 
+    synchronized public void rollback() throws DBException
+    {
+        if (rhoDB != null &amp;&amp; rhoDB.isOpen())
+            rhoDB.rollbackTransaction();
+    }
+
 	synchronized public IDBResult createResult() {
 		return new SqliteDBResult();
 	}
@@ -42,31 +48,56 @@ public class DBStorage implements IDBStorage {
 		andFile.delete(strPath);
 	}
 
-	synchronized public IDBResult executeSQL(String strStatement, Object[] values)
+    synchronized public IDBResult executeSQL(String strStatement, Object[] values, boolean bReportNonUnique)
 			throws DBException {
 		if (rhoDB != null &amp;&amp; rhoDB.isOpen()) {
-			IDBResult result = rhoDB.executeSQL(strStatement, values);
+            IDBResult result = executeSQLNoCallbacks(strStatement, values, bReportNonUnique);
 			
+			onInsertRecords(strStatement);
 			onDeleteRecords(strStatement);
 			
 			return result;
 		}
 		return null;
 	}
+    
+    synchronized private IDBResult executeSQLNoCallbacks(String strStatement, Object[] values,
+    		boolean bReportNonUnique) throws DBException
+    {
+    	return rhoDB.executeSQL(strStatement, values, bReportNonUnique);
+    }
+	
+	void onInsertRecords(String strStatement) {
+		IDBResult rows2Insert = null;
+		try {
+			if (this.callback == null)
+				return;
+			
+			if (!strStatement.toLowerCase().startsWith(&quot;insert &quot;))
+				return;
+			
+			rows2Insert = executeSQLNoCallbacks(&quot;SELECT * FROM object_attribs_to_load&quot;, null, false);
+			this.callback.OnInsertIntoTable(&quot;object_values&quot;, rows2Insert);
+			executeSQLNoCallbacks(&quot;DELETE FROM object_attribs_to_load&quot;, null, false);
+		}
+		catch (Exception e) {
+			LOG.ERROR(e.getMessage());
+		}
+	}
 	
 	void onDeleteRecords(String strStatement){
 		IDBResult rows2Delete = null;
 		try
 		{
-			if ( strStatement.toLowerCase().indexOf(&quot; delete &quot;) == -1 )
-				return;
-		
-			if ( this.callback == null )
+			if (this.callback == null)
 				return;
 			
-			rows2Delete = executeSQL(&quot;SELECT attrib_type, update_type, value FROM object_values_to_delete&quot;, null);
-			
+			if (!strStatement.toLowerCase().startsWith(&quot;delete &quot;))
+				return;
+		
+			rows2Delete = executeSQLNoCallbacks(&quot;SELECT * FROM object_values_to_delete&quot;, null,false);
 			this.callback.OnDeleteFromTable(&quot;object_values&quot;, rows2Delete);
+			executeSQLNoCallbacks(&quot;DELETE FROM object_values_to_delete&quot;, null, false);
 		}
 		catch( Exception e ){
 			LOG.ERROR(e.getMessage());</diff>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/db/DBStorage.java</filename>
    </modified>
    <modified>
      <diff>@@ -6,8 +6,10 @@ import com.rho.db.DBException;
 import com.rho.db.IDBResult;
 import com.rhomobile.rhodes.AndroidR;
 import android.content.Context;
+import android.database.Cursor;
 import android.database.DatabaseUtils;
 import android.database.SQLException;
+import android.database.sqlite.SQLiteConstraintException;
 import android.database.sqlite.SQLiteDatabase;
 import android.database.sqlite.SQLiteOpenHelper;
 import android.database.sqlite.SQLiteStatement;
@@ -82,6 +84,10 @@ public class RhoDB extends SQLiteOpenHelper {
 			SQLiteStatement stTrigger = db.compileStatement(ctx
 					.getString(AndroidR.string.deleteTrigger));
 			stTrigger.execute();
+			
+			stTrigger = db.compileStatement(ctx.
+					getString(AndroidR.string.insertTrigger));
+			stTrigger.execute();
 
 			db.setVersion(dbVersion);
 
@@ -145,12 +151,24 @@ public class RhoDB extends SQLiteOpenHelper {
 			db.endTransaction();
 		}
 	}
+	
+	public void rollbackTransaction() {
+		if (db == null)
+			throw new SQLException(
+					&quot;Database must be opened before rollback transaction&quot;);
+		
+		if (db.inTransaction()) {
+			db.endTransaction();
+		}
+	}
+	
+	public IDBResult executeSQL(String strStatement, Object[] values) throws DBException {
+		return executeSQL(strStatement, values, false);
+	}
 
-	public IDBResult executeSQL(String strStatement, Object[] values)
+	public IDBResult executeSQL(String strStatement, Object[] values, boolean bReportNonUnique)
 			throws DBException {
 
-		SqliteDBResult result = new SqliteDBResult();
-
 		if (db == null)
 			throw new DBException(new SQLException(
 					&quot;Database must be opened before insert new data!&quot;));
@@ -164,9 +182,27 @@ public class RhoDB extends SQLiteOpenHelper {
 			}
 		}
 
-		result.copy(db.rawQuery(strStatement, params));
-
-		return result;
+		Cursor cursor = null;
+		try {
+			cursor = db.rawQuery(strStatement, params);
+			SqliteDBResult result = new SqliteDBResult();
+			result.copy(cursor);
+			return result;
+		}
+		catch (SQLiteConstraintException e) {
+			if (bReportNonUnique)
+				return new SqliteDBResult(true);
+			Log.e(LOG_TAG, &quot;SQL error&quot;, e);
+			return null;
+		}
+		catch (Exception e) {
+			Log.e(LOG_TAG, &quot;SQL error&quot;, e);
+			return null;
+		}
+		finally {
+			if (cursor != null)
+				cursor.close();
+		}
 	}
 
 	public void bindParams(String[] params, int i, Object value) {</diff>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/db/RhoDB.java</filename>
    </modified>
    <modified>
      <diff>@@ -17,10 +17,20 @@ public class SqliteDBResult implements IDBResult {
 	private boolean useLocalCursor = false;
 	private List&lt; List&lt;String&gt; &gt; localDataCopy = new ArrayList&lt; List&lt;String&gt; &gt;();
 	private List&lt;String&gt; cashedColumnsNames =  new ArrayList&lt; String &gt; ();
+	private boolean nonUnique = false;
 	
 	public SqliteDBResult() {
 		//lock.getWriteLock();
 	}
+	
+	public SqliteDBResult(boolean bNonUnique) {
+		nonUnique = bNonUnique;
+	}
+
+    public boolean isNonUnique()
+    {
+        return nonUnique;
+    }
 
 	public void assign(Cursor cursor) {
 		this.cursor = cursor;</diff>
      <filename>platform/android/Rhodes/src/com/rhomobile/rhodes/db/SqliteDBResult.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 &lt;classpath&gt;
-	&lt;classpathentry kind=&quot;src&quot; path=&quot;shared&quot;/&gt;
+	&lt;classpathentry kind=&quot;src&quot; path=&quot;src&quot;/&gt;
 	&lt;classpathentry kind=&quot;con&quot; path=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot;/&gt;
 	&lt;classpathentry kind=&quot;output&quot; path=&quot;bin&quot;/&gt;
 &lt;/classpath&gt;</diff>
      <filename>platform/android/RubyJVM/.classpath</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@
 	&lt;/natures&gt;
 	&lt;linkedResources&gt;
 		&lt;link&gt;
-			&lt;name&gt;shared&lt;/name&gt;
+			&lt;name&gt;src&lt;/name&gt;
 			&lt;type&gt;2&lt;/type&gt;
 			&lt;locationURI&gt;RHO_SHARED/rubyJVM/src&lt;/locationURI&gt;
 		&lt;/link&gt;</diff>
      <filename>platform/android/RubyJVM/.project</filename>
    </modified>
    <modified>
      <diff>@@ -11,6 +11,7 @@ platform/android/Rhodes/src/com/rhomobile/rhodes/db/DBStorage.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/db/RhoDB.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/db/RWLock.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/db/SqliteDBResult.java
+platform/android/Rhodes/src/com/rhomobile/rhodes/FileAccess.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/RingtoneManager.java
@@ -36,6 +37,7 @@ platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Contact.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactList.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/RhoPhonebook.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/Platform.java
+platform/android/Rhodes/src/com/rhomobile/rhodes/RAFile.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/ResourceFetchThread.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java
 platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java</diff>
      <filename>platform/android/build/RhodesSRC_build.files</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,14 @@
 platform/shared/rubyJVM/src/com/rho/DateTimeTokenizer.java
 platform/shared/rubyJVM/src/com/rho/db/DBAdapter.java
+platform/shared/rubyJVM/src/com/rho/db/DBAttrManager.java
 platform/shared/rubyJVM/src/com/rho/db/DBException.java
 platform/shared/rubyJVM/src/com/rho/db/IDBCallback.java
 platform/shared/rubyJVM/src/com/rho/db/IDBResult.java
 platform/shared/rubyJVM/src/com/rho/db/IDBStorage.java
 platform/shared/rubyJVM/src/com/rho/FilePath.java
 platform/shared/rubyJVM/src/com/rho/IFile.java
+platform/shared/rubyJVM/src/com/rho/IFileAccess.java
+platform/shared/rubyJVM/src/com/rho/IRAFile.java
 platform/shared/rubyJVM/src/com/rho/IRhoLogSink.java
 platform/shared/rubyJVM/src/com/rho/IRhoRubyHelper.java
 platform/shared/rubyJVM/src/com/rho/location/GeoLocation.java
@@ -36,6 +39,7 @@ platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java
 platform/shared/rubyJVM/src/com/rho/sync/SyncEngine.java
 platform/shared/rubyJVM/src/com/rho/sync/SyncSource.java
 platform/shared/rubyJVM/src/com/rho/sync/SyncThread.java
+platform/shared/rubyJVM/src/com/rho/sync/SyncNotify.java
 platform/shared/rubyJVM/src/com/rho/sync/ClientRegister.java
 platform/shared/rubyJVM/src/com/rho/sync/ISyncStatusListener.java
 platform/shared/rubyJVM/src/com/rho/TestProfiler.java</diff>
      <filename>platform/android/build/RubyVM_build.files</filename>
    </modified>
    <modified>
      <diff>@@ -1,48 +1,67 @@
 #
-def set_app_name(newname)
-  fname = Jake.get_absolute $androidpath + &quot;/Rhodes/res/values/strings.xml&quot;
+def set_app_name_android(newname)
+  puts &quot;set_app_name&quot;
+  $stdout.flush
+
+  fname = Jake.get_absolute File.join($androidpath, &quot;Rhodes&quot;, &quot;res&quot;, &quot;values&quot;, &quot;strings.xml&quot;)
   buf = File.new(fname,&quot;r&quot;).read.gsub(/&quot;app_name&quot;&gt;.*&lt;\/string&gt;/,&quot;\&quot;app_name\&quot;&gt;#{newname}&lt;/string&gt;&quot;)
   File.open(fname,&quot;w&quot;) { |f| f.write(buf) }
 
+  lowname = newname.downcase.gsub(/[^A-Za-z_0-9]/, '')
+
+  fname = Jake.get_absolute File.join($androidpath, &quot;Rhodes&quot;, &quot;AndroidManifest.xml&quot;)
+  buf = File.new(fname,&quot;r&quot;).read.gsub(/package=&quot;.*&quot;/,&quot;package=\&quot;com.rhomobile.#{lowname}\&quot;&quot;)
+  File.open(fname,&quot;w&quot;) { |f| f.write(buf) }
+
+  fname = Jake.get_absolute File.join($androidpath, &quot;Rhodes&quot;, &quot;src&quot;, &quot;com&quot;, &quot;rhomobile&quot;, &quot;rhodes&quot;, &quot;AndroidR.java&quot;)
+  buf = File.new(fname,&quot;r&quot;).read.gsub(/^\s*import com\.rhomobile\..*\.R;\s*$/,&quot;\nimport com.rhomobile.#{lowname}.R;\n&quot;)
+  File.open(fname,&quot;w&quot;) { |f| f.write(buf) }
+end
+
+def generate_rjava
+  Rake::Task[&quot;build:android:rjava&quot;].execute
 end
 
 namespace &quot;config&quot; do
   task :android =&gt; [&quot;config:common&quot;] do
+    $config[&quot;platform&quot;] = &quot;android&quot;
+
     $java = $config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;]
     $androidsdkpath = $config[&quot;env&quot;][&quot;paths&quot;][&quot;android&quot;]
-    $androidplatform = &quot;android-1.1&quot;
-    $androidpath = $config[&quot;build&quot;][&quot;androidpath&quot;]
-    $bindir = $androidpath + &quot;/bin&quot;
-    $builddir = $androidpath + &quot;/build&quot;
-    $srcdir =  $bindir + &quot;/RhoBundle&quot;
-    $targetdir = $androidpath + &quot;/target&quot;
+    $androidplatform = &quot;android-1.5&quot;
+    $avdname = &quot;rhoAndroid15&quot;
+    $androidpath = Jake.get_absolute $config[&quot;build&quot;][&quot;androidpath&quot;]
+    $bindir = File.join($app_path, &quot;bin&quot;)
+    $builddir = File.join($androidpath, &quot;build&quot;)
+    $srcdir = File.join($bindir, &quot;RhoBundle&quot;)
+    $targetdir = File.join($bindir, &quot;target&quot;)
     $excludelib = ['**/singleton.rb','**/rational.rb','**/rhoframework.rb','**/date.rb']
-    $tmpdir =  $bindir +&quot;/tmp&quot;
-    $resourcedir = $tmpdir + &quot;/resource&quot;
+    $tmpdir = File.join($bindir, &quot;tmp&quot;)
+    $resourcedir = File.join($tmpdir, &quot;resource&quot;)
     $excludeapps = &quot;public/js/iui/**,**/jquery*&quot;
-    $libs = $androidpath + &quot;/Rhodes/libs&quot;
+    $libs = File.join($androidpath, &quot;Rhodes&quot;, &quot;libs&quot;)
+    $appname = $app_config[&quot;name&quot;]
+    $appname = &quot;Rhodes&quot; if $appname.nil?
 
     if RUBY_PLATFORM =~ /(win|w)32$/
-      $dx = File.join( $androidsdkpath, &quot;platforms&quot;, $androidplatform, &quot;tools&quot;, &quot;dx.bat&quot; )
-      $aapt = File.join( $androidsdkpath, &quot;platforms&quot;, $androidplatform, &quot;tools&quot;, &quot;aapt.exe&quot; )
-      $apkbuilder = File.join( $androidsdkpath, &quot;tools&quot;, &quot;apkbuilder.bat&quot; )
-      $androidbin = File.join( $androidsdkpath, &quot;tools&quot;, &quot;android.bat&quot; )
       $emulator = &quot;cmd /c &quot; + File.join( $androidsdkpath, &quot;tools&quot;, &quot;emulator.exe&quot; )
-      $adb = File.join( $androidsdkpath, &quot;tools&quot;, &quot;adb.exe&quot; )
+      $bat_ext = &quot;.bat&quot;
       $exe_ext = &quot;.exe&quot;
       $path_separator = &quot;;&quot;
     else
       #XXX make these absolute
-      $dx = File.join( $androidsdkpath, &quot;platforms&quot;, $androidplatform, &quot;tools&quot;, &quot;dx&quot; )
-      $aapt = File.join( $androidsdkpath, &quot;platforms&quot;, $androidplatform, &quot;tools&quot;, &quot;aapt&quot; )
-      $apkbuilder = File.join( $androidsdkpath, &quot;tools&quot;, &quot;apkbuilder&quot; )
-      $androidbin = File.join( $androidsdkpath, &quot;tools&quot;, &quot;android&quot; )
       $emulator = File.join( $androidsdkpath, &quot;tools&quot;, &quot;emulator&quot; )
-      $adb = File.join( $androidsdkpath, &quot;tools&quot;, &quot;adb&quot; )
+      $bat_ext = &quot;&quot;
       $exe_ext = &quot;&quot;
       $path_separator = &quot;:&quot;
     end
 
+    $dx = File.join( $androidsdkpath, &quot;platforms&quot;, $androidplatform, &quot;tools&quot;, &quot;dx&quot; + $bat_ext )
+    $aapt = File.join( $androidsdkpath, &quot;platforms&quot;, $androidplatform, &quot;tools&quot;, &quot;aapt&quot; + $exe_ext )
+    $apkbuilder = File.join( $androidsdkpath, &quot;tools&quot;, &quot;apkbuilder&quot; + $bat_ext )
+    $androidbin = File.join( $androidsdkpath, &quot;tools&quot;, &quot;android&quot; + $bat_ext )
+    $adb = File.join( $androidsdkpath, &quot;tools&quot;, &quot;adb&quot; + $exe_ext )
+
     $keytool = File.join( $java, &quot;keytool&quot; + $exe_ext )
     $jarsigner = File.join( $java, &quot;jarsigner&quot; + $exe_ext )
     $keystoredir = ENV['HOME'] + &quot;/.rhomobile&quot;
@@ -62,42 +81,43 @@ end
 
 namespace &quot;build&quot; do
   namespace &quot;android&quot; do
-    desc &quot;Generate R.java file&quot;
+ #   desc &quot;Generate R.java file&quot;
     task :rjava =&gt; &quot;config:android&quot; do
 
-      manifest = Jake.get_absolute $androidpath + &quot;/Rhodes/AndroidManifest.xml&quot;
-      resource = Jake.get_absolute $androidpath + &quot;/Rhodes/res&quot;
-      assets = Jake.get_absolute $androidpath + &quot;/Rhodes/assets&quot;
-      rjava = Jake.get_absolute $androidpath + &quot;/Rhodes/gen/com/rhomobile/rhodes&quot;
-      androidjar = $androidsdkpath + &quot;/platforms/&quot; + $androidplatform + &quot;/android.jar&quot;
+      manifest = File.join($androidpath, &quot;Rhodes&quot;, &quot;AndroidManifest.xml&quot;)
+      resource = Jake.get_absolute File.join($androidpath, &quot;Rhodes&quot;, &quot;res&quot;)
+      assets = Jake.get_absolute File.join($androidpath, &quot;Rhodes&quot;, &quot;assets&quot;)
+      rjava = Jake.get_absolute File.join($androidpath, &quot;Rhodes&quot;, &quot;gen&quot;, &quot;com&quot;, &quot;rhomobile&quot;, &quot;rhodes&quot;)
+      androidjar = File.join($androidsdkpath, &quot;platforms&quot;, $androidplatform, &quot;android.jar&quot;)
 
-      cp resource + &quot;/drawable/icon.png&quot;,$tmpdir + &quot;/icon.png.bak&quot;
-      cp $config[&quot;env&quot;][&quot;app&quot;] + &quot;/icon/icon.png&quot;, resource + &quot;/drawable&quot;
-      set_app_name($config[&quot;env&quot;][&quot;appname&quot;]) unless $config[&quot;env&quot;][&quot;appname&quot;].nil?
+      mkdir_p $tmpdir
+      iconbakname = $tmpdir + &quot;/icon.png.bak&quot;
+      iconappname = $app_path + &quot;/icon/icon.png&quot;
+      cp resource + &quot;/drawable/icon.png&quot;,iconbakname
+      cp iconappname, resource + &quot;/drawable&quot; if File.exists?(iconappname)
 
       args = [&quot;package&quot;,&quot;-f&quot;,&quot;-M&quot;,manifest,&quot;-S&quot;, resource,&quot;-A&quot;, assets,&quot;-I&quot;,androidjar,&quot;-J&quot;, rjava  ]
       puts Jake.run($aapt,args)
 
-      set_app_name(&quot;Rhodes&quot;) unless $config[&quot;env&quot;][&quot;appname&quot;].nil?
-      mv $tmpdir + &quot;/icon.png.bak&quot;,resource + &quot;/drawable/icon.png&quot;
+      exitstatus = $?
 
-      unless $? == 0
+      mv iconbakname,resource + &quot;/drawable/icon.png&quot; if File.exists?(iconbakname)
+
+      unless exitstatus == 0
         puts &quot;Error in AAPT&quot;
         exit 1
       end
 
     end
-    desc &quot;Build RhoBundle for android&quot;
+#    desc &quot;Build RhoBundle for android&quot;
     task :rhobundle =&gt; &quot;config:android&quot; do
       Rake::Task[&quot;build:bundle:xruby&quot;].execute
 
-      cp_r $srcdir + &quot;/apps&quot;, $androidpath + &quot;/Rhodes/assets&quot;
+      cp_r $srcdir + &quot;/apps&quot;, Jake.get_absolute($androidpath) + &quot;/Rhodes/assets&quot;
       cp_r $bindir + &quot;/RhoBundle.jar&quot;, $libs
-
-      Rake::Task[&quot;build:android:rjava&quot;].execute
     end
 
-    desc &quot;Build RubyVM for android&quot;
+#    desc &quot;Build RubyVM for android&quot;
     task :rubyvm =&gt; &quot;config:android&quot; do
       javac = $config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;] + &quot;/javac&quot; + $exe_ext
       cp_r &quot;platform/shared/rubyJVM&quot;, $bindir
@@ -133,13 +153,16 @@ namespace &quot;build&quot; do
       cp_r $bindir + &quot;/RubyVM.jar&quot;, $libs
 
     end
-    desc &quot;Build Rhodes for android&quot;
+ #   desc &quot;Build Rhodes for android&quot;
     task :rhodes =&gt; [:rubyvm, :rhobundle] do
       javac = $config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;] + &quot;/javac&quot; + $exe_ext
 
       rm_rf $tmpdir + &quot;/Rhodes&quot;
       mkdir_p $tmpdir + &quot;/Rhodes&quot;
 
+      set_app_name_android($appname)
+      generate_rjava
+
       args = []
       args &lt;&lt; &quot;-g&quot;
       args &lt;&lt; &quot;-d&quot;
@@ -154,6 +177,8 @@ namespace &quot;build&quot; do
       args &lt;&lt; &quot;@#{$builddir}/RhodesGEN_build.files&quot;
       puts Jake.run(javac,args)
       unless $? == 0
+        set_app_name_android(&quot;Rhodes&quot;)
+        generate_rjava
         puts &quot;Error compiling java code&quot;
         exit 1
       end
@@ -172,12 +197,14 @@ namespace &quot;build&quot; do
       args &lt;&lt; &quot;@#{$builddir}/RhodesSRC_build.files&quot;
       puts Jake.run(javac,args)
       unless $? == 0
+        set_app_name_android(&quot;Rhodes&quot;)
+        generate_rjava
         puts &quot;Error compiling java code&quot;
         exit 1
       end
 
-
-
+      set_app_name_android(&quot;Rhodes&quot;)
+      generate_rjava
 
       args = [&quot;cf&quot;,&quot;../../Rhodes.jar&quot;, &quot;#{$all_files_mask}&quot;]
       puts Jake.run($config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;] + &quot;/jar&quot; + $exe_ext, args, &quot;#{$tmpdir}/Rhodes/&quot;)
@@ -187,7 +214,7 @@ namespace &quot;build&quot; do
       end
     end
 
-    desc &quot;build all&quot;
+    #desc &quot;build all&quot;
     task :all =&gt; [:rubyvm, :rhobundle, :rhodes]
   end
 end
@@ -197,11 +224,11 @@ namespace &quot;package&quot; do
     puts &quot;Running dx utility&quot;
     args = []
     args &lt;&lt; &quot;--dex&quot;
-    outfile = Jake.get_absolute(&quot;#{$bindir}/classes.dex&quot;)
+    outfile = &quot;#{$bindir}/classes.dex&quot;
     args &lt;&lt; &quot;--output=#{outfile}&quot;
-    args &lt;&lt; Jake.get_absolute(&quot;#{$bindir}/Rhodes.jar&quot;)
-    args &lt;&lt; Jake.get_absolute(&quot;#{$bindir}/RubyVM.jar&quot;)
-    args &lt;&lt; Jake.get_absolute(&quot;#{$bindir}/RhoBundle.jar&quot;)
+    args &lt;&lt; &quot;#{$bindir}/Rhodes.jar&quot;
+    args &lt;&lt; &quot;#{$bindir}/RubyVM.jar&quot;
+    args &lt;&lt; &quot;#{$bindir}/RhoBundle.jar&quot;
     puts Jake.run($dx,args)
     unless $? == 0
       puts &quot;Error running DX utility&quot;
@@ -212,19 +239,21 @@ namespace &quot;package&quot; do
     resource = Jake.get_absolute $androidpath + &quot;/Rhodes/res&quot;
     assets = Jake.get_absolute $androidpath + &quot;/Rhodes/assets&quot;
     androidjar = &quot;#{$androidsdkpath}/platforms/#{$androidplatform}/android.jar&quot;
-    resourcepkg = Jake.get_absolute $bindir + &quot;/rhodes.ap_&quot;
+    resourcepkg =  $bindir + &quot;/rhodes.ap_&quot;
 
     puts &quot;Packaging Assets and Jars&quot;
 
-    cp resource + &quot;/drawable/icon.png&quot;,$tmpdir + &quot;/icon.png.bak&quot;
-    cp $config[&quot;env&quot;][&quot;app&quot;] + &quot;/icon/icon.png&quot;, resource + &quot;/drawable&quot;
-    set_app_name($config[&quot;env&quot;][&quot;appname&quot;]) unless $config[&quot;env&quot;][&quot;appname&quot;].nil?
+    iconbakname = $tmpdir + &quot;/icon.png.bak&quot;
+    iconappname = $app_path + &quot;/icon/icon.png&quot;
+    cp resource + &quot;/drawable/icon.png&quot;,iconbakname
+    cp iconappname, resource + &quot;/drawable&quot; if File.exists?(iconappname)
+    set_app_name_android($appname)
 
     puts `#{$aapt} package -f -M &quot;#{manifest}&quot; -S &quot;#{resource}&quot; -A &quot;#{assets}&quot; -I &quot;#{androidjar}&quot; -F &quot;#{resourcepkg}&quot;`
     returnval = $?
 
-    set_app_name(&quot;Rhodes&quot;) unless $config[&quot;env&quot;][&quot;appname&quot;].nil?
-    mv $tmpdir + &quot;/icon.png.bak&quot;,resource + &quot;/drawable/icon.png&quot;
+    set_app_name_android(&quot;Rhodes&quot;)
+    mv iconbakname,resource + &quot;/drawable/icon.png&quot; if File.exists?(iconbakname)
 
     unless returnval == 0
       puts &quot;Error running AAPT&quot;
@@ -236,11 +265,11 @@ end
 
 namespace &quot;device&quot; do
   namespace &quot;android&quot; do
-    desc &quot;build self signed for debug&quot;
+    desc &quot;Build debug self signed for device&quot;
     task :debug =&gt; &quot;package:android&quot; do
-      dexfile = Jake.get_absolute $bindir + &quot;/classes.dex&quot;
-      apkfile = Jake.get_absolute $targetdir + &quot;/Rhodes-debug.apk&quot;
-      resourcepkg = Jake.get_absolute $bindir + &quot;/rhodes.ap_&quot;
+      dexfile =  $bindir + &quot;/classes.dex&quot;
+      apkfile =  $targetdir + &quot;/&quot; + $appname + &quot;-debug.apk&quot;
+      resourcepkg =  $bindir + &quot;/rhodes.ap_&quot;
 
       puts &quot;Building APK file&quot;
       puts `#{$apkbuilder} &quot;#{apkfile}&quot; -z &quot;#{resourcepkg}&quot; -f &quot;#{dexfile}&quot;`
@@ -250,12 +279,12 @@ namespace &quot;device&quot; do
       end
 
     end
-    desc &quot;build signed for production&quot;
+    desc &quot;Build production signed for device&quot;
     task :production =&gt; &quot;package:android&quot; do
-      dexfile = Jake.get_absolute $bindir + &quot;/classes.dex&quot;
-      apkfile = Jake.get_absolute $targetdir + &quot;/Rhodes.apk&quot;
-      signedapkfile = Jake.get_absolute $targetdir + &quot;/Rhodes_signed.apk&quot;
-      resourcepkg = Jake.get_absolute $bindir + &quot;/rhodes.ap_&quot;
+      dexfile =  $bindir + &quot;/classes.dex&quot;
+      apkfile =  $targetdir + &quot;/&quot; + $appname + &quot;.apk&quot;
+      signedapkfile =  $targetdir + &quot;/&quot; + $appname + &quot;_signed.apk&quot;
+      resourcepkg =  $bindir + &quot;/rhodes.ap_&quot;
 
       puts &quot;Building APK file&quot;
       puts `#{$apkbuilder} &quot;#{apkfile}&quot; -u -z &quot;#{resourcepkg}&quot; -f &quot;#{dexfile}&quot;`
@@ -312,13 +341,13 @@ end
 namespace &quot;run&quot; do
   desc &quot;build and launch emulator&quot;
   task :android =&gt; &quot;device:android:debug&quot; do
-    apkfile = Jake.get_absolute $targetdir + &quot;/Rhodes-debug.apk&quot;
+    apkfile = Jake.get_absolute $targetdir + &quot;/&quot; + $appname + &quot;-debug.apk&quot;
     puts `#{$adb} start-server`
     sleep 5
 
-    system(&quot;#{$androidbin} create avd --name rhoAndroid11 --target 1 --sdcard 32M --skin HVGA&quot;)
+    system(&quot;#{$androidbin} create avd --name #{$avdname} --target 2 --sdcard 32M --skin HVGA&quot;)
 
-    Thread.new { system(&quot;#{$emulator} -avd rhoAndroid11&quot;) }
+    Thread.new { system(&quot;#{$emulator} -avd #{$avdname}&quot;) }
 
     sleep 10
 
@@ -330,7 +359,7 @@ namespace &quot;run&quot; do
     puts &quot;Loading package into emulator&quot;
     theoutput = `#{$adb} install -r &quot;#{apkfile}&quot;`
     count = 0
-    while (theoutput.to_s.match(/Error Type/) or theoutput.to_s.match(/Fail/))  and count &lt; 15 do
+    while (not theoutput.to_s.match(/Success/))  and count &lt; 15 do
       puts &quot;Failed to load (possibly because emulator not done launching)- retrying&quot;
       $stdout.flush
       sleep 5
@@ -342,6 +371,8 @@ namespace &quot;run&quot; do
 end
 
 namespace &quot;clean&quot; do
+  desc &quot;Clean Android&quot;
+  task :android =&gt; &quot;clean:android:all&quot;
   namespace &quot;android&quot; do
     task :assets =&gt; &quot;config:android&quot; do
       Dir.glob($androidpath + &quot;/Rhodes/assets/apps/**/*&quot;) do |f|
@@ -352,35 +383,10 @@ namespace &quot;clean&quot; do
       rm_rf $targetdir
       rm_rf $bindir
       rm_rf $srcdir
+      rm_rf $libs
     end
-    desc &quot;clean android&quot;
+#    desc &quot;clean android&quot;
     task :all =&gt; [:assets,:files]
   end
 end
 
-namespace &quot;prebuild&quot; do
-  desc &quot;Build binaries for anroid to be inserted into gem&quot;
-  task :android =&gt; &quot;build:android:all&quot; do
-    prebuilt = &quot;rhodes/rhodes-build/res/prebuilt/android&quot;
-
-    if File.exists? $bindir + &quot;/RubyVM.jar&quot; and File.exists? $bindir + &quot;/Rhodes.jar&quot;
-      rm_rf prebuilt if File.exists? prebuilt
-      mkdir_p prebuilt 
-
-      cp $androidpath + &quot;/Rhodes/assets/apps/loading.html&quot;, prebuilt
-      cp $androidpath + &quot;/Rhodes/AndroidManifest.xml&quot;, prebuilt
-
-      cp_r $androidpath + &quot;/Rhodes/res&quot;, prebuilt
-
-      mkdir_p prebuilt + &quot;/src/com/rhomobile/rhodes&quot;
-
-      cp_r $androidpath + &quot;/Rhodes/src/com/rhomobile/rhodes/AndroidR.java&quot;, prebuilt + &quot;/src/com/rhomobile/rhodes&quot;
-    
-      mkdir_p prebuilt + &quot;/classes&quot;
-
-      Jake.unjar($bindir + &quot;/RubyVM.jar&quot;, prebuilt + &quot;/classes&quot;)
-      Jake.unjar($bindir + &quot;/Rhodes.jar&quot;, prebuilt + &quot;/classes&quot;)
-      rm_rf prebuilt + &quot;/classes/META-INF&quot;
-    end
-  end
-end</diff>
      <filename>platform/android/build/android.rake</filename>
    </modified>
    <modified>
      <diff>@@ -22,15 +22,15 @@ RubyVM
 ]
 ExcludeFromBuildAll=0
 [Files
-src\com\rho\db\file\Jsr75RAFileImpl.java
-src\com\rho\db\file\PersistRAFileImpl.java
-src\com\rho\db\file\RAFileImpl.java
 src\com\rho\db\FileUtilBB.java
 src\com\rho\db\HsqlDBResult.java
 src\com\rho\db\HsqlDBRowResult.java
 src\com\rho\db\HsqlDBStorage.java
 src\com\rho\db\Journal.java
 src\com\rho\db\RandomAccessFile.java
+src\com\rho\file\FileAccessBB.java
+src\com\rho\file\Jsr75RAFileImpl.java
+src\com\rho\file\PersistRAFileImpl.java
 src\j2me\io\BufferedOutputStream.java
 src\j2me\io\FilterOutputStream.java
 src\j2me\math\BigDecimal.java</diff>
      <filename>platform/bb/Hsqldb/Hsqldb.jdp</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,14 @@
 package com.rho.db;
 
 import j2me.io.File;
-//import j2me.io.FileDescriptor;
-//import j2me.io.FileInputStream;
-//import j2me.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Random;
 
-import javax.microedition.io.file.FileConnection;
-import javax.microedition.io.Connector;
-
 import org.hsqldb.lib.FileAccess;
 
+import com.rho.RhoClassFactory;
+import com.rho.IRAFile;
+
 /**
  * A collection of static file management methods.&lt;p&gt;
  * Also implements the default FileAccess method
@@ -19,8 +16,19 @@ import org.hsqldb.lib.FileAccess;
 public class FileUtilBB implements FileAccess {
 
     private static FileUtilBB fileUtil = new FileUtilBB();
-
-    FileUtilBB() {}
+    
+    private static IRAFile impl = null;
+    
+    private void InitImpl() {
+    	if (impl == null) {
+    		try {
+    			impl = RhoClassFactory.createRAFile();
+    		}
+    		catch (Exception e) {
+    			System.out.println(&quot;FileUtilBB:InitImpl Exception: &quot; + e.getMessage());
+    		}
+    	}
+    }
 
     public static FileUtilBB getDefaultInstance() {
         return fileUtil;
@@ -30,22 +38,25 @@ public class FileUtilBB implements FileAccess {
     	return exists(elementName);
     }
 
-    public long getFileLength(java.lang.String filename){
+    public long getFileLength(java.lang.String filename) {
     	
-    	FileConnection fconn = null;
-    	try{
-	    	fconn = (FileConnection)Connector.open(filename,Connector.READ);
-	    	return fconn.fileSize();
-    	}catch(IOException exc){
-    		System.out.println(&quot;FileUtilBB:getFileLength Exception: &quot; + exc.getMessage() + &quot;;File: &quot; + filename);
-    	}finally{
-    		if ( fconn != null )
-    			try{ 
-    				fconn.close(); 
-    			}catch(IOException exc){
-    	    		System.out.println(&quot;FileUtilBB:getFileLength Close Exception: &quot; + exc.getMessage() + &quot;;File: &quot; + filename);
-    	    	}
-    	}
+   		InitImpl();
+   		synchronized (impl) {
+	   		try {
+	    		impl.open(filename);
+	    		return impl.size();
+	    	}
+	    	catch(Exception exc) {
+	    		System.out.println(&quot;FileUtilBB:getFileLength Exception: &quot; + exc.getMessage() + &quot;;File: &quot; + filename);
+	    	}
+	    	finally {
+	    		try {
+					impl.close();
+				} catch (IOException e) {
+					System.out.println(&quot;FileUtilBB:getFileLenght Exception on close: &quot; + e.getMessage() + &quot;;File: &quot; + filename);
+				}
+	    	}
+   		}
     	
     	return 0;
     }
@@ -112,26 +123,23 @@ public class FileUtilBB implements FileAccess {
     /**
      * Delete the named file
      */
-    public void delete(String filename) 
+    public void delete(String filename)
     {
-        FileConnection fconn = null;
-    	
-    	try{
-    		fconn = (FileConnection)Connector.open(filename,Connector.READ_WRITE);
-    		//if ( fc.isDirectory() )
-    		//	deleteFilesInFolder(fc);
-        	
-    		if ( fconn != null &amp;&amp; fconn.exists() )
-    			fconn.delete();
-    	}catch(IOException exc){
-    		System.out.println(&quot;FileUtilBB:delete '&quot; + filename + &quot;' Exception: &quot; + exc.getMessage());
-    	}finally{
-    		if ( fconn != null )
-    			try{fconn.close();}catch(IOException exc){
-    				System.out.println(&quot;FileUtilBB:delete close '&quot; + filename + &quot;' Exception: &quot; + exc.getMessage());
-			    }
+    	InitImpl();
+    	synchronized (impl) {
+	    	try {
+	    		impl.open(filename, &quot;rw&quot;);
+	    		impl.delete();
+	    	}catch(Exception exc){
+	    		System.out.println(&quot;FileUtilBB:delete '&quot; + filename + &quot;' Exception: &quot; + exc.getMessage());
+	    	}finally{
+	    		try {
+					impl.close();
+				} catch (IOException e) {
+					System.out.println(&quot;FileUtilBB:delete Exception on close: &quot; + e.getMessage() + &quot;;File: &quot; + filename);
+				}
+	    	}
     	}
-    	
     }
 
     /**
@@ -152,27 +160,50 @@ public class FileUtilBB implements FileAccess {
     public void deleteOnExit(File f) {
         //JavaSystem.deleteOnExit(f);
     }
+    
+    public long size(String filename) {
+    	InitImpl();
+    	synchronized (impl) {
+			try {
+				impl.open(filename);
+				return impl.size();
+			}
+			catch (Exception exc) {
+				return 0;
+			}
+			finally {
+				try {
+					impl.close();
+				}
+				catch (Exception e) {
+					System.out.println(&quot;FileUtilBB:size Exception on close: &quot; + e.getMessage() + &quot;;File: &quot; + filename);
+				}
+			}
+		}
+    }
 
     /**
      * Return true or false based on whether the named file exists.
      */
     public boolean exists(String filename) 
     {
-        FileConnection fconn = null;
-    	
-    	try{
-        	fconn = (FileConnection)Connector.open(filename);
-        	return fconn.exists();
-    	}catch(IOException exc){
-    		System.out.println(&quot;FileUtilBB:exists '&quot; + filename + &quot;' Exception: &quot; + exc.getMessage());
-    	}finally{
-    		if ( fconn != null )
-    			try{fconn.close();}catch(IOException exc){
-    				System.out.println(&quot;FileUtilBB:exists close '&quot; + filename + &quot;' Exception: &quot; + exc.getMessage());
-			    }
+    	InitImpl();
+    	synchronized (impl) {
+	    	try{
+	    		impl.open(filename);
+	    		return impl.exists();
+	    	}
+	    	catch (Exception exc) {
+	    		return false;
+	    	}
+	    	finally {
+	    		try {
+					impl.close();
+				} catch (Exception e) {
+					System.out.println(&quot;FileUtilBB:exists Exception on close: &quot; + e.getMessage() + &quot;;File: &quot; + filename);
+				}
+	    	}
     	}
-    	
-    	return false;
     }
 
     public boolean exists(String fileName, boolean resource, Class cla) {
@@ -193,27 +224,27 @@ public class FileUtilBB implements FileAccess {
      */
     private void renameOverwrite(String oldname, String newname) {
 
-        delete(newname);
-
-        FileConnection fconn = null;
-    	try{
-        	fconn = (FileConnection)Connector.open(oldname, Connector.READ_WRITE);
-        	
-        	String name = newname;
-        	int nSlash = newname.lastIndexOf('/');
-        	if ( nSlash &gt;= 0 )
-        		name = newname.substring(nSlash+1);
-        	
-        	if ( fconn.exists() ){
-        		fconn.rename(name);
-        	}
-    	}catch(IOException exc){
-    		System.out.println(&quot;FileUtilBB:renameOverwrite from '&quot; + oldname + &quot;' to '&quot; + newname + &quot;' Exception: &quot; + exc.getMessage());
-    	}finally{
-    		if ( fconn != null )
-    			try{fconn.close();}catch(IOException exc){
-    				System.out.println(&quot;FileUtilBB:renameOverwrite close Exception: &quot; + exc.getMessage());
-			    }
+    	InitImpl();
+    	synchronized (impl) {
+	        delete(newname);
+	    	try{
+	        	String name = newname;
+	        	int nSlash = newname.lastIndexOf('/');
+	        	if ( nSlash &gt;= 0 )
+	        		name = newname.substring(nSlash+1);
+	        	
+	        	InitImpl();
+	        	impl.open(oldname, &quot;rw&quot;);
+	        	impl.rename(name);
+	    	}catch(IOException exc){
+	    		System.out.println(&quot;FileUtilBB:renameOverwrite from '&quot; + oldname + &quot;' to '&quot; + newname + &quot;' Exception: &quot; + exc.getMessage());
+	    	}finally{
+	    		try {
+					impl.close();
+				} catch (Exception e) {
+					System.out.println(&quot;FileUtilBB:rename Exception on close: &quot; + e.getMessage() + &quot;;From '&quot; + oldname + &quot;' to '&quot; + newname + &quot;'&quot;);
+				}
+	    	}
     	}
     }
 </diff>
      <filename>platform/bb/Hsqldb/src/com/rho/db/FileUtilBB.java</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,9 @@ package com.rho.db;
 
 import org.hsqldb.Record;
 import org.hsqldb.Result;
+import org.hsqldb.Trace;
 import org.hsqldb.Types;
+import org.hsqldb.HsqlException;
 
 import com.xruby.runtime.builtin.ObjectFactory;
 import com.xruby.runtime.lang.*;
@@ -25,6 +27,17 @@ public class HsqlDBResult implements IDBResult
 	public int getCount(){ 
 		return m_result != null ? m_result.getSize() : 0; 
 	}*/
+
+	public boolean isNonUnique() {
+		if ( m_result != null &amp;&amp; m_result.getException() != null &amp;&amp;
+			 m_result.getException() instanceof HsqlException )
+		{
+			HsqlException e = (HsqlException)m_result.getException();
+			return e.getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_INDEX;
+		}
+		
+		return false;
+	}
 	
 	public int getColCount(){ 
 		return m_result != null ? m_result.getColumnCount() : 0; 
@@ -176,6 +189,12 @@ public class HsqlDBResult implements IDBResult
     {
     	return m_current.data;
     }
+
+	public boolean isNullByIdx(int nCol)
+	{
+		Object val = getCurValue(nCol);
+		return val == null; 
+	}
     
 	public String getStringByIdx(int nCol)
 	{</diff>
      <filename>platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ import com.rho.db.IDBStorage;
 import org.hsqldb.*;
 import org.hsqldb.persist.*;
 
-public class HsqlDBStorage implements IDBStorage, Session.IDeleteCallback{
+public class HsqlDBStorage implements IDBStorage, Session.IDBCallback{
 
 	private Session m_dbSess;
 	private FileUtilBB m_fs;
@@ -47,9 +47,12 @@ public class HsqlDBStorage implements IDBStorage, Session.IDeleteCallback{
 			
 			HsqlProperties props = new HsqlProperties();
 			props.setProperty(HsqlDatabaseProperties.hsqldb_default_table_type, &quot;cached&quot;);
-	
+
+			if ( !m_fs.exists(strDbName + &quot;.script&quot;) &amp;&amp; m_fs.exists(strDbName + &quot;.script.new&quot;) )
+				m_fs.renameElement(strDbName + &quot;.script.new&quot;, strDbName + &quot;.script&quot;);
+				
 			m_dbSess = DatabaseManager.newSession(DatabaseURL.S_FILE, strDbName, &quot;SA&quot;, &quot;&quot;, props);
-			m_dbSess.setDeleteCallback(this);
+			m_dbSess.setDBCallback(this);
 			
 			if ( !m_fs.exists(strDbName + &quot;.data&quot;) )
 			{
@@ -73,7 +76,7 @@ public class HsqlDBStorage implements IDBStorage, Session.IDeleteCallback{
         }
     }
 */ 
-	
+	//IDBCallback
 	public void onDeleteRow(Table table, Row row) {
 		if ( m_dbCallback == null )
 			return;
@@ -82,11 +85,20 @@ public class HsqlDBStorage implements IDBStorage, Session.IDeleteCallback{
 		m_dbCallback.OnDeleteFromTable(table.getName().name, m_rowResult );
 	}
 
+	public void onInsertRow(Table table, Row row) {
+		if ( m_dbCallback == null )
+			return;
+		
+		m_rowResult.init(table, row);
+		m_dbCallback.OnInsertIntoTable(table.getName().name, m_rowResult );
+	}
+	//IDBCallback
+	
 	public void setDbCallback(IDBCallback callback)
 	{
 		m_dbCallback = callback;
 		if ( m_dbSess != null )
-			m_dbSess.setDeleteCallback(this);
+			m_dbSess.setDBCallback(this);
 		
 //		m_dbSess.sqlExecuteDirectNoPreChecks(
 //			&quot;CREATE TRIGGER rhodeleteTrigger BEFORE DELETE ON object_values FOR EACH ROW QUEUE 0 CALL \&quot;com.rho.HsqlDBStorage.HsqlDeleteTrigger\&quot;&quot;);
@@ -106,22 +118,15 @@ public class HsqlDBStorage implements IDBStorage, Session.IDeleteCallback{
 		return new HsqlDBResult();
 	}
 
-	public IDBResult executeSQL(String strStatement, Object[] values)
+	public IDBResult executeSQL(String strStatement, Object[] values, boolean bReportNonUnique)
 			throws DBException {
 		
 		try {
 			if ( m_dbSess == null )
 				throw new RuntimeException(&quot;executeSQL: m_dbSess == null&quot;);
 			
-			/*if ( strStatement.startsWith(&quot;destroy &quot;) )
-			{
-				destroy_table(strStatement.substring(8));
-				return new HsqlDBResult();
-			}*/
-			
 			CompiledStatement st = m_dbSess.compiledStatementManager.compile(m_dbSess, strStatement);
-			Result res = m_dbSess.sqlExecuteCompiledNoPreChecksSafe(st, values);
-			
+			Result res = m_dbSess.sqlExecuteCompiledNoPreChecksSafe(st, values, bReportNonUnique);
 			if ( m_dbSess.isAutoCommit() )
 				m_dbSess.commit();
 			
@@ -154,6 +159,12 @@ public class HsqlDBStorage implements IDBStorage, Session.IDeleteCallback{
 			
 	}
 
+	public void rollback()throws DBException
+	{
+		if ( m_dbSess!= null )
+			m_dbSess.rollback();
+	}
+	
 	public String[] getAllTableNames()throws DBException
 	{
 		org.hsqldb.lib.HsqlArrayList arTables = m_dbSess.getDatabase().schemaManager.getAllTables();</diff>
      <filename>platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java</filename>
    </modified>
    <modified>
      <diff>@@ -39,6 +39,7 @@ public class Journal
 	
 	public void close()throws IOException{
 		if ( m_journalFile != null ){
+			m_journalFile.stopListenForSync(m_dataName);
 			m_journalFile.close();
 			m_journalFile = null;
 		}
@@ -65,6 +66,7 @@ public class Journal
 
 		if ( m_journalFile == null ){
 			m_journalFile = new RandomAccessFile(m_journalName,&quot;rw&quot;);
+			m_journalFile.listenForSync(m_dataName);
 			m_journalFile.writeLong(m_dataFile.length());
 			m_journalFile.write(BLOCK_CONFIRM);
 			m_journalFile.sync();
@@ -128,8 +130,8 @@ public class Journal
 			bSuccess = true;
 		}catch(IOException exc)
 		{
-			LOG.ERROR(&quot;Rollback failed.&quot;, exc);
-			throw exc;
+			LOG.ERROR(&quot;Rollback failed.Journal is empty or corrupted&quot;, exc);
+			//throw exc;
 		}finally{
 			if ( df != null )
 			{
@@ -163,8 +165,8 @@ public class Journal
 		if ( nReaded &lt;= 0 )
 			return;
 		
-		if ( nReaded != nLen )
-			throw new IOException(&quot;Cannot read '&quot; + nLen + &quot;' bytes from data file: only '&quot; + nReaded +&quot;' is available&quot;);
+//		if ( nReaded != nLen )
+//			throw new IOException(&quot;Cannot read '&quot; + nLen + &quot;' bytes from data file: only '&quot; + nReaded +&quot;' is available&quot;);
 
 		m_journalFile.writeLong(nPos);
 		m_journalFile.writeLong(nReaded);</diff>
      <filename>platform/bb/Hsqldb/src/com/rho/db/Journal.java</filename>
    </modified>
    <modified>
      <diff>@@ -5,14 +5,11 @@ import java.io.*;
 import j2me.io.FileNotFoundException;
 
 import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
 
-import com.rho.RhoConf;
-import com.rho.RhoEmptyLogger;
-import com.rho.RhoLogger;
-import com.rho.db.file.Jsr75RAFileImpl;
-import com.rho.db.file.PersistRAFileImpl;
-import com.rho.db.file.RAFileImpl;
+import com.rho.RhoClassFactory;
+//import com.rho.RhoEmptyLogger;
+//import com.rho.RhoLogger;
+import com.rho.IRAFile;
 
 import j2me.nio.channels.*;
 
@@ -20,16 +17,10 @@ import j2me.io.File;
 
 public class RandomAccessFile  
 {
-	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
-		new RhoLogger(&quot;RAFile&quot;);
+	//private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
+	//	new RhoLogger(&quot;RAFile&quot;);
 	
-	public static final int READ = Connector.READ;
-	public static final int WRITE = Connector.WRITE;
-	public static final int READ_WRITE = Connector.READ_WRITE;
-	
-	public static final String USE_PERSISTENT = &quot;use_persistent_storage&quot;;
-	
-	private RAFileImpl m_impl = null;
+	private IRAFile m_impl = null;
 	
     private boolean        m_bWriteAccess;
     
@@ -45,9 +36,9 @@ public class RandomAccessFile
     	String name = (file != null ? file.getPath() : null);
     	int imode = -1;
     	if (mode.equals(&quot;r&quot;))
-    	    imode = READ;
+    	    imode = Connector.READ;
     	else if (mode.startsWith(&quot;rw&quot;)) {
-    	    imode = READ_WRITE;
+    	    imode = Connector.READ_WRITE;
     	    m_bWriteAccess = true;
     	}
     	
@@ -59,15 +50,12 @@ public class RandomAccessFile
             throw new NullPointerException();
         }
     	
-        if (RhoConf.getInstance().getBool(USE_PERSISTENT)) {
-        	LOG.TRACE(&quot;Use persistent storage implementation&quot;);
-        	m_impl = new PersistRAFileImpl();
-        }
-        else {
-        	LOG.TRACE(&quot;Use Jsr75 implementation&quot;);
-        	m_impl = new Jsr75RAFileImpl();
-        }
-        m_impl.open(name, imode);
+        try {
+			m_impl = RhoClassFactory.createRAFile();
+		} catch (Exception e) {
+			throw new FileNotFoundException(e.getMessage());
+		}
+        m_impl.open(name, mode);
     }
     
     public long length() throws IOException
@@ -226,4 +214,12 @@ public class RandomAccessFile
     	}
     	return input.toString();
     }
+    
+    public void listenForSync(String name) throws IOException {
+    	m_impl.listenForSync(name);
+    }
+    
+    public void stopListenForSync(String name) throws IOException {
+    	m_impl.stopListenForSync(name);
+    }
 }</diff>
      <filename>platform/bb/Hsqldb/src/com/rho/db/RandomAccessFile.java</filename>
    </modified>
    <modified>
      <diff>@@ -70,6 +70,7 @@ import java.io.IOException;
 
 import org.hsqldb.lib.IntLookup;
 //import org.hsqldb.lib.java.JavaSystem;
+import org.hsqldb.rowio.RowInputBinary;
 import org.hsqldb.rowio.RowInputInterface;
 import org.hsqldb.rowio.RowOutputInterface;
 
@@ -163,7 +164,7 @@ public class CachedRow extends Row {
      * @throws HsqlException
      */
     public CachedRow(Table t,
-                     RowInputInterface in) throws IOException, HsqlException {
+                     RowInputBinary in) throws IOException, HsqlException {
 
         tTable      = t;
         iPos        = in.getPos();</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/CachedRow.java</filename>
    </modified>
    <modified>
      <diff>@@ -88,7 +88,7 @@ final class CompiledStatementExecutor {
      * @return the result of executing the statement
      * @param cs any valid CompiledStatement
      */
-    Result execute(CompiledStatement cs, Object[] paramValues) {
+    Result execute(CompiledStatement cs, Object[] paramValues, boolean bReportNonUnique) {
 
         Result result = null;
 
@@ -102,6 +102,17 @@ final class CompiledStatementExecutor {
             cs.materializeSubQueries(session);
 
             result = executeImpl(cs);
+        } catch (HsqlException e) {
+        	if ( e.getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_INDEX &amp;&amp;
+        			bReportNonUnique )
+        	{}
+        	else
+        		LOG.ERROR(&quot;execute statement failed.&quot;, e);
+        	
+            result = new Result(e, cs.sql);
+        } catch (Exception e) {
+        	LOG.ERROR(&quot;execute statement failed.&quot;, e);
+            result = new Result(e, cs.sql);
         } catch (Throwable t) {
         	LOG.ERROR(&quot;execute statement failed.&quot;, t);
             result = new Result(t, cs.sql);</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/CompiledStatementExecutor.java</filename>
    </modified>
    <modified>
      <diff>@@ -869,7 +869,8 @@ class Select {
         boolean notempty = !(queryCondition != null
                              &amp;&amp; queryCondition.isFixedConditional()
                              &amp;&amp;!queryCondition.testCondition(session));
-
+        //int nCounter = 0;
+        //int arrLoaded[] = new int[1000];
         while (notempty &amp;&amp; level &gt;= 0) {
 
             // perform a join
@@ -897,6 +898,8 @@ class Select {
                 first[level] = found;
             }
 
+//            arrLoaded[nCounter++] = session.getDatabase().logger.getCache().getCachedObjectCount();
+            
             if (!found &amp;&amp;!outerfound) {
                 level--;
 
@@ -949,6 +952,9 @@ class Select {
                     if (gResult.size() &gt;= limitcount) {
                         break;
                     }
+                    
+                    if ( t != null &amp;&amp; t.filterIndex != null &amp;&amp; t.isMultiFindFirst &amp;&amp; t.filterIndex.isUnique() )
+                    	break;
                 } catch (HsqlInternalException e) {
                     continue;
                 }</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/Select.java</filename>
    </modified>
    <modified>
      <diff>@@ -161,13 +161,14 @@ public class Session implements SessionInterface {
     }
 
     //RHO
-    private IDeleteCallback m_deleteCallback;
-    public interface IDeleteCallback {
+    private IDBCallback m_dbCallback;
+    public interface IDBCallback {
     	public void onDeleteRow(Table table, Row row);
+    	public void onInsertRow(Table table, Row row);
     };
     
-    public void setDeleteCallback(IDeleteCallback callback){
-    	m_deleteCallback = callback;
+    public void setDBCallback(IDBCallback callback){
+    	m_dbCallback = callback;
     }
     //RHO
     /**
@@ -418,8 +419,8 @@ public class Session implements SessionInterface {
      */
     public boolean addDeleteAction(Table table, Row row) throws HsqlException {
     	m_bNeedCommit = true;//!isNestedTransaction;
-    	if ( m_deleteCallback != null )
-    		m_deleteCallback.onDeleteRow(table, row);
+    	if ( m_dbCallback != null )
+    		m_dbCallback.onDeleteRow(table, row);
     	
         if (!isAutoCommit || isNestedTransaction) {
             Transaction t = new Transaction(true, table, row, actionTimestamp);
@@ -455,12 +456,20 @@ public class Session implements SessionInterface {
 	            rowActionList.add(t);
 	            database.txManager.addTransaction(this, t);
         	}
+
+        	if ( m_dbCallback != null )
+        		m_dbCallback.onInsertRow(table, row);
         	
             return true;
         } else {
             table.commitRowToStore(row);
+            
+        	if ( m_dbCallback != null )
+        		m_dbCallback.onInsertRow(table, row);
+            
         }
 
+        
         return false;
     }
 
@@ -1088,13 +1097,13 @@ public class Session implements SessionInterface {
 
     Result sqlExecuteCompiledNoPreChecks(CompiledStatement cs,
                                          Object[] pvals) {
-        return compiledStatementExecutor.execute(cs, pvals);
+        return compiledStatementExecutor.execute(cs, pvals, false);
     }
 
     public Result sqlExecuteCompiledNoPreChecksSafe(CompiledStatement cs,
-            Object[] pvals) {
+            Object[] pvals, boolean bReportNonUnique) {
     	synchronized (database) {
-    		return compiledStatementExecutor.execute(cs, pvals);
+    		return compiledStatementExecutor.execute(cs, pvals, bReportNonUnique);
     	}
 	}
     </diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/Session.java</filename>
    </modified>
    <modified>
      <diff>@@ -79,6 +79,7 @@ import org.hsqldb.lib.StringUtil;
 import org.hsqldb.persist.CachedObject;
 import org.hsqldb.persist.DataFileCache;
 import org.hsqldb.persist.PersistentStore;
+import org.hsqldb.rowio.RowInputBinary;
 import org.hsqldb.rowio.RowInputInterface;
 import org.hsqldb.store.ValuePool;
 
@@ -3478,7 +3479,7 @@ public class Table extends BaseTable {
             cache.restore(row);
         }
 
-        public CachedObject get(RowInputInterface in) {
+        public CachedObject get(RowInputBinary in) {
 
             try {
                 if (Table.this.isText) {</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/Table.java</filename>
    </modified>
    <modified>
      <diff>@@ -100,7 +100,7 @@ public class DataFileCache {
     protected boolean hasRowInfo       = false;
 
     // reusable input / output streams
-    protected RowInputInterface  rowIn;
+    protected RowInputBinary  rowIn;
     protected RowOutputInterface rowOut;
 
     //
@@ -613,7 +613,7 @@ public class DataFileCache {
             CachedObject object = cache.get(i);
 
             if (object == null) {
-                RowInputInterface rowInput = readObject(i);
+                RowInputBinary rowInput = readObject(i);
 
                 if (rowInput == null) {
                     return null;
@@ -658,7 +658,7 @@ public class DataFileCache {
         return dataFile.readInt();
     }
 
-    protected synchronized RowInputInterface readObject(int pos)
+    protected synchronized RowInputBinary readObject(int pos)
     throws IOException {
 
         dataFile.seek((long) pos * cacheFileScale);</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/persist/DataFileCache.java</filename>
    </modified>
    <modified>
      <diff>@@ -392,7 +392,7 @@ public class HsqlDatabaseProperties extends HsqlProperties {
         // reduce the default 14 (3*16K rows) if memory is limited and rows
         // are large.
         // values between 8-16 are allowed
-        setProperty(hsqldb_cache_scale, 10);
+        setProperty(hsqldb_cache_scale, 14);
 
         // maximum size of .log file in megabytes
         setProperty(hsqldb_log_size, 200);</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,7 @@ package org.hsqldb.persist;
 
 import java.io.IOException;
 
+import org.hsqldb.rowio.RowInputBinary;
 import org.hsqldb.rowio.RowInputInterface;
 
 /**
@@ -61,7 +62,7 @@ public interface PersistentStore {
     /** add object previously removed from persistnce */
     void restore(CachedObject object) throws IOException;
 
-    CachedObject get(RowInputInterface in) throws IOException;
+    CachedObject get(RowInputBinary in) throws IOException;
 
     CachedObject getNewInstance(int size) throws IOException;
 </diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/persist/PersistentStore.java</filename>
    </modified>
    <modified>
      <diff>@@ -34,6 +34,9 @@ package org.hsqldb.persist;
 import java.io.EOFException;
 import j2me.io.FileNotFoundException;
 import java.io.IOException;
+
+import com.rho.RhoEmptyProfiler;
+import com.rho.RhoProfiler;
 import com.rho.db.RandomAccessFile;
 //import java.lang.reflect.Constructor;
 
@@ -61,6 +64,9 @@ class ScaledRAFile implements ScaledRAInterface {
     static final int  DATA_FILE_NIO  = 1;
     static final int  DATA_FILE_JAR  = 2;
     static final long MAX_NIO_LENGTH = (1L &lt;&lt; 28);
+    
+    private static final RhoProfiler PROF = RhoProfiler.RHO_STRIP_PROFILER ? new RhoEmptyProfiler() : 
+		new RhoProfiler();
 
     //
     final SimpleLog                appLog;
@@ -454,6 +460,7 @@ class ScaledRAFile implements ScaledRAInterface {
 
     public void write(byte[] b, int off, int len) throws IOException {
 
+    	//PROF.START(&quot;ScaledRAFile1&quot;);
         try {
         	createFiles();
         	
@@ -480,10 +487,14 @@ class ScaledRAFile implements ScaledRAInterface {
 
             throw e;
         }
+        //finally {
+        //	PROF.STOP(&quot;ScaledRAFile1&quot;);
+        //}
     }
 
     public void writeInt(int i) throws IOException {
 
+    	//PROF.START(&quot;ScaledRAFile2&quot;);
         try {
         	createFiles();
         	
@@ -511,10 +522,14 @@ class ScaledRAFile implements ScaledRAInterface {
 
             throw e;
         }
+        //finally {
+        //	PROF.STOP(&quot;ScaledRAFile2&quot;);
+        //}
     }
 
     public void writeLong(long i) throws IOException {
 
+    	//PROF.START(&quot;ScaledRAFile3&quot;);
         try {
         	createFiles();
         	
@@ -542,6 +557,9 @@ class ScaledRAFile implements ScaledRAInterface {
 
             throw e;
         }
+        //finally {
+        //	PROF.STOP(&quot;ScaledRAFile3&quot;);
+        //}
     }
 
     public void close() throws IOException {</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/persist/ScaledRAFile.java</filename>
    </modified>
    <modified>
      <diff>@@ -163,20 +163,24 @@ public abstract class RowInputBase extends HsqlByteArrayInputStream {
                 case Types.VARCHAR :
                 case Types.VARCHAR_IGNORECASE :
                 case Types.LONGVARCHAR :
-                    o = readChar(type);
+                	//o = readChar(type);
+                    o = readString();
                     break;
 
                 case Types.TINYINT :
                 case Types.SMALLINT :
-                    o = readSmallint();
+                    //o = readSmallint();
+                	o = new Integer(readShort());
                     break;
 
                 case Types.INTEGER :
-                    o = readInteger();
+                    //o = readInteger();
+                	o = new Integer(readInt());
                     break;
 
                 case Types.BIGINT :
-                    o = readBigint();
+                    //o = readBigint();
+                	o = new Long(readLong());
                     break;
 
                 //fredt although REAL is now Double, it is read / written in</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/rowio/RowInputBase.java</filename>
    </modified>
    <modified>
      <diff>@@ -107,9 +107,10 @@ implements org.hsqldb.rowio.RowInputInterface {
     public String readString() throws IOException {
 
         int    length = readInt();
-        String s      = StringConverter.readUTF(buf, pos, length);
+        //String s      = StringConverter.readUTF(buf, pos, length);
+        String s = new String(buf, pos, length, &quot;UTF-8&quot;);
 
-        s   = ValuePool.getString(s);
+        //s   = ValuePool.getString(s);
         pos += length;
 
         return s;</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/rowio/RowInputBinary.java</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,8 @@
 
 package org.hsqldb.rowio;
 
+import java.io.UnsupportedEncodingException;
+
 import j2me.math.BigDecimal;
 import j2me.math.BigInteger;
 import j2me.math.Number;
@@ -125,13 +127,18 @@ public class RowOutputBinary extends RowOutputBase {
     public void writeType(int type) {
         writeShort(type);
     }
-
+    
     public void writeString(String s) {
 
         int temp = count;
 
         writeInt(0);
-        StringConverter.writeUTF(s, this);
+        //StringConverter.writeUTF(s, this);
+        try {
+			this.write(s.getBytes(&quot;UTF-8&quot;));
+		} catch (UnsupportedEncodingException e) {
+			throw new RuntimeException(e.getMessage());
+		}
         writeIntData(count - temp - 4, temp);
     }
 </diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/rowio/RowOutputBinary.java</filename>
    </modified>
    <modified>
      <diff>@@ -112,7 +112,7 @@ public abstract class ScriptWriterBase implements Runnable {
     /** the last schema for last sessionId */
     Session                      currentSession;
     public static final String[] LIST_SCRIPT_FORMATS      = new String[] {
-        Token.T_TEXT, Token.T_BINARY, null, Token.T_COMPRESSED
+        //Token.T_TEXT, Token.T_BINARY, null, Token.T_COMPRESSED
     };
     public static final int      SCRIPT_TEXT_170          = 0;
     public static final int      SCRIPT_BINARY_172        = 1;</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/scriptio/ScriptWriterBase.java</filename>
    </modified>
    <modified>
      <diff>@@ -74,7 +74,7 @@ public class ValuePool {
 
     //
     static {
-        initPool();
+        //initPool();
     }
 
     private static void initPool() {
@@ -104,78 +104,79 @@ public class ValuePool {
 
     public static void resetPool(int[] sizeArray, int sizeFactor) {
 
-        synchronized (ValuePool.class) {
+        /*synchronized (ValuePool.class) {
             for (int i = 0; i &lt; POOLS_COUNT; i++) {
                 poolList[i].resetCapacity(sizeArray[i] * sizeFactor,
                                           BaseHashMap.PURGE_HALF);
             }
-        }
+        }*/
     }
 
     public static void resetPool() {
 
-        synchronized (ValuePool.class) {
-            resetPool(defaultPoolLookupSize, defaultSizeFactor);
-        }
+//        synchronized (ValuePool.class) {
+//            resetPool(defaultPoolLookupSize, defaultSizeFactor);
+//        }
     }
 
     public static void clearPool() {
 
-        synchronized (ValuePool.class) {
-            for (int i = 0; i &lt; POOLS_COUNT; i++) {
-                poolList[i].clear();
-            }
-        }
+//        synchronized (ValuePool.class) {
+//            for (int i = 0; i &lt; POOLS_COUNT; i++) {
+//                poolList[i].clear();
+//            }
+//        }
     }
 
     public static Integer getInt(int val) {
-
-        synchronized (intPool) {
+    	return new Integer(val);
+        /*synchronized (intPool) {
             return intPool.getOrAddInteger(val);
-        }
+        }*/
     }
 
     public static Long getLong(long val) {
-
-        synchronized (longPool) {
+    	return new Long(val);
+        /*synchronized (longPool) {
             return longPool.getOrAddLong(val);
-        }
+        }*/
     }
 
     public static Double getDouble(long val) {
-
-        synchronized (doublePool) {
+    	return new Double(val);
+        /*synchronized (doublePool) {
             return doublePool.getOrAddDouble(val);
-        }
+        }*/
     }
 
     public static String getString(String val) {
 
-        if (val == null || val.length() &gt; maxStringLength) {
+        //if (val == null || val.length() &gt; maxStringLength) {
             return val;
-        }
-
+        //}
+        /*    
         synchronized (stringPool) {
             return stringPool.getOrAddString(val);
-        }
+        }*/
     }
 
     public static Date getDate(long val) {
-
-        synchronized (datePool) {
-            return datePool.getOrAddDate(val);
-        }
+    	
+    	return new Date(val);
+        //synchronized (datePool) {
+        //    return datePool.getOrAddDate(val);
+        //}
     }
 
     public static BigDecimal getBigDecimal(BigDecimal val) {
 
-        if (val == null) {
+        //if (val == null) {
             return val;
-        }
+        //}
 
-        synchronized (bigdecimalPool) {
-            return (BigDecimal) bigdecimalPool.getOrAddObject(val);
-        }
+        //synchronized (bigdecimalPool) {
+        //    return (BigDecimal) bigdecimalPool.getOrAddObject(val);
+        //}
     }
 
     public static Boolean getBoolean(boolean b) {</diff>
      <filename>platform/bb/Hsqldb/src/org/hsqldb/store/ValuePool.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,9 @@
 ## RIM Java Development Environment
 # RIM Project file
+#
+# This file is generated and managed by BlackBerry developer tools.
+# It SHOULD NOT BE modified manually.
+#
 AddOn=0
 AlwaysBuild=0
 [AlxImports
@@ -19,12 +23,15 @@ ExcludeFromBuildAll=0
 [Files
 ..\..\shared\rubyJVM\src\com\rho\DateTimeTokenizer.java
 ..\..\shared\rubyJVM\src\com\rho\db\DBAdapter.java
+..\..\shared\rubyJVM\src\com\rho\db\DBAttrManager.java
 ..\..\shared\rubyJVM\src\com\rho\db\DBException.java
 ..\..\shared\rubyJVM\src\com\rho\db\IDBCallback.java
 ..\..\shared\rubyJVM\src\com\rho\db\IDBResult.java
 ..\..\shared\rubyJVM\src\com\rho\db\IDBStorage.java
 ..\..\shared\rubyJVM\src\com\rho\FilePath.java
 ..\..\shared\rubyJVM\src\com\rho\IFile.java
+..\..\shared\rubyJVM\src\com\rho\IFileAccess.java
+..\..\shared\rubyJVM\src\com\rho\IRAFile.java
 ..\..\shared\rubyJVM\src\com\rho\IRhoLogSink.java
 ..\..\shared\rubyJVM\src\com\rho\IRhoRubyHelper.java
 ..\..\shared\rubyJVM\src\com\rho\location\GeoLocation.java
@@ -57,6 +64,7 @@ ExcludeFromBuildAll=0
 ..\..\shared\rubyJVM\src\com\rho\sync\SyncEngine.java
 ..\..\shared\rubyJVM\src\com\rho\sync\SyncSource.java
 ..\..\shared\rubyJVM\src\com\rho\sync\SyncThread.java
+..\..\shared\rubyJVM\src\com\rho\sync\SyncNotify.java
 ..\..\shared\rubyJVM\src\com\rho\TestProfiler.java
 ..\..\shared\rubyJVM\src\com\rho\TestRhoLog.java
 ..\..\shared\rubyJVM\src\com\rho\TimeInterval.java
@@ -440,8 +448,11 @@ OutputFileName=RubyVM
 [PackageProtection
 ]
 RibbonPosition=0
+[RolloverIcons
+]
 RunOnStartup=0
 StartupTier=7
 SystemModule=0
 Type=2
+UserData=|src
 Version=1.45</diff>
      <filename>platform/bb/RubyVM/RubyVM.jdp</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,12 @@
 platform\shared\rubyJVM\src\com\rho\DateTimeTokenizer.java
+platform\shared\rubyJVM\src\com\rho\db\DBAttrManager.java
 platform\shared\rubyJVM\src\com\rho\db\DBAdapter.java
 platform\shared\rubyJVM\src\com\rho\db\DBException.java
 platform\shared\rubyJVM\src\com\rho\db\IDBCallback.java
 platform\shared\rubyJVM\src\com\rho\db\IDBResult.java
 platform\shared\rubyJVM\src\com\rho\db\IDBStorage.java
+platform\shared\rubyJVM\src\com\rho\IFileAccess.java
+platform\shared\rubyJVM\src\com\rho\IRAFile.java
 platform\shared\rubyJVM\src\com\rho\FilePath.java
 platform\shared\rubyJVM\src\com\rho\IFile.java
 platform\shared\rubyJVM\src\com\rho\IRhoLogSink.java
@@ -38,6 +41,7 @@ platform\shared\rubyJVM\src\com\rho\sync\ClientRegister.java
 platform\shared\rubyJVM\src\com\rho\sync\ISyncStatusListener.java
 platform\shared\rubyJVM\src\com\rho\sync\SyncSource.java
 platform\shared\rubyJVM\src\com\rho\sync\SyncThread.java
+platform\shared\rubyJVM\src\com\rho\sync\SyncNotify.java
 platform\shared\rubyJVM\src\com\rho\TestProfiler.java
 platform\shared\rubyJVM\src\com\rho\TestRhoLog.java
 platform\shared\rubyJVM\src\com\rho\TimeInterval.java</diff>
      <filename>platform/bb/build/RubyVM_build.files</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,19 @@
 #
+
+def freplace( fname, pattern, str )
+  f = File.open( fname )
+  strings = f.read
+  f.close
+
+  strings.gsub!( pattern, str )
+
+  f = File.new( fname, &quot;w&quot; )
+  f.print strings
+  f.close
+end
+
 def startmds
-  mdshome =  $config[&quot;env&quot;][&quot;paths&quot;][$config[&quot;env&quot;][&quot;bbver&quot;]][&quot;mds&quot;]
+  mdshome =  $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;mds&quot;]
   args = []
   args &lt;&lt; &quot;/c&quot;
   args &lt;&lt; &quot;run.bat&quot;
@@ -9,7 +22,7 @@ def startmds
 end 
 
 def stopmds
-  mdshome =  $config[&quot;env&quot;][&quot;paths&quot;][$config[&quot;env&quot;][&quot;bbver&quot;]][&quot;mds&quot;]
+  mdshome =  $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;mds&quot;]
   args = []
   args &lt;&lt; &quot;/c&quot;
   args &lt;&lt; &quot;shutdown.bat&quot;
@@ -18,9 +31,8 @@ def stopmds
 end 
 
 def startsim
-  bbver = $config[&quot;env&quot;][&quot;bbver&quot;]
-  sim = $config[&quot;env&quot;][&quot;paths&quot;][bbver][&quot;sim&quot;]
-  jde = $config[&quot;env&quot;][&quot;paths&quot;][bbver][&quot;jde&quot;]
+  sim = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;sim&quot;]
+  jde = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
     
   command =  '&quot;' + jde + &quot;/simulator/fledge.exe\&quot;&quot;
   args = []
@@ -34,30 +46,31 @@ def startsim
   args &lt;&lt; &quot;/pin=0x2100000A&quot;
   args &lt;&lt; &quot;/no-compact-filesystem&quot;
     
-  if bbver !~ /^4\.[012](\..*)?$/
+  if $bbver !~ /^4\.[012](\..*)?$/
     args &lt;&lt; &quot;/fs-sdcard=true&quot;
   end
         
-  args &lt;&lt; &quot;\&quot;/app-param=JvmDebugFile:&quot;+Jake.get_absolute($config[&quot;env&quot;][&quot;applog&quot;]) +'&quot;'
+  args &lt;&lt; &quot;\&quot;/app-param=JvmDebugFile:&quot;+Jake.get_absolute($app_config[&quot;applog&quot;]) +'&quot;'
 
   Thread.new { Jake.run(command,args,jde + &quot;/simulator&quot;,true) }
   $stdout.flush
 end
 
 def stopsim
-  sim = $config[&quot;env&quot;][&quot;paths&quot;][$config[&quot;env&quot;][&quot;bbver&quot;]][&quot;sim&quot;]
-  jde = $config[&quot;env&quot;][&quot;paths&quot;][$config[&quot;env&quot;][&quot;bbver&quot;]][&quot;jde&quot;]
+  sim = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;sim&quot;]
+  jde = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
     
   command =  '&quot;' + jde + &quot;/simulator/fledgecontroller.exe\&quot;&quot;
   args = []
   args &lt;&lt; &quot;/session=&quot;+sim
   args &lt;&lt; &quot;/execute=Exit(true)&quot;
-  Jake.run(command,args, jde + &quot;/simulator&quot;)
+  #Jake.run(command,args, jde + &quot;/simulator&quot;)
+  Thread.new { Jake.run(command,args, nil, true,true) }  
 end
 
 def manualsign
   java = $config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;] + &quot;/java.exe&quot;
-  jde = $config[&quot;env&quot;][&quot;paths&quot;][$config[&quot;env&quot;][&quot;bbver&quot;]][&quot;jde&quot;]
+  jde = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
 
   args = []
   args &lt;&lt; &quot;-jar&quot;
@@ -72,7 +85,7 @@ end
 
 def autosign
   java = $config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;] + &quot;/java.exe&quot;
-  jde = $config[&quot;env&quot;][&quot;paths&quot;][$config[&quot;env&quot;][&quot;bbver&quot;]][&quot;jde&quot;]
+  jde = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
 
   args = []
   args &lt;&lt; &quot;-jar&quot;
@@ -92,29 +105,35 @@ end
 
 namespace &quot;config&quot; do
   task :bb =&gt; [&quot;config:common&quot;] do
-    bbpath = $config[&quot;build&quot;][&quot;bbpath&quot;]
-    $bbver = $config[&quot;env&quot;][&quot;bbver&quot;]
-    $builddir = bbpath + &quot;/build&quot;
-    $bindir = bbpath + &quot;/bin&quot;
-    $rhobundledir =  bbpath + &quot;/RhoBundle&quot;
+    $config[&quot;platform&quot;] = &quot;bb&quot;
+
+    $bbver = $app_config[&quot;bbver&quot;].to_s
+    $builddir = $config[&quot;build&quot;][&quot;bbpath&quot;] + &quot;/build&quot;
+    $bindir = $app_path + &quot;/bin&quot;
+    $rhobundledir =  $app_path + &quot;/RhoBundle&quot;
     $srcdir =  $bindir + &quot;/RhoBundle&quot;
-    $preverified = bbpath + &quot;/preverified&quot;
-    $targetdir = bbpath + &quot;/target/&quot; + $bbver
-    $rubyVMdir = bbpath + &quot;/RubyVM&quot;
+    $preverified = $app_path + &quot;/preverified&quot;
+    $targetdir = $bindir + &quot;/target/&quot; + $bbver
+    $rubyVMdir = $app_path + &quot;/RubyVM&quot;
     $excludelib = ['**/singleton.rb','**/rational.rb','**/rhoframework.rb','**/date.rb']
-    $compileERB = bbpath + &quot;/build/compileERB.rb&quot;
+    $compileERB = $app_path + &quot;/build/compileERB.rb&quot;
     $tmpdir =  $bindir +&quot;/tmp&quot;
     $excludeapps = &quot;public/js/iui/**,**/jquery*&quot;
 
+    $assetfolder = $app_path + &quot;/public-&quot; + &quot;bb-&quot; + $bbver
+
+    $outfilebase = $app_config[&quot;name&quot;].nil? ? &quot;rhodesApp&quot; : $app_config[&quot;name&quot;]
+    $outfilebase.gsub!(/[^A-Za-z_0-9]/, '_')
+    
     $rhobundleimplib = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;] + &quot;/lib/net_rim_api.jar;&quot; +
-      Jake.get_absolute($preverified+&quot;/RubyVM.jar&quot;)
-    $rhodesimplib = $rhobundleimplib + &quot;;&quot;+ Jake.get_absolute($preverified+&quot;/RhoBundle.jar&quot;)
+      $preverified+&quot;/RubyVM.jar&quot;
+    $rhodesimplib = $rhobundleimplib + &quot;;&quot;+ $preverified+&quot;/RhoBundle.jar&quot;
   end
 end
 
 namespace &quot;build&quot; do
   namespace &quot;bb&quot; do
-    desc &quot;Build rhoBundle&quot;
+#    desc &quot;Build rhoBundle&quot;
     #XXX change to ns build, rhobundle
     task :rhobundle =&gt; :rubyvm do
       java = $config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;] + &quot;/java.exe&quot;
@@ -140,11 +159,16 @@ namespace &quot;build&quot; do
       end
       $stdout.flush
 
+      mkdir_p $rhobundledir unless File.exists? $rhobundledir
       cp $preverified + &quot;/RhoBundle.jar&quot;, $rhobundledir + &quot;/RhoBundle.jar&quot;
       
     end
 
-    desc &quot;Build RubyVM&quot;
+    task :devrhobundle =&gt; :rhobundle do
+      cp $preverified + &quot;/RhoBundle.jar&quot;, &quot;platform/bb/RhoBundle/RhoBundle.jar&quot;
+    end
+    
+#    desc &quot;Build RubyVM&quot;
     task :rubyvm =&gt; [&quot;config:bb&quot;] do
       javac = $config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;] + &quot;/javac.exe&quot;
       jdehome = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
@@ -202,7 +226,7 @@ namespace &quot;build&quot; do
       mkdir_p $tmpdir
     end
 
-    desc &quot;Build rhodes&quot;
+#    desc &quot;Build rhodes&quot;
     task :rhodes =&gt; [ :rubyvm, :rhobundle ] do
       javac = $config[&quot;env&quot;][&quot;paths&quot;][&quot;java&quot;] + &quot;/javac.exe&quot;
       jde =  $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
@@ -216,12 +240,27 @@ namespace &quot;build&quot; do
 
       if not FileUtils.uptodate?($preverified + &quot;/rhodes.jar&quot;,sources)
 
-        vsrcdir = $builddir + &quot;/../rhodes/platform/&quot; + $bbver
-        if !File.exist?( vsrcdir ) || !File.directory?( vsrcdir )
-          vsrcdir = $builddir + &quot;/../rhodes/platform/common&quot;
+        $tmpdir.gsub!(/\\/, '/')
+        vsrclist = $tmpdir + &quot;/vsrc_build.files&quot;
+
+#        vsrclist = $builddir + &quot;/../bin/vsrc_build.files&quot;
+#        mkdir_p $builddir + &quot;/../bin&quot; unless File.exists? $builddir + &quot;/../bin&quot;
+
+        vsrcdir = $tmpdir + &quot;/vsrc&quot;
+        mkdir_p vsrcdir
+        cp_r $builddir + &quot;/../rhodes/platform/common/.&quot;, vsrcdir
+        if File.exist?( $builddir + &quot;/../rhodes/platform/&quot; + $bbver )
+          cp_r $builddir + &quot;/../rhodes/platform/&quot; + $bbver + &quot;/.&quot;, vsrcdir, :remove_destination =&gt; true
         end
 
-        vsrclist = $builddir + &quot;/../bin/vsrc_build.files&quot;
+        # Modify sources to get different class names due to BB limitation -
+        # there can not be two or more applications installed which contains the same
+        # class names which implements Persistable interface. See details here -
+        # http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&amp;thread.id=11152
+        mkdir_p vsrcdir + &quot;/com/rho/file&quot;
+        cp_r $builddir + &quot;/../hsqldb/src/com/rho/file/PersistRAFileImpl.java&quot;, vsrcdir + &quot;/com/rho/file&quot;
+        freplace( vsrcdir + &quot;/com/rho/file/PersistRAFileImpl.java&quot;, /FileInfoWrapper/, $outfilebase + &quot;_FileInfoWrapper&quot; )
+        freplace( vsrcdir + &quot;/com/rho/file/PersistRAFileImpl.java&quot;, /PageWrapper/, $outfilebase + &quot;_PageWrapper&quot; )
 
         fvsrc = File.new( vsrclist, &quot;w&quot; )
         Dir.glob( vsrcdir + &quot;/**/*.java&quot; ).each do |line|
@@ -254,8 +293,10 @@ namespace &quot;build&quot; do
         end
         $stdout.flush
 
+        rm_rf vsrcdir
+
         cp_r $builddir + &quot;/../rhodes/resources&quot;, $tmpdir + &quot;/resources&quot;
-        cp $config[&quot;env&quot;][&quot;app&quot;] + &quot;/icon/icon.png&quot;, $tmpdir +&quot;/resources&quot;
+        cp $app_path + &quot;/icon/icon.png&quot;, $tmpdir +&quot;/resources&quot;
         
         Jake.jar($bindir + &quot;/rhodes.jar&quot;, $builddir + &quot;/manifest.mf&quot;, $tmpdir,true)
         $stdout.flush
@@ -282,15 +323,15 @@ end
 
 namespace &quot;package&quot; do
   namespace &quot;bb&quot; do
-    desc &quot;Package rhoBundle&quot;
+#    desc &quot;Package rhoBundle&quot;
     task :rhobundle =&gt; [&quot;build:bb:rhobundle&quot;] do
       Jake.rapc(&quot;RhoBundle&quot;,
         $targetdir,
         $rhobundleimplib ,
-        '&quot;' + Jake.get_absolute($preverified + &quot;/RhoBundle.jar&quot;) + '&quot;',
+        '&quot;' + $preverified + &quot;/RhoBundle.jar&quot; + '&quot;',
         &quot;RhoBundle&quot;,
-        $config[&quot;env&quot;][&quot;vendor&quot;],
-        $config[&quot;env&quot;][&quot;version&quot;]
+        $app_config[&quot;vendor&quot;],
+        $app_config[&quot;version&quot;]
       )
       unless $? == 0
         puts &quot;Error in RAPC&quot;
@@ -300,7 +341,7 @@ namespace &quot;package&quot; do
 
     end
 
-    desc &quot;Package rubyVM&quot;
+#    desc &quot;Package rubyVM&quot;
     task :rubyvm =&gt; &quot;build:bb:rubyvm&quot; do
       jdehome = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
 
@@ -308,10 +349,10 @@ namespace &quot;package&quot; do
         Jake.rapc(&quot;RubyVM&quot;,
           $targetdir,
           jdehome + &quot;/lib/net_rim_api.jar&quot;,
-          '&quot;' + Jake.get_absolute($preverified + &quot;/RubyVM.jar&quot;) +'&quot;',
+          '&quot;' + $preverified + &quot;/RubyVM.jar&quot; +'&quot;',
           &quot;RubyVM&quot;,
-          $config[&quot;env&quot;][&quot;vendor&quot;],
-          $config[&quot;env&quot;][&quot;version&quot;]
+          $app_config[&quot;vendor&quot;],
+          $app_config[&quot;version&quot;]
         )
         unless $? == 0
           puts &quot;Error in RAPC&quot;
@@ -325,18 +366,18 @@ namespace &quot;package&quot; do
 
     end
 
-    desc &quot;Package rhodesApp&quot;
+#    desc &quot;Package rhodesApp&quot;
     task :rhodes =&gt; [&quot;build:bb:rhodes&quot;] do
-      appname = $config[&quot;env&quot;][&quot;appname&quot;].nil? ? &quot;rhodesApp&quot; : $config[&quot;env&quot;][&quot;appname&quot;]
+      appname = $app_config[&quot;name&quot;].nil? ? &quot;rhodesApp&quot; : $app_config[&quot;name&quot;]
 
-      if not FileUtils.uptodate?($targetdir + '/rhodesApp.cod',$preverified + &quot;/rhodes.jar&quot;)
-        Jake.rapc(&quot;rhodesApp&quot;,
+      if not FileUtils.uptodate?($targetdir + '/' + $outfilebase + '.cod',$preverified + &quot;/rhodes.jar&quot;)
+        Jake.rapc($outfilebase,
           $targetdir,
           $rhodesimplib,
-          '&quot;' + Jake.get_absolute( $preverified + &quot;/rhodes.jar&quot;) +'&quot;',
+          '&quot;' +  $preverified + &quot;/rhodes.jar&quot; +'&quot;',
           appname,
-          $config[&quot;env&quot;][&quot;vendor&quot;],
-          $config[&quot;env&quot;][&quot;version&quot;],
+          $app_config[&quot;vendor&quot;],
+          $app_config[&quot;version&quot;],
           &quot;resources/icon.png&quot;,
           false,
           true
@@ -346,7 +387,10 @@ namespace &quot;package&quot; do
           exit 1
         end
         $stdout.flush
-        cp $builddir + &quot;/rhodesApp.alx&quot;, $targetdir if not FileUtils.uptodate?( $targetdir + &quot;/rhodesApp.alx&quot;, $builddir + &quot;/rhodesApp.alx&quot;)
+        if not FileUtils.uptodate?( $targetdir + &quot;/&quot; + $outfilebase + &quot;.alx&quot;, $builddir + &quot;/rhodesApp.alx&quot; )
+          cp $builddir + &quot;/rhodesApp.alx&quot;, $targetdir + &quot;/&quot; + $outfilebase + &quot;.alx&quot;
+          freplace( $targetdir + &quot;/&quot; + $outfilebase + &quot;.alx&quot;, /rhodesApp/, appname )
+        end
       else
         puts 'rhodes .cod files are up to date'
         $stdout.flush
@@ -354,7 +398,7 @@ namespace &quot;package&quot; do
           
     end
 
-    desc &quot;Package all production (all parts in one package)&quot;
+#    desc &quot;Package all production (all parts in one package)&quot;
     task :production =&gt; [&quot;build:bb:rhodes&quot;] do
       jdehome = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
       rm_rf $tmpdir
@@ -380,17 +424,17 @@ namespace &quot;package&quot; do
         end
       end
 
-      Jake.jar($bindir + &quot;/rhodesApp.jar&quot;,$builddir + &quot;/manifest.mf&quot;,$tmpdir,true)
+      Jake.jar($bindir + &quot;/&quot; + $outfilebase + &quot;.jar&quot;,$builddir + &quot;/manifest.mf&quot;,$tmpdir,true)
 
-      appname = $config[&quot;env&quot;][&quot;appname&quot;].nil? ? &quot;rhodesApp&quot; : $config[&quot;env&quot;][&quot;appname&quot;]
+      appname = $app_config[&quot;name&quot;].nil? ? &quot;rhodesApp&quot; : $app_config[&quot;name&quot;]
 
-      Jake.rapc(&quot;rhodesApp&quot;,
+      Jake.rapc($outfilebase,
         $targetdir,
         jdehome + &quot;/lib/net_rim_api.jar&quot;,
-        '&quot;' + Jake.get_absolute( $bindir + &quot;/rhodesApp.jar&quot;) +'&quot;',
+        '&quot;' +  $bindir + &quot;/&quot; + $outfilebase + &quot;.jar&quot; +'&quot;',
         appname,
-        $config[&quot;env&quot;][&quot;vendor&quot;],
-        $config[&quot;env&quot;][&quot;version&quot;],
+        $app_config[&quot;vendor&quot;],
+        $app_config[&quot;version&quot;],
         &quot;resources/icon.png&quot;,
         false,
         true
@@ -400,12 +444,13 @@ namespace &quot;package&quot; do
         exit 1
       end
       $stdout.flush
-      cp $builddir +&quot;/rhodesApp.alx&quot;, $targetdir if not FileUtils.uptodate?( $targetdir+&quot;/rhodesApp.alx&quot;, $builddir + &quot;/rhodesApp.alx&quot;)
-
-
+      if not FileUtils.uptodate?( $targetdir + &quot;/&quot; + $outfilebase + &quot;.alx&quot;, $builddir + &quot;/rhodesApp.alx&quot; )
+        cp $builddir +&quot;/rhodesApp.alx&quot;, $targetdir + &quot;/&quot; + $outfilebase + &quot;.alx&quot;
+        freplace( $targetdir + &quot;/&quot; + $outfilebase + &quot;.alx&quot;, /rhodesApp/, appname )
+      end
     end
 
-    desc &quot;Package all dev (each part in separate package)&quot;
+#    desc &quot;Package all dev (each part in separate package)&quot;
     task :dev =&gt; [ :rubyvm,:rhobundle,:rhodes] do
     end
   end
@@ -416,8 +461,8 @@ end
 
 namespace &quot;device&quot; do
   namespace &quot;bb&quot; do
-    desc &quot;Build and package dev for device&quot;
-    task :dev =&gt; &quot;package:bb:dev&quot; do
+    desc &quot;Build debug for device&quot;
+    task :debug =&gt; &quot;package:bb:dev&quot; do
 
       #make into functions
       if $config[&quot;build&quot;][&quot;bbsignpwd&quot;] and $config[&quot;build&quot;][&quot;bbsignpwd&quot;] != &quot;&quot;
@@ -430,16 +475,16 @@ namespace &quot;device&quot; do
       mkdir_p $targetdir + &quot;/web&quot;
 
       cp $targetdir + &quot;/RhoBundle.jad&quot;, $targetdir + &quot;/web&quot;
-      cp $targetdir + &quot;/rhodesApp.jad&quot;, $targetdir + &quot;/web&quot;
+      cp $targetdir + &quot;/&quot;+$outfilebase+&quot;.jad&quot;, $targetdir + &quot;/web&quot;
       cp $targetdir + &quot;/RubyVM.jad&quot;, $targetdir + &quot;/web&quot;
 
       Jake.unjar($targetdir + &quot;/RhoBundle.cod&quot;, $targetdir + &quot;/web&quot;)
-      Jake.unjar($targetdir + &quot;/rhodesApp.cod&quot;, $targetdir + &quot;/web&quot;)
+      Jake.unjar($targetdir + &quot;/&quot;+$outfilebase+&quot;.cod&quot;, $targetdir + &quot;/web&quot;)
       Jake.unjar($targetdir + &quot;/RubyVM.cod&quot;, $targetdir + &quot;/web&quot;)
 
     end
 
-    desc &quot;Build and package dev rhobundle for device&quot;
+#    desc &quot;Build and package dev rhobundle for device&quot;
     task :rhobundle =&gt; &quot;package:bb:rhobundle&quot; do
 
       if $config[&quot;build&quot;][&quot;bbsignpwd&quot;] and $config[&quot;build&quot;][&quot;bbsignpwd&quot;] != &quot;&quot;
@@ -456,7 +501,7 @@ namespace &quot;device&quot; do
 
     end
 
-    desc &quot;Build and package for production&quot;
+    desc &quot;Build production for device&quot;
     task :production =&gt; &quot;package:bb:production&quot; do
 
       if $config[&quot;build&quot;][&quot;bbsignpwd&quot;] and $config[&quot;build&quot;][&quot;bbsignpwd&quot;] != &quot;&quot;
@@ -465,12 +510,14 @@ namespace &quot;device&quot; do
         manualsign
       end
 
-      rm_rf $targetdir + &quot;/web&quot;
-      mkdir_p $targetdir + &quot;/web&quot;
+      rm_rf $targetdir + &quot;/ota-web&quot;
+      mkdir_p $targetdir + &quot;/ota-web&quot;
 
-      cp $targetdir + &quot;/rhodesApp.jad&quot;, $targetdir + &quot;/web&quot;
+      cp $targetdir + &quot;/&quot;+$outfilebase+&quot;.jad&quot;, $targetdir + &quot;/ota-web&quot;
 
-      Jake.unjar($targetdir + &quot;/rhodesApp.cod&quot;, $targetdir + &quot;/web&quot;)
+      Jake.unjar($targetdir + &quot;/&quot;+$outfilebase+&quot;.cod&quot;, $targetdir + &quot;/ota-web&quot;)
+      
+      rm_rf Dir.glob($targetdir + &quot;/*.debug&quot;)
 
     end
 
@@ -478,46 +525,53 @@ namespace &quot;device&quot; do
 end
 
 namespace &quot;clean&quot; do
+  desc &quot;Clean bb&quot;
+  task :bb =&gt; &quot;clean:bb:all&quot;
   namespace &quot;bb&quot; do
-    desc &quot;Clean preverified jars&quot;
+#    desc &quot;Clean preverified jars&quot;
     task :preverified =&gt; &quot;config:bb&quot; do
       rm_rf $preverified if File.exists? $preverified
-      mkdir_p $preverified
     end
 
-    desc &quot;Clean packaged files&quot;
+#    desc &quot;Clean packaged files&quot;
     task :packaged =&gt; &quot;config:bb&quot; do
-      rm_rf $targetdir
-      mkdir_p $targetdir
+      rm_rf $targetdir +&quot;/../&quot;
     end
 
-    desc &quot;Clean temp dir&quot;
+#    desc &quot;Clean temp dir&quot;
     task :tempdir =&gt; &quot;config:bb&quot; do
       rm_rf $tmpdir
-      mkdir_p $tmpdir
     end
 
-    desc &quot;Clean all&quot;
+#    desc &quot;Clean all&quot;
     task :all =&gt; [:preverified,:packaged,:tempdir] do
       rm_rf $bindir
+      rm_rf $rhobundledir
     end
 
   end
 end
 
 namespace &quot;run&quot; do
+  namespace &quot;bb&quot; do
+      task :stopmdsandsim =&gt; [&quot;config:bb&quot;] do
+        stopsim  
+        stopmds
+      end
 
-  task :stopmdsandsim =&gt; [&quot;config:bb&quot;] do
-    stopsim  
-    stopmds
+#      desc &quot;Starts mds and sim&quot;
+      task :startmdsandsim =&gt; [&quot;config:bb&quot;] do
+        startmds
+        startsim
+      end
   end
   
-  desc &quot;Builds everything, loads and starts sim&quot;
-  task :bb =&gt; [:stopmdsandsim, &quot;package:bb:dev&quot;] do
+  desc &quot;Builds everything, loads and starts bb sim and mds&quot;
+  task :bb =&gt; [&quot;run:bb:stopmdsandsim&quot;, &quot;package:bb:dev&quot;] do
     #sim = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;sim&quot;]
     jde = $config[&quot;env&quot;][&quot;paths&quot;][$bbver][&quot;jde&quot;]
     
-    cp_r Jake.get_absolute(File.join($targetdir,&quot;/.&quot;)), jde + &quot;/simulator&quot;
+    cp_r File.join($targetdir,&quot;/.&quot;), jde + &quot;/simulator&quot;
     
     startmds
     startsim
@@ -589,23 +643,4 @@ namespace &quot;config&quot; do
     puts &quot;Config appears valid&quot;
   end
 
-end
-
-namespace &quot;prebuild&quot; do
-  desc &quot;Prebuild binaries for blackberry gems&quot;
-  task :bb =&gt; [&quot;build:bb:rubyvm&quot;, &quot;build:bb:rhodes&quot;] do
-    if File.exists? $preverified + &quot;/RubyVM.jar&quot; and File.exists? $preverified + &quot;/rhodes.jar&quot;
-      prebuilt = &quot;rhodes/rhodes-build/res/prebuilt/bb&quot;
-
-      rm_rf prebuilt if File.exists? prebuilt
-      mkdir_p prebuilt
-
-      cp $preverified + &quot;/RubyVM.jar&quot;, prebuilt
-      cp $preverified + &quot;/rhodes.jar&quot;, prebuilt
-
-      cp $builddir + &quot;/MANIFEST.MF&quot;, prebuilt
-      cp $builddir + &quot;/rhodesApp.alx&quot;, prebuilt
-      
-    end
-  end
 end
\ No newline at end of file</diff>
      <filename>platform/bb/build/bb.rake</filename>
    </modified>
    <modified>
      <diff>@@ -4,9 +4,8 @@ platform\bb\Hsqldb\src\com\rho\db\HsqlDBRowResult.java
 platform\bb\Hsqldb\src\com\rho\db\HsqlDBStorage.java
 platform\bb\Hsqldb\src\com\rho\db\Journal.java
 platform\bb\Hsqldb\src\com\rho\db\RandomAccessFile.java
-platform\bb\Hsqldb\src\com\rho\db\file\Jsr75RAFileImpl.java
-platform\bb\Hsqldb\src\com\rho\db\file\PersistRAFileImpl.java
-platform\bb\Hsqldb\src\com\rho\db\file\RAFileImpl.java
+platform\bb\Hsqldb\src\com\rho\file\FileAccessBB.java
+platform\bb\Hsqldb\src\com\rho\file\Jsr75RAFileImpl.java
 platform\bb\Hsqldb\src\j2me\io\BufferedOutputStream.java
 platform\bb\Hsqldb\src\j2me\io\FilterOutputStream.java
 platform\bb\Hsqldb\src\j2me\math\BigDecimal.java</diff>
      <filename>platform/bb/build/hsqldb_build.files</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,9 @@
 ## RIM Java Development Environment
 # RIM Project file
+#
+# This file is generated and managed by BlackBerry developer tools.
+# It SHOULD NOT BE modified manually.
+#
 AddOn=0
 AlwaysBuild=0
 [AlxImports
@@ -28,6 +32,7 @@ src\com\rho\location\GeoLocationImpl.java
 src\com\rho\net\bb\BBHttpConnection.java
 src\com\rho\net\bb\NativeBBHttpConnection.java
 src\com\rho\net\NetworkAccess.java
+src\com\rho\RhoMainScreen.java
 src\com\rho\RhoRubyHelper.java
 src\com\rho\Version.java
 src\rhomobile\Alert.java</diff>
      <filename>platform/bb/rhodes/rhodes.jdp</filename>
    </modified>
    <modified>
      <diff>@@ -16,12 +16,20 @@ import rhomobile.datetime.DateTimePicker;
 
 import com.rho.db.HsqlDBStorage;
 import com.rho.db.IDBStorage;
+import com.rho.file.FileAccessBB;
+import com.rho.file.Jsr75RAFileImpl;
+import com.rho.file.PersistRAFileImpl;
 import com.xruby.runtime.builtin.RubyArray;
 import com.xruby.runtime.lang.RubyProgram;
 import com.xruby.runtime.lang.RubyRuntime;
 
 public class RhoRubyHelper implements IRhoRubyHelper {
 
+	// WARNING!!! Be very carefull when modify these lines! There was a case when
+	// entire application has verification error in case if this line is not at start
+	// of class. It is impossible to explain why it happened but need to be remembered
+	public static final String USE_PERSISTENT = &quot;use_persistent_storage&quot;;
+	
 	public static final int COVERAGE_BIS_B = 4;
 	  
 	public void initRubyExtensions(){
@@ -67,6 +75,7 @@ public class RhoRubyHelper implements IRhoRubyHelper {
 
 	public boolean isSimulator(){
 		return DeviceInfo.isSimulator();
+		//return false;
     }
 
 	public String getModuleName()
@@ -142,4 +151,15 @@ public class RhoRubyHelper implements IRhoRubyHelper {
 	public IDBStorage createDBStorage() {
 		return new HsqlDBStorage();
 	}
+
+	public IFileAccess createFileAccess() {
+		return new FileAccessBB();
+	}
+
+	public IRAFile createRAFile() {
+		if (RhoConf.getInstance().getBool(USE_PERSISTENT))
+			return new PersistRAFileImpl();
+		else
+			return new Jsr75RAFileImpl();
+	}
 }</diff>
      <filename>platform/bb/rhodes/src/com/rho/RhoRubyHelper.java</filename>
    </modified>
    <modified>
      <diff>@@ -30,6 +30,7 @@ public class Version {
     public static class SoftVersion{
 		public int nMajor = 0;
 		public int nMinor = 0;
+		public int nMinor2 = 0;
     };
     
     private static SoftVersion m_softVer;
@@ -50,7 +51,13 @@ public class Version {
 			
 			int nDot2 = strVer.indexOf('.',nDot+1);
 			if ( nDot2 &gt;= 0 )
+			{
 				m_softVer.nMinor = Integer.parseInt( strVer.substring(nDot+1,nDot2) );
+				
+				int nDot3 = strVer.indexOf('.',nDot2+1);
+				if ( nDot3 &gt;= 0 )
+					m_softVer.nMinor2 = Integer.parseInt( strVer.substring(nDot2+1,nDot3) );
+			}
 			else
 				m_softVer.nMinor = Integer.parseInt( strVer.substring(nDot+1) );
 		}else</diff>
      <filename>platform/bb/rhodes/src/com/rho/Version.java</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,7 @@ import javax.microedition.io.Connector;
 import javax.microedition.io.HttpConnection;
 
 import rhomobile.RhodesApplication;
+import rhomobile.Utilities;
 
 import net.rim.device.api.servicebook.ServiceBook;
 import net.rim.device.api.servicebook.ServiceRecord;
@@ -16,6 +17,8 @@ import com.rho.BBVersionSpecific;
 import com.rho.RhoEmptyLogger;
 import com.rho.RhoLogger;
 import com.rho.net.bb.BBHttpConnection;
+import com.rho.net.bb.NativeBBHttpConnection;
+
 import net.rim.device.api.io.http.HttpHeaders;
 
 public class NetworkAccess implements INetworkAccess {
@@ -41,7 +44,7 @@ public class NetworkAccess implements INetworkAccess {
 		String strDeviceside = &quot;;deviceside=true&quot;;
 		if ( com.rho.RhoConf.getInstance().getInt(&quot;no_deviceside_postfix&quot;) == 1 )
 			strDeviceside = &quot;&quot;;
-		
+
 		if (DeviceInfo.isSimulator()) {
 			URLsuffix = &quot;;deviceside=true&quot;;
 			networkConfigured = true;
@@ -63,18 +66,6 @@ public class NetworkAccess implements INetworkAccess {
 				}
 				
 				ServiceRecord[] srs = sb.getRecords();
-				// search for BES transport
-				for (int i = 0; i &lt; srs.length; i++) {
-					if (srs[i].isDisabled() || !srs[i].isValid())
-						continue;
-					if (srs[i].getCid().equals(&quot;IPPP&quot;)
-							&amp;&amp; srs[i].getName().equals(&quot;Desktop&quot;)) {
-						URLsuffix = &quot;&quot;;
-						networkConfigured = true;
-						bes = true;
-						break;
-					}
-				}
 				// search for BIS-B transport
 				if (URLsuffix == null) {
 					for (int i = 0; i &lt; srs.length; i++) {
@@ -90,25 +81,54 @@ public class NetworkAccess implements INetworkAccess {
 						}
 					}
 				}
+				
+				// search for BES transport
+				for (int i = 0; i &lt; srs.length; i++) {
+					LOG.INFO(&quot;SB: &quot; + srs[i].getName() + &quot;;UID: &quot; + srs[i].getUid() +
+							&quot;;CID: &quot; + srs[i].getCid() +
+							&quot;;APN: &quot; + srs[i].getAPN() + &quot;;Descr: &quot; + srs[i].getDataSourceId() +
+							&quot;;Valid: &quot; + (srs[i].isValid() ? &quot;true&quot; : &quot;false&quot;) + 
+							&quot;;Disabled: &quot;+ (srs[i].isDisabled()? &quot;true&quot; : &quot;false&quot;) );
+					
+					if (srs[i].isDisabled() || !srs[i].isValid())
+						continue;
+					if (srs[i].getCid().equals(&quot;IPPP&quot;)
+							&amp;&amp; srs[i].getName().equals(&quot;Desktop&quot;)) {
+						URLsuffix = &quot;&quot;;
+						networkConfigured = true;
+						bes = true;
+						break;
+					}
+				}
+				
 			}
 		}
 		
-		if (networkConfigured == false) {
+		String strConfPostfix = com.rho.RhoConf.getInstance().getString(&quot;bb_connection_postfix&quot;);
+		if ( strConfPostfix != null &amp;&amp; strConfPostfix.length() &gt; 0 )
+		{
+			URLsuffix = strConfPostfix;
+			networkConfigured = true;
+		}else if (networkConfigured == false) {
 			URLsuffix = strDeviceside;//&quot;;deviceside=true&quot;;
 			networkConfigured = true;
 		}
-		
+
+		LOG.INFO(&quot;Postfix: &quot; + URLsuffix);
 	}
 
-	public boolean doLocalRequest(String strUrl, String strBody)
+	/*public IHttpConnection doLocalRequest(String strUrl, String strBody)
 	{
 		HttpHeaders headers = new HttpHeaders();
 		headers.addProperty(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;);
 		
-		RhodesApplication.getInstance().postUrl(strUrl, strBody, headers);
 		
-		return true;
-	}
+		HttpConnection http = Utilities.makeConnection(strUrl, headers, strBody.getBytes());
+		
+//		RhodesApplication.getInstance().postUrl(strUrl, strBody, headers);
+		
+		return new BBHttpConnection(http);
+	}*/
 	
 	public boolean isWifiActive()
 	{
@@ -119,6 +139,12 @@ public class NetworkAccess implements INetworkAccess {
 	{
 		HttpConnection http = null;
 
+		if ( URI.isLocalHost(url) )
+		{
+			URI uri = new URI(url);
+			return new RhoConnection(uri);
+		}
+		
 		int fragment = url.indexOf('#');
 		if (-1 != fragment) {
 			url = url.substring(0, fragment);
@@ -144,11 +170,30 @@ public class NetworkAccess implements INetworkAccess {
 				LOG.INFO(url + URLsuffix);
 				http = (HttpConnection) Connector.open(url + URLsuffix);
 			} catch (IOException ioe) {
-				LOG.ERROR(&quot;Connector.open exception&quot;, ioe );
-				if (http != null)
-					http.close();
-				http = null;
-				throw ioe;
+				
+				if ( URLsuffix.length() &gt; 0 )
+				{
+					try{
+						LOG.INFO(url);
+						http = (HttpConnection) Connector.open(url);
+					} catch (IOException ioe2) {
+						LOG.ERROR(&quot;Connector.open exception&quot;, ioe2 );
+						if (http != null)
+							http.close();
+						http = null;
+						throw ioe2;
+					}
+				}else
+				{				
+					LOG.ERROR(&quot;Connector.open exception&quot;, ioe );
+					if (http != null)
+						http.close();
+					http = null;
+					throw ioe;
+				}
+			}catch(Exception exc)
+			{
+				throw new IOException(&quot;Could not open network connection.&quot;);
 			}
 		}
 		</diff>
      <filename>platform/bb/rhodes/src/com/rho/net/NetworkAccess.java</filename>
    </modified>
    <modified>
      <diff>@@ -29,13 +29,7 @@ import net.rim.device.api.system.KeyListener;
 import net.rim.device.api.system.SystemListener;
 //import javax.microedition.io.file.FileSystemListener;
 import net.rim.device.api.system.TrackwheelListener;
-import net.rim.device.api.ui.ContextMenu;
-import net.rim.device.api.ui.Field;
-import net.rim.device.api.ui.FieldChangeListener;
-import net.rim.device.api.ui.Graphics;
-import net.rim.device.api.ui.Keypad;
-import net.rim.device.api.ui.MenuItem;
-import net.rim.device.api.ui.UiApplication;
+import net.rim.device.api.ui.*;
 import net.rim.device.api.ui.component.Dialog;
 import net.rim.device.api.ui.component.Menu;
 import net.rim.device.api.ui.component.Status;
@@ -53,13 +47,18 @@ import com.rho.Mutex;
 import com.rho.RhoClassFactory;
 import com.rho.RhoConf;
 import com.rho.RhoEmptyLogger;
+import com.rho.RhoEmptyProfiler;
 import com.rho.RhoLogger;
+import com.rho.RhoMainScreen;
+import com.rho.RhoProfiler;
 import com.rho.RhoRuby;
 import com.rho.RhoThread;
 import com.rho.SimpleFile;
 import com.rho.Version;
+import com.rho.db.DBAdapter;
 import com.rho.location.GeoLocation;
 import com.rho.net.RhoConnection;
+import com.rho.net.URI;
 import com.rho.sync.SyncThread;
 import com.rho.sync.ISyncStatusListener;
 import com.rho.Jsr75File;
@@ -82,6 +81,9 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 	
 	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
 		new RhoLogger(&quot;RhodesApplication&quot;);
+	
+	private static final RhoProfiler PROF = RhoProfiler.RHO_STRIP_PROFILER ? new RhoEmptyProfiler() : 
+		new RhoProfiler();
 
 	/*boolean m_bSDCardAdded = false;
 	public void rootChanged(int arg0, String arg1)
@@ -146,12 +148,17 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 
     //}
 
+    boolean isExternalUrl(String strUrl)
+    {
+    	return strUrl.startsWith(&quot;http://&quot;) || strUrl.startsWith(&quot;https://&quot;);    
+    }
+    
     String canonicalizeURL( String url ){
 		if ( url == null || url.length() == 0 )
 			return &quot;&quot;;
 
 		url.replace('\\', '/');
-		if ( !url.startsWith(_httpRoot) ){
+		if ( !url.startsWith(_httpRoot) &amp;&amp; !isExternalUrl(url) ){
     		if ( url.charAt(0) == '/' )
     			url = _httpRoot.substring(0, _httpRoot.length()-1) + url;
     		else
@@ -233,7 +240,7 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 
     void addToHistory(String strUrl, String refferer )
     {
-        if ( !strUrl.startsWith(_httpRoot) )
+        if ( !strUrl.startsWith(_httpRoot) &amp;&amp; !isExternalUrl(strUrl) )
         	strUrl = _httpRoot + (strUrl.startsWith(&quot;/&quot;) ? strUrl.substring(1) : strUrl);
     	
     	int nPos = -1;
@@ -268,23 +275,33 @@ final public class RhodesApplication extends UiApplication implements RenderingA
     	saveCurrentLocation(strUrl);
     }
 
-    void openLink(){
+    private boolean m_bOpenLink = false;
+    boolean openLink(){
     	LOG.INFO(&quot;openLink&quot;);
-    	Menu menu = _mainScreen.getMenu(0);
-        int size = menu.getSize();
-        for(int i=0; i&lt;size; i++)
-        {
-            MenuItem item = menu.getItem(i);
-            String label = item.toString();
-            if(label.equalsIgnoreCase(&quot;Get Link&quot;)) //TODO: catch by ID?
-            {
-              item.run();
-            }
-        }
+    	try{
+    		m_bOpenLink = true;
+	    	Menu menu = _mainScreen.getMenu(0);
+	        int size = menu.getSize();
+	        for(int i=0; i&lt;size; i++)
+	        {
+	            MenuItem item = menu.getItem(i);
+	            String label = item.toString();
+	            if(label.equalsIgnoreCase(&quot;Get Link&quot;)) //TODO: catch by ID?
+	            {
+	              item.run();
+	              return true;
+	            }
+	        }
+    	}finally
+	    {
+    		m_bOpenLink = false;
+	    }
 //    	MenuItem item = _mainScreen.getSavedGetLinkItem();
 //    	if ( item != null ) {
 //    		item.run();
 //    	}
+        
+        return false;
     }
 
     public void showPopup(final String message) {
@@ -352,7 +369,11 @@ final public class RhodesApplication extends UiApplication implements RenderingA
             				//retrieve the file
             				Class clazz = Class.forName(&quot;rhomobile.RhodesApplication&quot;);
             				file = RhoClassFactory.createFile();
-            				InputStream is = file.getResourceAsStream(clazz.getClass(), &quot;/apps&quot; + file_name);
+            				String strClassName = file_name;
+            				if ( !strClassName.startsWith(&quot;/apps&quot;) )
+            					strClassName = &quot;/apps&quot; + file_name;
+            				
+            				InputStream is = file.getResourceAsStream(clazz.getClass(), strClassName);
             				//create an instance of the player from the InputStream
             				Player player = javax.microedition.media.Manager.createPlayer(is,type);
             				player.realize();
@@ -469,6 +490,7 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 		}
 		
 		m_bActivated = true;
+		
 		doStartupWork();
 		
     	LOG.TRACE(&quot;Rhodes activate ***--------------------------***&quot;);
@@ -483,6 +505,7 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 
 	public void deactivate() {
     	LOG.TRACE(&quot;Rhodes deactivate ***--------------------------***&quot;);		
+    	
 //		SyncEngine.stop(null);
 		GeoLocation.stop();
 		RingtoneManager.stop();
@@ -504,13 +527,19 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 		//LOG.INFO(&quot;Sync status: &quot; + status);
 		//if (_syncStatusPopup == null &amp;&amp; error != 0) {
 		//	createStatusPopup();
-		//} else 
-		if (_syncStatusPopup != null) { 
-			_syncStatusPopup.showStatus(status);
-		}
+		//} else
+		invokeLater( new Runnable() {
+			public void run() {
+				if (_syncStatusPopup != null) { 
+					_syncStatusPopup.showStatus(_lastStatusMessage);
+				}
+			}
+		});	
+				
 	}
 	
 	public void createStatusPopup() {
+		_lastStatusMessage = null;
 		invokeLater( new Runnable() {
 			public void run() {
 				if (_syncStatusPopup == null) {
@@ -537,9 +566,9 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 	    
 	    public void showStatus(String status) {
 	    	if (status == null) return;
-            synchronized (Application.getEventLock()) {	
+            //synchronized (Application.getEventLock()) {	
 	    		_labelStatus.setText(status);
-            }
+           // }
 	    }
 	    
 	    protected boolean keyDown( int keycode, int status ) {
@@ -564,9 +593,18 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 		}
 	}
 	
-    class CMainScreen extends MainScreen{
+    class CMainScreen extends RhoMainScreen{
     	
-    	private Vector menuItems = new Vector();
+    	protected boolean navigationClick(int status, int time) {
+			//LOG.INFO(&quot;navigationClick: &quot; + status);
+			return super.navigationClick(status, time);
+		}
+
+    	protected void onTouchUnclick() {
+			openLink();
+    	}
+    	
+		private Vector menuItems = new Vector();
 
 		private MenuItem homeItem = new MenuItem(RhodesApplication.LABEL_HOME, 200000, 10) {
 			public void run() {
@@ -615,11 +653,20 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 
 		private MenuItem savedGetLinkItem = null;
 
-		protected void makeMenu(Menu menu, int instance) {
+		protected void makeMenu(Menu menu, int instance) 
+		{
+			if (m_bOpenLink)
+			{
+				super.makeMenu(menu, instance);
+				return;
+			}
+			
+			menu.deleteAll();
+/*			
 	        // TODO: This is really a hack, we should replicate the &quot;Get Link&quot; functionality
 			// Also, for some reason the menu size becomes 0 when there is 1 item left (page view)
 	    	for(int i=0; i &lt; menu.getSize(); i++) {
-	    		System.out.println(&quot;Getting menu item: &quot; + i);
+	    		//System.out.println(&quot;Getting menu item: &quot; + i);
 	    	    MenuItem item = menu.getItem(i);
 	    	    String label = item.toString();
 	    	    // Save the get link menuitem
@@ -643,7 +690,7 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 	    		// item with index 0 cause exception - menu is actually empty!
 	    	}
 	    	if (pgview != null &amp;&amp; pgview.getId() == 853)
-	    		menu.deleteItem(0);
+	    		menu.deleteItem(0);*/
 	    	
 			// Don't draw menu if menuItems is null
 			if (menuItems == null)
@@ -670,6 +717,8 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 				contextMenu.addItem(item);
 			}
 		
+			//setDefaultItemToMenu(RhodesApplication.LABEL_SYNC, syncItem, contextMenu);
+			
 			this.makeContextMenu(contextMenu);
 			menu.add(contextMenu);
 		}
@@ -834,7 +883,24 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 	    		LOG.ERROR(exc.getMessage());
 	    	}
 	    	
+	    	//PROF.createSqlCounters();
+	    	
 	        RhoRuby.RhoRubyStart(&quot;&quot;);
+	        
+	        /*
+	        DBAdapter db = DBAdapter.getInstance();
+	        String sql = &quot;select * from object_values&quot;;
+	        
+	        //PROF.flushSqlCounters(&quot;First run&quot;);
+	        
+	        for (int i = 0; i &lt; 3; ++i) {
+	        	LOG.INFO(&quot;Doing select: &quot; + i);
+	        	db.executeSQL(sql);
+	        	LOG.INFO(&quot;Done&quot;);
+	        	//PROF.flushSqlCounters(&quot;SQL operation: &quot; + i);
+	        }
+	        */
+	        
 	        SyncThread sync = SyncThread.Create( new RhoClassFactory() );
 	        if (sync != null) {
 	        	sync.setStatusListener(this);
@@ -847,6 +913,7 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 	        
 	        PrimaryResourceFetchThread.Create();
 	        
+	        RhoRuby.RhoRubyInitApp();
 	        LOG.INFO(&quot;RHODES STARTUP COMPLETED: ***----------------------------------*** &quot; );
     	}catch(Exception exc)
     	{
@@ -955,11 +1022,15 @@ final public class RhodesApplication extends UiApplication implements RenderingA
                 	browserContent.finishLoading();
                 else
                 {
-                	synchronized (Application.getEventLock())
-	                //synchronized (getAppEventLock())
-	                {
-	                	browserContent.finishLoading();
-	                }
+                	if ( URI.isLocalHost(connection.getURL()) )
+            		{
+	                	synchronized (Application.getEventLock())
+		                //synchronized (getAppEventLock())
+		                {
+		                	browserContent.finishLoading();
+		                }
+            		}else
+            			browserContent.finishLoading();
                 }
             }
 
@@ -984,8 +1055,8 @@ final public class RhodesApplication extends UiApplication implements RenderingA
 
                 UrlRequestedEvent urlRequestedEvent = (UrlRequestedEvent) event;
                 String absoluteUrl = urlRequestedEvent.getURL();
-                if ( !absoluteUrl.startsWith(_httpRoot) )
-                	absoluteUrl = _httpRoot + absoluteUrl.substring(_httpRoot.length()-5);
+                //if ( !absoluteUrl.startsWith(_httpRoot) )
+                //	absoluteUrl = _httpRoot + absoluteUrl.substring(_httpRoot.length()-5);
 
                 if ( urlRequestedEvent.getPostData() == null ||
                 	 urlRequestedEvent.getPostData().length == 0 )
@@ -1002,7 +1073,7 @@ final public class RhodesApplication extends UiApplication implements RenderingA
             } case Event.EVENT_BROWSER_CONTENT_CHANGED: {
 
                 // browser field title might have changed update title
-                BrowserContentChangedEvent browserContentChangedEvent = (BrowserContentChangedEvent) event;
+                /*BrowserContentChangedEvent browserContentChangedEvent = (BrowserContentChangedEvent) event;
 
                 if (browserContentChangedEvent.getSource() instanceof BrowserContent) {
                     BrowserContent browserField = (BrowserContent) browserContentChangedEvent.getSource();
@@ -1014,7 +1085,7 @@ final public class RhodesApplication extends UiApplication implements RenderingA
                         	_mainScreen.setTitle(newTitle);
                         }
                     }
-                }
+                }*/
 
                 break;
 
@@ -1046,8 +1117,8 @@ final public class RhodesApplication extends UiApplication implements RenderingA
                             // MSIE, Mozilla, and Opera all send the original
                             // request's Referer as the Referer for the new
                             // request.
-                            if ( !absoluteUrl.startsWith(_httpRoot) )
-                            	absoluteUrl = _httpRoot + absoluteUrl.substring(_httpRoot.length()-5);
+                            //if ( !absoluteUrl.startsWith(_httpRoot) )
+                            //	absoluteUrl = _httpRoot + absoluteUrl.substring(_httpRoot.length()-5);
 
                         	addToHistory(absoluteUrl,referrer);
                             Object eventSource = e.getSource();
@@ -1135,18 +1206,24 @@ final public class RhodesApplication extends UiApplication implements RenderingA
         }
 
         // if referrer is null we must return the connection
-        //if (referrer == null) {
-            HttpConnection connection = Utilities.makeConnection(resource.getUrl(), resource.getRequestHeaders(), null);
+        if (referrer == null) {
+            HttpConnection connection = Utilities.makeConnection(url, resource.getRequestHeaders(), null);
             return connection;
 
-        //} else {
-
-            // if referrer is provided we can set up the connection on a separate thread
-        //    SecondaryResourceFetchThread.enqueue(resource, referrer);
-
-        //}
+        } else 
+        {
+    		if ( URI.isLocalHost(url) )
+    		{
+                HttpConnection connection = Utilities.makeConnection(url, resource.getRequestHeaders(), null);
+                return connection;
+   			}else
+   			{
+	            // if referrer is provided we can set up the connection on a separate thread
+	            SecondaryResourceFetchThread.enqueue(resource, referrer);
+   			}
+        }
 
-        //return null;
+        return null;
     }
 
     /**</diff>
      <filename>platform/bb/rhodes/src/rhomobile/RhodesApplication.java</filename>
    </modified>
    <modified>
      <diff>@@ -128,8 +128,11 @@ class SecondaryResourceFetchThread extends Thread {
                 resource.setHttpConnection(connection);
                 
                 // signal to the browser field that resource is ready
-                if (_browserField != null) {            
-                    _browserField.resourceReady(resource);
+                if (_browserField != null) {
+                	//synchronized (RhodesApplication.getEventLock())
+                	{
+                		_browserField.resourceReady(resource);
+                	}
                 }
             }
             </diff>
      <filename>platform/bb/rhodes/src/rhomobile/SecondaryResourceFetchThread.java</filename>
    </modified>
    <modified>
      <diff>@@ -27,8 +27,9 @@ public class Utilities {
 		OutputStream out = null;
 
 		try {
-			URI uri = new URI(url);
-			if ( &quot;localhost&quot;.equals(uri.getHost())) {
+			if ( URI.isLocalHost(url) )
+			{
+				URI uri = new URI(url);
 				conn = new NativeBBHttpConnection( new RhoConnection(uri) );
 			} else {
 				// conn = (HttpConnection) Connector.open(url);
@@ -46,7 +47,7 @@ public class Utilities {
 				// referring page was transferred with a secure
 				// protocol.
 				String referer = requestHeaders.getPropertyValue(&quot;referer&quot;);
-				boolean sendReferrer = true;
+				boolean sendReferrer = false;
 				if (referer != null
 						&amp;&amp; StringUtilities.startsWithIgnoreCase(referer,
 								&quot;https:&quot;)</diff>
      <filename>platform/bb/rhodes/src/rhomobile/Utilities.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,7 @@
 package rhomobile;
 
+import com.rho.RhoEmptyLogger;
+import com.rho.RhoLogger;
 import com.xruby.runtime.builtin.ObjectFactory;
 import com.xruby.runtime.builtin.RubyArray;
 import com.xruby.runtime.builtin.RubyHash;
@@ -10,8 +12,11 @@ import com.xruby.runtime.lang.RubyConstant;
 import com.xruby.runtime.lang.RubyNoArgMethod;
 import com.xruby.runtime.lang.RubyOneArgMethod;
 import com.xruby.runtime.lang.RubyValue;
+import com.xruby.runtime.lang.RubyVarArgMethod;
 
 public class WebView extends RubyBasic {
+	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
+		new RhoLogger(&quot;WebView&quot;);
 
 	public WebView(RubyClass arg0) {
 		super(arg0);
@@ -45,6 +50,7 @@ public class WebView extends RubyBasic {
 			String value = values.get(i).toString();
 			RhodesApplication.getInstance().addMenuItem(label, value);
 		}
+		LOG.INFO(&quot;set_menu_items end&quot;);
 		return RubyConstant.QTRUE;
 	}
 		
@@ -54,9 +60,9 @@ public class WebView extends RubyBasic {
 				return WebView.refresh();
 			}
 		});		
-		klass.getSingletonClass().defineMethod(&quot;navigate&quot;, new RubyOneArgMethod() {
-			protected RubyValue run(RubyValue receiver, RubyValue arg0, RubyBlock block) {
-				return WebView.navigate(arg0);
+		klass.getSingletonClass().defineMethod(&quot;navigate&quot;, new RubyVarArgMethod() {
+			protected RubyValue run(RubyValue receiver, RubyArray args, RubyBlock block ){
+				return WebView.navigate(args.get(0));
 			}
 		});
 		klass.getSingletonClass().defineMethod(&quot;current_location&quot;, new RubyNoArgMethod() {
@@ -69,6 +75,16 @@ public class WebView extends RubyBasic {
 				return WebView.set_menu_items(arg0);
 			}
 		});
+		klass.getSingletonClass().defineMethod(&quot;execute_js&quot;, new RubyOneArgMethod() {
+			protected RubyValue run(RubyValue receiver, RubyValue arg0, RubyBlock block) {
+				return RubyConstant.QNIL;
+			}
+		});
+		klass.getSingletonClass().defineMethod(&quot;active_tab&quot;, new RubyNoArgMethod() {
+		 	protected RubyValue run(RubyValue receiver, RubyBlock block) {
+		 		return ObjectFactory.createInteger(0);
+		 	}
+		});
 	}
 	
 }</diff>
      <filename>platform/bb/rhodes/src/rhomobile/WebView.java</filename>
    </modified>
    <modified>
      <diff>@@ -36,6 +36,7 @@ import com.rho.RhoClassFactory;
 
 import com.rho.RhoEmptyLogger;
 import com.rho.RhoLogger;
+import com.rho.Version;
 
 public class CameraScreen extends MainScreen {
 
@@ -251,11 +252,21 @@ public class CameraScreen extends MainScreen {
     	LOG.TRACE(&quot;initializeCamera&quot;);
     	Player player = null;
     	try {
-    		// First of all, attempting to capture picture using MM API
-    		
-            //Create a player for the Blackberry's camera.
-            player = Manager.createPlayer( &quot;capture://video&quot; ); 
-            LOG.TRACE(&quot;Recording using MM API&quot;);
+	        Version.SoftVersion ver = Version.getSoftVersion();
+	        if ( ver.nMajor == 4 &amp;&amp; ver.nMinor == 6 &amp;&amp; ver.nMinor2 == 1)
+	        {
+	        	//http://rim.lithium.com/rim/board/message?board.id=java_dev&amp;view=by_date_ascending&amp;message.id=21891
+	        	//takeSnapShot does not work on BlackBerry handheld software version 4.6.1:  
+	        	//The only work around is to invoke the camera application and listen for an image 
+	        	//being saved (would occur when the user takes a picture).  
+	        }else
+	        {
+	    		// First of all, attempting to capture picture using MM API
+	    		
+	            //Create a player for the Blackberry's camera.
+	            player = Manager.createPlayer( &quot;capture://video&quot; ); 
+	            LOG.TRACE(&quot;Recording using MM API&quot;);
+	        }
     	}
     	catch(Exception e) {
     		// Try to capture picture using BB Camera application</diff>
      <filename>platform/bb/rhodes/src/rhomobile/camera/CameraScreen.java</filename>
    </modified>
    <modified>
      <diff>@@ -136,6 +136,8 @@ public class DateTimeScreen extends MainScreen {
 			headers.addProperty(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;);
 			
 			String body = &quot;status=cancel&quot;;
+    		if (_opaque != null)
+    			body += &quot;&amp;opaque=&quot; + _opaque;
 			LOG.INFO(&quot;Callback with result: &quot; + body);
 			
 			_dateTimeScreen.setFieldsEditable(false);</diff>
      <filename>platform/bb/rhodes/src/rhomobile/datetime/DateTimeScreen.java</filename>
    </modified>
    <modified>
      <diff>@@ -7,19 +7,21 @@
 //
 
 #import &lt;Foundation/Foundation.h&gt;
+#import &quot;WebViewController.h&quot;
 
 
 @interface BarItem : NSObject {
 @private
-	BOOL loaded;
+	BOOL loaded,reload;
 	NSString* label,*location,*icon;
-	UIViewController* viewController;
+	WebViewController* viewController;
 }
 
 @property(nonatomic,assign) BOOL loaded;
+@property(nonatomic,assign) BOOL reload;
 @property(nonatomic,retain) NSString* label;
 @property(nonatomic,retain) NSString* location;
 @property(nonatomic,retain) NSString* icon;
-@property(nonatomic,retain) UIViewController* viewController;
+@property(nonatomic,retain) WebViewController* viewController;
 
 @end</diff>
      <filename>platform/iphone/Classes/BarItem.h</filename>
    </modified>
    <modified>
      <diff>@@ -11,11 +11,12 @@
 
 @implementation BarItem
 
-@synthesize loaded, label, location, icon, viewController;
+@synthesize loaded, reload, label, location, icon, viewController;
 
 - (id) init { 
 	if ( self = [super init] ) { 
 		self.loaded = NO; 
+		self.reload = NO;
 	} 
 	return self; 
 } </diff>
      <filename>platform/iphone/Classes/BarItem.m</filename>
    </modified>
    <modified>
      <diff>@@ -1,69 +1,69 @@
-//
-//  PickImageDelegate.m
-//  rhorunner
-//
-//  Created by Vlad on 2/12/09.
-//  Copyright 2009 __MyCompanyName__. All rights reserved.
-//
-
-#import &quot;PickImageDelegate.h&quot;
-#import &quot;AppManager.h&quot;
-
-@implementation PickImageDelegate
-
-- (void)useImage:(UIImage*)theImage { 
-	NSString *folder = [[AppManager getApplicationsRootPath] stringByAppendingPathComponent:@&quot;/public/db-files&quot;];
-	
-	NSFileManager *fileManager = [NSFileManager defaultManager];
-	if (![fileManager fileExistsAtPath:folder]) {
-		[fileManager createDirectoryAtPath:folder attributes:nil];
-	}
-	
-	NSString *now = [[[NSDate date] descriptionWithLocale:nil]
-					 stringByReplacingOccurrencesOfString: @&quot;:&quot; withString: @&quot;.&quot;];
-	now = [now stringByReplacingOccurrencesOfString: @&quot; &quot; withString: @&quot;_&quot;];
-	now = [now stringByReplacingOccurrencesOfString: @&quot;+&quot; withString: @&quot;_&quot;];
-	NSString *filename = [NSString stringWithFormat:@&quot;Image_%@.png&quot;, now]; 	
-	NSString *fullname = [folder stringByAppendingPathComponent:filename];
-	NSData *pngImage = UIImagePNGRepresentation(theImage);
-	 
-	NSString* message;
-	if([pngImage writeToFile:fullname atomically:YES]) {
-		// Send new image uri to the view
-		message = [@&quot;status=ok&amp;image_uri=%2Fpublic%2Fdb-files%2F&quot; stringByAppendingString:filename];
-	} else {
-		// Notify view about error
-		message = @&quot;status=error&amp;message=Can't write image to the storage.&quot;;
-	}
-	[self doCallback:message];
-} 
-
-- (void)imagePickerController:(UIImagePickerController *)picker 
-		didFinishPickingImage:(UIImage *)image 
-		editingInfo:(NSDictionary *)editingInfo 
-{ 
-	//If image editing is enabled and the user successfully picks an image, the image parameter of the 
-	//imagePickerController:didFinishPicking Image:editingInfo:method contains the edited image. 
-	//You should treat this image as the selected image, but if you want to store the original image, you can get 
-	//it (along with the crop rectangle) from the dictionary in the editingInfo parameter. 
-    [self useImage:image]; 
-    // Remove the picker interface and release the picker object. 
-    //[[picker parentViewController] dismissModalViewControllerAnimated:YES]; 
-    [picker dismissModalViewControllerAnimated:YES];
-	picker.view.hidden = YES;
-    //[picker release]; 
-} 
-
-- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker 
-{ 
-	// Notify view about cancel
-	NSString* message = @&quot;status=cancel&amp;message=User canceled operation.&quot;;
-	[self doCallback:message];
-	
-    // Remove the picker interface and release the picker object. 
-    [picker dismissModalViewControllerAnimated:YES]; 
-	picker.view.hidden = YES;
-    //[picker release]; 
-} 
-
-@end
+//
+//  PickImageDelegate.m
+//  rhorunner
+//
+//  Created by Vlad on 2/12/09.
+//  Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+#import &quot;PickImageDelegate.h&quot;
+#import &quot;AppManager.h&quot;
+
+@implementation PickImageDelegate
+
+- (void)useImage:(UIImage*)theImage { 
+	NSString *folder = [[AppManager getApplicationsRootPath] stringByAppendingPathComponent:@&quot;/public/db-files&quot;];
+	
+	NSFileManager *fileManager = [NSFileManager defaultManager];
+	if (![fileManager fileExistsAtPath:folder]) {
+		[fileManager createDirectoryAtPath:folder attributes:nil];
+	}
+	
+	NSString *now = [[[NSDate date] descriptionWithLocale:nil]
+					 stringByReplacingOccurrencesOfString: @&quot;:&quot; withString: @&quot;.&quot;];
+	now = [now stringByReplacingOccurrencesOfString: @&quot; &quot; withString: @&quot;_&quot;];
+	now = [now stringByReplacingOccurrencesOfString: @&quot;+&quot; withString: @&quot;_&quot;];
+	NSString *filename = [NSString stringWithFormat:@&quot;Image_%@.png&quot;, now]; 	
+	NSString *fullname = [folder stringByAppendingPathComponent:filename];
+	NSData *pngImage = UIImagePNGRepresentation(theImage);
+	 
+	NSString* message;
+	if([pngImage writeToFile:fullname atomically:YES]) {
+		// Send new image uri to the view
+		message = [@&quot;status=ok&amp;image_uri=%2Fpublic%2Fdb-files%2F&quot; stringByAppendingString:filename];
+	} else {
+		// Notify view about error
+		message = @&quot;status=error&amp;message=Can't write image to the storage.&quot;;
+	}
+	[self doCallback:message];
+} 
+
+- (void)imagePickerController:(UIImagePickerController *)picker 
+		didFinishPickingImage:(UIImage *)image 
+		editingInfo:(NSDictionary *)editingInfo 
+{ 
+	//If image editing is enabled and the user successfully picks an image, the image parameter of the 
+	//imagePickerController:didFinishPicking Image:editingInfo:method contains the edited image. 
+	//You should treat this image as the selected image, but if you want to store the original image, you can get 
+	//it (along with the crop rectangle) from the dictionary in the editingInfo parameter. 
+    [self useImage:image]; 
+    // Remove the picker interface and release the picker object. 
+    //[[picker parentViewController] dismissModalViewControllerAnimated:YES]; 
+    [picker dismissModalViewControllerAnimated:YES];
+	picker.view.hidden = YES;
+    //[picker release]; 
+} 
+
+- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker 
+{ 
+	// Notify view about cancel
+	NSString* message = @&quot;status=cancel&amp;message=User canceled operation.&quot;;
+	[self doCallback:message];
+	
+    // Remove the picker interface and release the picker object. 
+    [picker dismissModalViewControllerAnimated:YES]; 
+	picker.view.hidden = YES;
+    //[picker release]; 
+} 
+
+@end</diff>
      <filename>platform/iphone/Classes/Camera/PickImageDelegate.m</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,16 @@
-//
-//  DateTime.m
-//  rhorunner
-//
-//  Created by lars on 8/12/09.
-//  Copyright 2009 Home. All rights reserved.
-//
-
-#import &quot;DateTime.h&quot;
-
-
-@implementation DateTime
-
-@synthesize url, title, initialTime, format, data;
-
-@end
+//
+//  DateTime.m
+//  rhorunner
+//
+//  Created by lars on 8/12/09.
+//  Copyright 2009 Home. All rights reserved.
+//
+
+#import &quot;DateTime.h&quot;
+
+
+@implementation DateTime
+
+@synthesize url, title, initialTime, format, data;
+
+@end</diff>
      <filename>platform/iphone/Classes/DateTime.m</filename>
    </modified>
    <modified>
      <diff>@@ -102,6 +102,10 @@
 				break;
 		}
 		
+		if (self.dateTime.initialTime) {
+			self.pickerView.date = [NSDate dateWithTimeIntervalSince1970:self.dateTime.initialTime];
+		}
+		
 		// Add toolbar to view
 		CGRect mainViewBounds = self.pickerView.bounds;
 		[self createPickerBar:mainViewBounds];</diff>
      <filename>platform/iphone/Classes/DateTimePickerDelegate.m</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,8 @@
 #undef DEFAULT_LOGCATEGORY
 #define DEFAULT_LOGCATEGORY &quot;Dispatcher&quot;
 
+extern void _rho_map_location(char* query);
+
 char *trim(char *str)
 {
 	char *ibuf = str, *obuf = str;
@@ -192,6 +194,14 @@ int _ExecuteApp(HttpContextRef context, RouteRef route) {
 				} else {
 					return HTTPRedirect(context, &quot;/app/&quot;);
 				}
+			} else if (route-&gt;_model &amp;&amp; !strcmp(route-&gt;_model,&quot;map&quot;)) {
+				char* query = &quot;&quot;;
+				if (context-&gt;_request-&gt;_query) {
+					RAWLOG_INFO1(&quot;Map %s&quot;, context-&gt;_request-&gt;_query);
+					query = context-&gt;_request-&gt;_query;
+				}
+				_rho_map_location(query);
+				return HTTPSendReply(context,&quot;&quot;);
 			}
 		}
 	} else if (route-&gt;_application &amp;&amp; !strcmp(route-&gt;_application,&quot;shared&quot;)) {</diff>
      <filename>platform/iphone/Classes/Dispatcher/Dispatcher.c</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 #include &quot;phonebook.h&quot;
 
 static int _getProperty(char* property);
+static CFStringRef getAddressPartValue(ABRecordRef record, const char* property) ;
 
 void* openPhonebook() {
 	
@@ -56,6 +57,8 @@ static void _getAllPeople(LocalPhonebook* phonebook) {
 	}
 }
 
+
+
 static void _addPropertyToHash(VALUE hash, const char* key, CFStringRef property) {
 	if (property) {
 		char buf[256];
@@ -65,6 +68,18 @@ static void _addPropertyToHash(VALUE hash, const char* key, CFStringRef property
 	}
 }
 
+static void _addDatePropertyToHash(VALUE hash, const char* key, NSDate* date) {
+	if (date) {
+		NSDateFormatter *df = [[NSDateFormatter alloc] init];
+		[df setDateFormat:@&quot;yyyy-MM-dd&quot;];
+		NSString* dt = [df stringFromDate:date];
+		[dt retain];
+		_addPropertyToHash(hash, key, (CFStringRef)dt);
+		[date release];
+		[df release];
+	}
+}
+
 static void _addPhonesToHash(VALUE hash,ABRecordRef ref) {
 	ABMultiValueRef phones = ABRecordCopyValue(ref,kABPersonPhoneProperty);
 	if (phones) {
@@ -76,11 +91,26 @@ static void _addPhonesToHash(VALUE hash,ABRecordRef ref) {
 					ABMultiValueCopyValueAtIndex(phones,n));
 			} else if(CFStringCompare(label,kABHomeLabel,0)==kCFCompareEqualTo) {
 				_addPropertyToHash(hash,RUBY_PB_HOME_NUMBER,
-								ABMultiValueCopyValueAtIndex(phones,n));
+								ABMultiValueCopyValueAtIndex(phones,n));				
 			} else if(CFStringCompare(label,kABPersonPhoneMobileLabel,0)==kCFCompareEqualTo) {
 				_addPropertyToHash(hash,RUBY_PB_MOBILE_NUMBER,
-								ABMultiValueCopyValueAtIndex(phones,n));
-			} 
+								   ABMultiValueCopyValueAtIndex(phones,n));
+			} else if(CFStringCompare(label,kABPersonPhoneMainLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_MAIN_MUMBER,
+								   ABMultiValueCopyValueAtIndex(phones,n));				
+			} else if(CFStringCompare(label,kABPersonPhonePagerLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_PAGER_NUMBER,
+								   ABMultiValueCopyValueAtIndex(phones,n));				
+			} else if(CFStringCompare(label,kABPersonPhoneHomeFAXLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_HOME_FAX,
+								   ABMultiValueCopyValueAtIndex(phones,n));
+			} else if(CFStringCompare(label,kABPersonPhoneWorkFAXLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_WORK_FAX,
+								   ABMultiValueCopyValueAtIndex(phones,n));
+			} else if(CFStringCompare(label,(CFStringRef)@&quot;assistant_number&quot;,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_ASSISTANT_NUMBER,
+								   ABMultiValueCopyValueAtIndex(phones,n));
+			}  
 			CFRelease(label);
 		}
 		CFRelease(phones);
@@ -96,6 +126,12 @@ static void _addEmailToHash(VALUE hash,ABRecordRef ref) {
 			if(CFStringCompare(label,kABWorkLabel,0)==kCFCompareEqualTo) {
 				_addPropertyToHash(hash,RUBY_PB_EMAIL_ADDRESS,
 								   ABMultiValueCopyValueAtIndex(emails,n));
+			} else if(CFStringCompare(label,kABHomeLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_HOME_EMAIL_ADDRESS,
+								   ABMultiValueCopyValueAtIndex(emails,n));
+			} else if(CFStringCompare(label,kABOtherLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_OTHER_EMAIL_ADDRESS,
+								   ABMultiValueCopyValueAtIndex(emails,n));
 			}
 			CFRelease(label);
 		}
@@ -103,6 +139,63 @@ static void _addEmailToHash(VALUE hash,ABRecordRef ref) {
 	}	
 }
 
+static void _addUrlToHash(VALUE hash,ABRecordRef ref) {
+	ABMultiValueRef urls = ABRecordCopyValue(ref,kABPersonURLProperty);
+	if (urls) {
+		int num_urls = ABMultiValueGetCount(urls);
+		for (int n = 0; n &lt; num_urls; n++) {
+			CFStringRef label = ABMultiValueCopyLabelAtIndex(urls,n);
+			if(CFStringCompare(label,kABPersonHomePageLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_HOME_PAGE,
+								   ABMultiValueCopyValueAtIndex(urls,n));
+			} 
+			CFRelease(label);
+		}
+		CFRelease(urls);
+	}	
+}
+
+static void _addRelatedNamesToHash(VALUE hash,ABRecordRef ref) {
+	ABMultiValueRef names = ABRecordCopyValue(ref,kABPersonRelatedNamesProperty);
+	if (names) {
+		int num_names = ABMultiValueGetCount(names);
+		for (int n = 0; n &lt; num_names; n++) {
+			CFStringRef label = ABMultiValueCopyLabelAtIndex(names,n);
+			if(CFStringCompare(label,kABPersonSpouseLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_SPOUSE_NAME,
+								   ABMultiValueCopyValueAtIndex(names,n));
+			} else if(CFStringCompare(label,kABPersonAssistantLabel,0)==kCFCompareEqualTo) {
+				_addPropertyToHash(hash,RUBY_PB_ASSISTANT_NAME,
+								   ABMultiValueCopyValueAtIndex(names,n));
+			} 
+			CFRelease(label);
+		}
+		CFRelease(names);
+	}	
+}
+
+static void _addDatesToHash(VALUE hash,ABRecordRef ref) {
+	ABMultiValueRef dates = ABRecordCopyValue(ref,kABPersonDateProperty);
+	if (dates) {
+		int num_dates = ABMultiValueGetCount(dates);
+		for (int n = 0; n &lt; num_dates; n++) {
+			CFStringRef label = ABMultiValueCopyLabelAtIndex(dates,n);
+			if(CFStringCompare(label,kABPersonAnniversaryLabel,0)==kCFCompareEqualTo) {
+				_addDatePropertyToHash(hash,RUBY_PB_ANNIVERSARY,
+								   (NSDate*)ABMultiValueCopyValueAtIndex(dates,n));
+			} else if(CFStringCompare(label,(CFStringRef)@&quot;created&quot;,0)==kCFCompareEqualTo) {
+				_addDatePropertyToHash(hash,RUBY_PB_CREATED,
+								   (NSDate*)ABMultiValueCopyValueAtIndex(dates,n));
+			} else if(CFStringCompare(label,(CFStringRef)@&quot;updated&quot;,0)==kCFCompareEqualTo) {
+				_addDatePropertyToHash(hash,RUBY_PB_UPDATED,
+								   (NSDate*)ABMultiValueCopyValueAtIndex(dates,n));
+			} 
+			CFRelease(label);
+		}
+		CFRelease(dates);
+	}	
+}
+
 static VALUE _getRecord(ABRecordRef ref, ABRecordID* precordId) {
 	char buf[256];
 
@@ -116,19 +209,97 @@ static VALUE _getRecord(ABRecordRef ref, ABRecordID* precordId) {
 	snprintf(buf, sizeof(buf), &quot;{%d}&quot;, recordId);
 	addStrToHash(hash, RUBY_PB_ID, buf, strlen(buf));
 	
+	_addPropertyToHash(hash, RUBY_PB_PREFIX, 
+					   ABRecordCopyValue(ref, kABPersonPrefixProperty));
+
 	_addPropertyToHash(hash, RUBY_PB_FIRST_NAME, 
-		ABRecordCopyValue(ref, kABPersonFirstNameProperty));
+					   ABRecordCopyValue(ref, kABPersonFirstNameProperty));
+
+	_addPropertyToHash(hash, RUBY_PB_MIDDLE_NAME, 
+					   ABRecordCopyValue(ref, kABPersonMiddleNameProperty));
 
 	_addPropertyToHash(hash, RUBY_PB_LAST_NAME, 
 					   ABRecordCopyValue(ref, kABPersonLastNameProperty));
 	
+	_addPropertyToHash(hash, RUBY_PB_SUFFIX, 
+					   ABRecordCopyValue(ref, kABPersonSuffixProperty));
+	
+	_addPropertyToHash(hash, RUBY_PB_NICKNAME, 
+					   ABRecordCopyValue(ref, kABPersonNicknameProperty));
+
+	_addPropertyToHash(hash, RUBY_PB_NOTE, 
+					   ABRecordCopyValue(ref, kABPersonNoteProperty));
+	
 	_addPropertyToHash(hash, RUBY_PB_COMPANY_NAME, 
 					   ABRecordCopyValue(ref, kABPersonOrganizationProperty));
 	
+	_addPropertyToHash(hash, RUBY_PB_JOB_TITLE, 
+					   ABRecordCopyValue(ref, kABPersonJobTitleProperty));
+
+	NSDate* birthdate = (NSDate *)ABRecordCopyValue(ref, kABPersonBirthdayProperty);
+	NSDateFormatter *df = [[NSDateFormatter alloc] init];
+	[df setDateFormat:@&quot;yyyy-MM-dd&quot;];
+	NSString* bd = [df stringFromDate:birthdate];
+	[bd retain];
+	_addPropertyToHash(hash, RUBY_PB_BIRTHDAY, (CFStringRef)bd);
+	[birthdate release];
+	[df release];
+	
+	_addPropertyToHash(hash, RUBY_PB_STREET_ADDRESS_1,
+					   getAddressPartValue(ref,RUBY_PB_STREET_ADDRESS_1));
+	
+	_addPropertyToHash(hash, RUBY_PB_CITY_1,
+					   getAddressPartValue(ref,RUBY_PB_CITY_1));
+
+	_addPropertyToHash(hash, RUBY_PB_STATE_1,
+					   getAddressPartValue(ref,RUBY_PB_STATE_1));
+
+	_addPropertyToHash(hash, RUBY_PB_ZIP_1,
+					   getAddressPartValue(ref,RUBY_PB_ZIP_1));
+
+	_addPropertyToHash(hash, RUBY_PB_COUNTRY_1,
+					   getAddressPartValue(ref,RUBY_PB_COUNTRY_1));
+
+	_addPropertyToHash(hash, RUBY_PB_STREET_ADDRESS_2,
+					   getAddressPartValue(ref,RUBY_PB_STREET_ADDRESS_2));
+	
+	_addPropertyToHash(hash, RUBY_PB_CITY_2,
+					   getAddressPartValue(ref,RUBY_PB_CITY_2));
+	
+	_addPropertyToHash(hash, RUBY_PB_STATE_2,
+					   getAddressPartValue(ref,RUBY_PB_STATE_2));
+	
+	_addPropertyToHash(hash, RUBY_PB_ZIP_2,
+					   getAddressPartValue(ref,RUBY_PB_ZIP_2));
+	
+	_addPropertyToHash(hash, RUBY_PB_COUNTRY_2,
+					   getAddressPartValue(ref,RUBY_PB_COUNTRY_2));
+	
+	_addPropertyToHash(hash, RUBY_PB_STREET_ADDRESS_3,
+					   getAddressPartValue(ref,RUBY_PB_STREET_ADDRESS_3));
+	
+	_addPropertyToHash(hash, RUBY_PB_CITY_3,
+					   getAddressPartValue(ref,RUBY_PB_CITY_3));
+	
+	_addPropertyToHash(hash, RUBY_PB_STATE_3,
+					   getAddressPartValue(ref,RUBY_PB_STATE_3));
+	
+	_addPropertyToHash(hash, RUBY_PB_ZIP_3,
+					   getAddressPartValue(ref,RUBY_PB_ZIP_3));
+	
+	_addPropertyToHash(hash, RUBY_PB_COUNTRY_3,
+					   getAddressPartValue(ref,RUBY_PB_COUNTRY_3));
+	
 	_addPhonesToHash(hash,ref);
 	
 	_addEmailToHash(hash,ref);
 	
+	_addUrlToHash(hash,ref);
+	
+	_addRelatedNamesToHash(hash, ref);
+	
+	_addDatesToHash(hash, ref);
+	
 	return hash;
 }
 
@@ -220,8 +391,18 @@ static CFStringRef _getPhoneLabel(const char* property) {
 		return kABWorkLabel;
 	} else if (strcmp(RUBY_PB_HOME_NUMBER, property)==0) {
 		return kABHomeLabel;
-	} if (strcmp(RUBY_PB_MOBILE_NUMBER, property)==0) {
+	} else if (strcmp(RUBY_PB_MOBILE_NUMBER, property)==0) {
 		return kABPersonPhoneMobileLabel;
+	} else if (strcmp(RUBY_PB_MAIN_MUMBER, property)==0) {
+		return kABPersonPhoneMainLabel;
+	} else if (strcmp(RUBY_PB_PAGER_NUMBER, property)==0) {
+		return kABPersonPhonePagerLabel;
+	} else if (strcmp(RUBY_PB_HOME_FAX, property)==0) {
+		return kABPersonPhoneHomeFAXLabel;
+	} else if (strcmp(RUBY_PB_WORK_FAX, property)==0) {
+		return kABPersonPhoneWorkFAXLabel;
+	} else if (strcmp(RUBY_PB_ASSISTANT_NUMBER, property)==0) {
+		return (CFStringRef)@&quot;assistant_number&quot;;
 	}	
 	return NULL;
 }
@@ -229,10 +410,42 @@ static CFStringRef _getPhoneLabel(const char* property) {
 static CFStringRef _getEmailLabel(const char* property) {
 	if (strcmp(RUBY_PB_EMAIL_ADDRESS,property)==0) {
 		return kABWorkLabel;
+	} else if (strcmp(RUBY_PB_HOME_EMAIL_ADDRESS,property)==0) {
+		return kABHomeLabel;
+	} else if (strcmp(RUBY_PB_OTHER_EMAIL_ADDRESS,property)==0) {
+		return kABOtherLabel;
+	} 
+	return NULL;
+}
+
+static CFStringRef _getUrlLabel(const char* property) {
+	if (strcmp(RUBY_PB_HOME_PAGE,property)==0) {
+		return kABPersonHomePageLabel;
+	} 
+	return NULL;
+}
+
+static CFStringRef _getRelatedNamesLabel(const char* property) {
+	if (strcmp(RUBY_PB_SPOUSE_NAME,property)==0) {
+		return kABPersonSpouseLabel;
+	} else if (strcmp(RUBY_PB_ASSISTANT_NAME,property)==0) {
+		return kABPersonAssistantLabel;
+	} 
+	return NULL;
+}
+
+static CFStringRef _getDatesLabel(const char* property) {
+	if (strcmp(RUBY_PB_ANNIVERSARY,property)==0) {
+		return kABPersonAnniversaryLabel;
+	} else if (strcmp(RUBY_PB_CREATED,property)==0) {
+		return (CFStringRef)@&quot;created&quot;;
+	} else if (strcmp(RUBY_PB_UPDATED,property)==0) {
+		return (CFStringRef)@&quot;updated&quot;;
 	} 
 	return NULL;
 }
 
+
 static boolean_t _replaceProperty(ABMutableMultiValueRef mv, CFStringRef label, CFStringRef value, int index) {
 	CFStringRef lbl = ABMultiValueCopyLabelAtIndex(mv,index);
 	boolean_t found = CFStringCompare(lbl,label,0)==kCFCompareEqualTo;
@@ -243,37 +456,193 @@ static boolean_t _replaceProperty(ABMutableMultiValueRef mv, CFStringRef label,
 	return found;
 }
 
-static void _updateMultiValueProperty(ABRecordRef record, ABPropertyID propId, CFStringRef label, const char* value) {
-	CFStringRef v = CFStringCreateWithCString(NULL, value, CFStringGetSystemEncoding());
+static void __updateMultiValueProperty(ABRecordRef record, ABPropertyID propId, CFStringRef label, CFTypeRef v) {
+	if (!v) return;
 	ABMutableMultiValueRef mv = ABRecordCopyValue(record,propId);
 	if (!mv) {
 		mv = ABMultiValueCreateMutable(kABMultiStringPropertyType); 
 		ABMultiValueAddValueAndLabel(mv,v,label,nil);
 	} else {
+		ABMutableMultiValueRef lmv  = ABMultiValueCreateMutableCopy(mv);
 		boolean_t replaced = FALSE;
-		int num_phones = ABMultiValueGetCount(mv);
+		int num_phones = ABMultiValueGetCount(lmv);
 		for (int n = 0; n &lt; num_phones; n++) {
-			replaced = _replaceProperty(mv,label,v,n);
+			replaced = _replaceProperty(lmv,label,v,n);
 			if (replaced) break;
 		}
 		if (!replaced) {
-			ABMultiValueAddValueAndLabel(mv,v,label,nil);
+			ABMultiValueAddValueAndLabel(lmv,v,label,nil);
 		}
+		CFRelease(mv);
+		mv = lmv;
 	}
 	ABRecordSetValue(record, propId, mv, nil);
 	CFRelease(mv);
 	CFRelease(v);	
 }
 
+static void _updateMultiValueProperty(ABRecordRef record, ABPropertyID propId, CFStringRef label, const char* value) {
+	CFStringRef v = CFStringCreateWithCString(NULL, value, CFStringGetSystemEncoding());
+	__updateMultiValueProperty(record, propId, label, v);
+}
+
+bool getAddressLabelAndKey(const char* property, CFStringRef* label, CFStringRef* key) {
+	if (strcmp(property,RUBY_PB_STREET_ADDRESS_1)==0) {
+		*label = kABWorkLabel;
+		*key = kABPersonAddressStreetKey;
+	} else if (strcmp(property,RUBY_PB_CITY_1)==0) {
+		*label = kABWorkLabel;
+		*key = kABPersonAddressCityKey;
+	} else if (strcmp(property,RUBY_PB_STATE_1)==0) {
+		*label = kABWorkLabel;
+		*key = kABPersonAddressStateKey;
+	} else if (strcmp(property,RUBY_PB_ZIP_1)==0) {
+		*label = kABWorkLabel;
+		*key = kABPersonAddressZIPKey;
+	} else if (strcmp(property,RUBY_PB_COUNTRY_1)==0) {
+		*label = kABWorkLabel;
+		*key = kABPersonAddressCountryKey;
+	} else if (strcmp(property,RUBY_PB_STREET_ADDRESS_2)==0) {
+		*label = kABHomeLabel;
+		*key = kABPersonAddressStreetKey;
+	} else if (strcmp(property,RUBY_PB_CITY_2)==0) {
+		*label = kABHomeLabel;
+		*key = kABPersonAddressCityKey;
+	} else if (strcmp(property,RUBY_PB_STATE_2)==0) {
+		*label = kABHomeLabel;
+		*key = kABPersonAddressStateKey;
+	} else if (strcmp(property,RUBY_PB_ZIP_2)==0) {
+		*label = kABHomeLabel;
+		*key = kABPersonAddressZIPKey;
+	} else if (strcmp(property,RUBY_PB_COUNTRY_2)==0) {
+		*label = kABHomeLabel;
+		*key = kABPersonAddressCountryKey;
+	} else if (strcmp(property,RUBY_PB_STREET_ADDRESS_3)==0) {
+		*label = kABOtherLabel;
+		*key = kABPersonAddressStreetKey;
+	} else if (strcmp(property,RUBY_PB_CITY_3)==0) {
+		*label = kABOtherLabel;
+		*key = kABPersonAddressCityKey;
+	} else if (strcmp(property,RUBY_PB_STATE_3)==0) {
+		*label = kABOtherLabel;
+		*key = kABPersonAddressStateKey;
+	} else if (strcmp(property,RUBY_PB_ZIP_3)==0) {
+		*label = kABOtherLabel;
+		*key = kABPersonAddressZIPKey;
+	} else if (strcmp(property,RUBY_PB_COUNTRY_3)==0) {
+		*label = kABOtherLabel;
+		*key = kABPersonAddressCountryKey;
+	} else {
+		return false;
+	}
+	return true;
+}
+
+CFStringRef getAddressPartValue(ABRecordRef record, const char* property) {
+	CFStringRef  label;
+	CFStringRef  key;
+	CFStringRef  v = nil;
+	
+	if ( getAddressLabelAndKey(property, &amp;label, &amp;key) ) {
+		ABMutableMultiValueRef mv = ABRecordCopyValue(record,kABPersonAddressProperty);
+		if (mv) {
+			int addresses = ABMultiValueGetCount(mv);
+			for (int n = 0; n &lt; addresses; n++) {
+				CFStringRef lbl = ABMultiValueCopyLabelAtIndex(mv,n);
+				if (CFStringCompare(lbl,label,0)==kCFCompareEqualTo) {
+					NSMutableDictionary *addressDictionary = 
+						(NSMutableDictionary *)ABMultiValueCopyValueAtIndex(mv,n);
+					if (addressDictionary) {
+						v = (CFStringRef)[addressDictionary objectForKey:(NSString*)key];
+						//[addressDictionary release];
+						CFRelease(lbl);
+						break;
+					}
+				}
+				CFRelease(lbl);
+			}
+			CFRelease(mv);
+		}
+	}
+	return v;
+}
+
+bool setAddressValue(void* record, const char* property, const char* value) {
+	CFStringRef  label;
+	CFStringRef  key;
+	
+	if ( !getAddressLabelAndKey(property, &amp;label, &amp;key) ) {
+		return false;
+	}
+		
+	CFStringRef v = CFStringCreateWithCString(NULL, value, CFStringGetSystemEncoding());
+	ABMutableMultiValueRef mv = ABRecordCopyValue(record,kABPersonAddressProperty);
+	if (!mv) {
+		mv = ABMultiValueCreateMutable(kABMultiDictionaryPropertyType);
+	} else {
+		ABMutableMultiValueRef lmv  = ABMultiValueCreateMutableCopy(mv);
+		CFRelease(mv);
+		mv = lmv;		
+	}
+
+	int addresses = ABMultiValueGetCount(mv);
+	int index = -1;
+	for (int n = 0; n &lt; addresses; n++) {
+		CFStringRef lbl = ABMultiValueCopyLabelAtIndex(mv,n);
+		if (CFStringCompare(lbl,label,0)==kCFCompareEqualTo) {
+			index = n;
+			break;
+		}
+	}
+	
+	NSMutableDictionary *addressDictionary;
+	
+	if (index&gt;=0) {
+		addressDictionary = (NSMutableDictionary *)ABMultiValueCopyValueAtIndex(mv,index);
+	} else {
+		addressDictionary = [[NSMutableDictionary alloc] init];
+	}
+
+	[addressDictionary setObject:(NSString *)v forKey:(NSString *)key];
+
+	if (index&gt;=0) {
+		ABMultiValueReplaceValueAtIndex(mv, addressDictionary, index);
+	} else {
+		ABMultiValueAddValueAndLabel(mv, addressDictionary, label, NULL);
+	}
+
+	ABRecordSetValue(record, kABPersonAddressProperty, mv, nil);
+	
+	//[addressDictionary release];
+	CFRelease(mv);
+	CFRelease(v);
+	return true;
+}
+
+NSDate* string2date(CFStringRef v) {
+	NSDateFormatter *df = [[NSDateFormatter alloc] init];
+	[df setDateFormat:@&quot;yyyy-MM-dd&quot;];
+	NSDate *date = [df dateFromString: (NSString*)v];
+	[date retain];
+	[df release];
+	return date;
+}
+
 int setRecordValue(void* record, char* property, char* value) {
-	if (record) {
+	if (record &amp;&amp; (value!=NULL) &amp;&amp; strlen(value)) {
 		int prop = _getProperty(property);
 		if (prop &gt;= 0) {
 			CFStringRef v = CFStringCreateWithCString(NULL, value, 
-												  CFStringGetSystemEncoding());
-			ABRecordSetValue(record, prop, v, nil);
+													  CFStringGetSystemEncoding());
+			if (prop == kABPersonBirthdayProperty) {
+				NSDate *birthdate = string2date(v);
+				ABRecordSetValue(record, prop, birthdate, nil);
+				[birthdate release];
+			} else {
+				ABRecordSetValue(record, prop, v, nil);
+			}
 			CFRelease(v);
-		} else {
+		} else if ( !setAddressValue(record,property,value) ) {
 			CFStringRef label = _getPhoneLabel(property);
 			if (label) {
 				_updateMultiValueProperty(record,kABPersonPhoneProperty,label,value);
@@ -281,6 +650,24 @@ int setRecordValue(void* record, char* property, char* value) {
 				label = _getEmailLabel(property);
 				if (label) {
 					_updateMultiValueProperty(record,kABPersonEmailProperty,label,value);
+				} else {
+					label = _getUrlLabel(property);
+					if (label) {
+						_updateMultiValueProperty(record,kABPersonURLProperty,label,value);
+					} else {
+						label = _getRelatedNamesLabel(property);
+						if (label) {
+							_updateMultiValueProperty(record,kABPersonRelatedNamesProperty,label,value);
+						} else {
+							label = _getDatesLabel(property);
+							if (label) {
+								CFStringRef v = CFStringCreateWithCString(NULL, value, 
+																		  CFStringGetSystemEncoding());
+								NSDate *date = string2date(v);
+								__updateMultiValueProperty(record,kABPersonDateProperty,label,date);
+							}
+						}
+					}
 				}
 			}
 		}
@@ -317,14 +704,21 @@ int deleteRecord(void* pb, void* record) {
 
 //==================================================================================
 
-enum {pbUnknown=0,pbFirstName,pbLastName,pbCompanyName};
+enum {pbUnknown=0,pbPrefix,pbFirstName,pbMiddleName,pbLastName,pbSuffix,pbNickname,pbNote,pbCompanyName,pbJobTitle,pbBirthday};
 static const struct {
 	const char* _name;
 	const int  _value;
 } pbp[] = {
+{ RUBY_PB_PREFIX, pbPrefix },
 { RUBY_PB_FIRST_NAME, pbFirstName },
+{ RUBY_PB_MIDDLE_NAME, pbMiddleName }, 
 { RUBY_PB_LAST_NAME, pbLastName },
+{ RUBY_PB_SUFFIX, pbSuffix },
+{ RUBY_PB_NICKNAME, pbNickname },
+{ RUBY_PB_NOTE, pbNote },
 { RUBY_PB_COMPANY_NAME, pbCompanyName },
+{ RUBY_PB_JOB_TITLE, pbJobTitle },
+{ RUBY_PB_BIRTHDAY, pbBirthday },
 { NULL, 0 }
 };
 
@@ -337,12 +731,26 @@ static int _getProperty(char* property) {
 		}
 	}
 	switch(prop) {
+		case pbPrefix:
+			return kABPersonPrefixProperty;
 		case pbFirstName:
 			return kABPersonFirstNameProperty;
+		case pbMiddleName:
+			return kABPersonMiddleNameProperty;
 		case pbLastName:
 			return kABPersonLastNameProperty;
+		case pbSuffix:	
+			return kABPersonSuffixProperty;
+		case pbNickname:
+			return kABPersonNicknameProperty;
+		case pbNote:
+			return kABPersonNoteProperty;
 		case pbCompanyName:
 			return kABPersonOrganizationProperty;
+		case pbJobTitle:	
+			return kABPersonJobTitleProperty;
+		case pbBirthday:
+			return kABPersonBirthdayProperty;
 	}
 	return -1;
 }</diff>
      <filename>platform/iphone/Classes/Phonebook/phonebook.m</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,19 @@
-//
-//  RhoDelegate.h
-//  rhorunner
-//
-//  Created by lars on 8/11/09.
-//  Copyright 2009 Home. All rights reserved.
-//
-
-#import &lt;Foundation/Foundation.h&gt;
-
-@interface RhoDelegate : NSObject {
-	NSString* postUrl; 
-}
-
-@property (readwrite, copy) NSString *postUrl;
-
-- (void)doCallback:(NSString*)message;
-
+//
+//  RhoDelegate.h
+//  rhorunner
+//
+//  Created by lars on 8/11/09.
+//  Copyright 2009 Home. All rights reserved.
+//
+
+#import &lt;Foundation/Foundation.h&gt;
+
+@interface RhoDelegate : NSObject {
+	NSString* postUrl; 
+}
+
+@property (readwrite, copy) NSString *postUrl;
+
+- (void)doCallback:(NSString*)message;
+
 @end
\ No newline at end of file</diff>
      <filename>platform/iphone/Classes/RhoDelegate.h</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,11 @@
 #import &quot;DateTime.h&quot;
 #import &quot;NativeBar.h&quot;
 #import &quot;BarItem.h&quot;
+#import &quot;WebViewUrl.h&quot;
 #import &quot;RhoDelegate.h&quot;
+#ifdef __IPHONE_3_0
+#import &quot;MapViewController.h&quot;
+#endif
 
 #undef DEFAULT_LOGCATEGORY
 #define DEFAULT_LOGCATEGORY &quot;RhoRunnerAppDelegate&quot;
@@ -38,6 +42,15 @@
 	return location;
 }
 
+- (void)loadStartPath:(NSString*)location {
+	if (nativeBar.barType == TOOLBAR_TYPE || nativeBar.barType == NOBAR_TYPE) {
+		[webViewController navigateRedirect:location];
+	} else {
+		// Load tab #0 on app load
+		[tabBarDelegate loadTabBarItemFirstPage:(BarItem*)[tabBarDelegate.barItems objectAtIndex:0]];
+	}	
+}
+
 - (void)onServerStarted:(NSString*)data {
 	RAWLOG_INFO(&quot;Server Started notification is recived&quot;);
 	NSString* location = NULL;
@@ -57,25 +70,25 @@
 		location = [self normalizeUrl:(NSString*)data];
 	}
 	
-	// only navigate main webViewController if there is no tabbar
-	if (self.nativeBar.barType == TOOLBAR_TYPE || self.nativeBar.barType == NOBAR_TYPE) {
-		[webViewController navigateRedirect:location];
-	} else {
-		// Load tab #0 on app load
-		[tabBarDelegate loadTabBarItemFirstPage:(BarItem*)[tabBarDelegate.barItems objectAtIndex:0]];
-	}
 	appStarted = true;
+	[self loadStartPath:location];
 }
 
 - (void)onRefreshView {
 	[webViewController refresh];
 }
 
-- (void)onNavigateTo:(NSString *)url {
-	[webViewController navigateRedirect:url];
+- (void)onNavigateTo:(WebViewUrl*) wvUrl {
+	if (self.nativeBar.barType == TABBAR_TYPE) {
+		BarItem* bItem = (BarItem*)[tabBarDelegate.barItems objectAtIndex:wvUrl.webViewIndex];
+		WebViewController* wvController = (WebViewController*)[bItem viewController];
+		[wvController navigateRedirect:wvUrl.url];
+	} else {
+		[webViewController navigateRedirect:wvUrl.url];
+	}
 }
 
-- (void)onExecuteJs:(NSString *)js {
+- (void)onExecuteJs:(JSString *)js {
 	[webViewController executeJs:js];
 }
 
@@ -83,6 +96,17 @@
 	[webViewController setViewHomeUrl:url];
 }
 
+#ifdef __IPHONE_3_0
+-(void) onCreateMap:(NSMutableArray*)items {
+	MapViewController* map = [[MapViewController alloc] init];
+	[map setParams:[items objectAtIndex:0]];
+	[map setAnnotations:[items objectAtIndex:1]];
+	map.actionTarget = self;
+	map.onNavigate = @selector(onNavigateTo:);
+	[window addSubview:map.view];
+}
+#endif
+
 -(BOOL)startCameraPickerFromViewController:(UIViewController*)controller 
 							 usingDelegate:(id&lt;UINavigationControllerDelegate, UIImagePickerControllerDelegate&gt;)delegateObject 
 							 sourceType:(UIImagePickerControllerSourceType)type
@@ -160,14 +184,22 @@
 }
 
 - (void)onCreateNativeBar:(NativeBar*)bar {
+	// retain the nativebar so it doesn't get deleted
+	[bar retain];
 	self.nativeBar = bar;
-	if (nativeBar.barType == TABBAR_TYPE) {
+	if (self.nativeBar.barType == TABBAR_TYPE) {
 		tabBarDelegate.tabBar = self.nativeBar;
 		[self startNativeBarFromViewController:webViewController usingDelegate:tabBarDelegate];
-	} else if(nativeBar.barType == TOOLBAR_TYPE) {
+	} else if(self.nativeBar.barType == TOOLBAR_TYPE) {
 		webViewController.toolbar.hidden = NO;
-	} else if(nativeBar.barType == NOBAR_TYPE) {
+		[window sendSubviewToBack:webViewController.webView];
+		[window bringSubviewToFront:webViewController.toolbar];
+		[webViewController.webView sizeToFit];
+	} else if(self.nativeBar.barType == NOBAR_TYPE) {
 		webViewController.toolbar.hidden = YES;
+		[window sendSubviewToBack:webViewController.toolbar];
+		[window bringSubviewToFront:webViewController.webView];
+		[webViewController.webView sizeToFit];
 	}
 }
 
@@ -247,6 +279,21 @@
 	[params release];
 }
 
+- (void)onMapLocation:(NSString*)query {
+	NSURL* url = [NSURL URLWithString:[@&quot;http://maps.google.com/?&quot; stringByAppendingString:query]];
+	[[UIApplication sharedApplication] openURL:url];
+}
+
+- (void)onActiveTab:(NSValue*)val {
+	//TODO: This is a bit weird, but saves us creating another wrapper class
+	int* res = val.pointerValue;
+	if (tabBarDelegate &amp;&amp; tabBarDelegate.tabBar) {
+		*res = tabBarDelegate.activeTab;
+	} else {
+		*res = 0;
+	}
+}
+
 #ifdef __IPHONE_3_0
 - (void)processDoSync:(NSDictionary *)userInfo
 {
@@ -298,8 +345,17 @@
 }
 #endif
 
+- (void) showLoadingPage {
+	NSString *filePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@&quot;apps/app/loading.html&quot;];
+	NSFileManager *fileManager = [NSFileManager defaultManager];
+	if ([fileManager fileExistsAtPath:filePath]) {
+		NSData *data = [fileManager contentsAtPath:filePath];
+		NSString *loadingPage = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+		[webViewController loadHTMLString:loadingPage];
+	}
+}
+
 - (void) doStartUp {
-	//
 	appStarted = false;
 	// Log View
 	logViewController = [[LogViewController alloc] init];
@@ -311,15 +367,17 @@
 	webViewController-&gt;actionTarget = self;
 	webViewController-&gt;onShowLog = @selector(onShowLog);
 	
+	//TabBar delegate
+	tabBarDelegate = [[TabBarDelegate alloc] init];
+
+	[self showLoadingPage];
+	
 	//Camera delegate
 	pickImageDelegate = [[PickImageDelegate alloc] init];
 	
 	//DateTime delegate
 	dateTimePickerDelegate = [[DateTimePickerDelegate alloc] init];
 	
-	//TabBar delegate
-	tabBarDelegate = [[TabBarDelegate alloc] init];
-	
     //Create local server and start it
     //serverHost = [[ServerHost alloc] init];
 	serverHost = [ServerHost sharedInstance];
@@ -338,9 +396,13 @@
 	serverHost-&gt;onVibrate = @selector(onVibrate:);
 	serverHost-&gt;onPlayFile = @selector(onPlayFile:);
 	serverHost-&gt;onSysCall = @selector(onSysCall:);
+	serverHost-&gt;onMapLocation = @selector(onMapLocation:);
+	serverHost-&gt;onCreateMap = @selector(onCreateMap:);
+	serverHost-&gt;onActiveTab = @selector(onActiveTab:);
     [serverHost start];
 	
 	// Create View
+	webViewController.toolbar.hidden = YES;
 	[window addSubview:webViewController.view];
     [window makeKeyAndVisible];
 	
@@ -359,8 +421,6 @@
 #endif
 
 - (void)applicationDidFinishLaunching:(UIApplication *)application {
-	// Hide the toolbar initially, we will re-draw it if there are no tabs
-	webViewController.toolbar.hidden = YES;
 	[self doStartUp];
 }
 </diff>
      <filename>platform/iphone/Classes/RhoRunnerAppDelegate.m</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,9 @@
 	SEL onVibrate;
 	SEL onPlayFile;
 	SEL onSysCall;
+	SEL onMapLocation;
+	SEL onCreateMap;
+	SEL onActiveTab;
 }
 
 // callbacks
@@ -52,6 +55,9 @@
 @property (assign) SEL onVibrate;
 @property (assign) SEL onPlayFile;
 @property (assign) SEL onSysCall;
+@property (assign) SEL onMapLocation;
+@property (assign) SEL onCreateMap;
+@property (assign) SEL onActiveTab;
 
 - (void) start;
 //TODO - implement pause and stop operations and graceful termination of the thread...</diff>
      <filename>platform/iphone/Classes/Server/ServerHost.h</filename>
    </modified>
    <modified>
      <diff>@@ -23,9 +23,11 @@
 #include &quot;logging/RhoLogConf.h&quot;
 #include &quot;sync/syncthread.h&quot;
 #include &quot;JSString.h&quot;
+#import &quot;WebViewUrl.h&quot;
 #import &quot;ParamsWrapper.h&quot;
 #import &quot;DateTime.h&quot;
 #import &quot;NativeBar.h&quot;
+#import &quot;MapViewController.h&quot;
 
 #import &quot;logging/RhoLog.h&quot;
 #undef DEFAULT_LOGCATEGORY
@@ -74,7 +76,7 @@ static ServerHost* sharedSH = nil;
 
 @synthesize actionTarget, onStartFailure, onStartSuccess, onRefreshView, onNavigateTo, onExecuteJs; 
 @synthesize onSetViewHomeUrl, onSetViewOptionsUrl, onTakePicture, onChoosePicture, onChooseDateTime, onCreateNativeBar;
-@synthesize onShowPopup, onVibrate, onPlayFile, onSysCall;
+@synthesize onShowPopup, onVibrate, onPlayFile, onSysCall, onMapLocation, onCreateMap, onActiveTab;
 
 - (void)serverStarted:(NSString*)data {
 	if(actionTarget &amp;&amp; [actionTarget respondsToSelector:onStartSuccess]) {
@@ -96,9 +98,9 @@ static ServerHost* sharedSH = nil;
 	}
 }
 
-- (void)navigateTo:(NSString*) url {
+- (void)navigateTo:(WebViewUrl*) wvUrl {
 	if(actionTarget &amp;&amp; [actionTarget respondsToSelector:onNavigateTo]) {
-		[actionTarget performSelectorOnMainThread:onNavigateTo withObject:url waitUntilDone:NO];
+		[actionTarget performSelectorOnMainThread:onNavigateTo withObject:wvUrl waitUntilDone:NO];
 	}
 }
 
@@ -178,6 +180,28 @@ static ServerHost* sharedSH = nil;
 	}
 }
 
+- (void)mapLocation:(NSString*) query {
+	if(actionTarget &amp;&amp; [actionTarget respondsToSelector:onMapLocation]) {
+		[actionTarget performSelectorOnMainThread:onMapLocation withObject:query waitUntilDone:NO];
+	}
+}
+
+- (void)createMap:(NSMutableArray*)items {
+	if(actionTarget &amp;&amp; [actionTarget respondsToSelector:onCreateMap]) {
+		[actionTarget performSelectorOnMainThread:onCreateMap withObject:items waitUntilDone:NO];
+	}
+}
+
+- (int)activeTab {
+	int retval = 0;
+	if(actionTarget &amp;&amp; [actionTarget respondsToSelector:onActiveTab]) {
+		NSValue* result = [NSValue valueWithPointer: &amp;retval];
+		if (!result) return 0;
+		[actionTarget performSelectorOnMainThread:onActiveTab withObject:result waitUntilDone:YES];
+	}
+	return retval;
+}
+
 - (void)sysCall:(PARAMS_WRAPPER*)params {
 }
 
@@ -211,11 +235,13 @@ static ServerHost* sharedSH = nil;
     ServerRef server = ServerCreate(NULL, AcceptConnection, &amp;c);
 	if (server != NULL &amp;&amp; ServerConnect(server, NULL, kServiceType, 8080)) {
 		RAWLOG_INFO(&quot;HTTP Server started and ready&quot;);
-		[self performSelectorOnMainThread:@selector(serverStarted:) 
-							   withObject:homeUrl waitUntilDone:NO];
 		
 		RAWLOG_INFO(&quot;Create Sync&quot;);
 		rho_sync_create();
+		RhoRubyInitApp();
+		
+		[self performSelectorOnMainThread:@selector(serverStarted:) 
+							   withObject:homeUrl waitUntilDone:NO];
 		
         [[NSRunLoop currentRunLoop] run];
         RAWLOG_INFO(&quot;Invalidating local server&quot;);
@@ -257,7 +283,6 @@ extern const char* RhoGetRootPath();
 	// Startup the sync engine thread
 	//start_sync_engine(database);
 	
-	
 	// Start server thread	
     [NSThread detachNewThreadSelector:@selector(ServerHostThreadRoutine:)
                              toTarget:self withObject:nil];
@@ -334,8 +359,11 @@ void webview_refresh() {
 	[[ServerHost sharedInstance] refreshView];
 }
 
-void webview_navigate(char* url) {
-	[[ServerHost sharedInstance] navigateTo:[NSString stringWithCString:url]];
+void webview_navigate(char* url, int index) {
+	WebViewUrl *webViewUrl = [[[WebViewUrl alloc] init] autorelease];
+	webViewUrl.url = [NSString stringWithUTF8String:url];
+	webViewUrl.webViewIndex = index;
+	[[ServerHost sharedInstance] navigateTo:webViewUrl];
 }
 
 char* webview_execute_js(char* js) {
@@ -397,6 +425,21 @@ void choose_datetime(char* callback, char* title, long initial_time, int format,
 										   data:[NSString stringWithCString:data]];
 }
 
+void _rho_map_location(char* query) {
+	[[ServerHost sharedInstance] mapLocation:[NSString stringWithCString:query]];
+}
+
+void mapview_create(int nparams, char** params, int nannotations, char** annotation) {
+#ifdef __IPHONE_3_0	
+	NSMutableArray *settings = parse_settings(nparams, params);
+	NSMutableArray *annotations = parse_annotations(nannotations,annotation);
+	NSMutableArray *items = [NSMutableArray arrayWithCapacity:2];
+	[items addObject:settings];
+	[items addObject:annotations];
+	[[ServerHost sharedInstance] createMap:items];
+#endif	
+}
+
 void _rho_ext_syscall(PARAMS_WRAPPER* params) {
 	[[ServerHost sharedInstance] doSysCall:params];
 }
@@ -414,3 +457,7 @@ void create_nativebar(int bar_type, int nparams, char** params) {
 	}
 	[[ServerHost sharedInstance] createNativeBar:bar_type dataArray:items];
 }
+
+int webview_active_tab() {
+	return [[ServerHost sharedInstance] activeTab];
+}
\ No newline at end of file</diff>
      <filename>platform/iphone/Classes/Server/ServerHost.m</filename>
    </modified>
    <modified>
      <diff>@@ -18,14 +18,17 @@
 	NativeBar* tabBar;
 	UIWindow* mainWindow;
 	NSMutableArray* barItems;
+	int activeTab;
 }
 
 @property(nonatomic, assign) NativeBar* tabBar;
 @property(nonatomic, retain) UITabBarController* tabBarController;
 @property(nonatomic, retain) UIWindow* mainWindow;
 @property(nonatomic, retain) NSMutableArray* barItems;
+@property(assign) int activeTab;
 
 - (void)createTabBar:(UIWindow*)window;
 - (void)loadTabBarItemFirstPage:(BarItem*)item;
+- (void)loadTabBarItemLocation:(BarItem*)item url:(NSString*)url;
 - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController;
 @end</diff>
      <filename>platform/iphone/Classes/TabBarDelegate.h</filename>
    </modified>
    <modified>
      <diff>@@ -12,16 +12,17 @@
 
 @implementation TabBarDelegate
 
-@synthesize tabBarController, mainWindow, tabBar, barItems;
+@synthesize tabBarController, mainWindow, tabBar, barItems, activeTab;
 
 - (void)dealloc {
 	[tabBarController release];
 	[barItems release];
+	[tabBar release];
 	[super dealloc];
 }
 
 - (void)loadTabBarItemFirstPage:(BarItem*)item {
-	if (item.loaded == NO) {
+	if (item.loaded == NO || item.reload == YES) {
 		NSString* escapedUrl = [item.location stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 
 		escapedUrl = [escapedUrl stringByReplacingOccurrencesOfString: @&quot;&amp;&quot; withString: @&quot;%26&quot;];
 		NSString* startLocation = [@&quot;http://localhost:8080/system/redirect_to?url=&quot; stringByAppendingString:escapedUrl];
@@ -30,6 +31,10 @@
 	}
 }
 
+- (void)loadTabBarItemLocation:(BarItem*)item url:(NSString*)url {
+	[item.viewController navigateRedirect:url];
+}
+
 - (void)createTabBar:(UIWindow*)window {
 	self.mainWindow = window;
 	// Load the tab bar (just one of them)
@@ -39,7 +44,7 @@
 	}
 	
 	tabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
-	int barSize = [tabBar.barItemDataArray count] / 3;
+	int barSize = [tabBar.barItemDataArray count] / 4;
 	NSMutableArray *tabs = [NSMutableArray arrayWithCapacity:barSize];
 	
 	if(!self.barItems) {
@@ -47,20 +52,22 @@
 	}
 	
 	// Setup each tabbar item with elements in specific order:
-	// label, action, icon
+	// label, action, icon, reload
 	for(int i=0; i &lt; barSize; i++) {
 		BarItem* item = [[BarItem alloc] init];
-		item.label = (NSString*)[tabBar.barItemDataArray objectAtIndex:i*3];
-		item.location = (NSString*)[tabBar.barItemDataArray objectAtIndex:(i*3)+1];
-		item.icon = (NSString*)[tabBar.barItemDataArray objectAtIndex:(i*3)+2];
+		item.label = (NSString*)[tabBar.barItemDataArray objectAtIndex:i*4];
+		item.location = (NSString*)[tabBar.barItemDataArray objectAtIndex:(i*4)+1];
+		item.icon = (NSString*)[tabBar.barItemDataArray objectAtIndex:(i*4)+2];
+		item.reload = [(NSString*)[tabBar.barItemDataArray objectAtIndex:(i*4)+3] isEqualToString:@&quot;true&quot;] ? YES : NO;
 		if (item.label &amp;&amp; item.location &amp;&amp; item.icon) {
-			UIViewController *subController = [[WebViewController alloc] initWithNibName:nil bundle:nil];
+			WebViewController *subController = [[WebViewController alloc] initWithNibName:nil bundle:nil];
 			UIWebView *wView = [[UIWebView alloc] init];
 			NSString *imagePath = [[AppManager getApplicationsRootPath] stringByAppendingPathComponent:item.icon];	
-			NSLog(@&quot;PATH: %@&quot;, imagePath);
 			subController.title = item.label;
 			subController.tabBarItem.image = [UIImage imageWithContentsOfFile:imagePath];
+			//TODO: Figure out why view and webView need to point to the same object!
 			subController.view = wView;
+			subController.webView = wView;
 			item.viewController = subController;
 			[barItems addObject:item];
 			[tabs addObject:subController];
@@ -75,7 +82,12 @@
 }
 
 - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
-	[self loadTabBarItemFirstPage:(BarItem*)[barItems objectAtIndex:self.tabBarController.selectedIndex]];
+	if(self.tabBarController.selectedIndex &gt; barItems.count) {
+		[NSException raise:@&quot;Exception&quot; format:@&quot;Rhodes currently only supports up to 5 tabs.  Please change your tabs array and try again.&quot;];
+	} else {
+		[self loadTabBarItemFirstPage:(BarItem*)[barItems objectAtIndex:self.tabBarController.selectedIndex]];
+	}
+	self.activeTab = self.tabBarController.selectedIndex;
 }
 
 @end</diff>
      <filename>platform/iphone/Classes/TabBarDelegate.m</filename>
    </modified>
    <modified>
      <diff>@@ -26,9 +26,12 @@
 
 @property (assign) id   actionTarget;
 @property (assign) UIToolbar* toolbar;
+@property (assign) UIWebView* webView;
 @property (assign) SEL  onShowLog;
 
 
+-(void)loadHTMLString:(NSString*)data;
+
 -(void)navigate:(NSString*)url;
 -(void)navigateRedirect:(NSString*)url;
 
@@ -44,6 +47,8 @@
 
 -(IBAction)refresh;
 
+-(void)executeJs:(JSString *)js;
+
 -(void)active;
 
 -(void)inactive;</diff>
      <filename>platform/iphone/Classes/WebViewController.h</filename>
    </modified>
    <modified>
      <diff>@@ -35,10 +35,8 @@ char* get_current_location() {
 
 @implementation WebViewController
 
-NSString *loadingText = @&quot;Loading...&quot;;
-
 @synthesize viewHomeUrl, viewOptionsUrl;
-@synthesize actionTarget, onShowLog, toolbar;
+@synthesize actionTarget, onShowLog, toolbar, webView;
 
 -(void)viewDidLoad {
 	[super viewDidLoad];
@@ -62,6 +60,11 @@ NSString *loadingText = @&quot;Loading...&quot;;
 	}
 }
 
+-(void)loadHTMLString:(NSString*)data {
+	RAWLOG_INFO(&quot;Loading specified HTML string&quot;);
+	[webView loadHTMLString:data baseURL: [NSURL URLWithString:@&quot;&quot;]];
+}
+
 -(void)navigate:(NSString*)url {
     RAWLOG_INFO(&quot;Navigating to the specifyed URL&quot;);
 	[webView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:url]]];
@@ -69,15 +72,14 @@ NSString *loadingText = @&quot;Loading...&quot;;
 
 -(void)executeJs:(JSString*)js {
 	RAWLOG_INFO1(&quot;Executing JS: %s&quot;, [js.inputJs UTF8String] );
-    //NSLog(@&quot;Executing JS: %@\n&quot;, js.inputJs);
 	js.outputJs = [webView stringByEvaluatingJavaScriptFromString:js.inputJs];
 }
 
 -(void)navigateRedirect:(NSString*)url {
 	NSString* escapedUrl = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 
 	escapedUrl = [escapedUrl stringByReplacingOccurrencesOfString: @&quot;&amp;&quot; withString: @&quot;%26&quot;];
-	NSString* redirctor = [@&quot;http://localhost:8080/system/redirect_to?url=&quot; stringByAppendingString:escapedUrl];
-	[webView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:redirctor]]];
+	NSString* redirector = [@&quot;http://localhost:8080/system/redirect_to?url=&quot; stringByAppendingString:escapedUrl];
+	[webView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:redirector]]];
 }
 
 -(IBAction)goBack {
@@ -90,14 +92,12 @@ NSString *loadingText = @&quot;Loading...&quot;;
 
 -(IBAction)goHome {
 	if (viewHomeUrl != NULL) {
-		//[self navigate:viewHomeUrl];
 		[self navigateRedirect:viewHomeUrl];
 	}
 }
 
 -(IBAction)goOptions {
 	if (viewOptionsUrl != NULL) {
-		//[self navigate:viewOptionsUrl];
 		[self navigateRedirect:viewOptionsUrl];
 	}
 }
@@ -147,7 +147,6 @@ NSString *loadingText = @&quot;Loading...&quot;;
 	
 	NSString* location = [webview stringByEvaluatingJavaScriptFromString:@&quot;location.href&quot;];
 	set_current_location((CFStringRef)location);
-	
 }
 
 - (void)runSync</diff>
      <filename>platform/iphone/Classes/WebViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -55,6 +55,10 @@ public:
 	{
 		return m_nRespCode == 200;
 	}
+    virtual boolean isUnathorized()
+    {
+        return m_nRespCode == 401;
+    }
 
     virtual boolean isResponseRecieved(){ return m_nRespCode!=-1;}
 };
@@ -102,8 +106,8 @@ static const char* szMultipartPrefix =
 static const char* szMultipartPostfix = 
 &quot;\r\n------------A6174410D6AD474183FDE48F5662FCC5--&quot;;
 
-static const char* szMultipartContType = 
-&quot;multipart/form-data; boundary=----------A6174410D6AD474183FDE48F5662FCC5\r\n&quot;;
+//static const char* szMultipartContType = 
+//&quot;multipart/form-data; boundary=----------A6174410D6AD474183FDE48F5662FCC5\r\n&quot;;
 	
 INetResponse* CNetRequest::pushFile(const String&amp; strUrl, const String&amp; strFilePath)
 {</diff>
      <filename>platform/iphone/Classes/rho/net/NetRequest.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -228,6 +228,9 @@ char*  rho_net_impl_requestCookies(const char* szMethod, const char* szUrl, cons
 					errorCode == NSURLErrorUserAuthenticationRequired ||
 					errorCode == NSURLErrorBadServerResponse ) 
 				{
+					if ( pnRespCode )
+						*pnRespCode = 401;
+					
 					rho_net_impl_deleteAllCookies();
 				}
 			} else 
@@ -309,6 +312,8 @@ char* rho_net_impl_request(const char* szMethod, const char* szUrl, const char*
 				if (errorCode == NSURLErrorUserCancelledAuthentication || 
 					errorCode == NSURLErrorUserAuthenticationRequired) 
 				{
+					if ( pnRespCode )
+						*pnRespCode = 401;
 					rho_net_impl_deleteAllCookies();
 				}
 			} else 
@@ -371,6 +376,8 @@ char* rho_net_impl_pullFile(const char* szUrl, int* pnRespCode, int (*writeFunc)
 				if (errorCode == NSURLErrorUserCancelledAuthentication || 
 					errorCode == NSURLErrorUserAuthenticationRequired) 
 				{
+					if ( pnRespCode )
+						*pnRespCode = 401;
 					rho_net_impl_deleteAllCookies();
 				}
 			} else 
@@ -449,8 +456,8 @@ int  rho_net_impl_pushFile(const char* szUrl, const char* szFilePath, int* pbRes
 void rho_net_impl_cancel(void* pConnData)
 {
 	NSURLConnection* pConn = (NSURLConnection*)pConnData;
-	if ( pConn != NULL )
-		[pConn cancel];
+	//if ( pConn != NULL )
+	//	[pConn cancel];
 }
 /*
  * Pushes changes from list to rhosync server
@@ -512,6 +519,8 @@ char* rho_net_impl_pushMultipartData(const char* url, const char* data, size_t d
 				if (errorCode == NSURLErrorUserCancelledAuthentication || 
 					errorCode == NSURLErrorUserAuthenticationRequired) 
 				{
+					if ( pnRespCode )
+						*pnRespCode = 401;
 					rho_net_impl_deleteAllCookies();
 				}
 </diff>
      <filename>platform/iphone/Classes/rho/net/NetRequestImpl.m</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,15 @@
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-&lt;archive type=&quot;com.apple.InterfaceBuilder3.CocoaTouch.XIB&quot; version=&quot;7.03&quot;&gt;
+&lt;archive type=&quot;com.apple.InterfaceBuilder3.CocoaTouch.XIB&quot; version=&quot;7.10&quot;&gt;
 	&lt;data&gt;
 		&lt;int key=&quot;IBDocument.SystemTarget&quot;&gt;512&lt;/int&gt;
-		&lt;string key=&quot;IBDocument.SystemVersion&quot;&gt;9E27&lt;/string&gt;
-		&lt;string key=&quot;IBDocument.InterfaceBuilderVersion&quot;&gt;677&lt;/string&gt;
-		&lt;string key=&quot;IBDocument.AppKitVersion&quot;&gt;949.33&lt;/string&gt;
-		&lt;string key=&quot;IBDocument.HIToolboxVersion&quot;&gt;352.00&lt;/string&gt;
+		&lt;string key=&quot;IBDocument.SystemVersion&quot;&gt;10B504&lt;/string&gt;
+		&lt;string key=&quot;IBDocument.InterfaceBuilderVersion&quot;&gt;732&lt;/string&gt;
+		&lt;string key=&quot;IBDocument.AppKitVersion&quot;&gt;1038.2&lt;/string&gt;
+		&lt;string key=&quot;IBDocument.HIToolboxVersion&quot;&gt;437.00&lt;/string&gt;
+		&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;IBDocument.PluginVersions&quot;&gt;
+			&lt;string key=&quot;NS.key.0&quot;&gt;com.apple.InterfaceBuilder.IBCocoaTouchPlugin&lt;/string&gt;
+			&lt;string key=&quot;NS.object.0&quot;&gt;62&lt;/string&gt;
+		&lt;/object&gt;
 		&lt;object class=&quot;NSMutableArray&quot; key=&quot;IBDocument.EditedObjectIDs&quot;&gt;
 			&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 			&lt;integer value=&quot;83&quot;/&gt;
@@ -16,7 +20,7 @@
 		&lt;/object&gt;
 		&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;IBDocument.Metadata&quot;&gt;
 			&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-			&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
+			&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot; id=&quot;0&quot;&gt;
 				&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 			&lt;/object&gt;
 			&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.values&quot;&gt;
@@ -46,7 +50,7 @@
 							&lt;object class=&quot;IBUIWebView&quot; id=&quot;842565669&quot;&gt;
 								&lt;reference key=&quot;NSNextResponder&quot; ref=&quot;178952735&quot;/&gt;
 								&lt;int key=&quot;NSvFlags&quot;&gt;1316&lt;/int&gt;
-								&lt;string key=&quot;NSFrame&quot;&gt;{{0, 20}, {320, 416}}&lt;/string&gt;
+								&lt;string key=&quot;NSFrame&quot;&gt;{{0, 20}, {320, 460}}&lt;/string&gt;
 								&lt;reference key=&quot;NSSuperview&quot; ref=&quot;178952735&quot;/&gt;
 								&lt;object class=&quot;NSColor&quot; key=&quot;IBUIBackgroundColor&quot;&gt;
 									&lt;int key=&quot;NSColorSpace&quot;&gt;1&lt;/int&gt;
@@ -55,6 +59,7 @@
 								&lt;bool key=&quot;IBUIClipsSubviews&quot;&gt;YES&lt;/bool&gt;
 								&lt;bool key=&quot;IBUIMultipleTouchEnabled&quot;&gt;YES&lt;/bool&gt;
 								&lt;bool key=&quot;IBUIScalesPageToFit&quot;&gt;YES&lt;/bool&gt;
+								&lt;int key=&quot;IBUIDataDetectorTypes&quot;&gt;1&lt;/int&gt;
 								&lt;bool key=&quot;IBUIDetectsPhoneNumbers&quot;&gt;YES&lt;/bool&gt;
 							&lt;/object&gt;
 							&lt;object class=&quot;IBUIToolbar&quot; id=&quot;368036388&quot;&gt;
@@ -75,9 +80,9 @@
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;888280739&quot;&gt;
-										&lt;float key=&quot;IBUIWidth&quot;&gt;2.000000e+01&lt;/float&gt;
-										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;6&lt;/int&gt;
+										&lt;float key=&quot;IBUIWidth&quot;&gt;20&lt;/float&gt;
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
+										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;6&lt;/int&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;494127799&quot;&gt;
 										&lt;object class=&quot;NSCustomResource&quot; key=&quot;IBUIImage&quot;&gt;
@@ -87,13 +92,13 @@
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;291919474&quot;&gt;
-										&lt;float key=&quot;IBUIWidth&quot;&gt;3.000000e+01&lt;/float&gt;
-										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;6&lt;/int&gt;
+										&lt;float key=&quot;IBUIWidth&quot;&gt;30&lt;/float&gt;
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
+										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;6&lt;/int&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;849367448&quot;&gt;
-										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;5&lt;/int&gt;
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
+										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;5&lt;/int&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;596451217&quot;&gt;
 										&lt;object class=&quot;NSCustomResource&quot; key=&quot;IBUIImage&quot;&gt;
@@ -103,18 +108,18 @@
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;359249268&quot;&gt;
-										&lt;float key=&quot;IBUIWidth&quot;&gt;1.300000e+01&lt;/float&gt;
-										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;6&lt;/int&gt;
+										&lt;float key=&quot;IBUIWidth&quot;&gt;13&lt;/float&gt;
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
+										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;6&lt;/int&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;145899196&quot;&gt;
-										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;13&lt;/int&gt;
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
+										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;13&lt;/int&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;52347604&quot;&gt;
-										&lt;float key=&quot;IBUIWidth&quot;&gt;1.700000e+01&lt;/float&gt;
-										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;6&lt;/int&gt;
+										&lt;float key=&quot;IBUIWidth&quot;&gt;17&lt;/float&gt;
 										&lt;reference key=&quot;IBUIToolbar&quot; ref=&quot;368036388&quot;/&gt;
+										&lt;int key=&quot;IBUISystemItemIdentifier&quot;&gt;6&lt;/int&gt;
 									&lt;/object&gt;
 									&lt;object class=&quot;IBUIBarButtonItem&quot; id=&quot;581169041&quot;&gt;
 										&lt;object class=&quot;NSCustomResource&quot; key=&quot;IBUIImage&quot;&gt;
@@ -150,7 +155,7 @@
 								&lt;/object&gt;
 								&lt;nil key=&quot;IBUIHighlightedColor&quot;/&gt;
 								&lt;int key=&quot;IBUIBaselineAdjustment&quot;&gt;1&lt;/int&gt;
-								&lt;float key=&quot;IBUIMinimumFontSize&quot;&gt;1.000000e+01&lt;/float&gt;
+								&lt;float key=&quot;IBUIMinimumFontSize&quot;&gt;10&lt;/float&gt;
 							&lt;/object&gt;
 						&lt;/object&gt;
 						&lt;string key=&quot;NSFrameSize&quot;&gt;{320, 480}&lt;/string&gt;
@@ -330,9 +335,7 @@
 					&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 					&lt;object class=&quot;IBObjectRecord&quot;&gt;
 						&lt;int key=&quot;objectID&quot;&gt;0&lt;/int&gt;
-						&lt;object class=&quot;NSArray&quot; key=&quot;object&quot; id=&quot;957960031&quot;&gt;
-							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-						&lt;/object&gt;
+						&lt;reference key=&quot;object&quot; ref=&quot;0&quot;/&gt;
 						&lt;reference key=&quot;children&quot; ref=&quot;1000&quot;/&gt;
 						&lt;nil key=&quot;parent&quot;/&gt;
 					&lt;/object&gt;
@@ -343,24 +346,24 @@
 							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 							&lt;reference ref=&quot;178952735&quot;/&gt;
 						&lt;/object&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;957960031&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;0&quot;/&gt;
 						&lt;string key=&quot;objectName&quot;&gt;MainWindow&lt;/string&gt;
 					&lt;/object&gt;
 					&lt;object class=&quot;IBObjectRecord&quot;&gt;
 						&lt;int key=&quot;objectID&quot;&gt;-1&lt;/int&gt;
 						&lt;reference key=&quot;object&quot; ref=&quot;841351856&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;957960031&quot;/&gt;
-						&lt;string type=&quot;base64-UTF8&quot; key=&quot;objectName&quot;&gt;RmlsZSdzIE93bmVyA&lt;/string&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;0&quot;/&gt;
+						&lt;string key=&quot;objectName&quot;&gt;File's Owner&lt;/string&gt;
 					&lt;/object&gt;
 					&lt;object class=&quot;IBObjectRecord&quot;&gt;
 						&lt;int key=&quot;objectID&quot;&gt;3&lt;/int&gt;
 						&lt;reference key=&quot;object&quot; ref=&quot;664661524&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;957960031&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;0&quot;/&gt;
 					&lt;/object&gt;
 					&lt;object class=&quot;IBObjectRecord&quot;&gt;
 						&lt;int key=&quot;objectID&quot;&gt;-2&lt;/int&gt;
 						&lt;reference key=&quot;object&quot; ref=&quot;427554174&quot;/&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;957960031&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;0&quot;/&gt;
 					&lt;/object&gt;
 					&lt;object class=&quot;IBObjectRecord&quot;&gt;
 						&lt;int key=&quot;objectID&quot;&gt;11&lt;/int&gt;
@@ -368,7 +371,7 @@
 						&lt;object class=&quot;NSMutableArray&quot; key=&quot;children&quot;&gt;
 							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 						&lt;/object&gt;
-						&lt;reference key=&quot;parent&quot; ref=&quot;957960031&quot;/&gt;
+						&lt;reference key=&quot;parent&quot; ref=&quot;0&quot;/&gt;
 					&lt;/object&gt;
 					&lt;object class=&quot;IBObjectRecord&quot;&gt;
 						&lt;int key=&quot;objectID&quot;&gt;83&lt;/int&gt;
@@ -469,7 +472,7 @@
 			&lt;/object&gt;
 			&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;flattenedProperties&quot;&gt;
 				&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-				&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
+				&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
 					&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 					&lt;string&gt;-1.CustomClassName&lt;/string&gt;
 					&lt;string&gt;-2.CustomClassName&lt;/string&gt;
@@ -513,9 +516,7 @@
 					&lt;string&gt;com.apple.InterfaceBuilder.IBCocoaTouchPlugin&lt;/string&gt;
 					&lt;object class=&quot;NSMutableDictionary&quot;&gt;
 						&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-						&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
-							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-						&lt;/object&gt;
+						&lt;reference key=&quot;dict.sortedKeys&quot; ref=&quot;0&quot;/&gt;
 						&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.values&quot;&gt;
 							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 						&lt;/object&gt;
@@ -536,9 +537,7 @@
 			&lt;/object&gt;
 			&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;unlocalizedProperties&quot;&gt;
 				&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-				&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
-					&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-				&lt;/object&gt;
+				&lt;reference key=&quot;dict.sortedKeys&quot; ref=&quot;0&quot;/&gt;
 				&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.values&quot;&gt;
 					&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 				&lt;/object&gt;
@@ -546,9 +545,7 @@
 			&lt;nil key=&quot;activeLocalization&quot;/&gt;
 			&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;localizations&quot;&gt;
 				&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-				&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
-					&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-				&lt;/object&gt;
+				&lt;reference key=&quot;dict.sortedKeys&quot; ref=&quot;0&quot;/&gt;
 				&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.values&quot;&gt;
 					&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 				&lt;/object&gt;
@@ -564,7 +561,7 @@
 					&lt;string key=&quot;superclassName&quot;&gt;NSObject&lt;/string&gt;
 					&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;outlets&quot;&gt;
 						&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-						&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
+						&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
 							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 							&lt;string&gt;webViewController&lt;/string&gt;
 							&lt;string&gt;window&lt;/string&gt;
@@ -589,14 +586,6 @@
 					&lt;/object&gt;
 				&lt;/object&gt;
 				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
-					&lt;string key=&quot;className&quot;&gt;UINavigationItem&lt;/string&gt;
-					&lt;string key=&quot;superclassName&quot;&gt;NSObject&lt;/string&gt;
-					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
-						&lt;string key=&quot;majorKey&quot;&gt;IBUserSource&lt;/string&gt;
-						&lt;string key=&quot;minorKey&quot;/&gt;
-					&lt;/object&gt;
-				&lt;/object&gt;
-				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
 					&lt;string key=&quot;className&quot;&gt;UIWebView&lt;/string&gt;
 					&lt;string key=&quot;superclassName&quot;&gt;UIView&lt;/string&gt;
 					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
@@ -609,7 +598,7 @@
 					&lt;string key=&quot;superclassName&quot;&gt;UIViewController&lt;/string&gt;
 					&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;actions&quot;&gt;
 						&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-						&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
+						&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
 							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
 							&lt;string&gt;goBack&lt;/string&gt;
 							&lt;string&gt;goForward&lt;/string&gt;
@@ -628,8 +617,9 @@
 					&lt;/object&gt;
 					&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;outlets&quot;&gt;
 						&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
-						&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
+						&lt;object class=&quot;NSArray&quot; key=&quot;dict.sortedKeys&quot;&gt;
 							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
+							&lt;string&gt;actionTarget&lt;/string&gt;
 							&lt;string&gt;activity&lt;/string&gt;
 							&lt;string&gt;activityInfo&lt;/string&gt;
 							&lt;string&gt;backBtn&lt;/string&gt;
@@ -642,6 +632,7 @@
 						&lt;/object&gt;
 						&lt;object class=&quot;NSMutableArray&quot; key=&quot;dict.values&quot;&gt;
 							&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
+							&lt;string&gt;id&lt;/string&gt;
 							&lt;string&gt;UIActivityIndicatorView&lt;/string&gt;
 							&lt;string&gt;UILabel&lt;/string&gt;
 							&lt;string&gt;UIBarButtonItem&lt;/string&gt;
@@ -671,9 +662,282 @@
 					&lt;/object&gt;
 				&lt;/object&gt;
 			&lt;/object&gt;
+			&lt;object class=&quot;NSMutableArray&quot; key=&quot;referencedPartialClassDescriptionsV3.2+&quot;&gt;
+				&lt;bool key=&quot;EncodedWithXMLCoder&quot;&gt;YES&lt;/bool&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;AddressBook.framework/Headers/ABActions.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSError.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSFileManager.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSKeyValueCoding.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSKeyValueObserving.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSKeyedArchiver.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSNetServices.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSObject.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSPort.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSRunLoop.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSStream.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSThread.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSURL.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSURLConnection.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;Foundation.framework/Headers/NSXMLParser.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIAccessibility.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UINibLoading.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot; id=&quot;53732556&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIResponder.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIActivityIndicatorView&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIView&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIActivityIndicatorView.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIApplication&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIResponder&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIApplication.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIBarButtonItem&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIBarItem&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIBarButtonItem.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIBarItem&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIBarItem.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UILabel&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIView&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UILabel.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UINavigationBar&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIView&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UINavigationBar.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIResponder&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;NSObject&lt;/string&gt;
+					&lt;reference key=&quot;sourceIdentifier&quot; ref=&quot;53732556&quot;/&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UISearchBar&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIView&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UISearchBar.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UISearchDisplayController&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;NSObject&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UISearchDisplayController.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIToolbar&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIView&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIToolbar.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIView&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UITextField.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIView&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIResponder&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIView.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIViewController&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UINavigationController.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIViewController&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UITabBarController.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIViewController&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIResponder&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIViewController.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIWebView&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIView&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIWebView.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+				&lt;object class=&quot;IBPartialClassDescription&quot;&gt;
+					&lt;string key=&quot;className&quot;&gt;UIWindow&lt;/string&gt;
+					&lt;string key=&quot;superclassName&quot;&gt;UIView&lt;/string&gt;
+					&lt;object class=&quot;IBClassDescriptionSource&quot; key=&quot;sourceIdentifier&quot;&gt;
+						&lt;string key=&quot;majorKey&quot;&gt;IBFrameworkSource&lt;/string&gt;
+						&lt;string key=&quot;minorKey&quot;&gt;UIKit.framework/Headers/UIWindow.h&lt;/string&gt;
+					&lt;/object&gt;
+				&lt;/object&gt;
+			&lt;/object&gt;
 		&lt;/object&gt;
 		&lt;int key=&quot;IBDocument.localizationMode&quot;&gt;0&lt;/int&gt;
+		&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;IBDocument.PluginDeclaredDependencies&quot;&gt;
+			&lt;string key=&quot;NS.key.0&quot;&gt;com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS&lt;/string&gt;
+			&lt;integer value=&quot;512&quot; key=&quot;NS.object.0&quot;/&gt;
+		&lt;/object&gt;
+		&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;IBDocument.PluginDeclaredDependencyDefaults&quot;&gt;
+			&lt;string key=&quot;NS.key.0&quot;&gt;com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS&lt;/string&gt;
+			&lt;integer value=&quot;544&quot; key=&quot;NS.object.0&quot;/&gt;
+		&lt;/object&gt;
+		&lt;object class=&quot;NSMutableDictionary&quot; key=&quot;IBDocument.PluginDeclaredDevelopmentDependencies&quot;&gt;
+			&lt;string key=&quot;NS.key.0&quot;&gt;com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3&lt;/string&gt;
+			&lt;integer value=&quot;3000&quot; key=&quot;NS.object.0&quot;/&gt;
+		&lt;/object&gt;
+		&lt;bool key=&quot;IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion&quot;&gt;YES&lt;/bool&gt;
 		&lt;string key=&quot;IBDocument.LastKnownRelativeProjectPath&quot;&gt;rhorunner.xcodeproj&lt;/string&gt;
 		&lt;int key=&quot;IBDocument.defaultPropertyAccessControl&quot;&gt;3&lt;/int&gt;
+		&lt;string key=&quot;IBCocoaTouchPluginVersion&quot;&gt;3.1&lt;/string&gt;
 	&lt;/data&gt;
 &lt;/archive&gt;</diff>
      <filename>platform/iphone/MainWindow.xib</filename>
    </modified>
    <modified>
      <diff>@@ -33,9 +33,14 @@
 		5C7162880F8B7E330096B6AA /* RhoLogSink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C71627F0F8B7E330096B6AA /* RhoLogSink.cpp */; };
 		5C7162890F8B7E330096B6AA /* RhoLogSink.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7162800F8B7E330096B6AA /* RhoLogSink.h */; };
 		5C71628A0F8B7E330096B6AA /* RhoPlainLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C7162810F8B7E330096B6AA /* RhoPlainLog.cpp */; };
+		5C7405921064AF1600163569 /* Tokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C7405901064AF1600163569 /* Tokenizer.cpp */; };
+		5C7405931064AF1600163569 /* Tokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7405911064AF1600163569 /* Tokenizer.h */; };
 		5C98174C0FBC4FCE002597A5 /* AutoPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C9817490FBC4FCE002597A5 /* AutoPointer.h */; };
 		5C98174D0FBC4FCE002597A5 /* InputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C98174A0FBC4FCE002597A5 /* InputStream.h */; };
 		5C98174E0FBC4FCE002597A5 /* irhoclassfactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C98174B0FBC4FCE002597A5 /* irhoclassfactory.h */; };
+		5CBD46291087399700107D0D /* inetrequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CBD46261087399700107D0D /* inetrequest.h */; };
+		5CBD462A1087399700107D0D /* URI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CBD46271087399700107D0D /* URI.cpp */; };
+		5CBD462B1087399700107D0D /* URI.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CBD46281087399700107D0D /* URI.h */; };
 		5CE294121009D8D9009A75F6 /* isysteminfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE294111009D8D9009A75F6 /* isysteminfo.h */; };
 /* End PBXBuildFile section */
 
@@ -66,9 +71,14 @@
 		5C71627F0F8B7E330096B6AA /* RhoLogSink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RhoLogSink.cpp; path = ../../shared/logging/RhoLogSink.cpp; sourceTree = SOURCE_ROOT; };
 		5C7162800F8B7E330096B6AA /* RhoLogSink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RhoLogSink.h; path = ../../shared/logging/RhoLogSink.h; sourceTree = SOURCE_ROOT; };
 		5C7162810F8B7E330096B6AA /* RhoPlainLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RhoPlainLog.cpp; path = ../../shared/logging/RhoPlainLog.cpp; sourceTree = SOURCE_ROOT; };
+		5C7405901064AF1600163569 /* Tokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tokenizer.cpp; path = ../../shared/common/Tokenizer.cpp; sourceTree = SOURCE_ROOT; };
+		5C7405911064AF1600163569 /* Tokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tokenizer.h; path = ../../shared/common/Tokenizer.h; sourceTree = SOURCE_ROOT; };
 		5C9817490FBC4FCE002597A5 /* AutoPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoPointer.h; path = ../../shared/common/AutoPointer.h; sourceTree = SOURCE_ROOT; };
 		5C98174A0FBC4FCE002597A5 /* InputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputStream.h; path = ../../shared/common/InputStream.h; sourceTree = SOURCE_ROOT; };
 		5C98174B0FBC4FCE002597A5 /* irhoclassfactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = irhoclassfactory.h; path = ../../shared/common/irhoclassfactory.h; sourceTree = SOURCE_ROOT; };
+		5CBD46261087399700107D0D /* inetrequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = inetrequest.h; path = ../../shared/net/inetrequest.h; sourceTree = SOURCE_ROOT; };
+		5CBD46271087399700107D0D /* URI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = URI.cpp; path = ../../shared/net/URI.cpp; sourceTree = SOURCE_ROOT; };
+		5CBD46281087399700107D0D /* URI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = URI.h; path = ../../shared/net/URI.h; sourceTree = SOURCE_ROOT; };
 		5CE294111009D8D9009A75F6 /* isysteminfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = isysteminfo.h; path = ../../shared/common/isysteminfo.h; sourceTree = SOURCE_ROOT; };
 		D2AAC046055464E500DB518D /* librholib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = librholib.a; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
@@ -97,6 +107,7 @@
 		08FB7795FE84155DC02AAC07 /* Source */ = {
 			isa = PBXGroup;
 			children = (
+				5CBD46251087397B00107D0D /* net */,
 				5C6B45280F9468C5003CB43A /* statistic */,
 				5C7162600F8B7DEE0096B6AA /* common */,
 				5C7162630F8B7DF40096B6AA /* logging */,
@@ -124,6 +135,8 @@
 		5C7162600F8B7DEE0096B6AA /* common */ = {
 			isa = PBXGroup;
 			children = (
+				5C7405901064AF1600163569 /* Tokenizer.cpp */,
+				5C7405911064AF1600163569 /* Tokenizer.h */,
 				5CE294111009D8D9009A75F6 /* isysteminfo.h */,
 				5C5335500FC2977600F268F0 /* IRhoThreadImpl.h */,
 				5C5335510FC2977600F268F0 /* RhoThread.cpp */,
@@ -163,6 +176,16 @@
 			name = logging;
 			sourceTree = &quot;&lt;group&gt;&quot;;
 		};
+		5CBD46251087397B00107D0D /* net */ = {
+			isa = PBXGroup;
+			children = (
+				5CBD46261087399700107D0D /* inetrequest.h */,
+				5CBD46271087399700107D0D /* URI.cpp */,
+				5CBD46281087399700107D0D /* URI.h */,
+			);
+			name = net;
+			sourceTree = &quot;&lt;group&gt;&quot;;
+		};
 		C6A0FF2B0290797F04C91782 /* Documentation */ = {
 			isa = PBXGroup;
 			children = (
@@ -199,6 +222,9 @@
 				5C5335530FC2977600F268F0 /* IRhoThreadImpl.h in Headers */,
 				5C5335550FC2977600F268F0 /* RhoThread.h in Headers */,
 				5CE294121009D8D9009A75F6 /* isysteminfo.h in Headers */,
+				5C7405931064AF1600163569 /* Tokenizer.h in Headers */,
+				5CBD46291087399700107D0D /* inetrequest.h in Headers */,
+				5CBD462B1087399700107D0D /* URI.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -252,6 +278,8 @@
 				5C6B448C0F946589003CB43A /* RhoConf.cpp in Sources */,
 				5C6B452C0F9468E2003CB43A /* RhoProfiler.cpp in Sources */,
 				5C5335540FC2977600F268F0 /* RhoThread.cpp in Sources */,
+				5C7405921064AF1600163569 /* Tokenizer.cpp in Sources */,
+				5CBD462A1087399700107D0D /* URI.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -301,7 +329,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				PREBINDING = NO;
-				SDKROOT = iphonesimulator2.2.1;
+				SDKROOT = iphonesimulator3.0;
 			};
 			name = Debug;
 		};</diff>
      <filename>platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -21,13 +21,30 @@ def set_app_name(newname)
 
 end
 
+def set_signing_identity(identity,entitlements)
+  fname = $config[&quot;build&quot;][&quot;iphonepath&quot;] + &quot;/rhorunner.xcodeproj/project.pbxproj&quot;
+  buf = &quot;&quot;
+  File.new(fname,&quot;r&quot;).read.each_line do |line|
+      line.gsub!(/CODE_SIGN_ENTITLEMENTS = .*;/,&quot;CODE_SIGN_ENTITLEMENTS = \&quot;#{entitlements}\&quot;;&quot;)
+      line.gsub!(/CODE_SIGN_IDENTITY = .*;/,&quot;CODE_SIGN_IDENTITY = \&quot;#{identity}\&quot;;&quot;)
+      line.gsub!(/&quot;CODE_SIGN_IDENTITY\[sdk=iphoneos\*\]&quot; = .*;/,&quot;\&quot;CODE_SIGN_IDENTITY[sdk=iphoneos*]\&quot; = \&quot;#{identity}\&quot;;&quot;)
+      
+      puts line if line =~ /CODE_SIGN/
+      buf &lt;&lt; line
+  end
+  
+  File.open(fname,&quot;w&quot;) { |f| f.write(buf) }
+
+end
+
+
 namespace &quot;config&quot; do
-  task :iphone =&gt; [&quot;config:common&quot;] do
-    $rubypath = &quot;rhodes/rhodes-build/res/RubyMac&quot; #path to RubyMac
+  task :iphone =&gt; [&quot;config:common&quot;, &quot;switch_app&quot;] do
+    $config[&quot;platform&quot;] = &quot;iphone&quot;
+    $rubypath = &quot;res/build-tools/RubyMac&quot; #path to RubyMac
     iphonepath = $config[&quot;build&quot;][&quot;iphonepath&quot;]
-    $bbver = $config[&quot;env&quot;][&quot;bbver&quot;]
     $builddir = iphonepath + &quot;/rbuild&quot;
-    $bindir = iphonepath + &quot;/bin&quot;
+    $bindir = Jake.get_absolute(iphonepath) + &quot;/bin&quot;
     $srcdir =  $bindir + &quot;/RhoBundle&quot;
     $targetdir = iphonepath + &quot;/target&quot; 
     $excludelib = ['**/builtinME.rb','**/ServeME.rb','**/TestServe.rb']
@@ -38,15 +55,29 @@ namespace &quot;config&quot; do
     $simlink=&quot;#{$homedir}/Library/Application Support/iPhone Simulator/User/Library/Preferences&quot;
     $sim=&quot;/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications&quot;
     $guid=&quot;364FFCAF-C71D-4543-B293-9058E31CFFEE&quot;
-    $applog = File.join($homedir,$config[&quot;env&quot;][&quot;applog&quot;])
+    $applog = File.join($homedir,$app_config[&quot;applog&quot;]) if $app_config[&quot;applog&quot;] 
 
+    if $app_config[&quot;iphone&quot;].nil?
+      $signidentity = $config[&quot;env&quot;][&quot;iphone&quot;][&quot;codesignidentity&quot;]
+      $entitlements = $config[&quot;env&quot;][&quot;iphone&quot;][&quot;entitlements&quot;]
+      $configuration = $config[&quot;env&quot;][&quot;iphone&quot;][&quot;configuration&quot;]
+      $sdk = $config[&quot;env&quot;][&quot;iphone&quot;][&quot;sdk&quot;]
+    else
+      $signidentity = $app_config[&quot;iphone&quot;][&quot;codesignidentity&quot;]
+      $entitlements = $app_config[&quot;iphone&quot;][&quot;entitlements&quot;]
+      $configuration = $app_config[&quot;iphone&quot;][&quot;configuration&quot;]
+      $sdk = $app_config[&quot;iphone&quot;][&quot;sdk&quot;]
+    end
 
+    unless File.exists? $homedir + &quot;/.profile&quot;
+      File.open($homedir + &quot;/.profile&quot;) {|f| f &lt;&lt; &quot;#&quot; }
+    end
   end
 end
 
 namespace &quot;build&quot; do
   namespace &quot;iphone&quot; do
-    desc &quot;Build iphone rhobundle&quot;
+#    desc &quot;Build iphone rhobundle&quot;
     task :rhobundle =&gt; [&quot;config:iphone&quot;] do
       chdir 'platform/iphone'
       rm_rf 'bin'
@@ -59,15 +90,17 @@ namespace &quot;build&quot; do
 
     end
     
-    desc &quot;Build rhodes&quot;
+#    desc &quot;Build rhodes&quot;
     task :rhodes =&gt; [&quot;config:iphone&quot;, &quot;build:iphone:rhobundle&quot;] do
   
-      set_app_name($config[&quot;env&quot;][&quot;appname&quot;]) unless $config[&quot;env&quot;][&quot;appname&quot;].nil?
-      cp $config[&quot;env&quot;][&quot;app&quot;] + &quot;/icon/icon.png&quot;, $config[&quot;build&quot;][&quot;iphonepath&quot;] 
+      set_app_name($app_config[&quot;name&quot;]) unless $app_config[&quot;name&quot;].nil?
+      cp $app_path + &quot;/icon/icon.png&quot;, $config[&quot;build&quot;][&quot;iphonepath&quot;]
+
+      set_signing_identity($signidentity,$entitlements.to_s) if $signidentity.to_s != &quot;&quot;
 
       chdir $config[&quot;build&quot;][&quot;iphonepath&quot;]
-      
-      args = ['build', '-target', 'rhorunner', '-configuration', $config[&quot;env&quot;][&quot;iphone&quot;][&quot;configuration&quot;], '-sdk', $config[&quot;env&quot;][&quot;iphone&quot;][&quot;sdk&quot;]]
+      args = ['build', '-target', 'rhorunner', '-configuration', $configuration, '-sdk', $sdk]
+
       puts Jake.run(&quot;xcodebuild&quot;,args)
       unless $? == 0
         puts &quot;Error cleaning&quot;
@@ -81,16 +114,16 @@ namespace &quot;build&quot; do
 end
 
 namespace &quot;run&quot; do
-  desc &quot;Builds and launches app in simulator&quot;
+  desc &quot;Builds everything, launches iphone simulator&quot;
   task :iphone =&gt; [&quot;config:iphone&quot;, &quot;build:iphone:rhodes&quot;] do
     
-     unless $config[&quot;env&quot;][&quot;iphone&quot;][&quot;sdk&quot;] =~ /^iphonesimulator/
-       puts &quot;SDK must be one of the iphonesimulator sdks&quot;
+     unless $sdk =~ /^iphonesimulator/
+       puts &quot;SDK must be one of the iphonesimulator sdks to run in the iphone simulator&quot;
        exit 1       
      end
      `killall &quot;iPhone Simulator&quot;`
      
-     rhorunner = $config[&quot;build&quot;][&quot;iphonepath&quot;] + &quot;/build/#{$config[&quot;env&quot;][&quot;iphone&quot;][&quot;configuration&quot;]}-iphonesimulator/rhorunner.app&quot;
+     rhorunner = $config[&quot;build&quot;][&quot;iphonepath&quot;] + &quot;/build/#{$configuration}-iphonesimulator/rhorunner.app&quot;
 
      Find.find($simapp) do |path| 
        if File.basename(path) == &quot;rhorunner.app&quot;
@@ -114,17 +147,20 @@ namespace &quot;run&quot; do
      f &lt;&lt; &quot;(version 1)\n(debug deny)\n(allow default)\n&quot;
      f.close
      
+     
      system(&quot;open \&quot;#{$sim}/iPhone Simulator.app\&quot;&quot;)
   end
 end
 
 namespace &quot;clean&quot; do
+  desc &quot;Clean iphone&quot;
+  task :iphone =&gt; [&quot;clean:iphone:all&quot;]
   namespace &quot;iphone&quot; do
-    desc &quot;Clean rhodes binaries&quot;
+#    desc &quot;Clean rhodes binaries&quot;
     task :rhodes =&gt; [&quot;config:iphone&quot;] do 
       chdir $config[&quot;build&quot;][&quot;iphonepath&quot;]
     
-      args = ['clean', '-target', 'rhorunner', '-configuration', $config[&quot;env&quot;][&quot;iphone&quot;][&quot;configuration&quot;], '-sdk', $config[&quot;env&quot;][&quot;iphone&quot;][&quot;sdk&quot;]]
+      args = ['clean', '-target', 'rhorunner', '-configuration', $configuration, '-sdk', $sdk]
       puts Jake.run(&quot;xcodebuild&quot;,args)
       unless $? == 0
         puts &quot;Error cleaning&quot;
@@ -139,9 +175,19 @@ namespace &quot;clean&quot; do
     
     end
     
-    desc &quot;Clean rhobundle&quot;
+#    desc &quot;Clean rhobundle&quot;
     task :rhobundle =&gt; [&quot;config:iphone&quot;] do
       rm_rf $bindir
     end
+
+    task :all =&gt; [&quot;clean:iphone:rhodes&quot;, &quot;clean:iphone:rhobundle&quot;]
   end
 end
+
+namespace &quot;device&quot; do
+  namespace &quot;iphone&quot; do
+    desc &quot;Builds and signs iphone for production&quot;
+    task :production =&gt; [&quot;config:iphone&quot;, &quot;build:iphone:rhodes&quot;]
+  end
+
+end
\ No newline at end of file</diff>
      <filename>platform/iphone/rbuild/iphone.rake</filename>
    </modified>
    <modified>
      <diff>@@ -186,7 +186,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				OTHER_LDFLAGS = &quot;-ObjC&quot;;
 				PREBINDING = NO;
-				SDKROOT = iphonesimulator2.2.1;
+				SDKROOT = iphonesimulator3.0;
 				SYMROOT = ../build;
 				USER_HEADER_SEARCH_PATHS = &quot;../../shared/ ../../shared/syncengine ../../shared/logging ../../shared/common ../../shared/ruby ../../shared/ruby/include ../../shared/ruby/iphone&quot;;
 			};</diff>
      <filename>platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -110,6 +110,7 @@
 		F5E362FF0EB79F0200226287 /* miniprelude.c in Sources */ = {isa = PBXBuildFile; fileRef = F5E362FE0EB79F0200226287 /* miniprelude.c */; };
 		F5E363050EB79F8400226287 /* lgamma_r.c in Sources */ = {isa = PBXBuildFile; fileRef = F5E363040EB79F8400226287 /* lgamma_r.c */; };
 		F5E363080EB7A0DB00226287 /* newline.c in Sources */ = {isa = PBXBuildFile; fileRef = F5E363070EB7A0DB00226287 /* newline.c */; };
+		F5FD0A3D10619E7900B7B8ED /* mapview_wrap.c in Sources */ = {isa = PBXBuildFile; fileRef = F5FD0A3C10619E7900B7B8ED /* mapview_wrap.c */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -217,6 +218,7 @@
 		F5E362FE0EB79F0200226287 /* miniprelude.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = miniprelude.c; path = ../../shared/ruby/miniprelude.c; sourceTree = SOURCE_ROOT; };
 		F5E363040EB79F8400226287 /* lgamma_r.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lgamma_r.c; path = ../../shared/ruby/missing/lgamma_r.c; sourceTree = SOURCE_ROOT; };
 		F5E363070EB7A0DB00226287 /* newline.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = newline.c; path = ../../shared/ruby/newline.c; sourceTree = SOURCE_ROOT; };
+		F5FD0A3C10619E7900B7B8ED /* mapview_wrap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mapview_wrap.c; path = ../../shared/ruby/ext/mapview/mapview_wrap.c; sourceTree = SOURCE_ROOT; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -435,6 +437,7 @@
 		F5E360B00EB6A63B00226287 /* ext */ = {
 			isa = PBXGroup;
 			children = (
+				F5FD0A3910619E5300B7B8ED /* mapview */,
 				46AF502B103DE480006E02E1 /* nativebar */,
 				46056D131031DC7E00C21967 /* datetimepicker */,
 				46A4ABBC101A25DD00AF74C7 /* rhoconf */,
@@ -529,6 +532,14 @@
 			name = ruby;
 			sourceTree = &quot;&lt;group&gt;&quot;;
 		};
+		F5FD0A3910619E5300B7B8ED /* mapview */ = {
+			isa = PBXGroup;
+			children = (
+				F5FD0A3C10619E7900B7B8ED /* mapview_wrap.c */,
+			);
+			name = mapview;
+			sourceTree = &quot;&lt;group&gt;&quot;;
+		};
 /* End PBXGroup section */
 
 /* Begin PBXHeadersBuildPhase section */
@@ -684,6 +695,7 @@
 				46A4ABC0101A25DD00AF74C7 /* rhoconf_wrap.c in Sources */,
 				46056D171031DC7E00C21967 /* datetimepicker_wrap.c in Sources */,
 				46AF502F103DE480006E02E1 /* nativebar_wrap.c in Sources */,
+				F5FD0A3D10619E7900B7B8ED /* mapview_wrap.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -745,7 +757,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				PREBINDING = NO;
-				SDKROOT = iphoneos2.2.1;
+				SDKROOT = iphonesimulator3.0;
 				SYMROOT = ../build;
 			};
 			name = Debug;</diff>
      <filename>platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -20,12 +20,14 @@
 		28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
 		46056D221031EDA900C21967 /* DateTimePickerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 46056D211031EDA900C21967 /* DateTimePickerDelegate.m */; };
 		461B5A880F82D89700B08CB9 /* gears.png in Resources */ = {isa = PBXBuildFile; fileRef = 461B5A870F82D89700B08CB9 /* gears.png */; };
+		463577BF107272A400BEC653 /* JSString.m in Sources */ = {isa = PBXBuildFile; fileRef = 463577BE107272A400BEC653 /* JSString.m */; };
 		4640FE950F410A3400B7975E /* back_btn.png in Resources */ = {isa = PBXBuildFile; fileRef = 4640FE930F410A3400B7975E /* back_btn.png */; };
 		4640FE960F410A3400B7975E /* forward_btn.png in Resources */ = {isa = PBXBuildFile; fileRef = 4640FE940F410A3400B7975E /* forward_btn.png */; };
 		466B0FCD0F3CFA9400A52314 /* home_btn.png in Resources */ = {isa = PBXBuildFile; fileRef = 466B0FCB0F3CFA9400A52314 /* home_btn.png */; };
 		4678FCA90F8185920054340C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4678FCA80F8185920054340C /* SystemConfiguration.framework */; };
 		467E716E0EB673F000E5958D /* lib in Resources */ = {isa = PBXBuildFile; fileRef = 467E713F0EB673F000E5958D /* lib */; };
 		467E71720EB6740400E5958D /* db in Resources */ = {isa = PBXBuildFile; fileRef = 467E716F0EB6740400E5958D /* db */; };
+		468276F010713FD600ADBCD4 /* WebViewUrl.m in Sources */ = {isa = PBXBuildFile; fileRef = 468276EF10713FD600ADBCD4 /* WebViewUrl.m */; };
 		4684391210445A810019C7F0 /* BarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4684391110445A810019C7F0 /* BarItem.m */; };
 		468E57421035DBC100A2293C /* TabBarDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 468E57411035DBC100A2293C /* TabBarDelegate.m */; };
 		46AF5163103F150D006E02E1 /* NativeBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 46AF5162103F150D006E02E1 /* NativeBar.m */; };
@@ -34,11 +36,14 @@
 		46B007071033776600D0C2F4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46B007061033776600D0C2F4 /* CoreGraphics.framework */; };
 		46C25E3B103240A400A26428 /* RhoDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 46C25E3A103240A400A26428 /* RhoDelegate.m */; };
 		46C744690EAFA99D00CC76F1 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 46C744680EAFA99D00CC76F1 /* icon.png */; };
-		46E9DE330FC3577B00726D6B /* JSString.m in Sources */ = {isa = PBXBuildFile; fileRef = 46E9DE320FC3577B00726D6B /* JSString.m */; };
 		5C53337A0FC1B20000F268F0 /* NetRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C5333770FC1B20000F268F0 /* NetRequest.cpp */; };
 		5C53337B0FC1B20000F268F0 /* NetRequestImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C5333790FC1B20000F268F0 /* NetRequestImpl.m */; };
 		5C53354C0FC2974D00F268F0 /* RhoThreadImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C53354A0FC2974D00F268F0 /* RhoThreadImpl.cpp */; };
 		5C5335C60FC2F44500F268F0 /* RhoClassFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C5335C40FC2F44500F268F0 /* RhoClassFactory.cpp */; };
+		BDE35A7A107F900A009941C7 /* RhoFileImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = BDE35A79107F900A009941C7 /* RhoFileImpl.m */; };
+		BDE35AB9107F977D009941C7 /* RhoFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDE35AB7107F977D009941C7 /* RhoFile.cpp */; };
+		F5128ADD1069752F002F00E5 /* MapAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = F5128ADC1069752F002F00E5 /* MapAnnotation.m */; };
+		F5128C2C106C1FF3002F00E5 /* GoogleGeocoder.m in Sources */ = {isa = PBXBuildFile; fileRef = F5128C2B106C1FF3002F00E5 /* GoogleGeocoder.m */; };
 		F51668E00FFD5F740079F023 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F51668DF0FFD5F740079F023 /* AudioToolbox.framework */; };
 		F51669600FFD78770079F023 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F516695F0FFD78770079F023 /* AVFoundation.framework */; };
 		F52181130F96B13500B7F974 /* LogViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F52181120F96B13500B7F974 /* LogViewController.m */; };
@@ -56,6 +61,7 @@
 		F5B8FAD40F44EA7B00C9AF85 /* PickImageDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F5B8FAD30F44EA7B00C9AF85 /* PickImageDelegate.m */; };
 		F5C106500E917D2A0049A94A /* Dispatcher.c in Sources */ = {isa = PBXBuildFile; fileRef = F5C1064F0E917D2A0049A94A /* Dispatcher.c */; };
 		F5F06668102CB134006CFD39 /* ParamsWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = F5F06667102CB134006CFD39 /* ParamsWrapper.m */; };
+		F5FD0944106151C200B7B8ED /* MapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5FD0943106151C200B7B8ED /* MapViewController.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -155,12 +161,16 @@
 		46056D201031EDA900C21967 /* DateTimePickerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateTimePickerDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		46056D211031EDA900C21967 /* DateTimePickerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateTimePickerDelegate.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		461B5A870F82D89700B08CB9 /* gears.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gears.png; sourceTree = SOURCE_ROOT; };
+		463577BD107272A400BEC653 /* JSString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSString.h; path = Classes/JSString.h; sourceTree = SOURCE_ROOT; };
+		463577BE107272A400BEC653 /* JSString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JSString.m; path = Classes/JSString.m; sourceTree = SOURCE_ROOT; };
 		4640FE930F410A3400B7975E /* back_btn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = back_btn.png; sourceTree = &quot;&lt;group&gt;&quot;; };
 		4640FE940F410A3400B7975E /* forward_btn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = forward_btn.png; sourceTree = &quot;&lt;group&gt;&quot;; };
 		466B0FCB0F3CFA9400A52314 /* home_btn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = home_btn.png; sourceTree = &quot;&lt;group&gt;&quot;; };
 		4678FCA80F8185920054340C /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = ../../../../../../../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SOURCE_ROOT; };
 		467E713F0EB673F000E5958D /* lib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = lib; path = bin/RhoBundle/lib; sourceTree = &quot;&lt;group&gt;&quot;; };
 		467E716F0EB6740400E5958D /* db */ = {isa = PBXFileReference; lastKnownFileType = folder; name = db; path = bin/RhoBundle/db; sourceTree = &quot;&lt;group&gt;&quot;; };
+		468276EE10713FD600ADBCD4 /* WebViewUrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebViewUrl.h; path = Server/WebViewUrl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		468276EF10713FD600ADBCD4 /* WebViewUrl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebViewUrl.m; path = Server/WebViewUrl.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		4684391010445A810019C7F0 /* BarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BarItem.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		4684391110445A810019C7F0 /* BarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BarItem.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		468E57401035DBC100A2293C /* TabBarDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TabBarDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
@@ -174,8 +184,6 @@
 		46C25E39103240A400A26428 /* RhoDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RhoDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		46C25E3A103240A400A26428 /* RhoDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RhoDelegate.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		46C744680EAFA99D00CC76F1 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = SOURCE_ROOT; };
-		46E9DE310FC3577B00726D6B /* JSString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSString.h; path = ../JSString.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		46E9DE320FC3577B00726D6B /* JSString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JSString.m; path = ../JSString.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		5C1256870F7CEA9200C87274 /* tcmalloc.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = &quot;wrapper.pb-project&quot;; name = tcmalloc.xcodeproj; path = tcmalloc/tcmalloc.xcodeproj; sourceTree = &quot;&lt;group&gt;&quot;; };
 		5C5333770FC1B20000F268F0 /* NetRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetRequest.cpp; path = rho/net/NetRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
 		5C5333780FC1B20000F268F0 /* NetRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetRequest.h; path = rho/net/NetRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
@@ -187,6 +195,13 @@
 		5C7162920F8B7EEC0096B6AA /* RhoLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = &quot;wrapper.pb-project&quot;; name = RhoLib.xcodeproj; path = RhoLib/RhoLib.xcodeproj; sourceTree = &quot;&lt;group&gt;&quot;; };
 		5CE293FF1009D74F009A75F6 /* SystemInfoImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemInfoImpl.h; path = rho/common/SystemInfoImpl.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = &quot;&lt;group&gt;&quot;; };
+		BDE35A79107F900A009941C7 /* RhoFileImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RhoFileImpl.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		BDE35AB7107F977D009941C7 /* RhoFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RhoFile.cpp; path = ../shared/common/RhoFile.cpp; sourceTree = SOURCE_ROOT; };
+		BDE35AB8107F977D009941C7 /* RhoFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RhoFile.h; path = ../shared/common/RhoFile.h; sourceTree = SOURCE_ROOT; };
+		F5128ADB1069752F002F00E5 /* MapAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MapAnnotation.h; path = MapView/MapAnnotation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		F5128ADC1069752F002F00E5 /* MapAnnotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MapAnnotation.m; path = MapView/MapAnnotation.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		F5128C2A106C1FF3002F00E5 /* GoogleGeocoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GoogleGeocoder.h; path = Classes/MapView/GoogleGeocoder.h; sourceTree = SOURCE_ROOT; };
+		F5128C2B106C1FF3002F00E5 /* GoogleGeocoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GoogleGeocoder.m; path = Classes/MapView/GoogleGeocoder.m; sourceTree = SOURCE_ROOT; };
 		F51668DF0FFD5F740079F023 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		F516695F0FFD78770079F023 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
 		F52181110F96B13500B7F974 /* LogViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogViewController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
@@ -218,6 +233,8 @@
 		F5F0648C102B946F006CFD39 /* rhoextlib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = &quot;wrapper.pb-project&quot;; name = rhoextlib.xcodeproj; path = rhoextlib/rhoextlib.xcodeproj; sourceTree = SOURCE_ROOT; };
 		F5F06666102CB134006CFD39 /* ParamsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParamsWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		F5F06667102CB134006CFD39 /* ParamsWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ParamsWrapper.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		F5FD0942106151C200B7B8ED /* MapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MapViewController.h; path = MapView/MapViewController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		F5FD0943106151C200B7B8ED /* MapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MapViewController.m; path = MapView/MapViewController.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -244,8 +261,8 @@
 		05377CEE0E74D6CB003B8BD1 /* Server */ = {
 			isa = PBXGroup;
 			children = (
-				46E9DE310FC3577B00726D6B /* JSString.h */,
-				46E9DE320FC3577B00726D6B /* JSString.m */,
+				463577BD107272A400BEC653 /* JSString.h */,
+				463577BE107272A400BEC653 /* JSString.m */,
 				05CF724F0E7B16F800D41986 /* HttpMessage.h */,
 				05CF724E0E7B16F800D41986 /* HttpMessage.c */,
 				05CF70E90E78B14D00D41986 /* ServerHost.h */,
@@ -255,6 +272,8 @@
 				05377CEB0E74D6C0003B8BD1 /* Server.h */,
 				05377CEA0E74D6C0003B8BD1 /* Server.c */,
 				05CF72930E7F2EAC00D41986 /* defs.h */,
+				468276EE10713FD600ADBCD4 /* WebViewUrl.h */,
+				468276EF10713FD600ADBCD4 /* WebViewUrl.m */,
 			);
 			name = Server;
 			sourceTree = &quot;&lt;group&gt;&quot;;
@@ -262,6 +281,7 @@
 		080E96DDFE201D6D7F000001 /* Classes */ = {
 			isa = PBXGroup;
 			children = (
+				F5425BCD1060539A000CCA8C /* MapView */,
 				468E573F1035DBA600A2293C /* NativeBar */,
 				46056CEE1031CFB700C21967 /* DateTimePicker */,
 				5C5332610FBD6AC700F268F0 /* rho */,
@@ -415,11 +435,14 @@
 		5C5335490FC2973900F268F0 /* common */ = {
 			isa = PBXGroup;
 			children = (
+				BDE35AB7107F977D009941C7 /* RhoFile.cpp */,
+				BDE35AB8107F977D009941C7 /* RhoFile.h */,
 				5CE293FF1009D74F009A75F6 /* SystemInfoImpl.h */,
 				5C5335C40FC2F44500F268F0 /* RhoClassFactory.cpp */,
 				5C5335C50FC2F44500F268F0 /* RhoClassFactory.h */,
 				5C53354A0FC2974D00F268F0 /* RhoThreadImpl.cpp */,
 				5C53354B0FC2974D00F268F0 /* RhoThreadImpl.h */,
+				BDE35A79107F900A009941C7 /* RhoFileImpl.m */,
 			);
 			name = common;
 			sourceTree = &quot;&lt;group&gt;&quot;;
@@ -432,6 +455,19 @@
 			name = Products;
 			sourceTree = &quot;&lt;group&gt;&quot;;
 		};
+		F5425BCD1060539A000CCA8C /* MapView */ = {
+			isa = PBXGroup;
+			children = (
+				F5128C2A106C1FF3002F00E5 /* GoogleGeocoder.h */,
+				F5128C2B106C1FF3002F00E5 /* GoogleGeocoder.m */,
+				F5FD0942106151C200B7B8ED /* MapViewController.h */,
+				F5FD0943106151C200B7B8ED /* MapViewController.m */,
+				F5128ADB1069752F002F00E5 /* MapAnnotation.h */,
+				F5128ADC1069752F002F00E5 /* MapAnnotation.m */,
+			);
+			name = MapView;
+			sourceTree = &quot;&lt;group&gt;&quot;;
+		};
 		F547F3D10F9CEB05007C2CD2 /* Log */ = {
 			isa = PBXGroup;
 			children = (
@@ -708,7 +744,6 @@
 				5C53337B0FC1B20000F268F0 /* NetRequestImpl.m in Sources */,
 				5C53354C0FC2974D00F268F0 /* RhoThreadImpl.cpp in Sources */,
 				5C5335C60FC2F44500F268F0 /* RhoClassFactory.cpp in Sources */,
-				46E9DE330FC3577B00726D6B /* JSString.m in Sources */,
 				F5F06668102CB134006CFD39 /* ParamsWrapper.m in Sources */,
 				46056D221031EDA900C21967 /* DateTimePickerDelegate.m in Sources */,
 				46C25E3B103240A400A26428 /* RhoDelegate.m in Sources */,
@@ -716,6 +751,13 @@
 				468E57421035DBC100A2293C /* TabBarDelegate.m in Sources */,
 				46AF5163103F150D006E02E1 /* NativeBar.m in Sources */,
 				4684391210445A810019C7F0 /* BarItem.m in Sources */,
+				F5FD0944106151C200B7B8ED /* MapViewController.m in Sources */,
+				F5128ADD1069752F002F00E5 /* MapAnnotation.m in Sources */,
+				F5128C2C106C1FF3002F00E5 /* GoogleGeocoder.m in Sources */,
+				468276F010713FD600ADBCD4 /* WebViewUrl.m in Sources */,
+				463577BF107272A400BEC653 /* JSString.m in Sources */,
+				BDE35A7A107F900A009941C7 /* RhoFileImpl.m in Sources */,
+				BDE35AB9107F977D009941C7 /* RhoFile.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -773,6 +815,28 @@
 					&quot;-lrholib&quot;,
 					&quot;-lrhoextlib&quot;,
 				);
+				&quot;OTHER_LDFLAGS[sdk=iphoneos3.0][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
+				&quot;OTHER_LDFLAGS[sdk=iphoneos3.1][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
 				&quot;OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]&quot; = (
 					&quot;-framework&quot;,
 					CFNetwork,
@@ -782,10 +846,32 @@
 					&quot;-lrholib&quot;,
 					&quot;-lrhoextlib&quot;,
 				);
+				&quot;OTHER_LDFLAGS[sdk=iphonesimulator3.0][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
+				&quot;OTHER_LDFLAGS[sdk=iphonesimulator3.1][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
 				PRODUCT_NAME = rhorunner;
 				PROVISIONING_PROFILE = &quot;&quot;;
 				&quot;PROVISIONING_PROFILE[sdk=iphoneos*]&quot; = &quot;&quot;;
-				SDKROOT = iphoneos2.2.1;
+				SDKROOT = iphoneos3.0;
 				STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic;
 				USER_HEADER_SEARCH_PATHS = &quot;../shared/ ../shared/syncengine ../shared/logging ../shared/common rhoextlib&quot;;
 			};
@@ -795,7 +881,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
-				&quot;CODE_SIGN_IDENTITY[sdk=iphoneos*]&quot; = &quot;Don't Code Sign&quot;;
+				&quot;CODE_SIGN_IDENTITY[sdk=iphoneos*]&quot; = &quot;iPhone Developer: Lars Burgess&quot;;
 				COPY_PHASE_STRIP = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = rhorunner_Prefix.pch;
@@ -822,7 +908,7 @@
 					&quot;-lrhoextlib&quot;,
 				);
 				PRODUCT_NAME = rhorunner;
-				&quot;PROVISIONING_PROFILE[sdk=iphoneos*]&quot; = &quot;&quot;;
+				&quot;PROVISIONING_PROFILE[sdk=iphoneos*]&quot; = &quot;E302C486-8C38-4E23-B945-196D8B2BA5B9&quot;;
 				SDKROOT = iphoneos2.2.1;
 				USER_HEADER_SEARCH_PATHS = &quot;../shared/ ../shared/syncengine ../shared/logging ../shared/common rhoextlib&quot;;
 			};
@@ -846,6 +932,28 @@
 					&quot;-lrholib&quot;,
 					&quot;-lrhoextlib&quot;,
 				);
+				&quot;OTHER_LDFLAGS[sdk=iphoneos3.0][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
+				&quot;OTHER_LDFLAGS[sdk=iphoneos3.1][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
 				&quot;OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]&quot; = (
 					&quot;-framework&quot;,
 					CFNetwork,
@@ -855,6 +963,28 @@
 					&quot;-lrholib&quot;,
 					&quot;-lrhoextlib&quot;,
 				);
+				&quot;OTHER_LDFLAGS[sdk=iphonesimulator3.0][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
+				&quot;OTHER_LDFLAGS[sdk=iphonesimulator3.1][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
 				PREBINDING = NO;
 				&quot;PROVISIONING_PROFILE[sdk=iphoneos*]&quot; = &quot;&quot;;
 				SDKROOT = iphoneos2.0;
@@ -867,6 +997,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CODE_SIGN_ENTITLEMENTS = Entitlements.plist;
+				CODE_SIGN_IDENTITY = &quot;Don't Code Sign&quot;;
 				&quot;CODE_SIGN_IDENTITY[sdk=iphoneos*]&quot; = &quot;Don't Code Sign&quot;;
 				COPY_PHASE_STRIP = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -876,15 +1007,48 @@
 				&quot;OTHER_LDFLAGS[sdk=iphoneos*][arch=*]&quot; = (
 					&quot;-framework&quot;,
 					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
+				&quot;OTHER_LDFLAGS[sdk=iphoneos3.0][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
+				&quot;OTHER_LDFLAGS[sdk=iphoneos3.1][arch=*]&quot; = (
 					&quot;-framework&quot;,
-					CoreGraphics,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
 					&quot;-lrhorubylib&quot;,
 					&quot;-lrhosynclib&quot;,
 					&quot;-ltcmalloc&quot;,
 					&quot;-lrholib&quot;,
 					&quot;-lrhoextlib&quot;,
 				);
-				&quot;OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]&quot; = (
+				&quot;OTHER_LDFLAGS[sdk=iphonesimulator3.0][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
+					&quot;-framework&quot;,
+					CFNetwork,
+					&quot;-lrhorubylib&quot;,
+					&quot;-lrhosynclib&quot;,
+					&quot;-ltcmalloc&quot;,
+					&quot;-lrholib&quot;,
+					&quot;-lrhoextlib&quot;,
+				);
+				&quot;OTHER_LDFLAGS[sdk=iphonesimulator3.1][arch=*]&quot; = (
+					&quot;-framework&quot;,
+					MapKit,
 					&quot;-framework&quot;,
 					CFNetwork,
 					&quot;-lrhorubylib&quot;,
@@ -894,6 +1058,7 @@
 					&quot;-lrhoextlib&quot;,
 				);
 				PRODUCT_NAME = rhorunner;
+				PROVISIONING_PROFILE = &quot;&quot;;
 				&quot;PROVISIONING_PROFILE[sdk=iphoneos*]&quot; = &quot;&quot;;
 				SDKROOT = iphoneos2.2.1;
 				USER_HEADER_SEARCH_PATHS = &quot;../shared/ ../shared/syncengine ../shared/logging ../shared/common rhoextlib&quot;;
@@ -938,7 +1103,7 @@
 				PREBINDING = NO;
 				PROVISIONING_PROFILE = &quot;&quot;;
 				&quot;PROVISIONING_PROFILE[sdk=iphoneos*]&quot; = &quot;&quot;;
-				SDKROOT = iphoneos2.2.1;
+				SDKROOT = iphonesimulator3.0;
 				STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic;
 				SYMROOT = build;
 				USER_HEADER_SEARCH_PATHS = &quot;../shared/ ../shared/syncengine ../shared/logging ../shared/common rhoextlib&quot;;</diff>
      <filename>platform/iphone/rhorunner.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,10 @@
 		46E9214D0E9BF40A00F14AC8 /* printbuf.h in Headers */ = {isa = PBXBuildFile; fileRef = 46E9213B0E9BF40A00F14AC8 /* printbuf.h */; };
 		5C5335AC0FC2F3AB00F268F0 /* syncthread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C5335AA0FC2F3AB00F268F0 /* syncthread.cpp */; };
 		5C5335AD0FC2F3AB00F268F0 /* syncthread.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C5335AB0FC2F3AB00F268F0 /* syncthread.h */; };
+		5C74058A1064AA4900163569 /* DBAttrManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C7405881064AA4900163569 /* DBAttrManager.cpp */; };
+		5C74058B1064AA4900163569 /* DBAttrManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7405891064AA4900163569 /* DBAttrManager.h */; };
+		5C7405F2106CF7F400163569 /* SyncNotify.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C7405F0106CF7F400163569 /* SyncNotify.cpp */; };
+		5C7405F3106CF7F400163569 /* SyncNotify.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7405F1106CF7F400163569 /* SyncNotify.h */; };
 		5C9817230FBC4F20002597A5 /* JSONIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C9817210FBC4F20002597A5 /* JSONIterator.cpp */; };
 		5C9817240FBC4F20002597A5 /* JSONIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C9817220FBC4F20002597A5 /* JSONIterator.h */; };
 		5C98172A0FBC4F41002597A5 /* SyncEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C9817260FBC4F41002597A5 /* SyncEngine.cpp */; };
@@ -65,6 +69,10 @@
 		46E9213B0E9BF40A00F14AC8 /* printbuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = printbuf.h; path = ../../shared/json/printbuf.h; sourceTree = SOURCE_ROOT; };
 		5C5335AA0FC2F3AB00F268F0 /* syncthread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = syncthread.cpp; path = ../../shared/sync/syncthread.cpp; sourceTree = SOURCE_ROOT; };
 		5C5335AB0FC2F3AB00F268F0 /* syncthread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = syncthread.h; path = ../../shared/sync/syncthread.h; sourceTree = SOURCE_ROOT; };
+		5C7405881064AA4900163569 /* DBAttrManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DBAttrManager.cpp; path = ../../shared/db/DBAttrManager.cpp; sourceTree = SOURCE_ROOT; };
+		5C7405891064AA4900163569 /* DBAttrManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DBAttrManager.h; path = ../../shared/db/DBAttrManager.h; sourceTree = SOURCE_ROOT; };
+		5C7405F0106CF7F400163569 /* SyncNotify.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SyncNotify.cpp; path = ../../shared/sync/SyncNotify.cpp; sourceTree = SOURCE_ROOT; };
+		5C7405F1106CF7F400163569 /* SyncNotify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SyncNotify.h; path = ../../shared/sync/SyncNotify.h; sourceTree = SOURCE_ROOT; };
 		5C9817210FBC4F20002597A5 /* JSONIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSONIterator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
 		5C9817220FBC4F20002597A5 /* JSONIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONIterator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		5C9817260FBC4F41002597A5 /* SyncEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SyncEngine.cpp; path = ../../shared/sync/SyncEngine.cpp; sourceTree = SOURCE_ROOT; };
@@ -153,6 +161,8 @@
 		5C9817250FBC4F27002597A5 /* sync */ = {
 			isa = PBXGroup;
 			children = (
+				5C7405F0106CF7F400163569 /* SyncNotify.cpp */,
+				5C7405F1106CF7F400163569 /* SyncNotify.h */,
 				5CE294091009D8B7009A75F6 /* ClientRegister.cpp */,
 				5CE2940A1009D8B7009A75F6 /* ClientRegister.h */,
 				5C5335AA0FC2F3AB00F268F0 /* syncthread.cpp */,
@@ -168,6 +178,8 @@
 		5C98172E0FBC4F53002597A5 /* db */ = {
 			isa = PBXGroup;
 			children = (
+				5C7405881064AA4900163569 /* DBAttrManager.cpp */,
+				5C7405891064AA4900163569 /* DBAttrManager.h */,
 				5C98172F0FBC4F70002597A5 /* DBAdapter.cpp */,
 				5C9817300FBC4F70002597A5 /* DBAdapter.h */,
 				5C9817310FBC4F70002597A5 /* DBResult.cpp */,
@@ -208,6 +220,8 @@
 				5C9817360FBC4F70002597A5 /* DBResult.h in Headers */,
 				5C5335AD0FC2F3AB00F268F0 /* syncthread.h in Headers */,
 				5CE2940C1009D8B7009A75F6 /* ClientRegister.h in Headers */,
+				5C74058B1064AA4900163569 /* DBAttrManager.h in Headers */,
+				5C7405F3106CF7F400163569 /* SyncNotify.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -267,6 +281,8 @@
 				5C9817350FBC4F70002597A5 /* DBResult.cpp in Sources */,
 				5C5335AC0FC2F3AB00F268F0 /* syncthread.cpp in Sources */,
 				5CE2940B1009D8B7009A75F6 /* ClientRegister.cpp in Sources */,
+				5C74058A1064AA4900163569 /* DBAttrManager.cpp in Sources */,
+				5C7405F2106CF7F400163569 /* SyncNotify.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -312,7 +328,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				PREBINDING = NO;
-				SDKROOT = iphonesimulator2.2.1;
+				SDKROOT = iphonesimulator3.0;
 				SYMROOT = ../build;
 			};
 			name = Debug;</diff>
      <filename>platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -321,7 +321,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				PREBINDING = NO;
-				SDKROOT = iphoneos2.2.1;
+				SDKROOT = iphonesimulator3.0;
 			};
 			name = Debug;
 		};</diff>
      <filename>platform/iphone/tcmalloc/tcmalloc.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -111,6 +111,17 @@ String RhoSettings::getString(const char* szName){
     return String();
 }
 
+String RhoSettings::getPath(const char* szName){
+    String strPath = getString(szName);
+    if ( strPath.length() == 0 )
+        return strPath;
+
+    if ( strPath.at(strPath.length()-1) != '/' &amp;&amp; strPath.at(strPath.length()-1) != '\\' )
+        strPath += '/';
+
+    return strPath;
+}
+
 int RhoSettings::getInt(const char* szName){
 	std::map&lt;String,String&gt;::iterator it = m_mapValues.find(szName);
 	if ( it != m_mapValues.end() )</diff>
      <filename>platform/shared/common/RhoConf.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -18,6 +18,7 @@ class RhoSettings{
 
 public:
     String getString(const char* szName);
+    String getPath(const char* szName);
     int    getInt(const char* szName);
     bool   getBool(const char* szName);
     void   setString(const char* szName, const String&amp; str);</diff>
      <filename>platform/shared/common/RhoConf.h</filename>
    </modified>
    <modified>
      <diff>@@ -172,6 +172,36 @@ void CRhoFile::deleteFile( const char* szFilePath ){
 #endif
 }
 
+void CRhoFile::deleteFilesInFolder(const char* szFolderPath)
+{
+#if defined(OS_WINDOWS) || defined(OS_WINCE)
+    StringW wFolderName;
+    common::convertToStringW(szFolderPath,wFolderName);
+    StringW wFolderMask = wFolderName + L&quot;/*&quot;;
+
+    WIN32_FIND_DATAW FindFileData;
+    HANDLE hFind = INVALID_HANDLE_VALUE;
+
+    hFind = FindFirstFileW(wFolderMask.c_str(), &amp;FindFileData);
+    if (hFind == INVALID_HANDLE_VALUE) 
+        return;
+
+    while (FindNextFileW(hFind, &amp;FindFileData) != 0) 
+    {
+        if ( FindFileData.dwFileAttributes&amp;FILE_ATTRIBUTE_DIRECTORY )
+            continue;
+
+        StringW wFileName = wFolderName + L&quot;/&quot; + FindFileData.cFileName;
+        DeleteFileW(wFileName.c_str());
+    }
+
+    FindClose(hFind);
+
+#else
+    delete_files_in_folder(szFolderPath);
+#endif
+}
+
 /*static*/ void CRhoFile::renameFile( const char* szOldFilePath, const char* szNewFilePath )
 {
 #if defined(OS_WINDOWS) || defined(OS_WINCE)</diff>
      <filename>platform/shared/common/RhoFile.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -39,6 +39,7 @@ public:
     static bool         isFileExist( const char* szFilePath );
     static void         deleteFile( const char* szFilePath );
     static void         renameFile( const char* szOldFilePath, const char* szNewFilePath );
+    static void         deleteFilesInFolder(const char* szFolderPath);
 private:
     CRhoFile(const CRhoFile&amp;);
     void operator=(const CRhoFile&amp;);
@@ -48,4 +49,6 @@ private:
 }
 }
 
+extern &quot;C&quot; void delete_files_in_folder(const char *szFolderPath);
+
 #endif //_RHOFILE_H_</diff>
      <filename>platform/shared/common/RhoFile.h</filename>
    </modified>
    <modified>
      <diff>@@ -1,61 +1,61 @@
 #ifndef _RHOFILEPATH_H_
 #define _RHOFILEPATH_H_
-
-#include &quot;RhoStd.h&quot;
-
-namespace rho{
-namespace common{
-
-class CFilePath{
-public:
-    CFilePath(const char* path) : m_szPath(path){}
-    CFilePath(const String&amp; str) : m_szPath(str.c_str()){}
-
-    const char* getBaseName(){ 
-        const char* base = findLastSlash();
-        if (base)
-            return base+1;
-
-        return m_szPath;
-    }
-
-    String makeFullPath(const char* szFileName){
-        String res = m_szPath;
-        if ( res.length() &gt; 0 &amp;&amp; !findLastSlash() )
-            res += &quot;/&quot;;
-
-        res += szFileName;
-        
-        return res;
-    }
-
-    String changeBaseName( const char* szFileName )
-    {
-        const char* base = findLastSlash();
-        if ( base &amp;&amp; *(base+1) ){
-            String res( m_szPath, base-m_szPath+1);
-            res += szFileName;
-
-            return res;
-        }
-
-        return makeFullPath(szFileName);
-    }
-
-private:
-
-    const char* findLastSlash(){
+
+#include &quot;RhoStd.h&quot;
+
+namespace rho{
+namespace common{
+
+class CFilePath{
+public:
+    CFilePath(const char* path) : m_szPath(path){}
+    CFilePath(const String&amp; str) : m_szPath(str.c_str()){}
+
+    const char* getBaseName(){ 
+        const char* base = findLastSlash();
+        if (base)
+            return base+1;
+
+        return m_szPath;
+    }
+
+    String makeFullPath(const char* szFileName){
+        String res = m_szPath;
+        if ( res.length() &gt; 0 &amp;&amp; !findLastSlash() )
+            res += &quot;/&quot;;
+
+        res += szFileName;
+        
+        return res;
+    }
+
+    String changeBaseName( const char* szFileName )
+    {
+        const char* base = findLastSlash();
+        if ( base &amp;&amp; *(base+1) ){
+            String res( m_szPath, base-m_szPath+1);
+            res += szFileName;
+
+            return res;
+        }
+
+        return makeFullPath(szFileName);
+    }
+
+private:
+
+    const char* findLastSlash(){
         const char* slash = strrchr(m_szPath, '/');
         if ( !slash )
             slash = strrchr(m_szPath, '\\');
 
         return slash;
-    }
-
-    const char* m_szPath;
-};
-
-}
-}
-
-#endif //_RHOFILEPATH_H_
+    }
+
+    const char* m_szPath;
+};
+
+}
+}
+
+#endif //_RHOFILEPATH_H_</diff>
      <filename>platform/shared/common/RhoFilePath.h</filename>
    </modified>
    <modified>
      <diff>@@ -60,6 +60,8 @@ private:
     void operator=(const CMutexLock&amp;);
 };
 
+#define synchronized(mutex) CMutexLock __lock(mutex);
+
 class CLocalMutexLock {
 public:
     explicit CLocalMutexLock() : m_Mutex() { m_Mutex.Lock(); }</diff>
      <filename>platform/shared/common/RhoMutexLock.h</filename>
    </modified>
    <modified>
      <diff>@@ -97,9 +97,17 @@ public:
         erase(key);
     }
 
-    TVALUE&amp; get(const TKEY&amp; key)
+    TVALUE get(const TKEY&amp; key)
     {
-        return (*this)[key];
+        if ( containsKey(key) )
+            return (*this)[key];
+
+        return TVALUE();
+    }
+
+    boolean containsKey(const TKEY&amp; key)
+    {
+        return find(key) != std::map&lt;TKEY,TVALUE&gt;::end();
     }
 };
 </diff>
      <filename>platform/shared/common/RhoStd.h</filename>
    </modified>
    <modified>
      <diff>@@ -1,164 +1,164 @@
-#ifndef _RHOTIME_H_
-#define _RHOTIME_H_
-
-#include &quot;RhoPort.h&quot;
-
-#if !defined( OS_WINDOWS ) &amp;&amp; !defined(OS_WINCE)
-#include &lt;sys/time.h&gt;
-#endif
-
-namespace rho{
-namespace common{
-
-class CBaseTime{
-public:
-    CBaseTime(){ memset( &amp;m_nativeTime, 0, sizeof(m_nativeTime) ); }
-    CBaseTime(const CBaseTime&amp; time ){ m_nativeTime = time.m_nativeTime; }
-    const CBaseTime&amp; operator=(const CBaseTime&amp; time ){ m_nativeTime = time.m_nativeTime; return *this; }
-
-    void setToCurTime(){
-        time( &amp;m_nativeTime );
-    }
-
-protected:
-    time_t m_nativeTime;
-
-};
-
-class CLocalTime : public CBaseTime{
-public:
-    CLocalTime(){ setToCurTime(); }
-
-    String toString(){ 
-        char timeBuf[22];
-
-        struct tm* locTime = localtime(&amp;m_nativeTime);
-
-        int nSize = sprintf(timeBuf, &quot;%02d/%02d/%04d %02d:%02d:%02d&quot;, locTime-&gt;tm_mon, locTime-&gt;tm_mday, locTime-&gt;tm_year + 1900,
-            locTime-&gt;tm_hour, locTime-&gt;tm_min, locTime-&gt;tm_sec );
-        timeBuf[nSize] = 0;
-        return String(timeBuf); 
-    }
-
-};
-
-class CTimeInterval {
-public:
-    CTimeInterval() : m_nativeTime(0){}
-
-    String toString(){
-        char timeBuf[22];
-
-        int nMin = m_nativeTime/(60*1000);
-        int nSec = (m_nativeTime - nMin*(60*1000))/1000;
-        int mSec = m_nativeTime - nSec*1000 - nMin*(60*1000);
-
-        int nSize = sprintf(timeBuf, &quot;%d:%02d:%03d&quot;, nMin, nSec, mSec );
-        timeBuf[nSize] = 0;
-        return String(timeBuf);
-    }
-
-    unsigned long toULong()
-    {
-        return m_nativeTime;
-    }
-
-    CTimeInterval minus(const CTimeInterval&amp; time)const{
-        CTimeInterval res;
-        res.m_nativeTime = m_nativeTime - time.m_nativeTime;
-        return res;
-    }
-
-    CTimeInterval&amp; operator+=(const CTimeInterval&amp; time){
-        m_nativeTime += time.m_nativeTime;
-        return *this;
-    }
-
-    static CTimeInterval getCurrentTime(){
-        CTimeInterval res;
-
-#if defined( OS_WINDOWS ) || defined(OS_WINCE)
-        res.m_nativeTime = GetTickCount();
-#else
-        struct timeval tv;
-        gettimeofday( &amp;tv, NULL );
-        res.m_nativeTime = (unsigned long)((tv.tv_sec) * 1000 + tv.tv_usec / 1000);
-#endif
-
-        return res;
-    }
-
-    bool isEmpty()const{ return m_nativeTime == 0 ; }
-    
-private:
-	unsigned long m_nativeTime;
-};
-
-inline CTimeInterval operator-(const CTimeInterval&amp; time1, const CTimeInterval&amp; time2){
-    return time1.minus(time2);
-}
-
-#if 0
-class CBaseTime{
-#if defined(OS_WINDOWS) || defined(OS_WINCE) 
-typedef SYSTEMTIME TimeType;
-#else
-#endif
-
-public:
-    CBaseTime(){ memset( &amp;m_nativeTime, 0, sizeof(m_nativeTime) ); }
-/*
-    static int64 getTickCount() {
-        #if defined( OS_WINDOWS ) || defined(OS_WINCE)
-          SYSTEMTIME now;
-          GetSystemTime(&amp;now);
-          return (static_cast&lt;int64&gt;(now.wSecond) * 1000000 +
-                  static_cast&lt;int64&gt;(now.wMilliseconds) * 1000);
-        #else
-          struct timeval tv;
-          gettimeofday(&amp;tv, NULL);
-          return static_cast&lt;int64&gt;(tv.tv_sec) * 1000000 + tv.tv_usec;
-        #endif
-    }
-*/
-    void setToLocalTime(){
-#if defined( OS_WINDOWS ) || defined(OS_WINCE)
-          GetLocalTime(&amp;m_nativeTime);
-#else
-#endif
-    }
-    void setToUTCTime(){
-#if defined( OS_WINDOWS ) || defined(OS_WINCE)
-          GetSystemTime(&amp;m_nativeTime);
-#else
-#endif
-    }
-
-protected:
-
-    TimeType m_nativeTime;
-};
-
-class CLocalTime : public CBaseTime{
-public:
-    CLocalTime(){ setToLocalTime(); }
-
-    String toString(){ 
-        char timeBuf[100];
-
-#if defined( OS_WINDOWS ) || defined(OS_WINCE)
-        sprintf(timeBuf, &quot;%02d/%02d/%04d %02d:%02d:%02d&quot;, m_nativeTime.wMonth, m_nativeTime.wDay, m_nativeTime.wYear,
-            m_nativeTime.wHour, m_nativeTime.wMinute, m_nativeTime.wSecond );
-#else
-#endif
-
-        return String(timeBuf); 
-    }
-
-};
-
-#endif //0
-}
-}
-
-#endif //_RHOFILEPATH_H_
+#ifndef _RHOTIME_H_
+#define _RHOTIME_H_
+
+#include &quot;RhoPort.h&quot;
+
+#if !defined( OS_WINDOWS ) &amp;&amp; !defined(OS_WINCE)
+#include &lt;sys/time.h&gt;
+#endif
+
+namespace rho{
+namespace common{
+
+class CBaseTime{
+public:
+    CBaseTime(){ memset( &amp;m_nativeTime, 0, sizeof(m_nativeTime) ); }
+    CBaseTime(const CBaseTime&amp; time ){ m_nativeTime = time.m_nativeTime; }
+    const CBaseTime&amp; operator=(const CBaseTime&amp; time ){ m_nativeTime = time.m_nativeTime; return *this; }
+
+    void setToCurTime(){
+        time( &amp;m_nativeTime );
+    }
+
+protected:
+    time_t m_nativeTime;
+
+};
+
+class CLocalTime : public CBaseTime{
+public:
+    CLocalTime(){ setToCurTime(); }
+
+    String toString(){ 
+        char timeBuf[22];
+
+        struct tm* locTime = localtime(&amp;m_nativeTime);
+
+        int nSize = sprintf(timeBuf, &quot;%02d/%02d/%04d %02d:%02d:%02d&quot;, locTime-&gt;tm_mon, locTime-&gt;tm_mday, locTime-&gt;tm_year + 1900,
+            locTime-&gt;tm_hour, locTime-&gt;tm_min, locTime-&gt;tm_sec );
+        timeBuf[nSize] = 0;
+        return String(timeBuf); 
+    }
+
+};
+
+class CTimeInterval {
+public:
+    CTimeInterval() : m_nativeTime(0){}
+
+    String toString(){
+        char timeBuf[22];
+
+        int nMin = m_nativeTime/(60*1000);
+        int nSec = (m_nativeTime - nMin*(60*1000))/1000;
+        int mSec = m_nativeTime - nSec*1000 - nMin*(60*1000);
+
+        int nSize = sprintf(timeBuf, &quot;%d:%02d:%03d&quot;, nMin, nSec, mSec );
+        timeBuf[nSize] = 0;
+        return String(timeBuf);
+    }
+
+    unsigned long toULong()
+    {
+        return m_nativeTime;
+    }
+
+    CTimeInterval minus(const CTimeInterval&amp; time)const{
+        CTimeInterval res;
+        res.m_nativeTime = m_nativeTime - time.m_nativeTime;
+        return res;
+    }
+
+    CTimeInterval&amp; operator+=(const CTimeInterval&amp; time){
+        m_nativeTime += time.m_nativeTime;
+        return *this;
+    }
+
+    static CTimeInterval getCurrentTime(){
+        CTimeInterval res;
+
+#if defined( OS_WINDOWS ) || defined(OS_WINCE)
+        res.m_nativeTime = GetTickCount();
+#else
+        struct timeval tv;
+        gettimeofday( &amp;tv, NULL );
+        res.m_nativeTime = (unsigned long)((tv.tv_sec) * 1000 + tv.tv_usec / 1000);
+#endif
+
+        return res;
+    }
+
+    bool isEmpty()const{ return m_nativeTime == 0 ; }
+    
+private:
+	unsigned long m_nativeTime;
+};
+
+inline CTimeInterval operator-(const CTimeInterval&amp; time1, const CTimeInterval&amp; time2){
+    return time1.minus(time2);
+}
+
+#if 0
+class CBaseTime{
+#if defined(OS_WINDOWS) || defined(OS_WINCE) 
+typedef SYSTEMTIME TimeType;
+#else
+#endif
+
+public:
+    CBaseTime(){ memset( &amp;m_nativeTime, 0, sizeof(m_nativeTime) ); }
+/*
+    static int64 getTickCount() {
+        #if defined( OS_WINDOWS ) || defined(OS_WINCE)
+          SYSTEMTIME now;
+          GetSystemTime(&amp;now);
+          return (static_cast&lt;int64&gt;(now.wSecond) * 1000000 +
+                  static_cast&lt;int64&gt;(now.wMilliseconds) * 1000);
+        #else
+          struct timeval tv;
+          gettimeofday(&amp;tv, NULL);
+          return static_cast&lt;int64&gt;(tv.tv_sec) * 1000000 + tv.tv_usec;
+        #endif
+    }
+*/
+    void setToLocalTime(){
+#if defined( OS_WINDOWS ) || defined(OS_WINCE)
+          GetLocalTime(&amp;m_nativeTime);
+#else
+#endif
+    }
+    void setToUTCTime(){
+#if defined( OS_WINDOWS ) || defined(OS_WINCE)
+          GetSystemTime(&amp;m_nativeTime);
+#else
+#endif
+    }
+
+protected:
+
+    TimeType m_nativeTime;
+};
+
+class CLocalTime : public CBaseTime{
+public:
+    CLocalTime(){ setToLocalTime(); }
+
+    String toString(){ 
+        char timeBuf[100];
+
+#if defined( OS_WINDOWS ) || defined(OS_WINCE)
+        sprintf(timeBuf, &quot;%02d/%02d/%04d %02d:%02d:%02d&quot;, m_nativeTime.wMonth, m_nativeTime.wDay, m_nativeTime.wYear,
+            m_nativeTime.wHour, m_nativeTime.wMinute, m_nativeTime.wSecond );
+#else
+#endif
+
+        return String(timeBuf); 
+    }
+
+};
+
+#endif //0
+}
+}
+
+#endif //_RHOFILEPATH_H_</diff>
      <filename>platform/shared/common/RhoTime.h</filename>
    </modified>
    <modified>
      <diff>@@ -109,6 +109,7 @@ CONVERT_TYPE_A( float, &quot;%f&quot; );
 CONVERT_TYPE_A( double, &quot;%f&quot; );
 
 CONVERT_TYPE_A( uint64, &quot;%llu&quot; );
+CONVERT_TYPE_A( int64, &quot;%lli&quot; );
 
 }
 }</diff>
      <filename>platform/shared/common/StringConverter.h</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,9 @@
 #include &quot;DBAdapter.h&quot;
+#include &quot;sync/SyncThread.h&quot;
 
 #include &quot;common/RhoFile.h&quot;
 #include &quot;common/RhoFilePath.h&quot;
+#include &quot;common/RhoConf.h&quot;
 
 extern &quot;C&quot; const char* RhoGetRootPath();
 extern &quot;C&quot; const char* RhoGetRelativeBlobsPath();
@@ -21,7 +23,7 @@ static int onDBBusy(void* data,int nTry)
 void SyncBlob_DeleteCallback(sqlite3_context* dbContext, int nArgs, sqlite3_value** ppArgs)
 {
     char* type = NULL;
-    if ( nArgs &lt; 2 )
+    if ( nArgs &lt; 4 )
         return;
 
     type = (char*)sqlite3_value_text(*(ppArgs+1));
@@ -32,6 +34,16 @@ void SyncBlob_DeleteCallback(sqlite3_context* dbContext, int nArgs, sqlite3_valu
         strFilePath += (char*)sqlite3_value_text(*(ppArgs));
         CRhoFile::deleteFile(strFilePath.c_str());
     }
+
+    sync::CSyncThread::getDBAdapter().getAttrMgr().remove( sqlite3_value_int(*(ppArgs+2)), (char*)sqlite3_value_text(*(ppArgs+3)) );
+}
+
+void SyncBlob_InsertCallback(sqlite3_context* dbContext, int nArgs, sqlite3_value** ppArgs)
+{
+    if ( nArgs &lt; 2 )
+        return;
+
+    sync::CSyncThread::getDBAdapter().getAttrMgr().add( sqlite3_value_int(*(ppArgs)), (char*)sqlite3_value_text(*(ppArgs+1)) );
 }
 
 /*static*/ String CDBAdapter::makeBlobFolderName()
@@ -53,16 +65,36 @@ boolean CDBAdapter::checkDbError(int rc)
     return false;
 }
 
-void CDBAdapter::open (String strDbPath, String strVer)
+boolean CDBAdapter::checkDbErrorEx(int rc, rho::db::CDBResult&amp; res)
+{
+    if ( rc == SQLITE_OK || rc == SQLITE_ROW || rc == SQLITE_DONE )
+        return true;
+
+    const char * szErrMsg = sqlite3_errmsg(m_dbHandle);
+    int nErrCode = sqlite3_errcode(m_dbHandle);
+
+    res.setErrorCode(nErrCode);
+    if ( nErrCode == SQLITE_CONSTRAINT &amp;&amp; res.getReportNonUnique() )
+        return true;
+
+    LOG(ERROR)+&quot;DB query failed. Error code: &quot; + nErrCode + &quot;;Message: &quot; + szErrMsg;
+    return false;
+}
+
+void CDBAdapter::open (String strDbPath, String strVer, boolean bTemp)
 {
     if ( strcasecmp(strDbPath.c_str(),m_strDbPath.c_str() ) == 0 )
         return;
     close();
 
     m_strDbPath = strDbPath;
-    m_strDbVer = strVer;
+    if ( !bTemp )
+    {
+        m_strDbVerPath = strDbPath+&quot;.version&quot;;
+        m_strDbVer = strVer;
 
-    checkVersion(strVer);
+        checkDBVersion(strVer);
+    }
 
     boolean bExist = CRhoFile::isFileExist(strDbPath.c_str());
     int nRes = sqlite3_open(strDbPath.c_str(),&amp;m_dbHandle);
@@ -72,9 +104,76 @@ void CDBAdapter::open (String strDbPath, String strVer)
     if ( !bExist )
         createSchema();
 
-    sqlite3_create_function( m_dbHandle, &quot;rhoOnDeleteObjectRecord&quot;, 3, SQLITE_ANY, 0,
+    sqlite3_create_function( m_dbHandle, &quot;rhoOnDeleteObjectRecord&quot;, 4, SQLITE_ANY, 0,
 	    SyncBlob_DeleteCallback, 0, 0 );
+    sqlite3_create_function( m_dbHandle, &quot;rhoOnInsertObjectRecord&quot;, 2, SQLITE_ANY, 0,
+	    SyncBlob_InsertCallback, 0, 0 );
+
     sqlite3_busy_handler(m_dbHandle, onDBBusy, 0 );
+
+    getAttrMgr().load(*this);
+}
+
+void CDBAdapter::checkDBVersion(String&amp; strRhoDBVer)
+{
+	String strAppDBVer = RHOCONF().getString(&quot;app_db_version&quot;);
+	
+	CDBVersion dbVer = readDBVersion();
+
+	boolean bReset = false;
+	
+	if ( strRhoDBVer.length() &gt; 0 )
+	{
+		if ( dbVer.m_strRhoVer.compare(strRhoDBVer) != 0 )
+			bReset = true;
+	}
+	if ( strAppDBVer.length() &gt; 0 )
+	{
+		if ( dbVer.m_strAppVer.compare(strAppDBVer) != 0 )
+			bReset = true;
+	}
+	
+	if ( bReset )
+	{
+        LOG(INFO) + &quot;Reset database bacause version is changed.&quot;;
+
+        CRhoFile::deleteFile(m_strDbPath.c_str());
+        CRhoFile::deleteFile((m_strDbPath+&quot;-journal&quot;).c_str());
+
+        String strBlobFolderName = makeBlobFolderName();
+        CRhoFile::deleteFilesInFolder(strBlobFolderName.c_str());
+
+        writeDBVersion( CDBVersion(strRhoDBVer, strAppDBVer) );
+	}
+}
+
+CDBAdapter::CDBVersion CDBAdapter::readDBVersion()//throws Exception
+{
+    String strFullVer;
+    CRhoFile oFile;
+    if ( !oFile.open(m_strDbVerPath.c_str(),CRhoFile::OpenReadOnly) )
+        return CDBVersion();
+
+    oFile.readString(strFullVer);
+	
+	if ( strFullVer.length() == 0 )
+		return CDBVersion();
+	
+	int nSep = strFullVer.find(';');
+	if ( nSep == -1 )
+		return CDBVersion(strFullVer, &quot;&quot;);
+	
+	return CDBVersion(strFullVer.substr(0,nSep), strFullVer.substr(nSep+1) );
+}
+
+void CDBAdapter::writeDBVersion(const CDBVersion&amp; ver)//throws Exception
+{
+    String strFullVer = ver.m_strRhoVer + &quot;;&quot; + ver.m_strAppVer;
+    CRhoFile oFile;
+    if ( !oFile.open(m_strDbVerPath.c_str(),CRhoFile::OpenForWrite) )
+        return;
+
+    oFile.write(strFullVer.c_str(), strFullVer.length() );
 }
 
 sqlite3_stmt* CDBAdapter::createInsertStatement(rho::db::CDBResult&amp; res, const String&amp; tableName, CDBAdapter&amp; db, String&amp; strInsert)
@@ -145,14 +244,16 @@ sqlite3_stmt* CDBAdapter::createInsertStatement(rho::db::CDBResult&amp; res, const S
 
 void CDBAdapter::destroy_table(String strTable)
 {
+    getAttrMgr().reset(*this);
     CFilePath oFilePath(m_strDbPath);
 	String dbNewName  = oFilePath.changeBaseName(&quot;resetdbtemp.sqlite&quot;);
 
     CRhoFile::deleteFile(dbNewName.c_str());
     CRhoFile::deleteFile((dbNewName+&quot;-journal&quot;).c_str());
+    CRhoFile::deleteFile((dbNewName+&quot;.version&quot;).c_str());
 
     CDBAdapter db;
-    db.open( dbNewName, m_strDbVer );
+    db.open( dbNewName, m_strDbVer, true );
 
     //Copy all tables
 
@@ -190,14 +291,13 @@ void CDBAdapter::destroy_table(String strTable)
 
     String dbOldName = m_strDbPath;
     close();
+
+    String strBlobFolderName = makeBlobFolderName();
+    CRhoFile::deleteFilesInFolder(strBlobFolderName.c_str());
+
     CRhoFile::deleteFile(dbOldName.c_str());
     CRhoFile::renameFile(dbNewName.c_str(),dbOldName.c_str());
-    open( dbOldName, m_strDbVer );
-}
-
-void CDBAdapter::checkVersion(String&amp; strVer)
-{
-    //TODO: checkVersion
+    open( dbOldName, m_strDbVer, false );
 }
 
 static const char* g_szDbSchema = 
@@ -210,13 +310,21 @@ static const char* g_szDbSchema =
     &quot; last_sync_success VARCHAR(100) default NULL);&quot;
     &quot;CREATE TABLE object_values (&quot;
     &quot; id INTEGER PRIMARY KEY,&quot;
-    &quot; token INTEGER default NULL,&quot;
     &quot; source_id int default NULL,&quot;
     &quot; attrib varchar(255) default NULL,&quot;
     &quot; object varchar(255) default NULL,&quot;
     &quot; value text default NULL,&quot;
-    &quot; update_type varchar(255) default NULL,&quot;
     &quot; attrib_type varchar(255) default NULL);&quot;
+    &quot;CREATE TABLE changed_values (&quot;
+    &quot; id INTEGER PRIMARY KEY,&quot;
+    &quot; source_id int default NULL,&quot;
+    &quot; attrib varchar(255) default NULL,&quot;
+    &quot; object varchar(255) default NULL,&quot;
+    &quot; value text default NULL,&quot;
+    &quot; attrib_type varchar(255) default NULL,&quot;
+    &quot; update_type varchar(255) default NULL,&quot;
+    &quot; sent int default 0,&quot;
+    &quot; main_id INTEGER default 0);&quot;
     &quot;CREATE TABLE sources (&quot;
     &quot; id INTEGER PRIMARY KEY,&quot;
     &quot; token INTEGER default NULL,&quot;
@@ -230,13 +338,21 @@ static const char* g_szDbSchema =
     &quot; last_sync_duration int default 0,&quot;
     &quot; last_sync_success int default 0,&quot;
     &quot; source_attribs varchar default NULL);&quot;
-    &quot;CREATE INDEX by_attrib_utype on object_values (attrib,update_type);&quot;
-    &quot;CREATE INDEX by_src_type ON object_values (source_id, attrib_type, object);&quot;
-    &quot;CREATE INDEX by_src_utype on object_values (source_id,update_type);&quot;
-    &quot;CREATE INDEX by_type ON object_values (attrib_type);&quot;
+    //&quot;CREATE INDEX by_attrib_utype on object_values (attrib,update_type);&quot;
+    //&quot;CREATE INDEX by_src_type ON object_values (source_id, attrib_type, object);&quot;
+    //&quot;CREATE INDEX by_src_utype on object_values (source_id,update_type);&quot;
+    //&quot;CREATE INDEX by_type ON object_values (attrib_type);&quot;
+    &quot;CREATE INDEX by_src_id on object_values (source_id);&quot;
+	&quot;CREATE UNIQUE INDEX by_src_object ON object_values (object, attrib, source_id);&quot;
+    &quot;CREATE INDEX by_src_value ON object_values (attrib, source_id, value);&quot;
     &quot;CREATE TRIGGER rhodeleteTrigger BEFORE DELETE ON object_values FOR EACH ROW &quot;
         &quot;BEGIN &quot;
-            &quot;SELECT rhoOnDeleteObjectRecord(OLD.value,OLD.attrib_type,OLD.update_type);&quot;
+            &quot;SELECT rhoOnDeleteObjectRecord(OLD.value, OLD.attrib_type, OLD.source_id, OLD.attrib );&quot;
+        &quot;END;&quot;
+    &quot;;&quot;
+    &quot;CREATE TRIGGER rhoinsertTrigger AFTER INSERT ON object_values FOR EACH ROW &quot;
+        &quot;BEGIN &quot;
+            &quot;SELECT rhoOnInsertObjectRecord( NEW.source_id, NEW.attrib );&quot;
         &quot;END;&quot;
     &quot;;&quot;;
 
@@ -280,7 +396,7 @@ DBResultPtr CDBAdapter::prepareStatement( const char* szSt )
 	}
 	
     int rc = sqlite3_prepare_v2(m_dbHandle, szSt, -1, &amp;st, NULL);
-    if ( !checkDbError(rc) )
+    if ( !checkDbErrorEx(rc,*res) )
     {
         //TODO: raise exception
         return res;
@@ -309,7 +425,7 @@ DBResultPtr CDBAdapter::executeStatement(DBResultPtr&amp; res)
         res-&gt;setStatement(null);
         if ( rc != SQLITE_OK &amp;&amp; rc != SQLITE_ROW &amp;&amp; rc != SQLITE_DONE )
         {
-            checkDbError(rc);
+            checkDbErrorEx(rc, *res);
             //TODO: raise exception
             return res;
         }
@@ -335,8 +451,10 @@ void CDBAdapter::endTransaction()
 {
     char *zErr = 0;
     int rc = 0;
+
 	if (m_dbHandle)
     {
+        getAttrMgr().save(*this);
 		rc = sqlite3_exec(m_dbHandle, &quot;END;&quot;,0,0,&amp;zErr);
         checkDbError(rc);
     }</diff>
      <filename>platform/shared/db/DBAdapter.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 #pragma once
 
 #include &quot;DBResult.h&quot;
+#include &quot;DBAttrManager.h&quot;
 #include &quot;logging/RhoLog.h&quot;
 
 namespace rho{
@@ -8,13 +9,27 @@ namespace db{
 
 class CDBAdapter
 {
-    String   m_strDbPath, m_strDbVer;
+    String   m_strDbPath, m_strDbVer, m_strDbVerPath;
     sqlite3* m_dbHandle;
     Hashtable&lt;String,sqlite3_stmt*&gt; m_mapStatements;
     common::CMutex m_mxDB;
     common::CMutex m_mxTransDB;
 	boolean m_bInsideTransaction;
     boolean m_bUnlockDB;
+    CDBAttrManager m_attrMgr;
+
+    struct CDBVersion
+    {
+    	String m_strRhoVer;
+    	String m_strAppVer;
+    	
+        CDBVersion(){}
+    	CDBVersion( String strRhoVer, String strAppVer )
+    	{
+    		m_strRhoVer = strRhoVer;
+    		m_strAppVer = strAppVer;
+    	}
+    };
 
 public:
     DEFINE_LOGCLASS;
@@ -22,14 +37,16 @@ public:
     CDBAdapter(void) : m_dbHandle(0), m_strDbPath(&quot;&quot;), m_bUnlockDB(false), m_bInsideTransaction(false){}
     ~CDBAdapter(void){}
 
-    void open (String strDbPath, String strVer);
+    void open (String strDbPath, String strVer, boolean bTemp);
     void close();
     sqlite3* getDbHandle(){ return m_dbHandle; }
+    CDBAttrManager&amp; getAttrMgr(){ return m_attrMgr; }
 
     boolean isUnlockDB()const{ return m_bUnlockDB; }
     void setUnlockDB(boolean b){ m_bUnlockDB = b; }
     void Lock(){ m_mxDB.Lock(); }
     void Unlock(){ setUnlockDB(false); m_mxDB.Unlock(); }
+    boolean isInsideTransaction(){ return m_bInsideTransaction; }
 
     void bind(sqlite3_stmt* st, int nPos, int val)
     {
@@ -79,6 +96,37 @@ public:
         return executeStatement(res);
     }
 
+    template&lt;typename T1, typename T2, typename T3, typename T4&gt;
+    DBResultPtr executeSQL( const char* szSt, T1 p1, T2 p2, T3 p3, T4 p4 )
+    {
+        DBResultPtr res = prepareStatement(szSt);
+        if ( res-&gt;getStatement() == null )
+            return res;
+
+        bind(res-&gt;getStatement(), 1, p1);
+        bind(res-&gt;getStatement(), 2, p2);
+        bind(res-&gt;getStatement(), 3, p3);
+        bind(res-&gt;getStatement(), 4, p4);
+
+        return executeStatement(res);
+    }
+
+    template&lt;typename T1, typename T2, typename T3, typename T4, typename T5&gt;
+    DBResultPtr executeSQL( const char* szSt, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5 )
+    {
+        DBResultPtr res = prepareStatement(szSt);
+        if ( res-&gt;getStatement() == null )
+            return res;
+
+        bind(res-&gt;getStatement(), 1, p1);
+        bind(res-&gt;getStatement(), 2, p2);
+        bind(res-&gt;getStatement(), 3, p3);
+        bind(res-&gt;getStatement(), 4, p4);
+        bind(res-&gt;getStatement(), 5, p5);
+
+        return executeStatement(res);
+    }
+
     template&lt;typename T1, typename T2, typename T3, typename T4, typename T5, typename T6&gt;
     DBResultPtr executeSQL( const char* szSt, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6 )
     {
@@ -96,6 +144,24 @@ public:
         return executeStatement(res);
     }
 
+    template&lt;typename T1, typename T2, typename T3, typename T4, typename T5, typename T6&gt;
+    DBResultPtr executeSQLReportNonUnique( const char* szSt, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6 )
+    {
+        DBResultPtr res = prepareStatement(szSt);
+        if ( res-&gt;getStatement() == null )
+            return res;
+
+        bind(res-&gt;getStatement(), 1, p1);
+        bind(res-&gt;getStatement(), 2, p2);
+        bind(res-&gt;getStatement(), 3, p3);
+        bind(res-&gt;getStatement(), 4, p4);
+        bind(res-&gt;getStatement(), 5, p5);
+        bind(res-&gt;getStatement(), 6, p6);
+
+        res-&gt;setReportNonUnique(true);
+        return executeStatement(res);
+    }
+
     template&lt;typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7&gt;
     DBResultPtr executeSQL( const char* szSt, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7 )
     {
@@ -136,9 +202,12 @@ public:
 //private:
     DBResultPtr executeStatement(common::CAutoPtr&lt;CDBResult&gt;&amp; res);
 
-    void checkVersion(String&amp; strVer);
+    void checkDBVersion(String&amp; strVer);
+    CDBVersion readDBVersion();//throws Exception
+    void       writeDBVersion(const CDBVersion&amp; ver);//throws Exception
     void createSchema();
     boolean checkDbError(int rc);
+    boolean checkDbErrorEx(int rc, rho::db::CDBResult&amp; res);
     sqlite3_stmt* createInsertStatement(rho::db::CDBResult&amp; res, const String&amp; tableName, CDBAdapter&amp; db, String&amp; strInsert);
 
     virtual DBResultPtr prepareStatement( const char* szSt );</diff>
      <filename>platform/shared/db/DBAdapter.h</filename>
    </modified>
    <modified>
      <diff>@@ -12,14 +12,21 @@ class CDBResult
 {
     sqlite3_stmt* m_dbStatement;
     common::CMutexLock m_lockDB;
+    boolean m_bReportNonUnique;
+    int     m_nErrorCode;
 public:
-    CDBResult(sqlite3_stmt* st,common::CMutex&amp; mx) : m_lockDB(mx), m_dbStatement(st){}
-    CDBResult(common::CMutex&amp; mx) : m_lockDB(mx), m_dbStatement(null){}
+    CDBResult(sqlite3_stmt* st,common::CMutex&amp; mx) : m_lockDB(mx), m_dbStatement(st){m_bReportNonUnique=false;m_nErrorCode=0;}
+    CDBResult(common::CMutex&amp; mx) : m_lockDB(mx), m_dbStatement(null){m_bReportNonUnique=false;m_nErrorCode=0;}
 
     ~CDBResult(void);
 
     void setStatement(sqlite3_stmt* st);
     sqlite3_stmt* getStatement(){ return m_dbStatement; }
+    boolean getReportNonUnique(){ return m_bReportNonUnique; }
+    void setReportNonUnique(boolean bSet){ m_bReportNonUnique = bSet; }
+    boolean isNonUnique(){ return m_nErrorCode==SQLITE_CONSTRAINT; }
+    int     getErrorCode(){ return m_nErrorCode; }
+    void    setErrorCode(int nError){ m_nErrorCode=nError; }
 
     virtual bool isEnd(){ return m_dbStatement == null; }
     void next()</diff>
      <filename>platform/shared/db/DBResult.h</filename>
    </modified>
    <modified>
      <diff>@@ -59,6 +59,11 @@ void  CJSONArrayIterator::next()
     m_nCurItem++;
 }
 
+void CJSONArrayIterator::reset(int nPos)
+{
+    m_nCurItem = nPos;
+}
+
 CJSONEntry CJSONArrayIterator::getCurItem()
 {
     return CJSONEntry( isEnd() ? 0 :
@@ -107,7 +112,7 @@ int CJSONEntry::getInt(const char* name)
     int nRes = 0;
     struct json_object* obj = json_object_object_get(m_object,const_cast&lt;char*&gt;(name));
     if ( obj != 0 )
-        nRes = json_object_get_int(obj);
+        nRes = static_cast&lt;int&gt;(json_object_get_int(obj));
 
     return nRes;
 }
@@ -117,11 +122,22 @@ uint64 CJSONEntry::getUInt64(const char* name)
     uint64 nRes = 0;
     struct json_object* obj = json_object_object_get(m_object,const_cast&lt;char*&gt;(name));
     if ( obj != 0 )
-        nRes = rho_atoi64(json_object_get_string(obj));
+        nRes = (uint64)json_object_get_int(obj);
 
     return nRes;
 }
 
+/*
+uint64 CJSONEntry::getUInt64(const char* name)
+{
+    uint64 nRes = 0;
+    struct json_object* obj = json_object_object_get(m_object,const_cast&lt;char*&gt;(name));
+    if ( obj != 0 )
+        nRes = rho_atoi64(json_object_get_string(obj));
+
+    return nRes;
+}*/
+
 CJSONEntry CJSONEntry::getEntry(const char* name)
 {
     struct json_object* obj = json_object_object_get(m_object,const_cast&lt;char*&gt;(name));</diff>
      <filename>platform/shared/json/JSONIterator.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -43,6 +43,8 @@ public:
 
     boolean isEnd();
     void    next();
+    void    reset(int nPos);
+    int     getCurPos(){ return m_nCurItem; }
 
     CJSONEntry getCurItem();
 };</diff>
      <filename>platform/shared/json/JSONIterator.h</filename>
    </modified>
    <modified>
      <diff>@@ -171,7 +171,7 @@ static struct json_object* json_object_new(enum json_type o_type)
   this-&gt;o_type = o_type;
   this-&gt;_ref_count = 1;
   this-&gt;_delete = &amp;json_object_generic_delete;
-#ifdef REFCOUNT_DEBUG                +
+#ifdef REFCOUNT_DEBUG
   lh_table_insert(json_object_table, this, this);
   MC_DEBUG2(&quot;json_object_new_%s: %p\n&quot;, json_type_name[this-&gt;o_type], this);
 #endif /* REFCOUNT_DEBUG */
@@ -324,10 +324,10 @@ boolean json_object_get_boolean(struct json_object *this)
 static int json_object_int_to_json_string(struct json_object* this,
 					  struct printbuf *pb)
 {
-  return sprintbuf(pb, &quot;%d&quot;, this-&gt;o.c_int);
+  return sprintbuf(pb, &quot;%lli&quot;, this-&gt;o.c_int);
 }
 
-struct json_object* json_object_new_int(int i)
+struct json_object* json_object_new_int(int64 i)
 {
   struct json_object *this = json_object_new(json_type_int);
   if(!this) return NULL;
@@ -336,20 +336,20 @@ struct json_object* json_object_new_int(int i)
   return this;
 }
 
-int json_object_get_int(struct json_object *this)
+int64 json_object_get_int(struct json_object *this)
 {
-  int cint;
+  int64 cint;
 
   if(!this) return 0;
   switch(this-&gt;o_type) {
   case json_type_int:
     return this-&gt;o.c_int;
   case json_type_double:
-    return (int)this-&gt;o.c_double;
+    return (int64)this-&gt;o.c_double;
   case json_type_boolean:
     return this-&gt;o.c_boolean;
   case json_type_string:
-    if(sscanf(this-&gt;o.c_string, &quot;%d&quot;, &amp;cint) == 1) return cint;
+    if(sscanf(this-&gt;o.c_string, &quot;%lli&quot;, &amp;cint) == 1) return cint;
   default:
     return 0;
   }
@@ -382,7 +382,7 @@ double json_object_get_double(struct json_object *this)
   case json_type_double:
     return this-&gt;o.c_double;
   case json_type_int:
-    return this-&gt;o.c_int;
+    return (double)this-&gt;o.c_int;
   case json_type_boolean:
     return this-&gt;o.c_boolean;
   case json_type_string:</diff>
      <filename>platform/shared/json/json_object.c</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,8 @@
 #ifndef _json_object_h_
 #define _json_object_h_
 
+#include &quot;common/RhoPort.h&quot;
+
 #define JSON_OBJECT_DEF_HASH_ENTIRES 16
 
 #undef FALSE
@@ -247,7 +249,7 @@ extern boolean json_object_get_boolean(struct json_object *obj);
  * @param i the integer
  * @returns a json_object of type json_type_int
  */
-extern struct json_object* json_object_new_int(int i);
+extern struct json_object* json_object_new_int(int64 i);
 
 /** Get the int value of a json_object
  *
@@ -258,7 +260,7 @@ extern struct json_object* json_object_new_int(int i);
  * @param obj the json_object instance
  * @returns an int
  */
-extern int json_object_get_int(struct json_object *obj);
+extern int64 json_object_get_int(struct json_object *obj);
 
 
 /* double type methods */</diff>
      <filename>platform/shared/json/json_object.h</filename>
    </modified>
    <modified>
      <diff>@@ -26,7 +26,7 @@ struct json_object
   union data {
     boolean c_boolean;
     double c_double;
-    int c_int;
+    int64 c_int;
     struct lh_table *c_object;
     struct array_list *c_array;
     char *c_string;</diff>
      <filename>platform/shared/json/json_object_private.h</filename>
    </modified>
    <modified>
      <diff>@@ -396,9 +396,9 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
 	printbuf_memappend(tok-&gt;pb, &amp;c, 1);	
 	if(c == '.' || c == 'e' || c == 'E') tok-&gt;is_double = 1;
       } else {
-	int numi;
+	int64 numi;
 	double numd;
-	if(!tok-&gt;is_double &amp;&amp; sscanf(tok-&gt;pb-&gt;buf, &quot;%d&quot;, &amp;numi) == 1) {
+	if(!tok-&gt;is_double &amp;&amp; sscanf(tok-&gt;pb-&gt;buf, &quot;%lli&quot;, &amp;numi) == 1) {
 	  current = json_object_new_int(numi);
 	} else if(tok-&gt;is_double &amp;&amp; sscanf(tok-&gt;pb-&gt;buf, &quot;%lf&quot;, &amp;numd) == 1) {
 	  current = json_object_new_double(numd);</diff>
      <filename>platform/shared/json/json_tokener.c</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@
 
 #include &quot;common/RhoStd.h&quot;
 #include &quot;common/InputStream.h&quot;
+#include &quot;common/AutoPointer.h&quot;
 
 namespace rho {
 namespace net {
@@ -16,6 +17,7 @@ struct INetResponse
 	virtual int getRespCode() = 0;
 	virtual boolean isOK() = 0;
     virtual boolean isResponseRecieved() = 0;
+    virtual boolean isUnathorized() = 0;
 };
 
 struct INetRequest</diff>
      <filename>platform/shared/net/inetrequest.h</filename>
    </modified>
    <modified>
      <diff>@@ -1,31 +1,31 @@
-/* datetimepicker.i */
-%module DateTimePicker
-%{
-	extern void choose_datetime(char* callback, char* title, long initial_time, int format, char* data);
-	#define choose choose_datetime
-%}
-
-%typemap(in) long initial_time {
-	VALUE t;
-	long val;
-	VALUE class;
-	VALUE class_str;
-	char *class_val;
-	
-	class = rb_funcall($input, rb_intern(&quot;class&quot;), 0);
-	class_str = rb_funcall(class, rb_intern(&quot;to_s&quot;), 0);
-	class_val = StringValuePtr(class_str);
-
-	if (!strcmp(class_val, &quot;Time&quot;) == 0) {
-		rb_raise(SWIG_Ruby_ErrorType(SWIG_AttributeError), &quot; of type '&quot; &quot;Time&quot;&quot;'&quot;);
-	}
-	t = rb_funcall($input, rb_intern(&quot;to_i&quot;), 0);
-	val = NUM2INT(t);
-	$1 = (long)val;
-}
-
-%typemap(default) char* data {
- 	$1 = NULL;
-}
-
-extern void choose(char* callback, char* title, long initial_time, int format, char* data);
+/* datetimepicker.i */
+%module DateTimePicker
+%{
+	extern void choose_datetime(char* callback, char* title, long initial_time, int format, char* data);
+	#define choose choose_datetime
+%}
+
+%typemap(in) long initial_time {
+	VALUE t;
+	long val;
+	VALUE class;
+	VALUE class_str;
+	char *class_val;
+	
+	class = rb_funcall($input, rb_intern(&quot;class&quot;), 0);
+	class_str = rb_funcall(class, rb_intern(&quot;to_s&quot;), 0);
+	class_val = StringValuePtr(class_str);
+
+	if (!strcmp(class_val, &quot;Time&quot;) == 0) {
+		rb_raise(SWIG_Ruby_ErrorType(SWIG_AttributeError), &quot; of type '&quot; &quot;Time&quot;&quot;'&quot;);
+	}
+	t = rb_funcall($input, rb_intern(&quot;to_i&quot;), 0);
+	val = NUM2INT(t);
+	$1 = (long)val;
+}
+
+%typemap(default) char* data {
+ 	$1 = NULL;
+}
+
+extern void choose(char* callback, char* title, long initial_time, int format, char* data);</diff>
      <filename>platform/shared/ruby/ext/datetimepicker/datetimepicker.i</filename>
    </modified>
    <modified>
      <diff>@@ -1,2011 +1,2011 @@
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.31
- * 
- * This file is not intended to be easily readable and contains a number of 
- * coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG 
- * interface file instead. 
- * ----------------------------------------------------------------------------- */
-
-#define SWIGRUBY
-/* -----------------------------------------------------------------------------
- *  This section contains generic SWIG labels for method/variable
- *  declarations/attributes, and other compiler dependent labels.
- * ----------------------------------------------------------------------------- */
-
-/* template workaround for compilers that cannot correctly implement the C++ standard */
-#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC)
-#   if (__SUNPRO_CC &lt;= 0x560)
-#     define SWIGTEMPLATEDISAMBIGUATOR template
-#   else
-#     define SWIGTEMPLATEDISAMBIGUATOR 
-#   endif
-# else
-#   define SWIGTEMPLATEDISAMBIGUATOR 
-# endif
-#endif
-
-/* inline attribute */
-#ifndef SWIGINLINE
-# if defined(__cplusplus) || (defined(__GNUC__) &amp;&amp; !defined(__STRICT_ANSI__))
-#   define SWIGINLINE inline
-# else
-#   define SWIGINLINE
-# endif
-#endif
-
-/* attribute recognised by some compilers to avoid 'unused' warnings */
-#ifndef SWIGUNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ &gt; 3 || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
-#   else
-#     define SWIGUNUSED
-#   endif
-# elif defined(__ICC)
-#   define SWIGUNUSED __attribute__ ((__unused__)) 
-# else
-#   define SWIGUNUSED 
-# endif
-#endif
-
-#ifndef SWIGUNUSEDPARM
-# ifdef __cplusplus
-#   define SWIGUNUSEDPARM(p)
-# else
-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
-# endif
-#endif
-
-/* internal SWIG method */
-#ifndef SWIGINTERN
-# define SWIGINTERN static SWIGUNUSED
-#endif
-
-/* internal inline SWIG method */
-#ifndef SWIGINTERNINLINE
-# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
-#endif
-
-/* exporting methods */
-#if (__GNUC__ &gt;= 4) || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4)
-#  ifndef GCC_HASCLASSVISIBILITY
-#    define GCC_HASCLASSVISIBILITY
-#  endif
-#endif
-
-#ifndef SWIGEXPORT
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   if defined(STATIC_LINKED)
-#     define SWIGEXPORT
-#   else
-#     define SWIGEXPORT __declspec(dllexport)
-#   endif
-# else
-#   if defined(__GNUC__) &amp;&amp; defined(GCC_HASCLASSVISIBILITY)
-#     define SWIGEXPORT __attribute__ ((visibility(&quot;default&quot;)))
-#   else
-#     define SWIGEXPORT
-#   endif
-# endif
-#endif
-
-/* calling conventions for Windows */
-#ifndef SWIGSTDCALL
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   define SWIGSTDCALL __stdcall
-# else
-#   define SWIGSTDCALL
-# endif 
-#endif
-
-/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) &amp;&amp; defined(_MSC_VER) &amp;&amp; !defined(_CRT_SECURE_NO_DEPRECATE)
-# define _CRT_SECURE_NO_DEPRECATE
-#endif
-
-/* -----------------------------------------------------------------------------
- *  This section contains generic SWIG labels for method/variable
- *  declarations/attributes, and other compiler dependent labels.
- * ----------------------------------------------------------------------------- */
-
-/* template workaround for compilers that cannot correctly implement the C++ standard */
-#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC)
-#   if (__SUNPRO_CC &lt;= 0x560)
-#     define SWIGTEMPLATEDISAMBIGUATOR template
-#   else
-#     define SWIGTEMPLATEDISAMBIGUATOR 
-#   endif
-# else
-#   define SWIGTEMPLATEDISAMBIGUATOR 
-# endif
-#endif
-
-/* inline attribute */
-#ifndef SWIGINLINE
-# if defined(__cplusplus) || (defined(__GNUC__) &amp;&amp; !defined(__STRICT_ANSI__))
-#   define SWIGINLINE inline
-# else
-#   define SWIGINLINE
-# endif
-#endif
-
-/* attribute recognised by some compilers to avoid 'unused' warnings */
-#ifndef SWIGUNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ &gt; 3 || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
-#   else
-#     define SWIGUNUSED
-#   endif
-# elif defined(__ICC)
-#   define SWIGUNUSED __attribute__ ((__unused__)) 
-# else
-#   define SWIGUNUSED 
-# endif
-#endif
-
-#ifndef SWIGUNUSEDPARM
-# ifdef __cplusplus
-#   define SWIGUNUSEDPARM(p)
-# else
-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
-# endif
-#endif
-
-/* internal SWIG method */
-#ifndef SWIGINTERN
-# define SWIGINTERN static SWIGUNUSED
-#endif
-
-/* internal inline SWIG method */
-#ifndef SWIGINTERNINLINE
-# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
-#endif
-
-/* exporting methods */
-#if (__GNUC__ &gt;= 4) || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4)
-#  ifndef GCC_HASCLASSVISIBILITY
-#    define GCC_HASCLASSVISIBILITY
-#  endif
-#endif
-
-#ifndef SWIGEXPORT
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   if defined(STATIC_LINKED)
-#     define SWIGEXPORT
-#   else
-#     define SWIGEXPORT __declspec(dllexport)
-#   endif
-# else
-#   if defined(__GNUC__) &amp;&amp; defined(GCC_HASCLASSVISIBILITY)
-#     define SWIGEXPORT __attribute__ ((visibility(&quot;default&quot;)))
-#   else
-#     define SWIGEXPORT
-#   endif
-# endif
-#endif
-
-/* calling conventions for Windows */
-#ifndef SWIGSTDCALL
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   define SWIGSTDCALL __stdcall
-# else
-#   define SWIGSTDCALL
-# endif 
-#endif
-
-/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) &amp;&amp; defined(_MSC_VER) &amp;&amp; !defined(_CRT_SECURE_NO_DEPRECATE)
-# define _CRT_SECURE_NO_DEPRECATE
-#endif
-
-/* -----------------------------------------------------------------------------
- * swigrun.swg
- *
- * This file contains generic CAPI SWIG runtime support for pointer
- * type checking.
- * ----------------------------------------------------------------------------- */
-
-/* This should only be incremented when either the layout of swig_type_info changes,
-   or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION &quot;3&quot;
-
-/* define SWIG_TYPE_TABLE_NAME as &quot;SWIG_TYPE_TABLE&quot; */
-#ifdef SWIG_TYPE_TABLE
-# define SWIG_QUOTE_STRING(x) #x
-# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
-# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
-#else
-# define SWIG_TYPE_TABLE_NAME
-#endif
-
-/*
-  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
-  creating a static or dynamic library from the swig runtime code.
-  In 99.9% of the cases, swig just needs to declare them as 'static'.
-  
-  But only do this if is strictly necessary, ie, if you have problems
-  with your compiler or so.
-*/
-
-#ifndef SWIGRUNTIME
-# define SWIGRUNTIME SWIGINTERN
-#endif
-
-#ifndef SWIGRUNTIMEINLINE
-# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
-#endif
-
-/*  Generic buffer size */
-#ifndef SWIG_BUFFER_SIZE
-# define SWIG_BUFFER_SIZE 1024
-#endif
-
-/* Flags for pointer conversions */
-#define SWIG_POINTER_DISOWN        0x1
-
-/* Flags for new pointer objects */
-#define SWIG_POINTER_OWN           0x1
-
-
-/* 
-   Flags/methods for returning states.
-   
-   The swig conversion methods, as ConvertPtr, return and integer 
-   that tells if the conversion was successful or not. And if not,
-   an error code can be returned (see swigerrors.swg for the codes).
-   
-   Use the following macros/flags to set or process the returning
-   states.
-   
-   In old swig versions, you usually write code as:
-
-     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
-       // success code
-     } else {
-       //fail code
-     }
-
-   Now you can be more explicit as:
-
-    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
-    if (SWIG_IsOK(res)) {
-      // success code
-    } else {
-      // fail code
-    }
-
-   that seems to be the same, but now you can also do
-
-    Type *ptr;
-    int res = SWIG_ConvertPtr(obj,(void **)(&amp;ptr),ty.flags);
-    if (SWIG_IsOK(res)) {
-      // success code
-      if (SWIG_IsNewObj(res) {
-        ...
-	delete *ptr;
-      } else {
-        ...
-      }
-    } else {
-      // fail code
-    }
-    
-   I.e., now SWIG_ConvertPtr can return new objects and you can
-   identify the case and take care of the deallocation. Of course that
-   requires also to SWIG_ConvertPtr to return new result values, as
-
-      int SWIG_ConvertPtr(obj, ptr,...) {         
-        if (&lt;obj is ok&gt;) {			       
-          if (&lt;need new object&gt;) {		       
-            *ptr = &lt;ptr to new allocated object&gt;; 
-            return SWIG_NEWOBJ;		       
-          } else {				       
-            *ptr = &lt;ptr to old object&gt;;	       
-            return SWIG_OLDOBJ;		       
-          } 				       
-        } else {				       
-          return SWIG_BADOBJ;		       
-        }					       
-      }
-
-   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
-   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
-   swig errors code.
-
-   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
-   allows to return the 'cast rank', for example, if you have this
-
-       int food(double)
-       int fooi(int);
-
-   and you call
- 
-      food(1)   // cast rank '1'  (1 -&gt; 1.0)
-      fooi(1)   // cast rank '0'
-
-   just use the SWIG_AddCast()/SWIG_CheckState()
-
-
- */
-#define SWIG_OK                    (0) 
-#define SWIG_ERROR                 (-1)
-#define SWIG_IsOK(r)               (r &gt;= 0)
-#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
-
-/* The CastRankLimit says how many bits are used for the cast rank */
-#define SWIG_CASTRANKLIMIT         (1 &lt;&lt; 8)
-/* The NewMask denotes the object was created (using new/malloc) */
-#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  &lt;&lt; 1)
-/* The TmpMask is for in/out typemaps that use temporal objects */
-#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK &lt;&lt; 1)
-/* Simple returning values */
-#define SWIG_BADOBJ                (SWIG_ERROR)
-#define SWIG_OLDOBJ                (SWIG_OK)
-#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
-#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
-/* Check, add and del mask methods */
-#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
-#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r &amp; ~SWIG_NEWOBJMASK) : r)
-#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) &amp;&amp; (r &amp; SWIG_NEWOBJMASK))
-#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
-#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r &amp; ~SWIG_TMPOBJMASK) : r)
-#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) &amp;&amp; (r &amp; SWIG_TMPOBJMASK))
-
-
-/* Cast-Rank Mode */
-#if defined(SWIG_CASTRANK_MODE)
-#  ifndef SWIG_TypeRank
-#    define SWIG_TypeRank             unsigned long
-#  endif
-#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
-#    define SWIG_MAXCASTRANK          (2)
-#  endif
-#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
-#  define SWIG_CastRank(r)           (r &amp; SWIG_CASTRANKMASK)
-SWIGINTERNINLINE int SWIG_AddCast(int r) { 
-  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) &lt; SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
-}
-SWIGINTERNINLINE int SWIG_CheckState(int r) { 
-  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
-}
-#else /* no cast-rank mode */
-#  define SWIG_AddCast
-#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
-#endif
-
-
-
-
-#include &lt;string.h&gt;
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#endif
-
-typedef void *(*swig_converter_func)(void *);
-typedef struct swig_type_info *(*swig_dycast_func)(void **);
-
-/* Structure to store inforomation on one type */
-typedef struct swig_type_info {
-  const char             *name;			/* mangled name of this type */
-  const char             *str;			/* human readable name of this type */
-  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
-  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
-  void                   *clientdata;		/* language specific type data */
-  int                    owndata;		/* flag if the structure owns the clientdata */
-} swig_type_info;
-
-/* Structure to store a type and conversion function used for casting */
-typedef struct swig_cast_info {
-  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
-  swig_converter_func     converter;		/* function to cast the void pointers */
-  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
-  struct swig_cast_info  *prev;			/* pointer to the previous cast */
-} swig_cast_info;
-
-/* Structure used to store module information
- * Each module generates one structure like this, and the runtime collects
- * all of these structures and stores them in a circularly linked list.*/
-typedef struct swig_module_info {
-  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
-  size_t                 size;		        /* Number of types in this module */
-  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
-  swig_type_info         **type_initial;	/* Array of initially generated type structures */
-  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
-  void                    *clientdata;		/* Language specific module data */
-} swig_module_info;
-
-/* 
-  Compare two type names skipping the space characters, therefore
-  &quot;char*&quot; == &quot;char *&quot; and &quot;Class&lt;int&gt;&quot; == &quot;Class&lt;int &gt;&quot;, etc.
-
-  Return 0 when the two name types are equivalent, as in
-  strncmp, but skipping ' '.
-*/
-SWIGRUNTIME int
-SWIG_TypeNameComp(const char *f1, const char *l1,
-		  const char *f2, const char *l2) {
-  for (;(f1 != l1) &amp;&amp; (f2 != l2); ++f1, ++f2) {
-    while ((*f1 == ' ') &amp;&amp; (f1 != l1)) ++f1;
-    while ((*f2 == ' ') &amp;&amp; (f2 != l2)) ++f2;
-    if (*f1 != *f2) return (*f1 &gt; *f2) ? 1 : -1;
-  }
-  return (l1 - f1) - (l2 - f2);
-}
-
-/*
-  Check type equivalence in a name list like &lt;name1&gt;|&lt;name2&gt;|...
-  Return 0 if not equal, 1 if equal
-*/
-SWIGRUNTIME int
-SWIG_TypeEquiv(const char *nb, const char *tb) {
-  int equiv = 0;
-  const char* te = tb + strlen(tb);
-  const char* ne = nb;
-  while (!equiv &amp;&amp; *ne) {
-    for (nb = ne; *ne; ++ne) {
-      if (*ne == '|') break;
-    }
-    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
-    if (*ne) ++ne;
-  }
-  return equiv;
-}
-
-/*
-  Check type equivalence in a name list like &lt;name1&gt;|&lt;name2&gt;|...
-  Return 0 if equal, -1 if nb &lt; tb, 1 if nb &gt; tb
-*/
-SWIGRUNTIME int
-SWIG_TypeCompare(const char *nb, const char *tb) {
-  int equiv = 0;
-  const char* te = tb + strlen(tb);
-  const char* ne = nb;
-  while (!equiv &amp;&amp; *ne) {
-    for (nb = ne; *ne; ++ne) {
-      if (*ne == '|') break;
-    }
-    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
-    if (*ne) ++ne;
-  }
-  return equiv;
-}
-
-
-/* think of this as a c++ template&lt;&gt; or a scheme macro */
-#define SWIG_TypeCheck_Template(comparison, ty)         \
-  if (ty) {                                             \
-    swig_cast_info *iter = ty-&gt;cast;                    \
-    while (iter) {                                      \
-      if (comparison) {                                 \
-        if (iter == ty-&gt;cast) return iter;              \
-        /* Move iter to the top of the linked list */   \
-        iter-&gt;prev-&gt;next = iter-&gt;next;                  \
-        if (iter-&gt;next)                                 \
-          iter-&gt;next-&gt;prev = iter-&gt;prev;                \
-        iter-&gt;next = ty-&gt;cast;                          \
-        iter-&gt;prev = 0;                                 \
-        if (ty-&gt;cast) ty-&gt;cast-&gt;prev = iter;            \
-        ty-&gt;cast = iter;                                \
-        return iter;                                    \
-      }                                                 \
-      iter = iter-&gt;next;                                \
-    }                                                   \
-  }                                                     \
-  return 0
-
-/*
-  Check the typename
-*/
-SWIGRUNTIME swig_cast_info *
-SWIG_TypeCheck(const char *c, swig_type_info *ty) {
-  SWIG_TypeCheck_Template(strcmp(iter-&gt;type-&gt;name, c) == 0, ty);
-}
-
-/* Same as previous function, except strcmp is replaced with a pointer comparison */
-SWIGRUNTIME swig_cast_info *
-SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
-  SWIG_TypeCheck_Template(iter-&gt;type == from, into);
-}
-
-/*
-  Cast a pointer up an inheritance hierarchy
-*/
-SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
-  return ((!ty) || (!ty-&gt;converter)) ? ptr : (*ty-&gt;converter)(ptr);
-}
-
-/* 
-   Dynamic pointer casting. Down an inheritance hierarchy
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
-  swig_type_info *lastty = ty;
-  if (!ty || !ty-&gt;dcast) return ty;
-  while (ty &amp;&amp; (ty-&gt;dcast)) {
-    ty = (*ty-&gt;dcast)(ptr);
-    if (ty) lastty = ty;
-  }
-  return lastty;
-}
-
-/*
-  Return the name associated with this type
-*/
-SWIGRUNTIMEINLINE const char *
-SWIG_TypeName(const swig_type_info *ty) {
-  return ty-&gt;name;
-}
-
-/*
-  Return the pretty name associated with this type,
-  that is an unmangled type name in a form presentable to the user.
-*/
-SWIGRUNTIME const char *
-SWIG_TypePrettyName(const swig_type_info *type) {
-  /* The &quot;str&quot; field contains the equivalent pretty names of the
-     type, separated by vertical-bar characters.  We choose
-     to print the last name, as it is often (?) the most
-     specific. */
-  if (!type) return NULL;
-  if (type-&gt;str != NULL) {
-    const char *last_name = type-&gt;str;
-    const char *s;
-    for (s = type-&gt;str; *s; s++)
-      if (*s == '|') last_name = s+1;
-    return last_name;
-  }
-  else
-    return type-&gt;name;
-}
-
-/* 
-   Set the clientdata field for a type
-*/
-SWIGRUNTIME void
-SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
-  swig_cast_info *cast = ti-&gt;cast;
-  /* if (ti-&gt;clientdata == clientdata) return; */
-  ti-&gt;clientdata = clientdata;
-  
-  while (cast) {
-    if (!cast-&gt;converter) {
-      swig_type_info *tc = cast-&gt;type;
-      if (!tc-&gt;clientdata) {
-	SWIG_TypeClientData(tc, clientdata);
-      }
-    }    
-    cast = cast-&gt;next;
-  }
-}
-SWIGRUNTIME void
-SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
-  SWIG_TypeClientData(ti, clientdata);
-  ti-&gt;owndata = 1;
-}
-  
-/*
-  Search for a swig_type_info structure only by mangled name
-  Search is a O(log #types)
-  
-  We start searching at module start, and finish searching when start == end.  
-  Note: if start == end at the beginning of the function, we go all the way around
-  the circular list.
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_MangledTypeQueryModule(swig_module_info *start, 
-                            swig_module_info *end, 
-		            const char *name) {
-  swig_module_info *iter = start;
-  do {
-    if (iter-&gt;size) {
-      register size_t l = 0;
-      register size_t r = iter-&gt;size - 1;
-      do {
-	/* since l+r &gt;= 0, we can (&gt;&gt; 1) instead (/ 2) */
-	register size_t i = (l + r) &gt;&gt; 1; 
-	const char *iname = iter-&gt;types[i]-&gt;name;
-	if (iname) {
-	  register int compare = strcmp(name, iname);
-	  if (compare == 0) {	    
-	    return iter-&gt;types[i];
-	  } else if (compare &lt; 0) {
-	    if (i) {
-	      r = i - 1;
-	    } else {
-	      break;
-	    }
-	  } else if (compare &gt; 0) {
-	    l = i + 1;
-	  }
-	} else {
-	  break; /* should never happen */
-	}
-      } while (l &lt;= r);
-    }
-    iter = iter-&gt;next;
-  } while (iter != end);
-  return 0;
-}
-
-/*
-  Search for a swig_type_info structure for either a mangled name or a human readable name.
-  It first searches the mangled names of the types, which is a O(log #types)
-  If a type is not found it then searches the human readable names, which is O(#types).
-  
-  We start searching at module start, and finish searching when start == end.  
-  Note: if start == end at the beginning of the function, we go all the way around
-  the circular list.
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_TypeQueryModule(swig_module_info *start, 
-                     swig_module_info *end, 
-		     const char *name) {
-  /* STEP 1: Search the name field using binary search */
-  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
-  if (ret) {
-    return ret;
-  } else {
-    /* STEP 2: If the type hasn't been found, do a complete search
-       of the str field (the human readable name) */
-    swig_module_info *iter = start;
-    do {
-      register size_t i = 0;
-      for (; i &lt; iter-&gt;size; ++i) {
-	if (iter-&gt;types[i]-&gt;str &amp;&amp; (SWIG_TypeEquiv(iter-&gt;types[i]-&gt;str, name)))
-	  return iter-&gt;types[i];
-      }
-      iter = iter-&gt;next;
-    } while (iter != end);
-  }
-  
-  /* neither found a match */
-  return 0;
-}
-
-/* 
-   Pack binary data into a string
-*/
-SWIGRUNTIME char *
-SWIG_PackData(char *c, void *ptr, size_t sz) {
-  static const char hex[17] = &quot;0123456789abcdef&quot;;
-  register const unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu =  u + sz;
-  for (; u != eu; ++u) {
-    register unsigned char uu = *u;
-    *(c++) = hex[(uu &amp; 0xf0) &gt;&gt; 4];
-    *(c++) = hex[uu &amp; 0xf];
-  }
-  return c;
-}
-
-/* 
-   Unpack binary data from a string
-*/
-SWIGRUNTIME const char *
-SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
-  register unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu = u + sz;
-  for (; u != eu; ++u) {
-    register char d = *(c++);
-    register unsigned char uu;
-    if ((d &gt;= '0') &amp;&amp; (d &lt;= '9'))
-      uu = ((d - '0') &lt;&lt; 4);
-    else if ((d &gt;= 'a') &amp;&amp; (d &lt;= 'f'))
-      uu = ((d - ('a'-10)) &lt;&lt; 4);
-    else 
-      return (char *) 0;
-    d = *(c++);
-    if ((d &gt;= '0') &amp;&amp; (d &lt;= '9'))
-      uu |= (d - '0');
-    else if ((d &gt;= 'a') &amp;&amp; (d &lt;= 'f'))
-      uu |= (d - ('a'-10));
-    else 
-      return (char *) 0;
-    *u = uu;
-  }
-  return c;
-}
-
-/* 
-   Pack 'void *' into a string buffer.
-*/
-SWIGRUNTIME char *
-SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
-  char *r = buff;
-  if ((2*sizeof(void *) + 2) &gt; bsz) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r,&amp;ptr,sizeof(void *));
-  if (strlen(name) + 1 &gt; (bsz - (r - buff))) return 0;
-  strcpy(r,name);
-  return buff;
-}
-
-SWIGRUNTIME const char *
-SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
-  if (*c != '_') {
-    if (strcmp(c,&quot;NULL&quot;) == 0) {
-      *ptr = (void *) 0;
-      return name;
-    } else {
-      return 0;
-    }
-  }
-  return SWIG_UnpackData(++c,ptr,sizeof(void *));
-}
-
-SWIGRUNTIME char *
-SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
-  char *r = buff;
-  size_t lname = (name ? strlen(name) : 0);
-  if ((2*sz + 2 + lname) &gt; bsz) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r,ptr,sz);
-  if (lname) {
-    strncpy(r,name,lname+1);
-  } else {
-    *r = 0;
-  }
-  return buff;
-}
-
-SWIGRUNTIME const char *
-SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
-  if (*c != '_') {
-    if (strcmp(c,&quot;NULL&quot;) == 0) {
-      memset(ptr,0,sz);
-      return name;
-    } else {
-      return 0;
-    }
-  }
-  return SWIG_UnpackData(++c,ptr,sz);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-/*  Errors in SWIG */
-#define  SWIG_UnknownError    	   -1 
-#define  SWIG_IOError        	   -2 
-#define  SWIG_RuntimeError   	   -3 
-#define  SWIG_IndexError     	   -4 
-#define  SWIG_TypeError      	   -5 
-#define  SWIG_DivisionByZero 	   -6 
-#define  SWIG_OverflowError  	   -7 
-#define  SWIG_SyntaxError    	   -8 
-#define  SWIG_ValueError     	   -9 
-#define  SWIG_SystemError    	   -10
-#define  SWIG_AttributeError 	   -11
-#define  SWIG_MemoryError    	   -12 
-#define  SWIG_NullReferenceError   -13
-
-
-
-#include &lt;ruby.h&gt;
-
-/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
-#ifndef NUM2LL
-#define NUM2LL(x) NUM2LONG((x))
-#endif
-#ifndef LL2NUM
-#define LL2NUM(x) INT2NUM((long) (x))
-#endif
-#ifndef ULL2NUM
-#define ULL2NUM(x) UINT2NUM((unsigned long) (x))
-#endif
-
-/* Ruby 1.7 doesn't (yet) define NUM2ULL() */
-#ifndef NUM2ULL
-#ifdef HAVE_LONG_LONG
-#define NUM2ULL(x) rb_num2ull((x))
-#else
-#define NUM2ULL(x) NUM2ULONG(x)
-#endif
-#endif
-
-/* RSTRING_LEN, etc are new in Ruby 1.9, but -&gt;ptr and -&gt;len no longer work */
-/* Define these for older versions so we can just write code the new way */
-#ifndef RSTRING_LEN
-# define RSTRING_LEN(x) RSTRING(x)-&gt;len
-#endif
-#ifndef RSTRING_PTR
-# define RSTRING_PTR(x) RSTRING(x)-&gt;ptr
-#endif
-#ifndef RARRAY_LEN
-# define RARRAY_LEN(x) RARRAY(x)-&gt;len
-#endif
-#ifndef RARRAY_PTR
-# define RARRAY_PTR(x) RARRAY(x)-&gt;ptr
-#endif
-
-/*
- * Need to be very careful about how these macros are defined, especially
- * when compiling C++ code or C code with an ANSI C compiler.
- *
- * VALUEFUNC(f) is a macro used to typecast a C function that implements
- * a Ruby method so that it can be passed as an argument to API functions
- * like rb_define_method() and rb_define_singleton_method().
- *
- * VOIDFUNC(f) is a macro used to typecast a C function that implements
- * either the &quot;mark&quot; or &quot;free&quot; stuff for a Ruby Data object, so that it
- * can be passed as an argument to API functions like Data_Wrap_Struct()
- * and Data_Make_Struct().
- */
- 
-#ifdef __cplusplus
-#  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
-#    define PROTECTFUNC(f) ((VALUE (*)()) f)
-#    define VALUEFUNC(f) ((VALUE (*)()) f)
-#    define VOIDFUNC(f)  ((void (*)()) f)
-#  else
-#    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
-#      define PROTECTFUNC(f) ((VALUE (*)()) f)
-#      define VALUEFUNC(f) ((VALUE (*)()) f)
-#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
-#    else /* These definitions should work for Ruby 1.7+ */
-#      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
-#      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
-#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
-#    endif
-#  endif
-#else
-#  define VALUEFUNC(f) (f)
-#  define VOIDFUNC(f) (f)
-#endif
-
-/* Don't use for expressions have side effect */
-#ifndef RB_STRING_VALUE
-#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&amp;(s) = rb_str_to_str(s)))
-#endif
-#ifndef StringValue
-#define StringValue(s) RB_STRING_VALUE(s)
-#endif
-#ifndef StringValuePtr
-#define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
-#endif
-#ifndef StringValueLen
-#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
-#endif
-#ifndef SafeStringValue
-#define SafeStringValue(v) do {\
-    StringValue(v);\
-    rb_check_safe_str(v);\
-} while (0)
-#endif
-
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), &quot;new&quot;, VALUEFUNC((func)), -1)
-#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), &quot;new&quot;)
-#endif
-
-
-/* -----------------------------------------------------------------------------
- * error manipulation
- * ----------------------------------------------------------------------------- */
-
-
-/* Define some additional error types */
-#define SWIG_ObjectPreviouslyDeletedError  -100
-
-
-/* Define custom exceptions for errors that do not map to existing Ruby
-   exceptions.  Note this only works for C++ since a global cannot be
-   initialized by a funtion in C.  For C, fallback to rb_eRuntimeError.*/
-
-SWIGINTERN VALUE 
-getNullReferenceError(void) {
-  static int init = 0;
-  static VALUE rb_eNullReferenceError ;
-  if (!init) {
-    init = 1;
-    rb_eNullReferenceError = rb_define_class(&quot;NullReferenceError&quot;, rb_eRuntimeError);
-  }
-  return rb_eNullReferenceError;
-} 
-
-SWIGINTERN VALUE 
-getObjectPreviouslyDeletedError(void) {
-  static int init = 0;
-  static VALUE rb_eObjectPreviouslyDeleted ;
-  if (!init) {
-    init = 1;
-    rb_eObjectPreviouslyDeleted = rb_define_class(&quot;ObjectPreviouslyDeleted&quot;, rb_eRuntimeError);
-  }
-  return rb_eObjectPreviouslyDeleted;
-} 
-
-
-SWIGINTERN VALUE
-SWIG_Ruby_ErrorType(int SWIG_code) {
-  VALUE type;
-  switch (SWIG_code) {
-  case SWIG_MemoryError:
-    type = rb_eNoMemError;
-    break;
-  case SWIG_IOError:
-    type = rb_eIOError;
-    break;
-  case SWIG_RuntimeError:
-    type = rb_eRuntimeError;
-    break;
-  case SWIG_IndexError:
-    type = rb_eIndexError;
-    break;
-  case SWIG_TypeError:
-    type = rb_eTypeError;
-    break;
-  case SWIG_DivisionByZero:
-    type = rb_eZeroDivError;
-    break;
-  case SWIG_OverflowError:
-    type = rb_eRangeError;
-    break;
-  case SWIG_SyntaxError:
-    type = rb_eSyntaxError;
-    break;
-  case SWIG_ValueError:
-    type = rb_eArgError;
-    break;
-  case SWIG_SystemError:
-    type = rb_eFatal;
-    break;
-  case SWIG_AttributeError:
-    type = rb_eRuntimeError;
-    break;
-  case SWIG_NullReferenceError:
-    type = getNullReferenceError();
-    break;
-  case SWIG_ObjectPreviouslyDeletedError:
-    type = getObjectPreviouslyDeletedError();
-    break;
-  case SWIG_UnknownError:
-    type = rb_eRuntimeError;
-    break;
-  default:
-    type = rb_eRuntimeError;
-  }
-  return type;
-}
-
-
-
-
-/* -----------------------------------------------------------------------------
- * See the LICENSE file for information on copyright, usage and redistribution
- * of SWIG, and the README file for authors - http://www.swig.org/release.html.
- *
- * rubytracking.swg
- *
- * This file contains support for tracking mappings from 
- * Ruby objects to C++ objects.  This functionality is needed
- * to implement mark functions for Ruby's mark and sweep
- * garbage collector.
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#endif
-
-
-/* Global Ruby hash table to store Trackings from C/C++
-   structs to Ruby Objects. */
-static VALUE swig_ruby_trackings;
-
-/* Global variable that stores a reference to the ruby
-   hash table delete function. */
-static ID swig_ruby_hash_delete = 0;
-
-/* Setup a Ruby hash table to store Trackings */
-SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
-  /* Create a ruby hash table to store Trackings from C++ 
-     objects to Ruby objects.  Also make sure to tell
-     the garabage collector about the hash table. */
-  swig_ruby_trackings = rb_hash_new();
-  rb_gc_register_address(&amp;swig_ruby_trackings);
-  
-  /* Now store a reference to the hash table delete function
-     so that we only have to look it up once.*/
-  swig_ruby_hash_delete = rb_intern(&quot;delete&quot;);
-}
-
-/* Get a Ruby number to reference a pointer */
-SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
-  /* We cast the pointer to an unsigned long
-     and then store a reference to it using
-     a Ruby number object. */
-
-  /* Convert the pointer to a Ruby number */
-  unsigned long value = (unsigned long) ptr;
-  return LONG2NUM(value);
-}
-
-/* Get a Ruby number to reference an object */
-SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
-  /* We cast the object to an unsigned long
-     and then store a reference to it using
-     a Ruby number object. */
-
-  /* Convert the Object to a Ruby number */
-  unsigned long value = (unsigned long) object;
-  return LONG2NUM(value);
-}
-
-/* Get a Ruby object from a previously stored reference */
-SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
-  /* The provided Ruby number object is a reference
-     to the Ruby object we want.*/
-
-  /* First convert the Ruby number to a C number */
-  unsigned long value = NUM2LONG(reference);
-  return (VALUE) value;
-}
-
-/* Add a Tracking from a C/C++ struct to a Ruby object */
-SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
-  /* In a Ruby hash table we store the pointer and
-     the associated Ruby object.  The trick here is
-     that we cannot store the Ruby object directly - if
-     we do then it cannot be garbage collected.  So
-     instead we typecast it as a unsigned long and
-     convert it to a Ruby number object.*/
-
-  /* Get a reference to the pointer as a Ruby number */
-  VALUE key = SWIG_RubyPtrToReference(ptr);
-
-  /* Get a reference to the Ruby object as a Ruby number */
-  VALUE value = SWIG_RubyObjectToReference(object);
-
-  /* Store the mapping to the global hash table. */
-  rb_hash_aset(swig_ruby_trackings, key, value);
-}
-
-/* Get the Ruby object that owns the specified C/C++ struct */
-SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
-  /* Get a reference to the pointer as a Ruby number */
-  VALUE key = SWIG_RubyPtrToReference(ptr);
-
-  /* Now lookup the value stored in the global hash table */
-  VALUE value = rb_hash_aref(swig_ruby_trackings, key);
-	
-  if (value == Qnil) {
-    /* No object exists - return nil. */
-    return Qnil;
-  }
-  else {
-    /* Convert this value to Ruby object */
-    return SWIG_RubyReferenceToObject(value);
-  }
-}
-
-/* Remove a Tracking from a C/C++ struct to a Ruby object.  It
-   is very important to remove objects once they are destroyed
-   since the same memory address may be reused later to create
-   a new object. */
-SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
-  /* Get a reference to the pointer as a Ruby number */
-  VALUE key = SWIG_RubyPtrToReference(ptr);
-
-  /* Delete the object from the hash table by calling Ruby's
-     do this we need to call the Hash.delete method.*/
-  rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
-}
-
-/* This is a helper method that unlinks a Ruby object from its
-   underlying C++ object.  This is needed if the lifetime of the
-   Ruby object is longer than the C++ object */
-SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
-  VALUE object = SWIG_RubyInstanceFor(ptr);
-
-  if (object != Qnil) {
-    DATA_PTR(object) = 0;
-  }
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-/* -----------------------------------------------------------------------------
- * Ruby API portion that goes into the runtime
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#endif
-
-SWIGINTERN VALUE
-SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
-  if (NIL_P(target)) {
-    target = o;
-  } else {
-    if (TYPE(target) != T_ARRAY) {
-      VALUE o2 = target;
-      target = rb_ary_new();
-      rb_ary_push(target, o2);
-    }
-    rb_ary_push(target, o);
-  }
-  return target;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-
-/* -----------------------------------------------------------------------------
- * See the LICENSE file for information on copyright, usage and redistribution
- * of SWIG, and the README file for authors - http://www.swig.org/release.html.
- *
- * rubyrun.swg
- *
- * This file contains the runtime support for Ruby modules
- * and includes code for managing global variables and pointer
- * type checking.
- * ----------------------------------------------------------------------------- */
-
-/* For backward compatibility only */
-#define SWIG_POINTER_EXCEPTION  0
-
-/* for raw pointers */
-#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
-#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
-#define SWIG_AcquirePtr(ptr, own)                       SWIG_Ruby_AcquirePtr(ptr, own)
-#define swig_owntype                                    ruby_owntype
-
-/* for raw packed data */
-#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
-#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
-
-/* for class or struct pointers */
-#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
-#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
-
-/* for C or C++ function pointers */
-#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
-#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
-
-/* for C++ member pointers, ie, member methods */
-#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
-#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
-
-
-/* Runtime API */
-
-#define SWIG_GetModule(clientdata)                      SWIG_Ruby_GetModule()	
-#define SWIG_SetModule(clientdata, pointer) 		SWIG_Ruby_SetModule(pointer)
-
-
-/* Error manipulation */
-
-#define SWIG_ErrorType(code)                            SWIG_Ruby_ErrorType(code)               
-#define SWIG_Error(code, msg)            		rb_raise(SWIG_Ruby_ErrorType(code), msg)
-#define SWIG_fail                        		goto fail				 
-
-
-/* Ruby-specific SWIG API */
-
-#define SWIG_InitRuntime()                              SWIG_Ruby_InitRuntime()              
-#define SWIG_define_class(ty)                        	SWIG_Ruby_define_class(ty)
-#define SWIG_NewClassInstance(value, ty)             	SWIG_Ruby_NewClassInstance(value, ty)
-#define SWIG_MangleStr(value)                        	SWIG_Ruby_MangleStr(value)		  
-#define SWIG_CheckConvert(value, ty)                 	SWIG_Ruby_CheckConvert(value, ty)	  
-
-
-/* -----------------------------------------------------------------------------
- * pointers/data manipulation
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#if 0
-} /* cc-mode */
-#endif
-#endif
-
-typedef struct {
-  VALUE klass;
-  VALUE mImpl;
-  void  (*mark)(void *);
-  void  (*destroy)(void *);
-  int trackObjects;
-} swig_class;
-
-
-static VALUE _mSWIG = Qnil;
-static VALUE _cSWIG_Pointer = Qnil;
-static VALUE swig_runtime_data_type_pointer = Qnil;
-
-SWIGRUNTIME VALUE 
-getExceptionClass(void) {
-  static int init = 0;
-  static VALUE rubyExceptionClass ;
-  if (!init) {
-    init = 1;
-    rubyExceptionClass = rb_const_get(_mSWIG, rb_intern(&quot;Exception&quot;));
-  }
-  return rubyExceptionClass;
-} 
-
-/* This code checks to see if the Ruby object being raised as part
-   of an exception inherits from the Ruby class Exception.  If so,
-   the object is simply returned.  If not, then a new Ruby exception
-   object is created and that will be returned to Ruby.*/
-SWIGRUNTIME VALUE
-SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
-  VALUE exceptionClass = getExceptionClass();
-  if (rb_obj_is_kind_of(obj, exceptionClass)) {
-    return obj;
-  }  else {
-    return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
-  }
-}
-
-/* Initialize Ruby runtime support */
-SWIGRUNTIME void
-SWIG_Ruby_InitRuntime(void)
-{
-  if (_mSWIG == Qnil) {
-    _mSWIG = rb_define_module(&quot;SWIG&quot;);
-  }
-}
-
-/* Define Ruby class for C type */
-SWIGRUNTIME void
-SWIG_Ruby_define_class(swig_type_info *type)
-{
-  VALUE klass;
-  char *klass_name = (char *) malloc(4 + strlen(type-&gt;name) + 1);
-  sprintf(klass_name, &quot;TYPE%s&quot;, type-&gt;name);
-  if (NIL_P(_cSWIG_Pointer)) {
-    _cSWIG_Pointer = rb_define_class_under(_mSWIG, &quot;Pointer&quot;, rb_cObject);
-    rb_undef_method(CLASS_OF(_cSWIG_Pointer), &quot;new&quot;);
-  }
-  klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
-  free((void *) klass_name);
-}
-
-/* Create a new pointer object */
-SWIGRUNTIME VALUE
-SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
-{
-  int own =  flags &amp; SWIG_POINTER_OWN; 
-  
-  char *klass_name;
-  swig_class *sklass;
-  VALUE klass;
-  VALUE obj;
-  
-  if (!ptr)
-    return Qnil;
-  
-  if (type-&gt;clientdata) {
-    sklass = (swig_class *) type-&gt;clientdata;
-		
-    /* Are we tracking this class and have we already returned this Ruby object? */
-    if (sklass-&gt;trackObjects) {
-      obj = SWIG_RubyInstanceFor(ptr);
-      
-      /* Check the object's type and make sure it has the correct type.
-        It might not in cases where methods do things like 
-        downcast methods. */
-      if (obj != Qnil) {
-        VALUE value = rb_iv_get(obj, &quot;__swigtype__&quot;);
-        char* type_name = RSTRING_PTR(value);
-				
-        if (strcmp(type-&gt;name, type_name) == 0) {
-          return obj;
-        }
-      }
-    }
-
-    /* Create a new Ruby object */
-    obj = Data_Wrap_Struct(sklass-&gt;klass, VOIDFUNC(sklass-&gt;mark), (own ? VOIDFUNC(sklass-&gt;destroy) : 0), ptr);
-
-    /* If tracking is on for this class then track this object. */
-    if (sklass-&gt;trackObjects) {
-      SWIG_RubyAddTracking(ptr, obj);
-    }
-  } else {
-    klass_name = (char *) malloc(4 + strlen(type-&gt;name) + 1);
-    sprintf(klass_name, &quot;TYPE%s&quot;, type-&gt;name);
-    klass = rb_const_get(_mSWIG, rb_intern(klass_name));
-    free((void *) klass_name);
-    obj = Data_Wrap_Struct(klass, 0, 0, ptr);
-  }
-  rb_iv_set(obj, &quot;__swigtype__&quot;, rb_str_new2(type-&gt;name));
-  
-  return obj;
-}
-
-/* Create a new class instance (always owned) */
-SWIGRUNTIME VALUE
-SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
-{
-  VALUE obj;
-  swig_class *sklass = (swig_class *) type-&gt;clientdata;
-  obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass-&gt;mark), VOIDFUNC(sklass-&gt;destroy), 0);
-  rb_iv_set(obj, &quot;__swigtype__&quot;, rb_str_new2(type-&gt;name));
-  return obj;
-}
-
-/* Get type mangle from class name */
-SWIGRUNTIMEINLINE char *
-SWIG_Ruby_MangleStr(VALUE obj)
-{
-  VALUE stype = rb_iv_get(obj, &quot;__swigtype__&quot;);
-  return StringValuePtr(stype);
-}
-
-/* Acquire a pointer value */
-typedef void (*ruby_owntype)(void*);
-
-SWIGRUNTIME ruby_owntype
-SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
-  if (obj) {
-    ruby_owntype oldown = RDATA(obj)-&gt;dfree;
-    RDATA(obj)-&gt;dfree = own;
-    return oldown;
-  } else {
-    return 0;
-  }
-}
-
-/* Convert a pointer value */
-SWIGRUNTIME int
-SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
-{
-  char *c;
-  swig_cast_info *tc;
-  void *vptr = 0;
-
-  /* Grab the pointer */
-  if (NIL_P(obj)) {
-    *ptr = 0;
-    return SWIG_OK;
-  } else {
-    if (TYPE(obj) != T_DATA) {
-      return SWIG_ERROR;
-    }
-    Data_Get_Struct(obj, void, vptr);
-  }
-  
-  if (own) *own = RDATA(obj)-&gt;dfree;
-    
-  /* Check to see if the input object is giving up ownership
-     of the underlying C struct or C++ object.  If so then we
-     need to reset the destructor since the Ruby object no 
-     longer owns the underlying C++ object.*/ 
-  if (flags &amp; SWIG_POINTER_DISOWN) {
-    /* Is tracking on for this class? */
-    int track = 0;
-    if (ty &amp;&amp; ty-&gt;clientdata) {
-      swig_class *sklass = (swig_class *) ty-&gt;clientdata;
-      track = sklass-&gt;trackObjects;
-    }
-		
-    if (track) {
-      /* We are tracking objects for this class.  Thus we change the destructor
-       * to SWIG_RubyRemoveTracking.  This allows us to
-       * remove the mapping from the C++ to Ruby object
-       * when the Ruby object is garbage collected.  If we don't
-       * do this, then it is possible we will return a reference 
-       * to a Ruby object that no longer exists thereby crashing Ruby. */
-      RDATA(obj)-&gt;dfree = SWIG_RubyRemoveTracking;
-    } else {    
-      RDATA(obj)-&gt;dfree = 0;
-    }
-  }
-
-  /* Do type-checking if type info was provided */
-  if (ty) {
-    if (ty-&gt;clientdata) {
-      if (rb_obj_is_kind_of(obj, ((swig_class *) (ty-&gt;clientdata))-&gt;klass)) {
-        if (vptr == 0) {
-          /* The object has already been deleted */
-          return SWIG_ObjectPreviouslyDeletedError;
-        }
-        *ptr = vptr;
-        return SWIG_OK;
-      }
-    }
-    if ((c = SWIG_MangleStr(obj)) == NULL) {
-      return SWIG_ERROR;
-    }
-    tc = SWIG_TypeCheck(c, ty);
-    if (!tc) {
-      return SWIG_ERROR;
-    }
-    *ptr = SWIG_TypeCast(tc, vptr);
-  } else {
-    *ptr = vptr;
-  }
-  
-  return SWIG_OK;
-}
-
-/* Check convert */
-SWIGRUNTIMEINLINE int
-SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
-{
-  char *c = SWIG_MangleStr(obj);
-  if (!c) return 0;
-  return SWIG_TypeCheck(c,ty) != 0;
-}
-
-SWIGRUNTIME VALUE
-SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
-  char result[1024];
-  char *r = result;
-  if ((2*sz + 1 + strlen(type-&gt;name)) &gt; 1000) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r, ptr, sz);
-  strcpy(r, type-&gt;name);
-  return rb_str_new2(result);
-}
-
-/* Convert a packed value value */
-SWIGRUNTIME int
-SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
-  swig_cast_info *tc;
-  const char  *c;
-
-  if (TYPE(obj) != T_STRING) goto type_error;
-  c = StringValuePtr(obj);
-  /* Pointer values must start with leading underscore */
-  if (*c != '_') goto type_error;
-  c++;
-  c = SWIG_UnpackData(c, ptr, sz);
-  if (ty) {
-    tc = SWIG_TypeCheck(c, ty);
-    if (!tc) goto type_error;
-  }
-  return SWIG_OK;
-
- type_error:
-  return SWIG_ERROR;
-}
-
-SWIGRUNTIME swig_module_info *
-SWIG_Ruby_GetModule(void)
-{
-  VALUE pointer;
-  swig_module_info *ret = 0;
-  VALUE verbose = rb_gv_get(&quot;VERBOSE&quot;);
-
- /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
-  rb_gv_set(&quot;VERBOSE&quot;, Qfalse);
-  
-  /* first check if pointer already created */
-  pointer = rb_gv_get(&quot;$swig_runtime_data_type_pointer&quot; SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
-  if (pointer != Qnil) {
-    Data_Get_Struct(pointer, swig_module_info, ret);
-  }
-
-  /* reinstate warnings */
-  rb_gv_set(&quot;VERBOSE&quot;, verbose);
-  return ret;
-}
-
-SWIGRUNTIME void 
-SWIG_Ruby_SetModule(swig_module_info *pointer)
-{
-  /* register a new class */
-  VALUE cl = rb_define_class(&quot;swig_runtime_data&quot;, rb_cObject);
-  /* create and store the structure pointer to a global variable */
-  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
-  rb_define_readonly_variable(&quot;$swig_runtime_data_type_pointer&quot; SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &amp;swig_runtime_data_type_pointer);
-}
-
-#ifdef __cplusplus
-#if 0
-{ /* cc-mode */
-#endif
-}
-#endif
-
-
-
-#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
-
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
-
-
-
-/* -------- TYPES TABLE (BEGIN) -------- */
-
-#define SWIGTYPE_p_char swig_types[0]
-static swig_type_info *swig_types[2];
-static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
-#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&amp;swig_module, &amp;swig_module, name)
-#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&amp;swig_module, &amp;swig_module, name)
-
-/* -------- TYPES TABLE (END) -------- */
-
-#define SWIG_init    Init_DateTimePicker
-#define SWIG_name    &quot;DateTimePicker&quot;
-
-static VALUE mDateTimePicker;
-
-#define SWIGVERSION 0x010331 
-#define SWIG_VERSION SWIGVERSION
-
-
-#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
-#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
-
-
-	extern void choose_datetime(char* callback, char* title, long initial_time, int format, char* data);
-	#define choose choose_datetime
-
-
-SWIGINTERN swig_type_info*
-SWIG_pchar_descriptor(void)
-{
-  static int init = 0;
-  static swig_type_info* info = 0;
-  if (!init) {
-    info = SWIG_TypeQuery(&quot;_p_char&quot;);
-    init = 1;
-  }
-  return info;
-}
-
-
-SWIGINTERN int
-SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
-{
-  if (TYPE(obj) == T_STRING) {
-    
-
-
-    char *cstr = STR2CSTR(obj);
-    
-    size_t size = RSTRING_LEN(obj) + 1;
-    if (cptr)  {
-      if (alloc) {
-	if (*alloc == SWIG_NEWOBJ) {
-	  *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
-	} else {
-	  *cptr = cstr;
-	  *alloc = SWIG_OLDOBJ;
-	}
-      }
-    }
-    if (psize) *psize = size;
-    return SWIG_OK;
-  } else {
-    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-    if (pchar_descriptor) {
-      void* vptr = 0;
-      if (SWIG_ConvertPtr(obj, &amp;vptr, pchar_descriptor, 0) == SWIG_OK) {
-	if (cptr) *cptr = (char *)vptr;
-	if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
-	if (alloc) *alloc = SWIG_OLDOBJ;
-	return SWIG_OK;
-      }
-    }
-  }  
-  return SWIG_TypeError;
-}
-
-
-
-
-
-#include &lt;limits.h&gt;
-#ifndef LLONG_MIN
-# define LLONG_MIN	LONG_LONG_MIN
-#endif
-#ifndef LLONG_MAX
-# define LLONG_MAX	LONG_LONG_MAX
-#endif
-#ifndef ULLONG_MAX
-# define ULLONG_MAX	ULONG_LONG_MAX
-#endif
-
-
-SWIGINTERN VALUE
-SWIG_ruby_failed(void)
-{
-  return Qnil;
-} 
-
-
-/*@SWIG:%ruby_aux_method@*/
-SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
-{
-  VALUE obj = args[0];
-  VALUE type = TYPE(obj);
-  long *res = (long *)(args[1]);
-  *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
-  return obj;
-}
-/*@SWIG@*/
-
-SWIGINTERN int
-SWIG_AsVal_long (VALUE obj, long* val)
-{
-  VALUE type = TYPE(obj);
-  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
-    long v;
-    VALUE a[2];
-    a[0] = obj;
-    a[1] = (VALUE)(&amp;v);
-    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
-      if (val) *val = v;
-      return SWIG_OK;
-    }
-  }
-  return SWIG_TypeError;
-}
-
-
-SWIGINTERN int
-SWIG_AsVal_int (VALUE obj, int *val)
-{
-  long v;
-  int res = SWIG_AsVal_long (obj, &amp;v);
-  if (SWIG_IsOK(res)) {
-    if ((v &lt; INT_MIN || v &gt; INT_MAX)) {
-      return SWIG_OverflowError;
-    } else {
-      if (val) *val = (int)(v);
-    }
-  }  
-  return res;
-}
-
-SWIGINTERN VALUE
-_wrap_choose(int argc, VALUE *argv, VALUE self) {
-  char *arg1 = (char *) 0 ;
-  char *arg2 = (char *) 0 ;
-  long arg3 ;
-  int arg4 ;
-  char *arg5 = (char *) 0 ;
-  int res1 ;
-  char *buf1 = 0 ;
-  int alloc1 = 0 ;
-  int res2 ;
-  char *buf2 = 0 ;
-  int alloc2 = 0 ;
-  int val4 ;
-  int ecode4 = 0 ;
-  int res5 ;
-  char *buf5 = 0 ;
-  int alloc5 = 0 ;
-  
-  {
-    arg5 = NULL;
-  }
-  if ((argc &lt; 4) || (argc &gt; 5)) {
-    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 4)&quot;,argc); SWIG_fail;
-  }
-  res1 = SWIG_AsCharPtrAndSize(argv[0], &amp;buf1, NULL, &amp;alloc1);
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), &quot;in method '&quot; &quot;choose&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;char *&quot;&quot;'&quot;);
-  }
-  arg1 = (char *)(buf1);
-  res2 = SWIG_AsCharPtrAndSize(argv[1], &amp;buf2, NULL, &amp;alloc2);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), &quot;in method '&quot; &quot;choose&quot; &quot;', argument &quot; &quot;2&quot;&quot; of type '&quot; &quot;char *&quot;&quot;'&quot;);
-  }
-  arg2 = (char *)(buf2);
-  {
-    VALUE t;
-    long val;
-    VALUE class;
-    VALUE class_str;
-    char *class_val;
-    
-    class = rb_funcall(argv[2], rb_intern(&quot;class&quot;), 0);
-    class_str = rb_funcall(class, rb_intern(&quot;to_s&quot;), 0);
-    class_val = StringValuePtr(class_str);
-    
-    if (!strcmp(class_val, &quot;Time&quot;) == 0) {
-      rb_raise(SWIG_Ruby_ErrorType(SWIG_AttributeError), &quot; of type '&quot; &quot;Time&quot;&quot;'&quot;);
-    }
-    t = rb_funcall(argv[2], rb_intern(&quot;to_i&quot;), 0);
-    val = NUM2INT(t);
-    arg3 = (long)val;
-  }
-  ecode4 = SWIG_AsVal_int(argv[3], &amp;val4);
-  if (!SWIG_IsOK(ecode4)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode4), &quot;in method '&quot; &quot;choose&quot; &quot;', argument &quot; &quot;4&quot;&quot; of type '&quot; &quot;int&quot;&quot;'&quot;);
-  } 
-  arg4 = (int)(val4);
-  if (argc &gt; 4) {
-    res5 = SWIG_AsCharPtrAndSize(argv[4], &amp;buf5, NULL, &amp;alloc5);
-    if (!SWIG_IsOK(res5)) {
-      SWIG_exception_fail(SWIG_ArgError(res5), &quot;in method '&quot; &quot;choose&quot; &quot;', argument &quot; &quot;5&quot;&quot; of type '&quot; &quot;char *&quot;&quot;'&quot;);
-    }
-    arg5 = (char *)(buf5);
-  }
-  choose(arg1,arg2,arg3,arg4,arg5);
-  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
-  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
-  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
-  return Qnil;
-fail:
-  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
-  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
-  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
-  return Qnil;
-}
-
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-
-static swig_type_info _swigt__p_char = {&quot;_p_char&quot;, &quot;char *&quot;, 0, 0, (void*)0, 0};
-
-static swig_type_info *swig_type_initial[] = {
-  &amp;_swigt__p_char,
-};
-
-static swig_cast_info _swigc__p_char[] = {  {&amp;_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
-
-static swig_cast_info *swig_cast_initial[] = {
-  _swigc__p_char,
-};
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
-
-/* -----------------------------------------------------------------------------
- * Type initialization:
- * This problem is tough by the requirement that no dynamic 
- * memory is used. Also, since swig_type_info structures store pointers to 
- * swig_cast_info structures and swig_cast_info structures store pointers back
- * to swig_type_info structures, we need some lookup code at initialization. 
- * The idea is that swig generates all the structures that are needed. 
- * The runtime then collects these partially filled structures. 
- * The SWIG_InitializeModule function takes these initial arrays out of 
- * swig_module, and does all the lookup, filling in the swig_module.types
- * array with the correct data and linking the correct swig_cast_info
- * structures together.
- *
- * The generated swig_type_info structures are assigned staticly to an initial 
- * array. We just loop through that array, and handle each type individually.
- * First we lookup if this type has been already loaded, and if so, use the
- * loaded structure instead of the generated one. Then we have to fill in the
- * cast linked list. The cast data is initially stored in something like a
- * two-dimensional array. Each row corresponds to a type (there are the same
- * number of rows as there are in the swig_type_initial array). Each entry in
- * a column is one of the swig_cast_info structures for that type.
- * The cast_initial array is actually an array of arrays, because each row has
- * a variable number of columns. So to actually build the cast linked list,
- * we find the array of casts associated with the type, and loop through it 
- * adding the casts to the list. The one last trick we need to do is making
- * sure the type pointer in the swig_cast_info struct is correct.
- *
- * First off, we lookup the cast-&gt;type name to see if it is already loaded. 
- * There are three cases to handle:
- *  1) If the cast-&gt;type has already been loaded AND the type we are adding
- *     casting info to has not been loaded (it is in this module), THEN we
- *     replace the cast-&gt;type pointer with the type pointer that has already
- *     been loaded.
- *  2) If BOTH types (the one we are adding casting info to, and the 
- *     cast-&gt;type) are loaded, THEN the cast info has already been loaded by
- *     the previous module so we just ignore it.
- *  3) Finally, if cast-&gt;type has not already been loaded, then we add that
- *     swig_cast_info to the linked list (because the cast-&gt;type) pointer will
- *     be correct.
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#if 0
-} /* c-mode */
-#endif
-#endif
-
-#if 0
-#define SWIGRUNTIME_DEBUG
-#endif
-
-
-SWIGRUNTIME void
-SWIG_InitializeModule(void *clientdata) {
-  size_t i;
-  swig_module_info *module_head, *iter;
-  int found;
-
-  clientdata = clientdata;
-
-  /* check to see if the circular list has been setup, if not, set it up */
-  if (swig_module.next==0) {
-    /* Initialize the swig_module */
-    swig_module.type_initial = swig_type_initial;
-    swig_module.cast_initial = swig_cast_initial;
-    swig_module.next = &amp;swig_module;
-  }
-
-  /* Try and load any already created modules */
-  module_head = SWIG_GetModule(clientdata);
-  if (!module_head) {
-    /* This is the first module loaded for this interpreter */
-    /* so set the swig module into the interpreter */
-    SWIG_SetModule(clientdata, &amp;swig_module);
-    module_head = &amp;swig_module;
-  } else {
-    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
-    found=0;
-    iter=module_head;
-    do {
-      if (iter==&amp;swig_module) {
-        found=1;
-        break;
-      }
-      iter=iter-&gt;next;
-    } while (iter!= module_head);
-
-    /* if the is found in the list, then all is done and we may leave */
-    if (found) return;
-    /* otherwise we must add out module into the list */
-    swig_module.next = module_head-&gt;next;
-    module_head-&gt;next = &amp;swig_module;
-  }
-
-  /* Now work on filling in swig_module.types */
-#ifdef SWIGRUNTIME_DEBUG
-  printf(&quot;SWIG_InitializeModule: size %d\n&quot;, swig_module.size);
-#endif
-  for (i = 0; i &lt; swig_module.size; ++i) {
-    swig_type_info *type = 0;
-    swig_type_info *ret;
-    swig_cast_info *cast;
-  
-#ifdef SWIGRUNTIME_DEBUG
-    printf(&quot;SWIG_InitializeModule: type %d %s\n&quot;, i, swig_module.type_initial[i]-&gt;name);
-#endif
-
-    /* if there is another module already loaded */
-    if (swig_module.next != &amp;swig_module) {
-      type = SWIG_MangledTypeQueryModule(swig_module.next, &amp;swig_module, swig_module.type_initial[i]-&gt;name);
-    }
-    if (type) {
-      /* Overwrite clientdata field */
-#ifdef SWIGRUNTIME_DEBUG
-      printf(&quot;SWIG_InitializeModule: found type %s\n&quot;, type-&gt;name);
-#endif
-      if (swig_module.type_initial[i]-&gt;clientdata) {
-	type-&gt;clientdata = swig_module.type_initial[i]-&gt;clientdata;
-#ifdef SWIGRUNTIME_DEBUG
-      printf(&quot;SWIG_InitializeModule: found and overwrite type %s \n&quot;, type-&gt;name);
-#endif
-      }
-    } else {
-      type = swig_module.type_initial[i];
-    }
-
-    /* Insert casting types */
-    cast = swig_module.cast_initial[i];
-    while (cast-&gt;type) {
-    
-      /* Don't need to add information already in the list */
-      ret = 0;
-#ifdef SWIGRUNTIME_DEBUG
-      printf(&quot;SWIG_InitializeModule: look cast %s\n&quot;, cast-&gt;type-&gt;name);
-#endif
-      if (swig_module.next != &amp;swig_module) {
-        ret = SWIG_MangledTypeQueryModule(swig_module.next, &amp;swig_module, cast-&gt;type-&gt;name);
-#ifdef SWIGRUNTIME_DEBUG
-	if (ret) printf(&quot;SWIG_InitializeModule: found cast %s\n&quot;, ret-&gt;name);
-#endif
-      }
-      if (ret) {
-	if (type == swig_module.type_initial[i]) {
-#ifdef SWIGRUNTIME_DEBUG
-	  printf(&quot;SWIG_InitializeModule: skip old type %s\n&quot;, ret-&gt;name);
-#endif
-	  cast-&gt;type = ret;
-	  ret = 0;
-	} else {
-	  /* Check for casting already in the list */
-	  swig_cast_info *ocast = SWIG_TypeCheck(ret-&gt;name, type);
-#ifdef SWIGRUNTIME_DEBUG
-	  if (ocast) printf(&quot;SWIG_InitializeModule: skip old cast %s\n&quot;, ret-&gt;name);
-#endif
-	  if (!ocast) ret = 0;
-	}
-      }
-
-      if (!ret) {
-#ifdef SWIGRUNTIME_DEBUG
-	printf(&quot;SWIG_InitializeModule: adding cast %s\n&quot;, cast-&gt;type-&gt;name);
-#endif
-        if (type-&gt;cast) {
-          type-&gt;cast-&gt;prev = cast;
-          cast-&gt;next = type-&gt;cast;
-        }
-        type-&gt;cast = cast;
-      }
-      cast++;
-    }
-    /* Set entry in modules-&gt;types array equal to the type */
-    swig_module.types[i] = type;
-  }
-  swig_module.types[i] = 0;
-
-#ifdef SWIGRUNTIME_DEBUG
-  printf(&quot;**** SWIG_InitializeModule: Cast List ******\n&quot;);
-  for (i = 0; i &lt; swig_module.size; ++i) {
-    int j = 0;
-    swig_cast_info *cast = swig_module.cast_initial[i];
-    printf(&quot;SWIG_InitializeModule: type %d %s\n&quot;, i, swig_module.type_initial[i]-&gt;name);
-    while (cast-&gt;type) {
-      printf(&quot;SWIG_InitializeModule: cast type %s\n&quot;, cast-&gt;type-&gt;name);
-      cast++;
-      ++j;
-    }
-  printf(&quot;---- Total casts: %d\n&quot;,j);
-  }
-  printf(&quot;**** SWIG_InitializeModule: Cast List ******\n&quot;);
-#endif
-}
-
-/* This function will propagate the clientdata field of type to
-* any new swig_type_info structures that have been added into the list
-* of equivalent types.  It is like calling
-* SWIG_TypeClientData(type, clientdata) a second time.
-*/
-SWIGRUNTIME void
-SWIG_PropagateClientData(void) {
-  size_t i;
-  swig_cast_info *equiv;
-  static int init_run = 0;
-
-  if (init_run) return;
-  init_run = 1;
-
-  for (i = 0; i &lt; swig_module.size; i++) {
-    if (swig_module.types[i]-&gt;clientdata) {
-      equiv = swig_module.types[i]-&gt;cast;
-      while (equiv) {
-        if (!equiv-&gt;converter) {
-          if (equiv-&gt;type &amp;&amp; !equiv-&gt;type-&gt;clientdata)
-            SWIG_TypeClientData(equiv-&gt;type, swig_module.types[i]-&gt;clientdata);
-        }
-        equiv = equiv-&gt;next;
-      }
-    }
-  }
-}
-
-#ifdef __cplusplus
-#if 0
-{ /* c-mode */
-#endif
-}
-#endif
-
-
-#ifdef __cplusplus
-extern &quot;C&quot;
-#endif
-SWIGEXPORT void Init_DateTimePicker(void) {
-  size_t i;
-  
-  SWIG_InitRuntime();
-  mDateTimePicker = rb_define_module(&quot;DateTimePicker&quot;);
-  
-  SWIG_InitializeModule(0);
-  for (i = 0; i &lt; swig_module.size; i++) {
-    SWIG_define_class(swig_module.types[i]);
-  }
-  
-  SWIG_RubyInitializeTrackings();
-  rb_define_module_function(mDateTimePicker, &quot;choose&quot;, _wrap_choose, -1);
-}
-
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 1.3.31
+ * 
+ * This file is not intended to be easily readable and contains a number of 
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG 
+ * interface file instead. 
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGRUBY
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC)
+#   if (__SUNPRO_CC &lt;= 0x560)
+#     define SWIGTEMPLATEDISAMBIGUATOR template
+#   else
+#     define SWIGTEMPLATEDISAMBIGUATOR 
+#   endif
+# else
+#   define SWIGTEMPLATEDISAMBIGUATOR 
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) &amp;&amp; !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ &gt; 3 || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ &gt;= 4) || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) &amp;&amp; defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility(&quot;default&quot;)))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) &amp;&amp; defined(_MSC_VER) &amp;&amp; !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC)
+#   if (__SUNPRO_CC &lt;= 0x560)
+#     define SWIGTEMPLATEDISAMBIGUATOR template
+#   else
+#     define SWIGTEMPLATEDISAMBIGUATOR 
+#   endif
+# else
+#   define SWIGTEMPLATEDISAMBIGUATOR 
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) &amp;&amp; !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ &gt; 3 || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ &gt;= 4) || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) &amp;&amp; defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility(&quot;default&quot;)))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) &amp;&amp; defined(_MSC_VER) &amp;&amp; !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic CAPI SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION &quot;3&quot;
+
+/* define SWIG_TYPE_TABLE_NAME as &quot;SWIG_TYPE_TABLE&quot; */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the swig runtime code.
+  In 99.9% of the cases, swig just needs to declare them as 'static'.
+  
+  But only do this if is strictly necessary, ie, if you have problems
+  with your compiler or so.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/* 
+   Flags/methods for returning states.
+   
+   The swig conversion methods, as ConvertPtr, return and integer 
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+   
+   Use the following macros/flags to set or process the returning
+   states.
+   
+   In old swig versions, you usually write code as:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit as:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   that seems to be the same, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&amp;ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+    
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   requires also to SWIG_ConvertPtr to return new result values, as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {         
+        if (&lt;obj is ok&gt;) {			       
+          if (&lt;need new object&gt;) {		       
+            *ptr = &lt;ptr to new allocated object&gt;; 
+            return SWIG_NEWOBJ;		       
+          } else {				       
+            *ptr = &lt;ptr to old object&gt;;	       
+            return SWIG_OLDOBJ;		       
+          } 				       
+        } else {				       
+          return SWIG_BADOBJ;		       
+        }					       
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   swig errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+ 
+      food(1)   // cast rank '1'  (1 -&gt; 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+
+
+ */
+#define SWIG_OK                    (0) 
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r &gt;= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 &lt;&lt; 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  &lt;&lt; 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK &lt;&lt; 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r &amp; ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) &amp;&amp; (r &amp; SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r &amp; ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) &amp;&amp; (r &amp; SWIG_TMPOBJMASK))
+
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r &amp; SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) &lt; SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) { 
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+
+
+#include &lt;string.h&gt;
+
+#ifdef __cplusplus
+extern &quot;C&quot; {
+#endif
+
+typedef void *(*swig_converter_func)(void *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store inforomation on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/* 
+  Compare two type names skipping the space characters, therefore
+  &quot;char*&quot; == &quot;char *&quot; and &quot;Class&lt;int&gt;&quot; == &quot;Class&lt;int &gt;&quot;, etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) &amp;&amp; (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') &amp;&amp; (f1 != l1)) ++f1;
+    while ((*f2 == ' ') &amp;&amp; (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 &gt; *f2) ? 1 : -1;
+  }
+  return (l1 - f1) - (l2 - f2);
+}
+
+/*
+  Check type equivalence in a name list like &lt;name1&gt;|&lt;name2&gt;|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv &amp;&amp; *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like &lt;name1&gt;|&lt;name2&gt;|...
+  Return 0 if equal, -1 if nb &lt; tb, 1 if nb &gt; tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv &amp;&amp; *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+
+/* think of this as a c++ template&lt;&gt; or a scheme macro */
+#define SWIG_TypeCheck_Template(comparison, ty)         \
+  if (ty) {                                             \
+    swig_cast_info *iter = ty-&gt;cast;                    \
+    while (iter) {                                      \
+      if (comparison) {                                 \
+        if (iter == ty-&gt;cast) return iter;              \
+        /* Move iter to the top of the linked list */   \
+        iter-&gt;prev-&gt;next = iter-&gt;next;                  \
+        if (iter-&gt;next)                                 \
+          iter-&gt;next-&gt;prev = iter-&gt;prev;                \
+        iter-&gt;next = ty-&gt;cast;                          \
+        iter-&gt;prev = 0;                                 \
+        if (ty-&gt;cast) ty-&gt;cast-&gt;prev = iter;            \
+        ty-&gt;cast = iter;                                \
+        return iter;                                    \
+      }                                                 \
+      iter = iter-&gt;next;                                \
+    }                                                   \
+  }                                                     \
+  return 0
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  SWIG_TypeCheck_Template(strcmp(iter-&gt;type-&gt;name, c) == 0, ty);
+}
+
+/* Same as previous function, except strcmp is replaced with a pointer comparison */
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
+  SWIG_TypeCheck_Template(iter-&gt;type == from, into);
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
+  return ((!ty) || (!ty-&gt;converter)) ? ptr : (*ty-&gt;converter)(ptr);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty-&gt;dcast) return ty;
+  while (ty &amp;&amp; (ty-&gt;dcast)) {
+    ty = (*ty-&gt;dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty-&gt;name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The &quot;str&quot; field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type-&gt;str != NULL) {
+    const char *last_name = type-&gt;str;
+    const char *s;
+    for (s = type-&gt;str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type-&gt;name;
+}
+
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti-&gt;cast;
+  /* if (ti-&gt;clientdata == clientdata) return; */
+  ti-&gt;clientdata = clientdata;
+  
+  while (cast) {
+    if (!cast-&gt;converter) {
+      swig_type_info *tc = cast-&gt;type;
+      if (!tc-&gt;clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }    
+    cast = cast-&gt;next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti-&gt;owndata = 1;
+}
+  
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start, 
+                            swig_module_info *end, 
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter-&gt;size) {
+      register size_t l = 0;
+      register size_t r = iter-&gt;size - 1;
+      do {
+	/* since l+r &gt;= 0, we can (&gt;&gt; 1) instead (/ 2) */
+	register size_t i = (l + r) &gt;&gt; 1; 
+	const char *iname = iter-&gt;types[i]-&gt;name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {	    
+	    return iter-&gt;types[i];
+	  } else if (compare &lt; 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare &gt; 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l &lt;= r);
+    }
+    iter = iter-&gt;next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start, 
+                     swig_module_info *end, 
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i &lt; iter-&gt;size; ++i) {
+	if (iter-&gt;types[i]-&gt;str &amp;&amp; (SWIG_TypeEquiv(iter-&gt;types[i]-&gt;str, name)))
+	  return iter-&gt;types[i];
+      }
+      iter = iter-&gt;next;
+    } while (iter != end);
+  }
+  
+  /* neither found a match */
+  return 0;
+}
+
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = &quot;0123456789abcdef&quot;;
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu &amp; 0xf0) &gt;&gt; 4];
+    *(c++) = hex[uu &amp; 0xf];
+  }
+  return c;
+}
+
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d &gt;= '0') &amp;&amp; (d &lt;= '9'))
+      uu = ((d - '0') &lt;&lt; 4);
+    else if ((d &gt;= 'a') &amp;&amp; (d &lt;= 'f'))
+      uu = ((d - ('a'-10)) &lt;&lt; 4);
+    else 
+      return (char *) 0;
+    d = *(c++);
+    if ((d &gt;= '0') &amp;&amp; (d &lt;= '9'))
+      uu |= (d - '0');
+    else if ((d &gt;= 'a') &amp;&amp; (d &lt;= 'f'))
+      uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) &gt; bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&amp;ptr,sizeof(void *));
+  if (strlen(name) + 1 &gt; (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,&quot;NULL&quot;) == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) &gt; bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,&quot;NULL&quot;) == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1 
+#define  SWIG_IOError        	   -2 
+#define  SWIG_RuntimeError   	   -3 
+#define  SWIG_IndexError     	   -4 
+#define  SWIG_TypeError      	   -5 
+#define  SWIG_DivisionByZero 	   -6 
+#define  SWIG_OverflowError  	   -7 
+#define  SWIG_SyntaxError    	   -8 
+#define  SWIG_ValueError     	   -9 
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12 
+#define  SWIG_NullReferenceError   -13
+
+
+
+#include &lt;ruby.h&gt;
+
+/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
+#ifndef NUM2LL
+#define NUM2LL(x) NUM2LONG((x))
+#endif
+#ifndef LL2NUM
+#define LL2NUM(x) INT2NUM((long) (x))
+#endif
+#ifndef ULL2NUM
+#define ULL2NUM(x) UINT2NUM((unsigned long) (x))
+#endif
+
+/* Ruby 1.7 doesn't (yet) define NUM2ULL() */
+#ifndef NUM2ULL
+#ifdef HAVE_LONG_LONG
+#define NUM2ULL(x) rb_num2ull((x))
+#else
+#define NUM2ULL(x) NUM2ULONG(x)
+#endif
+#endif
+
+/* RSTRING_LEN, etc are new in Ruby 1.9, but -&gt;ptr and -&gt;len no longer work */
+/* Define these for older versions so we can just write code the new way */
+#ifndef RSTRING_LEN
+# define RSTRING_LEN(x) RSTRING(x)-&gt;len
+#endif
+#ifndef RSTRING_PTR
+# define RSTRING_PTR(x) RSTRING(x)-&gt;ptr
+#endif
+#ifndef RARRAY_LEN
+# define RARRAY_LEN(x) RARRAY(x)-&gt;len
+#endif
+#ifndef RARRAY_PTR
+# define RARRAY_PTR(x) RARRAY(x)-&gt;ptr
+#endif
+
+/*
+ * Need to be very careful about how these macros are defined, especially
+ * when compiling C++ code or C code with an ANSI C compiler.
+ *
+ * VALUEFUNC(f) is a macro used to typecast a C function that implements
+ * a Ruby method so that it can be passed as an argument to API functions
+ * like rb_define_method() and rb_define_singleton_method().
+ *
+ * VOIDFUNC(f) is a macro used to typecast a C function that implements
+ * either the &quot;mark&quot; or &quot;free&quot; stuff for a Ruby Data object, so that it
+ * can be passed as an argument to API functions like Data_Wrap_Struct()
+ * and Data_Make_Struct().
+ */
+ 
+#ifdef __cplusplus
+#  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
+#    define PROTECTFUNC(f) ((VALUE (*)()) f)
+#    define VALUEFUNC(f) ((VALUE (*)()) f)
+#    define VOIDFUNC(f)  ((void (*)()) f)
+#  else
+#    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
+#      define PROTECTFUNC(f) ((VALUE (*)()) f)
+#      define VALUEFUNC(f) ((VALUE (*)()) f)
+#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
+#    else /* These definitions should work for Ruby 1.7+ */
+#      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
+#      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
+#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
+#    endif
+#  endif
+#else
+#  define VALUEFUNC(f) (f)
+#  define VOIDFUNC(f) (f)
+#endif
+
+/* Don't use for expressions have side effect */
+#ifndef RB_STRING_VALUE
+#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&amp;(s) = rb_str_to_str(s)))
+#endif
+#ifndef StringValue
+#define StringValue(s) RB_STRING_VALUE(s)
+#endif
+#ifndef StringValuePtr
+#define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
+#endif
+#ifndef StringValueLen
+#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
+#endif
+#ifndef SafeStringValue
+#define SafeStringValue(v) do {\
+    StringValue(v);\
+    rb_check_safe_str(v);\
+} while (0)
+#endif
+
+#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
+#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), &quot;new&quot;, VALUEFUNC((func)), -1)
+#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), &quot;new&quot;)
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+
+/* Define some additional error types */
+#define SWIG_ObjectPreviouslyDeletedError  -100
+
+
+/* Define custom exceptions for errors that do not map to existing Ruby
+   exceptions.  Note this only works for C++ since a global cannot be
+   initialized by a funtion in C.  For C, fallback to rb_eRuntimeError.*/
+
+SWIGINTERN VALUE 
+getNullReferenceError(void) {
+  static int init = 0;
+  static VALUE rb_eNullReferenceError ;
+  if (!init) {
+    init = 1;
+    rb_eNullReferenceError = rb_define_class(&quot;NullReferenceError&quot;, rb_eRuntimeError);
+  }
+  return rb_eNullReferenceError;
+} 
+
+SWIGINTERN VALUE 
+getObjectPreviouslyDeletedError(void) {
+  static int init = 0;
+  static VALUE rb_eObjectPreviouslyDeleted ;
+  if (!init) {
+    init = 1;
+    rb_eObjectPreviouslyDeleted = rb_define_class(&quot;ObjectPreviouslyDeleted&quot;, rb_eRuntimeError);
+  }
+  return rb_eObjectPreviouslyDeleted;
+} 
+
+
+SWIGINTERN VALUE
+SWIG_Ruby_ErrorType(int SWIG_code) {
+  VALUE type;
+  switch (SWIG_code) {
+  case SWIG_MemoryError:
+    type = rb_eNoMemError;
+    break;
+  case SWIG_IOError:
+    type = rb_eIOError;
+    break;
+  case SWIG_RuntimeError:
+    type = rb_eRuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = rb_eIndexError;
+    break;
+  case SWIG_TypeError:
+    type = rb_eTypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = rb_eZeroDivError;
+    break;
+  case SWIG_OverflowError:
+    type = rb_eRangeError;
+    break;
+  case SWIG_SyntaxError:
+    type = rb_eSyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = rb_eArgError;
+    break;
+  case SWIG_SystemError:
+    type = rb_eFatal;
+    break;
+  case SWIG_AttributeError:
+    type = rb_eRuntimeError;
+    break;
+  case SWIG_NullReferenceError:
+    type = getNullReferenceError();
+    break;
+  case SWIG_ObjectPreviouslyDeletedError:
+    type = getObjectPreviouslyDeletedError();
+    break;
+  case SWIG_UnknownError:
+    type = rb_eRuntimeError;
+    break;
+  default:
+    type = rb_eRuntimeError;
+  }
+  return type;
+}
+
+
+
+
+/* -----------------------------------------------------------------------------
+ * See the LICENSE file for information on copyright, usage and redistribution
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
+ *
+ * rubytracking.swg
+ *
+ * This file contains support for tracking mappings from 
+ * Ruby objects to C++ objects.  This functionality is needed
+ * to implement mark functions for Ruby's mark and sweep
+ * garbage collector.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern &quot;C&quot; {
+#endif
+
+
+/* Global Ruby hash table to store Trackings from C/C++
+   structs to Ruby Objects. */
+static VALUE swig_ruby_trackings;
+
+/* Global variable that stores a reference to the ruby
+   hash table delete function. */
+static ID swig_ruby_hash_delete = 0;
+
+/* Setup a Ruby hash table to store Trackings */
+SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
+  /* Create a ruby hash table to store Trackings from C++ 
+     objects to Ruby objects.  Also make sure to tell
+     the garabage collector about the hash table. */
+  swig_ruby_trackings = rb_hash_new();
+  rb_gc_register_address(&amp;swig_ruby_trackings);
+  
+  /* Now store a reference to the hash table delete function
+     so that we only have to look it up once.*/
+  swig_ruby_hash_delete = rb_intern(&quot;delete&quot;);
+}
+
+/* Get a Ruby number to reference a pointer */
+SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
+  /* We cast the pointer to an unsigned long
+     and then store a reference to it using
+     a Ruby number object. */
+
+  /* Convert the pointer to a Ruby number */
+  unsigned long value = (unsigned long) ptr;
+  return LONG2NUM(value);
+}
+
+/* Get a Ruby number to reference an object */
+SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
+  /* We cast the object to an unsigned long
+     and then store a reference to it using
+     a Ruby number object. */
+
+  /* Convert the Object to a Ruby number */
+  unsigned long value = (unsigned long) object;
+  return LONG2NUM(value);
+}
+
+/* Get a Ruby object from a previously stored reference */
+SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
+  /* The provided Ruby number object is a reference
+     to the Ruby object we want.*/
+
+  /* First convert the Ruby number to a C number */
+  unsigned long value = NUM2LONG(reference);
+  return (VALUE) value;
+}
+
+/* Add a Tracking from a C/C++ struct to a Ruby object */
+SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
+  /* In a Ruby hash table we store the pointer and
+     the associated Ruby object.  The trick here is
+     that we cannot store the Ruby object directly - if
+     we do then it cannot be garbage collected.  So
+     instead we typecast it as a unsigned long and
+     convert it to a Ruby number object.*/
+
+  /* Get a reference to the pointer as a Ruby number */
+  VALUE key = SWIG_RubyPtrToReference(ptr);
+
+  /* Get a reference to the Ruby object as a Ruby number */
+  VALUE value = SWIG_RubyObjectToReference(object);
+
+  /* Store the mapping to the global hash table. */
+  rb_hash_aset(swig_ruby_trackings, key, value);
+}
+
+/* Get the Ruby object that owns the specified C/C++ struct */
+SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
+  /* Get a reference to the pointer as a Ruby number */
+  VALUE key = SWIG_RubyPtrToReference(ptr);
+
+  /* Now lookup the value stored in the global hash table */
+  VALUE value = rb_hash_aref(swig_ruby_trackings, key);
+	
+  if (value == Qnil) {
+    /* No object exists - return nil. */
+    return Qnil;
+  }
+  else {
+    /* Convert this value to Ruby object */
+    return SWIG_RubyReferenceToObject(value);
+  }
+}
+
+/* Remove a Tracking from a C/C++ struct to a Ruby object.  It
+   is very important to remove objects once they are destroyed
+   since the same memory address may be reused later to create
+   a new object. */
+SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
+  /* Get a reference to the pointer as a Ruby number */
+  VALUE key = SWIG_RubyPtrToReference(ptr);
+
+  /* Delete the object from the hash table by calling Ruby's
+     do this we need to call the Hash.delete method.*/
+  rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
+}
+
+/* This is a helper method that unlinks a Ruby object from its
+   underlying C++ object.  This is needed if the lifetime of the
+   Ruby object is longer than the C++ object */
+SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
+  VALUE object = SWIG_RubyInstanceFor(ptr);
+
+  if (object != Qnil) {
+    DATA_PTR(object) = 0;
+  }
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Ruby API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern &quot;C&quot; {
+#endif
+
+SWIGINTERN VALUE
+SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
+  if (NIL_P(target)) {
+    target = o;
+  } else {
+    if (TYPE(target) != T_ARRAY) {
+      VALUE o2 = target;
+      target = rb_ary_new();
+      rb_ary_push(target, o2);
+    }
+    rb_ary_push(target, o);
+  }
+  return target;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * See the LICENSE file for information on copyright, usage and redistribution
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
+ *
+ * rubyrun.swg
+ *
+ * This file contains the runtime support for Ruby modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* For backward compatibility only */
+#define SWIG_POINTER_EXCEPTION  0
+
+/* for raw pointers */
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
+#define SWIG_AcquirePtr(ptr, own)                       SWIG_Ruby_AcquirePtr(ptr, own)
+#define swig_owntype                                    ruby_owntype
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Ruby_GetModule()	
+#define SWIG_SetModule(clientdata, pointer) 		SWIG_Ruby_SetModule(pointer)
+
+
+/* Error manipulation */
+
+#define SWIG_ErrorType(code)                            SWIG_Ruby_ErrorType(code)               
+#define SWIG_Error(code, msg)            		rb_raise(SWIG_Ruby_ErrorType(code), msg)
+#define SWIG_fail                        		goto fail				 
+
+
+/* Ruby-specific SWIG API */
+
+#define SWIG_InitRuntime()                              SWIG_Ruby_InitRuntime()              
+#define SWIG_define_class(ty)                        	SWIG_Ruby_define_class(ty)
+#define SWIG_NewClassInstance(value, ty)             	SWIG_Ruby_NewClassInstance(value, ty)
+#define SWIG_MangleStr(value)                        	SWIG_Ruby_MangleStr(value)		  
+#define SWIG_CheckConvert(value, ty)                 	SWIG_Ruby_CheckConvert(value, ty)	  
+
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern &quot;C&quot; {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+typedef struct {
+  VALUE klass;
+  VALUE mImpl;
+  void  (*mark)(void *);
+  void  (*destroy)(void *);
+  int trackObjects;
+} swig_class;
+
+
+static VALUE _mSWIG = Qnil;
+static VALUE _cSWIG_Pointer = Qnil;
+static VALUE swig_runtime_data_type_pointer = Qnil;
+
+SWIGRUNTIME VALUE 
+getExceptionClass(void) {
+  static int init = 0;
+  static VALUE rubyExceptionClass ;
+  if (!init) {
+    init = 1;
+    rubyExceptionClass = rb_const_get(_mSWIG, rb_intern(&quot;Exception&quot;));
+  }
+  return rubyExceptionClass;
+} 
+
+/* This code checks to see if the Ruby object being raised as part
+   of an exception inherits from the Ruby class Exception.  If so,
+   the object is simply returned.  If not, then a new Ruby exception
+   object is created and that will be returned to Ruby.*/
+SWIGRUNTIME VALUE
+SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
+  VALUE exceptionClass = getExceptionClass();
+  if (rb_obj_is_kind_of(obj, exceptionClass)) {
+    return obj;
+  }  else {
+    return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
+  }
+}
+
+/* Initialize Ruby runtime support */
+SWIGRUNTIME void
+SWIG_Ruby_InitRuntime(void)
+{
+  if (_mSWIG == Qnil) {
+    _mSWIG = rb_define_module(&quot;SWIG&quot;);
+  }
+}
+
+/* Define Ruby class for C type */
+SWIGRUNTIME void
+SWIG_Ruby_define_class(swig_type_info *type)
+{
+  VALUE klass;
+  char *klass_name = (char *) malloc(4 + strlen(type-&gt;name) + 1);
+  sprintf(klass_name, &quot;TYPE%s&quot;, type-&gt;name);
+  if (NIL_P(_cSWIG_Pointer)) {
+    _cSWIG_Pointer = rb_define_class_under(_mSWIG, &quot;Pointer&quot;, rb_cObject);
+    rb_undef_method(CLASS_OF(_cSWIG_Pointer), &quot;new&quot;);
+  }
+  klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
+  free((void *) klass_name);
+}
+
+/* Create a new pointer object */
+SWIGRUNTIME VALUE
+SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
+{
+  int own =  flags &amp; SWIG_POINTER_OWN; 
+  
+  char *klass_name;
+  swig_class *sklass;
+  VALUE klass;
+  VALUE obj;
+  
+  if (!ptr)
+    return Qnil;
+  
+  if (type-&gt;clientdata) {
+    sklass = (swig_class *) type-&gt;clientdata;
+		
+    /* Are we tracking this class and have we already returned this Ruby object? */
+    if (sklass-&gt;trackObjects) {
+      obj = SWIG_RubyInstanceFor(ptr);
+      
+      /* Check the object's type and make sure it has the correct type.
+        It might not in cases where methods do things like 
+        downcast methods. */
+      if (obj != Qnil) {
+        VALUE value = rb_iv_get(obj, &quot;__swigtype__&quot;);
+        char* type_name = RSTRING_PTR(value);
+				
+        if (strcmp(type-&gt;name, type_name) == 0) {
+          return obj;
+        }
+      }
+    }
+
+    /* Create a new Ruby object */
+    obj = Data_Wrap_Struct(sklass-&gt;klass, VOIDFUNC(sklass-&gt;mark), (own ? VOIDFUNC(sklass-&gt;destroy) : 0), ptr);
+
+    /* If tracking is on for this class then track this object. */
+    if (sklass-&gt;trackObjects) {
+      SWIG_RubyAddTracking(ptr, obj);
+    }
+  } else {
+    klass_name = (char *) malloc(4 + strlen(type-&gt;name) + 1);
+    sprintf(klass_name, &quot;TYPE%s&quot;, type-&gt;name);
+    klass = rb_const_get(_mSWIG, rb_intern(klass_name));
+    free((void *) klass_name);
+    obj = Data_Wrap_Struct(klass, 0, 0, ptr);
+  }
+  rb_iv_set(obj, &quot;__swigtype__&quot;, rb_str_new2(type-&gt;name));
+  
+  return obj;
+}
+
+/* Create a new class instance (always owned) */
+SWIGRUNTIME VALUE
+SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
+{
+  VALUE obj;
+  swig_class *sklass = (swig_class *) type-&gt;clientdata;
+  obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass-&gt;mark), VOIDFUNC(sklass-&gt;destroy), 0);
+  rb_iv_set(obj, &quot;__swigtype__&quot;, rb_str_new2(type-&gt;name));
+  return obj;
+}
+
+/* Get type mangle from class name */
+SWIGRUNTIMEINLINE char *
+SWIG_Ruby_MangleStr(VALUE obj)
+{
+  VALUE stype = rb_iv_get(obj, &quot;__swigtype__&quot;);
+  return StringValuePtr(stype);
+}
+
+/* Acquire a pointer value */
+typedef void (*ruby_owntype)(void*);
+
+SWIGRUNTIME ruby_owntype
+SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
+  if (obj) {
+    ruby_owntype oldown = RDATA(obj)-&gt;dfree;
+    RDATA(obj)-&gt;dfree = own;
+    return oldown;
+  } else {
+    return 0;
+  }
+}
+
+/* Convert a pointer value */
+SWIGRUNTIME int
+SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
+{
+  char *c;
+  swig_cast_info *tc;
+  void *vptr = 0;
+
+  /* Grab the pointer */
+  if (NIL_P(obj)) {
+    *ptr = 0;
+    return SWIG_OK;
+  } else {
+    if (TYPE(obj) != T_DATA) {
+      return SWIG_ERROR;
+    }
+    Data_Get_Struct(obj, void, vptr);
+  }
+  
+  if (own) *own = RDATA(obj)-&gt;dfree;
+    
+  /* Check to see if the input object is giving up ownership
+     of the underlying C struct or C++ object.  If so then we
+     need to reset the destructor since the Ruby object no 
+     longer owns the underlying C++ object.*/ 
+  if (flags &amp; SWIG_POINTER_DISOWN) {
+    /* Is tracking on for this class? */
+    int track = 0;
+    if (ty &amp;&amp; ty-&gt;clientdata) {
+      swig_class *sklass = (swig_class *) ty-&gt;clientdata;
+      track = sklass-&gt;trackObjects;
+    }
+		
+    if (track) {
+      /* We are tracking objects for this class.  Thus we change the destructor
+       * to SWIG_RubyRemoveTracking.  This allows us to
+       * remove the mapping from the C++ to Ruby object
+       * when the Ruby object is garbage collected.  If we don't
+       * do this, then it is possible we will return a reference 
+       * to a Ruby object that no longer exists thereby crashing Ruby. */
+      RDATA(obj)-&gt;dfree = SWIG_RubyRemoveTracking;
+    } else {    
+      RDATA(obj)-&gt;dfree = 0;
+    }
+  }
+
+  /* Do type-checking if type info was provided */
+  if (ty) {
+    if (ty-&gt;clientdata) {
+      if (rb_obj_is_kind_of(obj, ((swig_class *) (ty-&gt;clientdata))-&gt;klass)) {
+        if (vptr == 0) {
+          /* The object has already been deleted */
+          return SWIG_ObjectPreviouslyDeletedError;
+        }
+        *ptr = vptr;
+        return SWIG_OK;
+      }
+    }
+    if ((c = SWIG_MangleStr(obj)) == NULL) {
+      return SWIG_ERROR;
+    }
+    tc = SWIG_TypeCheck(c, ty);
+    if (!tc) {
+      return SWIG_ERROR;
+    }
+    *ptr = SWIG_TypeCast(tc, vptr);
+  } else {
+    *ptr = vptr;
+  }
+  
+  return SWIG_OK;
+}
+
+/* Check convert */
+SWIGRUNTIMEINLINE int
+SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
+{
+  char *c = SWIG_MangleStr(obj);
+  if (!c) return 0;
+  return SWIG_TypeCheck(c,ty) != 0;
+}
+
+SWIGRUNTIME VALUE
+SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
+  char result[1024];
+  char *r = result;
+  if ((2*sz + 1 + strlen(type-&gt;name)) &gt; 1000) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r, ptr, sz);
+  strcpy(r, type-&gt;name);
+  return rb_str_new2(result);
+}
+
+/* Convert a packed value value */
+SWIGRUNTIME int
+SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
+  swig_cast_info *tc;
+  const char  *c;
+
+  if (TYPE(obj) != T_STRING) goto type_error;
+  c = StringValuePtr(obj);
+  /* Pointer values must start with leading underscore */
+  if (*c != '_') goto type_error;
+  c++;
+  c = SWIG_UnpackData(c, ptr, sz);
+  if (ty) {
+    tc = SWIG_TypeCheck(c, ty);
+    if (!tc) goto type_error;
+  }
+  return SWIG_OK;
+
+ type_error:
+  return SWIG_ERROR;
+}
+
+SWIGRUNTIME swig_module_info *
+SWIG_Ruby_GetModule(void)
+{
+  VALUE pointer;
+  swig_module_info *ret = 0;
+  VALUE verbose = rb_gv_get(&quot;VERBOSE&quot;);
+
+ /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
+  rb_gv_set(&quot;VERBOSE&quot;, Qfalse);
+  
+  /* first check if pointer already created */
+  pointer = rb_gv_get(&quot;$swig_runtime_data_type_pointer&quot; SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
+  if (pointer != Qnil) {
+    Data_Get_Struct(pointer, swig_module_info, ret);
+  }
+
+  /* reinstate warnings */
+  rb_gv_set(&quot;VERBOSE&quot;, verbose);
+  return ret;
+}
+
+SWIGRUNTIME void 
+SWIG_Ruby_SetModule(swig_module_info *pointer)
+{
+  /* register a new class */
+  VALUE cl = rb_define_class(&quot;swig_runtime_data&quot;, rb_cObject);
+  /* create and store the structure pointer to a global variable */
+  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
+  rb_define_readonly_variable(&quot;$swig_runtime_data_type_pointer&quot; SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &amp;swig_runtime_data_type_pointer);
+}
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_char swig_types[0]
+static swig_type_info *swig_types[2];
+static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&amp;swig_module, &amp;swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&amp;swig_module, &amp;swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#define SWIG_init    Init_DateTimePicker
+#define SWIG_name    &quot;DateTimePicker&quot;
+
+static VALUE mDateTimePicker;
+
+#define SWIGVERSION 0x010331 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
+
+
+	extern void choose_datetime(char* callback, char* title, long initial_time, int format, char* data);
+	#define choose choose_datetime
+
+
+SWIGINTERN swig_type_info*
+SWIG_pchar_descriptor(void)
+{
+  static int init = 0;
+  static swig_type_info* info = 0;
+  if (!init) {
+    info = SWIG_TypeQuery(&quot;_p_char&quot;);
+    init = 1;
+  }
+  return info;
+}
+
+
+SWIGINTERN int
+SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
+{
+  if (TYPE(obj) == T_STRING) {
+    
+
+
+    char *cstr = STR2CSTR(obj);
+    
+    size_t size = RSTRING_LEN(obj) + 1;
+    if (cptr)  {
+      if (alloc) {
+	if (*alloc == SWIG_NEWOBJ) {
+	  *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
+	} else {
+	  *cptr = cstr;
+	  *alloc = SWIG_OLDOBJ;
+	}
+      }
+    }
+    if (psize) *psize = size;
+    return SWIG_OK;
+  } else {
+    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+    if (pchar_descriptor) {
+      void* vptr = 0;
+      if (SWIG_ConvertPtr(obj, &amp;vptr, pchar_descriptor, 0) == SWIG_OK) {
+	if (cptr) *cptr = (char *)vptr;
+	if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
+	if (alloc) *alloc = SWIG_OLDOBJ;
+	return SWIG_OK;
+      }
+    }
+  }  
+  return SWIG_TypeError;
+}
+
+
+
+
+
+#include &lt;limits.h&gt;
+#ifndef LLONG_MIN
+# define LLONG_MIN	LONG_LONG_MIN
+#endif
+#ifndef LLONG_MAX
+# define LLONG_MAX	LONG_LONG_MAX
+#endif
+#ifndef ULLONG_MAX
+# define ULLONG_MAX	ULONG_LONG_MAX
+#endif
+
+
+SWIGINTERN VALUE
+SWIG_ruby_failed(void)
+{
+  return Qnil;
+} 
+
+
+/*@SWIG:%ruby_aux_method@*/
+SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
+{
+  VALUE obj = args[0];
+  VALUE type = TYPE(obj);
+  long *res = (long *)(args[1]);
+  *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
+  return obj;
+}
+/*@SWIG@*/
+
+SWIGINTERN int
+SWIG_AsVal_long (VALUE obj, long* val)
+{
+  VALUE type = TYPE(obj);
+  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
+    long v;
+    VALUE a[2];
+    a[0] = obj;
+    a[1] = (VALUE)(&amp;v);
+    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
+      if (val) *val = v;
+      return SWIG_OK;
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (VALUE obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &amp;v);
+  if (SWIG_IsOK(res)) {
+    if ((v &lt; INT_MIN || v &gt; INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+SWIGINTERN VALUE
+_wrap_choose(int argc, VALUE *argv, VALUE self) {
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  long arg3 ;
+  int arg4 ;
+  char *arg5 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  
+  {
+    arg5 = NULL;
+  }
+  if ((argc &lt; 4) || (argc &gt; 5)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 4)&quot;,argc); SWIG_fail;
+  }
+  res1 = SWIG_AsCharPtrAndSize(argv[0], &amp;buf1, NULL, &amp;alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), &quot;in method '&quot; &quot;choose&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;char *&quot;&quot;'&quot;);
+  }
+  arg1 = (char *)(buf1);
+  res2 = SWIG_AsCharPtrAndSize(argv[1], &amp;buf2, NULL, &amp;alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), &quot;in method '&quot; &quot;choose&quot; &quot;', argument &quot; &quot;2&quot;&quot; of type '&quot; &quot;char *&quot;&quot;'&quot;);
+  }
+  arg2 = (char *)(buf2);
+  {
+    VALUE t;
+    long val;
+    VALUE class;
+    VALUE class_str;
+    char *class_val;
+    
+    class = rb_funcall(argv[2], rb_intern(&quot;class&quot;), 0);
+    class_str = rb_funcall(class, rb_intern(&quot;to_s&quot;), 0);
+    class_val = StringValuePtr(class_str);
+    
+    if (!strcmp(class_val, &quot;Time&quot;) == 0) {
+      rb_raise(SWIG_Ruby_ErrorType(SWIG_AttributeError), &quot; of type '&quot; &quot;Time&quot;&quot;'&quot;);
+    }
+    t = rb_funcall(argv[2], rb_intern(&quot;to_i&quot;), 0);
+    val = NUM2INT(t);
+    arg3 = (long)val;
+  }
+  ecode4 = SWIG_AsVal_int(argv[3], &amp;val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), &quot;in method '&quot; &quot;choose&quot; &quot;', argument &quot; &quot;4&quot;&quot; of type '&quot; &quot;int&quot;&quot;'&quot;);
+  } 
+  arg4 = (int)(val4);
+  if (argc &gt; 4) {
+    res5 = SWIG_AsCharPtrAndSize(argv[4], &amp;buf5, NULL, &amp;alloc5);
+    if (!SWIG_IsOK(res5)) {
+      SWIG_exception_fail(SWIG_ArgError(res5), &quot;in method '&quot; &quot;choose&quot; &quot;', argument &quot; &quot;5&quot;&quot; of type '&quot; &quot;char *&quot;&quot;'&quot;);
+    }
+    arg5 = (char *)(buf5);
+  }
+  choose(arg1,arg2,arg3,arg4,arg5);
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return Qnil;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return Qnil;
+}
+
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static swig_type_info _swigt__p_char = {&quot;_p_char&quot;, &quot;char *&quot;, 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &amp;_swigt__p_char,
+};
+
+static swig_cast_info _swigc__p_char[] = {  {&amp;_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_char,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic 
+ * memory is used. Also, since swig_type_info structures store pointers to 
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization. 
+ * The idea is that swig generates all the structures that are needed. 
+ * The runtime then collects these partially filled structures. 
+ * The SWIG_InitializeModule function takes these initial arrays out of 
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial 
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it 
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast-&gt;type name to see if it is already loaded. 
+ * There are three cases to handle:
+ *  1) If the cast-&gt;type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast-&gt;type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the 
+ *     cast-&gt;type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast-&gt;type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast-&gt;type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern &quot;C&quot; {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found;
+
+  clientdata = clientdata;
+
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &amp;swig_module;
+  }
+
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &amp;swig_module);
+    module_head = &amp;swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&amp;swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter-&gt;next;
+    } while (iter!= module_head);
+
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head-&gt;next;
+    module_head-&gt;next = &amp;swig_module;
+  }
+
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf(&quot;SWIG_InitializeModule: size %d\n&quot;, swig_module.size);
+#endif
+  for (i = 0; i &lt; swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+  
+#ifdef SWIGRUNTIME_DEBUG
+    printf(&quot;SWIG_InitializeModule: type %d %s\n&quot;, i, swig_module.type_initial[i]-&gt;name);
+#endif
+
+    /* if there is another module already loaded */
+    if (swig_module.next != &amp;swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &amp;swig_module, swig_module.type_initial[i]-&gt;name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf(&quot;SWIG_InitializeModule: found type %s\n&quot;, type-&gt;name);
+#endif
+      if (swig_module.type_initial[i]-&gt;clientdata) {
+	type-&gt;clientdata = swig_module.type_initial[i]-&gt;clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+      printf(&quot;SWIG_InitializeModule: found and overwrite type %s \n&quot;, type-&gt;name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast-&gt;type) {
+    
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf(&quot;SWIG_InitializeModule: look cast %s\n&quot;, cast-&gt;type-&gt;name);
+#endif
+      if (swig_module.next != &amp;swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &amp;swig_module, cast-&gt;type-&gt;name);
+#ifdef SWIGRUNTIME_DEBUG
+	if (ret) printf(&quot;SWIG_InitializeModule: found cast %s\n&quot;, ret-&gt;name);
+#endif
+      }
+      if (ret) {
+	if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+	  printf(&quot;SWIG_InitializeModule: skip old type %s\n&quot;, ret-&gt;name);
+#endif
+	  cast-&gt;type = ret;
+	  ret = 0;
+	} else {
+	  /* Check for casting already in the list */
+	  swig_cast_info *ocast = SWIG_TypeCheck(ret-&gt;name, type);
+#ifdef SWIGRUNTIME_DEBUG
+	  if (ocast) printf(&quot;SWIG_InitializeModule: skip old cast %s\n&quot;, ret-&gt;name);
+#endif
+	  if (!ocast) ret = 0;
+	}
+      }
+
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+	printf(&quot;SWIG_InitializeModule: adding cast %s\n&quot;, cast-&gt;type-&gt;name);
+#endif
+        if (type-&gt;cast) {
+          type-&gt;cast-&gt;prev = cast;
+          cast-&gt;next = type-&gt;cast;
+        }
+        type-&gt;cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules-&gt;types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+
+#ifdef SWIGRUNTIME_DEBUG
+  printf(&quot;**** SWIG_InitializeModule: Cast List ******\n&quot;);
+  for (i = 0; i &lt; swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf(&quot;SWIG_InitializeModule: type %d %s\n&quot;, i, swig_module.type_initial[i]-&gt;name);
+    while (cast-&gt;type) {
+      printf(&quot;SWIG_InitializeModule: cast type %s\n&quot;, cast-&gt;type-&gt;name);
+      cast++;
+      ++j;
+    }
+  printf(&quot;---- Total casts: %d\n&quot;,j);
+  }
+  printf(&quot;**** SWIG_InitializeModule: Cast List ******\n&quot;);
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+
+  if (init_run) return;
+  init_run = 1;
+
+  for (i = 0; i &lt; swig_module.size; i++) {
+    if (swig_module.types[i]-&gt;clientdata) {
+      equiv = swig_module.types[i]-&gt;cast;
+      while (equiv) {
+        if (!equiv-&gt;converter) {
+          if (equiv-&gt;type &amp;&amp; !equiv-&gt;type-&gt;clientdata)
+            SWIG_TypeClientData(equiv-&gt;type, swig_module.types[i]-&gt;clientdata);
+        }
+        equiv = equiv-&gt;next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{ /* c-mode */
+#endif
+}
+#endif
+
+
+#ifdef __cplusplus
+extern &quot;C&quot;
+#endif
+SWIGEXPORT void Init_DateTimePicker(void) {
+  size_t i;
+  
+  SWIG_InitRuntime();
+  mDateTimePicker = rb_define_module(&quot;DateTimePicker&quot;);
+  
+  SWIG_InitializeModule(0);
+  for (i = 0; i &lt; swig_module.size; i++) {
+    SWIG_define_class(swig_module.types[i]);
+  }
+  
+  SWIG_RubyInitializeTrackings();
+  rb_define_module_function(mDateTimePicker, &quot;choose&quot;, _wrap_choose, -1);
+}
+</diff>
      <filename>platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c</filename>
    </modified>
    <modified>
      <diff>@@ -52,8 +52,6 @@ fail:
 extern &quot;C&quot;
 #endif
 void Init_GeoLocation(void) {
-  size_t i;
-  
   mGeoLocation = rb_define_module(&quot;GeoLocation&quot;);
   
   rb_define_module_function(mGeoLocation, &quot;latitude&quot;, wrap_geo_latitude, -1);</diff>
      <filename>platform/shared/ruby/ext/geolocation/geolocation_rhowrap.c</filename>
    </modified>
    <modified>
      <diff>@@ -12,13 +12,13 @@
 	char **ret_val;
 	if (input_arr) {
 	 	len = RARRAY_LEN(input_arr);
-		ret_val = (char **)malloc(3*len*sizeof(char*));
+		ret_val = (char **)malloc(4*len*sizeof(char*));
 		for(i=0; i&lt;len; i++) {
-			char *val1, *val2, *val3;
+			char *val1, *val2, *val3, *val4;
 			VALUE hash = rb_ary_entry($input,i);
 			VALUE keys_arr = rb_funcall(hash, rb_intern(&quot;keys&quot;), 0, NULL);
 			int keys_len = RARRAY_LEN(keys_arr);
-			val1 = val2 = val3 = NULL;
+			val1 = val2 = val3 = val4 = NULL;
 			for(j=0; j&lt;keys_len; j++) {
 				VALUE val;
 				char *tmp;
@@ -33,10 +33,17 @@
 						val = rb_funcall(data, rb_intern(&quot;to_s&quot;), 0, NULL);
 						tmp = StringValuePtr(val);
 						break;
+					case T_TRUE:
+						val = rb_funcall(data, rb_intern(&quot;to_s&quot;), 0, NULL);
+						tmp = StringValuePtr(val);
+						break;
+					case T_FALSE:
+						val = rb_funcall(data, rb_intern(&quot;to_s&quot;), 0, NULL);
+						tmp = StringValuePtr(val);
+						break;
 					default:
 						tmp = NULL;
 						break;
-			
 				}
 				if (!strcmp(key_str,&quot;label&quot;)) {
 					val1 = tmp;
@@ -44,11 +51,14 @@
 					val2 = tmp;
 				} else if (!strcmp(key_str, &quot;icon&quot;)) {
 					val3 = tmp;
-				} 
+				} else if (!strcmp(key_str, &quot;reload&quot;)) {
+					val4 = tmp;
+				}
 			}
 			ret_val[arr_len++] = val1;
 			ret_val[arr_len++] = val2;
 			ret_val[arr_len++] = val3;
+			ret_val[arr_len++] = val4;
 		}
 	}
 	$1 = arr_len;
@@ -56,7 +66,7 @@
 }
 
 %typemap(freearg) (int nparams, char** params) {
- free((void *) $2);
+	free((void *) $2);
 }
 
 extern void create(int bar_type, int nparams, char** params);
\ No newline at end of file</diff>
      <filename>platform/shared/ruby/ext/nativebar/nativebar.i</filename>
    </modified>
    <modified>
      <diff>@@ -1636,13 +1636,13 @@ _wrap_create(int argc, VALUE *argv, VALUE self) {
     char **ret_val;
     if (input_arr) {
       len = RARRAY_LEN(input_arr);
-      ret_val = (char **)malloc(3*len*sizeof(char*));
+      ret_val = (char **)malloc(4*len*sizeof(char*));
       for(i=0; i&lt;len; i++) {
-        char *val1, *val2, *val3;
+        char *val1, *val2, *val3, *val4;
         VALUE hash = rb_ary_entry(argv[1],i);
         VALUE keys_arr = rb_funcall(hash, rb_intern(&quot;keys&quot;), 0, NULL);
         int keys_len = RARRAY_LEN(keys_arr);
-        val1 = val2 = val3 = NULL;
+        val1 = val2 = val3 = val4 = NULL;
         for(j=0; j&lt;keys_len; j++) {
           VALUE val;
           char *tmp;
@@ -1657,10 +1657,17 @@ _wrap_create(int argc, VALUE *argv, VALUE self) {
             val = rb_funcall(data, rb_intern(&quot;to_s&quot;), 0, NULL);
             tmp = StringValuePtr(val);
             break;
+          case T_TRUE:
+            val = rb_funcall(data, rb_intern(&quot;to_s&quot;), 0, NULL);
+            tmp = StringValuePtr(val);
+            break;
+          case T_FALSE:
+            val = rb_funcall(data, rb_intern(&quot;to_s&quot;), 0, NULL);
+            tmp = StringValuePtr(val);
+            break;
           default:
             tmp = NULL;
             break;
-            
           }
           if (!strcmp(key_str,&quot;label&quot;)) {
             val1 = tmp;
@@ -1668,11 +1675,14 @@ _wrap_create(int argc, VALUE *argv, VALUE self) {
             val2 = tmp;
           } else if (!strcmp(key_str, &quot;icon&quot;)) {
             val3 = tmp;
-          } 
+          } else if (!strcmp(key_str, &quot;reload&quot;)) {
+            val4 = tmp;
+          }
         }
         ret_val[arr_len++] = val1;
         ret_val[arr_len++] = val2;
         ret_val[arr_len++] = val3;
+        ret_val[arr_len++] = val4;
       }
     }
     arg2 = arr_len;</diff>
      <filename>platform/shared/ruby/ext/nativebar/nativebar_wrap.c</filename>
    </modified>
    <modified>
      <diff>@@ -10,15 +10,60 @@ extern &quot;C&quot; {
  ********************************************/
 
 #define RUBY_PB_ID &quot;id&quot;
+#define RUBY_PB_PREFIX &quot;prefix&quot;
 #define RUBY_PB_FIRST_NAME &quot;first_name&quot;
+#define RUBY_PB_MIDDLE_NAME &quot;middle_name&quot; 
 #define RUBY_PB_LAST_NAME &quot;last_name&quot;
-#define RUBY_PB_MOBILE_NUMBER &quot;mobile_number&quot;
-#define RUBY_PB_HOME_NUMBER &quot;home_number&quot;
-#define RUBY_PB_BUSINESS_NUMBER &quot;business_number&quot;
+#define RUBY_PB_SUFFIX &quot;suffix&quot;
+#define RUBY_PB_NICKNAME &quot;nickname&quot;
+	
+#define RUBY_PB_NOTE &quot;person_note&quot;
+	
+#define RUBY_PB_BUSINESS_NUMBER &quot;business_number&quot; 
+#define RUBY_PB_HOME_NUMBER &quot;home_number&quot;         
+#define RUBY_PB_MOBILE_NUMBER &quot;mobile_number&quot;     
+
+#define RUBY_PB_MAIN_MUMBER &quot;main_number&quot;         
+#define RUBY_PB_PAGER_NUMBER &quot;pager_number&quot;       	
+#define RUBY_PB_HOME_FAX &quot;home_fax&quot;               
+#define RUBY_PB_WORK_FAX &quot;work_fax&quot;
+#define RUBY_PB_ASSISTANT_NUMBER &quot;assistant_number&quot;
+	
 #define RUBY_PB_EMAIL_ADDRESS &quot;email_address&quot;
+#define RUBY_PB_HOME_EMAIL_ADDRESS &quot;home_email_address&quot;
+#define RUBY_PB_OTHER_EMAIL_ADDRESS &quot;other_email_address&quot;
+
 #define RUBY_PB_COMPANY_NAME &quot;company_name&quot;
+#define RUBY_PB_JOB_TITLE &quot;job_title&quot;
+#define RUBY_PB_BIRTHDAY &quot;birthday&quot;
+
+#define RUBY_PB_STREET_ADDRESS_1 &quot;street_address_1&quot;
+#define RUBY_PB_CITY_1 &quot;city_1&quot;
+#define RUBY_PB_STATE_1 &quot;state_1&quot;
+#define RUBY_PB_ZIP_1 &quot;zip_1&quot;
+#define RUBY_PB_COUNTRY_1 &quot;country_1&quot;
+
+#define RUBY_PB_STREET_ADDRESS_2 &quot;street_address_2&quot;
+#define RUBY_PB_CITY_2 &quot;city_2&quot;
+#define RUBY_PB_STATE_2 &quot;state_2&quot;
+#define RUBY_PB_ZIP_2 &quot;zip_2&quot;
+#define RUBY_PB_COUNTRY_2 &quot;country_2&quot;
 
+#define RUBY_PB_STREET_ADDRESS_3 &quot;street_address_3&quot;
+#define RUBY_PB_CITY_3 &quot;city_3&quot;
+#define RUBY_PB_STATE_3 &quot;state_3&quot;
+#define RUBY_PB_ZIP_3 &quot;zip_3&quot;
+#define RUBY_PB_COUNTRY_3 &quot;country_3&quot;
+	
+#define RUBY_PB_HOME_PAGE &quot;home_page&quot;
 
+#define RUBY_PB_SPOUSE_NAME &quot;spouse_name&quot;
+#define RUBY_PB_ASSISTANT_NAME &quot;assistant_name&quot;
+	
+#define RUBY_PB_ANNIVERSARY &quot;anniversary&quot;
+#define RUBY_PB_CREATED &quot;created&quot;
+#define RUBY_PB_UPDATED &quot;updated&quot;	
+	
 #ifdef __cplusplus
 }
 #endif</diff>
      <filename>platform/shared/ruby/ext/phonebook/phonebook.h</filename>
    </modified>
    <modified>
      <diff>@@ -36,6 +36,7 @@ extern void Init_Camera(void);
 extern void Init_stringio(void);
 extern void Init_DateTimePicker(void);
 extern void Init_NativeBar(void);
+extern void Init_MapView(void); 
 
 //RhoSupport extension
 extern void Init_RhoSupport(void);
@@ -46,25 +47,22 @@ extern VALUE RhoPreparePath(VALUE path);
 static VALUE  framework;
 static ID framework_mid;
 static ID framework_mid2;
-
-static VALUE classRhomAttribManager;
-static ID midRhomAttribManager_save;
-static ID midRhomAttribManager_delete_attribs;
-static ID midRhomAttribManager_add_attrib;
+static ID initApp_mid;
 
 static char* rb_type_to_s(VALUE obj);
-extern int ruby_thread_set_native(rb_thread_t *th);
-extern int native_mutex_lock(rb_thread_lock_t *);
+//extern int ruby_thread_set_native(rb_thread_t *th);
+//extern int native_mutex_lock(rb_thread_lock_t *);
+//extern void Init_native_thread2(rb_thread_t *th);
 
-rb_thread_t * __getCurrentThread()
+/*rb_thread_t * __getCurrentThread()
 {
     rb_thread_t * res = ruby_thread_from_native();
     if ( res )
         return res;
 	
     return ruby_current_thread;
-}
-
+}*/
+/*
 void RhoRubyThreadStart()
 {
     rb_thread_t *th;
@@ -79,19 +77,25 @@ void RhoRubyThreadStart()
 
     rb_gc_register_mark_object(self);
 
+    Init_native_thread2(th);
+
+    //st_insert(th-&gt;vm-&gt;living_threads, 0, (st_data_t) th-&gt;thread_id);
 //	RhoRuby_RhomAttribManager_add_attrib(0, &quot;test&quot;);
     //native_mutex_lock(&amp;th-&gt;vm-&gt;global_vm_lock);
-}
-
+} */
+/*
 void RhoRubyThreadStop()
 {
     //rb_thread_t *th = GET_THREAD();
+    //st_delete(th-&gt;vm-&gt;living_threads, &amp;(th-&gt;self), 0);
     //native_mutex_unlock(&amp;th-&gt;vm-&gt;global_vm_lock);
-}
+
+    //native_mutex_destroy(&amp;th-&gt;interrupt_lock);
+} */
 
 void RhoRubyStart()
 {
-    VALUE moduleRhom;
+    //VALUE moduleRhom;
 #ifdef HAVE_LOCALE_H
     setlocale(LC_CTYPE, &quot;&quot;);
 #endif
@@ -126,7 +130,8 @@ void RhoRubyStart()
 	Init_DateTimePicker();
 	Init_NativeBar();
 	Init_RhoSupport();
-
+	Init_MapView();
+		
 #ifdef ENABLE_RUBY_VM_STAT
     struct timeval  start;
     struct timeval  end;
@@ -150,13 +155,9 @@ void RhoRubyStart()
 
 	CONST_ID(framework_mid, &quot;serve&quot;);
 	CONST_ID(framework_mid2, &quot;serve_index&quot;);
+	CONST_ID(initApp_mid, &quot;init_app&quot;);
 
-    moduleRhom = rb_const_get(rb_cObject, rb_intern(&quot;Rhom&quot;));
-    classRhomAttribManager = rb_const_get(moduleRhom, rb_intern(&quot;RhomAttribManager&quot;));
-
-	CONST_ID(midRhomAttribManager_save, &quot;save&quot;);
-	CONST_ID(midRhomAttribManager_delete_attribs, &quot;delete_attribs&quot;);
-	CONST_ID(midRhomAttribManager_add_attrib, &quot;add_attrib&quot;);
+    //moduleRhom = rb_const_get(rb_cObject, rb_intern(&quot;Rhom&quot;));
 
 #ifdef ENABLE_RUBY_VM_STAT
 	g_collect_stat = 0; 
@@ -164,6 +165,17 @@ void RhoRubyStart()
 		
 	}	
 }
+void RhoRubyInitApp()
+{
+    rb_funcall(framework, initApp_mid, 0);
+}
+
+char* RhoRuby_getRhoDBVersion()
+{
+    VALUE moduleRhodes = rb_const_get(rb_cObject, rb_intern(&quot;Rhodes&quot;));
+    VALUE valVer = rb_const_get(moduleRhodes, rb_intern(&quot;DBVERSION&quot;));
+    return RSTRING_PTR(valVer);
+}
 
 #if defined(WIN32)
 #if defined(_WIN32_WCE)
@@ -221,6 +233,21 @@ VALUE getnil() {
 	return Qnil;
 }
 
+VALUE rho_ruby_create_array()
+{
+    return rb_ary_new();
+}
+
+VALUE rho_ruby_create_string(const char* szVal)
+{
+    return rb_str_new2(szVal);
+}
+
+void rho_ruby_add_to_array(VALUE ar, VALUE val)
+{
+    rb_ary_push(ar,val);
+}
+
 VALUE createHash() {
 	return rb_hash_new();
 }
@@ -292,20 +319,25 @@ VALUE callServeIndex(char* index_name) {
 	return callres;
 }
 
-void RhoRuby_RhomAttribManager_save(int nSrcID)
+/*static int s_gcWasDisabled;
+//extern void native_sleep(rb_thread_t *th, struct timeval *tv);
+extern void sleep_for_polling(rb_thread_t *th);
+static void start_ruby_call()
 {
-    rb_funcall(classRhomAttribManager, midRhomAttribManager_save, 1, INT2FIX(nSrcID));
-}
+    rb_thread_t *th = GET_THREAD();
 
-void RhoRuby_RhomAttribManager_delete_attribs(int nSrcID,uint64__ objID)
-{
-    rb_funcall(classRhomAttribManager, midRhomAttribManager_delete_attribs, 2, INT2FIX(nSrcID), ULL2NUM(objID) );
-}
+    while( rb_during_gc() )
+    {
+        sleep_for_polling(th);
+    }
 
-void RhoRuby_RhomAttribManager_add_attrib(int nSrcID,const char* szAttrib)
-{
-    rb_funcall(classRhomAttribManager, midRhomAttribManager_add_attrib, 2, INT2FIX(nSrcID), rb_str_new2(szAttrib) );
+    s_gcWasDisabled = rb_gc_disable();
 }
+static void end_ruby_call()
+{
+    if ( !s_gcWasDisabled )
+        rb_gc_enable();
+}*/
 
 static char*
 rb_type_to_s(VALUE obj)</diff>
      <filename>platform/shared/ruby/ext/rho/rhoruby.c</filename>
    </modified>
    <modified>
      <diff>@@ -28,8 +28,9 @@ typedef unsigned long long uint64__;
 #endif
 	
 void RhoRubyStart();
-void RhoRubyThreadStart();
-void RhoRubyThreadStop();
+void RhoRubyInitApp();
+//void RhoRubyThreadStart();
+//void RhoRubyThreadStop();
 
 VALUE getnil();	
 VALUE createHash();
@@ -44,14 +45,16 @@ void  releaseValue(VALUE val);
 
 VALUE callFramework(VALUE hashReq);
 VALUE callServeIndex(char* index_name);
-void RhoRuby_RhomAttribManager_save(int nSrcID);
-void RhoRuby_RhomAttribManager_delete_attribs(int nSrcID,uint64__ objID);
-void RhoRuby_RhomAttribManager_add_attrib(int nSrcID,const char* szAttrib);
 
 void RhoRubyStop();
 
 const char* RhoGetRootPath();
 
+VALUE rho_ruby_create_array();
+VALUE rho_ruby_create_string(const char* szVal);
+void rho_ruby_add_to_array(VALUE ar, VALUE val);
+
+char* RhoRuby_getRhoDBVersion();
 
 #if defined(__cplusplus)
 }</diff>
      <filename>platform/shared/ruby/ext/rho/rhoruby.h</filename>
    </modified>
    <modified>
      <diff>@@ -184,7 +184,7 @@ static VALUE find_file(VALUE fname)
     }else{
         int i = 0;
         VALUE load_path = GET_VM()-&gt;load_path;
-        VALUE dir;
+        //VALUE dir;
         fname = checkRhoBundleInPath(fname);
 
         //TODO: support document relative require in case of multiple apps
@@ -314,13 +314,22 @@ VALUE RhoPreparePath(VALUE path){
 static void Init_RhoLog();
 static void Init_RhoBlobs();
 
+static VALUE
+rb_obj_rhom_init(VALUE obj, VALUE iv)
+{
+    //TODO: if render will slow implement this function to fasten rhom member access(see BB)
+    return Qnil;
+}
+
 void Init_RhoSupport()
 {
 	rb_define_global_function(&quot;require&quot;, rb_require_compiled, 1);
 	rb_define_global_function(&quot;eval_compiled_file&quot;, rb_f_eval_compiled, -1);
 	rb_define_global_function(&quot;__rhoGetCurrentDir&quot;, __rhoGetCurrentDir, 0);
 	rb_define_global_function(&quot;load&quot;, rb_require_compiled, 1);
-	
+
+    rb_define_method(rb_mKernel, &quot;rhom_init&quot;, rb_obj_rhom_init, 1);	
+
 	Init_RhoLog();
 	Init_RhoBlobs();
 }
@@ -330,6 +339,8 @@ static void Init_RhoBlobs()
   VALUE path = __rhoGetCurrentDir();
   rb_funcall(path, rb_intern(&quot;concat&quot;), 1, rb_str_new2(RhoGetRelativeBlobsPath()));
 
+  RAWLOG_INFO1(&quot;Init_RhoBlobs: %s&quot;, RSTRING_PTR(path) );
+
   if ( rb_funcall(rb_cDir, rb_intern(&quot;exist?&quot;), 1, path)==Qfalse )
     rb_funcall(rb_cDir, rb_intern(&quot;mkdir&quot;), 1, path);
 
@@ -402,7 +413,7 @@ int rhoRubyFPrintf(FILE *file, const char *format, ...){
 static VALUE rb_RhoLogClass;
 static void Init_RhoLog(){
 
-    VALUE appLog, appErrLog;
+    VALUE appLog; //, appErrLog;
 
     rb_RhoLogClass = rb_define_class(&quot;RhoLog&quot;, rb_cObject);
     rb_define_method(rb_RhoLogClass, &quot;write&quot;, rb_RhoLogWrite, 1);
@@ -423,8 +434,8 @@ static void Init_RhoLog2()
     stdioPath = rb_funcall(rb_cIO, rb_intern(&quot;read&quot;), 1, path);
     if ( stdioPath != 0 &amp;&amp; stdioPath != Qnil &amp;&amp; RSTRING_LEN(stdioPath)&gt;0 )
     {
-      char* szPath = RSTRING_PTR(stdioPath);
-      int len = RSTRING_LEN(stdioPath);
+      //char* szPath = RSTRING_PTR(stdioPath);
+      //int len = RSTRING_LEN(stdioPath);
 #if defined(WIN32)
 	  freopen( RSTRING_PTR(stdioPath), &quot;w&quot;, stdout );
 #endif</diff>
      <filename>platform/shared/ruby/ext/rho/rhosupport.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@ extern void* rho_db_get_handle();
 
 static VALUE db_allocate(VALUE klass)
 {
-	sqlite3 **db = malloc(sizeof(sqlite3 **));
+	//sqlite3 **db = malloc(sizeof(sqlite3 **));
 	return Data_Wrap_Struct(klass, 0, 0, 0);
 }
 
@@ -42,7 +42,7 @@ static VALUE db_init(int argc, VALUE *argv, VALUE self)
 }
 
 static VALUE db_close(int argc, VALUE *argv, VALUE self){
-	sqlite3 * db = NULL;
+	//sqlite3 * db = NULL;
 	sqlite3 **ppDB = NULL;		
 	int rc = 0;
 	
@@ -57,7 +57,7 @@ static VALUE db_close(int argc, VALUE *argv, VALUE self){
 }
 
 static VALUE db_start_transaction(int argc, VALUE *argv, VALUE self){
-	sqlite3 * db = NULL;
+	//sqlite3 * db = NULL;
 	sqlite3 **ppDB = NULL;		
 	int rc = 0;
 	
@@ -72,7 +72,7 @@ static VALUE db_start_transaction(int argc, VALUE *argv, VALUE self){
 }
 
 static VALUE db_commit(int argc, VALUE *argv, VALUE self){
-	sqlite3 * db = NULL;
+	//sqlite3 * db = NULL;
 	sqlite3 **ppDB = NULL;		
 	int rc = 0;
 	
@@ -87,7 +87,7 @@ static VALUE db_commit(int argc, VALUE *argv, VALUE self){
 }
 
 static VALUE db_rollback(int argc, VALUE *argv, VALUE self){
-	sqlite3 * db = NULL;
+	//sqlite3 * db = NULL;
 	sqlite3 **ppDB = NULL;		
 	int rc = 0;
 	
@@ -117,7 +117,7 @@ static VALUE* getColNames(sqlite3_stmt* statement, int nCount)
 
 static VALUE db_destroy_table(int argc, VALUE *argv, VALUE self)
 {
-	sqlite3 * db = NULL;
+	//sqlite3 * db = NULL;
 	sqlite3 **ppDB = NULL;		
     const char* szTableName = NULL;
     int rc = 0;
@@ -144,8 +144,8 @@ static VALUE db_execute(int argc, VALUE *argv, VALUE self)
 	int nRes = 0;
     char * szErrMsg = 0;
 	
-	if ((argc &lt; 1) || (argc &gt; 1))
-		rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 1)&quot;,argc);
+	if ((argc &lt; 1) || (argc &gt; 2))
+		rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 2)&quot;,argc);
 	
 	Data_Get_Struct(self, sqlite3 *, ppDB);
 	db = (sqlite3 *)rho_db_get_handle();
@@ -154,12 +154,42 @@ static VALUE db_execute(int argc, VALUE *argv, VALUE self)
     RAWTRACE1(&quot;db_execute: %s&quot;, sql);
 	if ( (nRes = sqlite3_prepare_v2(db, sql, -1, &amp;statement, NULL)) != SQLITE_OK)
     {
-        szErrMsg = sqlite3_errmsg(db);
+        szErrMsg = (char *)sqlite3_errmsg(db);
 
         rb_raise(rb_eArgError, &quot;could not prepare statement: %d; Message: %s&quot;,nRes, (szErrMsg?szErrMsg:&quot;&quot;));
     }
 
-	while(sqlite3_step(statement) == SQLITE_ROW) {
+    if ( argc &gt; 1 )
+    {
+        int i = 0;
+        VALUE args = argv[1];
+        if ( RARRAY_LEN(args) &gt; 0 &amp;&amp; TYPE(RARRAY_PTR(args)[0]) == T_ARRAY )
+            args = RARRAY_PTR(args)[0];
+
+        for( ; i &lt; RARRAY_LEN(args); i++ )
+        {
+            VALUE arg = RARRAY_PTR(args)[i];
+            if (NIL_P(arg))
+            {
+                sqlite3_bind_null(statement, i+1);
+                continue;
+            }
+
+            switch( TYPE(arg) )
+            {
+            case T_STRING:
+                sqlite3_bind_text(statement, i+1, RSTRING_PTR(arg), -1, SQLITE_TRANSIENT);
+                break;
+            case T_FIXNUM:
+            case T_FLOAT:
+            case T_BIGNUM:
+                sqlite3_bind_int64(statement, i+1, NUM2LL(arg));
+                break;
+            }
+        }
+    }
+
+	while( (nRes=sqlite3_step(statement)) == SQLITE_ROW) {
 		int nCount = sqlite3_data_count(statement);
 		int nCol = 0;
 		VALUE hashRec = rb_hash_new();
@@ -178,8 +208,8 @@ static VALUE db_execute(int argc, VALUE *argv, VALUE self)
 					break;
                 case SQLITE_INTEGER:
                 {
-                    int nVal = sqlite3_column_int(statement, nCol);
-                    colValue = INT2NUM(nVal);
+                    sqlite_int64 nVal = sqlite3_column_int64(statement, nCol);
+                    colValue = LL2NUM(nVal);
                     break;
                 }
 				default:{
@@ -195,6 +225,13 @@ static VALUE db_execute(int argc, VALUE *argv, VALUE self)
 		rb_ary_push(arRes, hashRec);
 	}
 	
+    if ( nRes != SQLITE_OK &amp;&amp; nRes != SQLITE_ROW &amp;&amp; nRes != SQLITE_DONE )
+    {
+        szErrMsg = (char*)sqlite3_errmsg(db);
+
+        rb_raise(rb_eArgError, &quot;could not execute statement: %d; Message: %s&quot;,nRes, (szErrMsg?szErrMsg:&quot;&quot;));
+    }
+
 	sqlite3_finalize(statement);
 	
     if ( colNames )</diff>
      <filename>platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@
 	#define dosync_source rho_sync_doSyncSource
 	extern void rho_sync_doSyncSource(int source_id,int show_status_popup);
 	#define dosearch_source rho_sync_doSearchSource
-	extern void rho_sync_doSearchSource(int source_id, const char *from, const char *params);
+	extern void rho_sync_doSearchSource(int source_id, const char *from, const char *params, int sync_changes, int nProgressStep);
 	#define dosync rho_sync_doSyncAllSources
 	extern void rho_sync_lock();
 	#define lock_sync_mutex rho_sync_lock
@@ -28,6 +28,25 @@
 	#define set_pollinterval rho_sync_set_pollinterval
 	extern void rho_sync_set_syncserver(char* syncserver);
 	#define set_syncserver rho_sync_set_syncserver
+	extern VALUE rho_sync_get_attrs(int source_id);
+	#define get_src_attrs rho_sync_get_attrs
+	
+    extern void  rho_sync_setobjectnotify_url(const char* szUrl);
+    #define set_objectnotify_url rho_sync_setobjectnotify_url
+    extern void  rho_sync_addobjectnotify(int nSrcID, const char* szObject);
+    #define add_objectnotify rho_sync_addobjectnotify
+    extern void  rho_sync_cleanobjectnotify();
+    #define clean_objectnotify rho_sync_cleanobjectnotify
+
+    extern int  rho_sync_get_lastsync_objectcount(int nSrcID);
+    #define get_lastsync_objectcount rho_sync_get_lastsync_objectcount
+
+    extern int  rho_sync_get_pagesize();
+    #define get_pagesize rho_sync_get_pagesize
+
+    extern void  rho_sync_set_pagesize(int pagesize);
+    #define set_pagesize rho_sync_set_pagesize
+	
 	#if !defined(bool)
 	#define bool int
 	#define true  1
@@ -40,7 +59,7 @@
 }
 extern void dosync(bool show_status_popup);
 extern void dosync_source(int source_id, bool show_status_popup);
-extern void dosearch_source(int source_id, const char *from, const char *params);
+extern void dosearch_source(int source_id, const char *from, const char *params, bool sync_changes, int nProgressStep);
 extern void lock_sync_mutex();
 extern void unlock_sync_mutex();
 extern void login(const char *login, const char *password, const char* callback);
@@ -51,3 +70,10 @@ extern void set_notification(int source_id, const char *url, char* params);
 extern void clear_notification(int source_id);
 extern void set_pollinterval(int interval);
 extern void set_syncserver(char* syncserver);
+extern VALUE get_src_attrs(int source_id);
+extern void  set_objectnotify_url(const char* szUrl);
+extern void  add_objectnotify(int nSrcID, const char* szObject);
+extern void  clean_objectnotify();
+extern int   get_lastsync_objectcount(int nSrcID);
+extern int   get_pagesize();
+extern void  set_pagesize(int pagesize);
\ No newline at end of file</diff>
      <filename>platform/shared/ruby/ext/syncengine/syncengine.i</filename>
    </modified>
    <modified>
      <diff>@@ -1550,7 +1550,7 @@ static VALUE mSyncEngine;
 	#define dosync_source rho_sync_doSyncSource
 	extern void rho_sync_doSyncSource(int source_id,int show_status_popup);
 	#define dosearch_source rho_sync_doSearchSource
-	extern void rho_sync_doSearchSource(int source_id, const char *from, const char *params);
+	extern void rho_sync_doSearchSource(int source_id, const char *from, const char *params, int sync_changes, int nProgressStep);
 	#define dosync rho_sync_doSyncAllSources
 	extern void rho_sync_lock();
 	#define lock_sync_mutex rho_sync_lock
@@ -1572,6 +1572,25 @@ static VALUE mSyncEngine;
 	#define set_pollinterval rho_sync_set_pollinterval
 	extern void rho_sync_set_syncserver(char* syncserver);
 	#define set_syncserver rho_sync_set_syncserver
+	extern VALUE rho_sync_get_attrs(int source_id);
+	#define get_src_attrs rho_sync_get_attrs
+	
+    extern void  rho_sync_setobjectnotify_url(const char* szUrl);
+    #define set_objectnotify_url rho_sync_setobjectnotify_url
+    extern void  rho_sync_addobjectnotify(int nSrcID, const char* szObject);
+    #define add_objectnotify rho_sync_addobjectnotify
+    extern void  rho_sync_cleanobjectnotify();
+    #define clean_objectnotify rho_sync_cleanobjectnotify
+
+    extern int  rho_sync_get_lastsync_objectcount(int nSrcID);
+    #define get_lastsync_objectcount rho_sync_get_lastsync_objectcount
+
+    extern int  rho_sync_get_pagesize();
+    #define get_pagesize rho_sync_get_pagesize
+
+    extern void  rho_sync_set_pagesize(int pagesize);
+    #define set_pagesize rho_sync_set_pagesize
+	
 	#if !defined(bool)
 	#define bool int
 	#define true  1
@@ -1791,6 +1810,8 @@ _wrap_dosearch_source(int argc, VALUE *argv, VALUE self) {
   int arg1 ;
   char *arg2 = (char *) 0 ;
   char *arg3 = (char *) 0 ;
+  bool arg4 ;
+  int arg5 ;
   int val1 ;
   int ecode1 = 0 ;
   int res2 ;
@@ -1799,9 +1820,13 @@ _wrap_dosearch_source(int argc, VALUE *argv, VALUE self) {
   int res3 ;
   char *buf3 = 0 ;
   int alloc3 = 0 ;
+  bool val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
   
-  if ((argc &lt; 3) || (argc &gt; 3)) {
-    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 3)&quot;,argc); SWIG_fail;
+  if ((argc &lt; 5) || (argc &gt; 5)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 5)&quot;,argc); SWIG_fail;
   }
   ecode1 = SWIG_AsVal_int(argv[0], &amp;val1);
   if (!SWIG_IsOK(ecode1)) {
@@ -1818,7 +1843,17 @@ _wrap_dosearch_source(int argc, VALUE *argv, VALUE self) {
     SWIG_exception_fail(SWIG_ArgError(res3), &quot;in method '&quot; &quot;dosearch_source&quot; &quot;', argument &quot; &quot;3&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
   }
   arg3 = (char *)(buf3);
-  dosearch_source(arg1,(char const *)arg2,(char const *)arg3);
+  ecode4 = SWIG_AsVal_bool(argv[3], &amp;val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), &quot;in method '&quot; &quot;dosearch_source&quot; &quot;', argument &quot; &quot;4&quot;&quot; of type '&quot; &quot;bool&quot;&quot;'&quot;);
+  } 
+  arg4 = (bool)(val4);
+  ecode5 = SWIG_AsVal_int(argv[4], &amp;val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), &quot;in method '&quot; &quot;dosearch_source&quot; &quot;', argument &quot; &quot;5&quot;&quot; of type '&quot; &quot;int&quot;&quot;'&quot;);
+  } 
+  arg5 = (int)(val5);
+  dosearch_source(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
   return Qnil;
@@ -2048,6 +2083,159 @@ fail:
 }
 
 
+SWIGINTERN VALUE
+_wrap_get_src_attrs(int argc, VALUE *argv, VALUE self) {
+  int arg1 ;
+  VALUE result;
+  int val1 ;
+  int ecode1 = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc &lt; 1) || (argc &gt; 1)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 1)&quot;,argc); SWIG_fail;
+  }
+  ecode1 = SWIG_AsVal_int(argv[0], &amp;val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), &quot;in method '&quot; &quot;get_src_attrs&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;int&quot;&quot;'&quot;);
+  } 
+  arg1 = (int)(val1);
+  result = (VALUE)get_src_attrs(arg1);
+  vresult = result;
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_set_objectnotify_url(int argc, VALUE *argv, VALUE self) {
+  char *arg1 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  
+  if ((argc &lt; 1) || (argc &gt; 1)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 1)&quot;,argc); SWIG_fail;
+  }
+  res1 = SWIG_AsCharPtrAndSize(argv[0], &amp;buf1, NULL, &amp;alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), &quot;in method '&quot; &quot;set_objectnotify_url&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+  }
+  arg1 = (char *)(buf1);
+  set_objectnotify_url((char const *)arg1);
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return Qnil;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_add_objectnotify(int argc, VALUE *argv, VALUE self) {
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  
+  if ((argc &lt; 2) || (argc &gt; 2)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 2)&quot;,argc); SWIG_fail;
+  }
+  ecode1 = SWIG_AsVal_int(argv[0], &amp;val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), &quot;in method '&quot; &quot;add_objectnotify&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;int&quot;&quot;'&quot;);
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(argv[1], &amp;buf2, NULL, &amp;alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), &quot;in method '&quot; &quot;add_objectnotify&quot; &quot;', argument &quot; &quot;2&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+  }
+  arg2 = (char *)(buf2);
+  add_objectnotify(arg1,(char const *)arg2);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return Qnil;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_clean_objectnotify(int argc, VALUE *argv, VALUE self) {
+  if ((argc &lt; 0) || (argc &gt; 0)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 0)&quot;,argc); SWIG_fail;
+  }
+  clean_objectnotify();
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_get_lastsync_objectcount(int argc, VALUE *argv, VALUE self) {
+  int arg1 ;
+  int result;
+  int val1 ;
+  int ecode1 = 0 ;
+  VALUE vresult = Qnil;
+  
+  if ((argc &lt; 1) || (argc &gt; 1)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 1)&quot;,argc); SWIG_fail;
+  }
+  ecode1 = SWIG_AsVal_int(argv[0], &amp;val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), &quot;in method '&quot; &quot;get_lastsync_objectcount&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;int&quot;&quot;'&quot;);
+  } 
+  arg1 = (int)(val1);
+  result = (int)get_lastsync_objectcount(arg1);
+  vresult = SWIG_From_int((int)(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_get_pagesize(int argc, VALUE *argv, VALUE self) {
+  int result;
+  VALUE vresult = Qnil;
+  
+  if ((argc &lt; 0) || (argc &gt; 0)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 0)&quot;,argc); SWIG_fail;
+  }
+  result = (int)get_pagesize();
+  vresult = SWIG_From_int((int)(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_set_pagesize(int argc, VALUE *argv, VALUE self) {
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  
+  if ((argc &lt; 1) || (argc &gt; 1)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 1)&quot;,argc); SWIG_fail;
+  }
+  ecode1 = SWIG_AsVal_int(argv[0], &amp;val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), &quot;in method '&quot; &quot;set_pagesize&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;int&quot;&quot;'&quot;);
+  } 
+  arg1 = (int)(val1);
+  set_pagesize(arg1);
+  return Qnil;
+fail:
+  return Qnil;
+}
+
+
 
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
@@ -2323,5 +2511,12 @@ SWIGEXPORT void Init_SyncEngine(void) {
   rb_define_module_function(mSyncEngine, &quot;clear_notification&quot;, _wrap_clear_notification, -1);
   rb_define_module_function(mSyncEngine, &quot;set_pollinterval&quot;, _wrap_set_pollinterval, -1);
   rb_define_module_function(mSyncEngine, &quot;set_syncserver&quot;, _wrap_set_syncserver, -1);
+  rb_define_module_function(mSyncEngine, &quot;get_src_attrs&quot;, _wrap_get_src_attrs, -1);
+  rb_define_module_function(mSyncEngine, &quot;set_objectnotify_url&quot;, _wrap_set_objectnotify_url, -1);
+  rb_define_module_function(mSyncEngine, &quot;add_objectnotify&quot;, _wrap_add_objectnotify, -1);
+  rb_define_module_function(mSyncEngine, &quot;clean_objectnotify&quot;, _wrap_clean_objectnotify, -1);
+  rb_define_module_function(mSyncEngine, &quot;get_lastsync_objectcount&quot;, _wrap_get_lastsync_objectcount, -1);
+  rb_define_module_function(mSyncEngine, &quot;get_pagesize&quot;, _wrap_get_pagesize, -1);
+  rb_define_module_function(mSyncEngine, &quot;set_pagesize&quot;, _wrap_set_pagesize, -1);
 }
 </diff>
      <filename>platform/shared/ruby/ext/syncengine/syncengine_wrap.c</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 %{
 extern void webview_refresh();
 #define refresh webview_refresh 
-extern void webview_navigate(char* url);
+extern void webview_navigate(char* url, int index);
 #define navigate webview_navigate
 extern char* webview_current_location();
 #define current_location webview_current_location
@@ -11,10 +11,17 @@ extern char* execute_js(char* js);
 #define execute_js webview_execute_js
 extern void set_menu_items(VALUE argv);
 #define set_menu_items webview_set_menu_items
+extern int active_tab();
+#define active_tab webview_active_tab
 %}
 
+%typemap(default) int index {
+  $1 = 0;
+}
+
 extern void refresh();
-extern void navigate(char* url);
+extern void navigate(char* url, int index);
 extern char* current_location();
 extern char* execute_js(char* js);
-extern void set_menu_items(VALUE argv);
\ No newline at end of file
+extern void set_menu_items(VALUE argv);
+extern int active_tab();
\ No newline at end of file</diff>
      <filename>platform/shared/ruby/ext/webview/webview.i</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.36
+ * Version 1.3.31
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -16,14 +16,14 @@
 
 /* template workaround for compilers that cannot correctly implement the C++ standard */
 #ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC) &amp;&amp; (__SUNPRO_CC &lt;= 0x560)
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# elif defined(__HP_aCC)
-/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
-/* If we find a maximum version that requires this, the test would be __HP_aCC &lt;= 35500 for A.03.55 */
-#  define SWIGTEMPLATEDISAMBIGUATOR template
+# if defined(__SUNPRO_CC)
+#   if (__SUNPRO_CC &lt;= 0x560)
+#     define SWIGTEMPLATEDISAMBIGUATOR template
+#   else
+#     define SWIGTEMPLATEDISAMBIGUATOR 
+#   endif
 # else
-#  define SWIGTEMPLATEDISAMBIGUATOR
+#   define SWIGTEMPLATEDISAMBIGUATOR 
 # endif
 #endif
 
@@ -51,12 +51,6 @@
 # endif
 #endif
 
-#ifndef SWIG_MSC_UNSUPPRESS_4505
-# if defined(_MSC_VER)
-#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif 
-#endif
-
 #ifndef SWIGUNUSEDPARM
 # ifdef __cplusplus
 #   define SWIGUNUSEDPARM(p)
@@ -112,12 +106,6 @@
 # define _CRT_SECURE_NO_DEPRECATE
 #endif
 
-/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
-#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) &amp;&amp; defined(_MSC_VER) &amp;&amp; !defined(_SCL_SECURE_NO_DEPRECATE)
-# define _SCL_SECURE_NO_DEPRECATE
-#endif
-
-
 /* -----------------------------------------------------------------------------
  *  This section contains generic SWIG labels for method/variable
  *  declarations/attributes, and other compiler dependent labels.
@@ -125,14 +113,14 @@
 
 /* template workaround for compilers that cannot correctly implement the C++ standard */
 #ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC) &amp;&amp; (__SUNPRO_CC &lt;= 0x560)
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# elif defined(__HP_aCC)
-/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
-/* If we find a maximum version that requires this, the test would be __HP_aCC &lt;= 35500 for A.03.55 */
-#  define SWIGTEMPLATEDISAMBIGUATOR template
+# if defined(__SUNPRO_CC)
+#   if (__SUNPRO_CC &lt;= 0x560)
+#     define SWIGTEMPLATEDISAMBIGUATOR template
+#   else
+#     define SWIGTEMPLATEDISAMBIGUATOR 
+#   endif
 # else
-#  define SWIGTEMPLATEDISAMBIGUATOR
+#   define SWIGTEMPLATEDISAMBIGUATOR 
 # endif
 #endif
 
@@ -160,12 +148,6 @@
 # endif
 #endif
 
-#ifndef SWIG_MSC_UNSUPPRESS_4505
-# if defined(_MSC_VER)
-#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif 
-#endif
-
 #ifndef SWIGUNUSEDPARM
 # ifdef __cplusplus
 #   define SWIGUNUSEDPARM(p)
@@ -221,12 +203,6 @@
 # define _CRT_SECURE_NO_DEPRECATE
 #endif
 
-/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
-#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) &amp;&amp; defined(_MSC_VER) &amp;&amp; !defined(_SCL_SECURE_NO_DEPRECATE)
-# define _SCL_SECURE_NO_DEPRECATE
-#endif
-
-
 /* -----------------------------------------------------------------------------
  * swigrun.swg
  *
@@ -236,7 +212,7 @@
 
 /* This should only be incremented when either the layout of swig_type_info changes,
    or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION &quot;4&quot;
+#define SWIG_RUNTIME_VERSION &quot;3&quot;
 
 /* define SWIG_TYPE_TABLE_NAME as &quot;SWIG_TYPE_TABLE&quot; */
 #ifdef SWIG_TYPE_TABLE
@@ -271,7 +247,6 @@
 
 /* Flags for pointer conversions */
 #define SWIG_POINTER_DISOWN        0x1
-#define SWIG_CAST_NEW_MEMORY       0x2
 
 /* Flags for new pointer objects */
 #define SWIG_POINTER_OWN           0x1
@@ -412,10 +387,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
 extern &quot;C&quot; {
 #endif
 
-typedef void *(*swig_converter_func)(void *, int *);
+typedef void *(*swig_converter_func)(void *);
 typedef struct swig_type_info *(*swig_dycast_func)(void **);
 
-/* Structure to store information on one type */
+/* Structure to store inforomation on one type */
 typedef struct swig_type_info {
   const char             *name;			/* mangled name of this type */
   const char             *str;			/* human readable name of this type */
@@ -460,7 +435,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
     while ((*f2 == ' ') &amp;&amp; (f2 != l2)) ++f2;
     if (*f1 != *f2) return (*f1 &gt; *f2) ? 1 : -1;
   }
-  return (int)((l1 - f1) - (l2 - f2));
+  return (l1 - f1) - (l2 - f2);
 }
 
 /*
@@ -542,8 +517,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
   Cast a pointer up an inheritance hierarchy
 */
 SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
-  return ((!ty) || (!ty-&gt;converter)) ? ptr : (*ty-&gt;converter)(ptr, newmemory);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
+  return ((!ty) || (!ty-&gt;converter)) ? ptr : (*ty-&gt;converter)(ptr);
 }
 
 /* 
@@ -816,15 +791,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 
 #include &lt;ruby.h&gt;
 
-/* Remove global macros defined in Ruby's win32.h */
-#ifdef write
-# undef write
-#endif
-#ifdef read
-# undef read
-#endif
-
-
 /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
 #ifndef NUM2LL
 #define NUM2LL(x) NUM2LONG((x))
@@ -853,44 +819,12 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 #ifndef RSTRING_PTR
 # define RSTRING_PTR(x) RSTRING(x)-&gt;ptr
 #endif
-#ifndef RSTRING_END
-# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
-#endif
 #ifndef RARRAY_LEN
 # define RARRAY_LEN(x) RARRAY(x)-&gt;len
 #endif
 #ifndef RARRAY_PTR
 # define RARRAY_PTR(x) RARRAY(x)-&gt;ptr
 #endif
-#ifndef RFLOAT_VALUE
-# define RFLOAT_VALUE(x) RFLOAT(x)-&gt;value
-#endif
-#ifndef DOUBLE2NUM
-# define DOUBLE2NUM(x) rb_float_new(x)
-#endif
-#ifndef RHASH_TBL
-# define RHASH_TBL(x) (RHASH(x)-&gt;tbl)
-#endif
-#ifndef RHASH_ITER_LEV
-# define RHASH_ITER_LEV(x) (RHASH(x)-&gt;iter_lev)
-#endif
-#ifndef RHASH_IFNONE
-# define RHASH_IFNONE(x) (RHASH(x)-&gt;ifnone)
-#endif
-#ifndef RHASH_SIZE
-# define RHASH_SIZE(x) (RHASH(x)-&gt;tbl-&gt;num_entries)
-#endif
-#ifndef RHASH_EMPTY_P
-# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
-#endif
-#ifndef RSTRUCT_LEN
-# define RSTRUCT_LEN(x) RSTRUCT(x)-&gt;len
-#endif
-#ifndef RSTRUCT_PTR
-# define RSTRUCT_PTR(x) RSTRUCT(x)-&gt;ptr
-#endif
-
-
 
 /*
  * Need to be very careful about how these macros are defined, especially
@@ -952,7 +886,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), &quot;new&quot;)
 #endif
 
-static VALUE _mSWIG = Qnil;
 
 /* -----------------------------------------------------------------------------
  * error manipulation
@@ -1043,71 +976,7 @@ SWIG_Ruby_ErrorType(int SWIG_code) {
 }
 
 
-/* This function is called when a user inputs a wrong argument to
-   a method.
- */
-SWIGINTERN 
-const char* Ruby_Format_TypeError( const char* msg,
-				   const char* type, 
-				   const char* name, 
-				   const int argn,
-				   VALUE input )
-{
-  char buf[128];
-  VALUE str;
-  VALUE asStr;
-  if ( msg &amp;&amp; *msg )
-    {
-      str = rb_str_new2(msg);
-    }
-  else
-    {
-      str = rb_str_new(NULL, 0);
-    }
-
-  str = rb_str_cat2( str, &quot;Expected argument &quot; );
-  sprintf( buf, &quot;%d of type &quot;, argn-1 );
-  str = rb_str_cat2( str, buf );
-  str = rb_str_cat2( str, type );
-  str = rb_str_cat2( str, &quot;, but got &quot; );
-  str = rb_str_cat2( str, rb_obj_classname(input) );
-  str = rb_str_cat2( str, &quot; &quot; );
-  asStr = rb_inspect(input);
-  if ( RSTRING_LEN(asStr) &gt; 30 )
-    {
-      str = rb_str_cat( str, StringValuePtr(asStr), 30 );
-      str = rb_str_cat2( str, &quot;...&quot; );
-    }
-  else
-    {
-      str = rb_str_append( str, asStr );
-    }
-
-  if ( name )
-    {
-      str = rb_str_cat2( str, &quot;\n\tin SWIG method '&quot; );
-      str = rb_str_cat2( str, name );
-      str = rb_str_cat2( str, &quot;'&quot; );
-    }
-
-  return StringValuePtr( str );
-}
 
-/* This function is called when an overloaded method fails */
-SWIGINTERN 
-void Ruby_Format_OverloadedError(
-				 const int argc,
-				 const int maxargs,
-				 const char* method, 
-				 const char* prototypes 
-				 )
-{
-  const char* msg = &quot;Wrong # of arguments&quot;;
-  if ( argc &lt;= maxargs ) msg = &quot;Wrong arguments&quot;;
-  rb_raise(rb_eArgError,&quot;%s for overloaded method '%s'.\n&quot;  
-	   &quot;Possible C/C++ prototypes are:\n%s&quot;,
-	   msg, method, prototypes);
-}
 
 /* -----------------------------------------------------------------------------
  * See the LICENSE file for information on copyright, usage and redistribution
@@ -1125,51 +994,23 @@ void Ruby_Format_OverloadedError(
 extern &quot;C&quot; {
 #endif
 
-/* Ruby 1.8 actually assumes the first case. */
-#if SIZEOF_VOIDP == SIZEOF_LONG
-#  define SWIG2NUM(v) LONG2NUM((unsigned long)v)
-#  define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
-#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
-#  define SWIG2NUM(v) LL2NUM((unsigned long long)v)
-#  define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
-#else
-#  error sizeof(void*) is not the same as long or long long
-#endif
-
 
 /* Global Ruby hash table to store Trackings from C/C++
-   structs to Ruby Objects. 
-*/
-static VALUE swig_ruby_trackings = Qnil;
+   structs to Ruby Objects. */
+static VALUE swig_ruby_trackings;
 
 /* Global variable that stores a reference to the ruby
    hash table delete function. */
-static ID swig_ruby_hash_delete;
+static ID swig_ruby_hash_delete = 0;
 
 /* Setup a Ruby hash table to store Trackings */
 SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
   /* Create a ruby hash table to store Trackings from C++ 
-     objects to Ruby objects. */
-
-  /* Try to see if some other .so has already created a 
-     tracking hash table, which we keep hidden in an instance var
-     in the SWIG module.
-     This is done to allow multiple DSOs to share the same
-     tracking table.
-  */
-  ID trackings_id = rb_intern( &quot;@__trackings__&quot; );
-  VALUE verbose = rb_gv_get(&quot;VERBOSE&quot;);
-  rb_gv_set(&quot;VERBOSE&quot;, Qfalse);
-  swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
-  rb_gv_set(&quot;VERBOSE&quot;, verbose);
-
-  /* No, it hasn't.  Create one ourselves */ 
-  if ( swig_ruby_trackings == Qnil )
-    {
-      swig_ruby_trackings = rb_hash_new();
-      rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
-    }
-
+     objects to Ruby objects.  Also make sure to tell
+     the garabage collector about the hash table. */
+  swig_ruby_trackings = rb_hash_new();
+  rb_gc_register_address(&amp;swig_ruby_trackings);
+  
   /* Now store a reference to the hash table delete function
      so that we only have to look it up once.*/
   swig_ruby_hash_delete = rb_intern(&quot;delete&quot;);
@@ -1182,7 +1023,8 @@ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
      a Ruby number object. */
 
   /* Convert the pointer to a Ruby number */
-  return SWIG2NUM(ptr);
+  unsigned long value = (unsigned long) ptr;
+  return LONG2NUM(value);
 }
 
 /* Get a Ruby number to reference an object */
@@ -1192,7 +1034,8 @@ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
      a Ruby number object. */
 
   /* Convert the Object to a Ruby number */
-  return SWIG2NUM(object);
+  unsigned long value = (unsigned long) object;
+  return LONG2NUM(value);
 }
 
 /* Get a Ruby object from a previously stored reference */
@@ -1200,8 +1043,9 @@ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
   /* The provided Ruby number object is a reference
      to the Ruby object we want.*/
 
-  /* Convert the Ruby number to a Ruby object */
-  return NUM2SWIG(reference);
+  /* First convert the Ruby number to a C number */
+  unsigned long value = NUM2LONG(reference);
+  return (VALUE) value;
 }
 
 /* Add a Tracking from a C/C++ struct to a Ruby object */
@@ -1293,15 +1137,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
   return target;
 }
 
-/* For ruby1.8.4 and earlier. */
-#ifndef RUBY_INIT_STACK
-   RUBY_EXTERN void Init_stack(VALUE* addr);
-#  define RUBY_INIT_STACK \
-   VALUE variable_in_this_stack_frame; \
-   Init_stack(&amp;variable_in_this_stack_frame);
-#endif
-
-
 #ifdef __cplusplus
 }
 #endif
@@ -1366,7 +1201,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
 #define SWIG_MangleStr(value)                        	SWIG_Ruby_MangleStr(value)		  
 #define SWIG_CheckConvert(value, ty)                 	SWIG_Ruby_CheckConvert(value, ty)	  
 
-#include &quot;assert.h&quot;
 
 /* -----------------------------------------------------------------------------
  * pointers/data manipulation
@@ -1374,6 +1208,9 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
 
 #ifdef __cplusplus
 extern &quot;C&quot; {
+#if 0
+} /* cc-mode */
+#endif
 #endif
 
 typedef struct {
@@ -1385,44 +1222,10 @@ typedef struct {
 } swig_class;
 
 
-/* Global pointer used to keep some internal SWIG stuff */
+static VALUE _mSWIG = Qnil;
 static VALUE _cSWIG_Pointer = Qnil;
 static VALUE swig_runtime_data_type_pointer = Qnil;
 
-/* Global IDs used to keep some internal SWIG stuff */
-static ID swig_arity_id = 0;
-static ID swig_call_id  = 0;
-
-/*
-  If your swig extension is to be run within an embedded ruby and has
-  director callbacks, you should set -DRUBY_EMBEDDED during compilation.  
-  This will reset ruby's stack frame on each entry point from the main 
-  program the first time a virtual director function is invoked (in a 
-  non-recursive way).
-  If this is not done, you run the risk of Ruby trashing the stack.
-*/
-
-#ifdef RUBY_EMBEDDED
-
-#  define SWIG_INIT_STACK                            \
-      if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
-      ++swig_virtual_calls;
-#  define SWIG_RELEASE_STACK --swig_virtual_calls;
-#  define Ruby_DirectorTypeMismatchException(x) \
-          rb_raise( rb_eTypeError, x ); return c_result;
-
-      static unsigned int swig_virtual_calls = 0;
-
-#else  /* normal non-embedded extension */
-
-#  define SWIG_INIT_STACK
-#  define SWIG_RELEASE_STACK
-#  define Ruby_DirectorTypeMismatchException(x) \
-          throw Swig::DirectorTypeMismatchException( x );
-
-#endif  /* RUBY_EMBEDDED */
-
-
 SWIGRUNTIME VALUE 
 getExceptionClass(void) {
   static int init = 0;
@@ -1454,8 +1257,6 @@ SWIG_Ruby_InitRuntime(void)
 {
   if (_mSWIG == Qnil) {
     _mSWIG = rb_define_module(&quot;SWIG&quot;);
-    swig_call_id  = rb_intern(&quot;call&quot;);
-    swig_arity_id = rb_intern(&quot;arity&quot;);
   }
 }
 
@@ -1479,7 +1280,7 @@ SWIGRUNTIME VALUE
 SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
 {
   int own =  flags &amp; SWIG_POINTER_OWN; 
-  int track;
+  
   char *klass_name;
   swig_class *sklass;
   VALUE klass;
@@ -1492,15 +1293,14 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
     sklass = (swig_class *) type-&gt;clientdata;
 		
     /* Are we tracking this class and have we already returned this Ruby object? */
-    track = sklass-&gt;trackObjects;
-    if (track) {
+    if (sklass-&gt;trackObjects) {
       obj = SWIG_RubyInstanceFor(ptr);
       
       /* Check the object's type and make sure it has the correct type.
         It might not in cases where methods do things like 
         downcast methods. */
       if (obj != Qnil) {
-        VALUE value = rb_iv_get(obj, &quot;@__swigtype__&quot;);
+        VALUE value = rb_iv_get(obj, &quot;__swigtype__&quot;);
         char* type_name = RSTRING_PTR(value);
 				
         if (strcmp(type-&gt;name, type_name) == 0) {
@@ -1510,13 +1310,10 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
     }
 
     /* Create a new Ruby object */
-    obj = Data_Wrap_Struct(sklass-&gt;klass, VOIDFUNC(sklass-&gt;mark), 
-			   ( own ? VOIDFUNC(sklass-&gt;destroy) : 
-			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
-			     ), ptr);
+    obj = Data_Wrap_Struct(sklass-&gt;klass, VOIDFUNC(sklass-&gt;mark), (own ? VOIDFUNC(sklass-&gt;destroy) : 0), ptr);
 
     /* If tracking is on for this class then track this object. */
-    if (track) {
+    if (sklass-&gt;trackObjects) {
       SWIG_RubyAddTracking(ptr, obj);
     }
   } else {
@@ -1526,7 +1323,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
     free((void *) klass_name);
     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
   }
-  rb_iv_set(obj, &quot;@__swigtype__&quot;, rb_str_new2(type-&gt;name));
+  rb_iv_set(obj, &quot;__swigtype__&quot;, rb_str_new2(type-&gt;name));
   
   return obj;
 }
@@ -1538,7 +1335,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
   VALUE obj;
   swig_class *sklass = (swig_class *) type-&gt;clientdata;
   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass-&gt;mark), VOIDFUNC(sklass-&gt;destroy), 0);
-  rb_iv_set(obj, &quot;@__swigtype__&quot;, rb_str_new2(type-&gt;name));
+  rb_iv_set(obj, &quot;__swigtype__&quot;, rb_str_new2(type-&gt;name));
   return obj;
 }
 
@@ -1546,7 +1343,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
 SWIGRUNTIMEINLINE char *
 SWIG_Ruby_MangleStr(VALUE obj)
 {
-  VALUE stype = rb_iv_get(obj, &quot;@__swigtype__&quot;);
+  VALUE stype = rb_iv_get(obj, &quot;__swigtype__&quot;);
   return StringValuePtr(stype);
 }
 
@@ -1628,11 +1425,8 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
     tc = SWIG_TypeCheck(c, ty);
     if (!tc) {
       return SWIG_ERROR;
-    } else {
-      int newmemory = 0;
-      *ptr = SWIG_TypeCast(tc, vptr, &amp;newmemory);
-      assert(!newmemory); /* newmemory handling not yet implemented */
     }
+    *ptr = SWIG_TypeCast(tc, vptr);
   } else {
     *ptr = vptr;
   }
@@ -1713,42 +1507,10 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
   rb_define_readonly_variable(&quot;$swig_runtime_data_type_pointer&quot; SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &amp;swig_runtime_data_type_pointer);
 }
 
-/* This function can be used to check whether a proc or method or similarly
-   callable function has been passed.  Usually used in a %typecheck, like:
-
-   %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
-        $result = SWIG_Ruby_isCallable( $input );
-   }
- */
-SWIGINTERN
-int SWIG_Ruby_isCallable( VALUE proc )
-{
-  if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
-    return 1;
-  return 0;
-}
-
-/* This function can be used to check the arity (number of arguments)
-   a proc or method can take.  Usually used in a %typecheck.
-   Valid arities will be that equal to minimal or those &lt; 0
-   which indicate a variable number of parameters at the end.
- */
-SWIGINTERN
-int SWIG_Ruby_arity( VALUE proc, int minimal )
-{
-  if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
-    {
-      VALUE num = rb_funcall( proc, swig_arity_id, 0 );
-      int arity = NUM2INT(num);
-      if ( arity &lt; 0 &amp;&amp; (arity+1) &lt; -minimal ) return 1;
-      if ( arity == minimal ) return 1;
-      return 1;
-    }
-  return 0;
-}
-
-
 #ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
 }
 #endif
 
@@ -1775,11 +1537,7 @@ static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
 
 static VALUE mWebView;
 
-#define SWIG_RUBY_THREAD_BEGIN_BLOCK
-#define SWIG_RUBY_THREAD_END_BLOCK
-
-
-#define SWIGVERSION 0x010336 
+#define SWIGVERSION 0x010331 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -1789,7 +1547,7 @@ static VALUE mWebView;
 
 extern void webview_refresh();
 #define refresh webview_refresh 
-extern void webview_navigate(char* url);
+extern void webview_navigate(char* url, int index);
 #define navigate webview_navigate
 extern char* webview_current_location();
 #define current_location webview_current_location
@@ -1797,6 +1555,8 @@ extern char* execute_js(char* js);
 #define execute_js webview_execute_js
 extern void set_menu_items(VALUE argv);
 #define set_menu_items webview_set_menu_items
+extern int active_tab();
+#define active_tab webview_active_tab
 
 
 SWIGINTERN swig_type_info*
@@ -1816,11 +1576,11 @@ SWIGINTERN int
 SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
 {
   if (TYPE(obj) == T_STRING) {
-    #if defined(StringValuePtr)
-    char *cstr = StringValuePtr(obj); 
-    #else
+    
+
+
     char *cstr = STR2CSTR(obj);
-    #endif
+    
     size_t size = RSTRING_LEN(obj) + 1;
     if (cptr)  {
       if (alloc) {
@@ -1853,6 +1613,70 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
 
 
 
+#include &lt;limits.h&gt;
+#ifndef LLONG_MIN
+# define LLONG_MIN	LONG_LONG_MIN
+#endif
+#ifndef LLONG_MAX
+# define LLONG_MAX	LONG_LONG_MAX
+#endif
+#ifndef ULLONG_MAX
+# define ULLONG_MAX	ULONG_LONG_MAX
+#endif
+
+
+SWIGINTERN VALUE
+SWIG_ruby_failed(void)
+{
+  return Qnil;
+} 
+
+
+/*@SWIG:%ruby_aux_method@*/
+SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
+{
+  VALUE obj = args[0];
+  VALUE type = TYPE(obj);
+  long *res = (long *)(args[1]);
+  *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
+  return obj;
+}
+/*@SWIG@*/
+
+SWIGINTERN int
+SWIG_AsVal_long (VALUE obj, long* val)
+{
+  VALUE type = TYPE(obj);
+  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
+    long v;
+    VALUE a[2];
+    a[0] = obj;
+    a[1] = (VALUE)(&amp;v);
+    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
+      if (val) *val = v;
+      return SWIG_OK;
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (VALUE obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &amp;v);
+  if (SWIG_IsOK(res)) {
+    if ((v &lt; INT_MIN || v &gt; INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+
 SWIGINTERNINLINE VALUE 
 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
 {
@@ -1876,6 +1700,16 @@ SWIG_FromCharPtr(const char *cptr)
   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
 }
 
+
+  #define SWIG_From_long   LONG2NUM 
+
+
+SWIGINTERNINLINE VALUE
+SWIG_From_int  (int value)
+{    
+  return SWIG_From_long  (value);
+}
+
 SWIGINTERN VALUE
 _wrap_refresh(int argc, VALUE *argv, VALUE self) {
   if ((argc &lt; 0) || (argc &gt; 0)) {
@@ -1891,19 +1725,32 @@ fail:
 SWIGINTERN VALUE
 _wrap_navigate(int argc, VALUE *argv, VALUE self) {
   char *arg1 = (char *) 0 ;
+  int arg2 ;
   int res1 ;
   char *buf1 = 0 ;
   int alloc1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
   
-  if ((argc &lt; 1) || (argc &gt; 1)) {
+  {
+    arg2 = 0;
+  }
+  if ((argc &lt; 1) || (argc &gt; 2)) {
     rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 1)&quot;,argc); SWIG_fail;
   }
   res1 = SWIG_AsCharPtrAndSize(argv[0], &amp;buf1, NULL, &amp;alloc1);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( &quot;&quot;, &quot;char *&quot;,&quot;navigate&quot;, 1, argv[0] ));
+    SWIG_exception_fail(SWIG_ArgError(res1), &quot;in method '&quot; &quot;navigate&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;char *&quot;&quot;'&quot;);
   }
   arg1 = (char *)(buf1);
-  navigate(arg1);
+  if (argc &gt; 1) {
+    ecode2 = SWIG_AsVal_int(argv[1], &amp;val2);
+    if (!SWIG_IsOK(ecode2)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode2), &quot;in method '&quot; &quot;navigate&quot; &quot;', argument &quot; &quot;2&quot;&quot; of type '&quot; &quot;int&quot;&quot;'&quot;);
+    } 
+    arg2 = (int)(val2);
+  }
+  navigate(arg1,arg2);
   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
   return Qnil;
 fail:
@@ -1931,10 +1778,10 @@ fail:
 SWIGINTERN VALUE
 _wrap_execute_js(int argc, VALUE *argv, VALUE self) {
   char *arg1 = (char *) 0 ;
+  char *result = 0 ;
   int res1 ;
   char *buf1 = 0 ;
   int alloc1 = 0 ;
-  char *result = 0 ;
   VALUE vresult = Qnil;
   
   if ((argc &lt; 1) || (argc &gt; 1)) {
@@ -1942,7 +1789,7 @@ _wrap_execute_js(int argc, VALUE *argv, VALUE self) {
   }
   res1 = SWIG_AsCharPtrAndSize(argv[0], &amp;buf1, NULL, &amp;alloc1);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( &quot;&quot;, &quot;char *&quot;,&quot;execute_js&quot;, 1, argv[0] ));
+    SWIG_exception_fail(SWIG_ArgError(res1), &quot;in method '&quot; &quot;execute_js&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;char *&quot;&quot;'&quot;);
   }
   arg1 = (char *)(buf1);
   result = (char *)execute_js(arg1);
@@ -1970,6 +1817,22 @@ fail:
 }
 
 
+SWIGINTERN VALUE
+_wrap_active_tab(int argc, VALUE *argv, VALUE self) {
+  int result;
+  VALUE vresult = Qnil;
+  
+  if ((argc &lt; 0) || (argc &gt; 0)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 0)&quot;,argc); SWIG_fail;
+  }
+  result = (int)active_tab();
+  vresult = SWIG_From_int((int)(result));
+  return vresult;
+fail:
+  return Qnil;
+}
+
+
 
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
@@ -2045,7 +1908,7 @@ SWIGRUNTIME void
 SWIG_InitializeModule(void *clientdata) {
   size_t i;
   swig_module_info *module_head, *iter;
-  int found, init;
+  int found;
 
   clientdata = clientdata;
 
@@ -2055,9 +1918,6 @@ SWIG_InitializeModule(void *clientdata) {
     swig_module.type_initial = swig_type_initial;
     swig_module.cast_initial = swig_cast_initial;
     swig_module.next = &amp;swig_module;
-    init = 1;
-  } else {
-    init = 0;
   }
 
   /* Try and load any already created modules */
@@ -2086,12 +1946,6 @@ SWIG_InitializeModule(void *clientdata) {
     module_head-&gt;next = &amp;swig_module;
   }
 
-  /* When multiple interpeters are used, a module could have already been initialized in
-     a different interpreter, but not yet have a pointer in this interpreter.
-     In this case, we do not want to continue adding types... everything should be
-     set up already */
-  if (init == 0) return;
-
   /* Now work on filling in swig_module.types */
 #ifdef SWIGRUNTIME_DEBUG
   printf(&quot;SWIG_InitializeModule: size %d\n&quot;, swig_module.size);
@@ -2225,9 +2079,7 @@ SWIG_PropagateClientData(void) {
 }
 #endif
 
-/*
 
-*/
 #ifdef __cplusplus
 extern &quot;C&quot;
 #endif
@@ -2248,5 +2100,6 @@ SWIGEXPORT void Init_WebView(void) {
   rb_define_module_function(mWebView, &quot;current_location&quot;, _wrap_current_location, -1);
   rb_define_module_function(mWebView, &quot;execute_js&quot;, _wrap_execute_js, -1);
   rb_define_module_function(mWebView, &quot;set_menu_items&quot;, _wrap_set_menu_items, -1);
+  rb_define_module_function(mWebView, &quot;active_tab&quot;, _wrap_active_tab, -1);
 }
 </diff>
      <filename>platform/shared/ruby/ext/webview/webview_wrap.c</filename>
    </modified>
    <modified>
      <diff>@@ -1998,6 +1998,7 @@ void rb_gc_mark_encodings(void);
 static int
 garbage_collect(rb_objspace_t *objspace)
 {
+    int i = 0;
     struct gc_list *list;
     rb_thread_t *th = GET_THREAD();
     INIT_GC_PROF_PARAMS;
@@ -2020,6 +2021,12 @@ garbage_collect(rb_objspace_t *objspace)
     during_gc++;
     objspace-&gt;count++;
 
+    /*for ( i = 0; i &lt; 100000; i++ )
+    {
+        char* mem = malloc(1000);
+        free(mem);
+    }*/
+
     GC_PROF_TIMER_START;
     GC_PROF_MARK_TIMER_START;
     SET_STACK_END;</diff>
      <filename>platform/shared/ruby/gc.c</filename>
    </modified>
    <modified>
      <diff>@@ -39,6 +39,7 @@ main(int argc, char **argv)
     ruby_sysinit(&amp;argc, &amp;argv);
 
     RhoRubyStart();
+    RhoRubyInitApp();
     RhoRubyStop();
 }
 </diff>
      <filename>platform/shared/ruby/main.c</filename>
    </modified>
    <modified>
      <diff>@@ -20,8 +20,8 @@
 static void native_mutex_lock(pthread_mutex_t *lock);
 static void native_mutex_unlock(pthread_mutex_t *lock);
 static int native_mutex_trylock(pthread_mutex_t *lock);
-static void native_mutex_initialize(pthread_mutex_t *lock);
-static void native_mutex_destroy(pthread_mutex_t *lock);
+void native_mutex_initialize(pthread_mutex_t *lock);
+void native_mutex_destroy(pthread_mutex_t *lock);
 
 static void native_cond_signal(pthread_cond_t *cond);
 static void native_cond_broadcast(pthread_cond_t *cond);
@@ -62,7 +62,7 @@ native_mutex_trylock(pthread_mutex_t *lock)
     return 0;
 }
 
-static void
+void
 native_mutex_initialize(pthread_mutex_t *lock)
 {
     int r = pthread_mutex_init(lock, 0);
@@ -71,7 +71,7 @@ native_mutex_initialize(pthread_mutex_t *lock)
     }
 }
 
-static void
+void
 native_mutex_destroy(pthread_mutex_t *lock)
 {
     int r = pthread_mutex_destroy(lock);
@@ -146,7 +146,7 @@ null_func(int i)
     /* null */
 }
 
-rb_thread_t *
+static rb_thread_t *
 ruby_thread_from_native(void)
 {
 	if ( !ruby_native_thread_key )
@@ -155,7 +155,7 @@ ruby_thread_from_native(void)
     return pthread_getspecific(ruby_native_thread_key);
 }
 
-int
+static int
 ruby_thread_set_native(rb_thread_t *th)
 {
     return pthread_setspecific(ruby_native_thread_key, th) == 0;</diff>
      <filename>platform/shared/ruby/thread_pthread.c</filename>
    </modified>
    <modified>
      <diff>@@ -24,21 +24,21 @@ static volatile DWORD ruby_native_thread_key = TLS_OUT_OF_INDEXES;
 static int native_mutex_lock(rb_thread_lock_t *);
 static int native_mutex_unlock(rb_thread_lock_t *);
 static int native_mutex_trylock(rb_thread_lock_t *);
-static void native_mutex_initialize(rb_thread_lock_t *);
+void native_mutex_initialize(rb_thread_lock_t *);
 
 static void native_cond_signal(rb_thread_cond_t *cond);
 static void native_cond_broadcast(rb_thread_cond_t *cond);
 static void native_cond_wait(rb_thread_cond_t *cond, rb_thread_lock_t *mutex);
 static void native_cond_initialize(rb_thread_cond_t *cond);
-static void native_cond_destroy(rb_thread_cond_t *cond);
+void native_cond_destroy(rb_thread_cond_t *cond);
 
-rb_thread_t *
+static rb_thread_t *
 ruby_thread_from_native(void)
 {
     return TlsGetValue(ruby_native_thread_key);
 }
 
-int
+static int
 ruby_thread_set_native(rb_thread_t *th)
 {
     return TlsSetValue(ruby_native_thread_key, th);
@@ -310,7 +310,7 @@ native_mutex_trylock(rb_thread_lock_t *lock)
 #endif
 }
 
-static void
+void
 native_mutex_initialize(rb_thread_lock_t *lock)
 {
 #if USE_WIN32_MUTEX
@@ -324,7 +324,7 @@ native_mutex_initialize(rb_thread_lock_t *lock)
 #endif
 }
 
-static void
+void
 native_mutex_destroy(rb_thread_lock_t *lock)
 {
 #if USE_WIN32_MUTEX</diff>
      <filename>platform/shared/ruby/thread_win32.c</filename>
    </modified>
    <modified>
      <diff>@@ -601,14 +601,10 @@ NOINLINE(void rb_gc_save_machine_context(rb_thread_t *));
 #if RUBY_VM_THREAD_MODEL == 2
 RUBY_EXTERN rb_thread_t *ruby_current_thread;
 extern rb_vm_t *ruby_current_vm;
-//RHO
-extern rb_thread_t * ruby_thread_from_native(void);
-extern rb_thread_t * __getCurrentThread();
 
 #define GET_VM() ruby_current_vm
-#define GET_THREAD() __getCurrentThread()
-//ruby_current_thread
-//RHO
+#define GET_THREAD() ruby_current_thread
+
 #define rb_thread_set_current_raw(th) (void)(ruby_current_thread = (th))
 #define rb_thread_set_current(th) do { \
     rb_thread_set_current_raw(th); \</diff>
      <filename>platform/shared/ruby/vm_core.h</filename>
    </modified>
    <modified>
      <diff>@@ -10,6 +10,8 @@ public interface IRhoRubyHelper {
 	public abstract String getPlatform();
 	
 	public abstract IDBStorage createDBStorage();
+	public abstract IFileAccess createFileAccess();
+	public abstract IRAFile createRAFile();
 	
 	public void loadBackTrace(RubyArray backtrace);
 	public String getDeviceId();</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/IRhoRubyHelper.java</filename>
    </modified>
    <modified>
      <diff>@@ -38,33 +38,19 @@ public class RhoClassFactory
         
     }
     
+    public static IFileAccess createFileAccess() throws Exception
+    {
+    	return RhoClassFactory.createRhoRubyHelper().createFileAccess();
+    }
+    
+    public static IRAFile createRAFile() throws Exception
+    {
+    	return RhoClassFactory.createRhoRubyHelper().createRAFile();
+    }
+    
     public static IDBStorage createDBStorage() throws Exception
     {
     	return RhoClassFactory.createRhoRubyHelper().createDBStorage();
-    	/*
-    	LOG.INFO(&quot;createDBStorage&quot;);    	
-        Class wrapperClass;
-        try {
-            wrapperClass = Class.forName(&quot;com.rho.db.HsqlDBStorage&quot;);
-        } catch (ClassNotFoundException exc) {  
-        	try {
-                wrapperClass = Class.forName(&quot;com.rhomobile.rhodes.db.DBStorage&quot;); //android
-            } catch (ClassNotFoundException e) {
-	        	LOG.ERROR(&quot;createDBStorage- Class not found&quot;,e);    	
-            	
-                throw e;
-            }
-        }
-        
-        try{
-        	return (IDBStorage)wrapperClass.newInstance();
-        }catch(Exception e)
-        {
-        	LOG.ERROR(&quot;createDBStorage - newInstance failed&quot;,e);    	
-        	
-        	throw e;
-        }
-        */
     }
 
     public static IRhoRubyHelper createRhoRubyHelper() throws Exception</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/RhoClassFactory.java</filename>
    </modified>
    <modified>
      <diff>@@ -127,6 +127,18 @@ public class RhoConf {
         return &quot;&quot;;
     }
 
+    public String getPath(String szName)
+    {
+        String strPath = getString(szName);
+        if ( strPath.length() == 0 )
+            return strPath;
+
+        if ( strPath.charAt(strPath.length()-1) != '/' &amp;&amp; strPath.charAt(strPath.length()-1) != '\\' )
+            strPath += '/';
+
+        return strPath;
+    }
+    
     public int getInt(String szName){
     	String value = (String)m_mapValues.get(szName);
     	if ( value != null &amp;&amp; value.length() &gt; 0 )
@@ -238,7 +250,7 @@ public class RhoConf {
 			LOG.ERROR(&quot;send_log:loadClientID failed&quot;, exc);
 		}
 		
-		String strQuery = RhoConf.getInstance().getString(&quot;syncserver&quot;) + &quot;client_log?&quot; +
+		String strQuery = RhoConf.getInstance().getPath(&quot;syncserver&quot;) + &quot;client_log?&quot; +
 		&quot;client_id=&quot; + strClientID + &quot;&amp;device_pin=&quot; + strDevicePin;
 		nq.pushFile(strQuery, RhoLogger.getLogConf().getLogFilePath(), null );
    }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/RhoConf.java</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,23 @@ import java.util.Calendar;
 
 public class RhoProfiler {
 
-	public static boolean RHO_STRIP_PROFILER = true;
+	public static boolean RHO_STRIP_PROFILER = false;
+	
+	public static final String FILE_READ = &quot;FileRead&quot;;
+	public static final String FILE_WRITE = &quot;FileWrite&quot;;
+	public static final String FILE_SYNC = &quot;FileSync&quot;;
+	public static final String FILE_SET_SIZE = &quot;FileSetSize&quot;;
+	public static final String FILE_DELETE = &quot;FileDelete&quot;;
+	public static final String FILE_RENAME = &quot;FileRename&quot;;
+	
+	//public static final String SQL_SELECT = &quot;SqlSelect&quot;;
+	//public static final String SQL_FIND_NODE = &quot;SqlFindNode&quot;;
+	//public static final String SQL_GET_OBJECT_FROM_CACHE = &quot;SqlGetObjectFromCache&quot;;
+	//public static final String SQL_READ_OBJECT = &quot;SqlReadObject&quot;;
+	//public static final String SQL_GET_OBJECT_FROM_STORE = &quot;SqlGetObjectFromStore&quot;;
+	//public static final String SQL_PUT_OBJECT_TO_CACHE = &quot;SqlPutObjectToCache&quot;;
+	//public static final String SQL_READ_DATA = &quot;SqlReadData&quot;;
+	//public static final String SQL_READ_STRING = &quot;SqlReadString&quot;;
 	
 	private static final RhoLogger LOG = new RhoLogger(&quot;PROFILER&quot;);
 	
@@ -130,4 +146,39 @@ public class RhoProfiler {
 	    	(msg !=null&amp;&amp;msg.length()&gt;0 ? msg : &quot;&quot; ) +
 	        &quot; (&quot; + intervalToString(oInterval) + &quot;) : STOP&quot; );
 	}	
+	
+	/*
+	public void createSqlCounters() {
+		CREATE_COUNTER(SQL_SELECT);
+		CREATE_COUNTER(SQL_FIND_NODE);
+		CREATE_COUNTER(SQL_GET_OBJECT_FROM_CACHE);
+		CREATE_COUNTER(SQL_READ_OBJECT);
+		CREATE_COUNTER(SQL_GET_OBJECT_FROM_STORE);
+		CREATE_COUNTER(SQL_PUT_OBJECT_TO_CACHE);
+		CREATE_COUNTER(SQL_READ_DATA);
+		//CREATE_COUNTER(SQL_READ_STRING);
+	}
+	
+	public void destroySqlCounters() {
+		DESTROY_COUNTER(SQL_SELECT);
+		DESTROY_COUNTER(SQL_FIND_NODE);
+		DESTROY_COUNTER(SQL_GET_OBJECT_FROM_CACHE);
+		DESTROY_COUNTER(SQL_READ_OBJECT);
+		DESTROY_COUNTER(SQL_GET_OBJECT_FROM_STORE);
+		DESTROY_COUNTER(SQL_PUT_OBJECT_TO_CACHE);
+		DESTROY_COUNTER(SQL_READ_DATA);
+		//DESTROY_COUNTER(SQL_READ_STRING);
+	}
+	
+	public void flushSqlCounters(String msg) {
+		FLUSH_COUNTER(SQL_SELECT, msg);
+		FLUSH_COUNTER(SQL_FIND_NODE, msg);
+		FLUSH_COUNTER(SQL_GET_OBJECT_FROM_CACHE, msg);
+		FLUSH_COUNTER(SQL_READ_OBJECT, msg);
+		FLUSH_COUNTER(SQL_GET_OBJECT_FROM_STORE, msg);
+		FLUSH_COUNTER(SQL_PUT_OBJECT_TO_CACHE, msg);
+		FLUSH_COUNTER(SQL_READ_DATA, msg);
+		//FLUSH_COUNTER(SQL_READ_STRING, msg);
+	}
+	*/
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/RhoProfiler.java</filename>
    </modified>
    <modified>
      <diff>@@ -17,17 +17,18 @@ public class RhoRuby {
 
 	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
 		new RhoLogger(&quot;RhoRuby&quot;);
+	private static final RhoProfiler PROF = RhoProfiler.RHO_STRIP_PROFILER ? new RhoEmptyProfiler() : 
+		new RhoProfiler();
 	
 	public static final RubyID serveID = RubyID.intern(&quot;serve_hash&quot;);
 	public static final RubyID serveIndexID = RubyID.intern(&quot;serve_index_hash&quot;);
 	public static final RubyID raiseRhoError = RubyID.intern(&quot;raise_rhoerror&quot;);
+	public static final RubyID initApp = RubyID.intern(&quot;init_app&quot;);
 //	public static final RubyID getStartPath = RubyID.intern(&quot;get_start_path&quot;);
 //	public static final RubyID getOptionsPath = RubyID.intern(&quot;get_options_path&quot;);
 	
 	static RubyValue receiver;
 	static RubyProgram mainObj;
-	static RubyMethod m_RhomAttribManager_delete_attribs, m_RhomAttribManager_add_attrib, m_RhomAttribManager_save; 
-	static RubyClass m_classRhomAttribManager;
 	static RubyClass m_classRhoError;
 	static RubyMethod m_RhoError_err_message;
 	
@@ -40,6 +41,8 @@ public class RhoRuby {
 	public static final int ERR_NOSERVERRESPONSE = 6;
 	public static final int ERR_CLIENTISNOTLOGGEDIN = 7;
 	public static final int ERR_CUSTOMSYNCSERVER = 8;
+	public static final int ERR_UNATHORIZED = 9;
+	public static final int ERR_CANCELBYUSER = 10;
 	
 	public static int getNetErrorCode(Exception exc)
 	{
@@ -109,11 +112,6 @@ public class RhoRuby {
         		DBAdapter.getInstance().commit();
         		
         		RubyModule modRhom = (RubyModule)RubyRuntime.ObjectClass.getConstant(&quot;Rhom&quot;);
-        		m_classRhomAttribManager = (RubyClass)modRhom.getConstant(&quot;RhomAttribManager&quot;);
-        		m_RhomAttribManager_delete_attribs = m_classRhomAttribManager.findMethod( RubyID.intern(&quot;delete_attribs&quot;) );
-        		m_RhomAttribManager_add_attrib = m_classRhomAttribManager.findMethod( RubyID.intern(&quot;add_attrib&quot;) );
-        		m_RhomAttribManager_save = m_classRhomAttribManager.findMethod( RubyID.intern(&quot;save&quot;) );
-        		
         	}
         	
         /*}catch(ClassNotFoundException exc){
@@ -123,6 +121,10 @@ public class RhoRuby {
         }
 	}
 	
+	public static void RhoRubyInitApp(){
+		RubyAPI.callPublicNoArgMethod(receiver, null, initApp);
+	}
+	
 	public static void RhoRubyStop(){
 		
 		receiver = null;
@@ -197,7 +199,8 @@ public class RhoRuby {
 		
 		addHashToHash( rh, &quot;headers&quot;, headers );
 		
-		return callFramework(rh);
+		RubyValue res = callFramework(rh); 
+		return res; 
 	}
 	
 	static RubyValue callFramework(RubyValue hashReq) {
@@ -210,6 +213,19 @@ public class RhoRuby {
 		return ObjectFactory.createHash();
 	}
 
+	public static RubyArray create_array() {
+		return new RubyArray();
+	}
+
+	public static RubyString create_string(String str) {
+		return ObjectFactory.createString(str);
+	}
+	
+	public static void add_to_array(RubyValue ar, RubyValue val)
+	{
+		((RubyArray)ar).add(val);
+	}
+	
 	public static RubyValue addTimeToHash(RubyHash hash, String key, long val) {
 		return hash.add( ObjectFactory.createString(key), ObjectFactory.createTime(val) );
 	}
@@ -226,21 +242,4 @@ public class RhoRuby {
 		return hash.add( ObjectFactory.createString(key), val);	
 	}
 	
-	public static void RhomAttribManager_add_attrib( Integer nSrcID, String strAttribute)
-	{
-		m_RhomAttribManager_add_attrib.invoke( m_classRhomAttribManager, ObjectFactory.createInteger(nSrcID.longValue()), 
-				ObjectFactory.createString(strAttribute), null);
-	}
-	
-	public static void RhomAttribManager_delete_attribs( Integer nSrcID, long objID)
-	{
-		m_RhomAttribManager_delete_attribs.invoke( m_classRhomAttribManager, ObjectFactory.createInteger(nSrcID.longValue()), 
-				ObjectFactory.createInteger(objID), null);
-	}
-
-	public static void RhomAttribManager_save(Integer nSrcID)
-	{
-		m_RhomAttribManager_save.invoke( m_classRhomAttribManager, ObjectFactory.createInteger(nSrcID.longValue()), null);
-	}
-	
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/RhoRuby.java</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,8 @@ public class RhoThread extends Thread
     	m_isInWaitState = false;
     }
 
+    public Object getSyncObject(){ return m_syncObj; }
+    
     public void start(int ePriority)
     {
     	super.start();
@@ -66,11 +68,9 @@ public class RhoThread extends Thread
     
     public void stopWait()
     {
-    	if ( m_isInWaitState )
-    	{
-			synchronized (m_syncObj) {
-				m_syncObj.notify();
-			}
+		synchronized (m_syncObj) {
+	    	if ( m_isInWaitState )
+	    		m_syncObj.notify();
     	}    	
     }
 };</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/RhoThread.java</filename>
    </modified>
    <modified>
      <diff>@@ -10,13 +10,14 @@ public class DBAdapter extends RubyBasic {
 
 	private static DBAdapter m_Instance;
 	
-	private IDBCallback m_dbCallback;
 	private IDBStorage m_dbStorage;
 	private boolean m_bIsOpen = false;
 	private String  m_strDBPath;
 	private String  m_strDBVerPath;
+	private DBAttrManager m_attrMgr = new DBAttrManager();
 	
     Mutex m_mxDB = new Mutex();
+    boolean m_bInsideTransaction=false;
     boolean m_bUnlockDB = false;
 	
 	DBAdapter(RubyClass c) {
@@ -36,63 +37,63 @@ public class DBAdapter extends RubyBasic {
 		return m_Instance;
 	}
 	
-	public void setDbCallback(IDBCallback callback){
-		m_dbCallback = callback;
-		
-		m_dbStorage.setDbCallback(callback);
+	public DBAttrManager getAttrMgr()
+	{ 
+		return m_attrMgr; 
 	}
 	
 	public IDBResult executeSQL(String strStatement, Object[] values)throws DBException{
 		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
 		
-		return m_dbStorage.executeSQL(strStatement,values);
+		return m_dbStorage.executeSQL(strStatement,values,false);
 	}
 	public IDBResult executeSQL(String strStatement)throws DBException{
-		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
-		
 		return executeSQL(strStatement,null);
 	}
 	public IDBResult executeSQL(String strStatement, Object arg1)throws DBException{
-		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
-		
 		Object[] values = {arg1};
 		return executeSQL(strStatement,values);
 	}
 	public IDBResult executeSQL(String strStatement, int arg1)throws DBException{
-		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
-		
 		Object[] values = { new Integer(arg1)};
 		return executeSQL(strStatement,values);
 	}
 	public IDBResult executeSQL(String strStatement, long arg1)throws DBException{
-		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
-		
 		Object[] values = { new Long(arg1)};
 		return executeSQL(strStatement,values);
 	}
 	
 	public IDBResult executeSQL(String strStatement, Object arg1, Object arg2)throws DBException{
-		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
-		
 		Object[] values = {arg1,arg2};
 		return executeSQL(strStatement,values);
 	}
 	
 	public IDBResult executeSQL(String strStatement, Object arg1, Object arg2, Object arg3)throws DBException{
-		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
-		
 		Object[] values = {arg1,arg2,arg3};
 		return executeSQL(strStatement,values);
 	}
+	public IDBResult executeSQL(String strStatement, Object arg1, Object arg2, Object arg3, Object arg4)throws DBException{
+		Object[] values = {arg1,arg2,arg3,arg4};
+		return executeSQL(strStatement,values);
+	}
+	
+	public IDBResult executeSQL(String strStatement, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)throws DBException{
+		Object[] values = {arg1,arg2,arg3,arg4,arg5};
+		return executeSQL(strStatement,values);
+	}
 	public IDBResult executeSQL(String strStatement, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)throws DBException{
-		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
-		
 		Object[] values = {arg1,arg2,arg3,arg4,arg5,arg6};
 		return executeSQL(strStatement,values);
 	}
-	public IDBResult executeSQL(String strStatement, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)throws DBException{
-		LOG.TRACE(&quot;executeSQL: &quot; + strStatement);
+	
+	public IDBResult executeSQLReportNonUnique(String strStatement, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)throws DBException{
+		LOG.TRACE(&quot;executeSQLReportNonUnique: &quot; + strStatement);
 		
+		Object[] values = {arg1,arg2,arg3,arg4,arg5,arg6};
+		return m_dbStorage.executeSQL(strStatement,values, true);
+	}
+	
+	public IDBResult executeSQL(String strStatement, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)throws DBException{
 		Object[] values = {arg1,arg2,arg3,arg4,arg5,arg6,arg7};
 		return executeSQL(strStatement,values);
 	}
@@ -101,6 +102,7 @@ public class DBAdapter extends RubyBasic {
 	public void setUnlockDB(boolean b){ m_bUnlockDB = b; }
 	public void Lock(){ m_mxDB.Lock(); }
 	public void Unlock(){ setUnlockDB(false); m_mxDB.Unlock(); }
+    public boolean isInsideTransaction(){ return m_bInsideTransaction; }
 	
 	public static IDBResult createResult(){
 		return getInstance().m_dbStorage.createResult();
@@ -160,14 +162,22 @@ public class DBAdapter extends RubyBasic {
 		&quot;port VARCHAR(10) default NULL,&quot;+
 		&quot;last_sync_success VARCHAR(100) default NULL);&quot;+
 		&quot;CREATE TABLE object_values (&quot;+
-		&quot; id INTEGER default NULL,&quot;+
-		&quot; token varchar(30) default NULL,&quot;+
+		&quot; id INTEGER PRIMARY KEY,&quot;+
 		&quot; source_id int default NULL,&quot;+
 		&quot; attrib varchar(255) default NULL,&quot;+
 		&quot; object varchar(255) default NULL,&quot;+
 		&quot; value varchar default NULL,&quot;+
-		&quot; update_type varchar(255) default NULL,&quot;+
 		&quot; attrib_type varchar(255) default NULL);&quot;+
+		&quot;CREATE TABLE changed_values (&quot;+
+		&quot; id INTEGER default NULL,&quot;+
+		&quot; source_id int default NULL,&quot;+
+		&quot; attrib varchar(255) default NULL,&quot;+
+		&quot; object varchar(255) default NULL,&quot;+
+		&quot; value varchar default NULL,&quot;+
+		&quot; attrib_type varchar(255) default NULL,&quot; +
+		&quot; update_type varchar(255) default NULL, &quot; +
+		&quot; sent int default 0,&quot; +
+		&quot; main_id INTEGER default 0 );&quot;+
 		&quot;CREATE TABLE sources (&quot;+
 		//&quot;id INTEGER PRIMARY KEY,&quot;+
 		&quot;source_id int PRIMARY KEY,&quot;+
@@ -184,22 +194,69 @@ public class DBAdapter extends RubyBasic {
 		//&quot;CREATE INDEX by_attrib_obj_utype on object_values (attrib,object,update_type);&quot;+
 		//&quot;CREATE INDEX by_attrib_utype on object_values (attrib,update_type);&quot;+
 		//&quot;CREATE INDEX by_src_type ON object_values (source_id, attrib_type, object);&quot;+
+		&quot;CREATE INDEX by_src_id ON object_values (source_id);&quot;+
+		&quot;CREATE UNIQUE INDEX by_src_object ON object_values (object, attrib, source_id);&quot;+
+		&quot;CREATE INDEX by_src_value ON object_values (attrib, source_id, value);&quot;;//+
+		//&quot;CREATE INDEX by_id ON object_values (id);&quot;; //for delete operation
+		//&quot;CREATE INDEX by_src_object ON object_values (source_id, object);&quot;+
+		//&quot;CREATE INDEX by_src_up_value ON object_values (source_id, update_type, value);&quot;;
+		//&quot;CREATE INDEX by_type ON object_values (attrib_type)&quot;;
+    }
+
+    /*private String getSqlScript(){
+    	//TODO: read script from jar
+		return &quot;CREATE TABLE client_info (&quot;+
+		&quot;client_id VARCHAR(255) PRIMARY KEY,&quot;+
+		&quot;token VARCHAR(255) default NULL,&quot;+
+		&quot;token_sent int default 0,&quot;+
+		&quot;reset int default 0,&quot;+
+		&quot;port VARCHAR(10) default NULL,&quot;+
+		&quot;last_sync_success VARCHAR(100) default NULL);&quot;+
+		&quot;CREATE TABLE object_values (&quot;+
+		&quot; id INTEGER PRIMARY KEY,&quot;+
+		&quot; source_id int default NULL,&quot;+
+		&quot; attrib varchar(255) default NULL,&quot;+
+		&quot; object varchar(255) default NULL,&quot;+
+		&quot; value varchar default NULL,&quot;+
+		&quot; attrib_type varchar(32) default NULL);&quot;+
+		&quot;CREATE TABLE changed_values (&quot;+
+		&quot; id INTEGER PRIMARY KEY,&quot;+
+		&quot; update_type varchar(255) default NULL);&quot;+
+		&quot;CREATE TABLE sources (&quot;+
+		//&quot;id INTEGER PRIMARY KEY,&quot;+
+		&quot;source_id int PRIMARY KEY,&quot;+
+		&quot;name varchar(255) default NULL,&quot;+
+		&quot;token varchar(32) default NULL,&quot;+
+		&quot;source_url VARCHAR(255) default NULL,&quot;+
+		&quot;session VARCHAR(255) default NULL,&quot;+
+		&quot;last_updated int default 0,&quot;+
+		&quot;last_inserted_size int default 0,&quot;+
+		&quot;last_deleted_size int default 0,&quot;+
+		&quot;last_sync_duration int default 0,&quot;+
+		&quot;last_sync_success int default 0,&quot; +
+		&quot;source_attribs varchar default NULL);&quot;+
+		//&quot;CREATE INDEX by_attrib_obj_utype on object_values (attrib,object,update_type);&quot;+
+		//&quot;CREATE INDEX by_attrib_utype on object_values (attrib,update_type);&quot;+
+		//&quot;CREATE INDEX by_src_type ON object_values (source_id, attrib_type, object);&quot;+
 		&quot;CREATE INDEX by_src_update ON object_values (source_id, update_type);&quot;+
 		&quot;CREATE INDEX by_id ON object_values (id);&quot;; //for delete operation
 		//&quot;CREATE INDEX by_src_object ON object_values (source_id, object);&quot;+
 		//&quot;CREATE INDEX by_src_up_value ON object_values (source_id, update_type, value);&quot;;
 		//&quot;CREATE INDEX by_type ON object_values (attrib_type)&quot;;
-    }
+    }*/
     
     public void startTransaction()throws DBException
     {
     	Lock();
+    	m_bInsideTransaction=true;    	
     	m_dbStorage.startTransaction();
     }
     
     public void commit()throws DBException
     {
+    	getAttrMgr().save(this);
     	m_dbStorage.commit();
+    	m_bInsideTransaction=false;
     	Unlock();
     }
     public void endTransaction()throws DBException
@@ -223,15 +280,20 @@ public class DBAdapter extends RubyBasic {
     
     DBVersion readDBVersion()throws Exception
 	{
-        SimpleFile file = RhoClassFactory.createFile();
-        file.open(m_strDBVerPath, true, true);
-        byte buf[] = new byte[20];
-		int len = file.read(0, buf);
-		file.close();
-		String strFullVer = &quot;&quot;;
-		if ( len &gt; 0 )
-			strFullVer = new String(buf,0,len);
-		
+    	String strFullVer = &quot;&quot;;
+    	try {
+	    	IRAFile file = RhoClassFactory.createRAFile();
+	    	file.open(m_strDBVerPath);
+	        byte buf[] = new byte[20];
+	        int len = file.read(buf, 0, buf.length);
+			file.close();
+			if ( len &gt; 0 )
+				strFullVer = new String(buf,0,len);
+    	}
+    	catch (Exception e) {
+    		LOG.TRACE(&quot;readDBVersion: Exception: &quot; + e.getMessage());
+    	}
+    	
 		if ( strFullVer.length() == 0 )
 			return new DBVersion();
 		
@@ -244,10 +306,11 @@ public class DBAdapter extends RubyBasic {
 	
 	void writeDBVersion(DBVersion ver)throws Exception
 	{
-        SimpleFile file = RhoClassFactory.createFile();
-        file.open(m_strDBVerPath, false, false);
+		IRAFile file = RhoClassFactory.createRAFile();
+		file.open(m_strDBVerPath, &quot;rw&quot;);
         String strFullVer = ver.m_strRhoVer + &quot;;&quot; + ver.m_strAppVer;
-        file.write(0, strFullVer.getBytes() );
+        byte[] buf = strFullVer.getBytes();
+        file.write(buf, 0, buf.length);
         file.close();
 	}
     
@@ -295,6 +358,10 @@ public class DBAdapter extends RubyBasic {
 		
 		//executeSQL(&quot;CREATE INDEX by_src ON object_values (source_id)&quot;, null);
 		m_bIsOpen = true;
+		
+		getAttrMgr().load(this);
+		
+		m_dbStorage.setDbCallback(new DBCallback(this));
     }
     
 	private String createInsertStatement(IDBResult res, String tableName)
@@ -327,16 +394,31 @@ public class DBAdapter extends RubyBasic {
 		
 		IDBStorage db = null;
 		try{
+		    getAttrMgr().reset(this);
+			
 			String strTable = v.toStr();
 			
 			String dbName = getNameNoExt(m_strDBPath);
 			String dbNewName  = dbName + &quot;new&quot;;
 			
-			SimpleFile fs = RhoClassFactory.createFile();
+			IFileAccess fs = RhoClassFactory.createFileAccess();
 			
-		    fs.delete(dbNewName + &quot;.data&quot;);
-		    fs.delete(dbNewName + &quot;.script&quot;);
-	
+			String dbNameData = dbName + &quot;.data&quot;;
+		    String dbNewNameData = dbNewName + &quot;.data&quot;;
+		    String dbNameScript = dbName + &quot;.script&quot;;
+		    String dbNewNameScript = dbNewName + &quot;.script&quot;;
+		    String dbNameJournal = dbName + &quot;.journal&quot;;
+		    String dbNewNameJournal = dbNewName + &quot;.journal&quot;;
+		    
+			//LOG.TRACE(&quot;DBAdapter: &quot; + dbNewNameDate + &quot;: &quot; + (fs.exists(dbNewNameData) ? &quot;&quot; : &quot;not &quot;) + &quot;exists&quot;);
+		    fs.delete(dbNewNameData);
+		    //LOG.TRACE(&quot;DBAdapter: &quot; + dbNewNameScript + &quot;: &quot; + (fs.exists(dbNewNameScript) ? &quot;&quot; : &quot;not &quot;) + &quot;exists&quot;);
+		    fs.delete(dbNewNameScript);
+		    //LOG.TRACE(&quot;DBAdapter: &quot; + dbNewNameJournal + &quot;: &quot; + (fs.exists(dbNewNameJournal) ? &quot;&quot; : &quot;not &quot;) + &quot;exists&quot;);
+		    fs.delete(dbNewNameJournal);
+		    
+		    LOG.TRACE(&quot;1. Size of &quot; + dbNameData + &quot;: &quot; + fs.size(dbNameData));
+		    
 		    db = RhoClassFactory.createDBStorage();	    
 			db.open( dbNewName, getSqlScript() );
 			
@@ -358,7 +440,7 @@ public class DBAdapter extends RubyBasic {
 			    	if ( strInsert.length() == 0 )
 			    		strInsert = createInsertStatement(res, tableName);
 			    	
-			    	db.executeSQL(strInsert, res.getCurData() );
+			    	db.executeSQL(strInsert, res.getCurData(), false );
 			    }
 			}
 			
@@ -369,12 +451,27 @@ public class DBAdapter extends RubyBasic {
 		    m_dbStorage = null;
 		    m_bIsOpen = false;
 		    
-		    fs.renameOverwrite(dbNewName + &quot;.data&quot;, dbName+&quot;.data&quot;);
-		    fs.renameOverwrite(dbNewName + &quot;.script&quot;, dbName+&quot;.script&quot;);
+		    LOG.TRACE(&quot;2. Size of &quot; + dbNewNameData + &quot;: &quot; + fs.size(dbNewNameData));
+		    
+		    fs.delete(dbNameJournal);
+		    
+			String fName = makeBlobFolderName();
+			RhoClassFactory.createFile().delete(fName);
+			DBAdapter.makeBlobFolderName(); //Create folder back
+		    
+		    fs.renameOverwrite(dbNewNameData, dbNameData);
+		    fs.renameOverwrite(dbNewNameScript, dbNameScript);
+		    
+		    LOG.TRACE(&quot;3. Size of &quot; + dbNameData + &quot;: &quot; + fs.size(dbNameData));
 		    
 		    m_dbStorage = RhoClassFactory.createDBStorage();
 			m_dbStorage.open(m_strDBPath, getSqlScript() );
 			m_bIsOpen = true;
+			
+			getAttrMgr().load(this);
+			
+			m_dbStorage.setDbCallback(new DBCallback(this));
+			
 		}catch(Exception e)
 		{
     		LOG.ERROR(&quot;execute failed.&quot;, e);
@@ -406,10 +503,12 @@ public class DBAdapter extends RubyBasic {
     
     public void rollback()throws DBException
     {
+    	m_dbStorage.rollback();
+    	m_bInsideTransaction=false;
+    	
     	Unlock();
-    	throw new DBException(&quot;Not implemented&quot;);
     }
-    
+/*    
     public RubyValue rb_execute(RubyValue v) 
     {
     	RubyArray res = new RubyArray(); 
@@ -432,8 +531,51 @@ public class DBAdapter extends RubyBasic {
 		}
     	
         return res;
+    }*/
+
+    public RubyValue rb_execute(RubyValue v, RubyValue arg) 
+    {
+    	RubyArray res = new RubyArray(); 
+    	try{
+    		Object[] values = null;
+    		if ( arg != null )
+    		{
+	    		RubyArray args1 = arg.toAry();
+	    		RubyArray args = args1;
+	    		if ( args.size() &gt; 0 &amp;&amp; args.get(0) instanceof RubyArray )
+	    			args = (RubyArray)args.get(0);
+	    		
+	    		values = new Object[args.size()];
+	    		for ( int i = 0; i &lt; args.size(); i++ )
+	    		{
+	    			RubyValue val = args.get(i);
+	    			if ( val instanceof RubyFixnum )
+	    				values[i] = new Long( ((RubyFixnum)val).toLong() );
+	    			else
+	    				values[i] = val.toString();
+	    		}
+    		}
+    		
+    		IDBResult rows = executeSQL(v.toStr(), values);
+    		RubyString[] colNames = getColNames(rows);
+    		
+    		for( ; !rows.isEnd(); rows.next() )
+    		{
+    			RubyHash row = ObjectFactory.createHash();
+    			for ( int nCol = 0; nCol &lt; rows.getColCount(); nCol ++ )
+    				row.add( colNames[nCol], rows.getRubyValueByIdx(nCol) );
+    			
+    			res.add( row );
+    		}
+		}catch(Exception e)
+		{
+    		LOG.ERROR(&quot;execute failed.&quot;, e);
+			throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
+		}
+    	
+        return res;
     }
-	
+    
     //@RubyAllocMethod
     private static RubyValue alloc(RubyValue receiver) {
     	return getInstance();
@@ -493,7 +635,6 @@ public class DBAdapter extends RubyBasic {
 		    	m_dbStorage = null;
     		}
     		
-	    	m_dbCallback = null;
     	}catch( Exception e ){
     		LOG.ERROR(&quot;close failed.&quot;, e);
     		throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
@@ -517,10 +658,12 @@ public class DBAdapter extends RubyBasic {
 			protected RubyValue run(RubyValue receiver, RubyBlock block ){
 				return ((DBAdapter)receiver).rb_close();}
 		});
-		klass.defineMethod( &quot;execute&quot;, new RubyOneArgMethod(){ 
-			protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
-				return ((DBAdapter)receiver).rb_execute(arg);}
+		klass.defineMethod( &quot;execute&quot;, new RubyVarArgMethod(){ 
+			protected RubyValue run(RubyValue receiver, RubyArray args, RubyBlock block ){
+				return ((DBAdapter)receiver).rb_execute(args.get(0), 
+						(args.size() &gt; 1 ? args.get(1):null));}
 		});
+		
 		klass.defineMethod( &quot;start_transaction&quot;, new RubyNoArgMethod(){ 
 			protected RubyValue run(RubyValue receiver, RubyBlock block ){
 				return ((DBAdapter)receiver).rb_start_transaction();}
@@ -539,4 +682,75 @@ public class DBAdapter extends RubyBasic {
 		});
 		
 	}
+	
+	public static class DBCallback implements IDBCallback
+	{
+		private DBAdapter m_db;
+		DBCallback(DBAdapter db){ m_db = db; }
+		/*public void OnDeleteAll() {
+			OnDeleteAllFromTable(&quot;object_values&quot;);
+		}
+		
+		public void OnDeleteAllFromTable(String tableName) {
+			if ( !tableName.equals(&quot;object_values&quot;) )
+				return;
+
+			try{
+				String fName = DBAdapter.makeBlobFolderName();
+				RhoClassFactory.createFile().delete(fName);
+				DBAdapter.makeBlobFolderName(); //Create folder back
+			}catch(Exception exc){
+				LOG.ERROR(&quot;DBCallback.OnDeleteAllFromTable: Error delete files from table: &quot; + tableName, exc);				
+			}
+		}*/
+
+		public void OnInsertIntoTable(String tableName, IDBResult rows2Insert)
+		{
+			if ( !tableName.equalsIgnoreCase(&quot;object_values&quot;) )
+				return;
+
+			for( ; !rows2Insert.isEnd(); rows2Insert.next() )
+			{
+				int nSrcID = rows2Insert.getIntByIdx(1);
+				String name = rows2Insert.getStringByIdx(2);
+				m_db.getAttrMgr().add(nSrcID, name);
+			}
+			
+		}
+		
+		public void OnDeleteFromTable(String tableName, IDBResult rows2Delete) 
+		{
+			if ( !tableName.equalsIgnoreCase(&quot;object_values&quot;) )
+				return;
+			
+			for( ; !rows2Delete.isEnd(); rows2Delete.next() )
+			{
+				int nSrcID = rows2Delete.getIntByIdx(1);
+				String attrib = rows2Delete.getStringByIdx(2);
+				m_db.getAttrMgr().remove(nSrcID, attrib);
+				
+				String attrib_type = rows2Delete.getStringByIdx(5);
+				if ( !attrib_type.equals(&quot;blob.file&quot;) )
+					continue;
+
+				String url = rows2Delete.getStringByIdx(4);
+				if ( url == null || url.length() == 0 )
+					continue;
+				
+				try{
+				    SimpleFile oFile = RhoClassFactory.createFile();
+				    
+			        String strFilePath = oFile.getDirPath(&quot;&quot;);
+			        strFilePath += url;
+				    
+				    oFile.delete(strFilePath);
+				}catch(Exception exc){
+					LOG.ERROR(&quot;DBCallback.OnDeleteFromTable: Error delete file: &quot; + url, exc);				
+				}
+				
+			}
+		}
+		
+	}
+	
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/db/DBAdapter.java</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,9 @@ package com.rho.db;
 
 public interface IDBCallback 
 {
-	public abstract void OnDeleteAll();
-	public abstract void OnDeleteAllFromTable(String tableName);
+	//public abstract void OnDeleteAll();
+	//public abstract void OnDeleteAllFromTable(String tableName);
 	public abstract void OnDeleteFromTable(String tableName, IDBResult rows2Delete);
+	public abstract void OnInsertIntoTable(String tableName, IDBResult rows2Insert);
 
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/db/IDBCallback.java</filename>
    </modified>
    <modified>
      <diff>@@ -34,4 +34,7 @@ public interface IDBResult {
 	public abstract String getString(String colname);
 	
 	public abstract Object[] getCurData();
+	
+    public abstract boolean isNonUnique();
+
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/db/IDBResult.java</filename>
    </modified>
    <modified>
      <diff>@@ -5,13 +5,14 @@ public interface IDBStorage {
 	public abstract void open(String strPath, String strSqlScript)throws DBException;
 	public abstract void close()throws DBException;
 	
-	public abstract IDBResult executeSQL(String strStatement, Object[] values)throws DBException;
+	public abstract IDBResult executeSQL(String strStatement, Object[] values, boolean bReportNonUnique)throws DBException;
 	public abstract IDBResult createResult();
 	
 	public abstract void deleteAllFiles(String strPath)throws Exception;
 	
 	public abstract void startTransaction()throws DBException;
 	public abstract void commit()throws DBException;
+	public abstract void rollback()throws DBException;
 	
 	public abstract void setDbCallback(IDBCallback callback);
 	</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/db/IDBStorage.java</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,7 @@ public interface IHttpConnection {
 	public static int HTTP_NOT_FOUND = 404;
 	public static int HTTP_UNAUTHORIZED = 401;
 	public static int HTTP_INTERNAL_ERROR = 500;
-	
+	public static int HTTP_NOTMODIFIED = 304;
 
 	public abstract String getHost();
 </diff>
      <filename>platform/shared/rubyJVM/src/com/rho/net/IHttpConnection.java</filename>
    </modified>
    <modified>
      <diff>@@ -9,5 +9,4 @@ public interface INetworkAccess {
 	public abstract void close();
 	
 	public abstract String getHomeUrl();
-	public boolean doLocalRequest(String strUrl, String strBody);
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/net/INetworkAccess.java</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@ import java.io.OutputStream;
 import javolution.io.UTF8StreamReader;
 
 import com.rho.RhoClassFactory;
+import com.rho.RhoConf;
 import com.rho.RhoEmptyLogger;
 import com.rho.RhoLogger;
 import com.rho.SimpleFile;
@@ -17,7 +18,7 @@ public class NetRequest
 	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
 		new RhoLogger(&quot;Net&quot;);
 	
-	static final int  MAX_NETREQUEST_RETRY  = 1;
+	static final int  MAX_NETREQUEST_RETRY  = 3;
 	boolean m_bCancel = false;
 	
 	public static interface IRhoSession
@@ -72,10 +73,13 @@ public class NetRequest
 			m_connection = RhoClassFactory.getNetworkAccess().connect(strUrl);
 			
 			String strSession = oSession.getSession();
+			LOG.INFO(&quot;Cookie : &quot; + (strSession != null ? strSession : &quot;&quot;) );
 			if ( strSession != null &amp;&amp; strSession.length() &gt; 0 )
 				m_connection.setRequestProperty(&quot;Cookie&quot;, strSession );
 			
-			m_connection.setRequestProperty(&quot;content-type&quot;, &quot;application/x-www-form-urlencoded&quot;);
+			m_connection.setRequestProperty(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;);
+			m_connection.setRequestProperty(&quot;Connection&quot;, &quot;keep-alive&quot;);
+			//m_connection.setRequestProperty(&quot;Accept&quot;, &quot;application/x-www-form-urlencoded,application/json,text/html&quot;);
 			
 			if ( strBody != null &amp;&amp; strBody.length() &gt; 0 )
 			{
@@ -96,9 +100,16 @@ public class NetRequest
 				if (code == IHttpConnection.HTTP_UNAUTHORIZED) 
 					oSession.logout();
 				
-				if ( code != IHttpConnection.HTTP_INTERNAL_ERROR )
+				//if ( code != IHttpConnection.HTTP_INTERNAL_ERROR )
+				{
 					buffer = readFully(is);
-
+					
+					if ( code == IHttpConnection.HTTP_MOVED_TEMPORARILY ||
+						 code == IHttpConnection.HTTP_MOVED_PERMANENTLY )
+						LOG.INFO(&quot;Response body: &quot; + buffer.toString() );
+					else
+						LOG.TRACE(&quot;Response body: &quot; + buffer.toString() );
+				}
 			}else
 			{
 				long len = m_connection.getLength();
@@ -133,14 +144,7 @@ public class NetRequest
 	
 	public NetResponse pushData(String strUrl, String strBody, IRhoSession oSession)throws Exception
     {
-		URI uri = new URI(strUrl);
-		if ( &quot;localhost&quot;.equals(uri.getHost()) || &quot;127.0.0.1&quot;.equals(uri.getHost()) )
-		{
-			boolean bRes = RhoClassFactory.getNetworkAccess().doLocalRequest(strUrl, strBody);
-			return new NetResponse(&quot;&quot;, bRes ? IHttpConnection.HTTP_OK : IHttpConnection.HTTP_INTERNAL_ERROR);
-		}
-		
-		return doRequestTry(strUrl, strBody, oSession, true);
+		return doRequest(strUrl, strBody, oSession, true);
     }
 	
 	static class ParsedCookie {
@@ -157,6 +161,7 @@ public class NetRequest
     		{
     			ParsedCookie cookie = makeCookie(m_connection);
     			resp.setCharData(cookie.strAuth + &quot;;&quot; + cookie.strSession + &quot;;&quot;);
+    			LOG.INFO(&quot;pullCookies: &quot; + resp.getCharData() );
     		}
 		}finally
 		{
@@ -417,7 +422,40 @@ public class NetRequest
 			if (tok.length() == 0) {
 				continue;
 			}
-			int i = tok.indexOf('=');
+			
+			int i = 0;
+			if ( (i=tok.indexOf(&quot;auth_token=&quot;)) &gt;= 0 )
+			{
+				String val = tok.substring(i+11);
+				val.trim();
+				if ( val.length() &gt; 0 )
+				{
+					cookie.strAuth = &quot;auth_token=&quot; + val;
+					bAuth = true;
+				}
+			}else if ( (i=tok.indexOf(&quot;path=&quot;)) &gt;= 0 )
+			{
+				String val = tok.substring(i+6);
+				val.trim();
+				if ( val.length() &gt; 0 )
+				{
+					if (bAuth)
+						cookie.strAuth += &quot;;path=&quot; + val;
+					else if (bSession)
+						cookie.strSession += &quot;;path=&quot; + val;
+				}
+			}else if ( (i=tok.indexOf(&quot;rhosync_session=&quot;)) &gt;= 0 )
+			{
+				String val = tok.substring(i+16);
+				val.trim();
+				if ( val.length() &gt; 0 )
+				{
+					cookie.strSession = &quot;rhosync_session=&quot; + val;
+					bSession = true;
+				}
+			}
+			
+/*			int i = tok.indexOf('=');
 			String s1;
 			String s2;
 			if (i &gt; 0) {
@@ -442,7 +480,7 @@ public class NetRequest
 					&amp;&amp; s2.length() &gt; 0) {
 				cookie.strSession = s1 + &quot;=&quot; + s2;
 				bSession = true;
-			}
+			}*/
 
 		}
 	}
@@ -458,6 +496,15 @@ public class NetRequest
 		return null;
 	}
 
+	/*public static void TEST()
+	{
+		ParsedCookie cookie = new ParsedCookie();
+		//parseCookie(&quot;auth_token=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT, auth_token=887b2ffd30a7b97be9a0986d7746a934421eec7d; path=/; expires=Sat, 24 Oct 2009 20:56:55 GMT, rhosync_session=BAh7BzoMdXNlcl9pZGkIIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--f9b67d99397fc534107fb3b7483ccdae23b4a761; path=/; expires=Sun, 10 Oct 2010 19:10:58 GMT; HttpOnly&quot;, cookie);
+		parseCookie(&quot;auth_token=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT&quot;, cookie);
+		parseCookie(&quot;rhosync_session=BAh7CToNcGFzc3dvcmQiFTiMYru1W11zuoAlN%2FPtgjc6CmxvZ2luIhU4jGK7tVtdc7qAJTfz7YI3Ogx1c2VyX2lkaQYiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhhc2h7AAY6CkB1c2VkewA%3D--a7829a70171203d72cd4e83d07b18e8fcf5e2f78; path=/; expires=Thu, 02 Sep 2010 23:51:31 GMT; HttpOnly&quot;, cookie);
+		
+	}*/
+	
 	private static ParsedCookie makeCookie(IHttpConnection connection)
 			throws IOException {
 		ParsedCookie cookie = new ParsedCookie();
@@ -492,7 +539,10 @@ public class NetRequest
 	
 	private final StringBuffer readFully(InputStream in) throws Exception 
 	{
-		boolean bReadByBytes = RhoClassFactory.createRhoRubyHelper().isSimulator();
+		boolean bReadByBytes = false;
+		if ( RhoConf.getInstance().getInt(&quot;bb_netreadbybytes&quot;) &gt; 0 )
+			bReadByBytes = RhoClassFactory.createRhoRubyHelper().isSimulator();
+		
 		StringBuffer buffer = new StringBuffer();
 		UTF8StreamReader reader = new UTF8StreamReader(4096,bReadByBytes);
 		reader.setInput(in);</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/net/NetRequest.java</filename>
    </modified>
    <modified>
      <diff>@@ -31,4 +31,9 @@ public class NetResponse {
 		return m_nRespCode == IHttpConnection.HTTP_OK;
 	}
 
+	public boolean isUnathorized()
+	{
+		return m_nRespCode == IHttpConnection.HTTP_UNAUTHORIZED;
+	}
+	
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/net/NetResponse.java</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@ import com.xruby.runtime.lang.RubyConstant;
 import com.xruby.runtime.lang.RubyValue;
 import com.xruby.runtime.lang.RhoSupport;
 import com.rho.net.URI;
+import com.rho.sync.SyncThread;
 import com.rho.*;
 import com.rho.location.GeoLocation;
 
@@ -177,8 +178,9 @@ public class RhoConnection implements IHttpConnection {
 	}
 
 	public int getResponseCode() throws IOException {
-		LOG.TRACE(&quot;getResponseCode&quot; + responseCode);
 		processRequest();
+		LOG.TRACE(&quot;getResponseCode&quot; + responseCode);
+		
 		return responseCode;
 	}
 
@@ -343,7 +345,7 @@ public class RhoConnection implements IHttpConnection {
 		public boolean isEnd(){ return nStart &gt;= strPath.length(); }
 		public String next(){
 			if (  isEnd() )
-				return &quot;&quot;;
+				return null;
 			
 			int nEnd = strPath.indexOf('/',nStart);
 			if ( nEnd &lt; 0 )
@@ -377,6 +379,12 @@ public class RhoConnection implements IHttpConnection {
 		responseMsg = &quot;Success&quot;;
 		contentLength = 0;
 	}
+
+	void respondNotModified(){
+		responseCode = HTTP_NOTMODIFIED;
+		responseMsg = &quot;Success&quot;;
+		contentLength = 0;
+	}
 	
 	void respondNotFound( String strError ){
 		responseCode = HTTP_NOT_FOUND;
@@ -622,7 +630,7 @@ public class RhoConnection implements IHttpConnection {
 		
 		String model = up.next();
 		
-		if ( model.length() == 0 )
+		if ( model == null || model.length() == 0 )
 			return false;
 		
 		if ( checkRhoExtensions(application, model ) )
@@ -636,7 +644,7 @@ public class RhoConnection implements IHttpConnection {
 		
 		String actionid = up.next();
 		String actionnext = up.next();
-		if ( actionid.length() &gt; 0 ){
+		if ( actionid != null &amp;&amp; actionid.length() &gt; 0 ){
 			if ( actionid.length() &gt; 2 &amp;&amp; 
 				 actionid.charAt(0)=='{' &amp;&amp; actionid.charAt(actionid.length()-1)=='}' ){
 				reqHash.setProperty( &quot;id&quot;, actionid);
@@ -661,6 +669,10 @@ public class RhoConnection implements IHttpConnection {
 		RubyValue res = RhoRuby.processRequest( reqHash, reqHeaders, resHeaders);
 		processResponse(res);
 		
+		if ( actionid !=null &amp;&amp; actionid.length() &gt; 2 &amp;&amp; 
+			 actionid.charAt(0)=='{' &amp;&amp; actionid.charAt(actionid.length()-1)=='}' )
+			SyncThread.getInstance().addobjectnotify_bysrcname( model, actionid);
+		
 		LOG.INFO(&quot;dispatch end&quot;);
 		return true;
 	}</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/net/RhoConnection.java</filename>
    </modified>
    <modified>
      <diff>@@ -150,6 +150,8 @@ package com.rho.net;
       fgLookupTable['{'] |= MARK_CHARACTERS;
       fgLookupTable['}'] |= MARK_CHARACTERS;
       
+      fgLookupTable['|'] |= MARK_CHARACTERS;
+      
       // Add Scheme Characters
 //      fgLookupTable['+'] |= SCHEME_CHARACTERS;
 //      fgLookupTable['-'] |= SCHEME_CHARACTERS;
@@ -2223,6 +2225,13 @@ package com.rho.net;
 	  }
 	  return sb.toString();
   }
+  
+  public static boolean isLocalHost(String strUrl)
+  {
+	  return strUrl.startsWith(&quot;http://localhost&quot;) ||
+	  	strUrl.startsWith(&quot;http://127.0.0.1&quot;);
+  }
+  
   /*
   public String getEscapedURL(){
 	  String fullPath = m_scheme + &quot;://&quot; + m_host + &quot;:&quot; + m_port + m_path;</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/net/URI.java</filename>
    </modified>
    <modified>
      <diff>@@ -51,7 +51,8 @@ public class ClientRegister extends RhoThread
 		m_strDevicePin = m_sysInfo.getDeviceId();
 		m_NetRequest = RhoClassFactory.createNetRequest();
 		
-		start(epLow);
+		//send client register request in login
+		//start(epLow);
 	}
 	
 	public static ClientRegister getInstance(){ return m_pInstance; }
@@ -85,7 +86,7 @@ public class ClientRegister extends RhoThread
     {
 		String client_id = oSync.loadClientID();
 		if ( client_id == null || client_id.length() == 0 )
-			return &quot;&quot;;
+			return null;
 	
 		IDBResult res = oSync.getDB().executeSQL(&quot;SELECT token,token_sent from client_info&quot;);
         if ( !res.isEnd() ) {
@@ -116,10 +117,12 @@ public class ClientRegister extends RhoThread
     		return false;
     	
     	String strBody = getRegisterBody(oSync);
-    	if ( strBody == null || strBody.length() == 0 )
+    	if ( strBody == null )
     		return false;
+    	if ( strBody.length() == 0)
+    		return true; //already register
     	
-		String serverUrl = RhoConf.getInstance().getString(&quot;syncserver&quot;);
+		String serverUrl = RhoConf.getInstance().getPath(&quot;syncserver&quot;);
 		if (serverUrl != null &amp;&amp; serverUrl.length()&gt;0) 
 		{
 			NetResponse resp = getNet().pushData(serverUrl+&quot;clientregister&quot;, strBody, oSync);</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/sync/ClientRegister.java</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,13 @@ class JSONArrayIterator
 	    m_nCurItem++;
 	}
 
+    void    reset(int nPos)
+    {
+    	m_nCurItem = nPos;
+    }
+    
+    int     getCurPos(){ return m_nCurItem; }
+	
 	JSONEntry getCurItem()throws JSONException
 	{
 	    return new JSONEntry( isEnd() ? null : (JSONObject) m_array.get(m_nCurItem) );</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/sync/JSONArrayIterator.java</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,9 @@ package com.rho.sync;
 import com.rho.RhoClassFactory;
 import com.rho.RhoConf;
 import com.rho.RhoEmptyLogger;
+import com.rho.RhoEmptyProfiler;
 import com.rho.RhoLogger;
+import com.rho.RhoProfiler;
 import com.rho.RhoRuby;
 import com.rho.db.*;
 import com.rho.net.*;
@@ -34,73 +36,64 @@ public class SyncEngine implements NetRequest.IRhoSession
 {
 	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
 		new RhoLogger(&quot;Sync&quot;);
-
-    static class SyncNotification
-    {
-        String m_strUrl, m_strParams;
-        SyncNotification(String strUrl, String strParams){ m_strUrl = strUrl; m_strParams = strParams; }
-    };
-
+	private static final RhoProfiler PROF = RhoProfiler.RHO_STRIP_PROFILER ? new RhoEmptyProfiler() : 
+		new RhoProfiler();
+	
     public static final int esNone = 0, esSyncAllSources = 1, esSyncSource = 2, esStop = 3, esExit = 4;
 
     static String SYNC_SOURCE_FORMAT() { return &quot;?format=json&quot;; }
+    int SYNC_VERSION() { return 2; }
     static String SYNC_ASK_ACTION() { return &quot;/ask&quot;; }
-    static String SYNC_PAGE_SIZE() { return &quot;1000&quot;; }
 	
     Vector/*&lt;SyncSource*&gt;*/ m_sources = new Vector();
     DBAdapter   m_dbAdapter;
     NetRequest m_NetRequest;
     int         m_syncState;
     String     m_clientID = &quot;&quot;;
-    Hashtable/*&lt;int,SyncNotification&gt;*/ m_mapNotifications = new Hashtable();
-    Mutex m_mxNotifications = new Mutex();
     Mutex m_mxLoadClientID = new Mutex();
     String m_strSession = &quot;&quot;;
-
-    ISyncStatusListener m_statusListener = null;
-    
-    public void setStatusListener(ISyncStatusListener listener) { m_statusListener = listener; }
-    private void reportStatus(String status, int error, String strDetails) {
-    	if (m_statusListener != null) {
-    		if ( strDetails.length() == 0 )
-    			strDetails = RhoRuby.getErrorText(error);
-    		status += (strDetails.length() &gt; 0 ? &quot; Details: &quot; + strDetails: &quot;&quot;);
-    		
-        	LOG.INFO(&quot;Status: &quot;+status);
-    		
-    		m_statusListener.reportStatus( status, error);
-    	}
-    }
+    SyncNotify m_oSyncNotify = new SyncNotify(this);
+    boolean m_bStopByUser = false;
+    int m_nSyncPageSize = 2000;
     
     void setState(int eState){ m_syncState = eState; }
     int getState(){ return m_syncState; }
     boolean isContinueSync(){ return m_syncState != esExit &amp;&amp; m_syncState != esStop; }
 	boolean isSyncing(){ return m_syncState == esSyncAllSources || m_syncState == esSyncSource; }
     void stopSync(){ if (isContinueSync()){ setState(esStop); m_NetRequest.cancel(); } }
+    void stopSyncByUser(){ m_bStopByUser = true; stopSync(); }
     void exitSync(){ setState(esExit); m_NetRequest.cancel(); }
+    boolean isStoppedByUser(){ return m_bStopByUser; }
+    
     String getClientID(){ return m_clientID; }
     void setSession(String strSession){m_strSession=strSession;}
     public String getSession(){ return m_strSession; }
     boolean isSessionExist(){ return m_strSession != null &amp;&amp; m_strSession.length() &gt; 0; }
     DBAdapter getDB(){ return m_dbAdapter; }
+    SyncNotify getNotify(){ return m_oSyncNotify; }
     NetRequest getNet() { return m_NetRequest;}
     
     SyncEngine(DBAdapter db){
     	m_dbAdapter = db;
-		m_dbAdapter.setDbCallback(new DBCallback());
 
 		m_NetRequest = null;
     	m_syncState = esNone; 
     }
 
+    String SYNC_PAGE_SIZE(){ return Integer.toString(m_nSyncPageSize); }
+    int getSyncPageSize() { return m_nSyncPageSize; }
+    void setSyncPageSize(int nPageSize){ m_nSyncPageSize = nPageSize; }
+    
     void setFactory(RhoClassFactory factory)throws Exception{ 
 		m_NetRequest = RhoClassFactory.createNetRequest();
     }
     
 	void doSyncAllSources()
 	{
+		LOG.INFO(&quot;Sync all sources started.&quot;);
 	    setState(esSyncAllSources);
-
+	    m_bStopByUser = false;
+	    
 	    try
 	    {
 		    loadAllSources();
@@ -108,14 +101,36 @@ public class SyncEngine implements NetRequest.IRhoSession
 		    m_strSession = loadSession();
 		    if ( isSessionExist()  ) {
 		    	m_clientID = loadClientID();
+			    getNotify().cleanLastSyncObjectCount();
+
+			    PROF.CREATE_COUNTER(&quot;Net&quot;);	    
+			    PROF.CREATE_COUNTER(&quot;Parse&quot;);
+			    PROF.CREATE_COUNTER(&quot;DB&quot;);
+			    PROF.CREATE_COUNTER(&quot;Data&quot;);
+			    PROF.CREATE_COUNTER(&quot;Data1&quot;);
+			    PROF.CREATE_COUNTER(&quot;Pull&quot;);
+			    PROF.START(&quot;Sync&quot;);
 		    	
 			    syncAllSources();
+
+			    PROF.DESTROY_COUNTER(&quot;Net&quot;);	    
+			    PROF.DESTROY_COUNTER(&quot;Parse&quot;);
+			    PROF.DESTROY_COUNTER(&quot;DB&quot;);
+			    PROF.DESTROY_COUNTER(&quot;Data&quot;);
+			    PROF.DESTROY_COUNTER(&quot;Data1&quot;);
+			    PROF.DESTROY_COUNTER(&quot;Pull&quot;);
+			    PROF.STOP(&quot;Sync&quot;);
 			    
-			    if ( getState() != esStop )
-			    	fireNotification(null, true, RhoRuby.ERR_NONE, &quot;Sync completed.&quot;);
 		    } else {
-		    	fireNotification(null, true, RhoRuby.ERR_CLIENTISNOTLOGGEDIN, 
-		    			&quot;Sync failed. Details: Client is not logged in. No sync will be performed.&quot; );
+		    	if ( m_sources.size() &gt; 0 )
+		        {		    	
+			    	SyncSource src = (SyncSource)m_sources.elementAt(getStartSource());
+			    	src.m_strError = &quot;Client is not logged in. No sync will be performed.&quot;;
+			    	src.m_nErrCode = RhoRuby.ERR_CLIENTISNOTLOGGEDIN;
+			    	
+			    	getNotify().fireSyncNotification(src, true, src.m_nErrCode, &quot;&quot;);
+		        }else
+		        	getNotify().fireSyncNotification(null, true, RhoRuby.ERR_CLIENTISNOTLOGGEDIN, &quot;&quot;);
 		    }
 		    
 	    }catch(Exception exc)
@@ -126,7 +141,8 @@ public class SyncEngine implements NetRequest.IRhoSession
 	    setState(esNone);
 	}
 
-	void doSyncSource(int nSrcId, String strSrcUrl, String strParams, String strAction)
+	void doSyncSource(int nSrcId, String strSrcUrl, String strParams, String strAction, boolean bSearchSyncChanges,
+			int nProgressStep)
 	{
 	    if ( strSrcUrl != null &amp;&amp; strSrcUrl.length()&gt;0 )
 	    	LOG.INFO( &quot;Started synchronization of the data source url: &quot; + strSrcUrl );
@@ -134,6 +150,7 @@ public class SyncEngine implements NetRequest.IRhoSession
 	    	LOG.INFO( &quot;Started synchronization of the data source #&quot; + nSrcId );
 		
 	    setState(esSyncSource);
+	    m_bStopByUser = false;
         SyncSource src = null;
 
 	    try
@@ -148,21 +165,26 @@ public class SyncEngine implements NetRequest.IRhoSession
 	        {
 	        	src.m_strParams = strParams;
 	        	src.m_strAction = strAction;
+	        	src.m_bSearchSyncChanges = bSearchSyncChanges;
+	        	src.m_nProgressStep = nProgressStep;
 	        	
 			    m_strSession = loadSession();
 			    if ( isSessionExist()  ) {
 			    	m_clientID = loadClientID();
 			        if ( getState() != esStop )
+			        {
+			        	getNotify().cleanLastSyncObjectCount();
 			            src.sync();
+			        }
 			    } else {
 			    	src.m_strError = &quot;Client is not logged in. No sync will be performed.&quot;;
 			    	src.m_nErrCode = RhoRuby.ERR_CLIENTISNOTLOGGEDIN;
 			    }
 		
-		        fireNotification(src, true, src.m_nErrCode, src.m_nErrCode == RhoRuby.ERR_NONE ? &quot;Sync completed.&quot; : &quot;&quot;);
+			    getNotify().fireSyncNotification(src, true, src.m_nErrCode, src.m_nErrCode == RhoRuby.ERR_NONE ? &quot;Sync completed.&quot; : &quot;&quot;);
 	        } else {
 	        	src = new SyncSource(this);
-		    	src.m_strError = &quot;Unknown sync source.&quot;;
+		    	//src.m_strError = &quot;Unknown sync source.&quot;;
 		    	src.m_nErrCode = RhoRuby.ERR_RUNTIME;
 	        	
 	    	    if ( strSrcUrl != null &amp;&amp; strSrcUrl.length()&gt;0 )
@@ -179,9 +201,10 @@ public class SyncEngine implements NetRequest.IRhoSession
 	    	if ( src.m_nErrCode == RhoRuby.ERR_NONE )
 	    		src.m_nErrCode = RhoRuby.ERR_RUNTIME;
 	    	
-    		fireNotification(src, true, src.m_nErrCode, &quot;&quot; ); 
+	    	getNotify().fireSyncNotification(src, true, src.m_nErrCode, &quot;&quot; ); 
 	    }
         
+	    getNotify().cleanCreateObjectErrors();
 	    setState(esNone);
 	    
 	    if ( strSrcUrl != null &amp;&amp; strSrcUrl.length()&gt;0 )
@@ -213,11 +236,23 @@ public class SyncEngine implements NetRequest.IRhoSession
 	    
 	    return null;
 	}
+
+	SyncSource findSourceByName(String strSrcName)
+	{
+	    for( int i = 0; i &lt; m_sources.size(); i++ )
+	    {
+	        SyncSource src = (SyncSource)m_sources.elementAt(i);
+	        if ( src.getName().equals(strSrcName) )
+	            return src;
+	    }
+	    
+	    return null;
+	}
 	
 	void loadAllSources()throws DBException
 	{
 	    m_sources.removeAllElements();
-	    IDBResult res = getDB().executeSQL(&quot;SELECT source_id,source_url,token,name from sources order by source_id&quot;);
+	    IDBResult res = getDB().executeSQL(&quot;SELECT source_id,source_url,token,name from sources ORDER BY source_id&quot;);
 	
 	    for ( ; !res.isEnd(); res.next() )
 	    { 
@@ -225,7 +260,13 @@ public class SyncEngine implements NetRequest.IRhoSession
 	        if ( strDbUrl.length() == 0 )
 	        	continue;
 	        
-	        String strUrl = strDbUrl.startsWith(&quot;http&quot;) ? strDbUrl : (RhoConf.getInstance().getString(&quot;syncserver&quot;) + strDbUrl);
+	        if ( strDbUrl.charAt(0) == '/' || strDbUrl.charAt(0) == '\\' )
+	        	strDbUrl = strDbUrl.substring(1);
+	        
+	        String strUrl = strDbUrl.startsWith(&quot;http&quot;) ? strDbUrl : (RhoConf.getInstance().getPath(&quot;syncserver&quot;) + strDbUrl);
+	        if ( strUrl.charAt(strUrl.length()-1) == '/' || strUrl.charAt(strUrl.length()-1) == '\\' )
+	        	strUrl = strUrl.substring(0, strUrl.length()-1);	        
+	        
 	        String name = res.getStringByIdx(3);
 	        if ( strUrl.length() &gt; 0 )
 	            m_sources.addElement( new SyncSource( res.getIntByIdx(0), strUrl, name, res.getUInt64ByIdx(2), this) );
@@ -266,7 +307,7 @@ public class SyncEngine implements NetRequest.IRhoSession
 
 	boolean resetClientIDByNet(String strClientID)throws Exception
 	{
-	    String serverUrl = RhoConf.getInstance().getString(&quot;syncserver&quot;);
+	    String serverUrl = RhoConf.getInstance().getPath(&quot;syncserver&quot;);
 	    String strUrl = serverUrl + &quot;clientreset&quot;;
 	    String strQuery = &quot;?client_id=&quot; + strClientID;
 	    
@@ -276,7 +317,9 @@ public class SyncEngine implements NetRequest.IRhoSession
 	
 	String requestClientIDByNet()throws Exception
 	{
-	    String serverUrl = RhoConf.getInstance().getString(&quot;syncserver&quot;);
+		LOG.INFO(&quot;Request clientID by Net.&quot;);
+		
+	    String serverUrl = RhoConf.getInstance().getPath(&quot;syncserver&quot;);
 	    String strUrl = serverUrl + &quot;clientcreate&quot;;
 	    String strQuery = SYNC_SOURCE_FORMAT();
 	    
@@ -308,7 +351,8 @@ public class SyncEngine implements NetRequest.IRhoSession
 
 	void syncAllSources()throws Exception
 	{
-	    for( int i = getStartSource(); i &lt; m_sources.size() &amp;&amp; getState() != esExit; i++ )
+		boolean bError = false;
+	    for( int i = getStartSource(); i &lt; m_sources.size() &amp;&amp; isContinueSync(); i++ )
 	    {
 	    	SyncSource src = null;
 	    	try{
@@ -316,16 +360,21 @@ public class SyncEngine implements NetRequest.IRhoSession
 		        if ( isSessionExist() &amp;&amp; getState() != esStop )
 		            src.sync();
 		
-		        fireNotification(src, true, src.m_nErrCode, &quot;&quot; );
 	    	}catch(Exception exc)
 	    	{
 		    	if ( src.m_nErrCode == RhoRuby.ERR_NONE )
 		    		src.m_nErrCode = RhoRuby.ERR_RUNTIME;
 		    	
-	    		fireNotification(src, true, src.m_nErrCode, &quot;&quot; ); 
+		    	setState(esStop);
 	    		throw exc;
+	    	}finally{
+	    		getNotify().onSyncSourceEnd( i, m_sources );
+	    		bError = src.m_nErrCode != RhoRuby.ERR_NONE;
 	    	}
 	    }
+	    
+	    if ( !bError)
+	    	getNotify().fireSyncNotification(null, true, RhoRuby.ERR_NONE, &quot;Sync completed.&quot;);
 	}
 	
 	void callLoginCallback(String callback, int nErrCode, String strMessage)
@@ -380,11 +429,18 @@ public class SyncEngine implements NetRequest.IRhoSession
 			
 		    try{
 				
-			    String serverUrl = RhoConf.getInstance().getString(&quot;syncserver&quot;);
+			    String serverUrl = RhoConf.getInstance().getPath(&quot;syncserver&quot;);
 			    String strBody = &quot;login=&quot; + name + &quot;&amp;password=&quot; + password + &quot;&amp;remember_me=1&amp;&quot;;
 			    strBody += ClientRegister.getInstance().getRegisterBody(this);
 			    
 			    resp = getNet().pullCookies( serverUrl+&quot;client_login&quot;, strBody, this);
+			    
+			    if ( resp.isUnathorized() )
+			    {
+			        callLoginCallback(callback, RhoRuby.ERR_UNATHORIZED, resp.getCharData());
+			    	return;
+			    }
+			    
 			    if ( !resp.isOK() )
 			    {
 			    	callLoginCallback(callback, RhoRuby.ERR_REMOTESERVER, resp.getCharData());
@@ -407,8 +463,8 @@ public class SyncEngine implements NetRequest.IRhoSession
 		    
 		    getDB().executeSQL( &quot;UPDATE sources SET session=?&quot;, strSession );
 		
-		    if ( ClientRegister.getInstance() != null )
-		    	ClientRegister.getInstance().stopWait();
+		    //if ( ClientRegister.getInstance() != null )
+		    //	ClientRegister.getInstance().stopWait();
 		    
 	    	callLoginCallback(callback, RhoRuby.ERR_NONE, &quot;&quot; );
 		    
@@ -456,167 +512,10 @@ public class SyncEngine implements NetRequest.IRhoSession
 	
 	}
 
-	void setNotification(int source_id, String strUrl, String strParams )throws Exception
-	{
-		LOG.INFO( &quot;Set notification. Source ID: &quot; + source_id + &quot;; Url :&quot; + strUrl + &quot;; Params: &quot; + strParams );
-	    String strFullUrl = getNet().resolveUrl(strUrl);
-		
-		if ( source_id == -1 )
-		{
-			synchronized(m_mxNotifications){
-				m_mapNotifications.clear();
-				
-				if ( strFullUrl.length() &gt; 0 )
-				{
-					loadAllSources();
-					
-				    for( int i = 0; i &lt; m_sources.size(); i++ )
-				    {
-				    	SyncSource src = (SyncSource)m_sources.elementAt(i); 
-				    	m_mapNotifications.put( src.getID(),new SyncNotification( strFullUrl, strParams ) );
-				    }
-				}
-			}
-			LOG.INFO( &quot; Done Set notification for all sources; Url :&quot; + strFullUrl + &quot;; Params: &quot; + strParams );			
-		}else
-		{
-		    clearNotification(source_id);
-		    if ( strFullUrl.length() &gt; 0 )
-		    {
-		        synchronized(m_mxNotifications){
-		        	m_mapNotifications.put(new Integer(source_id),new SyncNotification( strFullUrl, strParams ) );
-		        }
-				LOG.INFO( &quot; Done Set notification. Source ID: &quot; + source_id + &quot;; Url :&quot; + strFullUrl + &quot;; Params: &quot; + strParams );
-		    }
-		}
-	}
-
-	void fireNotification( SyncSource src, boolean bFinish, int nErrCode, String strMessage )
-	{
-		if ( getState() == esExit )
-			return;
-		
-		if( strMessage.length() &gt; 0 || nErrCode != RhoRuby.ERR_NONE)
-		{
-			if ( !( src != null &amp;&amp; src.m_strParams.length()&gt;0) )
-			{
-				if ( src != null &amp;&amp; (strMessage==null || strMessage.length() == 0) )
-					strMessage = &quot;Sync failed for &quot; + src.getName() + &quot;.&quot;;
-				
-				reportStatus(strMessage,nErrCode,src!= null?src.m_strError:&quot;&quot;);
-			}
-		}
-		
-		if ( src == null )
-			return; //TODO: implement all sources callback
-		
-		try{
-		    String strBody = &quot;&quot;, strUrl;
-		    {
-		    	synchronized(m_mxNotifications){
-			        SyncNotification sn = (SyncNotification)m_mapNotifications.get(src.getID());
-			        if ( sn == null )
-			            return;
-			
-			        strUrl = sn.m_strUrl;
-			        strBody += &quot;total_count=&quot; + src.getTotalCount();
-			        strBody += &quot;&amp;processed_count=&quot; + src.getCurPageCount();
-			        
-			        strBody += &quot;&amp;status=&quot;;
-			        if ( bFinish )
-			        {
-				        if ( nErrCode == RhoRuby.ERR_NONE )
-				        	strBody += &quot;ok&quot;;
-				        else
-				        {
-				        	strBody += &quot;error&quot;;				        	
-						    strBody += &quot;&amp;error_code=&quot; + nErrCode;
-					        strBody += &quot;&amp;error_message=&quot; + URI.urlEncode(src.m_strError);
-				        }
-			        }
-			        else
-			        	strBody += &quot;in_progress&quot;;
-			        
-			        if ( sn.m_strParams.length() &gt; 0 )
-			            strBody += &quot;&amp;&quot; + sn.m_strParams;
-		        }
-		    }
-			LOG.INFO( &quot;Fire notification. Source ID: &quot; + src.getID() + &quot;; Url :&quot; + strUrl + &quot;; Body: &quot; + strBody );
-			
-		    NetResponse resp = getNet().pushData( strUrl, strBody, this );
-		    if ( !resp.isOK() )
-		        LOG.ERROR( &quot;Fire notification failed. Code: &quot; + resp.getRespCode() + &quot;; Error body: &quot; + resp.getCharData() );
-		
-		    if ( bFinish )
-		    	clearNotification(src.getID().intValue());
-		}catch(Exception exc)
-		{
-			LOG.ERROR(&quot;Fire notification failed.&quot;, exc);
-		}
-	}
-
-	void clearNotification(int source_id) 
-	{
-		LOG.INFO( &quot;Clear notification. Source ID: &quot; + source_id );
-		
-		synchronized(m_mxNotifications){
-			m_mapNotifications.remove(new Integer(source_id));
-		}
-	}
-
 	static String getServerFromUrl( String strUrl )
 	{
 		URI uri = new URI(strUrl);
 		return uri.getHost();
 	}
-
-	public static class DBCallback implements IDBCallback{
-
-		public void OnDeleteAll() {
-			OnDeleteAllFromTable(&quot;object_values&quot;);
-		}
-		
-		public void OnDeleteAllFromTable(String tableName) {
-			if ( !tableName.equals(&quot;object_values&quot;) )
-				return;
-
-			try{
-				String fName = DBAdapter.makeBlobFolderName();
-				RhoClassFactory.createFile().delete(fName);
-				DBAdapter.makeBlobFolderName(); //Create folder back
-			}catch(Exception exc){
-				LOG.ERROR(&quot;DBCallback.OnDeleteAllFromTable: Error delete files from table: &quot; + tableName, exc);				
-			}
-		}
-
-		public void OnDeleteFromTable(String tableName, IDBResult rows2Delete) 
-		{
-			if ( !tableName.equalsIgnoreCase(&quot;object_values&quot;) )
-				return;
-			
-			for( ; !rows2Delete.isEnd(); rows2Delete.next() )
-			{
-				if ( !rows2Delete.getString(&quot;attrib_type&quot;).equals(&quot;blob.file&quot;) )
-					continue;
-
-				String url = rows2Delete.getString(&quot;value&quot;);
-				if ( url == null || url.length() == 0 )
-					continue;
-				
-				try{
-				    SimpleFile oFile = RhoClassFactory.createFile();
-				    
-			        String strFilePath = oFile.getDirPath(&quot;&quot;);
-			        strFilePath += url;
-				    
-				    oFile.delete(strFilePath);
-				}catch(Exception exc){
-					LOG.ERROR(&quot;DBCallback.OnDeleteFromTable: Error delete file: &quot; + url, exc);				
-				}
-				
-			}
-		}
-		
-	}
 	
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/sync/SyncEngine.java</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,9 @@ package com.rho.sync;
 
 import com.rho.RhoClassFactory;
 import com.rho.RhoEmptyLogger;
+import com.rho.RhoEmptyProfiler;
 import com.rho.RhoLogger;
+import com.rho.RhoProfiler;
 import com.rho.net.*;
 import com.rho.db.*;
 import java.util.Vector;
@@ -35,7 +37,12 @@ class SyncSource
 {
 	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
 		new RhoLogger(&quot;Sync&quot;);
+	
+	private static final RhoProfiler PROF = RhoProfiler.RHO_STRIP_PROFILER ? new RhoEmptyProfiler() : 
+		new RhoProfiler();
 
+	public static final int edpNone = 0, edpDeleteObjects = 2;
+	
 	static class SyncBlob
 	{
 	   String m_strBody;
@@ -57,12 +64,15 @@ class SyncSource
     String m_token;
     boolean m_bTokenFromDB; 
     
-    int m_nCurPageCount, m_nInserted, m_nDeleted, m_nTotalCount;
+    int m_nCurPageCount, m_nInserted, m_nDeleted, m_nTotalCount, m_nAttribCounter=0;
     boolean m_bGetAtLeastOnePage = false;
+    int m_eSyncServerDataPass = edpNone;
     int m_nErrCode = RhoRuby.ERR_NONE;
     String m_strError = &quot;&quot;;
     String m_strParams = &quot;&quot;;
     String m_strAction = &quot;&quot;;
+    boolean m_bSearchSyncChanges = false;
+    int     m_nProgressStep = -1;
     
 	String m_strPushBody = &quot;&quot;;
     Vector/*Ptr&lt;CSyncBlob*&gt;*/ m_arSyncBlobs = new Vector();
@@ -92,8 +102,13 @@ class SyncSource
     void setTotalCount(int nTotalCount){m_nTotalCount = nTotalCount;}
     int  getCurPageCount(){return m_nCurPageCount;}
     int  getTotalCount(){return m_nTotalCount;}
+    int  getProgressStep(){ return m_nProgressStep; }
+
+    void setSyncServerDataPass(int ePass){m_eSyncServerDataPass = ePass;}
+    boolean isDeleteObjectsPass(){ return m_eSyncServerDataPass == edpDeleteObjects; }
     
     SyncEngine getSync(){ return m_syncEngine; }
+    SyncNotify getNotify(){ return getSync().getNotify(); }
 	DBAdapter getDB(){ return getSync().getDB(); }
 	NetRequest getNet(){ return getSync().getNet(); }
 
@@ -127,23 +142,52 @@ class SyncSource
     
 	void sync() throws Exception
 	{
-    	m_syncEngine.fireNotification(this, false, RhoRuby.ERR_NONE, &quot;Synchronizing &quot; + getName() + &quot;...&quot;);
+    	getNotify().fireSyncNotification(this, false, RhoRuby.ERR_NONE, &quot;Synchronizing &quot; + getName() + &quot;...&quot;);
 		
 	    TimeInterval startTime = TimeInterval.getCurrentTime();
-		
+	    
 	    try{
-	        if ( m_strParams.length() == 0 )
+	    	PROF.START(&quot;Pull&quot;);
+	        if ( isEmptyToken() )
+	            processToken(&quot;1&quot;);
+	    	
+	        boolean bSyncedServer = false;
+	        if ( m_strParams.length() == 0 || m_bSearchSyncChanges )
 	        {
-			    syncClientChanges();
-			    getAndremoveAsk();
+	            if ( isPendingClientChanges() )
+	            {
+	                syncServerChanges();
+	                bSyncedServer = true;
+	            }
+
+	            if ( bSyncedServer &amp;&amp; isPendingClientChanges() )
+	                getSync().setState(SyncEngine.esStop);
+	            else
+	            {
+	                boolean bSyncClient = false;
+	                {
+	                    IDBResult res = getDB().executeSQL(&quot;SELECT object FROM changed_values WHERE source_id=? and sent&lt;=1 LIMIT 1 OFFSET 0&quot;, getID());
+	                    bSyncClient = !res.isEnd();
+	                }
+	                if ( bSyncClient )
+	                {
+	                    syncClientChanges();
+	                    getAndremoveAsk();
+	                    bSyncedServer = false;
+	                }
+	            }
 	        }
-		    syncServerChanges();
+	        PROF.STOP(&quot;Pull&quot;);
+
+	        if ( !bSyncedServer )
+	        	syncServerChanges();
+	        
 	    }catch(Exception exc)
 	    {
 	    	getSync().stopSync();
 	    	throw exc;
 	    }finally{
-		    TimeInterval endTime = TimeInterval.getCurrentTime();
+		   TimeInterval endTime = TimeInterval.getCurrentTime();
 		    getDB().executeSQL(&quot;UPDATE sources set last_updated=?,last_inserted_size=?,last_deleted_size=?, &quot;+
 								 &quot;last_sync_duration=?,last_sync_success=? WHERE source_id=?&quot;, 
 		                         new Long(endTime.toULong()), new Integer(getInsertedCount()), new Integer(getDeletedCount()), new Long((endTime.minus(startTime)).toULong()), 
@@ -151,6 +195,12 @@ class SyncSource
 	    }
 	}
 
+	boolean isPendingClientChanges()throws DBException
+	{
+	    IDBResult res = getDB().executeSQL(&quot;SELECT object FROM changed_values WHERE source_id=? and update_type='create' and sent&gt;1  LIMIT 1 OFFSET 0&quot;, getID());
+	    return !res.isEnd();
+	}
+	
 	void syncClientBlobs(String strBaseQuery)throws Exception
 	{
 	    String strQuery;
@@ -185,145 +235,92 @@ class SyncSource
 
 	void syncClientChanges()throws Exception
 	{
-		LOG.INFO(&quot;Sync client changes source ID :&quot; + getID() );
-		
-	    IDBResult res = getDB().executeSQL(&quot;SELECT attrib, object, value, attrib_type, update_type &quot;+
-				 &quot;FROM object_values where source_id=? and (update_type = 'update' or update_type = 'create' or update_type = 'delete') order by update_type&quot;, getID() );
-	    
-	    String strUpdateType = &quot;&quot;;
-    	m_arSyncBlobs.removeAllElements();
-    	m_strPushBody = &quot;&quot;;
-    	
-	    for( ; !res.isEnd()&amp;&amp; getSync().isContinueSync(); res.next() )
+	    String[] arUpdateTypes = {&quot;create&quot;, &quot;update&quot;, &quot;delete&quot;};
+	    for( int i = 0; i &lt; 3 &amp;&amp; getSync().isContinueSync(); i++ )
 	    {
-	    	String strTemp  = res.getStringByIdx(4);
-	    	if ( !strUpdateType.equals(strTemp) )
-	    	{
-	    		if ( strUpdateType.length() &gt; 0 )
-	    		{
-	    			if ( !sendClientChanges(strUpdateType) )
-	    			{
-	    				getSync().setState(SyncEngine.esStop);
-	                	continue;
-	    			}	
-	    		}
-	    		
-	    		m_strPushBody = &quot;&quot;;
-	    		strUpdateType = strTemp;
-	    	}
-	    	
-	    	makePushBody1( res );
-	    }
-	    
-	    if ( getSync().isContinueSync() &amp;&amp; strUpdateType.length() &gt; 0 )
-	    	sendClientChanges(strUpdateType);
-	}
+	        String strUrl = getUrl() + &quot;/&quot; + arUpdateTypes[i];
+	        strUrl += &quot;objects&quot;;
+	        String strQuery = SyncEngine.SYNC_SOURCE_FORMAT() + &quot;&amp;client_id=&quot; + getSync().getClientID();
 
-	boolean sendClientChanges(String strUpdateType)throws Exception
-	{
-	    String strUrl = getUrl() + &quot;/&quot; + strUpdateType;
-	    strUrl += &quot;objects&quot;;
-	    String strQuery = SyncEngine.SYNC_SOURCE_FORMAT() + &quot;&amp;client_id=&quot; + getSync().getClientID();
-	
-	    if ( m_strPushBody.length() &gt; 0 )
-	    {
-		    LOG.INFO(&quot;Push client changes to server. Source id: &quot; + getID() + &quot;Size :&quot; + m_strPushBody.length());
-		    LOG.TRACE( &quot;Push body: &quot; + m_strPushBody );		
-	
-		    try{
-		    	NetResponse resp = getNet().pushData(strUrl+strQuery,m_strPushBody, getSync() );
-		        if ( !resp.isOK() )
-		        {
-		        	m_nErrCode = RhoRuby.ERR_REMOTESERVER;
-		        	//m_strError = resp.getCharData();
-		        	
-		            return false;
-		        }
-		    }catch(Exception exc)
-		    {
-		    	m_nErrCode = RhoRuby.getNetErrorCode(exc);
-		    	throw exc;
-		    }
+	        m_arSyncBlobs.removeAllElements();
+	        String strBody = makePushBody(arUpdateTypes[i]);
+	        if ( strBody.length() &gt; 0 )
+	        {
+			    LOG.INFO( &quot;Push client changes to server. Source id: &quot; + getID() + &quot;Size :&quot; + strBody.length() );
+			    LOG.TRACE(&quot;Push body: &quot; + strBody);		
+	 
+	            NetResponse resp = getNet().pushData(strUrl+strQuery,strBody, getSync());
+	            if ( !resp.isOK() )
+	            {
+	                getSync().setState(SyncEngine.esStop);
+	                m_nErrCode = RhoRuby.ERR_REMOTESERVER;
+	                continue;
+	            }
+	        }
+	 
+	        if ( m_arSyncBlobs.size()&gt;0 )
+	        {
+			    LOG.INFO( &quot;Push blobs to server. Source id: &quot; + getID() + &quot;Count :&quot; + m_arSyncBlobs.size() );
+	            //oo conflicts
+	            if ( i &lt; 1 ) //create
+	                getDB().executeSQL(&quot;UPDATE changed_values SET sent=2 WHERE source_id=? and update_type=? and (attrib_type IS NULL or attrib_type!=?) and sent=1&quot;, 
+	                    getID(), arUpdateTypes[i], &quot;blob.file&quot; );
+	            else
+	            //
+	            	getDB().executeSQL(&quot;DELETE FROM changed_values WHERE source_id=? and update_type=? and (attrib_type IS NULL or attrib_type!=?) and sent=1&quot;, 
+	            		getID(), arUpdateTypes[i], &quot;blob.file&quot; );
+	            
+	            syncClientBlobs(strUrl+strQuery);
+	        }else if ( strBody.length() &gt; 0 )
+	        {
+	            //oo conflicts
+	            if ( i &lt; 1 ) //create
+	                getDB().executeSQL(&quot;UPDATE changed_values SET sent=2 WHERE source_id=? and update_type=? and sent=1&quot;, getID(), arUpdateTypes[i] );
+	            else
+	            //
+	            	getDB().executeSQL(&quot;DELETE FROM changed_values WHERE source_id=? and update_type=? and sent=1&quot;, getID(), arUpdateTypes[i] );
+	        }
 	    }
-	
-	    if ( m_arSyncBlobs.size() &gt; 0  )
-	    {
-		    LOG.INFO( &quot;Push blobs to server. Source id: &quot; + getID() + &quot;Count :&quot; + m_arSyncBlobs.size() );
-	
-	        getDB().executeSQL(&quot;DELETE FROM object_values WHERE source_id=? and update_type=? and (attrib_type IS NULL or attrib_type!=?)&quot;, getID(), strUpdateType, &quot;blob.file&quot; );
-	        syncClientBlobs(strUrl+strQuery);
-	    }else if ( m_strPushBody.length() &gt; 0 )
-	        getDB().executeSQL(&quot;DELETE FROM object_values WHERE source_id=? and update_type=?&quot;, getID(), strUpdateType );
-	    
-	    return true;
 	}
 	
-/*
- * Construct the body of the request by filtering 
- * the attr_filter string. The body format should
- * look like the following:
- * create: attrvals[][attrib]=&lt;name|industry&gt;&amp;attrvals[][object]=&lt;locallygeneratedid&gt;&amp;attrvals[][value]=&lt;some value&gt;
- * update: attrvals[][attrib]=&lt;name|industry&gt;&amp;attrvals[][object]=&lt;remoteid&gt;&amp;attrvals[][value]=&lt;some new value&gt;
- * delete: attrvals[][attrib]=&lt;name|industry&gt;&amp;attrvals[][object]=&lt;remoteid&gt;
- */
-	void makePushBody1( IDBResult res )throws DBException
-	{
-        String strSrcBody = &quot;attrvals[][attrib]=&quot; + res.getStringByIdx(0);
-
-        if ( res.getStringByIdx(1).length() &gt; 0 ) 
-            strSrcBody += &quot;&amp;attrvals[][object]=&quot; + res.getStringByIdx(1);
-
-        String value = res.getStringByIdx(2);
-        String attribType = res.getStringByIdx(3);
-
-        if ( value.length() &gt; 0 )
-        {
-            if ( attribType.equals(&quot;blob.file&quot;) )
-            {
-                FilePath oBlobPath = new FilePath(value);
-                strSrcBody += &quot;&amp;attrvals[][value]=&quot;;
-                strSrcBody += oBlobPath.getBaseName();
-                strSrcBody += &quot;&amp;attrvals[][attrib_type]=blob&quot;;
-
-                m_arSyncBlobs.addElement(new SyncBlob(strSrcBody,value));
-                return;
-            }else
-                strSrcBody += &quot;&amp;attrvals[][value]=&quot; + value;
-        }
-
-        if ( m_strPushBody.length() &gt; 0 )
-        	m_strPushBody += &quot;&amp;&quot;;
-
-        m_strPushBody += strSrcBody;
-	}
+	/*
+	 * Construct the body of the request by filtering 
+	 * the attr_filter string. The body format should
+	 * look like the following:
+	 * create: attrvals[][attrib]=&lt;name|industry&gt;&amp;attrvals[][object]=&lt;locallygeneratedid&gt;&amp;attrvals[][value]=&lt;some value&gt;
+	 * update: attrvals[][attrib]=&lt;name|industry&gt;&amp;attrvals[][object]=&lt;remoteid&gt;&amp;attrvals[][value]=&lt;some new value&gt;
+	 * delete: attrvals[][attrib]=&lt;name|industry&gt;&amp;attrvals[][object]=&lt;remoteid&gt;
+	 */
 	
 	String makePushBody( String szUpdateType)throws DBException
 	{
 		String strBody = &quot;&quot;;
-	    //boolean bFirst = true;
-	    IDBResult res = getDB().executeSQL(&quot;SELECT attrib, object, value, attrib_type &quot;+
-						 &quot;FROM object_values where source_id=? and update_type =?&quot;, getID(), szUpdateType );
+        getDB().Lock();
+		
+	    IDBResult res = getDB().executeSQL(&quot;SELECT attrib, object, value, attrib_type, main_id &quot;+
+						 &quot;FROM changed_values where source_id=? and update_type =? and sent&lt;=1 ORDER BY sent DESC&quot;, getID(), szUpdateType );
+	    if ( res.isEnd() )
+	    {
+	    	getDB().Unlock();
+	    	return strBody;
+	    }
+	    
 	    for( ; !res.isEnd(); res.next() )
 	    {
 	        String strSrcBody = &quot;attrvals[][attrib]=&quot; + res.getStringByIdx(0);
 	
 	        if ( res.getStringByIdx(1).length() &gt; 0 ) 
 	            strSrcBody += &quot;&amp;attrvals[][object]=&quot; + res.getStringByIdx(1);
-	
+
+	        long main_id = res.getLongByIdx(4);
+	        if ( main_id != 0 )
+	            strSrcBody += &quot;&amp;attrvals[][id]=&quot; + main_id;
+	        
 	        String value = res.getStringByIdx(2);
 	        String attribType = res.getStringByIdx(3);
 	
-	        /*if ( bFirst )
-	        {
-	        	try{
-	            	value = DBAdapter.makeBlobFolderName() + &quot;blobtest.png&quot;;
-	        	}catch(Exception e){}
-	        	
-	            attribType = &quot;blob.file&quot;;
-	            bFirst = false;
-	        }*/
 	
-	        if ( value.length() &gt; 0 )
+	        //if ( value.length() &gt; 0 )
 	        {
 	            if ( attribType.equals(&quot;blob.file&quot;) )
 	            {
@@ -332,7 +329,8 @@ class SyncSource
 	                strSrcBody += oBlobPath.getBaseName();
 	                strSrcBody += &quot;&amp;attrvals[][attrib_type]=blob&quot;;
 	
-	                m_arSyncBlobs.addElement(new SyncBlob(strSrcBody,value));
+	                if ( value.length() &gt; 0 )
+	                	m_arSyncBlobs.addElement(new SyncBlob(strSrcBody,value));
 	                continue;
 	            }else
 	                strSrcBody += &quot;&amp;attrvals[][value]=&quot; + value;
@@ -344,6 +342,9 @@ class SyncSource
 	        strBody += strSrcBody;
 	    }
 	    
+	    getDB().executeSQL(&quot;UPDATE changed_values SET sent=1 WHERE source_id=? and update_type=? and sent=0&quot;, getID(), szUpdateType );	    
+	    getDB().Unlock();
+	    
 	    return strBody;
 	}
 
@@ -351,16 +352,22 @@ class SyncSource
 	{
 	    String askParams = &quot;&quot;;
 	    {
-	        IDBResult res = getDB().executeSQL(&quot;SELECT value from object_values where source_id=? and update_type=?&quot;, 
-	            getID(), &quot;ask&quot; );
-        	askParams = res.isEnd() ? &quot;&quot; : res.getStringByIdx(0);
+	        IDBResult res = getDB().executeSQL(&quot;SELECT object, attrib, value &quot;+
+				     &quot;FROM changed_values WHERE source_id=? and update_type =?&quot;, getID(), &quot;ask&quot; );
+	        if ( !res.isEnd() )
+	        {
+	            askParams = res.getStringByIdx(2);
+
+	            getDB().executeSQL(&quot;DELETE FROM object_values WHERE object=? and attrib=? and source_id=?&quot;, 
+	                res.getStringByIdx(0), res.getStringByIdx(1), getID() );
+	        }
+	        
+		    getDB().executeSQL(&quot;DELETE FROM changed_values WHERE source_id=? and update_type=?&quot;, getID(), &quot;ask&quot; );
 	    }
-	
-	    getDB().executeSQL(&quot;DELETE FROM object_values WHERE source_id=? and update_type=?&quot;, getID(), &quot;ask&quot; );
-	
+
 	    setAskParams(askParams);
 	}
-
+	
 	void syncServerChanges()throws Exception
 	{
 		LOG.INFO(&quot;Sync server changes source ID :&quot; + getID() );
@@ -373,7 +380,7 @@ class SyncSource
 	            strUrl += '/' + m_strAction;
 	        
 			String strQuery = SyncEngine.SYNC_SOURCE_FORMAT() + &quot;&amp;client_id=&quot; + getSync().getClientID() + 
-	                &quot;&amp;p_size=&quot; + SyncEngine.SYNC_PAGE_SIZE();
+	                &quot;&amp;p_size=&quot; + getSync().SYNC_PAGE_SIZE() + &quot;&amp;version=&quot; + getSync().SYNC_VERSION();
 	        if ( m_strParams.length() &gt; 0 )
 	            strQuery += m_strParams;
 	
@@ -384,16 +391,17 @@ class SyncSource
 	            strQuery += &quot;&amp;question=&quot; + getAskParams();
 	        }
 	
-	        if ( isEmptyToken() )
-	            processToken(&quot;1&quot;);
-	        else if ( !m_bTokenFromDB &amp;&amp; isTokenMoreThanOne() )
+	        if ( !m_bTokenFromDB &amp;&amp; isTokenMoreThanOne() )
 	            strQuery += &quot;&amp;ack_token=&quot; + getToken();
 	
 			LOG.INFO( &quot;Pull changes from server. Url: &quot; + (strUrl+strQuery) );
 			
 			NetResponse resp = null;
 			try{
+			    PROF.START(&quot;Net&quot;);	    
 				resp = getNet().pullData(strUrl+strQuery, &quot;&quot;, getSync());
+				PROF.STOP(&quot;Net&quot;);
+				
 		        if ( !resp.isOK() )
 		        {
 		            getSync().stopSync();
@@ -409,14 +417,29 @@ class SyncSource
 		    }
 	
 	        processServerData(resp.getCharData());
-/*			String strData =
-			&quot;[{count: 124},{total_count: 5425},{token: 123},{version: 1},&quot; +
-			&quot;{o:\&quot;2ed2e0c7-8c4c-99c6-1b37-498d250bb8e7\&quot;,av:[&quot; +
-			&quot;{i:26478681,d:1},&quot; +
-			&quot;{a:\&quot;first_name\&quot;,i:47354289,v:\&quot;Lars\&quot;,t:\&quot;blob\&quot;,d:0}]}]&quot;;
-			//u:\&quot;query\&quot;,
-			processServerData(strData);*/
-			
+	        
+			//String strData =
+	        //&quot;[{count:10},{version:1},{total_count: 5425},{token: 123},{s:\&quot;RhoDeleteSource\&quot;,ol:[{o:\&quot;rho_del_obj\&quot;,av:[{i:55550425},{i:75665819},{i:338165272},{i:402396629},{i:521753981},{i:664143530},{i:678116186},{i:831092394},{i:956041217},{i:970452458}]}]}]&quot;;
+			/*&quot;[{count: 124},{version: 1},{total_count: 5425},{token: 123},&quot;
+	        &quot;{s:\&quot;Product\&quot;,ol:[&quot;
+			&quot;{oo:\&quot;123\&quot;,o:\&quot;2ed2e0c7-8c4c-99c6-1b37-498d250bb8e7\&quot;,av:[&quot;
+			&quot;{a:\&quot;first_name\&quot;,i:47354289,v:\&quot;Lars. \n\n Burgess\&quot;, t:\&quot;blob\&quot;},&quot;
+	        &quot;{a:\&quot;second_name\&quot;,i:55555,v:\&quot;Burgess\&quot;}]},&quot;
+	        &quot;{oo:\&quot;456\&quot;, e:\&quot;Something went wrong creating this record on the backend: code 7\&quot;}&quot;
+	        &quot;]}]&quot;; */
+			/*&quot;[{count: 1},{version: 1},{total_count: 1},{token: 123},&quot;
+	        &quot;{s:\&quot;Product\&quot;,ol:[&quot;
+	        &quot;{oo:\&quot;94\&quot;, e:\&quot;Something went wrong creating this record on the backend: code 7\&quot;}&quot;
+	        &quot;]}]&quot;;*/
+			/*&quot;[{count: 1},{version: 1},{total_count: 1},{token: 123},&quot;
+	        &quot;{s:\&quot;Product\&quot;,ol:[&quot;
+	        &quot;{o:\&quot;94\&quot;, av:[&quot;
+	        &quot;{a:\&quot;TEST\&quot;,i:55555,v:\&quot;Geny\&quot;}]},&quot;
+	        &quot;]}]&quot;;
+
+			//u:\&quot;query\&quot;,  
+			processServerData(strData.c_str()); */
+
 	        if ( getAskParams().length() &gt; 0 || getCurPageCount() == 0 )
 	            break;
 	    }
@@ -424,13 +447,16 @@ class SyncSource
 
 	void processServerData(String szData)throws Exception
 	{
+		LOG.TRACE(&quot;Server data: &quot; + szData);
+		PROF.START(&quot;Parse&quot;);		
 	    JSONArrayIterator oJsonArr = new JSONArrayIterator(szData);
+	    PROF.STOP(&quot;Parse&quot;);
 	    
+	    PROF.START(&quot;Data1&quot;);
 	    if ( !oJsonArr.isEnd() &amp;&amp; oJsonArr.getCurItem().hasName(&quot;error&quot;) )
 	    {
 	        m_strError = oJsonArr.getCurItem().getString(&quot;error&quot;);
 	        m_nErrCode = RhoRuby.ERR_CUSTOMSYNCSERVER;
-	        processToken(&quot;0&quot;);
 	        getSync().stopSync();
 	        return;
 	    }
@@ -440,6 +466,13 @@ class SyncSource
 	        setCurPageCount(oJsonArr.getCurItem().getInt(&quot;count&quot;));
 	        oJsonArr.next();
 	    }
+	    int nVersion = 0;
+	    if ( !oJsonArr.isEnd() &amp;&amp; oJsonArr.getCurItem().hasName(&quot;version&quot;) )
+	    {
+	        nVersion = oJsonArr.getCurItem().getInt(&quot;version&quot;);
+	        oJsonArr.next();
+	    }
+	    
 	    if ( !oJsonArr.isEnd() &amp;&amp; oJsonArr.getCurItem().hasName(&quot;total_count&quot;) )
 	    {
 	        setTotalCount(oJsonArr.getCurItem().getInt(&quot;total_count&quot;));
@@ -447,73 +480,223 @@ class SyncSource
 	    }
 	    
 	    if ( getServerObjectsCount() == 0 )
-	    	m_syncEngine.fireNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
+	    	getNotify().fireSyncNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
 	    
 	    if ( !oJsonArr.isEnd() )
 	    {
 	        processToken(oJsonArr.getCurItem().getUInt64(&quot;token&quot;));
 	        oJsonArr.next();
 	    }else if ( getCurPageCount() == 0 )
-	        processToken(&quot;0&quot;);
-
-	    int nVersion = 0;
-	    if ( !oJsonArr.isEnd() &amp;&amp; oJsonArr.getCurItem().hasName(&quot;version&quot;) )
 	    {
-	        nVersion = oJsonArr.getCurItem().getInt(&quot;version&quot;);
-	        oJsonArr.next();
+	    	//oo conflicts
+	    	getDB().executeSQL(&quot;DELETE FROM changed_values where source_id=? and sent&gt;=3&quot;, getID() );
+	    	//
+	        processToken(&quot;0&quot;);
 	    }
 	    
-		LOG.INFO( &quot;Got &quot; + getCurPageCount() + &quot; records of &quot; + getTotalCount() + &quot; from server. Source ID: &quot; + getID()
+		LOG.INFO( &quot;Got &quot; + getCurPageCount() + &quot;(Processed: &quot; +  getServerObjectsCount() + &quot;) records of &quot; + getTotalCount() + &quot; from server. Source ID: &quot; + getID()
 				+ &quot;. Version: &quot; + nVersion );
 		
+		PROF.STOP(&quot;Data1&quot;);
 		if ( !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync() )
 		{
-		    //TODO: support DBExceptions
+			PROF.START(&quot;Data&quot;);
 		    getDB().startTransaction();
+
 		    try{
-			    for( ; !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonArr.next() )
-			    {
-			        if ( getDB().isUnlockDB() )
-			        {
-						LOG.INFO( &quot;Commit transaction because of UI request.&quot; );
-						RhoRuby.RhomAttribManager_save(getID());
-			            getDB().endTransaction();
-			            getDB().startTransaction();
-			        }
-			
-			        JSONEntry oJsonObject = oJsonArr.getCurItem();
-			        boolean bRes = nVersion == 0 ? processSyncObject(oJsonObject) :
-			        	processSyncObject_ver1(oJsonObject);
-			        
-			        if( !bRes)
-		            {
-			            getSync().stopSync();
-			            break;
-		            }
-			        
-			        m_bGetAtLeastOnePage = true;
-			    }
-		    }finally{
-		    	RhoRuby.RhomAttribManager_save(getID());
+	            int nSavedPos = oJsonArr.getCurPos();
+	            setSyncServerDataPass(edpNone);
+	            processServerData_Ver1(oJsonArr);
+
+	            setSyncServerDataPass(edpDeleteObjects);
+	            oJsonArr.reset(nSavedPos);
+	            processServerData_Ver1(oJsonArr);
+		        
+			    PROF.STOP(&quot;Data&quot;);		    
+		    	
+		    	PROF.START(&quot;DB&quot;);
 				getDB().endTransaction();
+			    PROF.STOP(&quot;DB&quot;);
+			    
+			    getNotify().fireObjectsNotification();
+		        
+		    }catch(Exception exc){
+		    	getDB().rollback();
+		    	throw exc;
 			}
+		    
+		}
+		
+		PROF.START(&quot;Data1&quot;);
+		if ( getCurPageCount() &gt; 0 )
+	    	getNotify().fireSyncNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
+		PROF.STOP(&quot;Data1&quot;);
+	}
+
+	boolean processSyncObject_ver1(JSONEntry oJsonObject, Integer nSrcID)throws Exception
+	{
+		String strOldObject = oJsonObject.getString(&quot;oo&quot;);
+	    if ( isDeleteObjectsPass() != (nSrcID.intValue() &lt; 0) )
+	    	return true;
+	    
+	    if ( oJsonObject.hasName(&quot;e&quot;) )
+	    {
+	    	String strError = oJsonObject.getString(&quot;e&quot;);
+	        getNotify().addCreateObjectError(nSrcID,strOldObject,strError);
+	        return true;
+	    }
+
+		String strObject = oJsonObject.getString(&quot;o&quot;);
+		JSONArrayIterator oJsonArr = new JSONArrayIterator(oJsonObject, &quot;av&quot;);
+	    //oo conflicts
+	    boolean bUpdatedOO = false;
+	    //
+	    for( ; !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync(); m_nAttribCounter++, oJsonArr.next() )
+		{
+			JSONEntry oJsonEntry = oJsonArr.getCurItem();
+	        if ( oJsonEntry.isEmpty() )
+	        	continue;
+	        
+		    if ( nSrcID.intValue() &gt;= 0 ) //insert
+		    {
+		    	CValue value = new CValue(oJsonEntry,1);
+		    	if ( !downloadBlob(value) )
+		    		return false;
+		    	
+		    	String strAttrib = oJsonEntry.getString(&quot;a&quot;);
+	            //oo conflicts
+	            if ( strOldObject != null )
+	            {
+	                if ( !bUpdatedOO )
+	                {
+	                    getDB().executeSQL(&quot;UPDATE object_values SET object=? where object=? and source_id=?&quot;, strObject, strOldObject, nSrcID );
+	                    getDB().executeSQL(&quot;UPDATE changed_values SET object=? where object=? and source_id=?&quot;, strObject, strOldObject, nSrcID );
+
+	                    getNotify().onObjectChanged(nSrcID,strOldObject, SyncNotify.enCreate);
+
+	                    bUpdatedOO = true;
+	                }
+
+	                getDB().executeSQL(&quot;UPDATE changed_values SET main_id=? where object=? and attrib=? and source_id=? and sent&lt;=1&quot;, value.m_nID, strObject, strAttrib, nSrcID );
+	                getDB().executeSQL(&quot;UPDATE changed_values SET sent=4 where object=? and attrib=? and source_id=? and sent&gt;1&quot;, strObject, strAttrib, nSrcID );
+
+	                getDB().executeSQL(&quot;UPDATE object_values SET id=? WHERE object=? and attrib=? and source_id=?&quot;, 
+	                    value.m_nID, strObject, strAttrib, nSrcID );
+	            }else//
+	            {
+	                IDBResult resInsert = getDB().executeSQLReportNonUnique(&quot;INSERT INTO object_values &quot;+
+	                    &quot;(id, attrib, source_id, object, value, attrib_type) VALUES(?,?,?,?,?,?)&quot;, 
+	                    value.m_nID, strAttrib, nSrcID, strObject,
+	                    value.m_strValue, value.m_strAttrType );
+	                if ( resInsert.isNonUnique() )
+	                {
+	                    getDB().executeSQL(&quot;UPDATE object_values &quot;+
+	                        &quot;SET id=?, value=?, attrib_type=? WHERE object=? and attrib=? and source_id=?&quot;, 
+	                        value.m_nID, value.m_strValue, value.m_strAttrType,
+	                        strObject, strAttrib, nSrcID );
+
+	                    // oo conflicts
+	                    getDB().executeSQL(&quot;UPDATE changed_values SET sent=4 where object=? and attrib=? and source_id=? and sent&gt;1&quot;, strObject, strAttrib, nSrcID );
+	                    getDB().executeSQL(&quot;UPDATE changed_values SET main_id=? where object=? and attrib=? and source_id=? and sent&lt;=1&quot;, value.m_nID, strObject, strAttrib, nSrcID );
+	                    //
+	                }
+
+	                getNotify().onObjectChanged(nSrcID,strObject, SyncNotify.enUpdate);
+	            }
+		    	
+		        m_nInserted++;
+		    }else
+		    {
+		    	long id = oJsonEntry.getLong(&quot;i&quot;);
+		    	
+	            IDBResult res = getDB().executeSQL(&quot;SELECT source_id, object FROM object_values where id=?&quot;, id );
+	            if ( !res.isEnd() )
+	            {
+	            	LOG.TRACE(&quot;Delete: &quot; + id);
+	                Integer nDelSrcID = new Integer(res.getIntByIdx(0));
+	                String strDelObject = res.getStringByIdx(1);
+	                getDB().executeSQL(&quot;DELETE FROM object_values where id=?&quot;, id );
+	                getNotify().onObjectChanged(nDelSrcID, strDelObject, SyncNotify.enDelete);
+	            }
+                // oo conflicts
+                getDB().executeSQL(&quot;UPDATE changed_values SET sent=3 where main_id=?&quot;, id );
+                //
+	            
+		        m_nDeleted++;
+		    }
 		}
 		
-	    if ( getServerObjectsCount() &lt; getTotalCount() )
-	    	m_syncEngine.fireNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
+		return true;
 	}
+	
+	void processServerData_Ver1(JSONArrayIterator oJsonArr)throws Exception
+	{
+	    for( ; !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonArr.next() )
+	    {
+	        JSONEntry oJsonSource = oJsonArr.getCurItem();
+	        String strSrcName = oJsonSource.getString(&quot;s&quot;);
+	        Integer nSrcID = getID();
+	        if ( strSrcName.compareTo(&quot;RhoDeleteSource&quot;) == 0 )
+	            nSrcID = new Integer(-1);
+	        else if ( strSrcName.compareTo(getName()) != 0 )
+	        {
+	            SyncSource pSrc = getSync().findSourceByName(strSrcName);
+	            if ( pSrc == null )
+	            {
+	                LOG.ERROR(&quot;Sync server send data for unknown source name:&quot; + strSrcName);
+	                getSync().stopSync();
+	                m_nErrCode = RhoRuby.ERR_UNEXPECTEDSERVERRESPONSE;
+	                break;
+	            }
+	            nSrcID = pSrc.getID();
+	        }
 
+	        JSONArrayIterator oJsonObjList = new JSONArrayIterator(oJsonSource, &quot;ol&quot;);
+	        m_nAttribCounter = 0;
+	        for( ; !oJsonObjList.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonObjList.next() )
+	        {
+		        if ( getDB().isUnlockDB() )//|| m_nAttribCounter &gt;= 200 )
+		        {
+		        	if ( getDB().isUnlockDB() )
+		        		LOG.INFO( &quot;Commit transaction because of UI request.&quot; );
+		        	
+		            getDB().endTransaction();
+		            getDB().startTransaction();
+		            
+		            m_nAttribCounter = 0;
+		        }
+		
+		        JSONEntry oJsonObject = oJsonObjList.getCurItem();
+		        if( !processSyncObject_ver1(oJsonObject,nSrcID))
+	            {
+		            getSync().stopSync();
+		            break;
+	            }
+		        
+		        if ( !isDeleteObjectsPass() &amp;&amp; nSrcID.intValue() &gt;=0 )
+		        {
+	                int nSyncObjectCount  = getNotify().incLastSyncObjectCount(nSrcID);
+
+	                if ( getProgressStep() &gt; 0 &amp;&amp; (nSyncObjectCount%getProgressStep() == 0) )
+	                    getNotify().fireSyncNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
+		        }
+		        
+		        m_bGetAtLeastOnePage = true;
+	        }
+	    }
+	}
+	
 	class CValue
 	{
 	    String m_strValue;
 		String m_strAttrType;
-		long   m_nID;
+		Long   m_nID;
 		
 		CValue(JSONEntry oJsonEntry)throws JSONException
 		{
 			m_strValue = oJsonEntry.getString(&quot;value&quot;);
 			m_strAttrType = oJsonEntry.getString(&quot;attrib_type&quot;);
-			m_nID = oJsonEntry.getLong(&quot;id&quot;);
+			m_nID = new Long(oJsonEntry.getLong(&quot;id&quot;));
 		}
 		CValue(JSONEntry oJsonEntry, int nVer)throws JSONException
 		{
@@ -521,7 +704,7 @@ class SyncSource
 			{
 				m_strValue = oJsonEntry.getString(&quot;v&quot;);
 				m_strAttrType = oJsonEntry.getString(&quot;t&quot;);
-				m_nID = oJsonEntry.getLong(&quot;i&quot;);
+				m_nID = new Long(oJsonEntry.getLong(&quot;i&quot;));
 			}
 		}
 		
@@ -547,7 +730,7 @@ class SyncSource
 			}
 		}
 		
-		fName += &quot;/id_&quot; + Long.toString(value.m_nID) + strExt;
+		fName += &quot;/id_&quot; + value.m_nID.toString() + strExt;
 		
 		return fName;
 	}
@@ -589,98 +772,14 @@ class SyncSource
         return true;
 	}
 	
-	boolean processSyncObject_ver1(JSONEntry oJsonObject)throws Exception
-	{
-		String strObject = oJsonObject.getString(&quot;o&quot;);
-		JSONArrayIterator oJsonArr = new JSONArrayIterator(oJsonObject, &quot;av&quot;);
-		
-	    for( ; !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonArr.next() )
-		{
-			JSONEntry oJsonEntry = oJsonArr.getCurItem();
-	        if ( oJsonEntry.isEmpty() )
-	        	continue;
-	        
-		    int nDbOp = oJsonEntry.getInt(&quot;d&quot;);
-		    if ( nDbOp == 0 ) //insert
-		    {
-		    	CValue value = new CValue(oJsonEntry,1);
-		    	if ( !downloadBlob(value) )
-		    		return false;
-		    	
-		    	String strAttrib = oJsonEntry.getString(&quot;a&quot;);
-		    	String strUpdateType = &quot;query&quot;;
-		    	if( oJsonEntry.hasName(&quot;u&quot;) )
-		    		strUpdateType = oJsonEntry.getString(&quot;u&quot;);
-		    	
-		        getDB().executeSQL(&quot;INSERT INTO object_values &quot; +
-		            &quot;(id, attrib, source_id, object, value, update_type,attrib_type) VALUES(?,?,?,?,?,?,?)&quot;, 
-		            new Long(value.m_nID), strAttrib, getID(), strObject,
-		            value.m_strValue, strUpdateType, value.m_strAttrType );
-		        
-		        RhoRuby.RhomAttribManager_add_attrib(getID(),strAttrib);
-		        m_nInserted++;
-		    }else if ( nDbOp == 1 ) //delete
-		    {
-		    	long id = oJsonEntry.getLong(&quot;i&quot;);
-		        getDB().executeSQL(&quot;DELETE FROM object_values where id=?&quot;, id );
-		
-		        RhoRuby.RhomAttribManager_delete_attribs(getID(),id);
-		        m_nDeleted++;
-		    }else{
-		        LOG.ERROR(&quot;Unknown DB operation: &quot; + nDbOp );
-		    }
-		}
-		
-		return true;
-	}
-
-	boolean processSyncObject(JSONEntry oJsonObject)throws Exception
-	{
-    	JSONEntry oJsonEntry = oJsonObject.getEntry(&quot;object_value&quot;);
-        
-        if ( oJsonEntry.isEmpty() )
-        	return true;
-        
-	    String szDbOp = oJsonEntry.getString(&quot;db_operation&quot;);
-	    if ( szDbOp != null &amp;&amp; szDbOp.equals(&quot;insert&quot;) )
-	    {
-	    	CValue value = new CValue(oJsonEntry);
-	    	//
-	    	//value.m_strAttrType = &quot;blob.url&quot;;
-	    	//value.m_strValue = &quot;http://img.gazeta.ru/files3/661/3219661/ld.jpg&quot;;
-	    	//
-	    	if ( !downloadBlob(value) )
-	    		return false;
-	    	
-	    	String strAttrib = oJsonEntry.getString(&quot;attrib&quot;);
-	        getDB().executeSQL(&quot;INSERT INTO object_values &quot; +
-	            &quot;(id, attrib, source_id, object, value, update_type,attrib_type) VALUES(?,?,?,?,?,?,?)&quot;, 
-	            new Long(value.m_nID), strAttrib, getID(), oJsonEntry.getString(&quot;object&quot;),
-	            value.m_strValue, oJsonEntry.getString(&quot;update_type&quot;), value.m_strAttrType );
-	        
-	        RhoRuby.RhomAttribManager_add_attrib(getID(),strAttrib);
-	        m_nInserted++;
-	    }else if ( szDbOp != null &amp;&amp; szDbOp.equals(&quot;delete&quot;) )
-	    {
-	    	long id = oJsonEntry.getLong(&quot;id&quot;);
-	        getDB().executeSQL(&quot;DELETE FROM object_values where id=?&quot;, id );
-	
-	        RhoRuby.RhomAttribManager_delete_attribs(getID(),id);
-	        m_nDeleted++;
-	    }else{
-	        LOG.ERROR(&quot;Unknown DB operation: &quot; + (szDbOp != null ? szDbOp : &quot;&quot;) );
-	    }
-	    
-	    return true;
-	}
-
 	void processToken(String token)throws DBException
 	{
 	    if ( this.isTokenMoreThanOne() &amp;&amp; getToken().equals(token) ){
 			//Delete non-confirmed records
 	    	
 	        setToken( token ); //For m_bTokenFromDB = false;
-	        getDB().executeSQL(&quot;DELETE FROM object_values where source_id=? and token=?&quot;, getID(), token );
+	        //getDB().executeSQL(&quot;DELETE FROM object_values where source_id=? and token=?&quot;, getID(), token );
+	        //TODO: add special table for id,token
 		}else
 	    {
 	        setToken( token );
@@ -688,4 +787,4 @@ class SyncSource
 		}
 	
 	}
-}
\ No newline at end of file
+}</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/sync/SyncSource.java</filename>
    </modified>
    <modified>
      <diff>@@ -40,6 +40,7 @@ import com.xruby.runtime.lang.RubyNoArgMethod;
 import com.xruby.runtime.lang.RubyNoOrOneArgMethod;
 import com.xruby.runtime.lang.RubyOneArgMethod;
 import com.xruby.runtime.lang.RubyOneOrTwoArgMethod;
+import com.xruby.runtime.lang.RubyTwoArgMethod;
 import com.xruby.runtime.lang.RubyRuntime;
 import com.xruby.runtime.lang.RubyValue;
 import com.xruby.runtime.lang.RubyVarArgMethod;
@@ -107,17 +108,21 @@ public class SyncThread extends RhoThread
     static class SyncSearchCommand extends SyncCommand
     {
 	    String m_strFrom;
-        public SyncSearchCommand(String from, String params, int source_id)
+	    boolean   m_bSyncChanges;
+	    int     m_nProgressStep;
+        public SyncSearchCommand(String from, String params, int source_id, boolean sync_changes, int nProgressStep)
 	    {
         	super(scSearchOne,params,source_id);
 		    m_strFrom = from;
+		    m_bSyncChanges = sync_changes;
+		    m_nProgressStep = nProgressStep;
 	    }
     };
    	
     SyncEngine  m_oSyncEngine;
     RhoClassFactory m_ptrFactory;
 	int           m_nPollInterval;
-	Mutex         m_mxStackCommands = new Mutex();
+	Object        m_mxStackCommands;// = new Mutex();
 	LinkedList	  m_stackCommands = new LinkedList();	         
 	
 	public static SyncThread Create(RhoClassFactory factory)throws Exception
@@ -150,8 +155,10 @@ public class SyncThread extends RhoThread
 		m_ptrFactory = factory;
 	
 	    m_oSyncEngine.setFactory(factory);
-	
+	    m_mxStackCommands = getSyncObject();
+	    	
 	    ClientRegister.Create(factory);
+	    	    
 	    start(epLow);
 	}
 
@@ -161,6 +168,7 @@ public class SyncThread extends RhoThread
 
     void addSyncCommand(SyncCommand oSyncCmd)
     { 
+    	LOG.INFO( &quot;addSyncCommand: &quot; + oSyncCmd.m_nCmdCode );
     	synchronized(m_mxStackCommands)
     	{
     		boolean bExist = false;
@@ -214,11 +222,15 @@ public class SyncThread extends RhoThread
 	        if ( m_nPollInterval &gt; 0 &amp;&amp; nLastSyncInterval &gt; 0 )
 	            nWait = (m_nPollInterval*1000 - nLastSyncInterval)/1000;
 
-			if ( nWait &gt;= 0 )
-			{
-				LOG.INFO( &quot;Sync engine blocked for &quot; + nWait + &quot; seconds...&quot; );
-		        wait(nWait);
-			}
+	        synchronized(m_mxStackCommands)
+	        {
+				if ( nWait &gt;= 0 &amp;&amp; m_oSyncEngine.getState() != SyncEngine.esExit &amp;&amp; 
+					 isNoCommands() )
+				{
+					LOG.INFO( &quot;Sync engine blocked for &quot; + nWait + &quot; seconds...&quot; );
+			        wait(nWait);
+				}
+	        }
 	        nLastSyncInterval = 0;
 			
 	        if ( m_oSyncEngine.getState() != SyncEngine.esExit )
@@ -233,12 +245,23 @@ public class SyncThread extends RhoThread
 		}
 	}
 	
+	boolean isNoCommands()
+	{
+		boolean bEmpty = false;
+    	synchronized(m_mxStackCommands)
+    	{		
+    		bEmpty = m_stackCommands.isEmpty();
+    	}
+
+    	return bEmpty;
+	}
+	
 	void processCommands()throws Exception
 	{
-		if ( m_stackCommands.isEmpty() )
+		if ( isNoCommands() )
 			addSyncCommand(new SyncCommand(scNone));
-		
-		while(!m_stackCommands.isEmpty())
+    	
+		while(!isNoCommands())
 		{
 			SyncCommand oSyncCmd = null;
 	    	synchronized(m_mxStackCommands)
@@ -264,11 +287,12 @@ public class SyncThread extends RhoThread
 	    case scChangePollInterval:
 	        break;
 	    case scSyncOne:
-	    	m_oSyncEngine.doSyncSource(oSyncCmd.m_nCmdParam,oSyncCmd.m_strCmdParam,&quot;&quot;,&quot;&quot; );
+	    	m_oSyncEngine.doSyncSource(oSyncCmd.m_nCmdParam,oSyncCmd.m_strCmdParam,&quot;&quot;,&quot;&quot;, false, -1 );
 	        break;
 	    case scSearchOne:
 	        m_oSyncEngine.doSyncSource(oSyncCmd.m_nCmdParam,&quot;&quot;,oSyncCmd.m_strCmdParam, 
-	            ((SyncSearchCommand)oSyncCmd).m_strFrom);
+	            ((SyncSearchCommand)oSyncCmd).m_strFrom, ((SyncSearchCommand)oSyncCmd).m_bSyncChanges,
+	            ((SyncSearchCommand)oSyncCmd).m_nProgressStep);
 	        break;
 	        
 	    case scLogin:
@@ -285,7 +309,7 @@ public class SyncThread extends RhoThread
 	public boolean setStatusListener(ISyncStatusListener listener) {
 		m_statusListener = listener;
 		if (m_oSyncEngine != null) {
-			m_oSyncEngine.setStatusListener(listener);
+			m_oSyncEngine.getNotify().setSyncStatusListener(listener);
 			return true;
 		}
 		return false;
@@ -303,8 +327,10 @@ public class SyncThread extends RhoThread
 	public static void doSyncAllSources(boolean bShowStatus)
 	{
 		if (bShowStatus&amp;&amp;(m_statusListener != null)) {
+			getInstance().m_oSyncEngine.getNotify().setSyncStatusListener(m_statusListener);
 			m_statusListener.createStatusPopup();
-		}
+		}else
+			getInstance().m_oSyncEngine.getNotify().setSyncStatusListener(null);
 		
 		getInstance().addSyncCommand(new SyncCommand(SyncThread.scSyncAll));
 	}
@@ -331,9 +357,10 @@ public class SyncThread extends RhoThread
 	{
 		if ( getSyncEngine().isSyncing() )
 		{
-			getSyncEngine().stopSync();
+			getSyncEngine().stopSyncByUser();
 			int nWait = 0;
-			while( nWait &lt; 30000 &amp;&amp; getSyncEngine().getState() != SyncEngine.esNone )
+			//while( nWait &lt; 30000 &amp;&amp; getSyncEngine().getState() != SyncEngine.esNone )
+			while( nWait &lt; 30000 &amp;&amp; getSyncEngine().getDB().isInsideTransaction() )
 				try{ Thread.sleep(100); nWait += 100; }catch(Exception e){}
 				
 			if (getSyncEngine().getState() != SyncEngine.esNone)
@@ -348,6 +375,11 @@ public class SyncThread extends RhoThread
 		}
 	}
 	
+	public void addobjectnotify_bysrcname(String strSrcName, String strObject)
+	{
+		getSyncEngine().getNotify().addObjectNotify(strSrcName, strObject);
+	}
+	
 	public static void initMethods(RubyClass klass) {
 		klass.getSingletonClass().defineMethod(&quot;dosync&quot;, new RubyNoOrOneArgMethod(){ 
 			protected RubyValue run(RubyValue receiver, RubyBlock block )
@@ -401,18 +433,21 @@ public class SyncThread extends RhoThread
 		klass.getSingletonClass().defineMethod(&quot;dosearch_source&quot;,
 			new RubyVarArgMethod() {
 				protected RubyValue run(RubyValue receiver, RubyArray args, RubyBlock block) {
-					if ( args.size() != 3 )
+					if ( args.size() != 5 )
 						throw new RubyException(RubyRuntime.ArgumentErrorClass, 
-								&quot;in SyncEngine.dosearch_source: wrong number of arguments ( &quot; + args.size() + &quot; for &quot; + 3 + &quot; )&quot;);			
+								&quot;in SyncEngine.dosearch_source: wrong number of arguments ( &quot; + args.size() + &quot; for &quot; + 5 + &quot; )&quot;);			
 					
 					try{
 						int source_id = args.get(0).toInt();
 						String from = args.get(1).toStr();
 						String params = args.get(2).toStr();
 						
+						String str = args.get(3).asString();
+						int nProgressStep = args.get(4).toInt();
+						boolean bSearchSyncChanges = args.get(3).equals(RubyConstant.QTRUE)||&quot;true&quot;.equalsIgnoreCase(str);
 						stopSync();
 						
-						getInstance().addSyncCommand(new SyncSearchCommand(from,params,source_id) );
+						getInstance().addSyncCommand(new SyncSearchCommand(from,params,source_id,bSearchSyncChanges, nProgressStep) );
 					}catch(Exception e)
 					{
 						LOG.ERROR(&quot;SyncEngine.login&quot;, e);
@@ -547,7 +582,7 @@ public class SyncThread extends RhoThread
 						int source_id = args.get(0).toInt();
 						String url = args.get(1).toStr();
 						String params = args.get(2).toStr();
-						getSyncEngine().setNotification(source_id, url, params);
+						getSyncEngine().getNotify().setSyncNotification(source_id, url, params);
 					}catch(Exception e)
 					{
 						LOG.ERROR(&quot;set_notification failed&quot;, e);
@@ -561,7 +596,7 @@ public class SyncThread extends RhoThread
 				protected RubyValue run(RubyValue receiver, RubyValue arg1, RubyBlock block) {
 					try{
 						int source_id = arg1.toInt();
-						getSyncEngine().clearNotification(source_id);
+						getSyncEngine().getNotify().clearSyncNotification(source_id);
 					}catch(Exception e)
 					{
 						LOG.ERROR(&quot;clear_notification failed&quot;, e);
@@ -605,6 +640,112 @@ public class SyncThread extends RhoThread
 						return RubyConstant.QNIL;
 					}
 			});
+		
+		klass.getSingletonClass().defineMethod(&quot;get_src_attrs&quot;,
+				new RubyOneArgMethod() {
+					protected RubyValue run(RubyValue receiver, RubyValue arg1, RubyBlock block) {
+						try{
+							int nSrcID = arg1.toInt();
+							return getDBAdapter().getAttrMgr().getAttrsBySrc(nSrcID);
+						}catch(Exception e)
+						{
+							LOG.ERROR(&quot;get_src_attrs failed&quot;, e);
+							throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
+						}
+					}
+			});
+
+		klass.getSingletonClass().defineMethod(&quot;set_objectnotify_url&quot;,
+				new RubyOneArgMethod() {
+					protected RubyValue run(RubyValue receiver, RubyValue arg1, RubyBlock block) {
+						try{
+							String url = arg1.toStr();
+							SyncNotify.setObjectNotifyUrl(url);
+						}catch(Exception e)
+						{
+							LOG.ERROR(&quot;set_objectnotify_url failed&quot;, e);
+							throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
+						}
+						
+						return RubyConstant.QNIL;
+					}
+			});
+
+		klass.getSingletonClass().defineMethod(&quot;add_objectnotify&quot;,
+				new RubyTwoArgMethod() {
+					protected RubyValue run(RubyValue receiver, RubyValue arg1, RubyValue arg2, RubyBlock block) {
+						try{
+							Integer nSrcID = new Integer(arg1.toInt());
+							String strObject = arg2.toStr();
+							
+							getSyncEngine().getNotify().addObjectNotify(nSrcID, strObject);
+						}catch(Exception e)
+						{
+							LOG.ERROR(&quot;add_objectnotify failed&quot;, e);
+							throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
+						}
+						
+						return RubyConstant.QNIL;
+					}
+			});
+		klass.getSingletonClass().defineMethod(&quot;clean_objectnotify&quot;,
+				new RubyNoArgMethod() {
+					protected RubyValue run(RubyValue receiver, RubyBlock block) {
+						try{
+							getSyncEngine().getNotify().cleanObjectNotifications();
+						}catch(Exception e)
+						{
+							LOG.ERROR(&quot;clean_objectnotify failed&quot;, e);
+							throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
+						}
+						
+						return RubyConstant.QNIL;
+					}
+			});
+		
+		klass.getSingletonClass().defineMethod(&quot;get_lastsync_objectcount&quot;,
+				new RubyOneArgMethod() {
+					protected RubyValue run(RubyValue receiver, RubyValue arg1, RubyBlock block) {
+						try{
+							Integer nSrcID = new Integer(arg1.toInt());
+							int nCount = getSyncEngine().getNotify().getLastSyncObjectCount(nSrcID);
+							
+							return ObjectFactory.createInteger(nCount);
+						}catch(Exception e)
+						{
+							LOG.ERROR(&quot;get_lastsync_objectcount failed&quot;, e);
+							throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
+						}
+					}
+			});
+		klass.getSingletonClass().defineMethod(&quot;get_pagesize&quot;,
+				new RubyNoArgMethod() {
+					protected RubyValue run(RubyValue receiver, RubyBlock block) {
+						try{
+							return ObjectFactory.createInteger(getSyncEngine().getSyncPageSize());
+						}catch(Exception e)
+						{
+							LOG.ERROR(&quot;get_pagesize failed&quot;, e);
+							throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
+						}
+					}
+			});
+		
+		klass.getSingletonClass().defineMethod(&quot;set_pagesize&quot;,
+				new RubyOneArgMethod() {
+					protected RubyValue run(RubyValue receiver, RubyValue arg1, RubyBlock block) {
+						try{
+							getSyncEngine().setSyncPageSize(arg1.toInt());
+						}catch(Exception e)
+						{
+							LOG.ERROR(&quot;set_pagesize failed&quot;, e);
+							throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
+						}
+						
+						return RubyConstant.QNIL;
+					}
+			});
+		
 	}
 
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/rho/sync/SyncThread.java</filename>
    </modified>
    <modified>
      <diff>@@ -29,5 +29,9 @@ klass.defineMethod( &quot;instance_variables&quot;, new RubyNoArgMethod(){
 	protected RubyValue run(RubyValue receiver, RubyBlock block ){
 		return ((RubyObject)receiver).instance_variables();}
 });
+klass.defineMethod( &quot;rhom_init&quot;, new RubyOneArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
+		return ((RubyObject)receiver).rhom_init( arg);}
+});
 
 }}</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/GeneratedMethods/RubyObject_Methods.java</filename>
    </modified>
    <modified>
      <diff>@@ -17,8 +17,8 @@ import com.xruby.runtime.lang.*;
 
 ////@RubyLevelClass(name=&quot;Bignum&quot;, superclass=&quot;Integer&quot;)
 public class RubyBignum extends RubyInteger {
-    private static final HugeInt FIXNUM_MAX = HugeInt.valueOf(Integer.MAX_VALUE);
-    private static final HugeInt FIXNUM_MIN = HugeInt.valueOf(Integer.MIN_VALUE);
+    private static final HugeInt FIXNUM_MAX = HugeInt.valueOf(Long.MAX_VALUE);
+    private static final HugeInt FIXNUM_MIN = HugeInt.valueOf(Long.MIN_VALUE);
     private HugeInt value_;
     private RubyClass klass;
 
@@ -451,7 +451,7 @@ public class RubyBignum extends RubyInteger {
     }
 
     public static RubyInteger bignorm(long value) {
-        if (value &gt; Integer.MAX_VALUE || value &lt; Integer.MIN_VALUE)
+        if (value &gt; Long.MAX_VALUE || value &lt; Long.MIN_VALUE)
             return ObjectFactory.createBignum(HugeInt.valueOf(value));
         return ObjectFactory.createFixnum(value);
     }</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/builtin/RubyBignum.java</filename>
    </modified>
    <modified>
      <diff>@@ -215,7 +215,7 @@ public class RubyFloat extends RubyNumeric {
 	}
 
 	private RubyInteger createRubyInteger(double value) {
-		if (value &lt;= Integer.MAX_VALUE &amp;&amp; value &gt;= Integer.MIN_VALUE) {
+		if (value &lt;= Long.MAX_VALUE &amp;&amp; value &gt;= Long.MIN_VALUE) {
 			return ObjectFactory.createFixnum((long) value);
 		}
 		return ObjectFactory.createBignum(HugeDigit.valueOf(value).toBigInteger());</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/builtin/RubyFloat.java</filename>
    </modified>
    <modified>
      <diff>@@ -87,6 +87,10 @@ public class RubyHash extends RubyBasic {
 
     private static RubyID defaultID = RubyID.intern(&quot;default&quot;);
 
+    public RubyValue getRaw(RubyValue k) {
+        return (RubyValue)map_.get(k);
+    }
+    
     public RubyValue get(RubyValue k) {
         RubyValue v = (RubyValue)map_.get(k);
         if (null != v) {</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/builtin/RubyHash.java</filename>
    </modified>
    <modified>
      <diff>@@ -113,7 +113,7 @@ public class RubyRandom {
 			max = -max;
 		}
 	    val = random.nextInt((int)max);
-	    if (val &gt;= Integer.MIN_VALUE &amp;&amp; val &lt;= Integer.MAX_VALUE) {
+	    if (val &gt;= Long.MIN_VALUE &amp;&amp; val &lt;= Long.MAX_VALUE) {
 	    	return new RubyFixnum((int)val);
 	    } else {
 	    	return RubyBignum.bignorm(val);</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/builtin/RubyRandom.java</filename>
    </modified>
    <modified>
      <diff>@@ -251,6 +251,10 @@ public class RubyAPI {
     public static RubyValue callPublicNoArgMethod(RubyValue receiver, RubyBlock block, RubyID mid) 
     {
     	try{
+    		RubyValue res = receiver.rhom_processProperty(mid);
+    		if ( res != null )
+    			return res;
+    		
 	        RubyMethod m = receiver.findPublicMethod(mid);
 	        if (null != m &amp;&amp; !UndefMethod.isUndef(m)) {
 	            return m.invoke(receiver, block);</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyAPI.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,11 @@
 package com.xruby.runtime.lang;
 
-import com.xruby.runtime.lang.RubyValue;
+//import com.xruby.runtime.lang.RubyValue;
 //import com.xruby.runtime.lang.annotation.RubyLevelMethod;
 //import com.xruby.runtime.lang.annotation.RubyLevelModule;
 
 import j2me.lang.MathEx;
+import com.xruby.runtime.builtin.RubyArray;
 //import com.xruby.runtime.lang.RubyOneArgMethod;
 //import com.xruby.runtime.lang.RubyTwoArgMethod;
 //import com.xruby.runtime.lang.RubyModule;
@@ -18,6 +19,10 @@ public class RubyMathModule {
 	public static RubyValue sqrt(RubyValue receiver, RubyValue arg) {
 		return ObjectFactory.createFloat(Math.sqrt(arg.toFloat()));
 	}
+	//@RubyLevelMethod(name=&quot;cbrt&quot;, module=true)
+	public static RubyValue cbrt(RubyValue receiver, RubyValue arg) {
+		return ObjectFactory.createFloat(MathEx.cbrt(arg.toFloat()));
+	}
 	
 	//@RubyLevelMethod(name=&quot;log&quot;, module=true)
 	public static RubyValue log(RubyValue receiver, RubyValue arg) {
@@ -28,6 +33,44 @@ public class RubyMathModule {
 	public static RubyValue log10(RubyValue receiver, RubyValue arg) {
 		return ObjectFactory.createFloat(MathEx.log10(arg.toFloat()));
 	}
+
+	//@RubyLevelMethod(name=&quot;log2&quot;, module=true)
+	public static RubyValue log2(RubyValue receiver, RubyValue arg) {
+		return ObjectFactory.createFloat(MathEx.log2(arg.toFloat()));
+	}
+	
+	//@RubyLevelMethod(name=&quot;frexp&quot;, module=true)
+	public static RubyValue frexp(RubyValue receiver, RubyValue arg) 
+	{
+		double mantissa = arg.toFloat();
+        short sign = 1;
+        long exponent = 0;
+
+        if (!Double.isInfinite(mantissa) &amp;&amp; mantissa != 0.0) {
+            // Make mantissa same sign so we only have one code path.
+            if (mantissa &lt; 0) {
+                mantissa = -mantissa;
+                sign = -1;
+            }
+
+            // Increase value to hit lower range.
+            for (; mantissa &lt; 0.5; mantissa *= 2.0, exponent -=1) { }
+
+            // Decrease value to hit upper range.  
+            for (; mantissa &gt;= 1.0; mantissa *= 0.5, exponent +=1) { }
+        }
+        RubyArray res = new RubyArray(); 
+        res.add(ObjectFactory.createFloat(sign * mantissa));
+        res.add(ObjectFactory.createInteger(exponent));
+        
+        return res;
+	}
+	//@RubyLevelMethod(name=&quot;ldexp&quot;, module=true)
+	public static RubyValue ldexp(RubyValue receiver, RubyValue mantissa, RubyValue exponent) 
+	{
+        double mantissaValue = mantissa.toFloat();
+        return ObjectFactory.createFloat(mantissaValue * MathEx.pow(2.0, exponent.toInt()));
+	}
 	
 	//@RubyLevelMethod(name=&quot;exp&quot;, module=true)
 	public static RubyValue exp(RubyValue receiver, RubyValue arg) {
@@ -107,4 +150,24 @@ public class RubyMathModule {
 		return ObjectFactory.createFloat(MathEx.atan(MathEx.hypot(arg1.toFloat(), arg2.toFloat())));
 	}
 
+	//@RubyLevelMethod(name=&quot;erf&quot;, module=true)
+	public static RubyValue erf(RubyValue receiver, RubyValue arg) {
+		double x = arg.toFloat();
+		return ObjectFactory.createFloat(MathEx.erf(x));
+	}
+	//@RubyLevelMethod(name=&quot;erfc&quot;, module=true)
+	public static RubyValue erfc(RubyValue receiver, RubyValue arg) {
+		double x = arg.toFloat();
+		return ObjectFactory.createFloat(MathEx.erfc(x));
+	}
+
+	//@RubyLevelMethod(name=&quot;gamma&quot;, module=true)
+	public static RubyValue gamma(RubyValue receiver, RubyValue arg) {
+		throw new RubyException(&quot;Not implemented: gamma&quot;);
+	}
+	//@RubyLevelMethod(name=&quot;lgamma&quot;, module=true)
+	public static RubyValue lgamma(RubyValue receiver, RubyValue arg) {
+		throw new RubyException(&quot;Not implemented: lgamma&quot;);
+	}
+	
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyMathModule.java</filename>
    </modified>
    <modified>
      <diff>@@ -29,6 +29,10 @@ klass.defineModuleMethod( &quot;sqrt&quot;, new RubyOneArgMethod(){
 	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
 		return RubyMathModule.sqrt(receiver, arg);}
 });
+klass.defineModuleMethod( &quot;cbrt&quot;, new RubyOneArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
+		return RubyMathModule.cbrt(receiver, arg);}
+});
 klass.defineModuleMethod( &quot;sinh&quot;, new RubyOneArgMethod(){ 
 	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
 		return RubyMathModule.sinh(receiver, arg);}
@@ -45,6 +49,11 @@ klass.defineModuleMethod( &quot;log10&quot;, new RubyOneArgMethod(){
 	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
 		return RubyMathModule.log10(receiver, arg);}
 });
+klass.defineModuleMethod( &quot;log2&quot;, new RubyOneArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
+		return RubyMathModule.log2(receiver, arg);}
+});
+
 klass.defineModuleMethod( &quot;tanh&quot;, new RubyOneArgMethod(){ 
 	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
 		return RubyMathModule.tanh(receiver, arg);}
@@ -53,6 +62,15 @@ klass.defineModuleMethod( &quot;exp&quot;, new RubyOneArgMethod(){
 	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
 		return RubyMathModule.exp(receiver, arg);}
 });
+klass.defineModuleMethod( &quot;frexp&quot;, new RubyOneArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
+		return RubyMathModule.frexp(receiver, arg);}
+});
+klass.defineModuleMethod( &quot;ldexp&quot;, new RubyTwoArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg0, RubyValue arg1, RubyBlock block ){
+		return RubyMathModule.ldexp(receiver, arg0, arg1);}
+});
+
 klass.defineModuleMethod( &quot;atan2&quot;, new RubyTwoArgMethod(){ 
 	protected RubyValue run(RubyValue receiver, RubyValue arg0, RubyValue arg1, RubyBlock block ){
 		return RubyMathModule.atan2(receiver, arg0, arg1);}
@@ -77,4 +95,22 @@ klass.defineModuleMethod( &quot;acos&quot;, new RubyOneArgMethod(){
 	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
 		return RubyMathModule.acos(receiver, arg);}
 });
+
+klass.defineModuleMethod( &quot;erf&quot;, new RubyOneArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
+		return RubyMathModule.erf(receiver, arg);}
+});
+klass.defineModuleMethod( &quot;erfc&quot;, new RubyOneArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
+		return RubyMathModule.erfc(receiver, arg);}
+});
+klass.defineModuleMethod( &quot;gamma&quot;, new RubyOneArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
+		return RubyMathModule.gamma(receiver, arg);}
+});
+klass.defineModuleMethod( &quot;lgamma&quot;, new RubyOneArgMethod(){ 
+	protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){
+		return RubyMathModule.lgamma(receiver, arg);}
+});
+
 }}</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyMathModule_Methods.java</filename>
    </modified>
    <modified>
      <diff>@@ -10,13 +10,14 @@ import j2me.util.Iterator;
 import j2me.util.Map;
 import com.xruby.runtime.builtin.RubyArray;
 import com.xruby.runtime.builtin.ObjectFactory;
-
+import com.xruby.runtime.builtin.RubyHash;
 //import com.xruby.runtime.lang.annotation.RubyAllocMethod;
 //import com.xruby.runtime.lang.annotation.RubyLevelClass;
 
 //@RubyLevelClass(name=&quot;Object&quot;, superclass=&quot;&quot;, modules=&quot;Kernel&quot;)
 public class RubyObject extends RubyBasic {
 	protected Map/*&lt;RubyID, RubyValue&gt;*/ instance_varibles_ = null;
+	protected RubyHash m_rhomProps;
 	
 	public RubyObject(RubyClass c) {
 		super(c);
@@ -127,5 +128,18 @@ public class RubyObject extends RubyBasic {
     	
     	return ar;
     }
+
+    //@RubyLevelMethod(name=&quot;rhom_init&quot;)
+    public RubyValue rhom_init(RubyValue arg1){
+    	m_rhomProps = (RubyHash)arg1;
+    	return RubyConstant.QNIL;
+    }
     
+    public RubyValue rhom_processProperty(RubyID mid)
+    {
+    	if ( m_rhomProps == null )
+    		return null;
+    	
+    	return m_rhomProps.getRaw(mid.toSymbol());
+    }
 }</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyObject.java</filename>
    </modified>
    <modified>
      <diff>@@ -81,6 +81,10 @@ public abstract class RubyValue extends BlockCallStatus implements Cloneable {
         taint_ = orig.taint_;
         super.doClone(orig);
     }
+    public RubyValue rhom_processProperty(RubyID mid)
+    {
+    	return null;
+    }
     //RHO_COMMENT: clone
 /*
     public RubyValue clone() {</diff>
      <filename>platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyValue.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,11 @@
 package j2me.lang;
 
+import javolution.lang.MathLib;
+
 public class MathEx {
 
     public static double pow(double a, double b) {
-    	//TODO: pow
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return 0;
+    	return MathLib.pow(a,b);
     }
     
     public static long round(double a) {
@@ -13,60 +13,60 @@ public class MathEx {
     }
     
     public static double log(double a) {
-    	//TODO: log
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return a;
+    	return MathLib.log(a);
+    }
+    public static double cbrt(double x) {
+        if (x &lt; 0)
+            return -pow(-x, 1/3.0);
+        else
+            return pow(x, 1/3.0);
     }
 
     public static double log10(double a) {
-    	//TODO: log10
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return a;
+    	return MathLib.log10(a);
     }
+    public static double log2(double a) {
+        return log10(a)/log10(2.0);
+    }
+    
     public static double exp(double a) {
-    	//TODO: exp
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return a;
+    	return MathLib.exp(a);
     }
     public static double cosh(double x) {
-    	//TODO: cosh
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return x;
+    	return MathLib.cosh(x);
     }
     public static double sinh(double x) {
-    	//TODO: sinh
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return x;
+    	return MathLib.sinh(x);
     }
     public static double tanh(double x) {
-    	//TODO: tanh
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return x;
+    	return MathLib.tanh(x);
     }
     public static double acos(double a) {
-    	//TODO: acos
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return a;
+    	return MathLib.acos(a);
     }
     public static double asin(double a) {
-    	//TODO: asin
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return a;
+    	return MathLib.asin(a);
     }
     public static double atan(double a) {
-    	//TODO: atan
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return a;
+    	return MathLib.atan(a);
     }
     public static double atan2(double y, double x) {
-    	//TODO: atan2
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return y;
+    	return MathLib.atan2(y,x);
     }
-    public static double hypot(double x, double y) {
-    	//TODO: hypot
-    	throw new RuntimeException(&quot;Not Implemented&quot;);
-    	//return x;
+    public static double hypot(double a, double b) 
+    {
+    	double result;
+        if (Math.abs(a) &gt; Math.abs(b)) {
+            result = b / a;
+            result = Math.abs(a) * Math.sqrt(1 + result * result);
+        } else if (b != 0) {
+            result = a / b;
+            result = Math.abs(b) * Math.sqrt(1 + result * result);
+        } else {
+            result = 0;
+        }
+        
+        return result;
     }
     
     public static int min(int a, int b) {
@@ -77,5 +77,147 @@ public class MathEx {
     	return (a &gt;= b) ? a : b;
     }
     
+    private static double sign(double x, double y) {
+        double abs = ((x &lt; 0) ? -x : x);
+        return (y &lt; 0.0) ? -abs : abs;
+    }
+
+    private static final double ERFC_COEF[] = {
+        -.490461212346918080399845440334e-1,
+        -.142261205103713642378247418996e0,
+        .100355821875997955757546767129e-1,
+        -.576876469976748476508270255092e-3,
+        .274199312521960610344221607915e-4,
+        -.110431755073445076041353812959e-5,
+        .384887554203450369499613114982e-7,
+        -.118085825338754669696317518016e-8,
+        .323342158260509096464029309534e-10,
+        -.799101594700454875816073747086e-12,
+        .179907251139614556119672454866e-13,
+        -.371863548781869263823168282095e-15,
+        .710359900371425297116899083947e-17,
+        -.126124551191552258324954248533e-18
+   };
+    
+    public static double erf(double value) {
+        double  result;
+        double  y = Math.abs(value);
+
+        if (y &lt;= 1.49012e-08) {
+            result = 2 * value / 1.77245385090551602729816748334;
+        } else if (y &lt;= 1) {
+            result = value * (1 + chebylevSerie(2 * value * value - 1, ERFC_COEF));
+        } else if (y &lt; 6.013687357) {
+            result = sign(1 - erfc(y), value);
+        } else {
+            result = sign(1, value);
+        }
+        
+        return result;
+    }
+
+    private static final double ERFC2_COEF[] = {
+        -.69601346602309501127391508262e-1,
+        -.411013393626208934898221208467e-1,
+        .391449586668962688156114370524e-2,
+        -.490639565054897916128093545077e-3,
+        .715747900137703638076089414183e-4,
+        -.115307163413123283380823284791e-4,
+        .199467059020199763505231486771e-5,
+        -.364266647159922287393611843071e-6,
+        .694437261000501258993127721463e-7,
+        -.137122090210436601953460514121e-7,
+        .278838966100713713196386034809e-8,
+        -.581416472433116155186479105032e-9,
+        .123892049175275318118016881795e-9,
+        -.269063914530674343239042493789e-10,
+        .594261435084791098244470968384e-11,
+        -.133238673575811957928775442057e-11,
+        .30280468061771320171736972433e-12,
+        -.696664881494103258879586758895e-13,
+        .162085454105392296981289322763e-13,
+        -.380993446525049199987691305773e-14,
+        .904048781597883114936897101298e-15,
+        -.2164006195089607347809812047e-15,
+        .522210223399585498460798024417e-16,
+        -.126972960236455533637241552778e-16,
+        .310914550427619758383622741295e-17,
+        -.766376292032038552400956671481e-18,
+        .190081925136274520253692973329e-18
+   };
+
+   private static final double ERFCC_COEF[] = {
+        .715179310202924774503697709496e-1,
+        -.265324343376067157558893386681e-1,
+        .171115397792085588332699194606e-2,
+        -.163751663458517884163746404749e-3,
+        .198712935005520364995974806758e-4,
+        -.284371241276655508750175183152e-5,
+        .460616130896313036969379968464e-6,
+        -.822775302587920842057766536366e-7,
+        .159214187277090112989358340826e-7,
+        -.329507136225284321486631665072e-8,
+        .72234397604005554658126115389e-9,
+        -.166485581339872959344695966886e-9,
+        .401039258823766482077671768814e-10,
+        -.100481621442573113272170176283e-10,
+        .260827591330033380859341009439e-11,
+        -.699111056040402486557697812476e-12,
+        .192949233326170708624205749803e-12,
+        -.547013118875433106490125085271e-13,
+        .158966330976269744839084032762e-13,
+        -.47268939801975548392036958429e-14,
+        .14358733767849847867287399784e-14,
+        -.444951056181735839417250062829e-15,
+        .140481088476823343737305537466e-15,
+        -.451381838776421089625963281623e-16,
+        .147452154104513307787018713262e-16,
+        -.489262140694577615436841552532e-17,
+        .164761214141064673895301522827e-17,
+        -.562681717632940809299928521323e-18,
+        .194744338223207851429197867821e-18
+   };
+    
+    public static double erfc(double value) 
+    {
+        double  result;
+        double  y = Math.abs(value);
+
+        if (value &lt;= -6.013687357) {
+            result = 2;
+        } else if (y &lt; 1.49012e-08) {
+            result = 1 - 2 * value / 1.77245385090551602729816748334;
+        } else {
+            double ysq = y*y;
+            if (y &lt; 1) {
+                result = 1 - value * (1 + chebylevSerie(2 * ysq - 1, ERFC_COEF));
+            } else if (y &lt;= 4.0) {
+                result = MathEx.exp(-ysq)/y*(0.5+chebylevSerie((8.0 / ysq - 5.0) / 3.0, ERFC2_COEF));
+                if (value &lt; 0) result = 2.0 - result;
+                if (value &lt; 0) result = 2.0 - result;
+                if (value &lt; 0) result = 2.0 - result;
+            } else {
+                result = MathEx.exp(-ysq) / y * (0.5 + chebylevSerie(8.0 / ysq - 1, ERFCC_COEF));
+                if (value &lt; 0) result = 2.0 - result;
+            }
+        }
+        
+        return result;
+    }
+    
+    private static double chebylevSerie(double x, double coef[]) {
+        double  b0, b1, b2, twox;
+        int i;
+        b1 = 0.0;
+        b0 = 0.0;
+        b2 = 0.0;
+        twox = 2.0 * x;
+        for (i = coef.length-1; i &gt;= 0; i--) {
+            b2 = b1;
+            b1 = b0;
+            b0 = twox * b1 - b2 + coef[i];
+        }
+        return 0.5*(b0 - b2);
+    }
     
 }</diff>
      <filename>platform/shared/rubyJVM/src/j2me/lang/MathEx.java</filename>
    </modified>
    <modified>
      <diff>@@ -109,8 +109,11 @@ class StringParser implements Enumeration {
         delimsChanged = false;
         newPosition = -1;
 
-        if (currentPosition &gt;= maxPosition)
+        if (currentPosition &gt; maxPosition)
             throw new NoSuchElementException();
+        if (currentPosition == maxPosition)
+        	return &quot;&quot;;
+        
         int start = currentPosition;
         currentPosition = parseTokens(currentPosition);
         return str.substring(start, currentPosition);
@@ -139,8 +142,8 @@ class StringParser implements Enumeration {
         int currpos = currentPosition;
         while (currpos &lt; maxPosition) {
             currpos = skipDelimiters(currpos);
-            if (currpos &gt;= maxPosition)
-                break;
+            //if (currpos &gt;= maxPosition)
+            //    break;
             currpos = parseTokens(currpos);
             count++;
         }</diff>
      <filename>platform/shared/rubyJVM/src/j2me/util/StringParser.java</filename>
    </modified>
    <modified>
      <diff>@@ -574,17 +574,17 @@ public final class MathLib {
      
      /**
      * The ratio of the circumference of a circle to its diameter.
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static final double PI = 3.1415926535897932384626433832795;
 
      /**
      * Half the ratio of the circumference of a circle to its diameter.
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static final double HALF_PI = 1.5707963267948966192313216916398;
 
      /**
      * Twice the ratio of the circumference of a circle to its diameter.
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static final double TWO_PI = 6.283185307179586476925286766559;
      
      /**
@@ -614,7 +614,7 @@ public final class MathLib {
      
      /**
      * Not-A-Number.
-     * @JVM-1.1+@
+     * @JVM-1.1+@ */
      public static final double NaN = 0.0 / 0.0;
 
      /**
@@ -651,7 +651,7 @@ public final class MathLib {
      * 
      * @param x the value.
      * @return &lt;code&gt;java.lang.Math.sqrt(x)&lt;/code&gt;
-     * @JVM-1.1+@
+     * @JVM-1.1+@ */
      public static double sqrt(double x) {
      return Math.sqrt(x); // CLDC 1.1
      }
@@ -739,14 +739,13 @@ public final class MathLib {
      *
      * @param x the value whose arc sine is to be returned.
      * @return the arc sine in radians for the specified value.
-     * @JVM-1.1+@
+     * @JVM-1.1+@ */
      public static double asin(double x) {
-     if (x &lt; -1.0 || x &gt; 1.0) return MathLib.NaN;
-     if (x == -1.0) return - HALF_PI;
-     if (x == 1.0) return HALF_PI;
-     return MathLib.atan(x / MathLib.sqrt(1.0 - x * x));
+	     if (x &lt; -1.0 || x &gt; 1.0) return MathLib.NaN;
+	     if (x == -1.0) return - HALF_PI;
+	     if (x == 1.0) return HALF_PI;
+	     return MathLib.atan(x / MathLib.sqrt(1.0 - x * x));
      }
-     /**/
 
     /**
      * Returns the arc cosine of the specified value,
@@ -754,7 +753,7 @@ public final class MathLib {
      *
      * @param x the value whose arc cosine is to be returned.
      * @return the arc cosine in radians for the specified value.
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double acos(double x) {
      return HALF_PI - MathLib.asin(x);
      }
@@ -768,7 +767,7 @@ public final class MathLib {
      * @return the arc tangent in radians for the specified value.
      * @see &lt;a href=&quot;http://mathworld.wolfram.com/InverseTangent.html&quot;&gt;
      *      Inverse Tangent -- from MathWorld&lt;/a&gt; 
-     * @JVM-1.1+@
+     * @JVM-1.1+@ */
      public static double atan(double x) {
      return MathLib._atan(x);
      }
@@ -781,7 +780,7 @@ public final class MathLib {
      * @param y the y value.
      * @param x the x value.
      * @return the angle theta in radians.
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double atan2(double y, double x) {
      final double epsilon = 1E-128;
      if (MathLib.abs(x) &gt; epsilon) {
@@ -804,7 +803,7 @@ public final class MathLib {
      * 
      * @param x the value for which the hyperbolic sine is calculated.
      * @return &lt;code&gt;(exp(x) - exp(-x)) / 2&lt;/code&gt;
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double sinh(double x) {
      return (MathLib.exp(x) - MathLib.exp(-x)) * 0.5;
      }
@@ -815,7 +814,7 @@ public final class MathLib {
      * 
      * @param x the value for which the hyperbolic cosine is calculated.
      * @return &lt;code&gt;(exp(x) + exp(-x)) / 2&lt;/code&gt;
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double cosh(double x) {
      return (MathLib.exp(x) + MathLib.exp(-x)) * 0.5;
      }
@@ -826,7 +825,7 @@ public final class MathLib {
      * 
      * @param x the value for which the hyperbolic tangent is calculated.
      * @return &lt;code&gt;(exp(2 * x) - 1) / (exp(2 * x) + 1)&lt;/code&gt;
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double tanh(double x) {
      return (MathLib.exp(2 * x) - 1) / (MathLib.exp(2 * x) + 1);
      }
@@ -839,7 +838,7 @@ public final class MathLib {
      * @return &lt;code&gt;&lt;i&gt;e&lt;/i&gt;&lt;sup&gt;x&lt;/sup&gt;&lt;/code&gt;
      * @see &lt;a href=&quot;http://mathworld.wolfram.com/ExponentialFunction.html&quot;&gt;
      *      Exponential Function -- from MathWorld&lt;/a&gt; 
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double exp(double x) {
      return MathLib._ieee754_exp(x);
      }
@@ -851,7 +850,7 @@ public final class MathLib {
      *
      * @param x the value greater than &lt;code&gt;0.0&lt;/code&gt;.
      * @return the value y such as &lt;code&gt;&lt;i&gt;e&lt;/i&gt;&lt;sup&gt;y&lt;/sup&gt; == x&lt;/code&gt;
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double log(double x) {
      return MathLib._ieee754_log(x);
      }
@@ -862,7 +861,7 @@ public final class MathLib {
      *
      * @param x the value greater than &lt;code&gt;0.0&lt;/code&gt;.
      * @return the value y such as &lt;code&gt;10&lt;sup&gt;y&lt;/sup&gt; == x&lt;/code&gt;
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double log10(double x) {
      return log(x) * INV_LOG10;
      }
@@ -876,13 +875,13 @@ public final class MathLib {
      * @param x the base.
      * @param y the exponent.
      * @return &lt;code&gt;x&lt;sup&gt;y&lt;/sup&gt;&lt;/code&gt;
-     * @JVM-1.1+@
+     * @JVM-1.1+@*/
      public static double pow(double x, double y) {
      /**/
     /* @JVM-1.4+@ // Use java.lang.Math value. 
      if (true) return Math.pow(x, y);
      /**/
-    /* @JVM-1.1+@ // Else (J2ME) use close approximation (+/- LSB)
+    /* @JVM-1.1+@ // Else (J2ME) use close approximation (+/- LSB)*/
      if ((x &lt; 0) &amp;&amp; (y == (int)y)) return 
      (((int)y) &amp; 1) == 0 ? pow(-x, y) : -pow(-x, y);
      return MathLib.exp(y * MathLib.log(x));
@@ -960,7 +959,7 @@ public final class MathLib {
      *
      * @param d the &lt;code&gt;double&lt;/code&gt; value.
      * @return &lt;code&gt;d&lt;/code&gt; or &lt;code&gt;-d&lt;/code&gt;
-     * @JVM-1.1+@
+     * @JVM-1.1+@ */
      public static double abs(double d) {
      return (d &lt; 0) ? -d : d;
      }
@@ -1090,7 +1089,7 @@ public final class MathLib {
      * constants. The decimal values may be used, provided that the 
      * compiler will convert from decimal to binary accurately enough 
      * to produce the hexadecimal values shown.
-     @JVM-1.1+@
+     @JVM-1.1+@ */
      static final double atanhi[] = {
      4.63647609000806093515e-01, // atan(0.5)hi 0x3FDDAC67, 0x0561BB4F
      7.85398163397448278999e-01, // atan(1.0)hi 0x3FE921FB, 0x54442D18 
@@ -1231,7 +1230,7 @@ public final class MathLib {
      * constants. The decimal values may be used, provided that the 
      * compiler will convert from decimal to binary accurately enough 
      * to produce the hexadecimal values shown.
-     @JVM-1.1+@
+     @JVM-1.1+@*/
      static final double
      ln2_hi  =  6.93147180369123816490e-01,	// 3fe62e42 fee00000
      ln2_lo  =  1.90821492927058770002e-10,	// 3dea39ef 35793c76
@@ -1374,7 +1373,7 @@ public final class MathLib {
      * constants. The decimal values may be used, provided that the 
      * compiler will convert from decimal to binary accurately enough
      * to produce the hexadecimal values shown.
-     @JVM-1.1+@
+     @JVM-1.1+@*/
      static final double
      halF[]	= {0.5,-0.5,},
      twom1000= 9.33263618503218878990e-302,     // 2**-1000=0x01700000,0</diff>
      <filename>platform/shared/rubyJVM/src/javolution/lang/MathLib.java</filename>
    </modified>
    <modified>
      <diff>@@ -213,10 +213,10 @@ public class JSONTokener {
         for (;;) {
             c = next();
             switch (c) {
-            case 0:
-            case '\n':
-            case '\r':
-                throw syntaxError(&quot;Unterminated string&quot;);
+            //case 0:
+            //case '\n':
+            //case '\r':
+            //    throw syntaxError(&quot;Unterminated string&quot;);
             case '\\':
                 c = next();
                 switch (c) {</diff>
      <filename>platform/shared/rubyJVM/src/org/json/me/JSONTokener.java</filename>
    </modified>
    <modified>
      <diff>@@ -289,6 +289,7 @@ char* rho_resolve_url(char* url, const char* root,const char *index_names) {
 	return ret;
 }
 
+extern void rho_sync_addobjectnotify_bysrcname(const char* szSrcName, const char* szObject);
 void* rho_dispatch(struct conn *c, const char* path) {
   RouteRef route;
   
@@ -303,6 +304,7 @@ void* rho_dispatch(struct conn *c, const char* path) {
   if ((route = _alloc_route(c-&gt;uri)) != NULL) {
     if (_parse_route(route)) {
       struct stat	st;
+
       //is this an actual file or folder
       if (_shttpd_stat(path, &amp;st) != 0)
         return route;      
@@ -484,12 +486,24 @@ void rho_serve(struct shttpd_arg *arg) {
         #endif      
 
         //shttpd_printf(arg, &quot;%s&quot;, callFramework(req));
+//        _free_route(arg-&gt;user_data);
+//        arg-&gt;user_data = NULL;
+//        free(state);
+        //arg-&gt;flags |= SHTTPD_END_OF_OUTPUT;
+
+        rho_create_write_state(arg,callFramework(req));
+        {
+            RouteRef route = arg-&gt;user_data;
+            if ( _isid(route-&gt;_id) )
+            {
+              rho_sync_addobjectnotify_bysrcname(route-&gt;_model, route-&gt;_id);
+            }
+        }
+
         _free_route(arg-&gt;user_data);
         arg-&gt;user_data = NULL;
         free(state);
-        //arg-&gt;flags |= SHTTPD_END_OF_OUTPUT;
 
-        rho_create_write_state(arg,callFramework(req));
         rho_write_data(arg);
 	}
 }</diff>
      <filename>platform/shared/shttpd/src/rdispatcher.c</filename>
    </modified>
    <modified>
      <diff>@@ -90,7 +90,7 @@ boolean CClientRegister::doRegister(CSyncEngine&amp; oSync)
     }
 
 	int port = RHOCONF().getInt(&quot;push_port&quot;);
-	String serverUrl = RHOCONF().getString(&quot;syncserver&quot;);
+	String serverUrl = RHOCONF().getPath(&quot;syncserver&quot;);
 	if (serverUrl.length()&gt;0) 
     {
 	    String strBody = &quot;client_id=&quot; + client_id +</diff>
      <filename>platform/shared/sync/ClientRegister.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,11 @@
 #include &quot;SyncEngine.h&quot;
 #include &quot;SyncSource.h&quot;
 
-#include &quot;common/AutoPointer.h&quot;
 #include &quot;json/JSONIterator.h&quot;
 #include &quot;common/RhoConf.h&quot;
 #include &quot;common/StringConverter.h&quot;
 #include &quot;sync/ClientRegister.h&quot;
+#include &quot;net/URI.h&quot;
 
 namespace rho {
 const _CRhoRuby&amp; RhoRuby = _CRhoRuby();
@@ -17,32 +17,44 @@ using namespace rho::net;
 using namespace rho::common;
 using namespace rho::json;
 
+CSyncEngine::CSyncEngine(db::CDBAdapter&amp; db): m_dbAdapter(db), m_NetRequest(0), m_syncState(esNone), m_oSyncNotify(*this)
+{
+    m_bStopByUser = false;
+    m_nSyncPageSize = 2000;
+}
+
+String CSyncEngine::SYNC_PAGE_SIZE() { return convertToStringA(m_nSyncPageSize); }
+
 void CSyncEngine::doSyncAllSources()
 {
     setState(esSyncAllSources);
-
+    m_bStopByUser = false;
     loadAllSources();
 
     m_strSession = loadSession();
     if ( isSessionExist()  )
     {
         m_clientID = loadClientID();
+        getNotify().cleanLastSyncObjectCount();
         syncAllSources();
-
-	    if ( getState() != esStop )
-            fireNotification(null, true, RhoRuby.ERR_NONE, &quot;Sync completed.&quot;);
     }
     else
     {
-    	LOG(INFO) + &quot;Client is not logged in. No sync will be performed.&quot;;
-        fireNotification(null, true, RhoRuby.ERR_CLIENTISNOTLOGGEDIN, 
-    			&quot;Sync failed. Details: Client is not logged in. No sync will be performed.&quot; );
+        if ( m_sources.size() &gt; 0 )
+        {
+            CSyncSource&amp; src = *m_sources.elementAt(getStartSource());
+    	    src.m_strError = &quot;Client is not logged in. No sync will be performed.&quot;;
+            src.m_nErrCode = RhoRuby.ERR_CLIENTISNOTLOGGEDIN;
+
+            getNotify().fireSyncNotification(&amp;src, true, src.m_nErrCode, &quot;&quot;);
+        }else
+            getNotify().fireSyncNotification(null, true, RhoRuby.ERR_CLIENTISNOTLOGGEDIN, &quot;Client is not logged in. No sync will be performed.&quot;);
     }
 
     setState(esNone);
 }
 
-void CSyncEngine::doSyncSource(int nSrcId, String strSrcUrl, String strParams, String strAction)
+void CSyncEngine::doSyncSource(int nSrcId, String strSrcUrl, String strParams, String strAction, boolean bSearchSyncChanges, int nProgressStep)
 {
     if ( strSrcUrl.length()&gt;0 )
         LOG(INFO) +&quot;Started synchronization of the data source url: &quot; + strSrcUrl;
@@ -50,7 +62,7 @@ void CSyncEngine::doSyncSource(int nSrcId, String strSrcUrl, String strParams, S
     	LOG(INFO)+ &quot;Started synchronization of the data source #&quot; + nSrcId;
 
     setState(esSyncSource);
-
+    m_bStopByUser = false;
     loadAllSources();
 
     CSyncSource* pSrc = null;
@@ -65,18 +77,23 @@ void CSyncEngine::doSyncSource(int nSrcId, String strSrcUrl, String strParams, S
 
     	src.m_strParams = strParams;
     	src.m_strAction = strAction;
-    	
+    	src.m_bSearchSyncChanges = bSearchSyncChanges;
+        src.m_nProgressStep = nProgressStep;
+
 	    m_strSession = loadSession();
 	    if ( isSessionExist()  ) {
 	    	m_clientID = loadClientID();
 	        if ( getState() != esStop )
+            {
+                getNotify().cleanLastSyncObjectCount();
 	            src.sync();
+            }
 	    } else {
 	    	src.m_strError = &quot;Client is not logged in. No sync will be performed.&quot;;
             src.m_nErrCode = RhoRuby.ERR_CLIENTISNOTLOGGEDIN;
 	    }
 
-        fireNotification(&amp;src, true, src.m_nErrCode, src.m_nErrCode == RhoRuby.ERR_NONE ? &quot;Sync completed.&quot; : &quot;&quot;);
+        getNotify().fireSyncNotification(&amp;src, true, src.m_nErrCode, src.m_nErrCode == RhoRuby.ERR_NONE ? &quot;Sync completed.&quot; : &quot;&quot;);
     }else
     {
         if ( strSrcUrl.length()&gt;0 )
@@ -88,9 +105,10 @@ void CSyncEngine::doSyncSource(int nSrcId, String strSrcUrl, String strParams, S
     	//src.m_strError = &quot;Unknown sync source.&quot;;
         src.m_nErrCode = RhoRuby.ERR_RUNTIME;
 
-        fireNotification(&amp;src, true, src.m_nErrCode, &quot;&quot;);
+        getNotify().fireSyncNotification(&amp;src, true, src.m_nErrCode, &quot;&quot;);
     }
 
+    getNotify().cleanCreateObjectErrors();
     setState(esNone);
 
     if ( strSrcUrl.length()&gt;0 )
@@ -123,15 +141,36 @@ CSyncSource* CSyncEngine::findSourceByUrl(const String&amp; strSrcUrl)
     return null;
 }
 
+CSyncSource* CSyncEngine::findSourceByName(const String&amp; strSrcName)
+{
+    for( int i = 0; i &lt; (int)m_sources.size(); i++ )
+    {
+        CSyncSource&amp; src = *m_sources.elementAt(i);
+        if ( src.getName().compare(strSrcName)==0 )
+            return &amp;src;
+    }
+    
+    return null;
+}
+
 void CSyncEngine::loadAllSources()
 {
     m_sources.clear();
 
-    DBResult( res, getDB().executeSQL(&quot;SELECT source_id,source_url,token,name from sources order by source_id&quot;) );
+    DBResult( res, getDB().executeSQL(&quot;SELECT source_id,source_url,token,name from sources ORDER BY source_id&quot;) );
     for ( ; !res.isEnd(); res.next() )
     { 
         String strDbUrl = res.getStringByIdx(1);
-		String strUrl = strDbUrl.find(&quot;http&quot;) == 0 ? strDbUrl : (RHOCONF().getString(&quot;syncserver&quot;) + strDbUrl);
+        if ( strDbUrl.length() == 0 )
+            continue;
+
+        if ( strDbUrl.at(0) == '/' || strDbUrl.at(0) == '\\' )
+            strDbUrl.erase(strDbUrl.begin());
+
+		String strUrl = strDbUrl.find(&quot;http&quot;) == 0 ? strDbUrl : (RHOCONF().getPath(&quot;syncserver&quot;) + strDbUrl);
+        if ( strUrl.at(strUrl.length()-1) == '/' || strUrl.at(strUrl.length()-1) == '\\' )
+            strUrl.erase(strUrl.end()-1);
+
         String strName = res.getStringByIdx(3);
         if ( strUrl.length() &gt; 0 )
             m_sources.addElement( new CSyncSource( res.getIntByIdx(0), strUrl, strName, res.getUInt64ByIdx(2), *this) );
@@ -141,37 +180,38 @@ void CSyncEngine::loadAllSources()
 String CSyncEngine::loadClientID()
 {
     String clientID = &quot;&quot;;
-    CMutexLock lockNotify(m_mxLoadClientID);
-    boolean bResetClient = false;
+    synchronized(m_mxLoadClientID)
     {
-        DBResult( res, getDB().executeSQL(&quot;SELECT client_id,reset from client_info limit 1&quot;) );
-        if ( !res.isEnd() )
+        boolean bResetClient = false;
         {
-            clientID = res.getStringByIdx(0);
-            bResetClient = res.getIntByIdx(1) &gt; 0;
+            DBResult( res, getDB().executeSQL(&quot;SELECT client_id,reset from client_info limit 1&quot;) );
+            if ( !res.isEnd() )
+            {
+                clientID = res.getStringByIdx(0);
+                bResetClient = res.getIntByIdx(1) &gt; 0;
+            }
         }
-    }
 
-    if ( clientID.length() == 0 )
-    {
-        clientID = requestClientIDByNet();
+        if ( clientID.length() == 0 )
+        {
+            clientID = requestClientIDByNet();
 
-        getDB().executeSQL(&quot;DELETE FROM client_info&quot;);
-        getDB().executeSQL(&quot;INSERT INTO client_info (client_id) values (?)&quot;, clientID);
-    }else if ( bResetClient )
-    {
-    	if ( !resetClientIDByNet(clientID) )
-    		stopSync();
-    	else
-    		getDB().executeSQL(&quot;UPDATE client_info SET reset=? where client_id=?&quot;, 0, clientID );	    	
+            getDB().executeSQL(&quot;DELETE FROM client_info&quot;);
+            getDB().executeSQL(&quot;INSERT INTO client_info (client_id) values (?)&quot;, clientID);
+        }else if ( bResetClient )
+        {
+    	    if ( !resetClientIDByNet(clientID) )
+    		    stopSync();
+    	    else
+    		    getDB().executeSQL(&quot;UPDATE client_info SET reset=? where client_id=?&quot;, 0, clientID );	    	
+        }
     }
-
     return clientID;
 }
 
 boolean CSyncEngine::resetClientIDByNet(const String&amp; strClientID)//throws Exception
 {
-    String serverUrl = RHOCONF().getString(&quot;syncserver&quot;);
+    String serverUrl = RHOCONF().getPath(&quot;syncserver&quot;);
     String strUrl = serverUrl + &quot;clientreset&quot;;
     String strQuery = &quot;?client_id=&quot; + strClientID;
     
@@ -181,7 +221,7 @@ boolean CSyncEngine::resetClientIDByNet(const String&amp; strClientID)//throws Excep
 
 String CSyncEngine::requestClientIDByNet()
 {
-    String serverUrl = RHOCONF().getString(&quot;syncserver&quot;);
+    String serverUrl = RHOCONF().getPath(&quot;syncserver&quot;);
     String strUrl = serverUrl + &quot;clientcreate&quot;;
     String strQuery = SYNC_SOURCE_FORMAT();
 
@@ -213,21 +253,28 @@ int CSyncEngine::getStartSource()
 
 void CSyncEngine::syncAllSources()
 {
-    for( int i = getStartSource(); i &lt; (int)m_sources.size() &amp;&amp; getState() != esExit; i++ )
+    boolean bError = false;
+    for( int i = getStartSource(); i &lt; (int)m_sources.size() &amp;&amp; isContinueSync(); i++ )
     {
         CSyncSource&amp; src = *m_sources.elementAt(i);
         if ( isSessionExist() &amp;&amp; getState() != esStop )
             src.sync();
 
-        fireNotification(&amp;src, true, src.m_nErrCode, &quot;&quot;);
+        getNotify().onSyncSourceEnd(i, m_sources);
+        bError = src.m_nErrCode != RhoRuby.ERR_NONE;
     }
+
+    if ( !bError)
+    	getNotify().fireSyncNotification(null, true, RhoRuby.ERR_NONE, &quot;Sync completed.&quot;);
 }
 
 void CSyncEngine::callLoginCallback(String callback, int nErrCode, String strMessage)
 {
 	//try{
     String strBody = &quot;error_code=&quot; + convertToStringA(nErrCode);
-    strBody += &quot;&amp;error_message=&quot; + strMessage;  //TODO: URI.urlEncode
+    strBody += &quot;&amp;error_message=&quot;;
+    URI::urlEncode(strMessage, strBody);
+
     String strUrl = getNet().resolveUrl(callback);
     
 	LOG(INFO) + &quot;Login callback: &quot; + callback + &quot;. Body: &quot;+ strBody;
@@ -272,7 +319,7 @@ void CSyncEngine::login(String name, String password, String callback)
     	return;
 	}
 
-    String serverUrl = RHOCONF().getString(&quot;syncserver&quot;);
+    String serverUrl = RHOCONF().getPath(&quot;syncserver&quot;);
     String strBody = &quot;login=&quot; + name + &quot;&amp;password=&quot; + password + &quot;&amp;remember_me=1&quot;;
 
     NetResponse( resp, getNet().pullCookies( serverUrl+&quot;client_login&quot;, strBody ) );
@@ -283,6 +330,12 @@ void CSyncEngine::login(String name, String password, String callback)
         return;
     }
 
+    if ( resp.isUnathorized() )
+    {
+        callLoginCallback(callback, RhoRuby.ERR_UNATHORIZED, resp.getCharData());
+    	return;
+    }
+
     if ( !resp.isOK() )
     {
         callLoginCallback(callback, RhoRuby.ERR_REMOTESERVER, resp.getCharData());
@@ -351,123 +404,6 @@ void CSyncEngine::logout()
     }
 
 }
-
-void CSyncEngine::setNotification(int source_id, String strUrl, String strParams )
-{
-	LOG(INFO) + &quot;Set notification. Source ID: &quot; + source_id + &quot;; Url :&quot; + strUrl + &quot;; Params: &quot; + strParams;
-    String strFullUrl = getNet().resolveUrl(strUrl);
-
-	if ( source_id == -1 )
-	{
-		CMutexLock lockNotify(m_mxNotifications);
-		m_mapNotifications.clear();
-		
-		if ( strFullUrl.length() &gt; 0 )
-		{
-			loadAllSources();
-			
-		    for( int i = 0; i &lt; (int)m_sources.size(); i++ )
-		    {
-		    	CSyncSource&amp; src = *m_sources.elementAt(i); 
-		    	m_mapNotifications.put( src.getID(),new CSyncNotification( strFullUrl, strParams ) );
-    	    }
-		}
-		LOG(INFO) + &quot; Done Set notification for all sources; Url :&quot; + strFullUrl + &quot;; Params: &quot; + strParams;
-	}else
-	{
-        clearNotification(source_id);
-        if ( strFullUrl.length() &gt; 0 )
-        {
-            CMutexLock lockNotify(m_mxNotifications);
-            m_mapNotifications.put(source_id,new CSyncNotification( strFullUrl, strParams ) );
-
-		    LOG(INFO) + &quot; Done Set notification. Source ID: &quot; + source_id + &quot;; Url :&quot; + strFullUrl + &quot;; Params: &quot; + strParams;
-        }
-    }
-}
-
-void CSyncEngine::reportStatus(String status, int error, String strDetails) {
-    //TODO: reportStatus
-	/*if (m_statusListener != null) {
-		if ( strDetails.length() == 0 )
-			strDetails = RhoRuby.getErrorText(error);
-        status += (strDetails.length() &gt; 0 ? &quot; Details: &quot; + strDetails: &quot;&quot;);
-		m_statusListener.reportStatus( status, error);
-	}*/
-	LOG(INFO) + &quot;Status: &quot;+status;
-}
-
-void CSyncEngine::fireNotification( CSyncSource* psrc, boolean bFinish, int nErrCode, String strMessage)
-{
-	if ( getState() == esExit )
-		return;
-	
-	if( strMessage.length() &gt; 0 || nErrCode != RhoRuby.ERR_NONE)
-	{
-		if ( !( psrc != null &amp;&amp; psrc-&gt;m_strParams.length()&gt;0) )
-        {
-			if ( psrc != null &amp;&amp; strMessage.length() == 0 )
-				strMessage = &quot;Sync failed for &quot; + psrc-&gt;getName() + &quot;.&quot;;
-			
-            reportStatus(strMessage,nErrCode,psrc?psrc-&gt;m_strError:&quot;&quot;);
-        }
-	}
-	
-	if ( psrc == null )
-		return; //TODO: implement all sources callback
-
-    CSyncSource&amp; src = *psrc;
-    String strBody, strUrl;
-    {
-        CMutexLock lockNotify(m_mxNotifications);
-
-        CSyncNotification* pSN = m_mapNotifications.get(src.getID());
-        if ( pSN == 0 )
-            return;
-        CSyncNotification&amp; sn = *pSN;
-
-        strUrl = sn.m_strUrl;
-		strBody = &quot;&quot;;
-        strBody = &quot;total_count=&quot; + convertToStringA(src.getTotalCount());
-        strBody += &quot;&amp;processed_count=&quot; + convertToStringA(src.getCurPageCount());
-        
-        strBody += &quot;&amp;status=&quot;;
-
-        if ( bFinish )
-        {
-            if ( nErrCode == RhoRuby.ERR_NONE )
-	        	strBody += &quot;ok&quot;;
-	        else
-	        {
-	        	strBody += &quot;error&quot;;				        	
-			    strBody += &quot;&amp;error_code=&quot; + convertToStringA(nErrCode);
-		        strBody += &quot;&amp;error_message=&quot; + src.m_strError; //TODO: URI.urlEncode
-		        	//URI.urlEncode(strErrMessage != null? strErrMessage : &quot;&quot;);
-	        }
-        }
-        else
-        	strBody += &quot;in_progress&quot;;
-
-        if ( sn.m_strParams.length() &gt; 0 )
-            strBody += &quot;&amp;&quot; + sn.m_strParams;
-    }
-	LOG(INFO) + &quot;Fire notification. Source ID: &quot; + src.getID() + &quot;; Url :&quot; + strUrl + &quot;; Body: &quot; + strBody;
-	
-    NetResponse(resp,getNet().pushData( strUrl, strBody ));
-    if ( !resp.isOK() )
-        LOG(ERROR) + &quot;Fire notification failed. Code: &quot; + resp.getRespCode() + &quot;; Error body: &quot; + resp.getCharData();
-
-    if ( bFinish )
-        clearNotification(src.getID());
-}
-
-void CSyncEngine::clearNotification(int source_id) 
-{
-	LOG(INFO) + &quot;Clear notification. Source ID: &quot; + source_id;
-	
-    CMutexLock lockNotify(m_mxNotifications);
-    m_mapNotifications.remove(source_id);
-}
 	
 void CSyncEngine::setSyncServer(char* syncserver)
 {</diff>
      <filename>platform/shared/sync/SyncEngine.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,7 @@
 #include &quot;net/INetRequest.h&quot;
 
 #include &quot;SyncSource.h&quot;
+#include &quot;SyncNotify.h&quot;
 #include &quot;db/DBAdapter.h&quot;
 #include &quot;logging/RhoLog.h&quot;
 
@@ -20,6 +21,8 @@ static const int ERR_DIFFDOMAINSINSYNCSRC = 5;
 static const int ERR_NOSERVERRESPONSE = 6;
 static const int ERR_CLIENTISNOTLOGGEDIN = 7;
 static const int ERR_CUSTOMSYNCSERVER = 8;
+static const int ERR_UNATHORIZED = 9;
+static const int ERR_CANCELBYUSER = 10;
 };
 extern const _CRhoRuby&amp; RhoRuby;
 
@@ -28,23 +31,14 @@ namespace sync {
 class CSyncEngine
 {
     DEFINE_LOGCLASS;
-    struct CSyncNotification
-    {
-        String m_strUrl, m_strParams;
-        CSyncNotification(String strUrl, String strParams) : m_strUrl(strUrl), m_strParams(strParams){}
-    };
-
 public:
     enum ESyncState{ esNone, esSyncAllSources, esSyncSource, esStop, esExit };
 
     static String SYNC_SOURCE_FORMAT() { return &quot;?format=json&quot;; }
+    static int SYNC_VERSION() { return 2; }
+
     static String SYNC_ASK_ACTION() { return &quot;/ask&quot;; }
 //    static int MAX_SYNC_TRY_COUNT() { return 2; }
-#ifdef OS_SYMBIAN
-    static String SYNC_PAGE_SIZE() { return &quot;200&quot;; }
-#else
-    static String SYNC_PAGE_SIZE() { return &quot;1000&quot;; }
-#endif
 
 private:
     VectorPtr&lt;CSyncSource*&gt; m_sources;
@@ -52,13 +46,14 @@ private:
     common::CAutoPtr&lt;net::INetRequest&gt; m_NetRequest;
     ESyncState m_syncState;
     String     m_clientID;
-    HashtablePtr&lt;int,CSyncNotification*&gt; m_mapNotifications;
-    common::CMutex m_mxNotifications;
     common::CMutex m_mxLoadClientID;
     String m_strSession;
+    CSyncNotify m_oSyncNotify;
+    boolean m_bStopByUser;
+    int m_nSyncPageSize;
 
 public:
-    CSyncEngine(db::CDBAdapter&amp; db): m_dbAdapter(db), m_NetRequest(0), m_syncState(esNone){}
+    CSyncEngine(db::CDBAdapter&amp; db);
     ~CSyncEngine(void){}
 
     void setFactory(common::IRhoClassFactory* factory){ 
@@ -66,13 +61,11 @@ public:
     }
 
     void doSyncAllSources();
-    void doSyncSource(int nSrcId, String strSrcUrl, String strParams, String strAction);
+    void doSyncSource(int nSrcId, String strSrcUrl, String strParams, String strAction, boolean bSearchSyncChanges, int nProgressStep);
     void login(String name, String password, String callback);
     boolean isLoggedIn();
     String loadSession();
     void logout();
-    void setNotification(int source_id, String strUrl, String strParams );
-    void clearNotification(int source_id);
 	void setSyncServer(char* syncserver);
 
     void setState(ESyncState eState){ m_syncState = eState; }
@@ -80,7 +73,9 @@ public:
     boolean isContinueSync()const{ return m_syncState != esExit &amp;&amp; m_syncState != esStop; }
 	boolean isSyncing()const{ return m_syncState == esSyncAllSources || m_syncState == esSyncSource; }
     void stopSync(){ if (isContinueSync()){ setState(esStop); m_NetRequest-&gt;cancel();} }
+    void stopSyncByUser(){ m_bStopByUser = true; stopSync(); }
     void exitSync(){ setState(esExit); m_NetRequest-&gt;cancel(); }
+    boolean isStoppedByUser(){ return m_bStopByUser; }
 //private:
     String getClientID()const{ return m_clientID; }
     void setSession(String strSession){m_strSession=strSession;}
@@ -97,19 +92,22 @@ public:
     String requestClientIDByNet();
     boolean resetClientIDByNet(const String&amp; strClientID);//throws Exception
 
-    void fireNotification( CSyncSource* psrc, boolean bFinish, int nErrCode, String strMessage );
-
     db::CDBAdapter&amp; getDB(){ return m_dbAdapter; }
-
-private:
+    CSyncNotify&amp; getNotify(){ return m_oSyncNotify; }
     net::INetRequest&amp; getNet(){ return *m_NetRequest; }
 
+    CSyncSource* findSourceByName(const String&amp; strSrcName);
+
+    String SYNC_PAGE_SIZE();
+    int getSyncPageSize() { return m_nSyncPageSize; }
+    void setSyncPageSize(int nPageSize){ m_nSyncPageSize = nPageSize; }
+private:
+ 
     CSyncSource* findSourceByID(int nSrcId);
     CSyncSource* findSourceByUrl(const String&amp; strSrcUrl);
 
     void callLoginCallback(String callback, int nErrCode, String strMessage);
     boolean checkAllSourcesFromOneDomain();
-    void reportStatus(String status, int error, String strDetails);
     friend class CSyncSource;
 };
 </diff>
      <filename>platform/shared/sync/SyncEngine.h</filename>
    </modified>
    <modified>
      <diff>@@ -27,8 +27,11 @@ CSyncSource::CSyncSource() : m_syncEngine( *new CSyncEngine(*new db::CDBAdapter(
     m_nDeleted = 0;
     m_nTotalCount = 0;
     m_bGetAtLeastOnePage = false;
+    m_eSyncServerDataPass = edpNone;
 
     m_nErrCode = RhoRuby.ERR_NONE;
+    m_bSearchSyncChanges = false;
+    m_nProgressStep = -1;
 }
 
 CSyncSource::CSyncSource(CSyncEngine&amp; syncEngine ) : m_syncEngine(syncEngine)
@@ -40,8 +43,11 @@ CSyncSource::CSyncSource(CSyncEngine&amp; syncEngine ) : m_syncEngine(syncEngine)
     m_nDeleted = 0;
     m_nTotalCount = 0;
     m_bGetAtLeastOnePage = false;
+    m_eSyncServerDataPass = edpNone;
 
     m_nErrCode = RhoRuby.ERR_NONE;
+    m_bSearchSyncChanges = false;
+    m_nProgressStep = -1;
 }
 
 CSyncSource::CSyncSource(int id, const String&amp; strUrl, const String&amp; strName, uint64 token, CSyncEngine&amp; syncEngine ) : m_syncEngine(syncEngine)
@@ -57,25 +63,55 @@ CSyncSource::CSyncSource(int id, const String&amp; strUrl, const String&amp; strName, ui
     m_nDeleted = 0;
     m_nTotalCount = 0;
     m_bGetAtLeastOnePage = false;
+    m_eSyncServerDataPass = edpNone;
 
     m_nErrCode = RhoRuby.ERR_NONE;
+    m_bSearchSyncChanges = false;
+    m_nProgressStep = -1;
 }
 
 CDBAdapter&amp; CSyncSource::getDB(){ return getSync().getDB(); }
 INetRequest&amp; CSyncSource::getNet(){ return getSync().getNet(); }
+CSyncNotify&amp; CSyncSource::getNotify(){ return getSync().getNotify(); }
 
 void CSyncSource::sync()
 {
-    m_syncEngine.fireNotification(this, false, RhoRuby.ERR_NONE, &quot;Synchronizing &quot; + getName() + &quot;...&quot;);
+    getNotify().fireSyncNotification(this, false, RhoRuby.ERR_NONE, &quot;Synchronizing &quot; + getName() + &quot;...&quot;);
 
     CTimeInterval startTime = CTimeInterval::getCurrentTime();
-	
-    if ( m_strParams.length() == 0 )
+
+    if ( isEmptyToken() )
+        processToken(1);
+
+    boolean bSyncedServer = false;
+    if ( m_strParams.length() == 0 || m_bSearchSyncChanges )
     {
-        syncClientChanges();
-        getAndremoveAsk();
+        if ( isPendingClientChanges() )
+        {
+            syncServerChanges();
+            bSyncedServer = true;
+        }
+
+        if ( bSyncedServer &amp;&amp; isPendingClientChanges() )
+            getSync().setState(CSyncEngine::esStop);
+        else
+        {   
+            boolean bSyncClient = false;
+            {
+                DBResult( res, getDB().executeSQL(&quot;SELECT object FROM changed_values WHERE source_id=? LIMIT 1 OFFSET 0&quot;, getID()) );
+                bSyncClient = !res.isEnd();
+            }
+            if ( bSyncClient )
+            {
+                syncClientChanges();
+                getAndremoveAsk();
+                bSyncedServer = false;
+            }
+        }
     }
-    syncServerChanges();
+
+    if ( !bSyncedServer )
+        syncServerChanges();
 
     CTimeInterval endTime = CTimeInterval::getCurrentTime();
     getDB().executeSQL(&quot;UPDATE sources set last_updated=?,last_inserted_size=?,last_deleted_size=?, \
@@ -83,6 +119,12 @@ void CSyncSource::sync()
                          endTime.toULong(), getInsertedCount(), getDeletedCount(), (endTime-startTime).toULong(), m_bGetAtLeastOnePage, getID() );
 }
 
+boolean CSyncSource::isPendingClientChanges()
+{
+    DBResult( res, getDB().executeSQL(&quot;SELECT object FROM changed_values WHERE source_id=? and update_type='create' and sent&gt;1  LIMIT 1 OFFSET 0&quot;, getID()) );
+    return !res.isEnd();
+}
+
 void CSyncSource::syncClientBlobs(const String&amp; strBaseQuery)
 {
     String strQuery;
@@ -90,10 +132,6 @@ void CSyncSource::syncClientBlobs(const String&amp; strBaseQuery)
     {
         CSyncBlob&amp; blob = *m_arSyncBlobs.elementAt(i);
 
-        //CRhoFile oFile;
-        //if ( !oFile.open(blob.getFilePath().c_str(),CRhoFile::OpenReadOnly) ) 
-        //    continue;
-
         String strFilePath = RhoGetRootPath();
         strFilePath += &quot;apps&quot; + blob.getFilePath() ;
 
@@ -102,8 +140,10 @@ void CSyncSource::syncClientBlobs(const String&amp; strBaseQuery)
         if ( !resp.isOK() )
         {
             getSync().setState(CSyncEngine::esStop);
-            m_nErrCode = RhoRuby.ERR_REMOTESERVER;
-            //m_strError = resp.getCharData();
+			if (resp.isResponseRecieved())
+				m_nErrCode = RhoRuby.ERR_REMOTESERVER;
+			else
+				m_nErrCode = RhoRuby.ERR_NETWORK;
             return;
         }
 
@@ -115,70 +155,53 @@ void CSyncSource::syncClientBlobs(const String&amp; strBaseQuery)
 
 void CSyncSource::syncClientChanges()
 {
-	LOG(INFO) + &quot;Sync client changes source ID :&quot; + getID();
-
-    DBResult( res , getDB().executeSQL(&quot;SELECT attrib, object, value, attrib_type, update_type &quot;
-					 &quot;FROM object_values where source_id=? and (update_type = 'update' or update_type = 'create' or update_type = 'delete') order by update_type&quot;, getID() ) );
-
-    String strUpdateType = &quot;&quot;;
-	m_arSyncBlobs.removeAllElements();
-	m_strPushBody = &quot;&quot;;
-	
-    for( ; !res.isEnd()&amp;&amp; getSync().isContinueSync(); res.next() )
+    const char* arUpdateTypes[] = {&quot;create&quot;, &quot;update&quot;, &quot;delete&quot;};
+    for( int i = 0; i &lt; 3 &amp;&amp; getSync().isContinueSync(); i++ )
     {
-    	String strTemp  = res.getStringByIdx(4);
-    	if ( strUpdateType != strTemp )
-    	{
-    		if ( strUpdateType.length() &gt; 0 )
-    		{
-    			if ( !sendClientChanges(strUpdateType) )
-    			{
-                    getSync().setState(CSyncEngine::esStop);
-                	continue;
-    			}	
-    		}
-    		
-    		m_strPushBody = &quot;&quot;;
-    		strUpdateType = strTemp;
-    	}
-    	
-    	makePushBody1( res );
-    }
-    
-    if ( getSync().isContinueSync() &amp;&amp; strUpdateType.length() &gt; 0 )
-    	sendClientChanges(strUpdateType);
-}
+        String strUrl = getUrl() + &quot;/&quot; + arUpdateTypes[i];
+        strUrl += &quot;objects&quot;;
+        String strQuery = CSyncEngine::SYNC_SOURCE_FORMAT() + &quot;&amp;client_id=&quot; + getSync().getClientID();
 
-boolean CSyncSource::sendClientChanges(String strUpdateType)//throws Exception
-{
-    String strUrl = getUrl() + &quot;/&quot; + strUpdateType;
-    strUrl += &quot;objects&quot;;
-    String strQuery = CSyncEngine::SYNC_SOURCE_FORMAT() + &quot;&amp;client_id=&quot; + getSync().getClientID();
-
-    if ( m_strPushBody.length() &gt; 0 )
-    {
-	    LOG(INFO)+&quot;Push client changes to server. Source id: &quot; + getID() + &quot;Size :&quot; + m_strPushBody.length();
-	    LOG(TRACE) + &quot;Push body: &quot; + m_strPushBody;
+        m_arSyncBlobs.removeAllElements();
+        String strBody;
+        makePushBody(strBody, arUpdateTypes[i]);
+        if ( strBody.length() &gt; 0 )
+        {
+		    LOG(INFO) + &quot;Push client changes to server. Source id: &quot; + getID() + &quot;Size :&quot; + strBody.length();
+		    LOG(TRACE) + &quot;Push body: &quot; + strBody;		
+ 
+            NetResponse( resp, getNet().pushData(strUrl+strQuery,strBody) );
+            if ( !resp.isOK() )
+            {
+                getSync().setState(CSyncEngine::esStop);
+                m_nErrCode = RhoRuby.ERR_REMOTESERVER;
+                continue;
+            }
+        }
+ 
+        if ( m_arSyncBlobs.size() &gt; 0 )
+        {
+		    LOG(INFO) + &quot;Push blobs to server. Source id: &quot; + getID() + &quot;Count :&quot; + m_arSyncBlobs.size();
+            //oo conflicts
+            if ( i &lt; 1 ) //create
+                getDB().executeSQL(&quot;UPDATE changed_values SET sent=2 WHERE source_id=? and update_type=? and (attrib_type IS NULL or attrib_type!=?) and sent=1&quot;, 
+                    getID(), arUpdateTypes[i], &quot;blob.file&quot; );
+            else
+            //
+                getDB().executeSQL(&quot;DELETE FROM changed_values WHERE source_id=? and update_type=? and (attrib_type IS NULL or attrib_type!=? and sent=1)&quot;, 
+                    getID(), arUpdateTypes[i], &quot;blob.file&quot; );
 
-        NetResponse( resp, getNet().pushData(strUrl+strQuery,m_strPushBody) );
-        if ( !resp.isOK() )
+            syncClientBlobs(strUrl+strQuery);
+        }else if ( strBody.length() &gt; 0 )
         {
-            m_nErrCode = RhoRuby.ERR_REMOTESERVER;
-            //m_strError = resp.getCharData();
-            return false;
+            //oo conflicts
+            if ( i &lt; 1 ) //create
+                getDB().executeSQL(&quot;UPDATE changed_values SET sent=2 WHERE source_id=? and update_type=? and sent=1&quot;, getID(), arUpdateTypes[i] );
+            else
+            //
+                getDB().executeSQL(&quot;DELETE FROM changed_values WHERE source_id=? and update_type=? and sent=1&quot;, getID(), arUpdateTypes[i] );
         }
     }
-
-    if ( m_arSyncBlobs.size() &gt; 0  )
-    {
-	    LOG(INFO) + &quot;Push blobs to server. Source id: &quot; + getID() + &quot;Count :&quot; + m_arSyncBlobs.size();
-
-        getDB().executeSQL(&quot;DELETE FROM object_values WHERE source_id=? and update_type=? and (attrib_type IS NULL or attrib_type!=?)&quot;, getID(), strUpdateType, &quot;blob.file&quot; );
-        syncClientBlobs(strUrl+strQuery);
-    }else if ( m_strPushBody.length() &gt; 0 )
-        getDB().executeSQL(&quot;DELETE FROM object_values WHERE source_id=? and update_type=?&quot;, getID(), strUpdateType );
-    
-    return true;
 }
 
 /*
@@ -189,42 +212,18 @@ boolean CSyncSource::sendClientChanges(String strUpdateType)//throws Exception
  * update: attrvals[][attrib]=&lt;name|industry&gt;&amp;attrvals[][object]=&lt;remoteid&gt;&amp;attrvals[][value]=&lt;some new value&gt;
  * delete: attrvals[][attrib]=&lt;name|industry&gt;&amp;attrvals[][object]=&lt;remoteid&gt;
  */
-void CSyncSource::makePushBody1( rho::db::CDBResult&amp; res )//throws DBException
+void CSyncSource::makePushBody(String&amp; strBody, const char* szUpdateType)
 {
-    String strSrcBody = &quot;attrvals[][attrib]=&quot; + res.getStringByIdx(0);
+    getDB().Lock();
+    DBResult( res , getDB().executeSQL(&quot;SELECT attrib, object, value, attrib_type, main_id &quot;
+					 &quot;FROM changed_values where source_id=? and update_type =? and sent&lt;=1 ORDER BY sent DESC&quot;, getID(), szUpdateType ) );
 
-    if ( res.getStringByIdx(1).length() &gt; 0 ) 
-        strSrcBody += &quot;&amp;attrvals[][object]=&quot; + res.getStringByIdx(1);
-
-    String value = res.getStringByIdx(2);
-    String attribType = res.getStringByIdx(3);
-
-    if ( value.length() &gt; 0 )
+    if ( res.isEnd() )
     {
-        if ( attribType == &quot;blob.file&quot; )
-        {
-            common::CFilePath oBlobPath(value);
-            strSrcBody += &quot;&amp;attrvals[][value]=&quot;;
-            strSrcBody += oBlobPath.getBaseName();
-            strSrcBody += &quot;&amp;attrvals[][attrib_type]=blob&quot;;
-
-            m_arSyncBlobs.addElement(new CSyncBlob(strSrcBody,value));
-            return;
-        }else
-            strSrcBody += &quot;&amp;attrvals[][value]=&quot; + value;
+        getDB().Unlock();
+        return;
     }
 
-    if ( m_strPushBody.length() &gt; 0 )
-	    m_strPushBody += &quot;&amp;&quot;;
-
-    m_strPushBody += strSrcBody;
-}
-
-void CSyncSource::makePushBody(String&amp; strBody, const char* szUpdateType)
-{
-    //boolean bFirst = true;
-    DBResult( res , getDB().executeSQL(&quot;SELECT attrib, object, value, attrib_type &quot;
-					 &quot;FROM object_values where source_id=? and update_type =?&quot;, getID(), szUpdateType ) );
     for( ; !res.isEnd(); res.next() )
     {
         String strSrcBody = &quot;attrvals[][attrib]=&quot; + res.getStringByIdx(0);
@@ -232,17 +231,14 @@ void CSyncSource::makePushBody(String&amp; strBody, const char* szUpdateType)
         if ( res.getStringByIdx(1).length() &gt; 0 ) 
             strSrcBody += &quot;&amp;attrvals[][object]=&quot; + res.getStringByIdx(1);
 
+        uint64 main_id = res.getUInt64ByIdx(4);
+        if ( main_id != 0 )
+            strSrcBody += &quot;&amp;attrvals[][id]=&quot; + convertToStringA(main_id);
+
         String value = res.getStringByIdx(2);
         String attribType = res.getStringByIdx(3);
 
-        /*if ( bFirst )
-        {
-            value = &quot;d:\\work\\blobtest.png&quot;;
-            attribType = &quot;blob.file&quot;;
-            bFirst = false;
-        }*/
-
-        if ( value.length() &gt; 0 )
+        //if ( value.length() &gt; 0 )
         {
             if ( attribType == &quot;blob.file&quot; )
             {
@@ -250,11 +246,9 @@ void CSyncSource::makePushBody(String&amp; strBody, const char* szUpdateType)
                 strSrcBody += &quot;&amp;attrvals[][value]=&quot;;
                 strSrcBody += oBlobPath.getBaseName();
                 strSrcBody += &quot;&amp;attrvals[][attrib_type]=blob&quot;;
-//#ifdef __APPLE__
-//				value = String(RhoGetRootPath()) + &quot;apps&quot; + value;
-//#endif
-				
-                m_arSyncBlobs.addElement(new CSyncBlob(strSrcBody,value));
+
+				if ( value.length() &gt; 0 )
+                    m_arSyncBlobs.addElement(new CSyncBlob(strSrcBody,value));
                 continue;
             }else
                 strSrcBody += &quot;&amp;attrvals[][value]=&quot; + value;
@@ -265,18 +259,27 @@ void CSyncSource::makePushBody(String&amp; strBody, const char* szUpdateType)
 
         strBody += strSrcBody;
     }
+
+    getDB().executeSQL(&quot;UPDATE changed_values SET sent=1 WHERE source_id=? and update_type=? and sent=0&quot;, getID(), szUpdateType );
+    getDB().Unlock();
 }
 
 void CSyncSource::getAndremoveAsk()
 {
     String askParams = &quot;&quot;;
     {
-        DBResult( res , getDB().executeSQL(&quot;SELECT value from object_values where source_id=? and update_type=?&quot;, 
-            getID(), &quot;ask&quot; ) );
-        askParams = res.isEnd() ? &quot;&quot; : res.getStringByIdx(0);
+        DBResult( res , getDB().executeSQL(&quot;SELECT object, attrib, value &quot;
+			     &quot;FROM changed_values WHERE source_id=? and update_type =?&quot;, getID(), &quot;ask&quot; ) );
+        if ( !res.isEnd() )
+        {
+            askParams = res.getStringByIdx(2);
+
+            getDB().executeSQL(&quot;DELETE FROM object_values WHERE object=? and attrib=? and source_id=?&quot;, 
+                res.getStringByIdx(0), res.getStringByIdx(1), getID() );
+        }
     }
 
-    getDB().executeSQL(&quot;DELETE FROM object_values WHERE source_id=? and update_type=?&quot;, getID(), &quot;ask&quot; );
+    getDB().executeSQL(&quot;DELETE FROM changed_values WHERE source_id=? and update_type=?&quot;, getID(), &quot;ask&quot; );
 
     setAskParams(askParams);
 }
@@ -293,7 +296,7 @@ void CSyncSource::syncServerChanges()
             strUrl += '/' + m_strAction;
 
         String strQuery = getSync().SYNC_SOURCE_FORMAT() + &quot;&amp;client_id=&quot; + getSync().getClientID() + 
-                &quot;&amp;p_size=&quot; + getSync().SYNC_PAGE_SIZE();
+                &quot;&amp;p_size=&quot; + getSync().SYNC_PAGE_SIZE() + &quot;&amp;version=&quot; + convertToStringA(getSync().SYNC_VERSION());
         if ( m_strParams.length() &gt; 0 )
             strQuery += m_strParams;
 
@@ -303,9 +306,7 @@ void CSyncSource::syncServerChanges()
             strQuery += &quot;&amp;question=&quot; + getAskParams();
         }
 
-        if ( isEmptyToken() )
-            processToken(1);
-        else if ( !m_bTokenFromDB &amp;&amp; getToken() &gt; 1 )
+        if ( !m_bTokenFromDB &amp;&amp; getToken() &gt; 1 )
             strQuery += &quot;&amp;ack_token=&quot; + convertToStringA(getToken());
 
 		LOG(INFO) + &quot;Pull changes from server. Url: &quot; + (strUrl+strQuery);
@@ -314,20 +315,36 @@ void CSyncSource::syncServerChanges()
         if ( !resp.isOK() )
         {
             getSync().stopSync();
-            m_nErrCode = RhoRuby.ERR_REMOTESERVER;
-            //m_strError = resp.getCharData();
-
+			if (resp.isResponseRecieved())
+				m_nErrCode = RhoRuby.ERR_REMOTESERVER;
+			else
+				m_nErrCode = RhoRuby.ERR_NETWORK;
             continue;
         }
 
         processServerData(resp.getCharData());
-/*		String strData =
-		&quot;[{count: 124},{total_count: 5425},{token: 123},{version: 1},&quot;
-		&quot;{o:\&quot;2ed2e0c7-8c4c-99c6-1b37-498d250bb8e7\&quot;,av:[&quot;
-		&quot;{i:26478681,d:1},&quot;
-		&quot;{a:\&quot;first_name\&quot;,i:47354289,v:\&quot;Lars\&quot;,t:\&quot;blob\&quot;,u:\&quot;query\&quot;,d:0}]}]&quot;;
-		//u:\&quot;query\&quot;,
-		processServerData(strData.c_str());*/
+
+		//String strData =
+        //&quot;[{count:10},{version:1},{total_count: 5425},{token: 123},{s:\&quot;RhoDeleteSource\&quot;,ol:[{o:\&quot;rho_del_obj\&quot;,av:[{i:55550425},{i:75665819},{i:338165272},{i:402396629},{i:521753981},{i:664143530},{i:678116186},{i:831092394},{i:956041217},{i:970452458}]}]}]&quot;;
+		/*&quot;[{count: 124},{version: 1},{total_count: 5425},{token: 123},&quot;
+        &quot;{s:\&quot;Product\&quot;,ol:[&quot;
+		&quot;{oo:\&quot;123\&quot;,o:\&quot;2ed2e0c7-8c4c-99c6-1b37-498d250bb8e7\&quot;,av:[&quot;
+		&quot;{a:\&quot;first_name\&quot;,i:47354289,v:\&quot;Lars. \n\n Burgess\&quot;, t:\&quot;blob\&quot;},&quot;
+        &quot;{a:\&quot;second_name\&quot;,i:55555,v:\&quot;Burgess\&quot;}]},&quot;
+        &quot;{oo:\&quot;456\&quot;, e:\&quot;Something went wrong creating this record on the backend: code 7\&quot;}&quot;
+        &quot;]}]&quot;; */
+		/*&quot;[{count: 1},{version: 1},{total_count: 1},{token: 123},&quot;
+        &quot;{s:\&quot;Product\&quot;,ol:[&quot;
+        &quot;{oo:\&quot;94\&quot;, e:\&quot;Something went wrong creating this record on the backend: code 7\&quot;}&quot;
+        &quot;]}]&quot;;*/
+		/*&quot;[{count: 1},{version: 1},{total_count: 1},{token: 123},&quot;
+        &quot;{s:\&quot;Product\&quot;,ol:[&quot;
+        &quot;{o:\&quot;94\&quot;, av:[&quot;
+        &quot;{a:\&quot;TEST\&quot;,i:55555,v:\&quot;Geny\&quot;}]},&quot;
+        &quot;]}]&quot;;
+
+		//u:\&quot;query\&quot;,  
+		processServerData(strData.c_str()); */
 
         if ( getAskParams().length() &gt; 0 || getCurPageCount() == 0 )
             break;
@@ -341,7 +358,6 @@ void CSyncSource::processServerData(const char* szData)
     {
         m_strError = oJsonArr.getCurItem().getString(&quot;error&quot;);
         m_nErrCode = RhoRuby.ERR_CUSTOMSYNCSERVER;
-        processToken(0);
         getSync().stopSync();
         return;
     }
@@ -351,63 +367,202 @@ void CSyncSource::processServerData(const char* szData)
         setCurPageCount(oJsonArr.getCurItem().getInt(&quot;count&quot;));
         oJsonArr.next();
     }
+    int nVersion = 0;
+    if ( !oJsonArr.isEnd() &amp;&amp; oJsonArr.getCurItem().hasName(&quot;version&quot;) )
+    {
+        nVersion = oJsonArr.getCurItem().getInt(&quot;version&quot;);
+        oJsonArr.next();
+    }
+
     if ( !oJsonArr.isEnd() &amp;&amp; oJsonArr.getCurItem().hasName(&quot;total_count&quot;) )
     {
         setTotalCount(oJsonArr.getCurItem().getInt(&quot;total_count&quot;));
         oJsonArr.next();
     }
     if ( getServerObjectsCount() == 0 )
-        m_syncEngine.fireNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
+        getNotify().fireSyncNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
 
     if ( !oJsonArr.isEnd() )
     {
         processToken(oJsonArr.getCurItem().getUInt64(&quot;token&quot;));
         oJsonArr.next();
     }else if ( getCurPageCount() == 0 )
-        processToken(0);
-
-    int nVersion = 0;
-    if ( !oJsonArr.isEnd() &amp;&amp; oJsonArr.getCurItem().hasName(&quot;version&quot;) )
     {
-        nVersion = oJsonArr.getCurItem().getInt(&quot;version&quot;);
-        oJsonArr.next();
+        //oo conflicts
+        getDB().executeSQL(&quot;DELETE FROM changed_values where source_id=? and sent&gt;=3&quot;, getID() );
+        //
+        processToken(0);
     }
 
-	LOG(INFO) + &quot;Got &quot; + getCurPageCount() + &quot; records of &quot; + getTotalCount() + &quot; from server. Source ID: &quot; + getID()
+	LOG(INFO) + &quot;Got &quot; + getCurPageCount() + &quot;(Processed: &quot; +  getServerObjectsCount() + &quot;) records of &quot; + getTotalCount() + &quot; from server. Source ID: &quot; + getID()
          + &quot;. Version: &quot; + nVersion;
 	
     if ( !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync() )
     {
         //TODO: support DBExceptions
         getDB().startTransaction();
-        for( ; !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonArr.next() )
+
+        int nSavedPos = oJsonArr.getCurPos();
+        setSyncServerDataPass(edpNone);
+        processServerData_Ver1(oJsonArr);
+
+        setSyncServerDataPass(edpDeleteObjects);
+        oJsonArr.reset(nSavedPos);
+        processServerData_Ver1(oJsonArr);
+
+        getDB().endTransaction();
+
+        getNotify().fireObjectsNotification();
+    }
+
+    if ( getCurPageCount() &gt; 0 )
+        getNotify().fireSyncNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
+}
+
+boolean CSyncSource::processSyncObject_ver1(CJSONEntry oJsonObject, int nSrcID)//throws Exception
+{
+    const char* strOldObject = oJsonObject.getString(&quot;oo&quot;);
+    if ( isDeleteObjectsPass() != (nSrcID &lt; 0) )
+        return true;
+
+    if ( oJsonObject.hasName(&quot;e&quot;) )
+    {
+        const char* strError = oJsonObject.getString(&quot;e&quot;);
+        getNotify().addCreateObjectError(nSrcID,strOldObject,strError);
+        return true;
+    }
+
+	const char* strObject = oJsonObject.getString(&quot;o&quot;);
+	CJSONArrayIterator oJsonArr(oJsonObject, &quot;av&quot;);
+    //oo conflicts
+    boolean bUpdatedOO = false;
+    //
+    for( ; !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonArr.next() )
+	{
+		CJSONEntry oJsonEntry = oJsonArr.getCurItem();
+        if ( oJsonEntry.isEmpty() )
+        	continue;
+
+        if ( nSrcID &gt;= 0 ) //insert
+        {
+    	    CValue value(oJsonEntry,1);
+    	    if ( !downloadBlob(value) )
+    		    return false;
+
+            String strAttrib = oJsonEntry.getString(&quot;a&quot;);
+            //oo conflicts
+            if ( strOldObject != null )
+            {
+                if ( !bUpdatedOO )
+                {
+                    getDB().executeSQL(&quot;UPDATE object_values SET object=? where object=? and source_id=?&quot;, strObject, strOldObject, nSrcID );
+                    getDB().executeSQL(&quot;UPDATE changed_values SET object=? where object=? and source_id=?&quot;, strObject, strOldObject, nSrcID );
+
+                    getNotify().onObjectChanged(nSrcID,strOldObject, CSyncNotify::enCreate);
+
+                    bUpdatedOO = true;
+                }
+
+                getDB().executeSQL(&quot;UPDATE changed_values SET main_id=? where object=? and attrib=? and source_id=? and sent&lt;=1&quot;, value.m_nID, strObject, strAttrib, nSrcID );
+                getDB().executeSQL(&quot;UPDATE changed_values SET sent=4 where object=? and attrib=? and source_id=? and sent&gt;1&quot;, strObject, strAttrib, nSrcID );
+
+                getDB().executeSQL(&quot;UPDATE object_values SET id=? WHERE object=? and attrib=? and source_id=?&quot;, 
+                    value.m_nID, strObject, strAttrib, nSrcID );
+            }else//
+            {
+                DBResult(resInsert, getDB().executeSQLReportNonUnique(&quot;INSERT INTO object_values \
+                    (id, attrib, source_id, object, value, attrib_type) VALUES(?,?,?,?,?,?)&quot;, 
+                    value.m_nID, strAttrib, nSrcID, strObject,
+                    value.m_strValue, value.m_strAttrType ) );
+                if ( resInsert.isNonUnique() )
+                {
+                    getDB().executeSQL(&quot;UPDATE object_values \
+                        SET id=?, value=?, attrib_type=? WHERE object=? and attrib=? and source_id=?&quot;, 
+                        value.m_nID, value.m_strValue, value.m_strAttrType,
+                        strObject, strAttrib, nSrcID );
+
+                    // oo conflicts
+                    getDB().executeSQL(&quot;UPDATE changed_values SET sent=4 where object=? and attrib=? and source_id=? and sent&gt;1&quot;, strObject, strAttrib, nSrcID );
+                    getDB().executeSQL(&quot;UPDATE changed_values SET main_id=? where object=? and attrib=? and source_id=? and sent&lt;=1&quot;, value.m_nID, strObject, strAttrib, nSrcID );
+                    //
+                }
+
+                getNotify().onObjectChanged(nSrcID,strObject, CSyncNotify::enUpdate);
+            }
+
+            m_nInserted++;
+        }else
+        {
+            uint64 id = oJsonEntry.getUInt64(&quot;i&quot;);
+            DBResult( res , getDB().executeSQL(&quot;SELECT source_id, object FROM object_values where id=?&quot;, id ));
+            if ( !res.isEnd() )
+            {
+                int nDelSrcID = res.getIntByIdx(0);
+                String strDelObject = res.getStringByIdx(1);
+                getDB().executeSQL(&quot;DELETE FROM object_values where id=?&quot;, id );
+                getNotify().onObjectChanged(nDelSrcID, strDelObject, CSyncNotify::enDelete);
+            }
+            // oo conflicts
+            getDB().executeSQL(&quot;UPDATE changed_values SET sent=3 where main_id=?&quot;, id );
+            //
+
+            m_nDeleted++;
+        }
+	}
+	
+	return true;
+}
+
+void CSyncSource::processServerData_Ver1(CJSONArrayIterator&amp; oJsonArr)
+{
+    for( ; !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonArr.next() )
+    {
+        CJSONEntry oJsonSource = oJsonArr.getCurItem();
+        String strSrcName = oJsonSource.getString(&quot;s&quot;);
+        int nSrcID = getID();
+        if ( strSrcName.compare(&quot;RhoDeleteSource&quot;) == 0 )
+            nSrcID = -1;
+        else if ( strSrcName.compare(getName()) != 0 )
+        {
+            CSyncSource* pSrc = getSync().findSourceByName(strSrcName);
+            if ( pSrc == null )
+            {
+                LOG(ERROR) + &quot;Sync server send data for unknown source name:&quot; + strSrcName;
+                getSync().stopSync();
+                m_nErrCode = RhoRuby.ERR_UNEXPECTEDSERVERRESPONSE;
+                break;
+            }
+            nSrcID = pSrc-&gt;getID();
+        }
+
+        CJSONArrayIterator oJsonObjList(oJsonSource, &quot;ol&quot;);
+        for( ; !oJsonObjList.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonObjList.next() )
         {
             if ( getDB().isUnlockDB() )
             {
-			    LOG(INFO) + &quot;Commit transaction because of UI request.&quot;;
-                RhoRuby_RhomAttribManager_save(getID());
+		        LOG(INFO) + &quot;Commit transaction because of UI request.&quot;;
                 getDB().endTransaction();
                 getDB().startTransaction();
             }
 
-	        CJSONEntry oJsonObject = oJsonArr.getCurItem();
-	        boolean bRes = nVersion == 0 ? processSyncObject(oJsonObject) :
-	        	processSyncObject_ver1(oJsonObject);
-	        
-	        if( !bRes)
+            CJSONEntry oJsonObject = oJsonObjList.getCurItem();
+            if( !processSyncObject_ver1(oJsonObject,nSrcID))
             {
-	            getSync().stopSync();
-	            break;
+                getSync().stopSync();
+                break;
+            }
+
+            if ( !isDeleteObjectsPass() &amp;&amp; nSrcID &gt;=0 )
+            {
+                int nSyncObjectCount  = getNotify().incLastSyncObjectCount(nSrcID);
+
+                if ( getProgressStep() &gt; 0 &amp;&amp; (nSyncObjectCount%getProgressStep() == 0) )
+                    getNotify().fireSyncNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
             }
 
             m_bGetAtLeastOnePage = true;
         }
-        RhoRuby_RhomAttribManager_save(getID());
-        getDB().endTransaction();
     }
-
-    if ( getServerObjectsCount() &lt; getTotalCount() )
-        m_syncEngine.fireNotification(this, false, RhoRuby.ERR_NONE, &quot;&quot;);
 }
 
 CValue::CValue(json::CJSONEntry&amp; oJsonEntry)//throws JSONException
@@ -493,7 +648,10 @@ boolean CSyncSource::downloadBlob(CValue&amp; value)//throws Exception
     NetResponse(resp, getNet().pullFile(url, fName));
     if ( !resp.isOK() )
     {
-        m_nErrCode = RhoRuby.ERR_REMOTESERVER;
+		if (resp.isResponseRecieved())
+			m_nErrCode = RhoRuby.ERR_REMOTESERVER;
+		else
+			m_nErrCode = RhoRuby.ERR_NETWORK;
         //m_strError = resp.getCharData();
 
         return false;
@@ -508,97 +666,14 @@ boolean CSyncSource::downloadBlob(CValue&amp; value)//throws Exception
     return true;
 }
 
-boolean CSyncSource::processSyncObject_ver1(CJSONEntry oJsonObject)//throws Exception
-{
-	const char* strObject = oJsonObject.getString(&quot;o&quot;);
-	CJSONArrayIterator oJsonArr(oJsonObject, &quot;av&quot;);
-	
-    for( ; !oJsonArr.isEnd() &amp;&amp; getSync().isContinueSync(); oJsonArr.next() )
-	{
-		CJSONEntry oJsonEntry = oJsonArr.getCurItem();
-        if ( oJsonEntry.isEmpty() )
-        	continue;
-
-        int nDbOp = oJsonEntry.getInt(&quot;d&quot;);
-        if ( nDbOp == 0 ) //insert
-        {
-    	    CValue value(oJsonEntry,1);
-    	    if ( !downloadBlob(value) )
-    		    return false;
-
-            String strAttrib = oJsonEntry.getString(&quot;a&quot;);
-	    	String strUpdateType = &quot;query&quot;;
-	    	if( oJsonEntry.hasName(&quot;u&quot;) )
-	    		strUpdateType = oJsonEntry.getString(&quot;u&quot;);
-
-            getDB().executeSQL(&quot;INSERT INTO object_values \
-                (id, attrib, source_id, object, value, update_type,attrib_type) VALUES(?,?,?,?,?,?,?)&quot;, 
-                value.m_nID, strAttrib, getID(), strObject,
-                value.m_strValue,strUpdateType, value.m_strAttrType );
-
-            RhoRuby_RhomAttribManager_add_attrib(getID(),strAttrib.c_str());
-            m_nInserted++;
-        }else if ( nDbOp == 1 ) //delete
-        {
-            uint64 id = oJsonEntry.getUInt64(&quot;i&quot;);
-            getDB().executeSQL(&quot;DELETE FROM object_values where id=?&quot;, id );
-
-            RhoRuby_RhomAttribManager_delete_attribs(getID(),id);
-            m_nDeleted++;
-        }else{
-            LOG(ERROR) + &quot;Unknown DB operation: &quot; + nDbOp;
-        }
-	}
-	
-	return true;
-}
-
-boolean CSyncSource::processSyncObject(CJSONEntry&amp; oJsonObject)
-{
-	CJSONEntry oJsonEntry = oJsonObject.getEntry(&quot;object_value&quot;);
-    if ( oJsonEntry.isEmpty() )
-    	return true;
-
-    const char* szDbOp = oJsonEntry.getString(&quot;db_operation&quot;);
-    if ( szDbOp &amp;&amp; strcmp(szDbOp,&quot;insert&quot;)==0 )
-    {
-    	CValue value(oJsonEntry);
-    	//
-    	//value.m_strAttrType = &quot;blob.url&quot;;
-    	//value.m_strValue = &quot;http://img.gazeta.ru/files3/661/3219661/ld.jpg&quot;;
-    	//
-    	if ( !downloadBlob(value) )
-    		return false;
-
-        String strAttrib = oJsonEntry.getString(&quot;attrib&quot;);
-        getDB().executeSQL(&quot;INSERT INTO object_values \
-            (id, attrib, source_id, object, value, update_type,attrib_type) VALUES(?,?,?,?,?,?,?)&quot;, 
-            value.m_nID, strAttrib, getID(), oJsonEntry.getString(&quot;object&quot;),
-            value.m_strValue, oJsonEntry.getString(&quot;update_type&quot;), value.m_strAttrType );
-
-        RhoRuby_RhomAttribManager_add_attrib(getID(),strAttrib.c_str());
-        m_nInserted++;
-    }else if ( szDbOp &amp;&amp; strcmp(szDbOp,&quot;delete&quot;)==0 )
-    {
-        uint64 id = oJsonEntry.getUInt64(&quot;id&quot;);
-        getDB().executeSQL(&quot;DELETE FROM object_values where id=?&quot;, id );
-
-        RhoRuby_RhomAttribManager_delete_attribs(getID(),id);
-        m_nDeleted++;
-    }else{
-        LOG(ERROR) + &quot;Unknown DB operation: &quot; + (szDbOp ? szDbOp : &quot;&quot;);
-    }
-
-    return true;
-}
-
 void CSyncSource::processToken(uint64 token)
 {
     if ( token &gt; 1 &amp;&amp; getToken() == token ){
 		//Delete non-confirmed records
 
         setToken( token ); //For m_bTokenFromDB = false;
-        getDB().executeSQL(&quot;DELETE FROM object_values where source_id=? and token=?&quot;, getID(), token );
+        //getDB().executeSQL(&quot;DELETE FROM object_values where source_id=? and token=?&quot;, getID(), token );
+        //TODO: add special table for id,token
 	}else
     {
         setToken( token );
@@ -608,4 +683,4 @@ void CSyncSource::processToken(uint64 token)
 }
 
 }
-}
\ No newline at end of file
+}</diff>
      <filename>platform/shared/sync/SyncSource.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,7 @@ namespace net {
 }
 namespace json {
     class CJSONEntry;
+    class CJSONArrayIterator;
 }
 
 namespace sync {
@@ -43,10 +44,13 @@ public:
 };
 
 class CSyncEngine;
+class CSyncNotify;
 class CSyncSource
 {
     DEFINE_LOGCLASS;
 
+    enum ESyncServerDataPass{ edpNone, edpDeleteObjects };
+
     CSyncEngine&amp; m_syncEngine;
 
     int    m_nID;
@@ -57,13 +61,15 @@ class CSyncSource
 
     int m_nCurPageCount, m_nInserted, m_nDeleted, m_nTotalCount;
     boolean m_bGetAtLeastOnePage;
+    ESyncServerDataPass m_eSyncServerDataPass;
 public:
     int m_nErrCode;
     String m_strError;
     String m_strParams;
     String m_strAction;
+    boolean m_bSearchSyncChanges;
+    int     m_nProgressStep;
 private:
-    String m_strPushBody;
     VectorPtr&lt;CSyncBlob*&gt; m_arSyncBlobs;
     String m_strAskParams;
 
@@ -88,9 +94,10 @@ public:
     CSyncSource(CSyncEngine&amp; syncEngine );
 
     void syncClientChanges();
+    boolean isPendingClientChanges();
+
     void syncServerChanges();
     void makePushBody(String&amp; strBody, const char* szUpdateType);
-    void makePushBody1( rho::db::CDBResult&amp; res );//throws DBException
     void getAndremoveAsk();
     void setAskParams(const String&amp; ask){ m_strAskParams = ask;}
     String getAskParams()const{ return m_strAskParams;}
@@ -102,19 +109,23 @@ public:
     void setTotalCount(int nTotalCount){m_nTotalCount = nTotalCount;}
     int  getCurPageCount(){return m_nCurPageCount;}
     int  getTotalCount(){return m_nTotalCount;}
+    int  getProgressStep(){ return m_nProgressStep; }
 
     void processServerData(const char* szData);
-    boolean processSyncObject(json::CJSONEntry&amp; oJsonEntry);
-    boolean processSyncObject_ver1(json::CJSONEntry oJsonObject);//throws Exception
+    boolean processSyncObject_ver1(json::CJSONEntry oJsonObject, int nSrcID);//throws Exception
+    void processServerData_Ver1(json::CJSONArrayIterator&amp; oJsonArr);
+
+    void setSyncServerDataPass(ESyncServerDataPass ePass){m_eSyncServerDataPass = ePass;}
+    boolean isDeleteObjectsPass(){ return m_eSyncServerDataPass == edpDeleteObjects; }
 
     VectorPtr&lt;CSyncBlob*&gt;&amp; getSyncBlobs(){ return m_arSyncBlobs; }
     void syncClientBlobs(const String&amp; strBaseQuery);
-    boolean sendClientChanges(String strUpdateType);//throws Exception
 
     String makeFileName(const CValue&amp; value);//throws Exception
     boolean downloadBlob(CValue&amp; value);//throws Exception
 private:
     CSyncEngine&amp; getSync(){ return m_syncEngine; }
+    CSyncNotify&amp; getNotify();
     db::CDBAdapter&amp; getDB();
     net::INetRequest&amp; getNet();
 </diff>
      <filename>platform/shared/sync/SyncSource.h</filename>
    </modified>
    <modified>
      <diff>@@ -53,7 +53,7 @@ CSyncThread::~CSyncThread(void)
 void CSyncThread::addSyncCommand(CSyncCommand* pSyncCmd)
 { 
 	{
-        CMutexLock lockNotify(m_mxStackCommands);
+        synchronized(m_mxStackCommands);
 
 		boolean bExist = false;
 		for ( int i = 0; i &lt; (int)m_stackCommands.size(); i++ )
@@ -91,8 +91,6 @@ void CSyncThread::run()
 {
 	LOG(INFO) + &quot;Starting sync engine main routine...&quot;;
 
-    RhoRubyThreadStart();
-
 	int nLastSyncInterval = getLastSyncInterval();
 	while( m_oSyncEngine.getState() != CSyncEngine::esExit )
 	{
@@ -107,7 +105,8 @@ void CSyncThread::run()
                 nWait = nWait2;
         }
 
-		if ( nWait &gt;= 0 )
+        if ( nWait &gt;= 0 &amp;&amp; m_oSyncEngine.getState() != CSyncEngine::esExit &amp;&amp; 
+		     isNoCommands() )
 		{
 		    LOG(INFO) + &quot;Sync engine blocked for &quot; + nWait + &quot; seconds...&quot;;
             wait(nWait);
@@ -117,20 +116,29 @@ void CSyncThread::run()
         if ( m_oSyncEngine.getState() != CSyncEngine::esExit )
     		processCommands();
 	}
+}
+
+boolean CSyncThread::isNoCommands()
+{
+	boolean bEmpty = false;
+	synchronized(m_mxStackCommands)
+    {		
+		bEmpty = m_stackCommands.isEmpty();
+	}
 
-    RhoRubyThreadStop();
+	return bEmpty;
 }
 
 void CSyncThread::processCommands()//throws Exception
 {
-	if ( m_stackCommands.isEmpty() )
-		addSyncCommand(new CSyncCommand(scNone));
-	
-	while(!m_stackCommands.isEmpty())
+    if ( isNoCommands() )
+        addSyncCommand(new CSyncCommand(scNone));
+
+	while(!isNoCommands())
 	{
 		common::CAutoPtr&lt;CSyncCommand&gt; pSyncCmd = null;
     	{
-        	CMutexLock lockNotify(m_mxStackCommands);
+        	synchronized(m_mxStackCommands);
     		pSyncCmd = (CSyncCommand*)m_stackCommands.removeFirst();
     	}
 		
@@ -152,11 +160,12 @@ void CSyncThread::processCommand(CSyncCommand&amp; oSyncCmd)
     case scChangePollInterval:
         break;
     case scSyncOne:
-        m_oSyncEngine.doSyncSource(oSyncCmd.m_nCmdParam,oSyncCmd.m_strCmdParam,&quot;&quot;,&quot;&quot; );
+        m_oSyncEngine.doSyncSource(oSyncCmd.m_nCmdParam,oSyncCmd.m_strCmdParam,&quot;&quot;,&quot;&quot;,false, -1 );
         break;
     case scSearchOne:
         m_oSyncEngine.doSyncSource(oSyncCmd.m_nCmdParam,&quot;&quot;,oSyncCmd.m_strCmdParam, 
-            ((CSyncSearchCommand&amp;)oSyncCmd).m_strFrom);
+            ((CSyncSearchCommand&amp;)oSyncCmd).m_strFrom, ((CSyncSearchCommand&amp;)oSyncCmd).m_bSyncChanges,
+            ((CSyncSearchCommand&amp;)oSyncCmd).m_nProgressStep);
         break;
     case scLogin:
     	{
@@ -202,16 +211,17 @@ void rho_sync_stop()
 {
 	if (CSyncThread::getSyncEngine().isSyncing() )
 	{
-		CSyncThread::getSyncEngine().stopSync();
-		while( CSyncThread::getSyncEngine().getState() != CSyncEngine::esNone )
+		CSyncThread::getSyncEngine().stopSyncByUser();
+//		while( CSyncThread::getSyncEngine().getState() != CSyncEngine::esNone )
+        while( CSyncThread::getDBAdapter().isInsideTransaction() )
 			CSyncThread::getInstance()-&gt;sleep(100);
 	}
 }
 
-void rho_sync_doSearchSource(int source_id, const char *from, const char *params)
+void rho_sync_doSearchSource(int source_id, const char *from, const char *params, bool sync_changes, int nProgressStep)
 {
     rho_sync_stop();
-    CSyncThread::getInstance()-&gt;addSyncCommand(new CSyncThread::CSyncSearchCommand(from,params,source_id) );
+    CSyncThread::getInstance()-&gt;addSyncCommand(new CSyncThread::CSyncSearchCommand(from,params,source_id,sync_changes,nProgressStep) );
 }	
 
 void rho_sync_doSyncSourceByUrl(const char* szSrcID)
@@ -256,19 +266,19 @@ void rho_sync_logout()
 
 void rho_sync_set_notification(int source_id, const char *url, char* params)
 {
-    return CSyncThread::getSyncEngine().setNotification(source_id, url, params ? params : &quot;&quot;);
+    return CSyncThread::getSyncEngine().getNotify().setSyncNotification(source_id, url, params ? params : &quot;&quot;);
 }
 
 void rho_sync_clear_notification(int source_id)
 {
-    return CSyncThread::getSyncEngine().clearNotification(source_id);
+    return CSyncThread::getSyncEngine().getNotify().clearSyncNotification(source_id);
 }
 
 int rho_sync_openDB(const char* szDBPath)
 {
     rho::db::CDBAdapter&amp; db = CSyncThread::getDBAdapter();
-    rho::String strVer = &quot;&quot;;//TODO: get version from rhodes 
-    db.open(szDBPath,strVer);
+    rho::String strVer = RhoRuby_getRhoDBVersion(); 
+    db.open(szDBPath,strVer, false);
     return 0;
 }
 
@@ -313,6 +323,11 @@ void* rho_db_get_handle()
     return CSyncThread::getDBAdapter().getDbHandle();
 }
 
+unsigned long rho_sync_get_attrs(int nSrcID)
+{
+    return (VALUE)CSyncThread::getDBAdapter().getAttrMgr().getAttrsBySrc(nSrcID);
+}
+
 void rho_sync_lock()
 {
     rho::db::CDBAdapter&amp; db = rho::sync::CSyncThread::getDBAdapter();
@@ -326,4 +341,39 @@ void rho_sync_unlock()
     db.Unlock();
 }
 
+void rho_sync_setobjectnotify_url(const char* szUrl)
+{
+    CSyncNotify::setObjectNotifyUrl(szUrl);
+}
+
+void rho_sync_addobjectnotify(int nSrcID, const char* szObject)
+{
+    CSyncThread::getSyncEngine().getNotify().addObjectNotify(nSrcID, szObject);
+}
+
+void rho_sync_addobjectnotify_bysrcname(const char* szSrcName, const char* szObject)
+{
+    CSyncThread::getSyncEngine().getNotify().addObjectNotify(szSrcName, szObject);
+}
+
+void rho_sync_cleanobjectnotify()
+{
+    CSyncThread::getSyncEngine().getNotify().cleanObjectNotifications();
+}
+
+int rho_sync_get_lastsync_objectcount(int nSrcID)
+{
+    return CSyncThread::getSyncEngine().getNotify().getLastSyncObjectCount(nSrcID);
+}
+
+int rho_sync_get_pagesize()
+{
+    return CSyncThread::getSyncEngine().getSyncPageSize();
+}
+
+void rho_sync_set_pagesize(int nPageSize)
+{
+    return CSyncThread::getSyncEngine().setSyncPageSize(nPageSize);
+}
+
 }
\ No newline at end of file</diff>
      <filename>platform/shared/sync/syncthread.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -76,9 +76,14 @@ public:
     {
     public:
 	    String m_strFrom;
-        CSyncSearchCommand(String from, String params, int source_id) : CSyncCommand(CSyncThread::scSearchOne,params,source_id)
+        boolean m_bSyncChanges;
+        int     m_nProgressStep;
+
+        CSyncSearchCommand(String from, String params, int source_id, boolean sync_changes, int nProgressStep) : CSyncCommand(CSyncThread::scSearchOne,params,source_id)
 	    {
 		    m_strFrom = from;
+            m_bSyncChanges = sync_changes;
+            m_nProgressStep = nProgressStep;
 	    }
     };
 
@@ -111,6 +116,7 @@ private:
 
     void processCommands();
     void processCommand(CSyncCommand&amp; oSyncCmd);
+    boolean isNoCommands();
 };
 
 }
@@ -126,7 +132,7 @@ void rho_sync_destroy();
 
 void rho_sync_doSyncAllSources(int show_status_popup);
 void rho_sync_doSyncSource(int nSrcID,int show_status_popup);
-void rho_sync_doSearchSource(int source_id, const char *from, const char *params);
+void rho_sync_doSearchSource(int source_id, const char *from, const char *params, bool sync_changes, int nProgressStep);
 void rho_sync_doSyncSourceByUrl(const char* szSrcID);
 void rho_sync_lock();
 void rho_sync_unlock();
@@ -137,6 +143,11 @@ void rho_sync_set_notification(int source_id, const char *url, char* params);
 void rho_sync_clear_notification(int source_id);
 void rho_sync_set_pollinterval(int nInterval);
 void rho_sync_set_syncserver(char* syncserver);
+void rho_sync_setobjectnotify_url(const char* szUrl);
+void rho_sync_addobjectnotify(int nSrcID, const char* szObject);
+void rho_sync_cleanobjectnotify();
+int rho_sync_get_pagesize();
+void rho_sync_set_pagesize(int nPageSize);
 
 //struct sqlite3;
 int rho_sync_openDB(const char* szDBPath);
@@ -146,6 +157,8 @@ int rho_db_commitUITransaction();
 int rho_db_rollbackUITransaction();
 int rho_db_destroy_table(const char* szTableName);
 void* rho_db_get_handle();
+unsigned long rho_sync_get_attrs(int nSrcID);
+int rho_sync_get_lastsync_objectcount(int nSrcID);
 
 #ifdef __cplusplus
 };</diff>
      <filename>platform/shared/sync/syncthread.h</filename>
    </modified>
    <modified>
      <diff>@@ -51,8 +51,20 @@
 // One day, we may use __attribute__ stuff on gcc to annotate these functions
 #define LOCKABLE
 #define SCOPED_LOCKABLE
+
+#ifdef EXCLUSIVE_LOCK_FUNCTION
+#undef EXCLUSIVE_LOCK_FUNCTION
+#endif
 #define EXCLUSIVE_LOCK_FUNCTION(...)
+
+#ifdef EXCLUSIVE_TRYLOCK_FUNCTION
+#undef EXCLUSIVE_TRYLOCK_FUNCTION
+#endif
 #define EXCLUSIVE_TRYLOCK_FUNCTION(...)
+
+#ifdef UNLOCK_FUNCTION
+#undef UNLOCK_FUNCTION
+#endif
 #define UNLOCK_FUNCTION(...)
 
 </diff>
      <filename>platform/shared/tcmalloc/base/spinlock.h</filename>
    </modified>
    <modified>
      <diff>@@ -133,11 +133,26 @@
 #define LOCK_RETURNED(x)                // no-op
 #define LOCKABLE                        // no-op
 #define SCOPED_LOCKABLE                 // no-op
+
+#ifdef EXCLUSIVE_LOCK_FUNCTION
+#undef EXCLUSIVE_LOCK_FUNCTION
+#endif
 #define EXCLUSIVE_LOCK_FUNCTION(x)    // no-op
+
 #define SHARED_LOCK_FUNCTION(x)       // no-op
+
+#ifdef EXCLUSIVE_TRYLOCK_FUNCTION
+#undef EXCLUSIVE_TRYLOCK_FUNCTION
+#endif
 #define EXCLUSIVE_TRYLOCK_FUNCTION(x) // no-op
+
 #define SHARED_TRYLOCK_FUNCTION(x)    // no-op
+
+#ifdef UNLOCK_FUNCTION
+#undef UNLOCK_FUNCTION
+#endif
 #define UNLOCK_FUNCTION(x)            // no-op
+
 #define NO_THREAD_SAFETY_ANALYSIS       // no-op
 
 #endif // defined(__GNUC__) &amp;&amp; defined(__SUPPORT_TS_ANNOTATION__)</diff>
      <filename>platform/shared/tcmalloc/base/thread_annotations.h</filename>
    </modified>
    <modified>
      <diff>@@ -841,6 +841,14 @@
 				RelativePath=&quot;..\..\shared\common\StringConverter.h&quot;
 				&gt;
 			&lt;/File&gt;
+			&lt;File
+				RelativePath=&quot;..\..\shared\common\Tokenizer.cpp&quot;
+				&gt;
+			&lt;/File&gt;
+			&lt;File
+				RelativePath=&quot;..\..\shared\common\Tokenizer.h&quot;
+				&gt;
+			&lt;/File&gt;
 		&lt;/Filter&gt;
 		&lt;Filter
 			Name=&quot;logging&quot;
@@ -894,6 +902,22 @@
 				&gt;
 			&lt;/File&gt;
 		&lt;/Filter&gt;
+		&lt;Filter
+			Name=&quot;net&quot;
+			&gt;
+			&lt;File
+				RelativePath=&quot;..\..\shared\net\inetrequest.h&quot;
+				&gt;
+			&lt;/File&gt;
+			&lt;File
+				RelativePath=&quot;..\..\shared\net\URI.cpp&quot;
+				&gt;
+			&lt;/File&gt;
+			&lt;File
+				RelativePath=&quot;..\..\shared\net\URI.h&quot;
+				&gt;
+			&lt;/File&gt;
+		&lt;/Filter&gt;
 	&lt;/Files&gt;
 	&lt;Globals&gt;
 	&lt;/Globals&gt;</diff>
      <filename>platform/wm/RhoLib/RhoLib.vcproj</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ var fso,output_file;
 //TBD need to move sources and settings to a separate config files
 
 var sources = new Object();
-sources['db'] = [&quot;db&quot;,&quot;..\\..\\..\\rhodes\\rhodes-build\\res\\prebuilt\\common\\db&quot;];
+sources['db'] = [&quot;db&quot;,&quot;..\\..\\..\\res\\build-tools\\db&quot;];
 //sources['sqlite3']= [&quot;sqlite3&quot;,&quot;..\\..\\shared\\sqlite3&quot;];
 sources['lib']= [&quot;lib&quot;,&quot;..\\bin\\RhoBundle\\lib&quot;];
 sources['apps']= [&quot;apps&quot;,&quot;..\\bin\\RhoBundle\\apps&quot;];</diff>
      <filename>platform/wm/build/build_inf.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,99 @@
 namespace &quot;config&quot; do
   task :wm =&gt; [&quot;config:common&quot;] do
-    #TODO: Implement
+    $config[&quot;platform&quot;] = &quot;wm&quot;
+    $rubypath = &quot;res/build-tools/RhoRuby.exe&quot; #path to RubyMac
+    wmpath = $config[&quot;build&quot;][&quot;wmpath&quot;]
+    wmpath = $app_path
+    $builddir = $config[&quot;build&quot;][&quot;wmpath&quot;] + &quot;/build&quot;
+    $bindir = wmpath + &quot;/bin&quot;
+    $srcdir =  Jake.get_absolute($config[&quot;build&quot;][&quot;wmpath&quot;] + &quot;/bin/RhoBundle&quot;)
+    $targetdir = $bindir + &quot;/target/wm6p&quot;
+    $excludelib = ['**/builtinME.rb','**/ServeME.rb','**/TestServe.rb']
+    $tmpdir =  $bindir +&quot;/tmp&quot;
+    $vcbuild = &quot;vcbuild&quot;
   end
 end
 
 namespace &quot;build&quot; do
   namespace &quot;wm&quot; do
-    desc &quot;Build wm rhobundle&quot;
+#    desc &quot;Build wm rhobundle&quot;
     task :rhobundle =&gt; [&quot;config:wm&quot;] do
-      currentdir = pwd
-      chdir 'platform/wm/build'
-      puts `ant.bat RhoBundle -Dapps.dir=&quot;#{$config[&quot;env&quot;][&quot;app&quot;]}&quot;`
+      Rake::Task[&quot;build:bundle:noxruby&quot;].execute
+    end
+
+    task :rhodes =&gt; [&quot;config:wm&quot;, &quot;build:wm:rhobundle&quot;] do
+      chdir $config[&quot;build&quot;][&quot;wmpath&quot;]
+
+      args = ['/M4', 'rhodes.sln', '&quot;Release|Windows Mobile 6 Professional SDK (ARMV4I)&quot;']
+      puts Jake.run($vcbuild,args)
       unless $? == 0
-        puts &quot;Error building wm&quot;
+        puts &quot;Error building&quot;
         exit 1
       end
+      chdir $startdir
+    end
+  end
+  
+  namespace &quot;win32&quot; do
+    task :devrhobundle =&gt; [&quot;wm:rhobundle&quot;] do
+        win32rhopath = 'platform/wm/bin/win32/rhodes/Debug/rho/'
+        rm_rf win32rhopath + 'lib'      
+        rm_rf win32rhopath + 'apps'
+        
+        cp_r $srcdir + '/lib', win32rhopath
+        cp_r $srcdir + '/apps', win32rhopath      
+    end
+  end
+end
+
+namespace &quot;device&quot; do
+  namespace &quot;wm&quot; do
+    desc &quot;Build production for device or emulator&quot;
+    task :production =&gt; [&quot;config:wm&quot;,&quot;build:wm:rhobundle&quot;,&quot;build:wm:rhodes&quot;] do
+      
+      chdir $builddir
+      
+      args = ['build_inf.js', 'rhodes.inf', 'wm6']
+      puts Jake.run('cscript',args)
+      unless $? == 0
+        puts &quot;Error running build_inf&quot;
+        exit 1
+      end        
+      
+      args = ['rhodes.inf']
+      puts Jake.run($config[&quot;env&quot;][&quot;paths&quot;][&quot;cabwiz&quot;] + &quot;/cabwiz.exe&quot;,args)
+      unless $? == 0
+        puts &quot;Error running cabwiz&quot;
+        exit 1
+      end        
+      
+      args = ['cleanup.js']
+      puts Jake.run('cscript',args)
+      unless $? == 0
+        puts &quot;Error running cleanup.js&quot;
+        exit 1
+      end    
+
+      mkdir_p $bindir if not File.exists? $bindir
+      mkdir_p $targetdir if not File.exists? $targetdir
+      mv &quot;rhodes.inf&quot;, $targetdir
+      mv &quot;rhodes.cab&quot;, $targetdir
+
+      rm_f &quot;cleanup.js&quot;
+
+      chdir $startdir
 
-      chdir currentdir
     end
   end
-end
\ No newline at end of file
+end
+
+namespace &quot;clean&quot; do
+  desc &quot;Clean wm&quot;
+  task :wm =&gt; &quot;clean:wm:all&quot;
+  namespace &quot;wm&quot; do
+    task :rhodes do
+      rm_rf $bindir + &quot;/Windows Mobile 6 Professional SDK (ARMV4I)&quot;
+    end
+    task :all =&gt; &quot;clean:wm:rhodes&quot;
+  end
+end</diff>
      <filename>platform/wm/build/wm.rake</filename>
    </modified>
    <modified>
      <diff>@@ -123,6 +123,7 @@ HRESULT CHttpServer::Execute(DWORD_PTR dwParam, HANDLE hObject)
     }
 
     rho_sync_create();
+    RhoRubyInitApp();
     //rho_clientregister_create(&quot;PIN_1&quot;);
 
 //    if (logged_in()){</diff>
      <filename>platform/wm/rhodes/HttpServer.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -213,7 +213,7 @@ extern &quot;C&quot; void perform_webview_refresh() {
 	webview_refresh();
 }
 
-extern &quot;C&quot; void webview_navigate(char* url) {
+extern &quot;C&quot; void webview_navigate(char* url, int index) {
 	_AtlModule.DoViewNavigate(url);
 }
 
@@ -226,6 +226,10 @@ extern &quot;C&quot; void webview_set_menu_items(VALUE argv) {
 //TODO: Implement me!
 }
 
+extern &quot;C&quot; int webview_active_tab() {
+	return 0;
+}
+
 extern &quot;C&quot; char* get_current_location() {
 	return _AtlModule.GetCurrentLocation();
 }
@@ -246,6 +250,10 @@ extern &quot;C&quot; void create_nativebar(int bar_type, int nparams, char** params) {
 	//TODO: Implement me!
 }
 
+extern &quot;C&quot; void mapview_create(int nparams, char** params, int nannotations, char** annotation) {
+    //TODO: mapview_create
+}
+
 /*BOOL EnumRhodesWindowsProc(HWND hwnd,LPARAM lParam)
 {
 	char buf[255] = {0};</diff>
      <filename>platform/wm/rhodes/Rhodes.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -295,8 +295,8 @@ CNetRequestImpl::~CNetRequestImpl()
 
 void CNetRequestImpl::readInetFile( HINTERNET hRequest, CNetResponseImpl* pNetResp, common::CRhoFile* pFile /*=NULL*/ )
 {
-    if ( pNetResp-&gt;getRespCode() == 500 || pNetResp-&gt;getRespCode() == 422 )
-        return;
+    //if ( pNetResp-&gt;getRespCode() == 500 || pNetResp-&gt;getRespCode() == 422 )
+    //    return;
 
     DWORD dwBufSize = 4096;
     char* pBuf = (char*)malloc(dwBufSize);
@@ -323,6 +323,9 @@ void CNetRequestImpl::readInetFile( HINTERNET hRequest, CNetResponseImpl* pNetRe
 
     }while(bRead &amp;&amp; dwBytesRead &gt; 0);
 
+    if ( !pNetResp-&gt;isOK() )
+        LOG(TRACE) + &quot;Server response: &quot; + pNetResp-&gt;getCharData();
+
     free(pBuf);
 }
 </diff>
      <filename>platform/wm/rhodes/rho/net/NetRequestImpl.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -43,6 +43,11 @@ public:
 		return m_nRespCode == 200;
 	}
 
+    boolean isUnathorized()
+    {
+        return m_nRespCode == 401;
+    }
+
 };
 
 class CNetRequest;</diff>
      <filename>platform/wm/rhodes/rho/net/NetRequestImpl.h</filename>
    </modified>
    <modified>
      <diff>@@ -1612,6 +1612,14 @@
 						&gt;
 					&lt;/File&gt;
 				&lt;/Filter&gt;
+				&lt;Filter
+					Name=&quot;mapview&quot;
+					&gt;
+					&lt;File
+						RelativePath=&quot;..\..\shared\ruby\ext\mapview\mapview_wrap.c&quot;
+						&gt;
+					&lt;/File&gt;
+				&lt;/Filter&gt;
 			&lt;/Filter&gt;
 			&lt;Filter
 				Name=&quot;generated&quot;</diff>
      <filename>platform/wm/rubylib/rubylib.vcproj</filename>
    </modified>
    <modified>
      <diff>@@ -1160,6 +1160,14 @@
 				&gt;
 			&lt;/File&gt;
 			&lt;File
+				RelativePath=&quot;..\..\shared\sync\SyncNotify.cpp&quot;
+				&gt;
+			&lt;/File&gt;
+			&lt;File
+				RelativePath=&quot;..\..\shared\sync\SyncNotify.h&quot;
+				&gt;
+			&lt;/File&gt;
+			&lt;File
 				RelativePath=&quot;..\..\shared\sync\SyncSource.cpp&quot;
 				&gt;
 			&lt;/File&gt;
@@ -1188,6 +1196,14 @@
 				&gt;
 			&lt;/File&gt;
 			&lt;File
+				RelativePath=&quot;..\..\shared\db\DBAttrManager.cpp&quot;
+				&gt;
+			&lt;/File&gt;
+			&lt;File
+				RelativePath=&quot;..\..\shared\db\DBAttrManager.h&quot;
+				&gt;
+			&lt;/File&gt;
+			&lt;File
 				RelativePath=&quot;..\..\shared\db\DBResult.cpp&quot;
 				&gt;
 			&lt;/File&gt;</diff>
      <filename>platform/wm/syncengine/syncengine.vcproj</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,9 @@
 env:
   app: C:/rhodes-app
-  appname: Rhodes
-  version: 1.2.0
-  vendor: rhomobile
-  bbver: 4.6
-  applog: rholog.txt
   paths:
     java: C:/Program Files/Java/jdk1.6.0_11/bin
     android: C:/android-sdk-windows-1.5_r2
+    cabwiz: C:/Program Files/Windows Mobile 6 SDK/Tools/CabWiz
     4.6:
       jde: C:/Program Files/Research In Motion/BlackBerry JDE 4.6.0
       mds: C:/Program Files/Research In Motion/BlackBerry JDE 4.6.0/MDS
@@ -16,9 +12,6 @@ env:
       jde: C:/Program Files/Research In Motion/BlackBerry JDE 4.2.0 
       mds: C:/Program Files/Research In Motion/BlackBerry Email and MDS Services Simulators 4.1.2/MDS
       sim: 8100
-  iphone:
-    configuration: Debug
-    sdk: iphonesimulator2.2.1
 build:
   bbpath: platform/bb
   wmpath: platform/wm
@@ -27,5 +20,9 @@ build:
   symbianpath: platform/symbian
   bb:
   bbsignpwd: &quot;somepasswordhere&quot;
-
+excludedirs:
+  bb:
+    - public/js/iui
+    - public/js/jquery*
+    - public/js/prototype*
 </diff>
      <filename>rhobuild.yml.example</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>apps/config.rb</filename>
    </removed>
    <removed>
      <filename>apps/index.erb</filename>
    </removed>
    <removed>
      <filename>apps/layout.erb</filename>
    </removed>
    <removed>
      <filename>apps/loading.html</filename>
    </removed>
    <removed>
      <filename>platform/android/RhoBundle/.classpath</filename>
    </removed>
    <removed>
      <filename>platform/android/RhoBundle/.project</filename>
    </removed>
    <removed>
      <filename>platform/android/build/build.properties</filename>
    </removed>
    <removed>
      <filename>platform/android/build/build.xml</filename>
    </removed>
    <removed>
      <filename>platform/android/build/build.yml</filename>
    </removed>
    <removed>
      <filename>platform/bb/Hsqldb/src/com/rho/db/file/Jsr75RAFileImpl.java</filename>
    </removed>
    <removed>
      <filename>platform/bb/Hsqldb/src/com/rho/db/file/PersistRAFileImpl.java</filename>
    </removed>
    <removed>
      <filename>platform/bb/Hsqldb/src/com/rho/db/file/RAFileImpl.java</filename>
    </removed>
    <removed>
      <filename>platform/iphone/JSString.h</filename>
    </removed>
    <removed>
      <filename>platform/iphone/JSString.m</filename>
    </removed>
    <removed>
      <filename>platform/iphone/rbuild/build.properties</filename>
    </removed>
    <removed>
      <filename>platform/iphone/rbuild/build.xml</filename>
    </removed>
    <removed>
      <filename>platform/wm/build/Rakefile</filename>
    </removed>
    <removed>
      <filename>platform/wm/build/build.properties</filename>
    </removed>
    <removed>
      <filename>platform/wm/build/build.xml</filename>
    </removed>
    <removed>
      <filename>platform/wm/build/build.yml</filename>
    </removed>
    <removed>
      <filename>rhodes/README.rdoc</filename>
    </removed>
    <removed>
      <filename>rhodes/Rakefile</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/History.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/Manifest.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/README.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/Rakefile</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/compileERB/bb.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/compileERB/default.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/compileRB/compileRB.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/jake.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/manifest/createAppManifest.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/rhodes-build.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/android.rake</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/blackberry.rake</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/common.rake</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/iphone.rake</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/linux.rake</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/rhodes-build.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/rspec.rake</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/symbian.rake</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/tasks/wm.rake</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/lib/version.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/7z.exe</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/RhoRuby.exe</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/RubyMac</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/build_inf.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/insertRhoBundle2pkg.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/AndroidManifest.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/DateTimeTokenizer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/FilePath.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/IFile.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/IRhoLogSink.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/IRhoRubyHelper.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/Mutex.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/Properties.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoClassFactory.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoConf$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoConf$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoConf$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoConf.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoEmptyLogger.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoEmptyProfiler.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoLogConf.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoLogFileSink.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoLogOutputSink.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoLogger.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoProfiler$CCounter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoProfiler$CGlobalCounter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoProfiler.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoRuby.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/RhoThread.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/SimpleFile.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/StringScanner.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/TestProfiler.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/TestRhoLog.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/TimeInterval.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/Tokenizer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter$DBVersion.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBAdapter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/DBException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/IDBCallback.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/IDBResult.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/db/IDBStorage.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/location/GeoLocation$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/location/GeoLocation$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/location/GeoLocation$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/location/GeoLocation.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/location/IGeoLocationImpl.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/IHttpConnection.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/INetworkAccess.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/NetRequest$IRhoSession.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/NetRequest$ParsedCookie.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/NetRequest.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/NetResponse.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/RhoConnection$UrlParser.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/RhoConnection.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/URI$MalformedURIException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/net/URI.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/ClientRegister.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/ISyncStatusListener.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/JSONArrayIterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/JSONEntry.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncEngine$DBCallback.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncEngine$SyncNotification.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncEngine.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncSource$CValue.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncSource$SyncBlob.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncSource.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$SyncCommand.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread$SyncLoginCommand.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rho/sync/SyncThread.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidFile.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidHttpConnection.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidR$attr.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidR$drawable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidR$id.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidR$layout.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidR$menu.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidR$string.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/AndroidR.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/HttpLog.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/NetworkAccessImpl.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/NetworkConnectivityListener$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/NetworkConnectivityListener$ConnectivityBroadcastReceiver.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/NetworkConnectivityListener$State.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/NetworkConnectivityListener.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/NetworkStateTracker$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/NetworkStateTracker.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/NotImplementedException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/Platform$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/Platform$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/Platform$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/Platform$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/Platform$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/Platform.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/R$attr.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/R$drawable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/R$id.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/R$layout.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/R$menu.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/R$string.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/R.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/ResourceFetchThread.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RhoHttpHandler.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RhoHttpService.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RhoRubyHelper.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RhoSyncService.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/Rhodes.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RhodesInstance.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RingtoneManager$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RingtoneManager$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RingtoneManager$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/RingtoneManager.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/WebView$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/WebView$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/WebView$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/WebView$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/WebView.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/Camera$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/Camera$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/Camera.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/CameraRunnable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/FileList$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/FileList.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/ImageCapture$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/ImageCapture$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/ImageCapture$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/ImageCapture.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/camera/ImageCaptureCallback.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/datetime/DateTimePicker$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/datetime/DateTimePicker.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/datetime/DateTimePickerScreen$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/datetime/DateTimePickerScreen$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/datetime/DateTimePickerScreen$ResultSender.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/datetime/DateTimePickerScreen.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/db/DBStorage.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/db/RWLock.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/db/RhoDB.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/db/SqliteDBResult.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/geolocation/GeoLocation.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/geolocation/GeoLocationImpl.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpHeader.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpInputStream$CharBuffer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpInputStream.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpListener.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpOutputStream$SwitchOutputStream.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpOutputStream.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpRequest.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpResponse.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/HttpServer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/IHttpHandler.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/InetAddrPort.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/ThreadedServer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/util/URI.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/http/util/UrlEncoded.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/nativebar/NativeBar$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/nativebar/NativeBar.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/Contact.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/ContactList.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook$PBRecord.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/phonebook/RhoPhonebook.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/ui/AboutDialog.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/ui/LogOptionsDialog.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/rhomobile/rhodes/ui/LogViewDialog.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/ObjectSpace_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/ObjectSpace_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$23.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$24.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$25.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$26.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$27.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$28.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$29.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$30.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$31.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$32.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$33.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$34.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$35.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$36.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$37.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$38.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$39.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$40.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$41.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$42.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$43.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$44.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$45.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$46.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$47.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$48.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$49.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$50.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$51.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$52.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$53.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$54.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyArray_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyBignum_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyDir_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyENV_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyENV_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyENV_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyExceptionValue_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyExceptionValue_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyExceptionValue_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyExceptionValue_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyExceptionValue_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFileTestModule_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFileTestModule_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFile_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$23.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFixnum_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyFloat_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyGC_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyGC_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyHash_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyIO_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyInteger_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyInteger_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyInteger_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMatchData_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMatchData_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMatchData_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMethodValue_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMethodValue_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMethodValue_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMethodValue_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMethodValue_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMethodValue_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyMethodValue_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyNumeric_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyNumeric_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyNumeric_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyNumeric_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyNumeric_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyObject_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyObject_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyObject_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyObject_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyObject_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyObject_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyObject_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyProc_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyProc_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyProc_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyProc_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRandom_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRange_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyRegexp_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyStringIO_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyStringIO_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyStringIO_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyStringIO_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyStringIO_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$23.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$24.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$25.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$26.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$27.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$28.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$29.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$30.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$31.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$32.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$33.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$34.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$35.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$36.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$37.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$38.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$39.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$40.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$41.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$42.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$43.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$44.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$45.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$46.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$47.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$48.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$49.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$50.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$51.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$52.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$53.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$54.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$55.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$56.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$57.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$58.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$59.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$60.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyString_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyStruct_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyStruct_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubySymbol_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubySymbol_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubySymbol_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubySymbol_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubySymbol_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubySymbol_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThreadGroup_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThreadGroup_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThreadGroup_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThreadGroup_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThreadGroup_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThreadGroup_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$23.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$24.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$25.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyThread_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$23.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$24.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$25.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$26.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$27.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTime_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTopSelf_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/GeneratedMethods/RubyTopSelf_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/ArrayPacker.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/AttrReader.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/AttrWriter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/ErrnoModuleBuilder.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/IErrno.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/InputStreamExecutor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/ObjectFactory$FixnumCache.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/ObjectFactory.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/OutputStreamExecutor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyArray$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyArray$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyArray.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyBignum.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyData.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyDir.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyENV.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyFile.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyFileTestModule.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyFixnum.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyFloat.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyGC.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyHash.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyIO.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyIOExecutor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyIOFileExecutor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyIOPipeSinkExecutor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyIOPipeSourceExecutor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyInteger.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMatchData.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMethodValue.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMutex$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMutex$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMutex$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMutex$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMutex$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMutex$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMutex$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyMutex.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyNumeric.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyProc$Invoke.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyProc.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyRandom.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyRange.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyRegexp$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyRegexp.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyString.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyStruct$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyStruct$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyStruct$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyStruct$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyStruct.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyThread$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyThread$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyThread.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyThreadGroup.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyTime.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyTopSelf.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/builtin/RubyTypesUtil.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/AtExitBlocks.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/BlockCallStatus.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/ClassFactory.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/DefaultGlobalVariable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/GlobalVariable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/GlobalVariables$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/GlobalVariables$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/GlobalVariables$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/GlobalVariables.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/MarshalDumper.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/MarshalLoader.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/MethodBlockBase.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/MethodCache$CacheEntry.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/MethodCache.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/MultipleMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/ObjectSpace.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RhoSupport.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyAPI.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyBasic.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyBinding.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyBlock.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyClass$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyClass.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyClass_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyClass_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyClass_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyClass_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyClass_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyClass_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyConstant$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyConstant$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyConstant$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyConstant.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyExceptionValue.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyExceptionValueForThrow.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyID.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyIncludeClass.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$23.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$24.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$25.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$26.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$27.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$28.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$29.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$30.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$31.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$32.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$33.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$34.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$35.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$36.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$37.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$38.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$39.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$40.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$41.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$42.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$43.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$44.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$45.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$46.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$47.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$48.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$49.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$50.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$51.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$52.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$53.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$54.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$55.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyKernelModule_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMarshalModule.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMarshalModule_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMarshalModule_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMarshalModule_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMarshalModule_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMathModule_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMethod$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule$RubyVarArgMethodImpl.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$23.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$24.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$25.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$26.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$27.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$28.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$29.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$30.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$31.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$32.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$33.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$34.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$35.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyModule_Methods.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyNoArgBlock.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyNoArgMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyNoOrOneArgMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyObject.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyOneArgBlock.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyOneArgMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyOneOrTwoArgMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyProgram.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyRuntime.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubySingletonClass.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubySpecialValue.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubySymbol.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyTwoArgBlock.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyTwoArgMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyValue.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyVarArgBlock.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/RubyVarArgMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/UndefMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/annotation/DummyMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/annotation/RubyAllocMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/annotation/RubyLevelClass.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/annotation/RubyLevelConstant.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/annotation/RubyLevelMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/annotation/RubyLevelModule.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/annotation/RubyLevelObject.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/annotation/UndefMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/util/DummyMethod.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/util/RubyClassBuilder.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/util/RubyModuleBuilder.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/lang/util/RubyObjectBuilder.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/com/xruby/runtime/stdlib/RubyStringIO.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/CharConversionException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/Closeable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/DataInput.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/DataOutput.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/File.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/FileFilter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/FileInputStream.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/FileNotFoundException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/FileOutputStream.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/FilenameFilter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/Flushable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/InvalidClassException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/InvalidObjectException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/NotActiveException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/NotSerializableException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/ObjectInput.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/ObjectInputStream.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/ObjectInputValidation.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/ObjectOutput.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/ObjectOutputStream.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/ObjectStreamException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/OptionalDataException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/RandomAccessFile.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/Serializable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/StreamCorruptedException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/SyncFailedException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/io/WriteAbortedException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/ArrayMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/AssertMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/CalendarMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/CharSequence.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/CharacterDataLatin1$Character.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/CharacterDataLatin1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/CharacterMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/CloneNotSupportedException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/Cloneable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/Comparable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/EnumConstantNotPresentException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/IllegalStateException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/Iterable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/MathEx.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/NoSuchFieldException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/NoSuchMethodException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/Number.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/PrintStreamMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/Readable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/SecurityException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/StringBufferMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/StringMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/SystemMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/ThreadLocal.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/TimeZoneMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/TypeNotPresentException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/lang/UnsupportedOperationException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/math/HugeDigit.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/math/HugeInt.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/math/HugeIntHelper.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/Buffer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/BufferUnderflowException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/ByteBuffer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/ByteOrder.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/CharBuffer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/InvalidMarkException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/channels/FileChannel.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/channels/Pipe$SinkChannel.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/channels/Pipe$SourceChannel.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/nio/channels/Pipe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/text/ParsePosition.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/ArrayList.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Collection.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Collections.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Comparator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/ConcurrentModificationException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/DuplicateFormatFlagsException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/EventListener.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/FormatFlagsConversionMismatchException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Formattable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Formatter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/FormatterClosedException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/HashMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/HashSet.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/IllegalFormatCodePointException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/IllegalFormatConversionException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/IllegalFormatException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/IllegalFormatFlagsException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/IllegalFormatPrecisionException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/IllegalFormatWidthException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/InputMismatchException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/InvalidPropertiesFormatException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Iterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/LinkedHashMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/LinkedHashSet.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/LinkedList.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/List.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/ListIterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Locale.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Map$Entry.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Map.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/MissingFormatArgumentException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/MissingFormatWidthException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/MissingResourceException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/NavigableMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/NavigableSet.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/NoSuchElementException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Observable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Observer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Queue.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/RandomAccess.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/RandomMe.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/Set.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/SortedMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/SortedSet.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/StringParser.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/TooManyListenersException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/UnknownFormatConversionException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/UnknownFormatFlagsException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/WeakHashMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/concurrent/ConcurrentHashMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/concurrent/ConcurrentMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/concurrent/atomic/AtomicLong.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/concurrent/locks/ReentrantLock.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/logging/Level.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/logging/LogRecord.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/logging/Logger.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/zip/ZipEntry.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2me/util/zip/ZipFile.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2mex/realtime/MemoryArea.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2mex/realtime/NoHeapRealtimeThread.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/j2mex/realtime/RealtimeThread.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/Javolution.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/JavolutionError.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/Allocator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/AllocatorContext$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/AllocatorContext$Reference$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/AllocatorContext$Reference.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/AllocatorContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$10.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$11.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$12.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$13.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$14.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$15.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$16.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$17.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$18.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$19.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$20.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$21.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$22.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ArrayFactory.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ConcurrentContext$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ConcurrentContext$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ConcurrentContext$Default$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ConcurrentContext$Default.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ConcurrentContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ConcurrentException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ConcurrentThread.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/Context$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/Context$Root.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/Context.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/HeapContext$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/HeapContext$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/HeapContext$HeapAllocator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/HeapContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ImmortalContext$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ImmortalContext$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ImmortalContext$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ImmortalContext$ImmortalAllocator$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ImmortalContext$ImmortalAllocator$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ImmortalContext$ImmortalAllocator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ImmortalContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LocalContext$Reference.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LocalContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LogContext$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LogContext$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LogContext$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LogContext$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LogContext$ConsoleLog.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LogContext$NullLog.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LogContext$SystemOut.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/LogContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ObjectFactory$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ObjectFactory$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ObjectFactory$Generic.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/ObjectFactory.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/PersistentContext$Reference.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/PersistentContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/SecurityContext$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/SecurityContext$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/SecurityContext$Default.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/SecurityContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/StackContext$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/StackContext$Default$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/StackContext$Default$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/StackContext$Default.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/StackContext$StackAllocator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/context/StackContext.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/io/AppendableWriter$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/io/AppendableWriter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/io/CharSequenceReader.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/io/UTF8ByteBufferReader.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/io/UTF8ByteBufferWriter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/io/UTF8StreamReader.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/io/UTF8StreamWriter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/ClassInitializer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Configurable$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Configurable$Logic.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Configurable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Enum$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Enum.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Immutable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/MathLib.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Realtime.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reference.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reflection$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reflection$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reflection$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reflection$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reflection$Constructor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reflection$DefaultConstructor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reflection$Method.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reflection.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/Reusable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/lang/ValueType.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/Appendable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/CharArray.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/CharSet.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/Text$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/Text$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/Text$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/Text$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/Text.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextBuilder$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextBuilder$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextBuilder.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$Cursor$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat$Cursor.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TextFormat.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/text/TypeFormat.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastCollection$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastCollection$Record.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastCollection$Unmodifiable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastCollection.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastComparator$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastComparator$Default.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastComparator$Direct.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastComparator$Identity.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastComparator$Lexical.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastComparator$Rehash.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastComparator$StringComparator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastComparator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastIterator$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastIterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList$FastListIterator$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList$FastListIterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList$Node.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList$SubList$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList$SubList.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastList.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$5.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$6.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$7.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$8.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$9.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$Entry.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$EntryIterator$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$EntryIterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$EntrySet$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$EntrySet.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$KeyIterator$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$KeyIterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$KeySet.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$Unmodifiable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$ValueIterator$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$ValueIterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap$Values.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastSet$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastSet.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastTable$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastTable$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastTable$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastTable$FastTableIterator$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastTable$FastTableIterator.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastTable$SubTable$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastTable$SubTable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/FastTable.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/Index$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/Index$2.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/Index$3.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/Index$4.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/Index.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/LocalMap.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/ReentrantLock.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/javolution/util/StandardLog.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/io/GlobFilenameFilter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/io/RegexFilenameFilter.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/GenericPatternCache.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/GlobCompiler.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/MalformedCachePatternException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/PatternCache.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/PatternCacheLRU.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/PatternMatchingEngineFactory.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/perl/MalformedPerl5PatternException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/perl/ParsedSubstitutionEntry.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/perl/Perl5Util$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/perl/Perl5Util$ThreadState.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/perl/Perl5Util.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/CharStringPointer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/MalformedPatternException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/MatchResult.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/OpCode.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Pattern.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/PatternCompiler.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/PatternCompilerOptions.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/PatternMatcher.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/PatternMatcherInput.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/PatternMatchingEngine.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Perl5Compiler.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Perl5MatchResult.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Perl5Matcher.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Perl5Pattern.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Perl5Repetition.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Perl5Substitution.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/StringSubstitution.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Substitution.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/text/regex/Util.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/util/Cache.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/util/CacheLRU.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/util/GenericCache.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/apache/oro/util/GenericCacheEntry.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/jruby/util/Convert.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/jruby/util/Sprintf$Args.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/jruby/util/Sprintf$Buffer.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/jruby/util/Sprintf$ID.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/jruby/util/Sprintf$Ruby.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/jruby/util/Sprintf.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/json/me/JSONArray.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/json/me/JSONException.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/json/me/JSONObject$1.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/json/me/JSONObject$Null.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/json/me/JSONObject.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/json/me/JSONString.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/classes/org/json/me/JSONTokener.class</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/loading.html</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/back.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/exit.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/home.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/icon.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/info.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/next.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/options.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/refresh.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/drawable/sync.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/layout/camera.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/layout/datetime.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/layout/dialog_activity.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/layout/directory_list.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/layout/file_row.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/layout/logoptions.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/layout/logview.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/layout/main.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/menu/options.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/res/values/strings.xml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/android/src/com/rhomobile/rhodes/AndroidR.java</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/bb/MANIFEST.MF</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/bb/RubyVM.jar</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/bb/rhodes.jar</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/bb/rhodesApp.alx</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/common/db/syncdb.schema</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/Entitlements.plist</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/Info.plist</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/MainWindow.nib</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/PkgInfo</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/Settings.bundle/Root.plist</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/Settings.bundle/en.lproj/Root.strings</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/back_btn.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/db/syncdb.schema</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/forward_btn.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/gears.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/home_btn.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/icon.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/iphone/sim/rhorunner.app/rhorunner</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/prebuilt/wm/wm6.7z</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/rhodes_pid.key</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/res/xruby-0.3.3.jar</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-build/spec/spec.opts</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/.gitignore</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/History.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/Manifest.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/README.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/Rakefile</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/ServeME.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/bsearch.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/builtinME.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/date.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/date/format.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/dateME.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/erb.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/find.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rational.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rationalME.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/render.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rho.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rhoapplication.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rhocontact.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rhocontroller.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rhoerror.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rhofsconnector.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rhosupport.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rhoutils.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rho/rhoviewhelpers.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhodes-framework.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhodes.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhoframework.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhofsconnector.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhom.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhom/rhom.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhom/rhom_db_adapter.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhom/rhom_object.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhom/rhom_object_factory.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/rhom/rhom_source.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/singleton.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/time.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/lib/version.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/README</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/Rakefile</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/Account/config.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/Case/config.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/Question/config.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/Settings/controller.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/Settings/index.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/SpecRunner/controller.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/SpecRunner/index.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/application.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/index.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/layout.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/loading.html</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/expectations.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/expectations/expectations.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/expectations/should.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/fileutils.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/background.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/bug.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/compliance.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/conflict.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/endian.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/extensions.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/guard.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/noncompliance.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/platform.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/quarantine.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/runner.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/superuser.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/support.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/tty.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/guards/version.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/argv.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/bignum.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/const_lookup.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/environment.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/fixture.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/flunk.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/io.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/language_version.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/ruby_exe.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/scratch.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/helpers/tmp.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/base.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/be_an_instance_of.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/be_ancestor_of.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/be_close.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/be_empty.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/be_false.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/be_kind_of.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/be_nil.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/be_true.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/complain.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/eql.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/equal.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/equal_element.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/equal_utf16.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/have_constant.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/have_instance_method.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/have_method.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/have_private_instance_method.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/include.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/match_yaml.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/method.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/output.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/output_to_fd.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/raise_error.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/respond_to.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/matchers/stringsymboladapter.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/mocks.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/mocks/mock.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/mocks/object.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/mocks/proxy.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/pp.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions/debug.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions/filter.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions/gdb.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions/tag.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions/taglist.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions/tagpurge.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions/tally.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/actions/timer.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/context.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/example.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/exception.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/filters.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/filters/match.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/filters/profile.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/filters/regexp.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/filters/tag.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/describe.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/dotted.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/file.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/html.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/method.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/specdoc.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/spinner.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/summary.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/unit.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/formatters/yaml.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/mspec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/object.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/shared.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/runner/tag.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/utils/name_map.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/utils/options.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/utils/ruby_name.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/utils/script.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/utils/version.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/mspec/version.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/fixtures/client_info.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/fixtures/object_values.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/pagination/fixtures/object_values.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/rho_controller_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/rho_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/rhom_db_adapter_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/rhom_object_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/rhom_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/rhoruby_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/spec_helper.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/syncengine_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec/webview_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/app/spec_runner.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/build.yml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/css/base.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/css/blackberry.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/css/iphone.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/css/rho.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/css/xhtml.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/IUI_LICENSE.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/backButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/blueButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/cancel.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/grayButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/iui-logo-touch-icon.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/listArrow.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/listArrowSel.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/listGroup.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/loading.gif</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/pinstripes.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/right_button.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/selection.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/thumb.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/toggle.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/toggleOn.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/toolButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/toolButton_new.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/toolbar.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/images/whiteButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/js/application.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/js/jquery-1.2.6.min.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/js/rho.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/js/rhogeolocation-wm.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/public/js/rhogeolocation.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-framework/spec/rhoconfig.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/History.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/Manifest.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/README.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/Rakefile</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/bin/rhogen</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/rhogen.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/Rakefile</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/Settings/controller.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/Settings/index.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/Settings/login.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/Settings/reset.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/Settings/wait.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/application.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/helpers/application_helper.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/index.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/layout.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/app/loading.html</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/build.yml</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/icon/icon.ico</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/icon/icon.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/css/base.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/css/blackberry.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/css/iphone.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/css/rho.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/css/xhtml.css</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/IUI_LICENSE.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/backButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/blueButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/cancel.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/grayButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/iui-logo-touch-icon.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/listArrow.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/listArrowSel.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/listGroup.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/loading.gif</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/pinstripes.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/right_button.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/selection.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/thumb.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/toggle.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/toggleOn.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/toolButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/toolButton_new.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/toolbar.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/images/whiteButton.png</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/js/application.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/js/jquery-1.2.6.min.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/js/rho.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/js/rhogeolocation-wm.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/public/js/rhogeolocation.js</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/application/rhoconfig.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/bundle/db/syncdb.sqlite</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/model/config.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/model/controller.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/model/edit.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/model/index.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/model/new.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/model/show.erb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/generators/templates/source/source_adapter.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/lib/rhodes-generator.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/lib/version.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/spec/app_generator_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/spec/generator_spec_helper.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/spec/model_generator_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/spec/source_generator_spec.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/spec/spec.opts</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes-generator/spec/spec_helper.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes/.gitignore</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes/History.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes/Manifest.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes/README.txt</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes/Rakefile</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes/lib/rhodes.rb</filename>
    </removed>
    <removed>
      <filename>rhodes/rhodes/spec/spec.opts</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>979c38671b48679e47e1f03817066dee478b022c</id>
    </parent>
    <parent>
      <id>e4b744b004ffcc0f79d5bf7d4de0ecf417bec87e</id>
    </parent>
  </parents>
  <author>
    <name>lars</name>
    <email>larsburgess@gmail.com</email>
  </author>
  <url>http://github.com/rhomobile/rhodes/commit/9580e07570fd68f05015d9ea8b2e9af5ce995279</url>
  <id>9580e07570fd68f05015d9ea8b2e9af5ce995279</id>
  <committed-date>2009-10-30T13:48:53-07:00</committed-date>
  <authored-date>2009-10-30T13:48:53-07:00</authored-date>
  <message>Merge branch '1-2-stable' of github.com:rhomobile/rhodes into 1-2-stable

Conflicts:
	platform/linux/tasks/linux.rake</message>
  <tree>1f48fd3da918d009c82b65798df341cb797f7ba2</tree>
  <committer>
    <name>lars</name>
    <email>larsburgess@gmail.com</email>
  </committer>
</commit>
