mobox 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +89 -0
- data/Rakefile +2 -0
- data/bin/mobox +275 -0
- data/lib/mobox.rb +34 -0
- data/lib/mobox/config.rb +36 -0
- data/lib/mobox/helpers.rb +9 -0
- data/lib/mobox/render_scope.rb +9 -0
- data/lib/mobox/server.rb +91 -0
- data/lib/mobox/version.rb +3 -0
- data/mobox.gemspec +31 -0
- data/template/.mobox +2 -0
- data/template/Gemfile +3 -0
- data/template/config.ru +76 -0
- data/template/src/assets/images/mobox-logo-inkscape.svg +177 -0
- data/template/src/assets/images/mobox-logo.pdf +0 -0
- data/template/src/assets/images/mobox-logo.png +0 -0
- data/template/src/assets/images/mobox-logo.svg +120 -0
- data/template/src/assets/javascripts/app/config.js.coffee.erb +2 -0
- data/template/src/assets/javascripts/app/controllers/.gitignore +0 -0
- data/template/src/assets/javascripts/app/controllers/home.js.coffee +10 -0
- data/template/src/assets/javascripts/app/helpers/.gitignore +0 -0
- data/template/src/assets/javascripts/app/index.js.coffee +7 -0
- data/template/src/assets/javascripts/app/lib/.gitignore +0 -0
- data/template/src/assets/javascripts/app/lib/app.js.coffee +6 -0
- data/template/src/assets/javascripts/app/lib/config.js.coffee +3 -0
- data/template/src/assets/javascripts/app/lib/view.js.coffee +18 -0
- data/template/src/assets/javascripts/app/models/.gitignore +0 -0
- data/template/src/assets/javascripts/app/views/.gitignore +0 -0
- data/template/src/assets/javascripts/app/views/home/index.jst.hamljs +8 -0
- data/template/src/assets/javascripts/application.js.coffee +25 -0
- data/template/src/assets/javascripts/vendor/1140gs/css3-mediaqueries.js +779 -0
- data/template/src/assets/javascripts/vendor/cordova-2.0.0.js +5240 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.cube.js +161 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.effects.js +330 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.flip.js +52 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.js +93 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.overlay.js +81 -0
- data/template/src/assets/javascripts/vendor/gfx/index.js +5 -0
- data/template/src/assets/javascripts/vendor/hammer/.gitignore +1 -0
- data/template/src/assets/javascripts/vendor/hammer/LICENSE +19 -0
- data/template/src/assets/javascripts/vendor/hammer/hammer.js +741 -0
- data/template/src/assets/javascripts/vendor/hammer/index.coffee +2 -0
- data/template/src/assets/javascripts/vendor/hammer/jquery.hammer.js +26 -0
- data/template/src/assets/javascripts/vendor/hammer/jquery.specialevent.hammer.js +39 -0
- data/template/src/assets/javascripts/vendor/jquery.js +4 -0
- data/template/src/assets/javascripts/vendor/jquery_transit/index.coffee +1 -0
- data/template/src/assets/javascripts/vendor/jquery_transit/jquery.transit.js +658 -0
- data/template/src/assets/javascripts/vendor/spine/ajax.js +318 -0
- data/template/src/assets/javascripts/vendor/spine/list.js +74 -0
- data/template/src/assets/javascripts/vendor/spine/local.js +30 -0
- data/template/src/assets/javascripts/vendor/spine/manager.js +158 -0
- data/template/src/assets/javascripts/vendor/spine/panel.js +132 -0
- data/template/src/assets/javascripts/vendor/spine/relation.js +255 -0
- data/template/src/assets/javascripts/vendor/spine/route.js +220 -0
- data/template/src/assets/javascripts/vendor/spine/spine.js +913 -0
- data/template/src/assets/javascripts/vendor/spine/stage.js +146 -0
- data/template/src/assets/javascripts/vendor/spine/tabs.js +66 -0
- data/template/src/assets/javascripts/vendor/spine/tmpl.js +22 -0
- data/template/src/assets/javascripts/vendor/spine/touch.js +79 -0
- data/template/src/assets/stylesheets/application.css.sass +3 -0
- data/template/src/assets/stylesheets/base.sass +78 -0
- data/template/src/assets/stylesheets/vendor/1140gs/1140gs.sass +110 -0
- data/template/src/assets/stylesheets/vendor/1140gs/conditionals.sass +34 -0
- data/template/src/assets/stylesheets/vendor/1140gs/ie.css +43 -0
- data/template/src/assets/stylesheets/vendor/1140gs/index.sass +1 -0
- data/template/src/assets/stylesheets/vendor/spine_mobile/index.sass +1 -0
- data/template/src/assets/stylesheets/vendor/spine_mobile/mixin.sass +89 -0
- data/template/src/assets/stylesheets/vendor/spine_mobile/spine_mobile.sass +57 -0
- data/template/src/assets/stylesheets/vendor/spine_mobile/theme.sass +79 -0
- data/template/src/config.yml +2 -0
- data/template/src/index.haml +21 -0
- data/vendor/compass-sprockets/README.md +5 -0
- data/vendor/compass-sprockets/lib/compass-sprockets.rb +32 -0
- data/vendor/compass-sprockets/lib/compass/sprockets.rb +56 -0
- data/vendor/compass-sprockets/lib/compass/sprockets/version.rb +6 -0
- data/vendor/compass-sprockets/lib/sprockets/compressors.rb +96 -0
- data/vendor/compass-sprockets/lib/sprockets/static_compiler.rb +62 -0
- data/vendor/haml-sprockets/Gemfile +4 -0
- data/vendor/haml-sprockets/LICENSE +8 -0
- data/vendor/haml-sprockets/README.md +33 -0
- data/vendor/haml-sprockets/Rakefile +1 -0
- data/vendor/haml-sprockets/lib/haml-sprockets.rb +34 -0
- data/vendor/haml-sprockets/lib/haml-sprockets/engine.rb +7 -0
- data/vendor/haml-sprockets/lib/haml-sprockets/version.rb +5 -0
- data/vendor/haml-sprockets/spec/lib/haml-sprockets_spec.rb +43 -0
- data/vendor/haml-sprockets/spec/spec_helper.rb +2 -0
- data/vendor/haml-sprockets/vendor/assets/javascripts/haml.js +651 -0
- data/vendor/phonegap/.gitignore +19 -0
- data/vendor/phonegap/LICENSE +426 -0
- data/vendor/phonegap/README.md +49 -0
- data/vendor/phonegap/VERSION +1 -0
- data/vendor/phonegap/changelog +205 -0
- data/vendor/phonegap/doc/LICENSE +548 -0
- data/vendor/phonegap/doc/NOTICE +11 -0
- data/vendor/phonegap/doc/_index.html +355 -0
- data/vendor/phonegap/doc/_index.json +1 -0
- data/vendor/phonegap/doc/arrow.png +0 -0
- data/vendor/phonegap/doc/cordova_accelerometer_accelerometer.md.html +728 -0
- data/vendor/phonegap/doc/cordova_camera_camera.cleanup.md.html +159 -0
- data/vendor/phonegap/doc/cordova_camera_camera.md.html +670 -0
- data/vendor/phonegap/doc/cordova_compass_compass.md.html +707 -0
- data/vendor/phonegap/doc/cordova_connection_connection.md.html +355 -0
- data/vendor/phonegap/doc/cordova_contacts_contacts.md.html +1715 -0
- data/vendor/phonegap/doc/cordova_device_device.md.html +682 -0
- data/vendor/phonegap/doc/cordova_events_events.md.html +1538 -0
- data/vendor/phonegap/doc/cordova_file_file.md.html +2306 -0
- data/vendor/phonegap/doc/cordova_geolocation_geolocation.md.html +1002 -0
- data/vendor/phonegap/doc/cordova_media_capture_capture.md.html +1256 -0
- data/vendor/phonegap/doc/cordova_media_media.md.html +1745 -0
- data/vendor/phonegap/doc/cordova_notification_notification.md.html +691 -0
- data/vendor/phonegap/doc/cordova_storage_storage.md.html +988 -0
- data/vendor/phonegap/doc/guide_command-line_index.md.html +323 -0
- data/vendor/phonegap/doc/guide_cordova-webview_android.md.html +180 -0
- data/vendor/phonegap/doc/guide_cordova-webview_index.md.html +131 -0
- data/vendor/phonegap/doc/guide_cordova-webview_ios.md.html +275 -0
- data/vendor/phonegap/doc/guide_getting-started_android_index.md.html +291 -0
- data/vendor/phonegap/doc/guide_getting-started_bada_index.md.html +225 -0
- data/vendor/phonegap/doc/guide_getting-started_blackberry_index.md.html +267 -0
- data/vendor/phonegap/doc/guide_getting-started_index.md.html +132 -0
- data/vendor/phonegap/doc/guide_getting-started_ios_index.md.html +248 -0
- data/vendor/phonegap/doc/guide_getting-started_symbian_index.md.html +198 -0
- data/vendor/phonegap/doc/guide_getting-started_webos_index.md.html +200 -0
- data/vendor/phonegap/doc/guide_getting-started_windows-phone_index.md.html +228 -0
- data/vendor/phonegap/doc/guide_plugin-development_android_index.md.html +275 -0
- data/vendor/phonegap/doc/guide_plugin-development_bada_index.md.html +192 -0
- data/vendor/phonegap/doc/guide_plugin-development_blackberry_index.md.html +259 -0
- data/vendor/phonegap/doc/guide_plugin-development_index.md.html +230 -0
- data/vendor/phonegap/doc/guide_plugin-development_ios_index.md.html +282 -0
- data/vendor/phonegap/doc/guide_plugin-development_webos_index.md.html +125 -0
- data/vendor/phonegap/doc/guide_plugin-development_windows-phone_index.md.html +125 -0
- data/vendor/phonegap/doc/guide_upgrading_android_index.md.html +321 -0
- data/vendor/phonegap/doc/guide_upgrading_bada_index.md.html +165 -0
- data/vendor/phonegap/doc/guide_upgrading_blackberry_index.md.html +244 -0
- data/vendor/phonegap/doc/guide_upgrading_index.md.html +136 -0
- data/vendor/phonegap/doc/guide_upgrading_ios_index.md.html +547 -0
- data/vendor/phonegap/doc/guide_upgrading_symbian_index.md.html +123 -0
- data/vendor/phonegap/doc/guide_upgrading_webos_index.md.html +161 -0
- data/vendor/phonegap/doc/guide_upgrading_windows-phone_index.md.html +332 -0
- data/vendor/phonegap/doc/guide_whitelist_index.md.html +299 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/AndroidFlow.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/buildPath.jpg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/javaSrc.jpg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/manifest.jpg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/manifest.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/new_android_project.jpeg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_1.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_2.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_3.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_4.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_5.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/bada_1_run.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/bada_2_run.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/bada_project.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/bada_set_target.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/import_bada_project.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/import_bada_project_2.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/HelloWorldiPhone4.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/XCode4-templates.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/bin_create_project.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/bin_folder.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/create-folder-reference.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/index-not-found.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/project.jpg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/www-folder.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/xcode4-name_your_app.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wp7projectstructure.PNG +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wpd.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wpfirstrun.PNG +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wpnewproj.PNG +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wprun.png +0 -0
- data/vendor/phonegap/doc/index.css +404 -0
- data/vendor/phonegap/doc/index.html +210 -0
- data/vendor/phonegap/doc/index.js +74 -0
- data/vendor/phonegap/doc/line.png +0 -0
- data/vendor/phonegap/doc/mobile.css +139 -0
- data/vendor/phonegap/doc/prettify/LICENSE +191 -0
- data/vendor/phonegap/doc/prettify/lang-apollo.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-css.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-hs.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-lisp.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-lua.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-ml.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-proto.js +1 -0
- data/vendor/phonegap/doc/prettify/lang-scala.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-sql.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-vb.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-vhdl.js +3 -0
- data/vendor/phonegap/doc/prettify/lang-wiki.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-yaml.js +2 -0
- data/vendor/phonegap/doc/prettify/prettify.css +44 -0
- data/vendor/phonegap/doc/prettify/prettify.js +33 -0
- data/vendor/phonegap/keys +201 -0
- data/vendor/phonegap/lib/DISCLAIMER +8 -0
- data/vendor/phonegap/lib/LICENSE +548 -0
- data/vendor/phonegap/lib/NOTICE +11 -0
- data/vendor/phonegap/lib/README.MD +54 -0
- data/vendor/phonegap/lib/android/LICENSE +202 -0
- data/vendor/phonegap/lib/android/NOTICE +5 -0
- data/vendor/phonegap/lib/android/README.md +114 -0
- data/vendor/phonegap/lib/android/VERSION +1 -0
- data/vendor/phonegap/lib/android/bin/create +147 -0
- data/vendor/phonegap/lib/android/bin/create.bat +15 -0
- data/vendor/phonegap/lib/android/bin/create.js +188 -0
- data/vendor/phonegap/lib/android/bin/create.xml +98 -0
- data/vendor/phonegap/lib/android/bin/package.json +22 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.class +0 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.java +44 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/BOOM +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/BOOM.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/appinfo.jar +0 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/clean +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/clean.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/cordova +85 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/cordova.bat +15 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/cordova.js +104 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/debug +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/debug.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/emulate +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/emulate.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/log +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/log.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/project/Activity.java +35 -0
- data/vendor/phonegap/lib/android/bin/templates/project/AndroidManifest.xml +61 -0
- data/vendor/phonegap/lib/android/bin/templates/project/assets/www/index.html +60 -0
- data/vendor/phonegap/lib/android/bin/templates/project/assets/www/main.js +165 -0
- data/vendor/phonegap/lib/android/bin/templates/project/assets/www/master.css +116 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable-hdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable-ldpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable-mdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable-xhdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/tests/test_create_unix.js +135 -0
- data/vendor/phonegap/lib/android/bin/tests/test_create_win.js +143 -0
- data/vendor/phonegap/lib/android/cordova-2.0.0.jar +0 -0
- data/vendor/phonegap/lib/android/cordova-2.0.0.js +5724 -0
- data/vendor/phonegap/lib/android/example/AndroidManifest.xml +61 -0
- data/vendor/phonegap/lib/android/example/ant.properties +17 -0
- data/vendor/phonegap/lib/android/example/assets/www/cordova-2.0.0.js +5724 -0
- data/vendor/phonegap/lib/android/example/assets/www/index.html +60 -0
- data/vendor/phonegap/lib/android/example/assets/www/main.js +165 -0
- data/vendor/phonegap/lib/android/example/assets/www/master.css +116 -0
- data/vendor/phonegap/lib/android/example/build.xml +83 -0
- data/vendor/phonegap/lib/android/example/cordova/BOOM +7 -0
- data/vendor/phonegap/lib/android/example/cordova/appinfo.jar +0 -0
- data/vendor/phonegap/lib/android/example/cordova/clean +7 -0
- data/vendor/phonegap/lib/android/example/cordova/cordova +85 -0
- data/vendor/phonegap/lib/android/example/cordova/debug +7 -0
- data/vendor/phonegap/lib/android/example/cordova/emulate +7 -0
- data/vendor/phonegap/lib/android/example/cordova/log +7 -0
- data/vendor/phonegap/lib/android/example/libs/cordova-2.0.0.jar +0 -0
- data/vendor/phonegap/lib/android/example/proguard-project.txt +20 -0
- data/vendor/phonegap/lib/android/example/project.properties +14 -0
- data/vendor/phonegap/lib/android/example/res/drawable-hdpi/ic_launcher.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-hdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-ldpi/ic_launcher.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-ldpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-mdpi/ic_launcher.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-mdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-xhdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/layout/main.xml +13 -0
- data/vendor/phonegap/lib/android/example/res/values/strings.xml +4 -0
- data/vendor/phonegap/lib/android/example/res/xml/config.xml +54 -0
- data/vendor/phonegap/lib/android/example/src/org/apache/cordova/example/cordovaExample.java +35 -0
- data/vendor/phonegap/lib/android/xml/config.xml +54 -0
- data/vendor/phonegap/lib/bada/Icons/Cordova.png +0 -0
- data/vendor/phonegap/lib/bada/Icons/Cordova_Splash.png +0 -0
- data/vendor/phonegap/lib/bada/LICENSE +202 -0
- data/vendor/phonegap/lib/bada/NOTICE +5 -0
- data/vendor/phonegap/lib/bada/README.md +48 -0
- data/vendor/phonegap/lib/bada/Res/cordova/accelerometer.js +131 -0
- data/vendor/phonegap/lib/bada/Res/cordova/camera.js +102 -0
- data/vendor/phonegap/lib/bada/Res/cordova/compass.js +77 -0
- data/vendor/phonegap/lib/bada/Res/cordova/contact.js +355 -0
- data/vendor/phonegap/lib/bada/Res/cordova/cordova.base.js +561 -0
- data/vendor/phonegap/lib/bada/Res/cordova/cordova.bat +21 -0
- data/vendor/phonegap/lib/bada/Res/cordova/cordova.js +1661 -0
- data/vendor/phonegap/lib/bada/Res/cordova/debugconsole.js +126 -0
- data/vendor/phonegap/lib/bada/Res/cordova/device.js +46 -0
- data/vendor/phonegap/lib/bada/Res/cordova/file.js +682 -0
- data/vendor/phonegap/lib/bada/Res/cordova/geolocation.js +152 -0
- data/vendor/phonegap/lib/bada/Res/cordova/network.js +70 -0
- data/vendor/phonegap/lib/bada/Res/cordova/notification.js +117 -0
- data/vendor/phonegap/lib/bada/Res/cordova/position.js +74 -0
- data/vendor/phonegap/lib/bada/Res/eng-GB.xml +26 -0
- data/vendor/phonegap/lib/bada/Res/images/cordova_logo_normal_dark.png +0 -0
- data/vendor/phonegap/lib/bada/Res/index.html +108 -0
- data/vendor/phonegap/lib/bada/Res/main.js +390 -0
- data/vendor/phonegap/lib/bada/VERSION +1 -0
- data/vendor/phonegap/lib/bada/application.xml +45 -0
- data/vendor/phonegap/lib/bada/inc/Accelerometer.h +54 -0
- data/vendor/phonegap/lib/bada/inc/Compass.h +52 -0
- data/vendor/phonegap/lib/bada/inc/Contacts.h +62 -0
- data/vendor/phonegap/lib/bada/inc/Cordova.h +82 -0
- data/vendor/phonegap/lib/bada/inc/CordovaCommand.h +46 -0
- data/vendor/phonegap/lib/bada/inc/DebugConsole.h +41 -0
- data/vendor/phonegap/lib/bada/inc/Device.h +43 -0
- data/vendor/phonegap/lib/bada/inc/GeoLocation.h +52 -0
- data/vendor/phonegap/lib/bada/inc/Kamera.h +49 -0
- data/vendor/phonegap/lib/bada/inc/Network.h +56 -0
- data/vendor/phonegap/lib/bada/inc/Notification.h +50 -0
- data/vendor/phonegap/lib/bada/inc/WebForm.h +97 -0
- data/vendor/phonegap/lib/bada/manifest.xml +61 -0
- data/vendor/phonegap/lib/bada/src/Accelerometer.cpp +135 -0
- data/vendor/phonegap/lib/bada/src/Compass.cpp +131 -0
- data/vendor/phonegap/lib/bada/src/Contacts.cpp +600 -0
- data/vendor/phonegap/lib/bada/src/Cordova.cpp +139 -0
- data/vendor/phonegap/lib/bada/src/CordovaCommand.cpp +33 -0
- data/vendor/phonegap/lib/bada/src/CordovaEntry.cpp +60 -0
- data/vendor/phonegap/lib/bada/src/DebugConsole.cpp +81 -0
- data/vendor/phonegap/lib/bada/src/Device.cpp +81 -0
- data/vendor/phonegap/lib/bada/src/GeoLocation.cpp +144 -0
- data/vendor/phonegap/lib/bada/src/Kamera.cpp +121 -0
- data/vendor/phonegap/lib/bada/src/Network.cpp +123 -0
- data/vendor/phonegap/lib/bada/src/Notification.cpp +176 -0
- data/vendor/phonegap/lib/bada/src/WebForm.cpp +231 -0
- data/vendor/phonegap/lib/badaWac/Icons/codova_bada_wac_splash_type4.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/codova_bada_wac_splash_type5.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/cordova_bada_icon_type5.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/cordova_bada_wac_icon_type3.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/cordova_bada_wac_icon_type4.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/cordova_bada_wac_splash_type3.png +0 -0
- data/vendor/phonegap/lib/badaWac/LICENSE +201 -0
- data/vendor/phonegap/lib/badaWac/NOTICE +5 -0
- data/vendor/phonegap/lib/badaWac/README.md +12 -0
- data/vendor/phonegap/lib/badaWac/Res/config.xml +47 -0
- data/vendor/phonegap/lib/badaWac/Res/cordova-2.0.0.js +5676 -0
- data/vendor/phonegap/lib/badaWac/Res/css/index.css +100 -0
- data/vendor/phonegap/lib/badaWac/Res/img/cordova.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/index.html +24 -0
- data/vendor/phonegap/lib/badaWac/Res/js/index.js +15 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_128.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_16.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_24.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_256.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_32.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_48.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_512.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_64.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_android_36.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_android_48.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_android_72.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_android_96.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_bb_80.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_ios_114.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_ios_144.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_ios_57.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_ios_72.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_hdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_hdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_ldpi_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_ldpi_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_mdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_mdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_xhdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_xhdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/blackberry_transparent_300.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/blackberry_transparent_400.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/ipad_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/ipad_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/ipad_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/ipad_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/iphone_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/iphone_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/iphone_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/iphone_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/windows_phone_portrait.jpg +0 -0
- data/vendor/phonegap/lib/badaWac/Res/sample/index.html +167 -0
- data/vendor/phonegap/lib/badaWac/Res/sample/js/cordova.js +5576 -0
- data/vendor/phonegap/lib/badaWac/Res/sample/js/sample.js +404 -0
- data/vendor/phonegap/lib/badaWac/Res/spec.html +50 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/helper.js +11 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/index.js +49 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/lib/jasmine-1.2.0/MIT.LICENSE +20 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/lib/jasmine-1.2.0/jasmine-html.js +616 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/lib/jasmine-1.2.0/jasmine.css +81 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/lib/jasmine-1.2.0/jasmine.js +2529 -0
- data/vendor/phonegap/lib/badaWac/VERSION +1 -0
- data/vendor/phonegap/lib/badaWac/application.xml +51 -0
- data/vendor/phonegap/lib/badaWac/manifest.xml +58 -0
- data/vendor/phonegap/lib/blackberry/LICENSE +268 -0
- data/vendor/phonegap/lib/blackberry/NOTICE +8 -0
- data/vendor/phonegap/lib/blackberry/README.md +90 -0
- data/vendor/phonegap/lib/blackberry/VERSION +1 -0
- data/vendor/phonegap/lib/blackberry/bin/create +84 -0
- data/vendor/phonegap/lib/blackberry/bin/create.bat +14 -0
- data/vendor/phonegap/lib/blackberry/bin/create.js +94 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/dist/README.md +90 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/blackberry.xml +356 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/build.xml +138 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/cordova/debug +53 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/cordova/emulate +40 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/lib/ant-contrib/LICENSE.txt +47 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/lib/ant-contrib/ant-contrib-1.0b3.jar +0 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/playbook.xml +283 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/project.properties +97 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/config.xml +82 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/index.html +976 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/json2.js +482 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/plugins.xml +34 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/resources/icon.png +0 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/resources/loading_foreground.png +0 -0
- data/vendor/phonegap/lib/blackberry/sample/blackberry.xml +356 -0
- data/vendor/phonegap/lib/blackberry/sample/build.xml +138 -0
- data/vendor/phonegap/lib/blackberry/sample/cordova/debug +53 -0
- data/vendor/phonegap/lib/blackberry/sample/cordova/emulate +40 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/ant-contrib/LICENSE.txt +47 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/ant-contrib/ant-contrib-1.0b3.jar +0 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/ext-air/Cordova_Network/library.xml +40 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as +80 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/ext/cordova.2.0.0.jar +0 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/javascript/cordova-2.0.0.js +6407 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/javascript/playbook/cordova-2.0.0.js +6845 -0
- data/vendor/phonegap/lib/blackberry/sample/playbook.xml +283 -0
- data/vendor/phonegap/lib/blackberry/sample/project.properties +97 -0
- data/vendor/phonegap/lib/blackberry/sample/www/config.xml +82 -0
- data/vendor/phonegap/lib/blackberry/sample/www/cordova-2.0.0.js +6407 -0
- data/vendor/phonegap/lib/blackberry/sample/www/ext-air/Cordova_Network/library.xml +40 -0
- data/vendor/phonegap/lib/blackberry/sample/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as +80 -0
- data/vendor/phonegap/lib/blackberry/sample/www/ext/cordova.2.0.0.jar +0 -0
- data/vendor/phonegap/lib/blackberry/sample/www/index.html +976 -0
- data/vendor/phonegap/lib/blackberry/sample/www/json2.js +482 -0
- data/vendor/phonegap/lib/blackberry/sample/www/playbook/cordova-2.0.0.js +6845 -0
- data/vendor/phonegap/lib/blackberry/sample/www/plugins.xml +34 -0
- data/vendor/phonegap/lib/blackberry/sample/www/resources/icon.png +0 -0
- data/vendor/phonegap/lib/blackberry/sample/www/resources/loading_foreground.png +0 -0
- data/vendor/phonegap/lib/blackberry/www/config.xml +82 -0
- data/vendor/phonegap/lib/blackberry/www/cordova-2.0.0.js +6407 -0
- data/vendor/phonegap/lib/blackberry/www/ext-air/Cordova_Network/library.xml +40 -0
- data/vendor/phonegap/lib/blackberry/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as +80 -0
- data/vendor/phonegap/lib/blackberry/www/ext/cordova.2.0.0.jar +0 -0
- data/vendor/phonegap/lib/blackberry/www/playbook/cordova-2.0.0.js +6845 -0
- data/vendor/phonegap/lib/blackberry/www/plugins.xml +34 -0
- data/vendor/phonegap/lib/ios/Cordova-2.0.0.dmg +0 -0
- data/vendor/phonegap/lib/ios/Cordova-2.0.0.dmg.SHA1 +1 -0
- data/vendor/phonegap/lib/ios/LICENSE +394 -0
- data/vendor/phonegap/lib/ios/NOTICE +5 -0
- data/vendor/phonegap/lib/ios/bin/BOOM +27 -0
- data/vendor/phonegap/lib/ios/bin/README.md +29 -0
- data/vendor/phonegap/lib/ios/bin/_build.sh +92 -0
- data/vendor/phonegap/lib/ios/bin/autotest +24 -0
- data/vendor/phonegap/lib/ios/bin/bench +48 -0
- data/vendor/phonegap/lib/ios/bin/create +99 -0
- data/vendor/phonegap/lib/ios/bin/package.json +15 -0
- data/vendor/phonegap/lib/ios/bin/replaces +28 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__.xcodeproj/TemplateIcon.icns +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__.xcodeproj/TemplateInfo.plist +28 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj +638 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/.gitignore +6 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/AppDelegate.h +45 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/AppDelegate.m +135 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/MainViewController.h +32 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/MainViewController.m +141 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/MainViewController.xib +138 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Cordova.plist +83 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/CordovaBuildSettings.xcconfig +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Plugins/README +20 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/controls_bg.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/controls_bg@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/controls_bg@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/controls_bg~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/record_button.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/record_button@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/record_button@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/record_button~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/recording_bg.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/recording_bg@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/recording_bg@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/recording_bg~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/stop_button.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/stop_button@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/stop_button@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/stop_button~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/de.lproj/Localizable.strings +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/en.lproj/Localizable.strings +25 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/es.lproj/Localizable.strings +25 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/icons/icon-72.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/icons/icon-72@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/icons/icon.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/icons/icon@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/se.lproj/Localizable.strings +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default-Landscape@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default-Landscape~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default-Portrait@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default-Portrait~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default@2x~iphone.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default~iphone.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/__TESTING__-Info.plist +78 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/__TESTING__-Prefix.pch +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/main.m +35 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/cordova/debug +47 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/cordova/emulate +58 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/cordova/log +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/config.xml +47 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/cordova-2.0.0.js +5240 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/css/index.css +100 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/img/cordova.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/index.html +44 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/js/index.js +20 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_128.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_16.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_24.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_256.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_32.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_48.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_512.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_64.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_android_36.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_android_48.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_android_72.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_android_96.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_bb_80.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_ios_114.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_ios_144.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_ios_57.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_ios_72.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_hdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_hdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_ldpi_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_ldpi_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_mdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_mdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_xhdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_xhdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/blackberry_transparent_300.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/blackberry_transparent_400.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/ipad_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/ipad_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/ipad_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/ipad_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/iphone_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/iphone_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/iphone_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/iphone_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/windows_phone_portrait.jpg +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/spec.html +50 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/spec/helper.js +11 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/spec/index.js +49 -0
- data/vendor/phonegap/lib/ios/bin/test +44 -0
- data/vendor/phonegap/lib/ios/bin/tests/autotest.coffee +24 -0
- data/vendor/phonegap/lib/ios/bin/tests/create.coffee +34 -0
- data/vendor/phonegap/lib/ios/bin/tests/debug.coffee +18 -0
- data/vendor/phonegap/lib/ios/bin/tests/test.coffee +18 -0
- data/vendor/phonegap/lib/symbian/deprecated.txt +1 -0
- data/vendor/phonegap/lib/webos/LICENSE +202 -0
- data/vendor/phonegap/lib/webos/Makefile +127 -0
- data/vendor/phonegap/lib/webos/NOTICE +11 -0
- data/vendor/phonegap/lib/webos/README.md +52 -0
- data/vendor/phonegap/lib/webos/VERSION +1 -0
- data/vendor/phonegap/lib/webos/framework/appinfo.json +10 -0
- data/vendor/phonegap/lib/webos/framework/config.xml +47 -0
- data/vendor/phonegap/lib/webos/framework/cordova_48.png +0 -0
- data/vendor/phonegap/lib/webos/framework/css/index.css +100 -0
- data/vendor/phonegap/lib/webos/framework/img/cordova.png +0 -0
- data/vendor/phonegap/lib/webos/framework/index.html +24 -0
- data/vendor/phonegap/lib/webos/framework/js/index.js +20 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_128.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_16.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_24.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_256.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_32.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_48.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_512.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_64.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_android_36.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_android_48.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_android_72.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_android_96.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_bb_80.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_ios_114.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_ios_144.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_ios_57.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_ios_72.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_hdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_hdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_ldpi_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_ldpi_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_mdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_mdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_xhdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_xhdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/blackberry_transparent_300.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/blackberry_transparent_400.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/ipad_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/ipad_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/ipad_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/ipad_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/iphone_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/iphone_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/iphone_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/iphone_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/windows_phone_portrait.jpg +0 -0
- data/vendor/phonegap/lib/webos/framework/spec.html +50 -0
- data/vendor/phonegap/lib/webos/framework/spec/helper.js +11 -0
- data/vendor/phonegap/lib/webos/framework/spec/index.js +49 -0
- data/vendor/phonegap/lib/webos/framework/spec/lib/jasmine-1.2.0/MIT.LICENSE +20 -0
- data/vendor/phonegap/lib/webos/framework/spec/lib/jasmine-1.2.0/jasmine-html.js +616 -0
- data/vendor/phonegap/lib/webos/framework/spec/lib/jasmine-1.2.0/jasmine.css +81 -0
- data/vendor/phonegap/lib/webos/framework/spec/lib/jasmine-1.2.0/jasmine.js +2529 -0
- data/vendor/phonegap/lib/webos/js/acceleration.js +59 -0
- data/vendor/phonegap/lib/webos/js/accelerometer.js +133 -0
- data/vendor/phonegap/lib/webos/js/application.js +54 -0
- data/vendor/phonegap/lib/webos/js/audio.js +113 -0
- data/vendor/phonegap/lib/webos/js/camera.js +60 -0
- data/vendor/phonegap/lib/webos/js/compass.js +167 -0
- data/vendor/phonegap/lib/webos/js/contacts.js +69 -0
- data/vendor/phonegap/lib/webos/js/cordova-core.js +405 -0
- data/vendor/phonegap/lib/webos/js/debugconsole.js +62 -0
- data/vendor/phonegap/lib/webos/js/device.js +98 -0
- data/vendor/phonegap/lib/webos/js/file.js +79 -0
- data/vendor/phonegap/lib/webos/js/geolocation.js +232 -0
- data/vendor/phonegap/lib/webos/js/map.js +67 -0
- data/vendor/phonegap/lib/webos/js/mojo.js +81 -0
- data/vendor/phonegap/lib/webos/js/mouse.js +40 -0
- data/vendor/phonegap/lib/webos/js/network.js +96 -0
- data/vendor/phonegap/lib/webos/js/notification.js +139 -0
- data/vendor/phonegap/lib/webos/js/orientation.js +124 -0
- data/vendor/phonegap/lib/webos/js/position.js +87 -0
- data/vendor/phonegap/lib/webos/js/service.js +74 -0
- data/vendor/phonegap/lib/webos/js/sms.js +60 -0
- data/vendor/phonegap/lib/webos/js/telephony.js +45 -0
- data/vendor/phonegap/lib/webos/js/window.js +88 -0
- data/vendor/phonegap/lib/webos/js/windowproperties.js +31 -0
- data/vendor/phonegap/lib/webos/lib/thumbs.0.5.2.js +104 -0
- data/vendor/phonegap/lib/windows-phone/LICENSE +12 -0
- data/vendor/phonegap/lib/windows-phone/NOTICE +5 -0
- data/vendor/phonegap/lib/windows-phone/README.md +50 -0
- data/vendor/phonegap/lib/windows-phone/VERSION +1 -0
- data/vendor/phonegap/lib/windows-phone/bin/create.bat +1 -0
- data/vendor/phonegap/lib/windows-phone/bin/create.js +154 -0
- data/vendor/phonegap/lib/windows-phone/example/App.xaml +37 -0
- data/vendor/phonegap/lib/windows-phone/example/App.xaml.cs +154 -0
- data/vendor/phonegap/lib/windows-phone/example/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/example/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/example/BuildManifestProcessor.js +81 -0
- data/vendor/phonegap/lib/windows-phone/example/CordovaExample.csproj +195 -0
- data/vendor/phonegap/lib/windows-phone/example/CordovaExample.sln +28 -0
- data/vendor/phonegap/lib/windows-phone/example/CordovaSourceDictionary.xml +4 -0
- data/vendor/phonegap/lib/windows-phone/example/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/example/MainPage.xaml.cs +70 -0
- data/vendor/phonegap/lib/windows-phone/example/Plugins/Calculator.cs +46 -0
- data/vendor/phonegap/lib/windows-phone/example/Properties/AppManifest.xml +24 -0
- data/vendor/phonegap/lib/windows-phone/example/Properties/AssemblyInfo.cs +38 -0
- data/vendor/phonegap/lib/windows-phone/example/Properties/WMAppManifest.xml +59 -0
- data/vendor/phonegap/lib/windows-phone/example/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/example/www/accelerometer.html +164 -0
- data/vendor/phonegap/lib/windows-phone/example/www/accelerometer2.html +175 -0
- data/vendor/phonegap/lib/windows-phone/example/www/audio.html +267 -0
- data/vendor/phonegap/lib/windows-phone/example/www/calculator.html +84 -0
- data/vendor/phonegap/lib/windows-phone/example/www/camera.html +115 -0
- data/vendor/phonegap/lib/windows-phone/example/www/capture.html +207 -0
- data/vendor/phonegap/lib/windows-phone/example/www/compass.html +150 -0
- data/vendor/phonegap/lib/windows-phone/example/www/contacts.html +169 -0
- data/vendor/phonegap/lib/windows-phone/example/www/cordova-2.0.0.js +5658 -0
- data/vendor/phonegap/lib/windows-phone/example/www/events.html +146 -0
- data/vendor/phonegap/lib/windows-phone/example/www/file.html +284 -0
- data/vendor/phonegap/lib/windows-phone/example/www/index.html +108 -0
- data/vendor/phonegap/lib/windows-phone/example/www/location.html +165 -0
- data/vendor/phonegap/lib/windows-phone/example/www/master.css +156 -0
- data/vendor/phonegap/lib/windows-phone/example/www/network.html +96 -0
- data/vendor/phonegap/lib/windows-phone/example/www/notification.html +112 -0
- data/vendor/phonegap/lib/windows-phone/example/www/storage.html +78 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.back.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.close.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.feature.video.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.next.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.save.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.stop.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Properties/AssemblyInfo.cs +35 -0
- data/vendor/phonegap/lib/windows-phone/framework/WP7CordovaClassLib.csproj +281 -0
- data/vendor/phonegap/lib/windows-phone/framework/WP7CordovaClassLib.sln +20 -0
- data/vendor/phonegap/lib/windows-phone/framework/WP7CordovaClassLibBare.csproj +127 -0
- data/vendor/phonegap/lib/windows-phone/framework/WP7GapClassLibBare.sln +20 -0
- data/vendor/phonegap/lib/windows-phone/framework/resources/notification-beep.wav +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/CordovaStarter-2.0.0.zip +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/App.xaml +37 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/App.xaml.cs +154 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/BuildManifestProcessor.js +83 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/CordovaAppProj.csproj +152 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/CordovaSolution.sln +22 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/CordovaSourceDictionary.xml +23 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/MainPage.xaml.cs +72 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/Properties/AppManifest.xml +6 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/Properties/AssemblyInfo.cs +38 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/Properties/WMAppManifest.xml +32 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/VERSION +1 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/cordova-2.0.0.js +5672 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/css/index.css +100 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/img/cordova.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/index.html +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/js/index.js +20 -0
- data/vendor/phonegap/lib/windows-phone/templates/description.txt +4 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/App.xaml +37 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/App.xaml.cs +154 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/BuildManifestProcessor.js +80 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/CordovaAppProj.csproj +153 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/CordovaLib/WP7CordovaClassLib.dll +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/CordovaSolution.sln +22 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/CordovaSourceDictionary.xml +9 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/MainPage.xaml.cs +72 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/Properties/AppManifest.xml +6 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/Properties/AssemblyInfo.cs +38 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/Properties/WMAppManifest.xml +41 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/VERSION +1 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/cordova/debug.bat +68 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/cordova/emulate.bat +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/cordova-2.0.0.js +5672 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/css/index.css +100 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/img/cordova.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/index.html +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/js/index.js +20 -0
- data/vendor/phonegap/lib/windows-phone/templates/pg_templateIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/pg_templatePreview.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/App.xaml +37 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/App.xaml.cs +154 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/BuildManifestProcessor.js +80 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/CordovaAppProj.csproj +231 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/CordovaSolution.sln +22 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/CordovaSourceDictionary.xml +4 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/MainPage.xaml.cs +72 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/Properties/AppManifest.xml +6 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/Properties/AssemblyInfo.cs +38 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/Properties/WMAppManifest.xml +42 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/VERSION +1 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordova/debug.bat +68 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordova/emulate.bat +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/BrowserMouseHelper.cs +345 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/CommandFactory.cs +104 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Accelerometer.cs +195 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/AudioPlayer.cs +617 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/BaseCommand.cs +129 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Battery.cs +79 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Camera.cs +490 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Capture.cs +735 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Compass.cs +364 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Contacts.cs +643 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/DebugConsole.cs +49 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Device.cs +124 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/File.cs +1441 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/FileTransfer.cs +525 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/GeoLocation.cs +34 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/ImageExifHelper.cs +222 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Media.cs +522 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/MimeTypeMapper.cs +99 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/NetworkStatus.cs +124 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Notification.cs +322 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/CordovaCommandCall.cs +86 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/CordovaView.xaml +65 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/CordovaView.xaml.cs +451 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/DOMStorageHelper.cs +145 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.back.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.close.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.feature.video.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.next.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.save.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.stop.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/JSON/JsonHelper.cs +97 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/NativeExecution.cs +207 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/OrientationHelper.cs +128 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/PluginResult.cs +165 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/ScriptCallback.cs +80 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/AudioCaptureTask.cs +105 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/AudioRecorder.xaml +66 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/AudioRecorder.xaml.cs +387 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/ImageCapture.xaml +26 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/ImageCapture.xaml.cs +107 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/NotificationBox.xaml +62 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/NotificationBox.xaml.cs +41 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/VideoCaptureTask.cs +104 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/VideoRecorder.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/VideoRecorder.xaml.cs +405 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/resources/notification-beep.wav +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/cordova-2.0.0.js +5672 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/css/index.css +100 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/img/cordova.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/index.html +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/js/index.js +20 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/GapAppVsPackage.cs +64 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/GapAppVsPackage.csproj +174 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/GlobalSuppressions.cs +11 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Guids.cs +14 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Key.snk +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Properties/AssemblyInfo.cs +36 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Resources.Designer.cs +63 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Resources.resx +129 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Resources/Package.ico +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/VSPackage.resx +140 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/pg_templateIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/pg_templatePreview.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/source.extension.vsixmanifest +30 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/App.xaml +38 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/App.xaml.cs +158 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/BuildManifestProcessor.js +80 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/CordovaSourceDictionary.xml +4 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/MainPage.xaml.cs +42 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/MobileSpecUnitTests.csproj +141 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/MobileSpecUnitTests.sln +28 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/Properties/AppManifest.xml +6 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/Properties/AssemblyInfo.cs +35 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/Properties/WMAppManifest.xml +35 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/www/cordova-2.0.0.js +5658 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/www/index.html +43 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/www/master.css +112 -0
- data/vendor/phonegap/lib/windows-phone/tooling/CordovaDeploy/CordovaDeploy.sln +20 -0
- data/vendor/phonegap/lib/windows-phone/tooling/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj +79 -0
- data/vendor/phonegap/lib/windows-phone/tooling/CordovaDeploy/CordovaDeploy/Program.cs +219 -0
- data/vendor/phonegap/lib/windows-phone/tooling/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs +36 -0
- data/vendor/phonegap/lib/windows-phone/tooling/scripts/debug.bat +68 -0
- data/vendor/phonegap/lib/windows-phone/tooling/scripts/emulate.bat +24 -0
- metadata +1040 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
rem
|
|
2
|
+
rem
|
|
3
|
+
rem Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
+
rem or more contributor license agreements. See the NOTICE file
|
|
5
|
+
rem distributed with this work for additional information
|
|
6
|
+
rem regarding copyright ownership. The ASF licenses this file
|
|
7
|
+
rem to you under the Apache License, Version 2.0 (the
|
|
8
|
+
rem "License"); you may not use this file except in compliance
|
|
9
|
+
rem with the License. You may obtain a copy of the License at
|
|
10
|
+
rem
|
|
11
|
+
rem http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
rem
|
|
13
|
+
rem Unless required by applicable law or agreed to in writing,
|
|
14
|
+
rem software distributed under the License is distributed on an
|
|
15
|
+
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
rem KIND, either express or implied. See the License for the
|
|
17
|
+
rem specific language governing permissions and limitations
|
|
18
|
+
rem under the License.
|
|
19
|
+
rem
|
|
20
|
+
rem
|
|
21
|
+
copy /B cordova.base.js+geolocation.js+position.js+accelerometer.js+network.js+debugconsole.js+contact.js+device.js+compass.js+notification.js+camera.js cordova.js
|
|
@@ -0,0 +1,1661 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
+
* or more contributor license agreements. See the NOTICE file
|
|
5
|
+
* distributed with this work for additional information
|
|
6
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
7
|
+
* to you under the Apache License, Version 2.0 (the
|
|
8
|
+
* "License"); you may not use this file except in compliance
|
|
9
|
+
* with the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing,
|
|
14
|
+
* software distributed under the License is distributed on an
|
|
15
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
* KIND, either express or implied. See the License for the
|
|
17
|
+
* specific language governing permissions and limitations
|
|
18
|
+
* under the License.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The order of events during page load and Cordova startup is as follows:
|
|
24
|
+
*
|
|
25
|
+
* onDOMContentLoaded Internal event that is received when the web page is loaded and parsed.
|
|
26
|
+
* window.onload Body onload event.
|
|
27
|
+
* onNativeReady Internal event that indicates the Cordova native side is ready.
|
|
28
|
+
* onCordovaInit Internal event that kicks off creation of all Cordova JavaScript objects (runs constructors).
|
|
29
|
+
* onCordovaReady Internal event fired when all Cordova JavaScript objects have been created
|
|
30
|
+
* onCordovaInfoReady Internal event fired when device properties are available
|
|
31
|
+
* onDeviceReady User event fired to indicate that Cordova is ready
|
|
32
|
+
* onResume User event fired to indicate a start/resume lifecycle event
|
|
33
|
+
*
|
|
34
|
+
* The only Cordova events that user code should register for are:
|
|
35
|
+
* onDeviceReady
|
|
36
|
+
* onResume
|
|
37
|
+
*
|
|
38
|
+
* Listeners can be registered as:
|
|
39
|
+
* document.addEventListener("deviceready", myDeviceReadyListener, false);
|
|
40
|
+
* document.addEventListener("resume", myResumeListener, false);
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
function debugPrint(body) {
|
|
44
|
+
var list = document.getElementById("debuglist");
|
|
45
|
+
var item = document.createElement("li");
|
|
46
|
+
item.appendChild(document.createTextNode(body));
|
|
47
|
+
list.appendChild(item);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* This represents the Cordova API itself, and provides a global namespace for accessing
|
|
51
|
+
* information about the state of Cordova.
|
|
52
|
+
* @class
|
|
53
|
+
*/
|
|
54
|
+
Cordova = {
|
|
55
|
+
queue: {
|
|
56
|
+
ready: true,
|
|
57
|
+
commands: [],
|
|
58
|
+
timer: null
|
|
59
|
+
},
|
|
60
|
+
_constructors: []
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Boolean flag indicating if the Cordova API is available and initialized.
|
|
65
|
+
*/ // TODO: Remove this, it is unused here ... -jm
|
|
66
|
+
Cordova.available = function() {
|
|
67
|
+
return window.device.uuid != undefined;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Custom pub-sub channel that can have functions subscribed to it
|
|
72
|
+
*/
|
|
73
|
+
Cordova.Channel = function(type)
|
|
74
|
+
{
|
|
75
|
+
this.type = type;
|
|
76
|
+
this.handlers = {};
|
|
77
|
+
this.guid = 0;
|
|
78
|
+
this.fired = false;
|
|
79
|
+
this.enabled = true;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Subscribes the given function to the channel. Any time that
|
|
84
|
+
* Channel.fire is called so too will the function.
|
|
85
|
+
* Optionally specify an execution context for the function
|
|
86
|
+
* and a guid that can be used to stop subscribing to the channel.
|
|
87
|
+
* Returns the guid.
|
|
88
|
+
*/
|
|
89
|
+
Cordova.Channel.prototype.subscribe = function(f, c, g) {
|
|
90
|
+
// need a function to call
|
|
91
|
+
if (f == null) { return; }
|
|
92
|
+
|
|
93
|
+
var func = f;
|
|
94
|
+
if (typeof c == "object" && f instanceof Function) { func = Cordova.close(c, f); }
|
|
95
|
+
|
|
96
|
+
g = g || func.observer_guid || f.observer_guid || this.guid++;
|
|
97
|
+
func.observer_guid = g;
|
|
98
|
+
f.observer_guid = g;
|
|
99
|
+
this.handlers[g] = func;
|
|
100
|
+
return g;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Like subscribe but the function is only called once and then it
|
|
105
|
+
* auto-unsubscribes itself.
|
|
106
|
+
*/
|
|
107
|
+
Cordova.Channel.prototype.subscribeOnce = function(f, c) {
|
|
108
|
+
var g = null;
|
|
109
|
+
var _this = this;
|
|
110
|
+
var m = function() {
|
|
111
|
+
f.apply(c || null, arguments);
|
|
112
|
+
_this.unsubscribe(g);
|
|
113
|
+
}
|
|
114
|
+
if (this.fired) {
|
|
115
|
+
if (typeof c == "object" && f instanceof Function) { f = Cordova.close(c, f); }
|
|
116
|
+
f.apply(this, this.fireArgs);
|
|
117
|
+
} else {
|
|
118
|
+
g = this.subscribe(m);
|
|
119
|
+
}
|
|
120
|
+
return g;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Unsubscribes the function with the given guid from the channel.
|
|
125
|
+
*/
|
|
126
|
+
Cordova.Channel.prototype.unsubscribe = function(g) {
|
|
127
|
+
if (g instanceof Function) { g = g.observer_guid; }
|
|
128
|
+
this.handlers[g] = null;
|
|
129
|
+
delete this.handlers[g];
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Calls all functions subscribed to this channel.
|
|
134
|
+
*/
|
|
135
|
+
Cordova.Channel.prototype.fire = function(e) {
|
|
136
|
+
if (this.enabled) {
|
|
137
|
+
var fail = false;
|
|
138
|
+
for (var item in this.handlers) {
|
|
139
|
+
var handler = this.handlers[item];
|
|
140
|
+
if (handler instanceof Function) {
|
|
141
|
+
var rv = (handler.apply(this, arguments)==false);
|
|
142
|
+
fail = fail || rv;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
this.fired = true;
|
|
146
|
+
this.fireArgs = arguments;
|
|
147
|
+
return !fail;
|
|
148
|
+
}
|
|
149
|
+
return true;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Calls the provided function only after all of the channels specified
|
|
154
|
+
* have been fired.
|
|
155
|
+
*/
|
|
156
|
+
Cordova.Channel.join = function(h, c) {
|
|
157
|
+
var i = c.length;
|
|
158
|
+
var f = function() {
|
|
159
|
+
if (!(--i)) h();
|
|
160
|
+
}
|
|
161
|
+
for (var j=0; j<i; j++) {
|
|
162
|
+
(!c[j].fired?c[j].subscribeOnce(f):i--);
|
|
163
|
+
}
|
|
164
|
+
if (!i) h();
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Add an initialization function to a queue that ensures it will run and initialize
|
|
169
|
+
* application constructors only once Cordova has been initialized.
|
|
170
|
+
* @param {Function} func The function callback you want run once Cordova is initialized
|
|
171
|
+
*/
|
|
172
|
+
Cordova.addConstructor = function(func) {
|
|
173
|
+
Cordova.onCordovaInit.subscribeOnce(function() {
|
|
174
|
+
// try {
|
|
175
|
+
func();
|
|
176
|
+
// } catch(e) {
|
|
177
|
+
// if (typeof(debug['log']) == 'function') {
|
|
178
|
+
// debug.log("Failed to run constructor: " + debug.processMessage(e));
|
|
179
|
+
// } else {
|
|
180
|
+
// alert("Failed to run constructor: " + e.message);
|
|
181
|
+
// }
|
|
182
|
+
// }
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Plugins object.
|
|
188
|
+
*/
|
|
189
|
+
if (!window.plugins) {
|
|
190
|
+
window.plugins = {};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Adds new plugin object to window.plugins.
|
|
195
|
+
* The plugin is accessed using window.plugins.<name>
|
|
196
|
+
*
|
|
197
|
+
* @param name The plugin name
|
|
198
|
+
* @param obj The plugin object
|
|
199
|
+
*/
|
|
200
|
+
Cordova.addPlugin = function(name, obj) {
|
|
201
|
+
if (!window.plugins[name]) {
|
|
202
|
+
window.plugins[name] = obj;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
console.log("Plugin " + name + " already exists.");
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* onDOMContentLoaded channel is fired when the DOM content
|
|
211
|
+
* of the page has been parsed.
|
|
212
|
+
*/
|
|
213
|
+
Cordova.onDOMContentLoaded = new Cordova.Channel('onDOMContentLoaded');
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* onNativeReady channel is fired when the Cordova native code
|
|
217
|
+
* has been initialized.
|
|
218
|
+
*/
|
|
219
|
+
Cordova.onNativeReady = new Cordova.Channel('onNativeReady');
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* onCordovaInit channel is fired when the web page is fully loaded and
|
|
223
|
+
* Cordova native code has been initialized.
|
|
224
|
+
*/
|
|
225
|
+
Cordova.onCordovaInit = new Cordova.Channel('onCordovaInit');
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* onCordovaReady channel is fired when the JS Cordova objects have been created.
|
|
229
|
+
*/
|
|
230
|
+
Cordova.onCordovaReady = new Cordova.Channel('onCordovaReady');
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* onCordovaInfoReady channel is fired when the Cordova device properties
|
|
234
|
+
* has been set.
|
|
235
|
+
*/
|
|
236
|
+
Cordova.onCordovaInfoReady = new Cordova.Channel('onCordovaInfoReady');
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* onResume channel is fired when the Cordova native code
|
|
240
|
+
* resumes.
|
|
241
|
+
*/
|
|
242
|
+
Cordova.onResume = new Cordova.Channel('onResume');
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* onPause channel is fired when the Cordova native code
|
|
246
|
+
* pauses.
|
|
247
|
+
*/
|
|
248
|
+
Cordova.onPause = new Cordova.Channel('onPause');
|
|
249
|
+
|
|
250
|
+
// _nativeReady is global variable that the native side can set
|
|
251
|
+
// to signify that the native code is ready. It is a global since
|
|
252
|
+
// it may be called before any Cordova JS is ready.
|
|
253
|
+
if (typeof _nativeReady !== 'undefined') { Cordova.onNativeReady.fire(); }
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* onDeviceReady is fired only after all Cordova objects are created and
|
|
257
|
+
* the device properties are set.
|
|
258
|
+
*/
|
|
259
|
+
Cordova.onDeviceReady = new Cordova.Channel('onDeviceReady');
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Create all Cordova objects once page has fully loaded and native side is ready.
|
|
263
|
+
*/
|
|
264
|
+
Cordova.Channel.join(function() {
|
|
265
|
+
|
|
266
|
+
// Run Cordova constructors
|
|
267
|
+
Cordova.onCordovaInit.fire();
|
|
268
|
+
|
|
269
|
+
// Fire event to notify that all objects are created
|
|
270
|
+
Cordova.onCordovaReady.fire();
|
|
271
|
+
|
|
272
|
+
}, [ Cordova.onDOMContentLoaded, Cordova.onNativeReady ]);
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Fire onDeviceReady event once all constructors have run and Cordova info has been
|
|
276
|
+
* received from native side.
|
|
277
|
+
*/
|
|
278
|
+
Cordova.Channel.join(function() {
|
|
279
|
+
Cordova.onDeviceReady.fire();
|
|
280
|
+
|
|
281
|
+
// Fire the onresume event, since first one happens before JavaScript is loaded
|
|
282
|
+
Cordova.onResume.fire();
|
|
283
|
+
}, [ Cordova.onCordovaReady, Cordova.onCordovaInfoReady]);
|
|
284
|
+
|
|
285
|
+
// Listen for DOMContentLoaded and notify our channel subscribers
|
|
286
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
287
|
+
Cordova.onDOMContentLoaded.fire();
|
|
288
|
+
}, false);
|
|
289
|
+
|
|
290
|
+
// Intercept calls to document.addEventListener and watch for deviceready
|
|
291
|
+
Cordova.m_document_addEventListener = document.addEventListener;
|
|
292
|
+
|
|
293
|
+
document.addEventListener = function(evt, handler, capture) {
|
|
294
|
+
var e = evt.toLowerCase();
|
|
295
|
+
if (e == 'deviceready') {
|
|
296
|
+
Cordova.onDeviceReady.subscribeOnce(handler);
|
|
297
|
+
} else if (e == 'resume') {
|
|
298
|
+
Cordova.onResume.subscribe(handler);
|
|
299
|
+
// if subscribing listener after event has already fired, invoke the handler
|
|
300
|
+
if (Cordova.onResume.fired && handler instanceof Function) {
|
|
301
|
+
handler();
|
|
302
|
+
}
|
|
303
|
+
} else if (e == 'pause') {
|
|
304
|
+
Cordova.onPause.subscribe(handler);
|
|
305
|
+
} else {
|
|
306
|
+
Cordova.m_document_addEventListener.call(document, evt, handler, capture);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
Cordova.m_element_addEventListener = Element.prototype.addEventListener;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* For BlackBerry, the touchstart event does not work so we need to do click
|
|
314
|
+
* events when touchstart events are attached.
|
|
315
|
+
*/
|
|
316
|
+
Element.prototype.addEventListener = function(evt, handler, capture) {
|
|
317
|
+
if (evt === 'touchstart') {
|
|
318
|
+
evt = 'click';
|
|
319
|
+
}
|
|
320
|
+
Cordova.m_element_addEventListener.call(this, evt, handler, capture);
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Does a deep clone of the object.
|
|
325
|
+
*
|
|
326
|
+
* @param obj
|
|
327
|
+
* @return
|
|
328
|
+
*/
|
|
329
|
+
Cordova.clone = function(obj) {
|
|
330
|
+
if(!obj) {
|
|
331
|
+
return obj;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if(obj instanceof Array){
|
|
335
|
+
var retVal = new Array();
|
|
336
|
+
for(var i = 0; i < obj.length; ++i){
|
|
337
|
+
retVal.push(Cordova.clone(obj[i]));
|
|
338
|
+
}
|
|
339
|
+
return retVal;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if (obj instanceof Function) {
|
|
343
|
+
return obj;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
if(!(obj instanceof Object)){
|
|
347
|
+
return obj;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
if(obj instanceof Date){
|
|
351
|
+
return obj;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
retVal = new Object();
|
|
355
|
+
for(i in obj){
|
|
356
|
+
if(!(i in retVal) || retVal[i] != obj[i]) {
|
|
357
|
+
retVal[i] = Cordova.clone(obj[i]);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return retVal;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
Cordova.close = function(context, func, params) {
|
|
364
|
+
if (typeof params === 'undefined') {
|
|
365
|
+
return function() {
|
|
366
|
+
return func.apply(context, arguments);
|
|
367
|
+
}
|
|
368
|
+
} else {
|
|
369
|
+
return function() {
|
|
370
|
+
return func.apply(context, params);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
Cordova.callbackId = 0;
|
|
376
|
+
Cordova.callbacks = {};
|
|
377
|
+
Cordova.callbackStatus = {
|
|
378
|
+
NO_RESULT: 0,
|
|
379
|
+
OK: 1,
|
|
380
|
+
CLASS_NOT_FOUND_EXCEPTION: 2,
|
|
381
|
+
ILLEGAL_ACCESS_EXCEPTION: 3,
|
|
382
|
+
INSTANTIATION_EXCEPTION: 4,
|
|
383
|
+
MALFORMED_URL_EXCEPTION: 5,
|
|
384
|
+
IO_EXCEPTION: 6,
|
|
385
|
+
INVALID_ACTION: 7,
|
|
386
|
+
JSON_EXCEPTION: 8,
|
|
387
|
+
ERROR: 9
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Called by native code when returning successful result from an action.
|
|
392
|
+
*
|
|
393
|
+
* @param callbackId
|
|
394
|
+
* @param args
|
|
395
|
+
*/
|
|
396
|
+
Cordova.callbackSuccess = function(callbackId, args) {
|
|
397
|
+
if (Cordova.callbacks[callbackId]) {
|
|
398
|
+
|
|
399
|
+
// If result is to be sent to callback
|
|
400
|
+
if (args.status == Cordova.callbackStatus.OK) {
|
|
401
|
+
try {
|
|
402
|
+
if (Cordova.callbacks[callbackId].success) {
|
|
403
|
+
Cordova.callbacks[callbackId].success(args.message);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
catch (e) {
|
|
407
|
+
console.log("Error in success callback: "+callbackId+" = "+e);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// Clear callback if not expecting any more results
|
|
412
|
+
if (!args.keepCallback) {
|
|
413
|
+
delete Cordova.callbacks[callbackId];
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Called by native code when returning error result from an action.
|
|
420
|
+
*
|
|
421
|
+
* @param callbackId
|
|
422
|
+
* @param args
|
|
423
|
+
*/
|
|
424
|
+
Cordova.callbackError = function(callbackId, args) {
|
|
425
|
+
if (Cordova.callbacks[callbackId]) {
|
|
426
|
+
try {
|
|
427
|
+
if (Cordova.callbacks[callbackId].fail) {
|
|
428
|
+
Cordova.callbacks[callbackId].fail(args.message);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
catch (e) {
|
|
432
|
+
console.log("Error in error callback: "+callbackId+" = "+e);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// Clear callback if not expecting any more results
|
|
436
|
+
if (!args.keepCallback) {
|
|
437
|
+
delete Cordova.callbacks[callbackId];
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Create a UUID
|
|
444
|
+
*
|
|
445
|
+
* @return
|
|
446
|
+
*/
|
|
447
|
+
Cordova.createUUID = function() {
|
|
448
|
+
return Cordova.UUIDcreatePart(4) + '-' +
|
|
449
|
+
Cordova.UUIDcreatePart(2) + '-' +
|
|
450
|
+
Cordova.UUIDcreatePart(2) + '-' +
|
|
451
|
+
Cordova.UUIDcreatePart(2) + '-' +
|
|
452
|
+
Cordova.UUIDcreatePart(6);
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
Cordova.UUIDcreatePart = function(length) {
|
|
456
|
+
var uuidpart = "";
|
|
457
|
+
for (var i=0; i<length; i++) {
|
|
458
|
+
var uuidchar = parseInt((Math.random() * 256)).toString(16);
|
|
459
|
+
if (uuidchar.length == 1) {
|
|
460
|
+
uuidchar = "0" + uuidchar;
|
|
461
|
+
}
|
|
462
|
+
uuidpart += uuidchar;
|
|
463
|
+
}
|
|
464
|
+
return uuidpart;
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* Execute a Cordova command in a queued fashion, to ensure commands do not
|
|
468
|
+
* execute with any race conditions, and only run when Cordova is ready to
|
|
469
|
+
* receive them.
|
|
470
|
+
*
|
|
471
|
+
*/
|
|
472
|
+
Cordova.exec = function() {
|
|
473
|
+
|
|
474
|
+
Cordova.queue.commands.push(arguments);
|
|
475
|
+
if (Cordova.queue.timer == null)
|
|
476
|
+
Cordova.queue.timer = setInterval(Cordova.run_command, 10);
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Internal function used to dispatch the request to Cordova. It processes the
|
|
481
|
+
* command queue and executes the next command on the list. Simple parameters are passed
|
|
482
|
+
* as arguments on the url. JavaScript objects converted into a JSON string and passed as a
|
|
483
|
+
* query string argument of the url.
|
|
484
|
+
* Arguments may be in one of two formats:
|
|
485
|
+
* FORMAT ONE (preferable)
|
|
486
|
+
* The native side will call Cordova.callbackSuccess or Cordova.callbackError,
|
|
487
|
+
* depending upon the result of the action.
|
|
488
|
+
*
|
|
489
|
+
* @param {Function} success The success callback
|
|
490
|
+
* @param {Function} fail The fail callback
|
|
491
|
+
* @param {String} service The name of the service to use
|
|
492
|
+
* @param {String} action The name of the action to use
|
|
493
|
+
* @param {String[]} [args] Zero or more arguments to pass to the method
|
|
494
|
+
*
|
|
495
|
+
* FORMAT TWO
|
|
496
|
+
* @param {String} command Command to be run in Cordova, e.g. "ClassName.method"
|
|
497
|
+
* @param {String[]} [args] Zero or more arguments to pass to the method
|
|
498
|
+
* object parameters are passed as an array object [object1, object2] each object will be passed as JSON strings
|
|
499
|
+
* @private
|
|
500
|
+
*/
|
|
501
|
+
Cordova.run_command = function() {
|
|
502
|
+
if (!Cordova.available() || !Cordova.queue.ready)
|
|
503
|
+
return;
|
|
504
|
+
|
|
505
|
+
var args = Cordova.queue.commands.shift();
|
|
506
|
+
if (Cordova.queue.commands.length == 0) {
|
|
507
|
+
clearInterval(Cordova.queue.timer);
|
|
508
|
+
Cordova.queue.timer = null;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
var service;
|
|
512
|
+
var callbackId = null;
|
|
513
|
+
var start=0;
|
|
514
|
+
try {
|
|
515
|
+
if (args[0] == null || typeof args[0] === "function") {
|
|
516
|
+
var success = args[0];
|
|
517
|
+
var fail = args[1];
|
|
518
|
+
service = args[2] + "." + args[3];
|
|
519
|
+
args = args[4]; //array of arguments to
|
|
520
|
+
if (success || fail) {
|
|
521
|
+
callbackId = service + Cordova.callbackId++;
|
|
522
|
+
Cordova.callbacks[callbackId] = {success:success, fail:fail};
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
service = args[0];
|
|
526
|
+
start = 1;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
var uri = [];
|
|
530
|
+
var query = [];
|
|
531
|
+
for (var i = start; i < args.length; i++) {
|
|
532
|
+
var arg = args[i];
|
|
533
|
+
if (arg == undefined || arg == null)
|
|
534
|
+
continue;
|
|
535
|
+
if (typeof(arg) == 'object') {
|
|
536
|
+
for(i in arg) {
|
|
537
|
+
if(typeof(arg[i]) != 'object') {
|
|
538
|
+
query.push(encodeURIComponent(i) + '=' + encodeURIComponent(arg[i]));
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
else {
|
|
543
|
+
uri.push(encodeURIComponent(arg));
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
var next = callbackId != null ? ("/" + callbackId + "/") : "/";
|
|
547
|
+
var url = "gap://" + service + next + uri.join("/");
|
|
548
|
+
|
|
549
|
+
if (query.length > 0) {
|
|
550
|
+
url += "?" + query.join("&");
|
|
551
|
+
}
|
|
552
|
+
Cordova.queue.ready = false;
|
|
553
|
+
document.location = url;
|
|
554
|
+
|
|
555
|
+
} catch (e) {
|
|
556
|
+
console.log("CordovaExec Error: "+e);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
/*
|
|
564
|
+
* Cordova is available under *either* the terms of the modified BSD license *or* the
|
|
565
|
+
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
|
|
566
|
+
*
|
|
567
|
+
* Copyright (c) 2005-2010, Nitobi Software Inc.
|
|
568
|
+
* Copyright (c) 2010, IBM Corporation
|
|
569
|
+
*/
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* This class provides access to device GPS data.
|
|
573
|
+
* @constructor
|
|
574
|
+
*/
|
|
575
|
+
function Geolocation() {
|
|
576
|
+
|
|
577
|
+
// The last known GPS position.
|
|
578
|
+
this.lastPosition = null;
|
|
579
|
+
this.id = null;
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Position error object
|
|
584
|
+
*
|
|
585
|
+
* @param code
|
|
586
|
+
* @param message
|
|
587
|
+
*/
|
|
588
|
+
function PositionError(code, message) {
|
|
589
|
+
this.code = code || 0;
|
|
590
|
+
this.message = message || '';
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
PositionError.UNKNOWN_ERROR = 0;
|
|
594
|
+
PositionError.PERMISSION_DENIED = 1;
|
|
595
|
+
PositionError.POSITION_UNAVAILABLE = 2;
|
|
596
|
+
PositionError.TIMEOUT = 3;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Asynchronously aquires the current position.
|
|
600
|
+
*
|
|
601
|
+
* @param {Function} successCallback The function to call when the position data is available
|
|
602
|
+
* @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL)
|
|
603
|
+
* @param {PositionOptions} options The options for getting the position data. (OPTIONAL)
|
|
604
|
+
*/
|
|
605
|
+
Geolocation.prototype.getCurrentPosition = function(successCallback, errorCallback, options) {
|
|
606
|
+
this.id = Cordova.createUUID();
|
|
607
|
+
// default maximumAge value should be 0, and set if positive
|
|
608
|
+
var maximumAge = 0;
|
|
609
|
+
|
|
610
|
+
// default timeout value should be infinity, but that's a really long time
|
|
611
|
+
var timeout = 3600000;
|
|
612
|
+
|
|
613
|
+
var enableHighAccuracy = false;
|
|
614
|
+
if (options) {
|
|
615
|
+
if (options.maximumAge && (options.maximumAge > 0)) {
|
|
616
|
+
maximumAge = options.maximumAge;
|
|
617
|
+
}
|
|
618
|
+
if (options.enableHighAccuracy) {
|
|
619
|
+
enableHighAccuracy = options.enableHighAccuracy;
|
|
620
|
+
}
|
|
621
|
+
if (options.timeout) {
|
|
622
|
+
timeout = (options.timeout < 0) ? 0 : options.timeout;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
Cordova.exec(successCallback, errorCallback, "org.apache.cordova.Geolocation", "getCurrentPosition", [maximumAge, timeout, enableHighAccuracy]);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
|
|
630
|
+
* the successCallback is called with the new location.
|
|
631
|
+
*
|
|
632
|
+
* @param {Function} successCallback The function to call each time the location data is available
|
|
633
|
+
* @param {Function} errorCallback The function to call when there is an error getting the location data. (OPTIONAL)
|
|
634
|
+
* @param {PositionOptions} options The options for getting the location data such as frequency. (OPTIONAL)
|
|
635
|
+
* @return String The watch id that must be passed to #clearWatch to stop watching.
|
|
636
|
+
*/
|
|
637
|
+
Geolocation.prototype.watchPosition = function(successCallback, errorCallback, options) {
|
|
638
|
+
|
|
639
|
+
// default maximumAge value should be 0, and set if positive
|
|
640
|
+
var maximumAge = 0;
|
|
641
|
+
|
|
642
|
+
// DO NOT set timeout to a large value for watchPosition in BlackBerry.
|
|
643
|
+
// The interval used for updates is half the timeout value, so a large
|
|
644
|
+
// timeout value will mean a long wait for the first location.
|
|
645
|
+
var timeout = 10000;
|
|
646
|
+
|
|
647
|
+
var enableHighAccuracy = false;
|
|
648
|
+
if (options) {
|
|
649
|
+
if (options.maximumAge && (options.maximumAge > 0)) {
|
|
650
|
+
maximumAge = options.maximumAge;
|
|
651
|
+
}
|
|
652
|
+
if (options.enableHighAccuracy) {
|
|
653
|
+
enableHighAccuracy = options.enableHighAccuracy;
|
|
654
|
+
}
|
|
655
|
+
if (options.timeout) {
|
|
656
|
+
timeout = (options.timeout < 0) ? 0 : options.timeout;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
this.id = Cordova.createUUID();
|
|
660
|
+
Cordova.exec(successCallback, errorCallback, "org.apache.cordova.Geolocation", "watchPosition", [maximumAge, timeout, enableHighAccuracy]);
|
|
661
|
+
return this.id;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Clears the specified position watch.
|
|
666
|
+
*
|
|
667
|
+
* @param {String} id The ID of the watch returned from #watchPosition
|
|
668
|
+
*/
|
|
669
|
+
Geolocation.prototype.clearWatch = function(id) {
|
|
670
|
+
Cordova.exec(null, null, "org.apache.cordova.Geolocation", "stop", []);
|
|
671
|
+
this.id = null;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Force the Cordova geolocation to be used instead of built-in.
|
|
676
|
+
*/
|
|
677
|
+
Geolocation.usingCordova = false;
|
|
678
|
+
Geolocation.useCordova = function() {
|
|
679
|
+
if (Geolocation.usingCordova) {
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
Geolocation.usingCordova = true;
|
|
683
|
+
|
|
684
|
+
// Set built-in geolocation methods to our own implementations
|
|
685
|
+
// (Cannot replace entire geolocation, but can replace individual methods)
|
|
686
|
+
navigator.geolocation.getCurrentPosition = navigator._geo.getCurrentPosition;
|
|
687
|
+
navigator.geolocation.watchPosition = navigator._geo.watchPosition;
|
|
688
|
+
navigator.geolocation.clearWatch = navigator._geo.clearWatch;
|
|
689
|
+
navigator.geolocation.success = navigator._geo.success;
|
|
690
|
+
navigator.geolocation.fail = navigator._geo.fail;
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
Cordova.addConstructor(function() {
|
|
694
|
+
navigator._geo = new Geolocation();
|
|
695
|
+
|
|
696
|
+
// if no native geolocation object, use Cordova geolocation
|
|
697
|
+
if (typeof navigator.geolocation == 'undefined') {
|
|
698
|
+
navigator.geolocation = navigator._geo;
|
|
699
|
+
Geolocation.usingCordova = true;
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
|
|
703
|
+
/*
|
|
704
|
+
* Cordova is available under *either* the terms of the modified BSD license *or* the
|
|
705
|
+
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
|
|
706
|
+
*
|
|
707
|
+
* Copyright (c) 2005-2010, Nitobi Software Inc.
|
|
708
|
+
* Copyright (c) 2010, IBM Corporation
|
|
709
|
+
*/
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* This class contains position information.
|
|
713
|
+
* @param {Object} lat
|
|
714
|
+
* @param {Object} lng
|
|
715
|
+
* @param {Object} acc
|
|
716
|
+
* @param {Object} alt
|
|
717
|
+
* @param {Object} altacc
|
|
718
|
+
* @param {Object} head
|
|
719
|
+
* @param {Object} vel
|
|
720
|
+
* @constructor
|
|
721
|
+
*/
|
|
722
|
+
function Position(coords, timestamp) {
|
|
723
|
+
this.coords = coords;
|
|
724
|
+
this.timestamp = timestamp;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
function PositionOptions(enableHighAccuracy, timeout, maximumAge, minimumAccuracy) {
|
|
728
|
+
this.enableHighAccuracy = enableHighAccuracy || false;
|
|
729
|
+
this.timeout = timeout || 10000000;
|
|
730
|
+
this.maximumAge = maximumAge || 0;
|
|
731
|
+
this.minimumAccuracy = minimumAccuracy || 10000000;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
function Coordinates(lat, lng, alt, acc, head, vel, altacc) {
|
|
735
|
+
/**
|
|
736
|
+
* The latitude of the position.
|
|
737
|
+
*/
|
|
738
|
+
this.latitude = lat || 0;
|
|
739
|
+
/**
|
|
740
|
+
* The longitude of the position,
|
|
741
|
+
*/
|
|
742
|
+
this.longitude = lng || 0;
|
|
743
|
+
/**
|
|
744
|
+
* The accuracy of the position.
|
|
745
|
+
*/
|
|
746
|
+
this.accuracy = acc || 0;
|
|
747
|
+
/**
|
|
748
|
+
* The altitude of the position.
|
|
749
|
+
*/
|
|
750
|
+
this.altitude = alt || 0;
|
|
751
|
+
/**
|
|
752
|
+
* The direction the device is moving at the position.
|
|
753
|
+
*/
|
|
754
|
+
this.heading = head || 0;
|
|
755
|
+
/**
|
|
756
|
+
* The velocity with which the device is moving at the position.
|
|
757
|
+
*/
|
|
758
|
+
this.speed = vel || 0;
|
|
759
|
+
/**
|
|
760
|
+
* The altitude accuracy of the position.
|
|
761
|
+
*/
|
|
762
|
+
this.altitudeAccuracy = (altacc != 'undefined') ? altacc : null;
|
|
763
|
+
}
|
|
764
|
+
/*
|
|
765
|
+
* Cordova is available under *either* the terms of the modified BSD license *or* the
|
|
766
|
+
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
|
|
767
|
+
*
|
|
768
|
+
* Copyright (c) 2005-2010, Nitobi Software Inc.
|
|
769
|
+
* Copyright (c) 2010, IBM Corporation
|
|
770
|
+
*/
|
|
771
|
+
function Acceleration(x, y, z, timestamp) {
|
|
772
|
+
this.x = x;
|
|
773
|
+
this.y = y;
|
|
774
|
+
this.z = z;
|
|
775
|
+
this.timestamp = timestamp || new Date().getTime();
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Class provides access to device accelerometer data.
|
|
780
|
+
* @constructor
|
|
781
|
+
*/
|
|
782
|
+
function Accelerometer() {
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* The last known acceleration. type=Acceleration()
|
|
786
|
+
*/
|
|
787
|
+
this.lastAcceleration = null;
|
|
788
|
+
this.id = null;
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Asynchronously acquires the current acceleration.
|
|
793
|
+
*
|
|
794
|
+
* @param {Function} successCallback The function to call when the acceleration data is available
|
|
795
|
+
* @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
|
|
796
|
+
* @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
|
|
797
|
+
*/
|
|
798
|
+
Accelerometer.prototype.getCurrentAcceleration = function(successCallback, errorCallback, options) {
|
|
799
|
+
|
|
800
|
+
// successCallback required
|
|
801
|
+
if (typeof successCallback != "function") {
|
|
802
|
+
console.log("Accelerometer Error: successCallback is not a function");
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
// errorCallback optional
|
|
807
|
+
if (errorCallback && (typeof errorCallback != "function")) {
|
|
808
|
+
console.log("Accelerometer Error: errorCallback is not a function");
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
// Get acceleration
|
|
813
|
+
Cordova.exec(successCallback, errorCallback, "org.apache.cordova.Accelerometer", "getCurrentAcceleration", []);
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Asynchronously acquires the device acceleration at a given interval.
|
|
818
|
+
*
|
|
819
|
+
* @param {Function} successCallback The function to call each time the acceleration data is available
|
|
820
|
+
* @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
|
|
821
|
+
* @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
|
|
822
|
+
* @return String The watch id that must be passed to #clearWatch to stop watching.
|
|
823
|
+
*/
|
|
824
|
+
Accelerometer.prototype.watchAcceleration = function(successCallback, errorCallback, options) {
|
|
825
|
+
|
|
826
|
+
// Default interval (10 sec)
|
|
827
|
+
var frequency = (options != undefined) ? options.frequency : 10000;
|
|
828
|
+
|
|
829
|
+
// successCallback required
|
|
830
|
+
if (typeof successCallback != "function") {
|
|
831
|
+
console.log("Accelerometer Error: successCallback is not a function");
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
// errorCallback optional
|
|
836
|
+
if (errorCallback && (typeof errorCallback != "function")) {
|
|
837
|
+
console.log("Accelerometer Error: errorCallback is not a function");
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
// Start watch timer
|
|
841
|
+
this.id = Cordova.createUUID();
|
|
842
|
+
Cordova.exec(successCallback, errorCallback, "org.apache.cordova.Accelerometer", "watchAcceleration", []);
|
|
843
|
+
return this.id;
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Clears the specified accelerometer watch.
|
|
848
|
+
*
|
|
849
|
+
* @param {String} id The id of the watch returned from #watchAcceleration.
|
|
850
|
+
*/
|
|
851
|
+
Accelerometer.prototype.clearWatch = function(id) {
|
|
852
|
+
|
|
853
|
+
// Stop javascript timer & remove from timer list
|
|
854
|
+
if (id == this.id) {
|
|
855
|
+
Cordova.exec(null, null, "org.apache.cordova.Accelerometer", "clearWatch", []);
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
/*
|
|
860
|
+
* Native callback when watchAcceleration has a new acceleration.
|
|
861
|
+
*/
|
|
862
|
+
Accelerometer.prototype.success = function(id, result) {
|
|
863
|
+
try {
|
|
864
|
+
var accel = new Acceleration(result.x, result.y, result.z, result.timestamp);
|
|
865
|
+
navigator.accelerometer.lastAcceleration = accel;
|
|
866
|
+
navigator.accelerometer.listeners[id].success(accel);
|
|
867
|
+
}
|
|
868
|
+
catch (e) {
|
|
869
|
+
debugPrint("Geolocation Error: "+e.message);
|
|
870
|
+
console.log("Geolocation Error: Error calling success callback function.");
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
if (id == "global") {
|
|
874
|
+
delete navigator.accelerometer.listeners["global"];
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
Cordova.addConstructor(function() {
|
|
879
|
+
if (typeof navigator.accelerometer == "undefined") navigator.accelerometer = new Accelerometer();
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
/*
|
|
883
|
+
* Cordova is available under *either* the terms of the modified BSD license *or* the
|
|
884
|
+
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
|
|
885
|
+
*
|
|
886
|
+
* Copyright (c) 2005-2010, Nitobi Software Inc.
|
|
887
|
+
* Copyright (c) 2010, IBM Corporation
|
|
888
|
+
*/
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Network status.
|
|
892
|
+
*/
|
|
893
|
+
NetworkStatus = {
|
|
894
|
+
NOT_REACHABLE: 0,
|
|
895
|
+
REACHABLE_VIA_CARRIER_DATA_NETWORK: 1,
|
|
896
|
+
REACHABLE_VIA_WIFI_NETWORK: 2
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* This class provides access to device Network data (reachability).
|
|
901
|
+
* @constructor
|
|
902
|
+
*/
|
|
903
|
+
function Network() {
|
|
904
|
+
/**
|
|
905
|
+
* The last known Network status.
|
|
906
|
+
* { hostName: string, ipAddress: string,
|
|
907
|
+
remoteHostStatus: int(0/1/2), internetConnectionStatus: int(0/1/2), localWiFiConnectionStatus: int (0/2) }
|
|
908
|
+
*/
|
|
909
|
+
this.lastReachability = null;
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Determine if a URI is reachable over the network.
|
|
914
|
+
|
|
915
|
+
* @param {Object} uri
|
|
916
|
+
* @param {Function} callback
|
|
917
|
+
* @param {Object} options (isIpAddress:boolean)
|
|
918
|
+
*/
|
|
919
|
+
Network.prototype.isReachable = function(uri, callback, options) {
|
|
920
|
+
var isIpAddress = false;
|
|
921
|
+
if (options && options.isIpAddress) {
|
|
922
|
+
isIpAddress = options.isIpAddress;
|
|
923
|
+
}
|
|
924
|
+
Cordova.exec(callback, null, 'org.apache.cordova.Network', 'isReachable', [uri, isIpAddress]);
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Called by the geolocation framework when the reachability status has changed.
|
|
929
|
+
* @param {Reachibility} reachability The current reachability status.
|
|
930
|
+
*/
|
|
931
|
+
// TODO: Callback from native code not implemented for Android
|
|
932
|
+
Network.prototype.updateReachability = function(reachability) {
|
|
933
|
+
this.lastReachability = reachability;
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
Cordova.addConstructor(function() {
|
|
937
|
+
if (typeof navigator.network == "undefined") navigator.network = new Network();
|
|
938
|
+
});
|
|
939
|
+
/**
|
|
940
|
+
* This class provides access to the debugging console.
|
|
941
|
+
* @constructor
|
|
942
|
+
*/
|
|
943
|
+
function DebugConsole(isDeprecated) {
|
|
944
|
+
this.logLevel = DebugConsole.INFO_LEVEL;
|
|
945
|
+
this.isDeprecated = isDeprecated ? true : false;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
// from most verbose, to least verbose
|
|
949
|
+
DebugConsole.ALL_LEVEL = 1; // same as first level
|
|
950
|
+
DebugConsole.INFO_LEVEL = 1;
|
|
951
|
+
DebugConsole.WARN_LEVEL = 2;
|
|
952
|
+
DebugConsole.ERROR_LEVEL = 4;
|
|
953
|
+
DebugConsole.NONE_LEVEL = 8;
|
|
954
|
+
|
|
955
|
+
DebugConsole.prototype.setLevel = function(level) {
|
|
956
|
+
this.logLevel = level;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Utility function for rendering and indenting strings, or serializing
|
|
961
|
+
* objects to a string capable of being printed to the console.
|
|
962
|
+
* @param {Object|String} message The string or object to convert to an indented string
|
|
963
|
+
* @private
|
|
964
|
+
*/
|
|
965
|
+
DebugConsole.prototype.processMessage = function(message, maxDepth) {
|
|
966
|
+
if (maxDepth === undefined) maxDepth = 0;
|
|
967
|
+
if (typeof(message) != 'object') {
|
|
968
|
+
return (this.isDeprecated ? "WARNING: debug object is deprecated, please use console object " + message : message);
|
|
969
|
+
} else {
|
|
970
|
+
/**
|
|
971
|
+
* @function
|
|
972
|
+
* @ignore
|
|
973
|
+
*/
|
|
974
|
+
function indent(str) {
|
|
975
|
+
return str.replace(/^/mg, " ");
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* @function
|
|
979
|
+
* @ignore
|
|
980
|
+
*/
|
|
981
|
+
function makeStructured(obj, depth) {
|
|
982
|
+
var str = "";
|
|
983
|
+
for (var i in obj) {
|
|
984
|
+
try {
|
|
985
|
+
if (typeof(obj[i]) == 'object' && depth < maxDepth) {
|
|
986
|
+
str += i + ": " + indent(makeStructured(obj[i])) + " ";
|
|
987
|
+
} else {
|
|
988
|
+
str += i + " = " + indent(String(obj[i])).replace(/^ /, "") + " ";
|
|
989
|
+
}
|
|
990
|
+
} catch(e) {
|
|
991
|
+
str += i + " = EXCEPTION: " + e.message + " ";
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
return str;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
return ((this.isDeprecated ? "WARNING: debug object is deprecated, please use console object " : "") + "Object: " + makeStructured(message, maxDepth));
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Print a normal log message to the console
|
|
1003
|
+
* @param {Object|String} message Message or object to print to the console
|
|
1004
|
+
*/
|
|
1005
|
+
DebugConsole.prototype.log = function(message, maxDepth) {
|
|
1006
|
+
if (Cordova.available && this.logLevel <= DebugConsole.INFO_LEVEL)
|
|
1007
|
+
Cordova.exec(null, null, 'org.apache.cordova.DebugConsole', 'log',
|
|
1008
|
+
[this.processMessage(message, maxDepth), 'INFO']
|
|
1009
|
+
);
|
|
1010
|
+
else
|
|
1011
|
+
console.log(message);
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Print a warning message to the console
|
|
1016
|
+
* @param {Object|String} message Message or object to print to the console
|
|
1017
|
+
*/
|
|
1018
|
+
DebugConsole.prototype.warn = function(message, maxDepth) {
|
|
1019
|
+
if (Cordova.available && this.logLevel <= DebugConsole.WARN_LEVEL)
|
|
1020
|
+
Cordova.exec(null, null, 'org.apache.cordova.DebugConsole', 'log',
|
|
1021
|
+
[this.processMessage(message, maxDepth), 'WARN']
|
|
1022
|
+
);
|
|
1023
|
+
else
|
|
1024
|
+
console.error(message);
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Print an error message to the console
|
|
1029
|
+
* @param {Object|String} message Message or object to print to the console
|
|
1030
|
+
*/
|
|
1031
|
+
DebugConsole.prototype.error = function(message, maxDepth) {
|
|
1032
|
+
if (Cordova.available && this.logLevel <= DebugConsole.ERROR_LEVEL)
|
|
1033
|
+
Cordova.exec(null, null, 'org.apache.cordova.DebugConsole', 'log',
|
|
1034
|
+
[this.processMessage(message, maxDepth), 'ERROR']
|
|
1035
|
+
);
|
|
1036
|
+
else
|
|
1037
|
+
console.error(message);
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
Cordova.addConstructor(function() {
|
|
1041
|
+
window.console = new DebugConsole();
|
|
1042
|
+
window.debug = new DebugConsole(true);
|
|
1043
|
+
});
|
|
1044
|
+
/*
|
|
1045
|
+
* Cordova is available under *either* the terms of the modified BSD license *or* the
|
|
1046
|
+
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
|
|
1047
|
+
*
|
|
1048
|
+
* Copyright (c) 2005-2010, Nitobi Software Inc.
|
|
1049
|
+
* Copyright (c) 2010, IBM Corporation
|
|
1050
|
+
*/
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Contains information about a single contact.
|
|
1054
|
+
* @param {DOMString} id unique identifier
|
|
1055
|
+
* @param {DOMString} displayName
|
|
1056
|
+
* @param {ContactName} name
|
|
1057
|
+
* @param {DOMString} nickname
|
|
1058
|
+
* @param {ContactField[]} phoneNumbers array of phone numbers
|
|
1059
|
+
* @param {ContactField[]} emails array of email addresses
|
|
1060
|
+
* @param {ContactAddress[]} addresses array of addresses
|
|
1061
|
+
* @param {ContactField[]} ims instant messaging user ids
|
|
1062
|
+
* @param {ContactOrganization[]} organizations
|
|
1063
|
+
* @param {DOMString} revision date contact was last updated
|
|
1064
|
+
* @param {DOMString} birthday contact's birthday
|
|
1065
|
+
* @param {DOMString} gender contact's gender
|
|
1066
|
+
* @param {DOMString} note user notes about contact
|
|
1067
|
+
* @param {ContactField[]} photos
|
|
1068
|
+
* @param {ContactField[]} urls contact's web sites
|
|
1069
|
+
* @param {DOMString} timezone UTC time zone offset
|
|
1070
|
+
*/
|
|
1071
|
+
|
|
1072
|
+
var Contact = function(id, displayName, name, nickname, phoneNumbers, emails, addresses,
|
|
1073
|
+
ims, organizations, revision, birthday, gender, note, photos, categories, urls, timezone) {
|
|
1074
|
+
this.id = id || null;
|
|
1075
|
+
this.displayName = displayName || null;
|
|
1076
|
+
this.name = name || null; // ContactName
|
|
1077
|
+
this.nickname = nickname || null;
|
|
1078
|
+
this.phoneNumbers = phoneNumbers || null; // ContactField[]
|
|
1079
|
+
this.emails = emails || null; // ContactField[]
|
|
1080
|
+
this.addresses = addresses || null; // ContactAddress[]
|
|
1081
|
+
this.ims = ims || null; // ContactField[]
|
|
1082
|
+
this.organizations = organizations || null; // ContactOrganization[]
|
|
1083
|
+
this.revision = revision || null; // JS Date
|
|
1084
|
+
this.birthday = birthday || null; // JS Date
|
|
1085
|
+
this.gender = gender || null;
|
|
1086
|
+
this.note = note || null;
|
|
1087
|
+
this.photos = photos || null; // ContactField[]
|
|
1088
|
+
this.categories = categories || null;
|
|
1089
|
+
this.urls = urls || null; // ContactField[]
|
|
1090
|
+
this.timezone = timezone || null;
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Removes contact from device storage.
|
|
1095
|
+
* @param successCB success callback
|
|
1096
|
+
* @param errorCB error callback (optional)
|
|
1097
|
+
*/
|
|
1098
|
+
Contact.prototype.remove = function(successCB, errorCB) {
|
|
1099
|
+
if (this.id == null) {
|
|
1100
|
+
var errorObj = new ContactError();
|
|
1101
|
+
errorObj.code = ContactError.NOT_FOUND_ERROR;
|
|
1102
|
+
errorCB(errorObj);
|
|
1103
|
+
}
|
|
1104
|
+
else {
|
|
1105
|
+
Cordova.exec(successCB, errorCB, "org.apache.cordova.Contacts", "remove", [this.id]);
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
1108
|
+
/**
|
|
1109
|
+
* Bada ONLY
|
|
1110
|
+
* displays contact via Bada Contact UI
|
|
1111
|
+
*
|
|
1112
|
+
* @param errorCB error callback
|
|
1113
|
+
*/
|
|
1114
|
+
Contact.prototype.display = function(successCB, errorCB, options) {
|
|
1115
|
+
if (this.id == null) {
|
|
1116
|
+
var errorObj = new ContactError();
|
|
1117
|
+
errorObj.code = ContactError.NOT_FOUND_ERROR;
|
|
1118
|
+
errorCB(errorObj);
|
|
1119
|
+
}
|
|
1120
|
+
else {
|
|
1121
|
+
Cordova.exec(successCB, errorCB, "org.apache.cordova.Contacts","displayContact", [this.id, options]);
|
|
1122
|
+
}
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* Creates a deep copy of this Contact.
|
|
1127
|
+
* With the contact ID set to null.
|
|
1128
|
+
* @return copy of this Contact
|
|
1129
|
+
*/
|
|
1130
|
+
Contact.prototype.clone = function() {
|
|
1131
|
+
var clonedContact = Cordova.clone(this);
|
|
1132
|
+
clonedContact.id = null;
|
|
1133
|
+
// Loop through and clear out any id's in phones, emails, etc.
|
|
1134
|
+
if (clonedContact.phoneNumbers) {
|
|
1135
|
+
for (i=0; i<clonedContact.phoneNumbers.length; i++) {
|
|
1136
|
+
clonedContact.phoneNumbers[i].id = null;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
if (clonedContact.emails) {
|
|
1140
|
+
for (i=0; i<clonedContact.emails.length; i++) {
|
|
1141
|
+
clonedContact.emails[i].id = null;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
if (clonedContact.addresses) {
|
|
1145
|
+
for (i=0; i<clonedContact.addresses.length; i++) {
|
|
1146
|
+
clonedContact.addresses[i].id = null;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
if (clonedContact.ims) {
|
|
1150
|
+
for (i=0; i<clonedContact.ims.length; i++) {
|
|
1151
|
+
clonedContact.ims[i].id = null;
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
if (clonedContact.organizations) {
|
|
1155
|
+
for (i=0; i<clonedContact.organizations.length; i++) {
|
|
1156
|
+
clonedContact.organizations[i].id = null;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
if (clonedContact.photos) {
|
|
1160
|
+
for (i=0; i<clonedContact.photos.length; i++) {
|
|
1161
|
+
clonedContact.photos[i].id = null;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
if (clonedContact.urls) {
|
|
1165
|
+
for (i=0; i<clonedContact.urls.length; i++) {
|
|
1166
|
+
clonedContact.urls[i].id = null;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return clonedContact;
|
|
1170
|
+
};
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Persists contact to device storage.
|
|
1174
|
+
* @param successCB success callback
|
|
1175
|
+
* @param errorCB error callback - optional
|
|
1176
|
+
*/
|
|
1177
|
+
Contact.prototype.save = function(successCB, errorCB) {
|
|
1178
|
+
// Read by Bada to create contact
|
|
1179
|
+
var id = navigator.service.contacts.records.push(this) - 1;
|
|
1180
|
+
Cordova.exec(successCB, errorCB, "org.apache.cordova.Contacts", "save", [id]);
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Contact name.
|
|
1185
|
+
* @param formatted
|
|
1186
|
+
* @param familyName
|
|
1187
|
+
* @param givenName
|
|
1188
|
+
* @param middle
|
|
1189
|
+
* @param prefix
|
|
1190
|
+
* @param suffix
|
|
1191
|
+
*/
|
|
1192
|
+
var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
|
|
1193
|
+
this.formatted = formatted != "undefined" ? formatted : null;
|
|
1194
|
+
this.familyName = familyName != "undefined" ? familyName : null;
|
|
1195
|
+
this.givenName = givenName != "undefined" ? givenName : null;
|
|
1196
|
+
this.middleName = middle != "undefined" ? middle : null;
|
|
1197
|
+
this.honorificPrefix = prefix != "undefined" ? prefix : null;
|
|
1198
|
+
this.honorificSuffix = suffix != "undefined" ? suffix : null;
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* Generic contact field.
|
|
1203
|
+
* @param type
|
|
1204
|
+
* @param value
|
|
1205
|
+
* @param primary
|
|
1206
|
+
* @param id
|
|
1207
|
+
*/
|
|
1208
|
+
var ContactField = function(type, value, pref, id) {
|
|
1209
|
+
this.type = type != "undefined" ? type : null;
|
|
1210
|
+
this.value = value != "undefined" ? value : null;
|
|
1211
|
+
this.pref = pref != "undefined" ? pref : null;
|
|
1212
|
+
this.id = id != "undefined" ? id : null;
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Contact address.
|
|
1217
|
+
* @param formatted
|
|
1218
|
+
* @param streetAddress
|
|
1219
|
+
* @param locality
|
|
1220
|
+
* @param region
|
|
1221
|
+
* @param postalCode
|
|
1222
|
+
* @param country
|
|
1223
|
+
*/
|
|
1224
|
+
var ContactAddress = function(formatted, streetAddress, locality, region, postalCode, country, id) {
|
|
1225
|
+
this.formatted = formatted != "undefined" ? formatted : null;
|
|
1226
|
+
this.streetAddress = streetAddress != "undefined" ? streetAddress : null;
|
|
1227
|
+
this.locality = locality != "undefined" ? locality : null;
|
|
1228
|
+
this.region = region != "undefined" ? region : null;
|
|
1229
|
+
this.postalCode = postalCode != "undefined" ? postalCode : null;
|
|
1230
|
+
this.country = country != "undefined" ? country : null;
|
|
1231
|
+
this.id = id != "undefined" ? id : null;
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* Contact organization.
|
|
1236
|
+
* @param name
|
|
1237
|
+
* @param dept
|
|
1238
|
+
* @param title
|
|
1239
|
+
* @param startDate
|
|
1240
|
+
* @param endDate
|
|
1241
|
+
* @param location
|
|
1242
|
+
* @param desc
|
|
1243
|
+
*/
|
|
1244
|
+
var ContactOrganization = function(name, dept, title, startDate, endDate, location, desc) {
|
|
1245
|
+
this.name = name != "undefined" ? name : null;
|
|
1246
|
+
this.department = dept != "undefined" ? dept : null;
|
|
1247
|
+
this.title = title != "undefined" ? title : null;
|
|
1248
|
+
this.startDate = startDate != "undefined" ? startDate : null;
|
|
1249
|
+
this.endDate = endDate != "undefined" ? endDate : null;
|
|
1250
|
+
this.location = location != "undefined" ? location : null;
|
|
1251
|
+
this.description = desc != "undefined" ? desc : null;
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Contact account.
|
|
1256
|
+
* @param domain
|
|
1257
|
+
* @param username
|
|
1258
|
+
* @param userid
|
|
1259
|
+
*/
|
|
1260
|
+
var ContactAccount = function(domain, username, userid) {
|
|
1261
|
+
this.domain = domain != "undefined" ? domain : null;
|
|
1262
|
+
this.username = username != "undefined" ? username : null;
|
|
1263
|
+
this.userid = userid != "undefined" ? userid : null;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Represents a group of Contacts.
|
|
1268
|
+
*/
|
|
1269
|
+
var Contacts = function() {
|
|
1270
|
+
this.inProgress = false;
|
|
1271
|
+
this.records = new Array(); // used by bada to create contacts
|
|
1272
|
+
this.results = new Array(); // used by bada to update contact results
|
|
1273
|
+
this.resultsCallback = null;
|
|
1274
|
+
this.errorCallback = null;
|
|
1275
|
+
};
|
|
1276
|
+
/**
|
|
1277
|
+
* Returns an array of Contacts matching the search criteria.
|
|
1278
|
+
* @param fields that should be searched
|
|
1279
|
+
* @param successCB success callback
|
|
1280
|
+
* @param errorCB error callback (optional)
|
|
1281
|
+
* @param {ContactFindOptions} options that can be applied to contact searching
|
|
1282
|
+
* @return array of Contacts matching search criteria
|
|
1283
|
+
*/
|
|
1284
|
+
Contacts.prototype.find = function(fields, successCB, errorCB, options) {
|
|
1285
|
+
/* fields searched are: displayName, Email, Phone Number, User Id
|
|
1286
|
+
* other fields are ignored
|
|
1287
|
+
*/
|
|
1288
|
+
Cordova.exec(successCB, errorCB, "org.apache.cordova.Contacts","find",[options.filter]);
|
|
1289
|
+
};
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* need to turn the JSON string representing contact object into actual object
|
|
1293
|
+
* @param JSON string with contact data
|
|
1294
|
+
* Call stored results function with Contact object
|
|
1295
|
+
*/
|
|
1296
|
+
Contacts.prototype._findCallback = function(contact)
|
|
1297
|
+
{
|
|
1298
|
+
if(contact) {
|
|
1299
|
+
try {
|
|
1300
|
+
this.results.push(this.create(contact));
|
|
1301
|
+
} catch(e){
|
|
1302
|
+
console.log("Error parsing contact");
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
/**
|
|
1307
|
+
* Need to return an error object rather than just a single error code
|
|
1308
|
+
* @param error code
|
|
1309
|
+
* Call optional error callback if found.
|
|
1310
|
+
* Called from objective c find, remove, and save methods on error.
|
|
1311
|
+
*/
|
|
1312
|
+
Contacts.prototype._errCallback = function(pluginResult)
|
|
1313
|
+
{
|
|
1314
|
+
var errorObj = new ContactError();
|
|
1315
|
+
errorObj.code = pluginResult.message;
|
|
1316
|
+
pluginResult.message = errorObj;
|
|
1317
|
+
return pluginResult;
|
|
1318
|
+
};
|
|
1319
|
+
// Bada only api to create a new contact via the GUI
|
|
1320
|
+
Contacts.prototype.newContactUI = function(successCallback) {
|
|
1321
|
+
Cordova.exec(successCallback, null, "org.apache.cordova.Contacts","newContact", []);
|
|
1322
|
+
};
|
|
1323
|
+
// Bada only api to select a contact via the GUI
|
|
1324
|
+
Contacts.prototype.chooseContact = function(successCallback, options) {
|
|
1325
|
+
Cordova.exec(successCallback, null, "org.apache.cordova.Contacts","chooseContact", options);
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* This function creates a new contact, but it does not persist the contact
|
|
1331
|
+
* to device storage. To persist the contact to device storage, invoke
|
|
1332
|
+
* contact.save().
|
|
1333
|
+
* @param properties an object who's properties will be examined to create a new Contact
|
|
1334
|
+
* @returns new Contact object
|
|
1335
|
+
*/
|
|
1336
|
+
Contacts.prototype.create = function(properties) {
|
|
1337
|
+
var contact = new Contact();
|
|
1338
|
+
for (i in properties) {
|
|
1339
|
+
if (contact[i]!='undefined') {
|
|
1340
|
+
contact[i]=properties[i];
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
return contact;
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* ContactFindOptions.
|
|
1348
|
+
* @param filter used to match contacts against
|
|
1349
|
+
* @param multiple boolean used to determine if more than one contact should be returned
|
|
1350
|
+
* @param updatedSince return only contact records that have been updated on or after the given time
|
|
1351
|
+
*/
|
|
1352
|
+
var ContactFindOptions = function(filter, multiple, updatedSince) {
|
|
1353
|
+
this.filter = filter || '';
|
|
1354
|
+
this.multiple = multiple || true;
|
|
1355
|
+
this.updatedSince = updatedSince || '';
|
|
1356
|
+
};
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* ContactError.
|
|
1360
|
+
* An error code assigned by an implementation when an error has occurred
|
|
1361
|
+
*/
|
|
1362
|
+
var ContactError = function() {
|
|
1363
|
+
this.code=null;
|
|
1364
|
+
};
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Error codes
|
|
1368
|
+
*/
|
|
1369
|
+
ContactError.UNKNOWN_ERROR = 0;
|
|
1370
|
+
ContactError.INVALID_ARGUMENT_ERROR = 1;
|
|
1371
|
+
ContactError.NOT_FOUND_ERROR = 2;
|
|
1372
|
+
ContactError.TIMEOUT_ERROR = 3;
|
|
1373
|
+
ContactError.PENDING_OPERATION_ERROR = 4;
|
|
1374
|
+
ContactError.IO_ERROR = 5;
|
|
1375
|
+
ContactError.NOT_SUPPORTED_ERROR = 6;
|
|
1376
|
+
ContactError.PERMISSION_DENIED_ERROR = 20;
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Add the contact interface into the browser.
|
|
1380
|
+
*/
|
|
1381
|
+
Cordova.addConstructor(function() {
|
|
1382
|
+
if(typeof navigator.service == "undefined") navigator.service = new Object();
|
|
1383
|
+
if(typeof navigator.service.contacts == "undefined") navigator.service.contacts = new Contacts();
|
|
1384
|
+
});
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
/*
|
|
1388
|
+
* Cordova is available under *either* the terms of the modified BSD license *or* the
|
|
1389
|
+
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
|
|
1390
|
+
*
|
|
1391
|
+
* Copyright (c) 2005-2010, Nitobi Software Inc.
|
|
1392
|
+
* Copyright (c) 2010, IBM Corporation
|
|
1393
|
+
*/
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
|
|
1397
|
+
* phone, etc.
|
|
1398
|
+
* @constructor
|
|
1399
|
+
*/
|
|
1400
|
+
function Device() {
|
|
1401
|
+
this.platform = null;
|
|
1402
|
+
this.version = null;
|
|
1403
|
+
this.name = null;
|
|
1404
|
+
this.uuid = null;
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
Cordova.addConstructor(function() {
|
|
1408
|
+
navigator.device = window.device = window.device || new Device();
|
|
1409
|
+
Cordova.onCordovaInfoReady.fire();
|
|
1410
|
+
});
|
|
1411
|
+
/**
|
|
1412
|
+
* This class provides access to device Compass data.
|
|
1413
|
+
* @constructor
|
|
1414
|
+
*/
|
|
1415
|
+
function Compass() {
|
|
1416
|
+
/**
|
|
1417
|
+
* The last known Compass position.
|
|
1418
|
+
*/
|
|
1419
|
+
this.uuid = null;
|
|
1420
|
+
};
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* Asynchronously aquires the current heading.
|
|
1424
|
+
* @param {Function} successCallback The function to call when the heading
|
|
1425
|
+
* data is available
|
|
1426
|
+
* @param {Function} errorCallback The function to call when there is an error
|
|
1427
|
+
* getting the heading data.
|
|
1428
|
+
* @param {PositionOptions} options The options for getting the heading data
|
|
1429
|
+
* such as timeout.
|
|
1430
|
+
*/
|
|
1431
|
+
Compass.prototype.getCurrentHeading = function(successCallback, errorCallback, options) {
|
|
1432
|
+
Cordova.exec(successCallback, errorCallback, "org.apache.cordova.Compass", "getCurrentHeading", options);
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* Asynchronously aquires the heading repeatedly at a given interval.
|
|
1437
|
+
* @param {Function} successCallback The function to call each time the heading
|
|
1438
|
+
* data is available
|
|
1439
|
+
* @param {Function} errorCallback The function to call when there is an error
|
|
1440
|
+
* getting the heading data.
|
|
1441
|
+
* @param {HeadingOptions} options The options for getting the heading data
|
|
1442
|
+
* such as timeout and the frequency of the watch.
|
|
1443
|
+
*/
|
|
1444
|
+
Compass.prototype.watchHeading= function(successCallback, errorCallback, options) {
|
|
1445
|
+
this.uuid = Cordova.createUUID();
|
|
1446
|
+
Cordova.exec(successCallback, errorCallback, "org.apache.cordova.Compass", "watchHeading", [this.uuid, options.frequency || 3000]);
|
|
1447
|
+
return this.uuid;
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* Clears the specified heading watch.
|
|
1453
|
+
* @param {String} watchId The ID of the watch returned from #watchHeading.
|
|
1454
|
+
*/
|
|
1455
|
+
Compass.prototype.clearWatch = function(watchId) {
|
|
1456
|
+
if(this.uuid == watchId) {
|
|
1457
|
+
Cordova.exec(null, null, "org.apache.cordova.Compass", "clearWatch", [this.uuid]);
|
|
1458
|
+
this.uuid = null;
|
|
1459
|
+
} else {
|
|
1460
|
+
debugPrint('no clear watch');
|
|
1461
|
+
}
|
|
1462
|
+
};
|
|
1463
|
+
|
|
1464
|
+
Cordova.addConstructor(function() {
|
|
1465
|
+
if (typeof navigator.compass == "undefined") navigator.compass = new Compass();
|
|
1466
|
+
});
|
|
1467
|
+
|
|
1468
|
+
/*
|
|
1469
|
+
* Cordova is available under *either* the terms of the modified BSD license *or* the
|
|
1470
|
+
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
|
|
1471
|
+
*
|
|
1472
|
+
* Copyright (c) 2005-2010, Nitobi Software Inc.
|
|
1473
|
+
* Copyright (c) 2010, IBM Corporation
|
|
1474
|
+
*/
|
|
1475
|
+
|
|
1476
|
+
MessageBox.MSGBOX_STYLE_NONE = 0;
|
|
1477
|
+
MessageBox.MSGBOX_STYLE_OK = 1;
|
|
1478
|
+
MessageBox.MSGBOX_STYLE_CANCEL = 2;
|
|
1479
|
+
MessageBox.MSGBOX_STYLE_OKCANCEL = 3;
|
|
1480
|
+
MessageBox.MSGBOX_STYLE_YESNO = 4;
|
|
1481
|
+
MessageBox.MSGBOX_STYLE_YESNOCANCEL = 5;
|
|
1482
|
+
MessageBox.MSGBOX_STYLE_ABORTRETRYIGNORE = 6;
|
|
1483
|
+
MessageBox.MSGBOX_STYLE_CANCELTRYCONTINUE = 7;
|
|
1484
|
+
MessageBox.MSGBOX_STYLE_RETRYCANCEL = 8;
|
|
1485
|
+
|
|
1486
|
+
/**
|
|
1487
|
+
* This class provides access to notifications on the device.
|
|
1488
|
+
*/
|
|
1489
|
+
function Notification() {
|
|
1490
|
+
this.messageBox = new MessageBox("Test Alert", "This is an alert", "OK");
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
/*
|
|
1494
|
+
* MessageBox: used by Bada to retrieve Dialog Information
|
|
1495
|
+
*/
|
|
1496
|
+
|
|
1497
|
+
function MessageBox(title, message, messageBoxStyle) {
|
|
1498
|
+
this.title = title;
|
|
1499
|
+
this.message = message;
|
|
1500
|
+
this.messageBoxStyle = messageBoxStyle;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
labelsToBoxStyle = function(buttonLabels) {
|
|
1504
|
+
if(!buttonLabels)
|
|
1505
|
+
return MessageBox.MSGBOX_STYLE_NONE;
|
|
1506
|
+
if(buttonLabels == "OK")
|
|
1507
|
+
return MessageBox.MSGBOX_STYLE_OK;
|
|
1508
|
+
if(buttonLabels == "Cancel")
|
|
1509
|
+
return MessageBox.MSGBOX_STYLE_CANCEL;
|
|
1510
|
+
if(buttonLabels == "OK,Cancel")
|
|
1511
|
+
return MessageBox.MSGBOX_STYLE_OKCANCEL;
|
|
1512
|
+
if(buttonLabels == "Yes,No")
|
|
1513
|
+
return MessageBox.MSGBOX_STYLE_YESNO;
|
|
1514
|
+
if(buttonLabels == "Yes,No,Cancel")
|
|
1515
|
+
return MessageBox.MSGBOX_STYLE_YESNOCANCEL;
|
|
1516
|
+
if(buttonLabels == "Abort,Retry,Ignore")
|
|
1517
|
+
return MessageBox.MSGBOX_STYLE_ABORTRETRYIGNORE;
|
|
1518
|
+
if(buttonLabels == "Cancel,Try,Continue")
|
|
1519
|
+
return MessageBox.MSGBOX_STYLE_CANCELTRYCONTINUE;
|
|
1520
|
+
if(buttonLabels == "Retry,Cancel")
|
|
1521
|
+
return MessageBox.MSGBOX_STYLE_RETRYCANCEL;
|
|
1522
|
+
|
|
1523
|
+
return MessageBox.MSGBOX_STYLE_NONE;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* Open a native alert dialog, with a customizable title and button text.
|
|
1528
|
+
* @param {String} message Message to print in the body of the alert
|
|
1529
|
+
* @param {Function} completeCallback The callback that is invoked when user clicks a button.
|
|
1530
|
+
* @param {String} title Title of the alert dialog (default: 'Alert')
|
|
1531
|
+
* @param {String} buttonLabel Label of the close button (default: 'OK')
|
|
1532
|
+
*/
|
|
1533
|
+
Notification.prototype.alert = function(message, completeCallback, title, buttonLabel) {
|
|
1534
|
+
var _title = (title || "Alert");
|
|
1535
|
+
this.messageBox = new MessageBox(_title, message, labelsToBoxStyle(buttonLabel));
|
|
1536
|
+
Cordova.exec(completeCallback, null, 'org.apache.cordova.Notification', 'alert', []);
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* Open a custom confirmation dialog, with a customizable title and button text.
|
|
1541
|
+
* @param {String} message Message to print in the body of the dialog
|
|
1542
|
+
* @param {Function}resultCallback The callback that is invoked when a user clicks a button.
|
|
1543
|
+
* @param {String} title Title of the alert dialog (default: 'Confirm')
|
|
1544
|
+
* @param {String} buttonLabels Comma separated list of the button labels (default: 'OK,Cancel')
|
|
1545
|
+
*/
|
|
1546
|
+
Notification.prototype.confirm = function(message, resultCallback, title, buttonLabels) {
|
|
1547
|
+
var _title = (title || "Confirm");
|
|
1548
|
+
var _buttonLabels = (buttonLabels || "OK,Cancel");
|
|
1549
|
+
this.messageBox = new MessageBox(_title, message, labelsToBoxStyle(buttonLabels));
|
|
1550
|
+
return Cordova.exec(resultCallback, null, 'org.apache.cordova.Notification', 'confirm', []);
|
|
1551
|
+
};
|
|
1552
|
+
|
|
1553
|
+
/**
|
|
1554
|
+
* Causes the device to vibrate.
|
|
1555
|
+
* @param {Integer} mills The number of milliseconds to vibrate for.
|
|
1556
|
+
*/
|
|
1557
|
+
Notification.prototype.vibrate = function(mills) {
|
|
1558
|
+
Cordova.exec(null, null, 'org.apache.cordova.Notification', 'vibrate', [mills]);
|
|
1559
|
+
};
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* Causes the device to beep.
|
|
1563
|
+
* @param {Integer} count The number of beeps.
|
|
1564
|
+
*/
|
|
1565
|
+
Notification.prototype.beep = function(count) {
|
|
1566
|
+
Cordova.exec(null, null, 'org.apache.cordova.Notification', 'beep', [count]);
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
Cordova.addConstructor(function() {
|
|
1570
|
+
if (typeof navigator.notification == "undefined") navigator.notification = new Notification();
|
|
1571
|
+
});
|
|
1572
|
+
|
|
1573
|
+
/*
|
|
1574
|
+
* Cordova is available under *either* the terms of the modified BSD license *or* the
|
|
1575
|
+
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
|
|
1576
|
+
*
|
|
1577
|
+
* Copyright (c) 2005-2010, Nitobi Software Inc.
|
|
1578
|
+
* Copyright (c) 2010, IBM Corporation
|
|
1579
|
+
*/
|
|
1580
|
+
|
|
1581
|
+
/**
|
|
1582
|
+
* This class provides access to the device camera.
|
|
1583
|
+
*
|
|
1584
|
+
* @constructor
|
|
1585
|
+
*/
|
|
1586
|
+
Camera = function() {
|
|
1587
|
+
this.options = null;
|
|
1588
|
+
};
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Format of image that returned from getPicture.
|
|
1592
|
+
*
|
|
1593
|
+
* Example: navigator.camera.getPicture(success, fail,
|
|
1594
|
+
* { quality: 80,
|
|
1595
|
+
* destinationType: Camera.DestinationType.DATA_URL,
|
|
1596
|
+
* sourceType: Camera.PictureSourceType.PHOTOLIBRARY})
|
|
1597
|
+
*/
|
|
1598
|
+
Camera.DestinationType = {
|
|
1599
|
+
DATA_URL: 0, // Return base64 encoded string
|
|
1600
|
+
FILE_URI: 1 // Return file URI
|
|
1601
|
+
};
|
|
1602
|
+
Camera.prototype.DestinationType = Camera.DestinationType;
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* Source to getPicture from.
|
|
1606
|
+
*
|
|
1607
|
+
* Example: navigator.camera.getPicture(success, fail,
|
|
1608
|
+
* { quality: 80,
|
|
1609
|
+
* destinationType: Camera.DestinationType.DATA_URL,
|
|
1610
|
+
* sourceType: Camera.PictureSourceType.PHOTOLIBRARY})
|
|
1611
|
+
*/
|
|
1612
|
+
Camera.PictureSourceType = { // Ignored on Blackberry
|
|
1613
|
+
PHOTOLIBRARY : 0, // Choose image from picture library
|
|
1614
|
+
CAMERA : 1, // Take picture from camera
|
|
1615
|
+
SAVEDPHOTOALBUM : 2 // Choose image from picture library
|
|
1616
|
+
};
|
|
1617
|
+
Camera.prototype.PictureSourceType = Camera.PictureSourceType;
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* Gets a picture from source defined by "options.sourceType", and returns the
|
|
1621
|
+
* image as defined by the "options.destinationType" option.
|
|
1622
|
+
|
|
1623
|
+
* The defaults are sourceType=CAMERA and destinationType=DATA_URL.
|
|
1624
|
+
*
|
|
1625
|
+
* @param {Function} successCallback
|
|
1626
|
+
* @param {Function} errorCallback
|
|
1627
|
+
* @param {Object} options
|
|
1628
|
+
*/
|
|
1629
|
+
Camera.prototype.getPicture = function(successCallback, errorCallback, options) {
|
|
1630
|
+
|
|
1631
|
+
// successCallback required
|
|
1632
|
+
if (typeof successCallback != "function") {
|
|
1633
|
+
console.log("Camera Error: successCallback is not a function");
|
|
1634
|
+
return;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
// errorCallback optional
|
|
1638
|
+
if (errorCallback && (typeof errorCallback != "function")) {
|
|
1639
|
+
console.log("Camera Error: errorCallback is not a function");
|
|
1640
|
+
return;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
this.options = options;
|
|
1644
|
+
var quality = 80;
|
|
1645
|
+
if (options.quality) {
|
|
1646
|
+
quality = this.options.quality;
|
|
1647
|
+
}
|
|
1648
|
+
var destinationType = Camera.DestinationType.DATA_URL;
|
|
1649
|
+
if (this.options.destinationType) {
|
|
1650
|
+
destinationType = this.options.destinationType;
|
|
1651
|
+
}
|
|
1652
|
+
var sourceType = Camera.PictureSourceType.CAMERA;
|
|
1653
|
+
if (typeof this.options.sourceType == "number") {
|
|
1654
|
+
sourceType = this.options.sourceType;
|
|
1655
|
+
}
|
|
1656
|
+
Cordova.exec(successCallback, errorCallback, "org.apache.cordova.Camera", "getPicture", [quality, destinationType, sourceType]);
|
|
1657
|
+
};
|
|
1658
|
+
|
|
1659
|
+
Cordova.addConstructor(function() {
|
|
1660
|
+
if (typeof navigator.camera == "undefined") navigator.camera = new Camera();
|
|
1661
|
+
});
|