You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pm...@apache.org on 2012/03/22 13:50:23 UTC
[1/12] git commit: 2nd try at file refactoring
Updated Branches:
refs/heads/CB-280 f3acff6d3 -> 76f646732
2nd try at file refactoring
So, this time, I moved the 'lib' directory to 'lib0'
for the time being, and use the script 'build/split-cordova.sh'
to rebuild a new 'lib' directory.
That directory has the following contents:
lib/android - platform specific
lib/blackberry - platform specific
lib/common - common modules
lib/cordova.js - base cordova module
lib/errgen - platform specific
lib/ios - platform specific
lib/playbook - platform specific
lib/scripts - platform specific
lib/test - common scripts (not modules)
lib/webworks - platform specific
lib/wp7 - platform specific
All the files in lib/ with the exception of lib/scripts are
modules, and they're all sitting at the same 'level'. So, to
build a copy of the source modules for android, you can do
the following:
cp -R lib/common gen/android
cp -R lib/android gen/android
'platform specific' files overwrite any 'common' files,
per the order of the cp commands above.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/76f64673
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/76f64673
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/76f64673
Branch: refs/heads/CB-280
Commit: 76f646732ea54686f3b0c8e7f55d8340855de733
Parents: f3acff6
Author: Patrick Mueller <pm...@apache.org>
Authored: Thu Mar 22 08:40:46 2012 -0400
Committer: Patrick Mueller <pm...@apache.org>
Committed: Thu Mar 22 08:48:26 2012 -0400
----------------------------------------------------------------------
build/packager.js | 21 +-
build/split-cordova.sh | 105 ++--
lib-common/cordova.js | 232 ---------
lib-common/cordova/builder.js | 86 ----
lib-common/cordova/channel.js | 207 --------
lib-common/cordova/common.js | 180 -------
lib-common/cordova/exec.js | 1 -
lib-common/cordova/platform.js | 1 -
lib-common/cordova/plugin/Acceleration.js | 8 -
lib-common/cordova/plugin/Camera.js | 84 ----
lib-common/cordova/plugin/CameraConstants.js | 20 -
lib-common/cordova/plugin/CaptureAudioOptions.js | 13 -
lib-common/cordova/plugin/CaptureError.js | 19 -
lib-common/cordova/plugin/CaptureImageOptions.js | 11 -
lib-common/cordova/plugin/CaptureVideoOptions.js | 13 -
lib-common/cordova/plugin/CompassError.js | 13 -
lib-common/cordova/plugin/CompassHeading.js | 8 -
lib-common/cordova/plugin/ConfigurationData.js | 15 -
lib-common/cordova/plugin/Connection.js | 12 -
lib-common/cordova/plugin/Contact.js | 177 -------
lib-common/cordova/plugin/ContactAddress.js | 25 -
lib-common/cordova/plugin/ContactError.js | 21 -
lib-common/cordova/plugin/ContactField.js | 16 -
lib-common/cordova/plugin/ContactFindOptions.js | 13 -
lib-common/cordova/plugin/ContactName.js | 20 -
lib-common/cordova/plugin/ContactOrganization.js | 23 -
lib-common/cordova/plugin/Coordinates.js | 43 --
lib-common/cordova/plugin/DirectoryEntry.js | 80 ---
lib-common/cordova/plugin/DirectoryReader.js | 41 --
lib-common/cordova/plugin/Entry.js | 198 --------
lib-common/cordova/plugin/File.js | 18 -
lib-common/cordova/plugin/FileEntry.js | 63 ---
lib-common/cordova/plugin/FileError.js | 25 -
lib-common/cordova/plugin/FileReader.js | 249 ----------
lib-common/cordova/plugin/FileSystem.js | 17 -
lib-common/cordova/plugin/FileTransfer.js | 68 ---
lib-common/cordova/plugin/FileTransferError.js | 13 -
lib-common/cordova/plugin/FileUploadOptions.js | 16 -
lib-common/cordova/plugin/FileUploadResult.js | 11 -
lib-common/cordova/plugin/FileWriter.js | 253 ----------
lib-common/cordova/plugin/Flags.js | 15 -
lib-common/cordova/plugin/LocalFileSystem.js | 13 -
lib-common/cordova/plugin/Media.js | 186 -------
lib-common/cordova/plugin/MediaError.js | 16 -
lib-common/cordova/plugin/MediaFile.js | 56 ---
lib-common/cordova/plugin/MediaFileData.js | 18 -
lib-common/cordova/plugin/Metadata.js | 10 -
lib-common/cordova/plugin/Position.js | 8 -
lib-common/cordova/plugin/PositionError.js | 17 -
lib-common/cordova/plugin/ProgressEvent.js | 46 --
lib-common/cordova/plugin/accelerometer.js | 95 ----
lib-common/cordova/plugin/battery.js | 87 ----
lib-common/cordova/plugin/capture.js | 72 ---
lib-common/cordova/plugin/compass.js | 90 ----
lib-common/cordova/plugin/contacts.js | 57 ---
lib-common/cordova/plugin/geolocation.js | 94 ----
lib-common/cordova/plugin/network.js | 59 ---
lib-common/cordova/plugin/notification.js | 56 ---
lib-common/cordova/plugin/requestFileSystem.js | 40 --
.../cordova/plugin/resolveLocalFileSystemURI.js | 41 --
lib-common/cordova/utils.js | 94 ----
lib-platforms/android/cordova/exec.js | 82 ----
lib-platforms/android/cordova/platform.js | 131 -----
.../android/cordova/plugin/android/app.js | 71 ---
.../android/cordova/plugin/android/callback.js | 85 ----
.../android/cordova/plugin/android/device.js | 92 ----
.../android/cordova/plugin/android/polling.js | 33 --
.../android/cordova/plugin/android/storage.js | 377 ---------------
lib-platforms/blackberry/cordova/exec.js | 56 ---
lib-platforms/blackberry/cordova/platform.js | 173 -------
.../cordova/plugin/blackberry/DirectoryEntry.js | 239 ---------
.../blackberry/cordova/plugin/blackberry/Entry.js | 87 ----
.../blackberry/cordova/plugin/blackberry/app.js | 51 --
.../blackberry/cordova/plugin/blackberry/device.js | 23 -
.../cordova/plugin/blackberry/manager.js | 87 ----
.../cordova/plugin/blackberry/notification.js | 53 --
lib-platforms/errgen/cordova/exec.js | 107 ----
lib-platforms/errgen/cordova/platform.js | 28 --
.../errgen/cordova/plugin/errgen/device.js | 42 --
lib-platforms/ios/cordova/exec.js | 93 ----
lib-platforms/ios/cordova/platform.js | 41 --
lib-platforms/ios/cordova/plugin/ios/Entry.js | 7 -
lib-platforms/ios/cordova/plugin/ios/FileReader.js | 87 ----
lib-platforms/ios/cordova/plugin/ios/console.js | 102 ----
lib-platforms/ios/cordova/plugin/ios/device.js | 30 --
lib-platforms/ios/cordova/plugin/ios/nativecomm.js | 10 -
.../ios/cordova/plugin/ios/notification.js | 7 -
lib-platforms/playbook/cordova/exec.js | 56 ---
lib-platforms/playbook/cordova/platform.js | 16 -
.../playbook/cordova/plugin/playbook/device.js | 23 -
.../playbook/cordova/plugin/playbook/manager.js | 285 -----------
lib-platforms/test/cordova/exec.js | 1 -
.../webworks/cordova/plugin/webworks/manager.js | 14 -
lib-platforms/wp7/cordova/exec.js | 57 ---
lib-platforms/wp7/cordova/platform.js | 16 -
lib-platforms/wp7/cordova/plugin/wp7/device.js | 26 -
lib-scripts/bootstrap-errgen.js | 20 -
lib-scripts/bootstrap-playbook.js | 1 -
lib-scripts/bootstrap.js | 69 ---
lib-scripts/require.js | 43 --
lib/android/exec.js | 82 ++++
lib/android/platform.js | 131 +++++
lib/android/plugin/android/app.js | 71 +++
lib/android/plugin/android/callback.js | 85 ++++
lib/android/plugin/android/device.js | 92 ++++
lib/android/plugin/android/polling.js | 33 ++
lib/android/plugin/android/storage.js | 377 +++++++++++++++
lib/blackberry/exec.js | 56 +++
lib/blackberry/platform.js | 173 +++++++
lib/blackberry/plugin/blackberry/DirectoryEntry.js | 239 +++++++++
lib/blackberry/plugin/blackberry/Entry.js | 87 ++++
lib/blackberry/plugin/blackberry/app.js | 51 ++
lib/blackberry/plugin/blackberry/device.js | 23 +
lib/blackberry/plugin/blackberry/manager.js | 87 ++++
lib/blackberry/plugin/blackberry/notification.js | 53 ++
lib/bootstrap.js | 69 ---
lib/bootstrap/errgen.js | 20 -
lib/bootstrap/playbook.js | 1 -
lib/builder.js | 86 ----
lib/channel.js | 207 --------
lib/common/builder.js | 86 ++++
lib/common/channel.js | 207 ++++++++
lib/common/common.js | 180 +++++++
lib/common/exec.js | 1 +
lib/common/platform.js | 1 +
lib/common/plugin/Acceleration.js | 8 +
lib/common/plugin/Camera.js | 84 ++++
lib/common/plugin/CameraConstants.js | 20 +
lib/common/plugin/CaptureAudioOptions.js | 13 +
lib/common/plugin/CaptureError.js | 19 +
lib/common/plugin/CaptureImageOptions.js | 11 +
lib/common/plugin/CaptureVideoOptions.js | 13 +
lib/common/plugin/CompassError.js | 13 +
lib/common/plugin/CompassHeading.js | 8 +
lib/common/plugin/ConfigurationData.js | 15 +
lib/common/plugin/Connection.js | 12 +
lib/common/plugin/Contact.js | 177 +++++++
lib/common/plugin/ContactAddress.js | 25 +
lib/common/plugin/ContactError.js | 21 +
lib/common/plugin/ContactField.js | 16 +
lib/common/plugin/ContactFindOptions.js | 13 +
lib/common/plugin/ContactName.js | 20 +
lib/common/plugin/ContactOrganization.js | 23 +
lib/common/plugin/Coordinates.js | 43 ++
lib/common/plugin/DirectoryEntry.js | 80 +++
lib/common/plugin/DirectoryReader.js | 41 ++
lib/common/plugin/Entry.js | 198 ++++++++
lib/common/plugin/File.js | 18 +
lib/common/plugin/FileEntry.js | 63 +++
lib/common/plugin/FileError.js | 25 +
lib/common/plugin/FileReader.js | 249 ++++++++++
lib/common/plugin/FileSystem.js | 17 +
lib/common/plugin/FileTransfer.js | 68 +++
lib/common/plugin/FileTransferError.js | 13 +
lib/common/plugin/FileUploadOptions.js | 16 +
lib/common/plugin/FileUploadResult.js | 11 +
lib/common/plugin/FileWriter.js | 253 ++++++++++
lib/common/plugin/Flags.js | 15 +
lib/common/plugin/LocalFileSystem.js | 13 +
lib/common/plugin/Media.js | 186 +++++++
lib/common/plugin/MediaError.js | 16 +
lib/common/plugin/MediaFile.js | 56 +++
lib/common/plugin/MediaFileData.js | 18 +
lib/common/plugin/Metadata.js | 10 +
lib/common/plugin/Position.js | 8 +
lib/common/plugin/PositionError.js | 17 +
lib/common/plugin/ProgressEvent.js | 46 ++
lib/common/plugin/accelerometer.js | 95 ++++
lib/common/plugin/battery.js | 87 ++++
lib/common/plugin/capture.js | 72 +++
lib/common/plugin/compass.js | 90 ++++
lib/common/plugin/contacts.js | 57 +++
lib/common/plugin/geolocation.js | 94 ++++
lib/common/plugin/network.js | 59 +++
lib/common/plugin/notification.js | 56 +++
lib/common/plugin/requestFileSystem.js | 40 ++
lib/common/plugin/resolveLocalFileSystemURI.js | 41 ++
lib/common/utils.js | 94 ++++
lib/errgen/exec.js | 107 ++++
lib/errgen/platform.js | 28 ++
lib/errgen/plugin/errgen/device.js | 42 ++
lib/exec/android.js | 82 ----
lib/exec/blackberry.js | 56 ---
lib/exec/errgen.js | 107 ----
lib/exec/ios.js | 93 ----
lib/exec/playbook.js | 56 ---
lib/exec/test.js | 1 -
lib/exec/wp7.js | 57 ---
lib/ios/exec.js | 93 ++++
lib/ios/platform.js | 41 ++
lib/ios/plugin/ios/Entry.js | 7 +
lib/ios/plugin/ios/FileReader.js | 87 ++++
lib/ios/plugin/ios/console.js | 102 ++++
lib/ios/plugin/ios/device.js | 30 ++
lib/ios/plugin/ios/nativecomm.js | 10 +
lib/ios/plugin/ios/notification.js | 7 +
lib/platform/android.js | 131 -----
lib/platform/blackberry.js | 173 -------
lib/platform/common.js | 180 -------
lib/platform/errgen.js | 28 --
lib/platform/ios.js | 41 --
lib/platform/playbook.js | 16 -
lib/platform/wp7.js | 16 -
lib/playbook/exec.js | 56 +++
lib/playbook/platform.js | 16 +
lib/playbook/plugin/playbook/device.js | 23 +
lib/playbook/plugin/playbook/manager.js | 285 +++++++++++
lib/plugin/Acceleration.js | 8 -
lib/plugin/Camera.js | 84 ----
lib/plugin/CameraConstants.js | 20 -
lib/plugin/CaptureAudioOptions.js | 13 -
lib/plugin/CaptureError.js | 19 -
lib/plugin/CaptureImageOptions.js | 11 -
lib/plugin/CaptureVideoOptions.js | 13 -
lib/plugin/CompassError.js | 13 -
lib/plugin/CompassHeading.js | 8 -
lib/plugin/ConfigurationData.js | 15 -
lib/plugin/Connection.js | 12 -
lib/plugin/Contact.js | 177 -------
lib/plugin/ContactAddress.js | 25 -
lib/plugin/ContactError.js | 21 -
lib/plugin/ContactField.js | 16 -
lib/plugin/ContactFindOptions.js | 13 -
lib/plugin/ContactName.js | 20 -
lib/plugin/ContactOrganization.js | 23 -
lib/plugin/Coordinates.js | 43 --
lib/plugin/DirectoryEntry.js | 80 ---
lib/plugin/DirectoryReader.js | 41 --
lib/plugin/Entry.js | 198 --------
lib/plugin/File.js | 18 -
lib/plugin/FileEntry.js | 63 ---
lib/plugin/FileError.js | 25 -
lib/plugin/FileReader.js | 249 ----------
lib/plugin/FileSystem.js | 17 -
lib/plugin/FileTransfer.js | 68 ---
lib/plugin/FileTransferError.js | 13 -
lib/plugin/FileUploadOptions.js | 16 -
lib/plugin/FileUploadResult.js | 11 -
lib/plugin/FileWriter.js | 253 ----------
lib/plugin/Flags.js | 15 -
lib/plugin/LocalFileSystem.js | 13 -
lib/plugin/Media.js | 186 -------
lib/plugin/MediaError.js | 16 -
lib/plugin/MediaFile.js | 56 ---
lib/plugin/MediaFileData.js | 18 -
lib/plugin/Metadata.js | 10 -
lib/plugin/Position.js | 8 -
lib/plugin/PositionError.js | 17 -
lib/plugin/ProgressEvent.js | 46 --
lib/plugin/accelerometer.js | 95 ----
lib/plugin/android/app.js | 71 ---
lib/plugin/android/callback.js | 85 ----
lib/plugin/android/device.js | 92 ----
lib/plugin/android/polling.js | 33 --
lib/plugin/android/storage.js | 377 ---------------
lib/plugin/battery.js | 87 ----
lib/plugin/blackberry/DirectoryEntry.js | 239 ---------
lib/plugin/blackberry/Entry.js | 87 ----
lib/plugin/blackberry/app.js | 51 --
lib/plugin/blackberry/device.js | 23 -
lib/plugin/blackberry/manager.js | 87 ----
lib/plugin/blackberry/notification.js | 53 --
lib/plugin/capture.js | 72 ---
lib/plugin/compass.js | 90 ----
lib/plugin/contacts.js | 57 ---
lib/plugin/errgen/device.js | 42 --
lib/plugin/geolocation.js | 94 ----
lib/plugin/ios/Entry.js | 7 -
lib/plugin/ios/FileReader.js | 87 ----
lib/plugin/ios/console.js | 102 ----
lib/plugin/ios/device.js | 30 --
lib/plugin/ios/nativecomm.js | 10 -
lib/plugin/ios/notification.js | 7 -
lib/plugin/network.js | 59 ---
lib/plugin/notification.js | 56 ---
lib/plugin/playbook/device.js | 23 -
lib/plugin/playbook/manager.js | 285 -----------
lib/plugin/requestFileSystem.js | 40 --
lib/plugin/resolveLocalFileSystemURI.js | 41 --
lib/plugin/webworks/manager.js | 14 -
lib/plugin/wp7/device.js | 26 -
lib/require.js | 43 --
lib/scripts/bootstrap-errgen.js | 20 +
lib/scripts/bootstrap-playbook.js | 1 +
lib/scripts/bootstrap.js | 69 +++
lib/scripts/require.js | 43 ++
lib/test/exec.js | 1 +
lib/utils.js | 94 ----
lib/webworks/plugin/webworks/manager.js | 14 +
lib/wp7/exec.js | 57 +++
lib/wp7/platform.js | 16 +
lib/wp7/plugin/wp7/device.js | 26 +
lib0/bootstrap.js | 69 +++
lib0/bootstrap/errgen.js | 20 +
lib0/bootstrap/playbook.js | 1 +
lib0/builder.js | 86 ++++
lib0/channel.js | 207 ++++++++
lib0/cordova.js | 232 +++++++++
lib0/exec/android.js | 82 ++++
lib0/exec/blackberry.js | 56 +++
lib0/exec/errgen.js | 107 ++++
lib0/exec/ios.js | 93 ++++
lib0/exec/playbook.js | 56 +++
lib0/exec/test.js | 1 +
lib0/exec/wp7.js | 57 +++
lib0/platform/android.js | 131 +++++
lib0/platform/blackberry.js | 173 +++++++
lib0/platform/common.js | 180 +++++++
lib0/platform/errgen.js | 28 ++
lib0/platform/ios.js | 41 ++
lib0/platform/playbook.js | 16 +
lib0/platform/wp7.js | 16 +
lib0/plugin/Acceleration.js | 8 +
lib0/plugin/Camera.js | 84 ++++
lib0/plugin/CameraConstants.js | 20 +
lib0/plugin/CaptureAudioOptions.js | 13 +
lib0/plugin/CaptureError.js | 19 +
lib0/plugin/CaptureImageOptions.js | 11 +
lib0/plugin/CaptureVideoOptions.js | 13 +
lib0/plugin/CompassError.js | 13 +
lib0/plugin/CompassHeading.js | 8 +
lib0/plugin/ConfigurationData.js | 15 +
lib0/plugin/Connection.js | 12 +
lib0/plugin/Contact.js | 177 +++++++
lib0/plugin/ContactAddress.js | 25 +
lib0/plugin/ContactError.js | 21 +
lib0/plugin/ContactField.js | 16 +
lib0/plugin/ContactFindOptions.js | 13 +
lib0/plugin/ContactName.js | 20 +
lib0/plugin/ContactOrganization.js | 23 +
lib0/plugin/Coordinates.js | 43 ++
lib0/plugin/DirectoryEntry.js | 80 +++
lib0/plugin/DirectoryReader.js | 41 ++
lib0/plugin/Entry.js | 198 ++++++++
lib0/plugin/File.js | 18 +
lib0/plugin/FileEntry.js | 63 +++
lib0/plugin/FileError.js | 25 +
lib0/plugin/FileReader.js | 249 ++++++++++
lib0/plugin/FileSystem.js | 17 +
lib0/plugin/FileTransfer.js | 68 +++
lib0/plugin/FileTransferError.js | 13 +
lib0/plugin/FileUploadOptions.js | 16 +
lib0/plugin/FileUploadResult.js | 11 +
lib0/plugin/FileWriter.js | 253 ++++++++++
lib0/plugin/Flags.js | 15 +
lib0/plugin/LocalFileSystem.js | 13 +
lib0/plugin/Media.js | 186 +++++++
lib0/plugin/MediaError.js | 16 +
lib0/plugin/MediaFile.js | 56 +++
lib0/plugin/MediaFileData.js | 18 +
lib0/plugin/Metadata.js | 10 +
lib0/plugin/Position.js | 8 +
lib0/plugin/PositionError.js | 17 +
lib0/plugin/ProgressEvent.js | 46 ++
lib0/plugin/accelerometer.js | 95 ++++
lib0/plugin/android/app.js | 71 +++
lib0/plugin/android/callback.js | 85 ++++
lib0/plugin/android/device.js | 92 ++++
lib0/plugin/android/polling.js | 33 ++
lib0/plugin/android/storage.js | 377 +++++++++++++++
lib0/plugin/battery.js | 87 ++++
lib0/plugin/blackberry/DirectoryEntry.js | 239 +++++++++
lib0/plugin/blackberry/Entry.js | 87 ++++
lib0/plugin/blackberry/app.js | 51 ++
lib0/plugin/blackberry/device.js | 23 +
lib0/plugin/blackberry/manager.js | 87 ++++
lib0/plugin/blackberry/notification.js | 53 ++
lib0/plugin/capture.js | 72 +++
lib0/plugin/compass.js | 90 ++++
lib0/plugin/contacts.js | 57 +++
lib0/plugin/errgen/device.js | 42 ++
lib0/plugin/geolocation.js | 94 ++++
lib0/plugin/ios/Entry.js | 7 +
lib0/plugin/ios/FileReader.js | 87 ++++
lib0/plugin/ios/console.js | 102 ++++
lib0/plugin/ios/device.js | 30 ++
lib0/plugin/ios/nativecomm.js | 10 +
lib0/plugin/ios/notification.js | 7 +
lib0/plugin/network.js | 59 +++
lib0/plugin/notification.js | 56 +++
lib0/plugin/playbook/device.js | 23 +
lib0/plugin/playbook/manager.js | 285 +++++++++++
lib0/plugin/requestFileSystem.js | 40 ++
lib0/plugin/resolveLocalFileSystemURI.js | 41 ++
lib0/plugin/webworks/manager.js | 14 +
lib0/plugin/wp7/device.js | 26 +
lib0/require.js | 43 ++
lib0/utils.js | 94 ++++
test/runner.js | 11 +-
389 files changed, 12450 insertions(+), 12435 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/build/packager.js
----------------------------------------------------------------------
diff --git a/build/packager.js b/build/packager.js
index ab1fb71..6569020 100644
--- a/build/packager.js
+++ b/build/packager.js
@@ -26,14 +26,16 @@ packager.generate = function(platform) {
//------------------------------------------------------------------------------
packager.bundle = function(platform, debug) {
- var modules = collectFiles('lib-common')
- var scripts = collectFiles('lib-scripts')
+ var modules = collectFiles('lib/common')
+ var scripts = collectFiles('lib/scripts')
+
+ modules[''] = 'lib/cordova.js'
if (['playbook', 'blackberry'].indexOf(platform) > -1) {
- copyProps(modules, collectFiles(path.join('lib-platforms', 'webworks')))
+ copyProps(modules, collectFiles(path.join('lib', 'webworks')))
}
- copyProps(modules, collectFiles(path.join('lib-platforms', platform)))
+ copyProps(modules, collectFiles(path.join('lib', platform)))
var output = []
@@ -53,10 +55,9 @@ packager.bundle = function(platform, debug) {
moduleIds.sort()
for (var i=0; i<moduleIds.length; i++) {
- var moduleId = moduleIds[i];
+ var moduleId = moduleIds[i]
writeModule(output, modules[moduleId], moduleId, debug)
-
}
output.push("\nwindow.cordova = require('cordova');\n")
@@ -128,9 +129,13 @@ function writeScript(oFile, fileName, debug) {
//------------------------------------------------------------------------------
function writeModule(oFile, fileName, moduleId, debug) {
- var contents = getContents(fileName, 'utf8')
+ var contents = '\n' + getContents(fileName, 'utf8') + '\n'
+
+ moduleId = path.join('cordova', moduleId)
+
+ var signature = 'function(require, exports, module)'
- contents = 'define("' + moduleId + '", function(require, exports, module) {\n' + contents + '\n})\n'
+ contents = 'define("' + moduleId + '", ' + signature + ' {' + contents + '})\n'
writeContents(oFile, fileName, contents, debug)
}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/build/split-cordova.sh
----------------------------------------------------------------------
diff --git a/build/split-cordova.sh b/build/split-cordova.sh
index dfbd6e4..4a96dc0 100755
--- a/build/split-cordova.sh
+++ b/build/split-cordova.sh
@@ -9,72 +9,73 @@
#---------------------------------------------
-rm -rf lib-common lib-platforms lib-scripts
+rm -rf lib
#---------------------------------------------
-mkdir lib-common
-mkdir lib-common/cordova
-cp -R lib/* lib-common/cordova
-mv lib-common/cordova/cordova.js lib-common/cordova.js
+mkdir lib
+mkdir lib/common
-echo "throw new Error('should have been replaced at build time with platform implementation')" > lib-common/cordova/exec.js
-echo "throw new Error('should have been replaced at build time with platform implementation')" > lib-common/cordova/platform.js
+cp -R lib0/* lib/common
+mv lib/common/cordova.js lib/cordova.js
+
+echo "throw new Error('should have been replaced at build time with platform implementation')" > lib/common/exec.js
+echo "throw new Error('should have been replaced at build time with platform implementation')" > lib/common/platform.js
#---------------------------------------------
-mkdir -p lib-platforms/android/cordova/plugin/android
-mkdir -p lib-platforms/blackberry/cordova/plugin/blackberry
-mkdir -p lib-platforms/errgen/cordova/plugin/errgen
-mkdir -p lib-platforms/ios/cordova/plugin/ios
-mkdir -p lib-platforms/playbook/cordova/plugin/playbook
-mkdir -p lib-platforms/test/cordova/plugin/test
-mkdir -p lib-platforms/webworks/cordova/plugin/webworks
-mkdir -p lib-platforms/wp7/cordova/plugin/wp7
+mkdir -p lib/android/plugin/android
+mkdir -p lib/blackberry/plugin/blackberry
+mkdir -p lib/errgen/plugin/errgen
+mkdir -p lib/ios/plugin/ios
+mkdir -p lib/playbook/plugin/playbook
+mkdir -p lib/test/plugin/test
+mkdir -p lib/webworks/plugin/webworks
+mkdir -p lib/wp7/plugin/wp7
#---------------------------------------------
-mv lib-common/cordova/exec/android.js lib-platforms/android/cordova/exec.js
-mv lib-common/cordova/exec/blackberry.js lib-platforms/blackberry/cordova/exec.js
-mv lib-common/cordova/exec/errgen.js lib-platforms/errgen/cordova/exec.js
-mv lib-common/cordova/exec/ios.js lib-platforms/ios/cordova/exec.js
-mv lib-common/cordova/exec/playbook.js lib-platforms/playbook/cordova/exec.js
-mv lib-common/cordova/exec/test.js lib-platforms/test/cordova/exec.js
-mv lib-common/cordova/exec/wp7.js lib-platforms/wp7/cordova/exec.js
+mv lib/common/exec/android.js lib/android/exec.js
+mv lib/common/exec/blackberry.js lib/blackberry/exec.js
+mv lib/common/exec/errgen.js lib/errgen/exec.js
+mv lib/common/exec/ios.js lib/ios/exec.js
+mv lib/common/exec/playbook.js lib/playbook/exec.js
+mv lib/common/exec/test.js lib/test/exec.js
+mv lib/common/exec/wp7.js lib/wp7/exec.js
-rmdir lib-common/cordova/exec
+rmdir lib/common/exec
#---------------------------------------------
-mv lib-common/cordova/platform/android.js lib-platforms/android/cordova/platform.js
-mv lib-common/cordova/platform/blackberry.js lib-platforms/blackberry/cordova/platform.js
-mv lib-common/cordova/platform/errgen.js lib-platforms/errgen/cordova/platform.js
-mv lib-common/cordova/platform/ios.js lib-platforms/ios/cordova/platform.js
-mv lib-common/cordova/platform/playbook.js lib-platforms/playbook/cordova/platform.js
-mv lib-common/cordova/platform/wp7.js lib-platforms/wp7/cordova/platform.js
-mv lib-common/cordova/platform/common.js lib-common/cordova/common.js
+mv lib/common/platform/android.js lib/android/platform.js
+mv lib/common/platform/blackberry.js lib/blackberry/platform.js
+mv lib/common/platform/errgen.js lib/errgen/platform.js
+mv lib/common/platform/ios.js lib/ios/platform.js
+mv lib/common/platform/playbook.js lib/playbook/platform.js
+mv lib/common/platform/wp7.js lib/wp7/platform.js
+mv lib/common/platform/common.js lib/common/common.js
-rmdir lib-common/cordova/platform
+rmdir lib/common/platform
#---------------------------------------------
-mv lib-common/cordova/plugin/android/*.js lib-platforms/android/cordova/plugin/android
-mv lib-common/cordova/plugin/blackberry/*.js lib-platforms/blackberry/cordova/plugin/blackberry
-mv lib-common/cordova/plugin/errgen/*.js lib-platforms/errgen/cordova/plugin/errgen
-mv lib-common/cordova/plugin/ios/*.js lib-platforms/ios/cordova/plugin/ios
-mv lib-common/cordova/plugin/playbook/*.js lib-platforms/playbook/cordova/plugin/playbook
-mv lib-common/cordova/plugin/webworks/*.js lib-platforms/webworks/cordova/plugin/webworks
-mv lib-common/cordova/plugin/wp7/*.js lib-platforms/wp7/cordova/plugin/wp7
-
-rmdir lib-common/cordova/plugin/android
-rmdir lib-common/cordova/plugin/blackberry
-rmdir lib-common/cordova/plugin/errgen
-rmdir lib-common/cordova/plugin/ios
-rmdir lib-common/cordova/plugin/playbook
-rmdir lib-common/cordova/plugin/webworks
-rmdir lib-common/cordova/plugin/wp7
+mv lib/common/plugin/android/*.js lib/android/plugin/android
+mv lib/common/plugin/blackberry/*.js lib/blackberry/plugin/blackberry
+mv lib/common/plugin/errgen/*.js lib/errgen/plugin/errgen
+mv lib/common/plugin/ios/*.js lib/ios/plugin/ios
+mv lib/common/plugin/playbook/*.js lib/playbook/plugin/playbook
+mv lib/common/plugin/webworks/*.js lib/webworks/plugin/webworks
+mv lib/common/plugin/wp7/*.js lib/wp7/plugin/wp7
+
+rmdir lib/common/plugin/android
+rmdir lib/common/plugin/blackberry
+rmdir lib/common/plugin/errgen
+rmdir lib/common/plugin/ios
+rmdir lib/common/plugin/playbook
+rmdir lib/common/plugin/webworks
+rmdir lib/common/plugin/wp7
#---------------------------------------------
-mkdir lib-scripts
-mv lib-common/cordova/bootstrap.js lib-scripts
-mv lib-common/cordova/require.js lib-scripts
+mkdir lib/scripts
+mv lib/common/bootstrap.js lib/scripts
+mv lib/common/require.js lib/scripts
-mv lib-common/cordova/bootstrap/errgen.js lib-scripts/bootstrap-errgen.js
-mv lib-common/cordova/bootstrap/playbook.js lib-scripts/bootstrap-playbook.js
+mv lib/common/bootstrap/errgen.js lib/scripts/bootstrap-errgen.js
+mv lib/common/bootstrap/playbook.js lib/scripts/bootstrap-playbook.js
-rm -rf lib-common/cordova/bootstrap
+rm -rf lib/common/bootstrap
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova.js b/lib-common/cordova.js
deleted file mode 100644
index 3d5b2a5..0000000
--- a/lib-common/cordova.js
+++ /dev/null
@@ -1,232 +0,0 @@
-var channel = require('cordova/channel');
-/**
- * Intercept calls to addEventListener + removeEventListener and handle deviceready,
- * resume, and pause events.
- */
-var m_document_addEventListener = document.addEventListener;
-var m_document_removeEventListener = document.removeEventListener;
-var m_window_addEventListener = window.addEventListener;
-var m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Houses custom event handlers to intercept on document + window event listeners.
- */
-var documentEventHandlers = {},
- windowEventHandlers = {};
-
-document.addEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- if (e == 'deviceready') {
- channel.onDeviceReady.subscribeOnce(handler);
- } else if (e == 'resume') {
- channel.onResume.subscribe(handler);
- // if subscribing listener after event has already fired, invoke the handler
- if (channel.onResume.fired && handler instanceof Function) {
- handler();
- }
- } else if (e == 'pause') {
- channel.onPause.subscribe(handler);
- } else if (typeof documentEventHandlers[e] != 'undefined') {
- documentEventHandlers[e].subscribe(handler);
- } else {
- m_document_addEventListener.call(document, evt, handler, capture);
- }
-};
-
-window.addEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- if (typeof windowEventHandlers[e] != 'undefined') {
- windowEventHandlers[e].subscribe(handler);
- } else {
- m_window_addEventListener.call(window, evt, handler, capture);
- }
-};
-
-document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
- if (typeof documentEventHandlers[e] != "undefined") {
- documentEventHandlers[e].unsubscribe(handler);
- } else {
- m_document_removeEventListener.call(document, evt, handler, capture);
- }
-};
-
-window.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
- if (typeof windowEventHandlers[e] != "undefined") {
- windowEventHandlers[e].unsubscribe(handler);
- } else {
- m_window_removeEventListener.call(window, evt, handler, capture);
- }
-};
-
-function createEvent(type, data) {
- var event = document.createEvent('Events');
- event.initEvent(type, false, false);
- if (data) {
- for (var i in data) {
- if (data.hasOwnProperty(i)) {
- event[i] = data[i];
- }
- }
- }
- return event;
-}
-
-var cordova = {
- define:define,
- require:require,
- /**
- * Methods to add/remove your own addEventListener hijacking on document + window.
- */
- addWindowEventHandler:function(event, opts) {
- return (windowEventHandlers[event] = channel.create(event, opts));
- },
- addDocumentEventHandler:function(event, opts) {
- return (documentEventHandlers[event] = channel.create(event, opts));
- },
- removeWindowEventHandler:function(event) {
- delete windowEventHandlers[event];
- },
- removeDocumentEventHandler:function(event) {
- delete documentEventHandlers[event];
- },
- /**
- * Method to fire event from native code
- */
- fireDocumentEvent: function(type, data) {
- var evt = createEvent(type, data);
- if (typeof documentEventHandlers[type] != 'undefined') {
- documentEventHandlers[type].fire(evt);
- } else {
- document.dispatchEvent(evt);
- }
- },
- fireWindowEvent: function(type, data) {
- var evt = createEvent(type,data);
- if (typeof windowEventHandlers[type] != 'undefined') {
- windowEventHandlers[type].fire(evt);
- } else {
- window.dispatchEvent(evt);
- }
- },
- // TODO: this is Android only; think about how to do this better
- shuttingDown:false,
- UsePolling:false,
- // END TODO
-
- // TODO: iOS only
- // This queue holds the currently executing command and all pending
- // commands executed with cordova.exec().
- commandQueue:[],
- // Indicates if we're currently in the middle of flushing the command
- // queue on the native side.
- commandQueueFlushing:false,
- // END TODO
- /**
- * Plugin callback mechanism.
- */
- callbackId: 0,
- callbacks: {},
- callbackStatus: {
- NO_RESULT: 0,
- OK: 1,
- CLASS_NOT_FOUND_EXCEPTION: 2,
- ILLEGAL_ACCESS_EXCEPTION: 3,
- INSTANTIATION_EXCEPTION: 4,
- MALFORMED_URL_EXCEPTION: 5,
- IO_EXCEPTION: 6,
- INVALID_ACTION: 7,
- JSON_EXCEPTION: 8,
- ERROR: 9
- },
-
- /**
- * Called by native code when returning successful result from an action.
- *
- * @param callbackId
- * @param args
- */
- callbackSuccess: function(callbackId, args) {
- if (cordova.callbacks[callbackId]) {
-
- // If result is to be sent to callback
- if (args.status == cordova.callbackStatus.OK) {
- try {
- if (cordova.callbacks[callbackId].success) {
- cordova.callbacks[callbackId].success(args.message);
- }
- }
- catch (e) {
- console.log("Error in success callback: "+callbackId+" = "+e);
- }
- }
-
- // Clear callback if not expecting any more results
- if (!args.keepCallback) {
- delete cordova.callbacks[callbackId];
- }
- }
- },
-
- /**
- * Called by native code when returning error result from an action.
- *
- * @param callbackId
- * @param args
- */
- callbackError: function(callbackId, args) {
- if (cordova.callbacks[callbackId]) {
- try {
- if (cordova.callbacks[callbackId].fail) {
- cordova.callbacks[callbackId].fail(args.message);
- }
- }
- catch (e) {
- console.log("Error in error callback: "+callbackId+" = "+e);
- }
-
- // Clear callback if not expecting any more results
- if (!args.keepCallback) {
- delete cordova.callbacks[callbackId];
- }
- }
- },
-
- addPlugin: function(name, obj) {
- if (!window.plugins[name]) {
- window.plugins[name] = obj;
- }
- else {
- console.log("Error: Plugin "+name+" already exists.");
- }
- },
-
- addConstructor: function(func) {
- channel.onCordovaReady.subscribeOnce(function() {
- try {
- func();
- } catch(e) {
- console.log("Failed to run constructor: " + e);
- }
- });
- }
-};
-
-/**
- * Legacy variable for plugin support
- */
-if (!window.PhoneGap) {
- window.PhoneGap = cordova;
-}
-
-/**
- * Plugins object
- */
-if (!window.plugins) {
- window.plugins = {};
-}
-
-module.exports = cordova;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/builder.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/builder.js b/lib-common/cordova/builder.js
deleted file mode 100644
index 0ff2f73..0000000
--- a/lib-common/cordova/builder.js
+++ /dev/null
@@ -1,86 +0,0 @@
-function each(objects, func, context) {
- for (var prop in objects) {
- if (objects.hasOwnProperty(prop)) {
- func.apply(context, [objects[prop], prop]);
- }
- }
-}
-
-function include(parent, objects, clobber, merge) {
- each(objects, function (obj, key) {
- try {
- var result = obj.path ? require(obj.path) : {};
-
- if (clobber) {
- // Clobber if it doesn't exist.
- if (typeof parent[key] === 'undefined') {
- parent[key] = result;
- } else if (typeof obj.path !== 'undefined') {
- // If merging, merge properties onto parent, otherwise, clobber.
- if (merge) {
- recursiveMerge(parent[key], result);
- } else {
- parent[key] = result;
- }
- }
- result = parent[key];
- } else {
- // Overwrite if not currently defined.
- if (typeof parent[key] == 'undefined') {
- parent[key] = result;
- } else if (merge && typeof obj.path !== 'undefined') {
- // If merging, merge parent onto result
- recursiveMerge(result, parent[key]);
- parent[key] = result;
- } else {
- // Set result to what already exists, so we can build children into it if they exist.
- result = parent[key];
- }
- }
-
- if (obj.children) {
- include(result, obj.children, clobber, merge);
- }
- } catch(e) {
- alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
- }
- });
-}
-
-/**
- * Merge properties from one object onto another recursively. Properties from
- * the src object will overwrite existing target property.
- *
- * @param target Object to merge properties into.
- * @param src Object to merge properties from.
- */
-function recursiveMerge(target, src) {
- for (var prop in src) {
- if (src.hasOwnProperty(prop)) {
- if (typeof target.prototype !== 'undefined' && target.prototype.constructor === target) {
- // If the target object is a constructor override off prototype.
- target.prototype[prop] = src[prop];
- } else {
- target[prop] = typeof src[prop] === 'object' ? recursiveMerge(
- target[prop], src[prop]) : src[prop];
- }
- }
- }
- return target;
-}
-
-module.exports = {
- build: function (objects) {
- return {
- intoButDontClobber: function (target) {
- include(target, objects, false, false);
- },
- intoAndClobber: function(target) {
- include(target, objects, true, false);
- },
- intoAndMerge: function(target) {
- include(target, objects, true, true);
- }
- };
- }
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/channel.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/channel.js b/lib-common/cordova/channel.js
deleted file mode 100755
index baf08b6..0000000
--- a/lib-common/cordova/channel.js
+++ /dev/null
@@ -1,207 +0,0 @@
-/**
- * Custom pub-sub channel that can have functions subscribed to it
- * @constructor
- * @param type String the channel name
- * @param opts Object options to pass into the channel, currently
- * supports:
- * onSubscribe: callback that fires when
- * something subscribes to the Channel. Sets
- * context to the Channel.
- * onUnsubscribe: callback that fires when
- * something unsubscribes to the Channel. Sets
- * context to the Channel.
- */
-var Channel = function(type, opts) {
- this.type = type;
- this.handlers = {};
- this.numHandlers = 0;
- this.guid = 0;
- this.fired = false;
- this.enabled = true;
- this.events = {
- onSubscribe:null,
- onUnsubscribe:null
- };
- if (opts) {
- if (opts.onSubscribe) this.events.onSubscribe = opts.onSubscribe;
- if (opts.onUnsubscribe) this.events.onUnsubscribe = opts.onUnsubscribe;
- }
- },
- channel = {
- /**
- * Calls the provided function only after all of the channels specified
- * have been fired.
- */
- join: function (h, c) {
- var i = c.length;
- var len = i;
- var f = function() {
- if (!(--i)) h();
- };
- for (var j=0; j<len; j++) {
- !c[j].fired?c[j].subscribeOnce(f):i--;
- }
- if (!i) h();
- },
- create: function (type, opts) {
- channel[type] = new Channel(type, opts);
- return channel[type];
- },
-
- /**
- * cordova Channels that must fire before "deviceready" is fired.
- */
- deviceReadyChannelsArray: [],
- deviceReadyChannelsMap: {},
-
- /**
- * Indicate that a feature needs to be initialized before it is ready to be used.
- * This holds up Cordova's "deviceready" event until the feature has been initialized
- * and Cordova.initComplete(feature) is called.
- *
- * @param feature {String} The unique feature name
- */
- waitForInitialization: function(feature) {
- if (feature) {
- var c = null;
- if (this[feature]) {
- c = this[feature];
- }
- else {
- c = this.create(feature);
- }
- this.deviceReadyChannelsMap[feature] = c;
- this.deviceReadyChannelsArray.push(c);
- }
- },
-
- /**
- * Indicate that initialization code has completed and the feature is ready to be used.
- *
- * @param feature {String} The unique feature name
- */
- initializationComplete: function(feature) {
- var c = this.deviceReadyChannelsMap[feature];
- if (c) {
- c.fire();
- }
- }
- },
- utils = require('cordova/utils');
-
-/**
- * Subscribes the given function to the channel. Any time that
- * Channel.fire is called so too will the function.
- * Optionally specify an execution context for the function
- * and a guid that can be used to stop subscribing to the channel.
- * Returns the guid.
- */
-Channel.prototype.subscribe = function(f, c, g) {
- // need a function to call
- if (f === null || f === undefined) { return; }
-
- var func = f;
- if (typeof c == "object" && f instanceof Function) { func = utils.close(c, f); }
-
- g = g || func.observer_guid || f.observer_guid || this.guid++;
- func.observer_guid = g;
- f.observer_guid = g;
- this.handlers[g] = func;
- this.numHandlers++;
- if (this.events.onSubscribe) this.events.onSubscribe.call(this);
- return g;
-};
-
-/**
- * Like subscribe but the function is only called once and then it
- * auto-unsubscribes itself.
- */
-Channel.prototype.subscribeOnce = function(f, c) {
- // need a function to call
- if (f === null || f === undefined) { return; }
-
- var g = null;
- var _this = this;
- var m = function() {
- f.apply(c || null, arguments);
- _this.unsubscribe(g);
- };
- if (this.fired) {
- if (typeof c == "object" && f instanceof Function) { f = utils.close(c, f); }
- f.apply(this, this.fireArgs);
- } else {
- g = this.subscribe(m);
- }
- return g;
-};
-
-/**
- * Unsubscribes the function with the given guid from the channel.
- */
-Channel.prototype.unsubscribe = function(g) {
- // need a function to unsubscribe
- if (g === null || g === undefined) { return; }
-
- if (g instanceof Function) { g = g.observer_guid; }
- this.handlers[g] = null;
- delete this.handlers[g];
- this.numHandlers--;
- if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
-};
-
-/**
- * Calls all functions subscribed to this channel.
- */
-Channel.prototype.fire = function(e) {
- if (this.enabled) {
- var fail = false;
- this.fired = true;
- for (var item in this.handlers) {
- var handler = this.handlers[item];
- if (handler instanceof Function) {
- var rv = (handler.apply(this, arguments)===false);
- fail = fail || rv;
- }
- }
- this.fireArgs = arguments;
- return !fail;
- }
- return true;
-};
-
-//HACK: defining them here so they are ready super fast!
-
-// DOM event that is received when the web page is loaded and parsed.
-channel.create('onDOMContentLoaded');
-
-// Event to indicate the Cordova native side is ready.
-channel.create('onNativeReady');
-
-// Event to indicate that all Cordova JavaScript objects have been created
-// and it's time to run plugin constructors.
-channel.create('onCordovaReady');
-
-// Event to indicate that device properties are available
-channel.create('onCordovaInfoReady');
-
-// Event to indicate that the connection property has been set.
-channel.create('onCordovaConnectionReady');
-
-// Event to indicate that Cordova is ready
-channel.create('onDeviceReady');
-
-// Event to indicate a resume lifecycle event
-channel.create('onResume');
-
-// Event to indicate a pause lifecycle event
-channel.create('onPause');
-
-// Event to indicate a destroy lifecycle event
-channel.create('onDestroy');
-
-// Channels that must fire before "deviceready" is fired.
-channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onCordovaInfoReady');
-channel.waitForInitialization('onCordovaConnectionReady');
-
-module.exports = channel;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/common.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/common.js b/lib-common/cordova/common.js
deleted file mode 100644
index e07bf03..0000000
--- a/lib-common/cordova/common.js
+++ /dev/null
@@ -1,180 +0,0 @@
-module.exports = {
- objects: {
- cordova: {
- path: 'cordova',
- children: {
- exec: {
- path: 'cordova/exec'
- }
- }
- },
- navigator: {
- children: {
- notification: {
- path: 'cordova/plugin/notification'
- },
- accelerometer: {
- path: 'cordova/plugin/accelerometer'
- },
- battery: {
- path: 'cordova/plugin/battery'
- },
- camera:{
- path: 'cordova/plugin/Camera'
- },
- compass:{
- path: 'cordova/plugin/compass'
- },
- contacts: {
- path: 'cordova/plugin/contacts'
- },
- device:{
- children:{
- capture: {
- path: 'cordova/plugin/capture'
- }
- }
- },
- geolocation: {
- path: 'cordova/plugin/geolocation'
- },
- network: {
- children: {
- connection: {
- path: 'cordova/plugin/network'
- }
- }
- }
- }
- },
- Acceleration: {
- path: 'cordova/plugin/Acceleration'
- },
- Camera:{
- path: 'cordova/plugin/CameraConstants'
- },
- CaptureError: {
- path: 'cordova/plugin/CaptureError'
- },
- CaptureAudioOptions:{
- path: 'cordova/plugin/CaptureAudioOptions'
- },
- CaptureImageOptions: {
- path: 'cordova/plugin/CaptureImageOptions'
- },
- CaptureVideoOptions: {
- path: 'cordova/plugin/CaptureVideoOptions'
- },
- CompassHeading:{
- path: 'cordova/plugin/CompassHeading'
- },
- CompassError:{
- path: 'cordova/plugin/CompassError'
- },
- ConfigurationData: {
- path: 'cordova/plugin/ConfigurationData'
- },
- Connection: {
- path: 'cordova/plugin/Connection'
- },
- Contact: {
- path: 'cordova/plugin/Contact'
- },
- ContactAddress: {
- path: 'cordova/plugin/ContactAddress'
- },
- ContactError: {
- path: 'cordova/plugin/ContactError'
- },
- ContactField: {
- path: 'cordova/plugin/ContactField'
- },
- ContactFindOptions: {
- path: 'cordova/plugin/ContactFindOptions'
- },
- ContactName: {
- path: 'cordova/plugin/ContactName'
- },
- ContactOrganization: {
- path: 'cordova/plugin/ContactOrganization'
- },
- Coordinates: {
- path: 'cordova/plugin/Coordinates'
- },
- DirectoryEntry: {
- path: 'cordova/plugin/DirectoryEntry'
- },
- DirectoryReader: {
- path: 'cordova/plugin/DirectoryReader'
- },
- Entry: {
- path: 'cordova/plugin/Entry'
- },
- File: {
- path: 'cordova/plugin/File'
- },
- FileEntry: {
- path: 'cordova/plugin/FileEntry'
- },
- FileError: {
- path: 'cordova/plugin/FileError'
- },
- FileReader: {
- path: 'cordova/plugin/FileReader'
- },
- FileSystem: {
- path: 'cordova/plugin/FileSystem'
- },
- FileTransfer: {
- path: 'cordova/plugin/FileTransfer'
- },
- FileTransferError: {
- path: 'cordova/plugin/FileTransferError'
- },
- FileUploadOptions: {
- path: 'cordova/plugin/FileUploadOptions'
- },
- FileUploadResult: {
- path: 'cordova/plugin/FileUploadResult'
- },
- FileWriter: {
- path: 'cordova/plugin/FileWriter'
- },
- Flags: {
- path: 'cordova/plugin/Flags'
- },
- LocalFileSystem: {
- path: 'cordova/plugin/LocalFileSystem'
- },
- Media: {
- path: 'cordova/plugin/Media'
- },
- MediaError: {
- path: 'cordova/plugin/MediaError'
- },
- MediaFile: {
- path: 'cordova/plugin/MediaFile'
- },
- MediaFileData:{
- path: 'cordova/plugin/MediaFileData'
- },
- Metadata:{
- path: 'cordova/plugin/Metadata'
- },
- Position: {
- path: 'cordova/plugin/Position'
- },
- PositionError: {
- path: 'cordova/plugin/PositionError'
- },
- ProgressEvent: {
- path: 'cordova/plugin/ProgressEvent'
- },
- requestFileSystem:{
- path: 'cordova/plugin/requestFileSystem'
- },
- resolveLocalFileSystemURI:{
- path: 'cordova/plugin/resolveLocalFileSystemURI'
- }
- }
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/exec.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/exec.js b/lib-common/cordova/exec.js
deleted file mode 100644
index b236903..0000000
--- a/lib-common/cordova/exec.js
+++ /dev/null
@@ -1 +0,0 @@
-throw new Error('should have been replaced at build time with platform implementation')
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/platform.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/platform.js b/lib-common/cordova/platform.js
deleted file mode 100644
index b236903..0000000
--- a/lib-common/cordova/platform.js
+++ /dev/null
@@ -1 +0,0 @@
-throw new Error('should have been replaced at build time with platform implementation')
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/Acceleration.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/Acceleration.js b/lib-common/cordova/plugin/Acceleration.js
deleted file mode 100644
index f02d24b..0000000
--- a/lib-common/cordova/plugin/Acceleration.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var Acceleration = function(x, y, z) {
- this.x = x;
- this.y = y;
- this.z = z;
- this.timestamp = new Date().getTime();
-};
-
-module.exports = Acceleration;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/Camera.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/Camera.js b/lib-common/cordova/plugin/Camera.js
deleted file mode 100644
index 5e58af8..0000000
--- a/lib-common/cordova/plugin/Camera.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var exec = require('cordova/exec'),
- Camera = require('cordova/plugin/CameraConstants');
-
-var cameraExport = {};
-
-// Tack on the Camera Constants to the base camera plugin.
-for (var key in Camera) {
- cameraExport[key] = Camera[key];
-}
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=FILE_URL.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-cameraExport.getPicture = function(successCallback, errorCallback, options) {
- // successCallback required
- if (typeof successCallback != "function") {
- console.log("Camera Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback != "function")) {
- console.log("Camera Error: errorCallback is not a function");
- return;
- }
-
- var quality = 50;
- if (options && typeof options.quality == "number") {
- quality = options.quality;
- } else if (options && typeof options.quality == "string") {
- var qlity = parseInt(options.quality, 10);
- if (isNaN(qlity) === false) {
- quality = qlity.valueOf();
- }
- }
-
- var destinationType = Camera.DestinationType.FILE_URI;
- if (typeof options.destinationType == "number") {
- destinationType = options.destinationType;
- }
-
- var sourceType = Camera.PictureSourceType.CAMERA;
- if (typeof options.sourceType == "number") {
- sourceType = options.sourceType;
- }
-
- var targetWidth = -1;
- if (typeof options.targetWidth == "number") {
- targetWidth = options.targetWidth;
- } else if (typeof options.targetWidth == "string") {
- var width = parseInt(options.targetWidth, 10);
- if (isNaN(width) === false) {
- targetWidth = width.valueOf();
- }
- }
-
- var targetHeight = -1;
- if (typeof options.targetHeight == "number") {
- targetHeight = options.targetHeight;
- } else if (typeof options.targetHeight == "string") {
- var height = parseInt(options.targetHeight, 10);
- if (isNaN(height) === false) {
- targetHeight = height.valueOf();
- }
- }
-
- var encodingType = Camera.EncodingType.JPEG;
- if (typeof options.encodingType == "number") {
- encodingType = options.encodingType;
- }
- // TODO: parse MediaType
- // TODO: enable allow edit?
-
- exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType]);
-}
-
-module.exports = cameraExport;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/CameraConstants.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/CameraConstants.js b/lib-common/cordova/plugin/CameraConstants.js
deleted file mode 100644
index b379234..0000000
--- a/lib-common/cordova/plugin/CameraConstants.js
+++ /dev/null
@@ -1,20 +0,0 @@
-module.exports = {
- DestinationType:{
- DATA_URL: 0, // Return base64 encoded string
- FILE_URI: 1 // Return file uri (content://media/external/images/media/2 for Android)
- },
- EncodingType:{
- JPEG: 0, // Return JPEG encoded image
- PNG: 1 // Return PNG encoded image
- },
- MediaType:{
- PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
- VIDEO: 1, // allow selection of video only, ONLY RETURNS URL
- ALLMEDIA : 2 // allow selection from all media types
- },
- PictureSourceType:{
- PHOTOLIBRARY : 0, // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)
- CAMERA : 1, // Take picture from camera
- SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
- }
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/CaptureAudioOptions.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/CaptureAudioOptions.js b/lib-common/cordova/plugin/CaptureAudioOptions.js
deleted file mode 100644
index ee07932..0000000
--- a/lib-common/cordova/plugin/CaptureAudioOptions.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function(){
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
-};
-
-module.exports = CaptureAudioOptions;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/CaptureError.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/CaptureError.js b/lib-common/cordova/plugin/CaptureError.js
deleted file mode 100644
index b217ae4..0000000
--- a/lib-common/cordova/plugin/CaptureError.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-var CaptureError = function(c) {
- this.code = c || null;
-};
-
-// Camera or microphone failed to capture image or sound.
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-// Camera application or audio capture application is currently serving other capture request.
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-// Invalid use of the API (e.g. limit parameter has value less than one).
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-// User exited camera application or audio capture application before capturing anything.
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-// The requested capture operation is not supported.
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-module.exports = CaptureError;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/CaptureImageOptions.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/CaptureImageOptions.js b/lib-common/cordova/plugin/CaptureImageOptions.js
deleted file mode 100644
index c90e8d4..0000000
--- a/lib-common/cordova/plugin/CaptureImageOptions.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function(){
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
-};
-
-module.exports = CaptureImageOptions;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/CaptureVideoOptions.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/CaptureVideoOptions.js b/lib-common/cordova/plugin/CaptureVideoOptions.js
deleted file mode 100644
index 5583ddb..0000000
--- a/lib-common/cordova/plugin/CaptureVideoOptions.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function(){
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
-};
-
-module.exports = CaptureVideoOptions;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/CompassError.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/CompassError.js b/lib-common/cordova/plugin/CompassError.js
deleted file mode 100644
index baba76d..0000000
--- a/lib-common/cordova/plugin/CompassError.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * CompassError.
- * An error code assigned by an implementation when an error has occured
- * @constructor
- */
-var CompassError = function(err) {
- this.code = (err !== undefined ? err : null);
-};
-
-CompassError.COMPASS_INTERNAL_ERR = 0;
-CompassError.COMPASS_NOT_SUPPORTED = 20;
-
-module.exports = CompassError;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/CompassHeading.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/CompassHeading.js b/lib-common/cordova/plugin/CompassHeading.js
deleted file mode 100644
index 2336beb..0000000
--- a/lib-common/cordova/plugin/CompassHeading.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
- this.magneticHeading = (magneticHeading !== undefined ? magneticHeading : null);
- this.trueHeading = (trueHeading !== undefined ? trueHeading : null);
- this.headingAccuracy = (headingAccuracy !== undefined ? headingAccuracy : null);
- this.timestamp = (timestamp !== undefined ? new Date(timestamp) : new Date());
-};
-
-module.exports = CompassHeading;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/ConfigurationData.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/ConfigurationData.js b/lib-common/cordova/plugin/ConfigurationData.js
deleted file mode 100644
index 838c87c..0000000
--- a/lib-common/cordova/plugin/ConfigurationData.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type = null;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
- this.height = 0;
- // The width attribute represents width of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0
- this.width = 0;
-}
-
-module.exports = ConfigurationData;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/Connection.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/Connection.js b/lib-common/cordova/plugin/Connection.js
deleted file mode 100644
index 1a7fea8..0000000
--- a/lib-common/cordova/plugin/Connection.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * Network status
- */
-module.exports = {
- UNKNOWN: "unknown",
- ETHERNET: "ethernet",
- WIFI: "wifi",
- CELL_2G: "2g",
- CELL_3G: "3g",
- CELL_4G: "4g",
- NONE: "none"
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/Contact.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/Contact.js b/lib-common/cordova/plugin/Contact.js
deleted file mode 100644
index 261bb12..0000000
--- a/lib-common/cordova/plugin/Contact.js
+++ /dev/null
@@ -1,177 +0,0 @@
-var exec = require('cordova/exec'),
- ContactError = require('cordova/plugin/ContactError'),
- utils = require('cordova/utils');
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-function convertIn(contact) {
- var value = contact.birthday;
- try {
- contact.birthday = new Date(parseFloat(value));
- } catch (exception){
- console.log("Cordova Contact convertIn error: exception creating date.");
- }
- return contact;
-};
-
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-
-function convertOut(contact) {
- var value = contact.birthday;
- if (value != null) {
- // try to make it a Date object if it is not already
- if (!value instanceof Date){
- try {
- value = new Date(value);
- } catch(exception){
- value = null;
- }
- }
- if (value instanceof Date){
- value = value.valueOf(); // convert to milliseconds
- }
- contact.birthday = value;
- }
- return contact;
-};
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
- ims, organizations, birthday, note, photos, categories, urls) {
- this.id = id || null;
- this.rawId = null;
- this.displayName = displayName || null;
- this.name = name || null; // ContactName
- this.nickname = nickname || null;
- this.phoneNumbers = phoneNumbers || null; // ContactField[]
- this.emails = emails || null; // ContactField[]
- this.addresses = addresses || null; // ContactAddress[]
- this.ims = ims || null; // ContactField[]
- this.organizations = organizations || null; // ContactOrganization[]
- this.birthday = birthday || null;
- this.note = note || null;
- this.photos = photos || null; // ContactField[]
- this.categories = categories || null; // ContactField[]
- this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
- var fail = function(code) {
- errorCB(new ContactError(code));
- };
- if (this.id === null) {
- fail(ContactError.UNKNOWN_ERROR);
- }
- else {
- exec(successCB, fail, "Contacts", "remove", [this.id]);
- }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
- var clonedContact = utils.clone(this);
- var i;
- clonedContact.id = null;
- clonedContact.rawId = null;
- // Loop through and clear out any id's in phones, emails, etc.
- if (clonedContact.phoneNumbers) {
- for (i = 0; i < clonedContact.phoneNumbers.length; i++) {
- clonedContact.phoneNumbers[i].id = null;
- }
- }
- if (clonedContact.emails) {
- for (i = 0; i < clonedContact.emails.length; i++) {
- clonedContact.emails[i].id = null;
- }
- }
- if (clonedContact.addresses) {
- for (i = 0; i < clonedContact.addresses.length; i++) {
- clonedContact.addresses[i].id = null;
- }
- }
- if (clonedContact.ims) {
- for (i = 0; i < clonedContact.ims.length; i++) {
- clonedContact.ims[i].id = null;
- }
- }
- if (clonedContact.organizations) {
- for (i = 0; i < clonedContact.organizations.length; i++) {
- clonedContact.organizations[i].id = null;
- }
- }
- if (clonedContact.categories) {
- for (i = 0; i < clonedContact.categories.length; i++) {
- clonedContact.categories[i].id = null;
- }
- }
- if (clonedContact.photos) {
- for (i = 0; i < clonedContact.photos.length; i++) {
- clonedContact.photos[i].id = null;
- }
- }
- if (clonedContact.urls) {
- for (i = 0; i < clonedContact.urls.length; i++) {
- clonedContact.urls[i].id = null;
- }
- }
- return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
- var fail = function(code) {
- errorCB(new ContactError(code));
- };
- var success = function(result) {
- if (result) {
- if (typeof successCB === 'function') {
- var fullContact = require('cordova/plugin/contacts').create(result);
- successCB(convertIn(fullContact));
- }
- }
- else {
- // no Entry object returned
- fail(ContactError.UNKNOWN_ERROR);
- }
- };
- var dupContact = convertOut(utils.clone(this));
- exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/ContactAddress.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/ContactAddress.js b/lib-common/cordova/plugin/ContactAddress.js
deleted file mode 100644
index 9fa3605..0000000
--- a/lib-common/cordova/plugin/ContactAddress.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
- this.id = null;
- this.pref = (typeof pref != 'undefined' ? pref : false);
- this.type = type || null;
- this.formatted = formatted || null;
- this.streetAddress = streetAddress || null;
- this.locality = locality || null;
- this.region = region || null;
- this.postalCode = postalCode || null;
- this.country = country || null;
-};
-
-module.exports = ContactAddress;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/ContactError.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/ContactError.js b/lib-common/cordova/plugin/ContactError.js
deleted file mode 100644
index 324a0cf..0000000
--- a/lib-common/cordova/plugin/ContactError.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * ContactError.
- * An error code assigned by an implementation when an error has occured
- * @constructor
- */
-var ContactError = function(err) {
- this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/ContactField.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/ContactField.js b/lib-common/cordova/plugin/ContactField.js
deleted file mode 100644
index c2a8ac1..0000000
--- a/lib-common/cordova/plugin/ContactField.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
- this.id = null;
- this.type = type || null;
- this.value = value || null;
- this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/ContactFindOptions.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/ContactFindOptions.js b/lib-common/cordova/plugin/ContactFindOptions.js
deleted file mode 100644
index 036c4c6..0000000
--- a/lib-common/cordova/plugin/ContactFindOptions.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-
-var ContactFindOptions = function(filter, multiple) {
- this.filter = filter || '';
- this.multiple = (typeof multiple != 'undefined' ? multiple : false);
-};
-
-module.exports = ContactFindOptions;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/ContactName.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/ContactName.js b/lib-common/cordova/plugin/ContactName.js
deleted file mode 100644
index 5434e74..0000000
--- a/lib-common/cordova/plugin/ContactName.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
- this.formatted = formatted || null;
- this.familyName = familyName || null;
- this.givenName = givenName || null;
- this.middleName = middle || null;
- this.honorificPrefix = prefix || null;
- this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/ContactOrganization.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/ContactOrganization.js b/lib-common/cordova/plugin/ContactOrganization.js
deleted file mode 100644
index 32ec462..0000000
--- a/lib-common/cordova/plugin/ContactOrganization.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
- this.id = null;
- this.pref = (typeof pref != 'undefined' ? pref : false);
- this.type = type || null;
- this.name = name || null;
- this.department = dept || null;
- this.title = title || null;
-};
-
-module.exports = ContactOrganization;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/Coordinates.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/Coordinates.js b/lib-common/cordova/plugin/Coordinates.js
deleted file mode 100644
index d783e1c..0000000
--- a/lib-common/cordova/plugin/Coordinates.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * This class contains position information.
- * @param {Object} lat
- * @param {Object} lng
- * @param {Object} alt
- * @param {Object} acc
- * @param {Object} head
- * @param {Object} vel
- * @param {Object} altacc
- * @constructor
- */
-var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
- /**
- * The latitude of the position.
- */
- this.latitude = lat;
- /**
- * The longitude of the position,
- */
- this.longitude = lng;
- /**
- * The accuracy of the position.
- */
- this.accuracy = acc;
- /**
- * The altitude of the position.
- */
- this.altitude = alt;
- /**
- * The direction the device is moving at the position.
- */
- this.heading = head;
- /**
- * The velocity with which the device is moving at the position.
- */
- this.speed = vel;
- /**
- * The altitude accuracy of the position.
- */
- this.altitudeAccuracy = (altacc !== undefined) ? altacc : null;
-};
-
-module.exports = Coordinates;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/76f64673/lib-common/cordova/plugin/DirectoryEntry.js
----------------------------------------------------------------------
diff --git a/lib-common/cordova/plugin/DirectoryEntry.js b/lib-common/cordova/plugin/DirectoryEntry.js
deleted file mode 100644
index e9949d0..0000000
--- a/lib-common/cordova/plugin/DirectoryEntry.js
+++ /dev/null
@@ -1,80 +0,0 @@
-var utils = require('cordova/utils'),
- exec = require('cordova/exec'),
- Entry = require('cordova/plugin/Entry'),
- DirectoryReader = require('cordova/plugin/DirectoryReader');
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * {FileSystem} filesystem on which the directory resides (readonly)
- */
-var DirectoryEntry = function(name, fullPath) {
- DirectoryEntry.__super__.constructor.apply(this, [false, true, name, fullPath]);
-};
-
-utils.extend(DirectoryEntry, Entry);
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function() {
- return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or excluively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
- var win = typeof successCallback !== 'function' ? null : function(result) {
- var entry = new DirectoryEntry(result.name, result.fullPath);
- successCallback(entry);
- };
- var fail = typeof errorCallback !== 'function' ? null : function(code) {
- errorCallback(new FileError(code));
- };
- exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
- var fail = typeof errorCallback !== 'function' ? null : function(code) {
- errorCallback(new FileError(code));
- };
- exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or excluively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
- var win = typeof successCallback !== 'function' ? null : function(result) {
- var FileEntry = require('cordova/plugin/FileEntry');
- var entry = new FileEntry(result.name, result.fullPath);
- successCallback(entry);
- };
- var fail = typeof errorCallback !== 'function' ? null : function(code) {
- errorCallback(new FileError(code));
- };
- exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
-};
-
-module.exports = DirectoryEntry;