incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deedu...@apache.org
Subject [1/19] git commit: CB-226 Rename to Cordova.
Date Wed, 08 Feb 2012 20:14:01 GMT
Updated Branches:
  refs/heads/master c2795fcfd -> 05319d3ca


CB-226 Rename to Cordova.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/commit/05319d3c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/tree/05319d3c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/diff/05319d3c

Branch: refs/heads/master
Commit: 05319d3ca7c60b1d3a6f33792bff76975bef018a
Parents: c2795fc
Author: Drew Walters <deedubbu@apache.org>
Authored: Wed Feb 8 14:12:20 2012 -0600
Committer: Drew Walters <deedubbu@apache.org>
Committed: Wed Feb 8 14:12:20 2012 -0600

----------------------------------------------------------------------
 README.md                                          |   54 +-
 build.xml                                          |   36 +-
 framework/ext-air/Cordova_Network/library.xml      |   22 +
 .../src/org/apache/cordova/network/Network.as      |   80 +
 framework/ext-air/PhoneGap_Network/library.xml     |   22 -
 .../src/com/phonegap/network/Network.as            |   81 -
 framework/ext/.project                             |    2 +-
 framework/ext/BlackBerry_App_Descriptor.xml        |    4 +-
 .../ext/src/com/phonegap/PhoneGapExtension.java    |  210 ---
 .../com/phonegap/accelerometer/Accelerometer.java  |  225 ---
 framework/ext/src/com/phonegap/api/IPlugin.java    |   71 -
 framework/ext/src/com/phonegap/api/Plugin.java     |  114 --
 .../ext/src/com/phonegap/api/PluginManager.java    |  169 --
 .../com/phonegap/api/PluginManagerFunction.java    |  240 ---
 .../ext/src/com/phonegap/api/PluginResult.java     |  146 --
 framework/ext/src/com/phonegap/app/App.java        |  147 --
 .../ext/src/com/phonegap/battery/Battery.java      |  211 ---
 framework/ext/src/com/phonegap/camera/Camera.java  |  430 -----
 .../ext/src/com/phonegap/camera/CameraOptions.java |  170 --
 .../ext/src/com/phonegap/camera/PhotoListener.java |  107 --
 framework/ext/src/com/phonegap/device/Device.java  |   68 -
 framework/ext/src/com/phonegap/file/Entry.java     |   66 -
 framework/ext/src/com/phonegap/file/File.java      |   84 -
 .../ext/src/com/phonegap/file/FileManager.java     | 1001 -----------
 framework/ext/src/com/phonegap/file/FileUtils.java |  675 -------
 .../src/com/phonegap/geolocation/Geolocation.java  |  372 ----
 .../phonegap/geolocation/GeolocationListener.java  |  133 --
 .../phonegap/geolocation/GeolocationResult.java    |   73 -
 .../phonegap/geolocation/GeolocationStatus.java    |   36 -
 .../ext/src/com/phonegap/geolocation/Position.java |  133 --
 .../com/phonegap/geolocation/PositionOptions.java  |   42 -
 .../ext/src/com/phonegap/http/FileTransfer.java    |  376 ----
 .../src/com/phonegap/http/FileUploadResult.java    |   63 -
 .../ext/src/com/phonegap/http/FileUploader.java    |  258 ---
 framework/ext/src/com/phonegap/http/HttpUtils.java |   66 -
 framework/ext/src/com/phonegap/json4j/JSON.java    |  208 ---
 .../ext/src/com/phonegap/json4j/JSONArray.java     | 1124 ------------
 .../ext/src/com/phonegap/json4j/JSONArtifact.java  |  119 --
 .../ext/src/com/phonegap/json4j/JSONException.java |   56 -
 .../ext/src/com/phonegap/json4j/JSONObject.java    | 1368 ---------------
 .../ext/src/com/phonegap/json4j/JSONString.java    |   33 -
 .../ext/src/com/phonegap/json4j/JSONStringer.java  |   59 -
 .../ext/src/com/phonegap/json4j/JSONWriter.java    |  587 -------
 .../com/phonegap/json4j/internal/JSON4JNumber.java |   23 -
 .../json4j/internal/JSON4JPBackReader.java         |   48 -
 .../json4j/internal/JSON4JStringReader.java        |   55 -
 .../json4j/internal/JSON4JStringWriter.java        |   69 -
 .../com/phonegap/json4j/internal/NumberUtil.java   |  110 --
 .../src/com/phonegap/json4j/internal/Parser.java   |  344 ----
 .../com/phonegap/json4j/internal/Serializer.java   |  354 ----
 .../json4j/internal/SerializerVerbose.java         |  103 --
 .../src/com/phonegap/json4j/internal/Token.java    |  116 --
 .../com/phonegap/json4j/internal/Tokenizer.java    |  620 -------
 .../com/phonegap/media/AudioCaptureListener.java   |   80 -
 .../com/phonegap/media/AudioCaptureOperation.java  |  133 --
 .../ext/src/com/phonegap/media/AudioControl.java   |   75 -
 .../ext/src/com/phonegap/media/CameraControl.java  |   87 -
 .../ext/src/com/phonegap/media/CaptureControl.java |  176 --
 .../ext/src/com/phonegap/media/CaptureMode.java    |   87 -
 .../src/com/phonegap/media/CaptureOperation.java   |  202 ---
 .../com/phonegap/media/ImageCaptureListener.java   |   84 -
 .../com/phonegap/media/ImageCaptureOperation.java  |  161 --
 .../ext/src/com/phonegap/media/MediaCapture.java   |  504 ------
 .../ext/src/com/phonegap/media/MediaQueue.java     |   44 -
 .../com/phonegap/media/VideoCaptureListener.java   |  104 --
 .../com/phonegap/media/VideoCaptureOperation.java  |  125 --
 .../com/phonegap/network/ConnectionInfoAction.java |  387 ----
 .../ext/src/com/phonegap/network/Network.java      |   66 -
 .../com/phonegap/notification/ActivityDialog.java  |  146 --
 .../src/com/phonegap/notification/AlertAction.java |   83 -
 .../src/com/phonegap/notification/AlertDialog.java |   68 -
 .../src/com/phonegap/notification/BeepAction.java  |  160 --
 .../com/phonegap/notification/ConfirmAction.java   |   85 -
 .../com/phonegap/notification/ConfirmDialog.java   |  100 --
 .../com/phonegap/notification/Notification.java    |  135 --
 .../com/phonegap/notification/ProgressDialog.java  |  182 --
 .../com/phonegap/notification/VibrateAction.java   |   64 -
 framework/ext/src/com/phonegap/pim/Contact.java    |  430 -----
 framework/ext/src/com/phonegap/ui/SpacerField.java |   71 -
 .../src/com/phonegap/util/ApplicationUtils.java    |  108 --
 framework/ext/src/com/phonegap/util/Log.java       |   83 -
 .../ext/src/com/phonegap/util/LogFunction.java     |   41 -
 framework/ext/src/com/phonegap/util/Logger.java    |  155 --
 .../ext/src/com/phonegap/util/StringUtils.java     |  103 --
 framework/ext/src/library.xml                      |    4 +-
 .../src/org/apache/cordova/CordovaExtension.java   |  208 +++
 .../cordova/accelerometer/Accelerometer.java       |  225 +++
 .../ext/src/org/apache/cordova/api/IPlugin.java    |   71 +
 .../ext/src/org/apache/cordova/api/Plugin.java     |  114 ++
 .../src/org/apache/cordova/api/PluginManager.java  |  168 ++
 .../apache/cordova/api/PluginManagerFunction.java  |  240 +++
 .../src/org/apache/cordova/api/PluginResult.java   |  146 ++
 framework/ext/src/org/apache/cordova/app/App.java  |  147 ++
 .../src/org/apache/cordova/battery/Battery.java    |  210 +++
 .../ext/src/org/apache/cordova/camera/Camera.java  |  430 +++++
 .../org/apache/cordova/camera/CameraOptions.java   |  170 ++
 .../org/apache/cordova/camera/PhotoListener.java   |  107 ++
 .../ext/src/org/apache/cordova/device/Device.java  |   68 +
 .../ext/src/org/apache/cordova/file/Entry.java     |   66 +
 .../ext/src/org/apache/cordova/file/File.java      |   84 +
 .../src/org/apache/cordova/file/FileManager.java   | 1001 +++++++++++
 .../ext/src/org/apache/cordova/file/FileUtils.java |  675 +++++++
 .../apache/cordova/geolocation/Geolocation.java    |  372 ++++
 .../cordova/geolocation/GeolocationListener.java   |  133 ++
 .../cordova/geolocation/GeolocationResult.java     |   73 +
 .../cordova/geolocation/GeolocationStatus.java     |   36 +
 .../org/apache/cordova/geolocation/Position.java   |  133 ++
 .../cordova/geolocation/PositionOptions.java       |   42 +
 .../src/org/apache/cordova/http/FileTransfer.java  |  376 ++++
 .../org/apache/cordova/http/FileUploadResult.java  |   63 +
 .../src/org/apache/cordova/http/FileUploader.java  |  258 +++
 .../ext/src/org/apache/cordova/http/HttpUtils.java |   66 +
 .../ext/src/org/apache/cordova/json4j/JSON.java    |  208 +++
 .../src/org/apache/cordova/json4j/JSONArray.java   | 1123 ++++++++++++
 .../org/apache/cordova/json4j/JSONArtifact.java    |  118 ++
 .../org/apache/cordova/json4j/JSONException.java   |   55 +
 .../src/org/apache/cordova/json4j/JSONObject.java  | 1367 ++++++++++++++
 .../src/org/apache/cordova/json4j/JSONString.java  |   32 +
 .../org/apache/cordova/json4j/JSONStringer.java    |   58 +
 .../src/org/apache/cordova/json4j/JSONWriter.java  |  586 ++++++
 .../cordova/json4j/internal/JSON4JNumber.java      |   22 +
 .../cordova/json4j/internal/JSON4JPBackReader.java |   47 +
 .../json4j/internal/JSON4JStringReader.java        |   54 +
 .../json4j/internal/JSON4JStringWriter.java        |   68 +
 .../apache/cordova/json4j/internal/NumberUtil.java |  109 ++
 .../org/apache/cordova/json4j/internal/Parser.java |  338 ++++
 .../apache/cordova/json4j/internal/Serializer.java |  353 ++++
 .../cordova/json4j/internal/SerializerVerbose.java |  102 ++
 .../org/apache/cordova/json4j/internal/Token.java  |  115 ++
 .../apache/cordova/json4j/internal/Tokenizer.java  |  619 +++++++
 .../apache/cordova/media/AudioCaptureListener.java |   80 +
 .../cordova/media/AudioCaptureOperation.java       |  133 ++
 .../src/org/apache/cordova/media/AudioControl.java |   75 +
 .../org/apache/cordova/media/CameraControl.java    |   87 +
 .../org/apache/cordova/media/CaptureControl.java   |  169 ++
 .../src/org/apache/cordova/media/CaptureMode.java  |   87 +
 .../org/apache/cordova/media/CaptureOperation.java |  202 +++
 .../apache/cordova/media/ImageCaptureListener.java |   84 +
 .../cordova/media/ImageCaptureOperation.java       |  161 ++
 .../src/org/apache/cordova/media/MediaCapture.java |  504 ++++++
 .../src/org/apache/cordova/media/MediaQueue.java   |   44 +
 .../apache/cordova/media/VideoCaptureListener.java |  104 ++
 .../cordova/media/VideoCaptureOperation.java       |  124 ++
 .../cordova/network/ConnectionInfoAction.java      |  387 ++++
 .../src/org/apache/cordova/network/Network.java    |   66 +
 .../cordova/notification/ActivityDialog.java       |  146 ++
 .../apache/cordova/notification/AlertAction.java   |   83 +
 .../apache/cordova/notification/AlertDialog.java   |   68 +
 .../apache/cordova/notification/BeepAction.java    |  160 ++
 .../apache/cordova/notification/ConfirmAction.java |   85 +
 .../apache/cordova/notification/ConfirmDialog.java |  100 ++
 .../apache/cordova/notification/Notification.java  |  135 ++
 .../cordova/notification/ProgressDialog.java       |  182 ++
 .../apache/cordova/notification/VibrateAction.java |   64 +
 .../ext/src/org/apache/cordova/pim/Contact.java    |  430 +++++
 .../ext/src/org/apache/cordova/ui/SpacerField.java |   71 +
 .../org/apache/cordova/util/ApplicationUtils.java  |  108 ++
 framework/ext/src/org/apache/cordova/util/Log.java |   83 +
 .../src/org/apache/cordova/util/LogFunction.java   |   41 +
 .../ext/src/org/apache/cordova/util/Logger.java    |  155 ++
 .../src/org/apache/cordova/util/StringUtils.java   |  103 ++
 javascript/_cordova.js                             |  685 ++++++++
 javascript/_phonegap.js                            |  685 --------
 javascript/accelerometer.js                        |   16 +-
 javascript/app.js                                  |   30 +-
 javascript/blackberry/battery.js                   |   18 +-
 javascript/blackberry/blackberryPluginManager.js   |   50 +-
 javascript/button.js                               |    8 +-
 javascript/camera.js                               |   16 +-
 javascript/capture.js                              |  152 +-
 javascript/console.js                              |   16 +-
 javascript/contact.js                              |  266 ++--
 javascript/device.js                               |   22 +-
 javascript/file.js                                 |  328 ++--
 javascript/filetransfer.js                         |    4 +-
 javascript/geolocation.js                          |   56 +-
 javascript/network.js                              |   12 +-
 javascript/notification.js                         |   26 +-
 javascript/playbook/battery.js                     |    8 +-
 javascript/playbook/playBookPluginManager.js       |   44 +-
 javascript/webWorksPluginManager.js                |   16 +-
 template/dist/README.md                            |   10 +-
 template/plugin/build.xml                          |    6 +-
 .../plugin/src/com/phonegap/plugins/Example.java   |    8 +-
 .../src/com/phonegap/plugins/ExampleAction.java    |    4 +-
 template/plugin/www/javascript/example.js          |   13 +-
 template/project/build.xml                         |    2 +-
 template/project/playbook.xml                      |    6 +-
 template/project/www/config.xml                    |   10 +-
 template/project/www/index.html                    |   24 +-
 template/project/www/plugins.xml                   |   24 +-
 191 files changed, 16810 insertions(+), 16848 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 1cdacad..be72a45 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,13 @@
-PhoneGap BlackBerry WebWorks
+Cordova BlackBerry WebWorks
 ============================
 
-[PhoneGap framework](http://www.phonegap.com/) for __BlackBerry Tablet OS and Smartphones__. The framework is implemented using the [BlackBerry WebWorks SDK](http://us.blackberry.com/developers/tablet/webworks.jsp).
+[Cordova framework](http://incubator.apache.org/callback/) for __BlackBerry Tablet OS and Smartphones__. The framework is implemented using the [BlackBerry WebWorks SDK](http://us.blackberry.com/developers/tablet/webworks.jsp).
 
 Directory Structure
 -------------------
 
-    framework/ ... BlackBerry WebWorks JavaScript Extension (PhoneGap native code)
-    javascript/ .. PhoneGap JavaScript (Non-concatenated, non-minified)
+    framework/ ... BlackBerry WebWorks JavaScript Extension (Cordova native code)
+    javascript/ .. Cordova JavaScript (Non-concatenated, non-minified)
     lib/ ......... Third party tools
     template/ .... Project template for creating a new projects
 
@@ -18,42 +18,42 @@ BlackBerry WebWorks is a framework for developing web-based applications for Bla
 
 The WebWorks framework allows developers to create applications using web content and resources (HTML/CSS/JavaScript) that are able to access device features through the [Blackberry WebWorks API](http://www.blackberry.com/developers/docs/widgetapi/).  In addition, the framework allows developers to create their own WebWorks JavaScript Extensions to expose additional device capabilities through JavaScript APIs.  These extensions are written using either the BlackBerry Java API for SmartPhones, or Adobe AIR for the Tablet OS.
 
-The phonegap-blackberry-webworks platform allows web developers to develop applications targeting BlackBerry 5.0 and higher devices using the common [PhoneGap API](http://docs.phonegap.com).  When possible, PhoneGap makes use of the WebWorks JavaScript API; however, most PhoneGap features are implemented in the native Java environment as a WebWorks JavaScript Extension.
+The cordova-blackberry-webworks platform allows web developers to develop applications targeting BlackBerry 5.0 and higher devices using the common [Cordova API](http://docs.phonegap.com).  When possible, Cordova makes use of the WebWorks JavaScript API; however, most Cordova features are implemented in the native Java environment as a WebWorks JavaScript Extension.
 
 
 Getting Started
 ===============
 
-Several guides are available on the [PhoneGap Wiki](http://wiki.phonegap.com) to help you get started developing for the phonegap-blackberry-webworks platform.  This guide will help you install and configure the BlackBerry WebWorks development environment, and the phonegap-blackberry-webworks platform.  It will also step you through the process of creating a PhoneGap project.  
+Several guides are available on the [Cordova Wiki](http://wiki.phonegap.com) to help you get started developing for the cordova-blackberry-webworks platform.  This guide will help you install and configure the BlackBerry WebWorks development environment, and the cordova-blackberry-webworks platform.  It will also step you through the process of creating a Cordova project.
 
-[Getting Started with PhoneGap BlackBerry WebWorks](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks)
+[Getting Started with Cordova BlackBerry WebWorks](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks)
 
-This guide is for advanced developers who wish to develop their own phonegap-blackberry-webworks plugin.
+This guide is for advanced developers who wish to develop their own cordova-blackberry-webworks plugin.
 
-[How To Create a PhoneGap Plugin for PhoneGap BlackBerry WebWorks](http://wiki.phonegap.com/w/page/35799737/How-To-Create-a-PhoneGap-Plugin-for-BlackBerry-WebWorks)
+[How To Create a Cordova Plugin for Cordova BlackBerry WebWorks](http://wiki.phonegap.com/w/page/35799737/How-To-Create-a-PhoneGap-Plugin-for-BlackBerry-WebWorks)
 
 
-Installing the phonegap-blackberry-webworks Framework
+Installing the cordova-blackberry-webworks Framework
 =====================================================
 
-Cloning the phonegap-blackberry-webworks repository always provides you with the latest (EDGE) version of the PhoneGap code.  To clone the repository, do the following:
+Cloning the cordova-blackberry-webworks repository always provides you with the latest (EDGE) version of the Cordova code.  To clone the repository, do the following:
 
     $ cd C:\some\path\
-    $ git clone git://github.com/phonegap/phonegap-blackberry-webworks.git
+    $ git clone git://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks.git
 
-As an alternative, you can download packaged releases of PhoneGap from the [PhoneGap web site](http://phonegap.com).  If choosing this method, simply unzip the PhoneGap packaged code and navigate to the BlackBerry/WebWorks directory.  The steps below remain the same.
+As an alternative, you can download packaged releases of Cordova from the [PhoneGap web site](http://phonegap.com).  If choosing this method, simply unzip the Cordova packaged code and navigate to the BlackBerry/WebWorks directory.  The steps below remain the same.
 
 
-Creating a New PhoneGap Project
+Creating a New Cordova Project
 -------------------------------
 
-The PhoneGap build script enables you to create multiple, independent PhoneGap projects.
+The Cordova build script enables you to create multiple, independent Cordova projects.
 
-(Note: The PhoneGap build script requries Apache ANT 1.8 or higher.  See the [Getting Started guide](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks) for instructions on how to install and configure Apache ANT).
+(Note: The Cordova build script requries Apache ANT 1.8 or higher.  See the [Getting Started guide](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks) for instructions on how to install and configure Apache ANT).
 
-The build script packages the PhoneGap source code and resources into each project you create.  This allows you to easily distribute the project to other BlackBerry WebWorks developers.  To create a PhoneGap project:
+The build script packages the Cordova source code and resources into each project you create.  This allows you to easily distribute the project to other BlackBerry WebWorks developers.  To create a Cordova project:
 
-    $ cd phonegap-blackberry-webworks
+    $ cd cordova-blackberry-webworks
     $ ant help
 
     $ ant create -Dproject.path="C:\development\my_new_project"
@@ -68,7 +68,7 @@ For each project, you need to tell ANT where you installed the BlackBerry WebWor
 Building and Deploying a Project
 --------------------------------
 
-The PhoneGap build scripts automate common tasks, such as compiling your project, and deploying it to simulators or devices.  To see what options are available, use:
+The Cordova build scripts automate common tasks, such as compiling your project, and deploying it to simulators or devices.  To see what options are available, use:
 
     $ cd C:\development\my_new_project
     $ ant help
@@ -88,20 +88,20 @@ To build your project and load it onto a USB-attached device:
 
     $ ant TARGET load-device
 
-Updating the PhoneGap Framework
+Updating the Cordova Framework
 -------------------------------
 
-As you develop your application, there may be updates made to the PhoneGap source code.  To incorporate PhoneGap changes into your project, use the build script as follows:
+As you develop your application, there may be updates made to the Cordova source code.  To incorporate Cordova changes into your project, use the build script as follows:
 
-    $ cd phonegap-blackberry-webworks
+    $ cd cordova-blackberry-webworks
     $ git pull origin master
 
     $ ant update -Dproject.path="C:\development\my_new_project"
 
-Customizing PhoneGap
+Customizing Cordova
 --------------------
 
-By default, PhoneGap gives access to all the core PhoneGap APIs as detailed at docs.phonegap.com. 
+By default, Cordova gives access to all the core Cordova APIs as detailed at docs.phonegap.com.
 If you want to remove some of those APIs you can do so by editing the plugins.xml document in your 
 application root. You need to edit the plugins.xml file to add third-party plugins to your application 
 as well.
@@ -132,10 +132,10 @@ __Q: My simulator screen is not refreshing and I see blocks on a clicked positio
 
 __A:__ Windows 7 and the simulator's graphics acceleration do not mix. On the simulator, set View -> Graphics Acceleration to Off.
 
-__Q: When I use the PhoneGap [Camera.getPicture API](http://docs.phonegap.com/phonegap_camera_camera.md.html#camera.getPicture) on my device, the camera never returns to my application.  Why does this happen?__
+__Q: When I use the Cordova [Camera.getPicture API](http://docs.phonegap.com/phonegap_camera_camera.md.html#camera.getPicture) on my device, the camera never returns to my application.  Why does this happen?__
 
-__A:__ PhoneGap uses a JavaScript Extension to invoke the native camera application so the user can take a picture.  When the picture is taken, PhoneGap will close the native camera application by emulating a key injection (pressing the back/escape button).  On a physical device, users will have to set permissions to allow the application to simulate key injections.  Setting application permissions is device-specific.  On a Storm2 (9550), for example, select the BlackBerry button from the Home screen to get to All Applications screen, then Options > Applications > Your Application.  Then select Edit Default Permissions > Interactions > Input Simulation and set it to 'Allow'.  Save your changes.
+__A:__ Cordova uses a JavaScript Extension to invoke the native camera application so the user can take a picture.  When the picture is taken, Cordova will close the native camera application by emulating a key injection (pressing the back/escape button).  On a physical device, users will have to set permissions to allow the application to simulate key injections.  Setting application permissions is device-specific.  On a Storm2 (9550), for example, select the BlackBerry button from the Home screen to get to All Applications screen, then Options > Applications > Your Application.  Then select Edit Default Permissions > Interactions > Input Simulation and set it to 'Allow'.  Save your changes.
 
-__Q: None of the PhoneGap APIs are working, why is that?__
+__Q: None of the Cordova APIs are working, why is that?__
 
 __A:__ You probably need to update your plugins.xml file in the root of your application.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 0dd8545..b00013e 100644
--- a/build.xml
+++ b/build.xml
@@ -1,4 +1,4 @@
-<project name="Create &amp; Update a PhoneGap BlackBerry WebWorks Project or Plugin" default="help">
+<project name="Create &amp; Update a Cordova BlackBerry WebWorks Project or Plugin" default="help">
     
     <!-- LOAD VERSION -->
     
@@ -15,7 +15,7 @@
     <property name="template.dist.dir"    location="template/dist" />
     
     <property name="build.dir"            location="build" />
-    <property name="update.dir"           value="lib/phonegap.${version}" />
+    <property name="update.dir"           value="lib/cordova.${version}" />
     
     <property name="dist.path"         location="dist" />
     <property name="dist.www.path"     location="${dist.path}/www" />
@@ -23,7 +23,7 @@
     
     <property name="jar.src"      location="framework/ext/src" />
     <property name="jar.path"     value="ext" />
-    <property name="jar.basename" value="phonegap.${version}.jar" />
+    <property name="jar.basename" value="cordova.${version}.jar" />
     <property name="jar.file"     value="${jar.path}/${jar.basename}" />
     
     <property name="playbook.js.src"    location="javascript/playbook" />
@@ -34,7 +34,7 @@
     
     <property name="js.src"          location="javascript" />
     <property name="js.path"         value="javascript" />
-    <property name="js.basename"     value="phonegap-${version}.js" />
+    <property name="js.basename"     value="cordova-${version}.js" />
     <property name="js.file"         value="${js.path}/${js.basename}" />
     
     <!-- BUILD JAVASCRIPT -->
@@ -44,10 +44,10 @@
         
         <!-- BB Javascript -->
         <concat destfile="${build.dir}/${js.file}" append="false">
-            <filelist dir="${js.src}" files="_phonegap.js,webWorksPluginManager.js,console.js" />
+            <filelist dir="${js.src}" files="_cordova.js,webWorksPluginManager.js,console.js" />
             <fileset dir="${js.src}/blackberry" includes="*.js"/>
             <filelist dir="${js.src}" files="device.js,file.js" />
-            <fileset dir="${js.src}" excludes="_phonegap.js,webWorksPluginManager.js,console.js,device.js,file.js">
+            <fileset dir="${js.src}" excludes="_cordova.js,webWorksPluginManager.js,console.js,device.js,file.js">
                 <include name="*.js" />
             </fileset>
         </concat>
@@ -96,13 +96,13 @@
             <fileset dir="${template.project.dir}" />
         </copy>
         
-        <!-- update project files to reference phonegap.x.x.x.js -->
-        <replaceregexp match="phonegap\.js" replace="${js.basename}" byline="true">
+        <!-- update project files to reference cordova.x.x.x.js -->
+        <replaceregexp match="cordova\.js" replace="${js.basename}" byline="true">
             <fileset file="${project.path}/www/index.html" />
             <fileset file="${project.path}/build.xml" />
         </replaceregexp>
         
-        <!-- copy phonegap.js -->
+        <!-- copy cordova.js -->
         <copy todir="${project.path}/www">
             <fileset dir="${build.dir}/${js.path}" />
         </copy>
@@ -148,12 +148,12 @@ Getting Started:
             <fileset dir="${template.dist.dir}" />
         </copy>
         
-        <!-- copy phonegap.jar -->
+        <!-- copy cordova.jar -->
         <copy todir="${dist.www.path}/ext">
             <fileset dir="${build.dir}/${jar.path}" />
         </copy>
         
-        <!-- copy phonegap.js -->
+        <!-- copy cordova.js -->
         <copy todir="${dist.www.path}">
             <fileset dir="${build.dir}/${js.path}" />
         </copy>
@@ -226,11 +226,11 @@ Remember to:
 Update complete!
 ================
 
-  PhoneGap ${version} has been created.
+  Cordova ${version} has been created.
   
   Update does not alter your project files.
   
-  See below for instructions to install PhoneGap ${version}.
+  See below for instructions to install Cordova ${version}.
 
 Where:
 ------
@@ -242,14 +242,14 @@ Install:
 
   1. Install the Java Extension:
 
-    - delete /www/${jar.path}/phonegap.jar
+    - delete /www/${jar.path}/cordova.jar
     
     - copy /${update.dir}/${jar.file}
         to /www/${jar.file}
 
   2. Install the JavaScript library:
 
-    - delete /www/phonegap.js
+    - delete /www/cordova.js
     
     - copy /${update.dir}/${js.file}
         to /www/${js.basename}
@@ -320,7 +320,7 @@ SYNOPSIS
   ant COMMAND [-D&lt;argument&gt;=&lt;value&gt;]...
 
 DESCRIPTION
-  This tool allows you to create and update PhoneGap-BlackBerry-WebWorks projects.
+  This tool allows you to create and update Cordova-BlackBerry-WebWorks projects.
   You will want to run update after you have updated the framework source.
   In other words, when you &lt;git pull origin master&gt;.
 
@@ -336,10 +336,10 @@ COMMANDS
                       ant update PATH
                       ant update -Dproject.path="C:\dev\my_project"
 
-  dist ............ Create a PhoneGap distribution build
+  dist ............ Create a Cordova distribution build
                       ant dist
 
-  version ......... Update PhoneGap version
+  version ......... Update Cordova version
                       ant version VERSION
                       ant version -Dvalue="1.0.0"
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext-air/Cordova_Network/library.xml
----------------------------------------------------------------------
diff --git a/framework/ext-air/Cordova_Network/library.xml b/framework/ext-air/Cordova_Network/library.xml
new file mode 100644
index 0000000..870fd58
--- /dev/null
+++ b/framework/ext-air/Cordova_Network/library.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<library isWhitelist="true">
+	<extension>
+		<entryClass>org.apache.cordova.network.Network</entryClass>
+	</extension>
+
+	<platforms>
+		<platform value="AIR">
+			<target version="default" config="AIR_XHR" />
+		</platform>
+	</platforms>
+
+	<configurations>
+		<configuration name="AIR_XHR" version="1.0" comment="For XHR architecture for Java implementation">
+			<src type="text/actionscript" path="src" comment="ActionScript implementation" />
+		</configuration>
+	</configurations>
+
+	<features>
+		<feature id="org.apache.cordova" version="1.0.0" />
+	</features>
+</library>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
----------------------------------------------------------------------
diff --git a/framework/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as b/framework/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
new file mode 100644
index 0000000..cd8be87
--- /dev/null
+++ b/framework/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ * Copyright (c) 2011, Research In Motion Limited.
+ */
+
+
+package org.apache.cordova.network {
+    import flash.net.NetworkInfo;
+    import flash.net.NetworkInterface;
+	import flash.events.Event;
+
+    import webworks.extension.DefaultExtension;
+
+    public class Network extends DefaultExtension{
+
+        private var _jsFunctionCallbackIDs:Array = [];
+		private const FEATURE_ID:Array = [ "org.apache.cordova" ];
+
+		public function Network() {
+			//Attach event listener once only
+			NetworkInfo.networkInfo.addEventListener(flash.events.Event.NETWORK_CHANGE, networkChange);
+		}
+
+		override public function getFeatureList():Array {
+			return FEATURE_ID;
+		}
+
+        public function getConnectionInfo(param:String):void{
+			if(_jsFunctionCallbackIDs.indexOf(param) < 0){
+				_jsFunctionCallbackIDs.push(param);
+			}
+        }
+
+        private function networkChange( event: Event ) : void {
+
+            /**
+             * Right now, we only care if there is a connection or not, since PlayBook only has WiFi
+             * At the JS layer, we will map this from offline/online.
+             * At some point in the future where there are more connection types on PlayBook,
+             * we will want to attempt to map this to the real Cordova connection types...
+             */
+
+            var haveCoverage : Boolean = false;
+            var networkStatus : String = "offline";
+			var connectionType = "none";
+
+			NetworkInfo.networkInfo.findInterfaces().some(
+				function callback(item:NetworkInterface, index:int, vector:Vector.<NetworkInterface>):Boolean {
+					this.webView.executeJavaScript("alert('Network Interface ' + item.name)");
+					haveCoverage = item.active || haveCoverage;
+					return haveCoverage;
+				}, this);
+
+			if (haveCoverage) {
+				networkStatus = "online";
+				connectionType = "wifi";
+			}
+
+            for (var i:Number=0; i<_jsFunctionCallbackIDs.length ; i++){
+                evalJavaScriptEvent(_jsFunctionCallbackIDs[i], [{"type" : connectionType, "event" : networkStatus }] );
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext-air/PhoneGap_Network/library.xml
----------------------------------------------------------------------
diff --git a/framework/ext-air/PhoneGap_Network/library.xml b/framework/ext-air/PhoneGap_Network/library.xml
deleted file mode 100644
index ea4903c..0000000
--- a/framework/ext-air/PhoneGap_Network/library.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<library isWhitelist="true">
-	<extension>
-		<entryClass>com.phonegap.network.Network</entryClass>
-	</extension>
-
-	<platforms>
-		<platform value="AIR">
-			<target version="default" config="AIR_XHR" />
-		</platform>
-	</platforms>
-
-	<configurations>
-		<configuration name="AIR_XHR" version="1.0" comment="For XHR architecture for Java implementation">
-			<src type="text/actionscript" path="src" comment="ActionScript implementation" />
-		</configuration>
-	</configurations>
-	
-	<features>
-		<feature id="com.phonegap" version="1.0.0" />
-	</features>
-</library>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext-air/PhoneGap_Network/src/com/phonegap/network/Network.as
----------------------------------------------------------------------
diff --git a/framework/ext-air/PhoneGap_Network/src/com/phonegap/network/Network.as b/framework/ext-air/PhoneGap_Network/src/com/phonegap/network/Network.as
deleted file mode 100644
index dafb94e..0000000
--- a/framework/ext-air/PhoneGap_Network/src/com/phonegap/network/Network.as
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * 
- * Copyright (c) 2011, Research In Motion Limited.
- */
-
-
-package com.phonegap.network {
-    import flash.net.NetworkInfo;
-    import flash.net.NetworkInterface;
-	import flash.events.Event;
-    
-    import webworks.extension.DefaultExtension;
-    
-    public class Network extends DefaultExtension{
-        
-        private var _jsFunctionCallbackIDs:Array = [];
-		private const FEATURE_ID:Array = [ "com.phonegap" ];
-		
-		public function Network() {
-			//Attach event listener once only
-			NetworkInfo.networkInfo.addEventListener(flash.events.Event.NETWORK_CHANGE, networkChange);    
-		}
-		
-		override public function getFeatureList():Array {
-			return FEATURE_ID;
-		}
-        
-        public function getConnectionInfo(param:String):void{ 
-			if(_jsFunctionCallbackIDs.indexOf(param) < 0){
-				_jsFunctionCallbackIDs.push(param);
-			}
-        }
-        
-        private function networkChange( event: Event ) : void {
-            
-            /**
-             * Right now, we only care if there is a connection or not, since PlayBook only has WiFi
-             * At the JS layer, we will map this from offline/online.
-             * At some point in the future where there are more connection types on PlayBook,
-             * we will want to attempt to map this to the real PhoneGap connection types...
-             */
-            
-            var haveCoverage : Boolean = false;
-            var networkStatus : String = "offline";
-			var connectionType = "none";
-
-			NetworkInfo.networkInfo.findInterfaces().some(
-				function callback(item:NetworkInterface, index:int, vector:Vector.<NetworkInterface>):Boolean {
-					this.webView.executeJavaScript("alert('Network Interface ' + item.name)");
-					haveCoverage = item.active || haveCoverage;
-					return haveCoverage;
-				}, this);
-
-			if (haveCoverage) {
-				networkStatus = "online";
-				connectionType = "wifi";
-			}
-            
-            for (var i:Number=0; i<_jsFunctionCallbackIDs.length ; i++){
-                evalJavaScriptEvent(_jsFunctionCallbackIDs[i], [{"type" : connectionType, "event" : networkStatus }] );
-            }
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/.project
----------------------------------------------------------------------
diff --git a/framework/ext/.project b/framework/ext/.project
index cba60c4..ecbf8d5 100644
--- a/framework/ext/.project
+++ b/framework/ext/.project
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>PhoneGapExtension</name>
+	<name>CordovaExtension</name>
 	<comment></comment>
 	<projects>
 	</projects>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/BlackBerry_App_Descriptor.xml
----------------------------------------------------------------------
diff --git a/framework/ext/BlackBerry_App_Descriptor.xml b/framework/ext/BlackBerry_App_Descriptor.xml
index f1581e5..13b9c53 100644
--- a/framework/ext/BlackBerry_App_Descriptor.xml
+++ b/framework/ext/BlackBerry_App_Descriptor.xml
@@ -7,7 +7,7 @@
   <Compile OutputCompilerMessages="false" ConvertImages="false" CreateWarningForNoExportedRoutine="true" CompressResources="false" AliasList="">
     <PreprocessorDefines/>
   </Compile>
-  <Packaging OutputFileName="PhoneGap" OutputFolder="deliverables" PreBuildStep="" PostBuildStep="" CleanStep="" GenerateALXFile="false">
+  <Packaging OutputFileName="Cordova" OutputFolder="deliverables" PreBuildStep="" PostBuildStep="" CleanStep="" GenerateALXFile="false">
     <AlxFiles/>
   </Packaging>
   <HiddenProperties>
@@ -15,4 +15,4 @@
     <PackageProtection/>
   </HiddenProperties>
   <AlternateEntryPoints/>
-</Properties>
\ No newline at end of file
+</Properties>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/src/com/phonegap/PhoneGapExtension.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/com/phonegap/PhoneGapExtension.java b/framework/ext/src/com/phonegap/PhoneGapExtension.java
deleted file mode 100644
index d1fc58b..0000000
--- a/framework/ext/src/com/phonegap/PhoneGapExtension.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * 
- * Copyright (c) 2011, Research In Motion Limited.
- */
-package com.phonegap;
-
-import net.rim.device.api.browser.field2.BrowserField;
-import net.rim.device.api.script.ScriptEngine;
-import net.rim.device.api.system.Application;
-import net.rim.device.api.web.WidgetConfig;
-import net.rim.device.api.web.WidgetExtension;
-import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.phonegap.api.PluginManager;
-import com.phonegap.api.PluginResult;
-import com.phonegap.device.Device;
-import com.phonegap.notification.Notification;
-import com.phonegap.util.Log;
-import com.phonegap.util.Logger;
-
-import java.lang.ref.WeakReference;
-
-/**
- * PhoneGapExtension is a BlackBerry WebWorks JavaScript extension.  It 
- * represents a single feature that can be used to access device capabilities. 
- */
-public final class PhoneGapExtension implements WidgetExtension {
-
-    // Weak reference encapsulating BrowserField object used to display the application
-    // We use the weak reference because keeping a direct reference can
-    // cause memory leak issues in WebWorks. Original solution described
-    // and suggested by Tim Neil on the BlackBerry support forums.
-    // Thanks Tim!
-    protected static WeakReference browser = null;
-    
-    // Browser script engine
-    //
-    protected static ScriptEngine script;
-
-    // Application name
-    //
-    protected static String appName;
-
-    // Application GUID
-    //
-    protected static long appID;
-    
-    // Plugin Manager
-    //
-    protected PluginManager pluginManager;
-    
-    // Feature ID
-    //
-    private static final String FEATURE_ID ="com.phonegap";
-
-    // Called when the BlackBerry Widget references this extension for the first time.
-    // It provides a list of feature IDs exposed by this extension.
-    //
-    public String[] getFeatureList() {
-      return new String[] {FEATURE_ID};
-    }
-
-    // Called whenever a widget loads a resource that requires a feature ID that is supplied
-    // in the getFeatureList
-    //
-    public void loadFeature(String feature, String version, Document doc,
-            ScriptEngine scriptEngine) throws Exception {
-        script = scriptEngine;
-        // Not sure why logger is not already enabled?
-        Logger.enableLogging();
-        if (feature.equals(FEATURE_ID)) {
-            pluginManager = new PluginManager(this);
-
-            // create and parse the plugins.xml
-            Document c = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(Application.class.getResourceAsStream("/plugins.xml"));
-
-            NodeList plugins = c.getElementsByTagName("plugin");
-            if (plugins.getLength() == 0) {
-                Logger.warn("If you are using any PhoneGap APIs you will need to "+
-                        "specify them in the config.xml using <gap:plugin name=\"MyPlugin\" "+
-                        "value=\"com.example.MyPlugin\"/>");
-            }
-            for(int i=0; i<plugins.getLength() ; i++){
-                Node plugin = plugins.item(i);
-                Logger.log("Found plugin " + plugin.getAttributes().getNamedItem("name").getNodeValue() + " = " +  
-                        plugin.getAttributes().getNamedItem("value").getNodeValue());
-                pluginManager.addService(plugin.getAttributes().getNamedItem("name").getNodeValue(), 
-                        plugin.getAttributes().getNamedItem("value").getNodeValue());
-            }
-
-            scriptEngine.addExtension("com.phonegap.JavaPluginManager",  pluginManager);
-            scriptEngine.addExtension("com.phonegap.Logger",         new Log());
-
-            // let PhoneGap JavaScript know that extensions have been loaded
-            // if this is premature, we at least set the _nativeReady flag to true
-            // so that when the JS side is ready, it knows native side is too
-            Logger.log(this.getClass().getName() + ": invoking PhoneGap.onNativeReady.fire()");
-            scriptEngine.executeScript("try {PhoneGap.onNativeReady.fire();} catch(e) {_nativeReady = true;}", null);
-        }
-    }
-
-    // Called so that the extension can get a reference to the configuration or browser field object
-    //
-    public void register(WidgetConfig widgetConfig, BrowserField browserField) {
-        browser = new WeakReference(browserField);
-
-        // grab widget application name and use it to generate a unique ID
-        appName = widgetConfig.getName();
-        appID = Long.parseLong(Math.abs(("com.phonegap."+appName).hashCode())+"",16);
-
-        // create a notification profile for the application
-        Notification.registerProfile();
-    }
-
-    /**
-     * Called to clean up any features when the extension is unloaded.  This is
-     * invoked by the WebWorks Framework when another URL is loaded.
-     *
-     * @see net.rim.device.api.web.WidgetExtension#unloadFeatures(org.w3c.dom.Document)
-     */
-    public void unloadFeatures(Document doc) {
-        // Cleanup plugin resources.
-        if (pluginManager != null) {
-            pluginManager.destroy();
-        }
-    }
-
-    public static void invokeScript(final String js) {
-        // Use a new thread so that JavaScript is invoked asynchronously.
-        // Otherwise executeScript doesn't return until JavaScript call back
-        // is finished.
-        (new Thread() {
-            public void run() {
-                try {
-                    script.executeScript(js, null);
-                } catch (Exception e) {
-                    // This is likely an IllegalStateException which is thrown
-                    // because the framework is in the process of being shutdown
-                    // so communication to JavaScript side is not allowed.
-                    Logger.log("Caught exception while executing script: "
-                            + e.getMessage());
-                }
-            }
-        }).start();
-    }
-
-    /**
-     * Invokes the PhoneGap success callback specified by callbackId.
-     * @param callbackId   unique callback ID
-     * @param result       PhoneGap PluginResult containing result
-     */
-    public static void invokeSuccessCallback(String callbackId, PluginResult result) {
-      invokeScript(result.toSuccessCallbackString(callbackId));
-    }
-
-    /**
-     * Invokes the PhoneGap error callback specified by callbackId.
-     * @param callbackId   unique callback ID
-     * @param result       PhoneGap PluginResult containing result
-     */
-    public static void invokeErrorCallback(String callbackId, PluginResult result) {
-      invokeScript(result.toErrorCallbackString(callbackId));
-    }
-
-    /**
-     * Provides access to the browser instance for the application.
-     */
-    public static BrowserField getBrowserField() {
-      Object o = browser.get();
-      if ( o instanceof BrowserField ) {
-        return (BrowserField)o;
-      } else {
-        return null;
-      }
-    }
-
-    /**
-     * Returns the widget application name.
-     */
-    public static String getAppName() {
-        return appName;
-    }
-
-    /**
-     * Returns unique ID of the widget application.
-     */
-    public static long getAppID() {
-        return appID;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/src/com/phonegap/accelerometer/Accelerometer.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/com/phonegap/accelerometer/Accelerometer.java b/framework/ext/src/com/phonegap/accelerometer/Accelerometer.java
deleted file mode 100644
index 2ffdb86..0000000
--- a/framework/ext/src/com/phonegap/accelerometer/Accelerometer.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.phonegap.accelerometer;
-
-import net.rim.device.api.system.AccelerometerData;
-import net.rim.device.api.system.AccelerometerListener;
-import net.rim.device.api.system.AccelerometerSensor;
-import net.rim.device.api.system.Application;
-
-import com.phonegap.api.Plugin;
-import com.phonegap.api.PluginResult;
-import com.phonegap.json4j.JSONArray;
-import com.phonegap.json4j.JSONException;
-import com.phonegap.json4j.JSONObject;
-import com.phonegap.util.Logger;
-
-public class Accelerometer extends Plugin implements AccelerometerListener {
-
-	public static final String ACTION_GET_ACCELERATION = "getAcceleration";
-	public static final String ACTION_SET_TIMEOUT = "setTimeout";
-	public static final String ACTION_GET_TIMEOUT = "getTimeout";
-	public static final String ACTION_STOP = "stop";
-	
-	public static int STOPPED = 0;
-	public static int STARTED = 1;
-	
-	private static AccelerometerSensor.Channel _rawDataChannel = null; // the single channel to the device sensor
-	int status;                                                        // status of this listener
-    public float timeout = 30000;                                      // timeout in msec to close sensor channel
-    long lastAccessTime;                                               // last time accel data was retrieved
-    
-	public PluginResult execute(String action, JSONArray args, String calbackId) {
-
-		PluginResult result = null;
-
-		if (!AccelerometerSensor.isSupported()) {
-			result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION, "Accelerometer sensor not supported");
-		}
-		else if (ACTION_GET_ACCELERATION.equals(action)) {
-			JSONObject accel = new JSONObject();
-			try {
-				AccelerometerData accelData = getCurrentAcceleration();
-				accel.put("x", (int)accelData.getLastXAcceleration());
-				accel.put("y", (int)accelData.getLastYAcceleration());
-				accel.put("z", (int)accelData.getLastZAcceleration());
-				accel.put("timestamp", accelData.getLastTimestamp());
-			} catch (JSONException e) {
-				return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "JSONException:" + e.getMessage());
-			}
-			result = new PluginResult(PluginResult.Status.OK, accel);
-		}
-		else if (ACTION_GET_TIMEOUT.equals(action)) {
-			float f = this.getTimeout();
-			return new PluginResult(PluginResult.Status.OK, Float.toString(f));
-		}
-		else if (ACTION_SET_TIMEOUT.equals(action)) {
-			try {
-				float t = Float.parseFloat(args.getString(0));
-				this.setTimeout(t);
-				return new PluginResult(PluginResult.Status.OK, "");
-			} catch (NumberFormatException e) {
-				return new PluginResult(PluginResult.Status.ERROR, e.getMessage());
-			} catch (JSONException e) {
-				return new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage());
-			}
-		}
-		else if (ACTION_STOP.equals(action)) {
-			this.stop();
-			return new PluginResult(PluginResult.Status.OK, "");
-		}
-		else {
-			result = new PluginResult(PluginResult.Status.INVALID_ACTION, "Accelerometer: Invalid action:" + action);
-		}
-		
-		return result;
-	}
-
-	/**
-	 * Identifies if action to be executed returns a value and should be run synchronously.
-	 * 
-	 * @param action	The action to execute
-	 * @return			T=returns value
-	 */
-	public boolean isSynch(String action) {
-		return true;
-	}
-	
-    /**
-     * Get status of accelerometer sensor.
-     * 
-     * @return			status
-     */
-	public int getStatus() {
-		return this.status;
-	}
-
-	/**
-	 * Set the status and send it to JavaScript.
-	 * @param status
-	 */
-	private void setStatus(int status) {
-		this.status = status;
-	}
-
-	/**
-	 * Set the timeout to turn off accelerometer sensor.
-	 * 
-	 * @param timeout		Timeout in msec.
-	 */
-	public void setTimeout(float timeout) {
-		this.timeout = timeout;
-	}
-	
-	/**
-	 * Get the timeout to turn off accelerometer sensor.
-	 * 
-	 * @return timeout in msec
-	 */
-	public float getTimeout() {
-		return this.timeout;
-	}
-
-	/**
-	 * Opens a raw data channel to the accelerometer sensor.
-	 * @return the AccelerometerSensor.Channel for the application
-	 */
-	private static AccelerometerSensor.Channel getChannel() {
-		// an application can only have one open channel 
-		if (_rawDataChannel == null || !_rawDataChannel.isOpen()) {
-			_rawDataChannel = AccelerometerSensor.openRawDataChannel(
-				Application.getApplication());
-			Logger.log(Accelerometer.class.getName() +": sensor channel opened");
-		}
-		return _rawDataChannel;
-	}
-
-	/**
-	 * Returns last acceleration data from the accelerometer sensor.
-	 * @return AccelerometerData with last acceleration data
-	 */
-	private AccelerometerData getCurrentAcceleration() {
-		// open sensor channel
-		if (this.getStatus() != STARTED) {
-			this.start();
-		}
-		
-		// get the last acceleration
-		AccelerometerData accelData = getChannel().getAccelerometerData();
-
-        Logger.log(this.getClass().getName() + 
-        		": x=" + accelData.getLastXAcceleration() +
-        		", y=" + accelData.getLastYAcceleration() + 
-        		", z=" + accelData.getLastZAcceleration() + 
-        		", timestamp=" + accelData.getLastTimestamp());
-
-		// remember the access time (for timeout purposes)
-        this.lastAccessTime = System.currentTimeMillis();
-
-		return accelData;	
-	}
-	
-	/**
-	 * Implements the AccelerometerListener method.  We listen for the purpose
-	 * of closing the application's accelerometer sensor channel after timeout 
-	 * has been exceeded.
-	 */
-	public void onData(AccelerometerData accelData) {
-        // time that accel event was received
-        long timestamp = accelData.getLastTimestamp();
-        
-        // If values haven't been read for length of timeout, 
-        // turn off accelerometer sensor to save power
-		if ((timestamp - this.lastAccessTime) > this.timeout) {
-			this.stop();
-		}		
-	}
-
-	/**
-	 * Adds this listener to sensor channel.
-	 */
-	public void start() {
-		// open the sensor channel and register listener
-		getChannel().setAccelerometerListener(this);
-
-		Logger.log(this.getClass().getName() +": sensor listener added");
-		
-		this.setStatus(STARTED);
-	}
-	
-    /**
-     * Stops accelerometer listener and closes the sensor channel.
-     */
-    public void stop() {
-        // close the sensor channel
-        if (_rawDataChannel != null && _rawDataChannel.isOpen()) {
-            _rawDataChannel.close();
-            Logger.log(this.getClass().getName() +": sensor channel closed");
-        }
-
-        this.setStatus(STOPPED);
-    }	
-
-    /**
-     * Called when Plugin is destroyed.
-     */
-    public void onDestroy() {
-        this.stop();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/src/com/phonegap/api/IPlugin.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/com/phonegap/api/IPlugin.java b/framework/ext/src/com/phonegap/api/IPlugin.java
deleted file mode 100644
index 01de518..0000000
--- a/framework/ext/src/com/phonegap/api/IPlugin.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.phonegap.api;
-
-import com.phonegap.PhoneGapExtension;
-import com.phonegap.json4j.JSONArray;
-
-/**
- * Plugin interface must be implemented by any plugin classes.
- *
- * The execute method is called by the PluginManager.
- */
-public interface IPlugin {
-		
-	/**
-	 * Executes the request and returns PluginResult.
-	 * 
-	 * @param action 		The action to execute.
-	 * @param args 			JSONArry of arguments for the plugin.
-	 * @param callbackId	The callback id used when calling back into JavaScript.
-	 * @return 				A PluginResult object with a status and message.
-	 */
-	PluginResult execute(String action, JSONArray args, String callbackId);
-
-	/**
-	 * Identifies if action to be executed returns a value and should be run synchronously.
-	 * 
-	 * @param action	The action to execute
-	 * @return			T=returns value
-	 */
-	public boolean isSynch(String action);
-
-	/**
-	 * Sets the context of the Plugin. This can then be used to do things like
-	 * get file paths associated with the Activity.
-	 * 
-	 * @param ctx The main application class.
-	 */
-	void setContext(PhoneGapExtension ctx);
-
-    /**
-     * Called when the system is about to start resuming a previous activity. 
-     */
-    void onPause();
-
-    /**
-     * Called when the activity will start interacting with the user. 
-     */
-    void onResume();
-    
-    /**
-     * The final call you receive before your activity is destroyed. 
-     */
-    void onDestroy();
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/src/com/phonegap/api/Plugin.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/com/phonegap/api/Plugin.java b/framework/ext/src/com/phonegap/api/Plugin.java
deleted file mode 100644
index 56f5102..0000000
--- a/framework/ext/src/com/phonegap/api/Plugin.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.phonegap.api;
-
-import com.phonegap.PhoneGapExtension;
-import com.phonegap.json4j.JSONArray;
-
-/**
- * Plugin interface must be implemented by any plugin classes.
- *
- * The execute method is called by the PluginManager.
- */
-public abstract class Plugin implements IPlugin {
-
-    public PhoneGapExtension ctx;					// Main application object
-
-	/**
-	 * Executes the request and returns PluginResult.
-	 * 
-	 * @param action 		The action to execute.
-	 * @param args 			JSONArry of arguments for the plugin.
-	 * @param callbackId	The callback id used when calling back into JavaScript.
-	 * @return 				A PluginResult object with a status and message.
-	 */
-	public abstract PluginResult execute(String action, JSONArray args, String callbackId);
-
-	/**
-	 * Identifies if action to be executed returns a value and should be run synchronously.
-	 * 
-	 * @param action	The action to execute
-	 * @return			T=returns value
-	 */
-	public boolean isSynch(String action) {
-		return false;
-	}
-
-	/**
-	 * Sets the context of the Plugin. This can then be used to do things like
-	 * get file paths associated with the Activity.
-	 * 
-	 * @param ctx The context of the main Activity.
-	 */
-	public void setContext(PhoneGapExtension ctx) {
-		this.ctx = ctx;
-	}
-	
-    /**
-     * Called when Plugin is paused. 
-     */
-    public void onPause() {
-    }
-
-    /**
-     * Called when Plugin is resumed. 
-     */
-    public void onResume() {
-    }
-    
-    /**
-     * Called when Plugin is destroyed. 
-     */
-    public void onDestroy() {
-    }
-
-    /**
-     * Send generic JavaScript statement back to JavaScript.
-     * success(...) and error(...) should be used instead where possible.
-     * 
-     * @param statement
-     */
-    public void invokeScript(String statement) {
-    	PhoneGapExtension.invokeScript(statement);
-    }
-
-    /**
-     * Call the JavaScript success callback for this plugin.
-     * 
-     * This can be used if the execute code for the plugin is asynchronous meaning
-     * that execute should return null and the callback from the async operation can
-     * call success(...) or error(...)
-     * 
-     * @param pluginResult		The result to return.
-	 * @param callbackId		The callback id used when calling back into JavaScript.
-     */
-    public static void success(PluginResult pluginResult, String callbackId) {
-    	PhoneGapExtension.invokeSuccessCallback(callbackId, pluginResult);
-    }
-
-    /**
-     * Call the JavaScript error callback for this plugin.
-     * 
-     * @param pluginResult		The result to return.
-	 * @param callbackId		The callback id used when calling back into JavaScript.
-     */
-    public static void error(PluginResult pluginResult, String callbackId) {
-    	PhoneGapExtension.invokeErrorCallback(callbackId, pluginResult);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/src/com/phonegap/api/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/com/phonegap/api/PluginManager.java b/framework/ext/src/com/phonegap/api/PluginManager.java
deleted file mode 100644
index 72792b7..0000000
--- a/framework/ext/src/com/phonegap/api/PluginManager.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.phonegap.api;
-
-import java.io.IOException;
-import java.util.Hashtable;
-
-import net.rim.device.api.script.Scriptable;
-import net.rim.device.api.script.ScriptableFunction;
-
-import com.phonegap.PhoneGapExtension;
-import com.phonegap.file.FileUtils;
-import com.phonegap.util.Logger;
-
-/**
- * PluginManager represents an object in the script engine. It can be accessed
- * from the script environment using <code>phonegap.PluginManager</code>.
- * 
- * PluginManager provides a function, <code>exec</code>, that can be invoked 
- * from the script environment: <code>phonegap.PluginManager.exec(...)</code>.  
- * Invoking this function causes the script engine to load the appropriate 
- * PhoneGap Plugin and perform the specified action.
- */
-public final class PluginManager extends Scriptable {
-	
-    /**
-     * Field used to invoke Plugin actions.
-     */
-    public static String FIELD_EXEC = "exec";	
-    
-    /**
-     * Field used to cleanup Plugins.
-     */
-    public static String FIELD_DESTROY = "destroy";
-    
-    /**
-     * Field used to indicate application has been brought to foreground.
-     */
-    public static String FIELD_RESUME = "resume";
-    
-    /**
-     * Field used to indicate application has been sent to background
-     */
-    public static String FIELD_PAUSE = "pause";
-    
-    /**
-     * Field used to register a Plugin.
-     */
-    public static String FIELD_ADD_PLUGIN = "addPlugin";
-    
-    /**
-     * Loads the appropriate PhoneGap Plugins and invokes their actions.
-     */
-    private final PluginManagerFunction pluginManagerFunction;
-    
-    /**
-     * Maps available services to Java class names.
-     */
-    private Hashtable services = new Hashtable();
-
-    /**
-     * Constructor.  Adds available PhoneGap services.
-     * @param ext   The PhoneGap JavaScript Extension
-     */
-    public PluginManager(PhoneGapExtension ext) {
-        this.pluginManagerFunction = new PluginManagerFunction(ext, this);
-    }
-	
-    /**
-     * The following fields are supported from the script environment:
-     * 
-     *  <code>phonegap.pluginManager.exec</code> - Loads the appropriate 
-     *  Plugin and invokes the specified action.
-     *  
-     *  <code>phonegap.pluginManager.destroy</code> - Invokes the <code>onDestroy</code>
-     *  method on all Plugins to give them a chance to cleanup before exit.
-     */
-    public Object getField(String name) throws Exception {
-        if (name.equals(FIELD_EXEC)) {
-            return this.pluginManagerFunction;
-        }
-        else if (name.equals(FIELD_DESTROY)) {
-            return new ScriptableFunction() {
-                public Object invoke(Object obj, Object[] oargs) throws Exception {
-                    destroy();
-                    return null;
-                }
-            };
-        }
-        else if (name.equals(FIELD_RESUME)) {
-            final PluginManagerFunction plugin_mgr = this.pluginManagerFunction;
-            return new ScriptableFunction() {
-                public Object invoke(Object obj, Object[] oargs) throws Exception {
-                    plugin_mgr.onResume();
-                    return null;
-                }
-            };
-        }
-        else if (name.equals(FIELD_PAUSE)) {
-            final PluginManagerFunction plugin_mgr = this.pluginManagerFunction;
-            return new ScriptableFunction() {
-                public Object invoke(Object obj, Object[] oargs) throws Exception {
-                    plugin_mgr.onPause();
-                    return null;
-                }
-            };
-        }
-        else if (name.equals(FIELD_ADD_PLUGIN)) {
-            Logger.log("Plugins are now added through the plugins.xml in the application root.");
-        }
-        return super.getField(name);
-    }
-
-    /**
-     * Add a class that implements a service.
-     * 
-     * @param serviceName   The service name.
-     * @param className     The Java class name that implements the service.
-     */
-    public void addService(String serviceName, String className) {
-        this.services.put(serviceName, className);
-    }
-
-    /**
-     * Cleanup the plugin resources and delete temporary directory that may have
-     * been created.
-     */
-    public void destroy() {
-        // allow plugins to clean up
-        pluginManagerFunction.onDestroy();
-
-        // delete temporary application directory
-        // NOTE: doing this on a background thread doesn't work because the app
-        // is closing and the thread is killed before it completes.
-        try {
-            FileUtils.deleteApplicationTempDirectory();
-        } catch (Exception e) {
-            Logger.log(this.getClass().getName()
-                    + ": error deleting application temp directory: "
-                    + e.getMessage());
-        }
-    }
-
-    /**
-     * Get the class that implements a service.
-     * 
-     * @param serviceName   The service name.
-     * @return The Java class name that implements the service.
-     */
-    public String getClassForService(String serviceName) {
-        return (String)this.services.get(serviceName);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/src/com/phonegap/api/PluginManagerFunction.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/com/phonegap/api/PluginManagerFunction.java b/framework/ext/src/com/phonegap/api/PluginManagerFunction.java
deleted file mode 100644
index ed913fb..0000000
--- a/framework/ext/src/com/phonegap/api/PluginManagerFunction.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.phonegap.api;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import net.rim.device.api.script.ScriptableFunction;
-
-import com.phonegap.PhoneGapExtension;
-import com.phonegap.json4j.JSONArray;
-import com.phonegap.json4j.JSONException;
-import com.phonegap.util.Logger;
-
-/**
- * PluginManagerFunction represents a function that can be invoked from the 
- * script environment of the widget framework.  It manages the plugins for 
- * the PhoneGap JavaScript Extension. 
- *  
- * Calling <code>phonegap.pluginManager.exec(...)</code> from JavaScript will 
- * result in this class' <code>invoke()</code> method being called.
- */
-public class PluginManagerFunction extends ScriptableFunction {
-	
-	private final static int ARG_SERVICE = 0;
-	private final static int ARG_ACTION = 1;
-	private final static int ARG_CALLBACK_ID = 2;
-	private final static int ARG_ARGS = 3;
-	private final static int ARG_ASYNC = 4;
-
-	private Hashtable plugins = new Hashtable();
-
-	private final PhoneGapExtension ext; 
-	private final PluginManager pluginManager;
-	
-	/**
-	 * Constructor.
-	 * @param ext              The PhoneGap JavaScript Extension
-	 * @param pluginManager    The PluginManager that exposes the scriptable object.
-	 */
-	public PluginManagerFunction(PhoneGapExtension ext, PluginManager pluginManager) {
-		this.ext = ext;
-		this.pluginManager = pluginManager;
-	}
-	
-	/**
-	 * The invoke method is called when phonegap.pluginManager.exec(...) is  
-	 * used from the script environment.  It instantiates the appropriate plugin
-	 * and invokes the specified action.  JavaScript arguments are passed in 
-	 * as an array of objects.
-	 * 
-  	 * @param service 		String containing the service to run
-	 * @param action 		String containing the action that the service is supposed to perform. This is
-	 * 						passed to the plugin execute method and it is up to the plugin developer 
-	 * 						how to deal with it.
-	 * @param callbackId 	String containing the id of the callback that is executed in JavaScript if
-	 * 						this is an async plugin call.
-	 * @param args 			An Array literal string containing any arguments needed in the
-	 * 						plugin execute method.
-	 * @param async 		Boolean indicating whether the calling JavaScript code is expecting an
-	 * 						immediate return value. If true, either PhoneGap.callbackSuccess(...) or 
-	 * 						PhoneGap.callbackError(...) is called once the plugin code has executed.
-	 * 
-	 * @return 				JSON encoded string with a response message and status.
-	 * 
-	 * @see net.rim.device.api.script.ScriptableFunction#invoke(java.lang.Object, java.lang.Object[])
-	 */
-	public Object invoke(Object obj, Object[] oargs) throws Exception {
-		final String service = (String)oargs[ARG_SERVICE];
-		final String action = (String)oargs[ARG_ACTION];
-		final String callbackId = (String)oargs[ARG_CALLBACK_ID];
-		boolean async = (oargs[ARG_ASYNC].toString().equals("true") ? true : false);
-		PluginResult pr = null;
-		
-		try {
-			// action arguments
-			final JSONArray args = new JSONArray((String)oargs[ARG_ARGS]);
-			
-			// get the class for the specified service
-			String clazz = this.pluginManager.getClassForService(service);
-			Class c = null;
-			if (clazz != null) {
-				c = getClassByName(clazz); 
-			}
-
-			if (isPhoneGapPlugin(c)) {
-				// Create a new instance of the plugin and set the context
-				final Plugin plugin = this.loadPlugin(clazz, c);
-				async = async && !plugin.isSynch(action);
-				if (async) {
-					// Run this async on a background thread so that JavaScript can continue on
-					Thread thread = new Thread(new Runnable() {
-						public void run() {
-							// Call execute on the plugin so that it can do it's thing
-						    final PluginResult result = plugin.execute(action, args, callbackId);
-
-						    if (result != null) {
-						        int status = result.getStatus();
-
-						        // If plugin status is OK, 
-						        // or plugin is not going to send an immediate result (NO_RESULT) 
-						        if (status == PluginResult.Status.OK.ordinal() || 
-						            status == PluginResult.Status.NO_RESULT.ordinal()) {
-						            PhoneGapExtension.invokeSuccessCallback(callbackId, result);
-						        } 
-						        // error
-						        else {
-						            PhoneGapExtension.invokeErrorCallback(callbackId, result);
-						        }
-						    }
-						}
-					});
-					thread.start();
-					return "";
-				} else {
-					// Call execute on the plugin so that it can do it's thing
-					pr = plugin.execute(action, args, callbackId);
-				}
-			}
-		} catch (ClassNotFoundException e) {
-		    Logger.log(this.getClass().getName() + ": " + e);
-			pr = new PluginResult(PluginResult.Status.CLASS_NOT_FOUND_EXCEPTION, "ClassNotFoundException: " + e.getMessage());
-		} catch (IllegalAccessException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-			pr = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION, "IllegalAccessException:" + e.getMessage());
-		} catch (InstantiationException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-			pr = new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION, "InstantiationException: " + e.getMessage());
-		} catch (JSONException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-			pr = new PluginResult(PluginResult.Status.JSON_EXCEPTION, "JSONException: " + e.getMessage());
-		} 
-		// if async we have already returned at this point unless there was an error...
-		if (async) {
-			PhoneGapExtension.invokeErrorCallback(callbackId, pr);
-		}
-		return ( pr != null ? pr.getJSONString() : "{ status: 0, message: 'all good' }" );
-	}
-	
-	/**
-	 * Get the class.
-	 * 
-	 * @param clazz
-	 * @return
-	 * @throws ClassNotFoundException
-	 */
-	private Class getClassByName(final String clazz) throws ClassNotFoundException {
-		return Class.forName(clazz);
-	}
-	
-	/**
-	 * Determines if the class implements com.phonegap.api.Plugin interface.
-	 * 
-	 * @param c The class to check.
-	 * @return Boolean indicating if the class implements com.phonegap.api.Plugin
-	 */
-	private boolean isPhoneGapPlugin(Class c) {
-		if (c != null) {
-			return com.phonegap.api.Plugin.class.isAssignableFrom(c) || com.phonegap.api.IPlugin.class.isAssignableFrom(c);
-		}
-		return false;
-	}
-	
-    /**
-     * Add plugin to be loaded and cached.
-     * If plugin is already created, then just return it.
-     * 
-     * @param className				The class to load
-     * @return						The plugin
-     */
-	public Plugin loadPlugin(String className, Class clazz) throws IllegalAccessException, InstantiationException {
-    	if (this.plugins.containsKey(className)) {
-    		return this.getPlugin(className);
-    	}
-        Logger.log(this.getClass().getName() + ": Loading plugin " + clazz);
-        Plugin plugin = (Plugin)clazz.newInstance();
-        this.plugins.put(className, plugin);
-        plugin.setContext(this.ext);
-        return plugin;
-    }
-    
-    /**
-     * Get the loaded plugin.
-     * 
-     * @param className				The class of the loaded plugin.
-     * @return
-     */
-    public Plugin getPlugin(String className) {
-    	return (Plugin)this.plugins.get(className);
-    }
-
-    /**
-     * Called when application is paused. 
-     */
-    public void onPause() {
-        Enumeration e = this.plugins.elements();
-        while (e.hasMoreElements()) {
-            Plugin plugin = (Plugin)e.nextElement();
-            plugin.onPause();
-        }
-    }
-    
-    /**
-     * Called when application is resumed. 
-     */
-    public void onResume() {
-        Enumeration e = this.plugins.elements();
-        while (e.hasMoreElements()) {
-            Plugin plugin = (Plugin)e.nextElement();
-            plugin.onResume();
-        }
-    }
-    
-    /**
-     * Called when application is destroyed. 
-     */
-    public void onDestroy() {
-        Enumeration e = this.plugins.elements();
-        while (e.hasMoreElements()) {
-            Plugin plugin = (Plugin)e.nextElement();
-            plugin.onDestroy();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/05319d3c/framework/ext/src/com/phonegap/api/PluginResult.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/com/phonegap/api/PluginResult.java b/framework/ext/src/com/phonegap/api/PluginResult.java
deleted file mode 100644
index 052d1a3..0000000
--- a/framework/ext/src/com/phonegap/api/PluginResult.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.phonegap.api;
-
-import com.phonegap.json4j.JSONObject;
-
-/**
- * This class defines the standard object that should be returned as the
- * result of any PhoneGap plugin invocation.
- */
-public class PluginResult {
-
-    private final int status;
-    private final String message;
-    private boolean keepCallback = false;
-
-    public PluginResult(Status status) {
-        this.status = status.ordinal();
-        this.message = JSONObject.quote(status.getMessage());
-    }
-
-    public PluginResult(Status status, String message) {
-        this.status = status.ordinal();
-        this.message = JSONObject.quote(message);
-    }
-
-    public PluginResult(Status status, JSONObject message) {
-        this.status = status.ordinal();
-        this.message = (message != null) ? message.toString(): "null";
-    }
-
-    public PluginResult(Status status, int i) {
-        this.status = status.ordinal();
-        this.message = ""+i;
-    }
-
-    public PluginResult(Status status, float f) {
-        this.status = status.ordinal();
-        this.message = ""+f;
-    }
-
-    public PluginResult(Status status, boolean b) {
-        this.status = status.ordinal();
-        this.message = ""+b;
-    }
-    
-    public PluginResult(Status status, long l) {
-        this.status = status.ordinal();
-        this.message = ""+l;
-    }
-
-    public int getStatus() {
-        return status;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setKeepCallback(boolean b) {
-        this.keepCallback = b;
-    }
-
-    public boolean getKeepCallback() {
-        return this.keepCallback;
-    }
-    
-    public String getJSONString() {
-        return "{status:" + this.status + ",message:" + this.message + ",keepCallback:" + this.keepCallback + "}";
-    }
-
-    /**
-     * Returns the JavaScript string that executes the success callback for the
-     * appropriate PhoneGap plugin.  The string is intended to be passed to the  
-     * JavaScript engine.
-     * @param callbackId Unique id of the callback that is associated with the invoked plugin
-     * @return JavaScript string that invokes the appropriate plugin success callback
-     */
-    public String toSuccessCallbackString(String callbackId) {
-        return "try { PhoneGap.callbackSuccess('"+callbackId+"', " + this.getJSONString() + "); } catch(e) { alert('error in callbackSuccess:' + e.message); }";
-    }
-
-    /**
-     * Returns the JavaScript string that executes the error callback for the
-     * appropriate PhoneGap plugin.  The string is intended to be passed to the  
-     * JavaScript engine.
-     * @param callbackId Unique id of the callback that is associated with the invoked plugin
-     * @return JavaScript string that invokes the appropriate plugin error callback
-     */
-    public String toErrorCallbackString(String callbackId) {
-        return "try { PhoneGap.callbackError('"+callbackId+"', " + this.getJSONString() + "); } catch(e) { alert('error in callbackError:' + e.message); }";
-    }
-
-    public String toErrorString() {
-        return "alert('general error');";
-    }
-
-    /**
-     * Enumerates PluginResult status.
-     */
-    public static class Status
-    {
-        private int val;
-        private String message;
-
-        protected Status(int val, String message) {
-            this.val = val;
-            this.message = message;
-        }
-
-        public int ordinal() {
-            return this.val;
-        }
-
-        public String getMessage() {
-            return this.message;
-        }
-
-        public static final Status NO_RESULT = new Status(0, "No result");
-        public static final Status OK = new Status(1, "OK");
-        public static final Status CLASS_NOT_FOUND_EXCEPTION = new Status(2, "Class not found");
-        public static final Status ILLEGAL_ACCESS_EXCEPTION = new Status(3, "Illegal access");
-        public static final Status INSTANTIATION_EXCEPTION = new Status(4, "Instantiation error");
-        public static final Status MALFORMED_URL_EXCEPTION = new Status(5, "Malformed URL");
-        public static final Status IO_EXCEPTION = new Status(6, "IO error");
-        public static final Status INVALID_ACTION = new Status(7, "Invalid action");
-        public static final Status JSON_EXCEPTION = new Status(8, "JSON error");
-        public static final Status ERROR = new Status(9, "Error");
-    }
-}


Mime
View raw message