incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject webworks commit: bumping version to 1.7.0rc1
Date Tue, 24 Apr 2012 22:08:03 GMT
Updated Branches:
  refs/heads/master f3fab85ae -> def15ead0
Updated Tags:  refs/tags/1.7.0rc1 [created] def15ead0


bumping version to 1.7.0rc1


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/def15ead
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/tree/def15ead
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/diff/def15ead

Branch: refs/heads/master
Commit: def15ead00e31a59e6261a0e020dc38ed85d4b3d
Parents: f3fab85
Author: Fil Maj <maj.fil@gmail.com>
Authored: Tue Apr 24 15:10:12 2012 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Tue Apr 24 15:10:12 2012 -0700

----------------------------------------------------------------------
 VERSION                                            |    2 +-
 .../ext/src/org/apache/cordova/device/Device.java  |    2 +-
 javascript/cordova.blackberry.js                   |  463 +++++++--------
 javascript/cordova.playbook.js                     |  400 ++++++-------
 4 files changed, 390 insertions(+), 477 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/def15ead/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 9c6d629..d88d8e7 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.6.1
+1.7.0rc1

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/def15ead/framework/ext/src/org/apache/cordova/device/Device.java
----------------------------------------------------------------------
diff --git a/framework/ext/src/org/apache/cordova/device/Device.java b/framework/ext/src/org/apache/cordova/device/Device.java
index 43529f1..e718941 100644
--- a/framework/ext/src/org/apache/cordova/device/Device.java
+++ b/framework/ext/src/org/apache/cordova/device/Device.java
@@ -53,7 +53,7 @@ public final class Device extends Plugin {
 				JSONObject device = new JSONObject();
 				device.put( FIELD_PLATFORM, new String(DeviceInfo.getPlatformVersion() ) );
 				device.put( FIELD_UUID, new Integer( DeviceInfo.getDeviceId()) );
-				device.put( FIELD_CORDOVA, "1.6.1" );
+				device.put( FIELD_CORDOVA, "1.7.0rc1" );
 				device.put( FIELD_NAME, new String(DeviceInfo.getDeviceName()) );
 				device.put( FIELD_VERSION, new String(DeviceInfo.getSoftwareVersion()) );
 				result = new PluginResult(PluginResult.Status.OK, device);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/def15ead/javascript/cordova.blackberry.js
----------------------------------------------------------------------
diff --git a/javascript/cordova.blackberry.js b/javascript/cordova.blackberry.js
index 801b37f..d4680da 100644
--- a/javascript/cordova.blackberry.js
+++ b/javascript/cordova.blackberry.js
@@ -1,4 +1,6 @@
-// File generated at :: Tue Apr 10 2012 15:32:24 GMT-0500 (CDT)
+// commit a42f0ae6245e7609c9bad1eb582777a696201aad
+
+// File generated at :: Tue Apr 24 2012 15:08:45 GMT-0700 (PDT)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -65,10 +67,20 @@ if (typeof module === "object" && typeof require === "function") {
     module.exports.require = require;
     module.exports.define = define;
 }
-
 // file: lib/cordova.js
 define("cordova", function(require, exports, module) {
 var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+    channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+    channel.onDOMContentLoaded.fire();
+}
+
 /**
  * Intercept calls to addEventListener + removeEventListener and handle deviceready,
  * resume, and pause events.
@@ -113,13 +125,18 @@ window.addEventListener = function(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);
-  }
+    var e = evt.toLowerCase();
+    // Check for pause/resume events first.
+    if (e == 'resume') {
+        channel.onResume.unsubscribe(handler);
+    } else if (e == 'pause') {
+        channel.onPause.unsubscribe(handler);
+    // If unsubcribing from an event that is handled by a plugin
+    } else if (typeof documentEventHandlers[e] != "undefined") {
+        documentEventHandlers[e].unsubscribe(handler);
+    } else {
+        m_document_removeEventListener.call(document, evt, handler, capture);
+    }
 };
 
 window.removeEventListener = function(evt, handler, capture) {
@@ -147,9 +164,9 @@ function createEvent(type, data) {
 
 if(typeof window.console === "undefined")
 {
-	window.console = { 
-		log:function(){}
-	};
+    window.console = {
+        log:function(){}
+    };
 }
 
 var cordova = {
@@ -290,7 +307,7 @@ var cordova = {
             console.log("Error: Plugin "+name+" already exists.");
         }
     },
-    
+
     addConstructor: function(func) {
         channel.onCordovaReady.subscribeOnce(function() {
             try {
@@ -302,13 +319,16 @@ var cordova = {
     }
 };
 
-/** 
+/**
  * Legacy variable for plugin support
  * TODO: remove in 2.0.
  */
 if (!window.PhoneGap) {
     window.PhoneGap = cordova;
 }
+if (!window.Cordova) {
+    window.Cordova = cordova;
+}
 
 /**
  * Plugins object
@@ -324,6 +344,8 @@ module.exports = cordova;
 
 // file: lib/common/builder.js
 define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
 function each(objects, func, context) {
     for (var prop in objects) {
         if (objects.hasOwnProperty(prop)) {
@@ -500,10 +522,10 @@ var Channel = function(type, opts) {
 
         /**
          * 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
@@ -540,7 +562,7 @@ var Channel = function(type, opts) {
     utils = require('cordova/utils');
 
 /**
- * Subscribes the given function to the channel. Any time that 
+ * 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.
@@ -585,7 +607,7 @@ Channel.prototype.subscribeOnce = function(f, c) {
     return g;
 };
 
-/** 
+/**
  * Unsubscribes the function with the given guid from the channel.
  */
 Channel.prototype.unsubscribe = function(g) {
@@ -599,7 +621,7 @@ Channel.prototype.unsubscribe = function(g) {
     if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
 };
 
-/** 
+/**
  * Calls all functions subscribed to this channel.
  */
 Channel.prototype.fire = function(e) {
@@ -654,7 +676,6 @@ channel.waitForInitialization('onCordovaInfoReady');
 channel.waitForInitialization('onCordovaConnectionReady');
 
 module.exports = channel;
-
 });
 
 // file: lib/common/common.js
@@ -839,7 +860,6 @@ module.exports = {
         }
     }
 };
-
 });
 
 // file: lib/blackberry/exec.js
@@ -901,7 +921,6 @@ module.exports = function(success, fail, service, action, args) {
         utils.alert("Error: "+e);
     }
 };
-
 });
 
 // file: lib/blackberry/platform.js
@@ -1085,7 +1104,6 @@ module.exports = {
         }
     }
 };
-
 });
 
 // file: lib/common/plugin/Acceleration.js
@@ -1098,7 +1116,6 @@ var Acceleration = function(x, y, z, timestamp) {
 };
 
 module.exports = Acceleration;
-
 });
 
 // file: lib/common/plugin/Camera.js
@@ -1180,35 +1197,34 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
     if (typeof options.encodingType == "number") {
         encodingType = options.encodingType;
     }
-    
+
     var mediaType = Camera.MediaType.PICTURE;
     if (typeof options.mediaType == "number") {
         mediaType = options.mediaType;
     }
     var allowEdit = false;
     if (typeof options.allowEdit == "boolean") {
-    	allowEdit = options.allowEdit;
+        allowEdit = options.allowEdit;
     } else if (typeof options.allowEdit == "number") {
-    	allowEdit = options.allowEdit <= 0 ? false : true;
+        allowEdit = options.allowEdit <= 0 ? false : true;
     }
     var correctOrientation = false;
     if (typeof options.correctOrientation == "boolean") {
-    	correctOrientation = options.correctOrientation;
+        correctOrientation = options.correctOrientation;
     } else if (typeof options.correctOrientation == "number") {
-    	correctOrientation = options.correctOrientation <=0 ? false : true;
+        correctOrientation = options.correctOrientation <=0 ? false : true;
     }
     var saveToPhotoAlbum = false;
-	if (typeof options.saveToPhotoAlbum == "boolean") {
-    	saveToPhotoAlbum = options.saveToPhotoAlbum;
+    if (typeof options.saveToPhotoAlbum == "boolean") {
+        saveToPhotoAlbum = options.saveToPhotoAlbum;
     } else if (typeof options.saveToPhotoAlbum == "number") {
-    	saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+        saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
     }
 
     exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
-}
+};
 
 module.exports = cameraExport;
-
 });
 
 // file: lib/common/plugin/CameraConstants.js
@@ -1233,7 +1249,6 @@ module.exports = {
     SAVEDPHOTOALBUM : 2  // Choose image from picture library (same as PHOTOLIBRARY for Android)
   }
 };
-
 });
 
 // file: lib/common/plugin/CaptureAudioOptions.js
@@ -1242,16 +1257,15 @@ define("cordova/plugin/CaptureAudioOptions", function(require, exports, module)
  * 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;
+    // 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;
-
 });
 
 // file: lib/common/plugin/CaptureError.js
@@ -1263,7 +1277,7 @@ var CaptureError = function(c) {
    this.code = c || null;
 };
 
-// Camera or microphone failed to capture image or sound. 
+// 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;
@@ -1275,7 +1289,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
 CaptureError.CAPTURE_NOT_SUPPORTED = 20;
 
 module.exports = CaptureError;
-
 });
 
 // file: lib/common/plugin/CaptureImageOptions.js
@@ -1284,14 +1297,13 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
  * 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;
+    // 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;
-
 });
 
 // file: lib/common/plugin/CaptureVideoOptions.js
@@ -1300,16 +1312,15 @@ define("cordova/plugin/CaptureVideoOptions", function(require, exports, module)
  * 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;
+    // 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;
-
 });
 
 // file: lib/common/plugin/CompassError.js
@@ -1327,7 +1338,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
 CompassError.COMPASS_NOT_SUPPORTED = 20;
 
 module.exports = CompassError;
-
 });
 
 // file: lib/common/plugin/CompassHeading.js
@@ -1340,7 +1350,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
 };
 
 module.exports = CompassHeading;
-
 });
 
 // file: lib/common/plugin/ConfigurationData.js
@@ -1349,18 +1358,17 @@ define("cordova/plugin/ConfigurationData", function(require, exports, module) {
  * 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. 
+    // 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. 
+    // 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;
-
 });
 
 // file: lib/common/plugin/Connection.js
@@ -1369,15 +1377,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
  * Network status
  */
 module.exports = {
-		UNKNOWN: "unknown",
-		ETHERNET: "ethernet",
-		WIFI: "wifi",
-		CELL_2G: "2g",
-		CELL_3G: "3g",
-		CELL_4G: "4g",
-		NONE: "none"
+        UNKNOWN: "unknown",
+        ETHERNET: "ethernet",
+        WIFI: "wifi",
+        CELL_2G: "2g",
+        CELL_3G: "3g",
+        CELL_4G: "4g",
+        NONE: "none"
 };
-
 });
 
 // file: lib/common/plugin/Contact.js
@@ -1398,7 +1405,7 @@ function convertIn(contact) {
       console.log("Cordova Contact convertIn error: exception creating date.");
     }
     return contact;
-};
+}
 
 /**
 * Converts Complex objects into primitives
@@ -1407,7 +1414,7 @@ function convertIn(contact) {
 
 function convertOut(contact) {
     var value = contact.birthday;
-    if (value != null) {
+    if (value !== null) {
         // try to make it a Date object if it is not already
         if (!value instanceof Date){
             try {
@@ -1422,7 +1429,7 @@ function convertOut(contact) {
         contact.birthday = value;
     }
     return contact;
-};
+}
 
 /**
 * Contains information about a single contact.
@@ -1541,7 +1548,7 @@ Contact.prototype.save = function(successCB, errorCB) {
   var fail = function(code) {
       errorCB(new ContactError(code));
   };
-	var success = function(result) {
+    var success = function(result) {
       if (result) {
           if (typeof successCB === 'function') {
               var fullContact = require('cordova/plugin/contacts').create(result);
@@ -1553,13 +1560,12 @@ Contact.prototype.save = function(successCB, errorCB) {
           fail(ContactError.UNKNOWN_ERROR);
       }
   };
-	var dupContact = convertOut(utils.clone(this));
-	exec(success, fail, "Contacts", "save", [dupContact]);
+    var dupContact = convertOut(utils.clone(this));
+    exec(success, fail, "Contacts", "save", [dupContact]);
 };
 
 
 module.exports = Contact;
-
 });
 
 // file: lib/common/plugin/ContactAddress.js
@@ -1589,7 +1595,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
 };
 
 module.exports = ContactAddress;
-
 });
 
 // file: lib/common/plugin/ContactError.js
@@ -1615,7 +1620,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
 ContactError.PERMISSION_DENIED_ERROR = 20;
 
 module.exports = ContactError;
-
 });
 
 // file: lib/common/plugin/ContactField.js
@@ -1636,7 +1640,6 @@ var ContactField = function(type, value, pref) {
 };
 
 module.exports = ContactField;
-
 });
 
 // file: lib/common/plugin/ContactFindOptions.js
@@ -1654,7 +1657,6 @@ var ContactFindOptions = function(filter, multiple) {
 };
 
 module.exports = ContactFindOptions;
-
 });
 
 // file: lib/common/plugin/ContactName.js
@@ -1679,7 +1681,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
 };
 
 module.exports = ContactName;
-
 });
 
 // file: lib/common/plugin/ContactOrganization.js
@@ -1707,7 +1708,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
 };
 
 module.exports = ContactOrganization;
-
 });
 
 // file: lib/common/plugin/Coordinates.js
@@ -1755,7 +1755,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
 };
 
 module.exports = Coordinates;
-
 });
 
 // file: lib/common/plugin/DirectoryEntry.js
@@ -1763,6 +1762,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
 var utils = require('cordova/utils'),
     exec = require('cordova/exec'),
     Entry = require('cordova/plugin/Entry'),
+    FileError = require('cordova/plugin/FileError'),
     DirectoryReader = require('cordova/plugin/DirectoryReader');
 
 /**
@@ -1845,7 +1845,8 @@ module.exports = DirectoryEntry;
 
 // file: lib/common/plugin/DirectoryReader.js
 define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+    FileError = require('cordova/plugin/FileError') ;
 
 /**
  * An interface that lists the files and directories in a directory.
@@ -1866,10 +1867,10 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
         for (var i=0; i<result.length; i++) {
             var entry = null;
             if (result[i].isDirectory) {
-                entry = new DirectoryEntry();
+                entry = new (require('cordova/plugin/DirectoryEntry'))();
             }
             else if (result[i].isFile) {
-                entry = new FileEntry();
+                entry = new (require('cordova/plugin/FileEntry'))();
             }
             entry.isDirectory = result[i].isDirectory;
             entry.isFile = result[i].isFile;
@@ -2094,7 +2095,6 @@ Entry.prototype.getParent = function(successCallback, errorCallback) {
 };
 
 module.exports = Entry;
-
 });
 
 // file: lib/common/plugin/File.js
@@ -2109,15 +2109,14 @@ define("cordova/plugin/File", function(require, exports, module) {
  */
 
 var File = function(name, fullPath, type, lastModifiedDate, size){
-	this.name = name || '';
-	this.fullPath = fullPath || null;
-	this.type = type || null;
-	this.lastModifiedDate = lastModifiedDate || null;
-	this.size = size || 0;
+    this.name = name || '';
+    this.fullPath = fullPath || null;
+    this.type = type || null;
+    this.lastModifiedDate = lastModifiedDate || null;
+    this.size = size || 0;
 };
 
 module.exports = File;
-
 });
 
 // file: lib/common/plugin/FileEntry.js
@@ -2185,7 +2184,6 @@ FileEntry.prototype.file = function(successCallback, errorCallback) {
 
 
 module.exports = FileEntry;
-
 });
 
 // file: lib/common/plugin/FileError.js
@@ -2215,7 +2213,6 @@ FileError.TYPE_MISMATCH_ERR = 11;
 FileError.PATH_EXISTS_ERR = 12;
 
 module.exports = FileError;
-
 });
 
 // file: lib/common/plugin/FileReader.js
@@ -2469,7 +2466,6 @@ FileReader.prototype.readAsArrayBuffer = function(file) {
 };
 
 module.exports = FileReader;
-
 });
 
 // file: lib/common/plugin/FileSystem.js
@@ -2491,7 +2487,6 @@ var FileSystem = function(name, root) {
 };
 
 module.exports = FileSystem;
-
 });
 
 // file: lib/common/plugin/FileTransfer.js
@@ -2550,16 +2545,16 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
     var win = function(result) {
         var entry = null;
         if (result.isDirectory) {
-            entry = new DirectoryEntry();
+            entry = new (require('cordova/plugin/DirectoryEntry'))();
         }
         else if (result.isFile) {
-            entry = new FileEntry();
+            entry = new (require('cordova/plugin/FileEntry'))();
         }
         entry.isDirectory = result.isDirectory;
         entry.isFile = result.isFile;
         entry.name = result.name;
         entry.fullPath = result.fullPath;
-        successCallback(entry);   
+        successCallback(entry);
     };
     exec(win, errorCallback, 'FileTransfer', 'download', [source, target]);
 };
@@ -2583,7 +2578,6 @@ FileTransferError.INVALID_URL_ERR = 2;
 FileTransferError.CONNECTION_ERR = 3;
 
 module.exports = FileTransferError;
-
 });
 
 // file: lib/common/plugin/FileUploadOptions.js
@@ -2604,7 +2598,6 @@ var FileUploadOptions = function(fileKey, fileName, mimeType, params) {
 };
 
 module.exports = FileUploadOptions;
-
 });
 
 // file: lib/common/plugin/FileUploadResult.js
@@ -2620,13 +2613,12 @@ var FileUploadResult = function() {
 };
 
 module.exports = FileUploadResult;
-
 });
 
 // file: lib/common/plugin/FileWriter.js
 define("cordova/plugin/FileWriter", function(require, exports, module) {
 var exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError');
+    FileError = require('cordova/plugin/FileError'),
     ProgressEvent = require('cordova/plugin/ProgressEvent');
 
 /**
@@ -2785,7 +2777,7 @@ FileWriter.prototype.seek = function(offset) {
         throw new FileError(FileError.INVALID_STATE_ERR);
     }
 
-    if (!offset && offset != 0) {
+    if (!offset && offset !== 0) {
         return;
     }
 
@@ -2885,7 +2877,7 @@ module.exports = FileWriter;
 define("cordova/plugin/Flags", function(require, exports, module) {
 /**
  * Supplies arguments to methods that lookup or create files and directories.
- * 
+ *
  * @param create
  *            {boolean} file or directory if it doesn't exist
  * @param exclusive
@@ -2898,7 +2890,6 @@ function Flags(create, exclusive) {
 }
 
 module.exports = Flags;
-
 });
 
 // file: lib/common/plugin/LocalFileSystem.js
@@ -2916,7 +2907,6 @@ LocalFileSystem.TEMPORARY = 0; //temporary, with no guarantee of persistence
 LocalFileSystem.PERSISTENT = 1; //persistent
 
 module.exports = LocalFileSystem;
-
 });
 
 // file: lib/common/plugin/Media.js
@@ -3098,7 +3088,7 @@ Media.onStatus = function(id, msg, value) {
     }
     else if (msg === Media.MEDIA_ERROR) {
         if (media.errorCallback) {
-        	// value should be a MediaError object when msg == MEDIA_ERROR
+            // value should be a MediaError object when msg == MEDIA_ERROR
             media.errorCallback(value);
         }
     }
@@ -3108,7 +3098,6 @@ Media.onStatus = function(id, msg, value) {
 };
 
 module.exports = Media;
-
 });
 
 // file: lib/common/plugin/MediaError.js
@@ -3129,7 +3118,6 @@ MediaError.MEDIA_ERR_DECODE         = 3;
 MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
 
 module.exports = MediaError;
-
 });
 
 // file: lib/common/plugin/MediaFile.js
@@ -3155,16 +3143,16 @@ utils.extend(MediaFile, File);
 
 /**
  * Request capture format data for a specific file and type
- * 
+ *
  * @param {Function} successCB
  * @param {Function} errorCB
  */
 MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
-	if (typeof this.fullPath === "undefined" || this.fullPath === null) {
-		errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
-	} else {
+    if (typeof this.fullPath === "undefined" || this.fullPath === null) {
+        errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
+    } else {
     exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
-	}	
+    }
 };
 
 /**
@@ -3190,7 +3178,6 @@ MediaFile.cast = function(pluginResult) {
 };
 
 module.exports = MediaFile;
-
 });
 
 // file: lib/common/plugin/MediaFileData.js
@@ -3205,22 +3192,21 @@ define("cordova/plugin/MediaFileData", function(require, exports, module) {
  * @param {float} duration
  */
 var MediaFileData = function(codecs, bitrate, height, width, duration){
-	this.codecs = codecs || null;
-	this.bitrate = bitrate || 0;
-	this.height = height || 0;
-	this.width = width || 0;
-	this.duration = duration || 0;
+    this.codecs = codecs || null;
+    this.bitrate = bitrate || 0;
+    this.height = height || 0;
+    this.width = width || 0;
+    this.duration = duration || 0;
 };
 
 module.exports = MediaFileData;
-
 });
 
 // file: lib/common/plugin/Metadata.js
 define("cordova/plugin/Metadata", function(require, exports, module) {
 /**
  * Information about the state of the file or directory
- * 
+ *
  * {Date} modificationTime (readonly)
  */
 var Metadata = function(time) {
@@ -3228,7 +3214,6 @@ var Metadata = function(time) {
 };
 
 module.exports = Metadata;
-
 });
 
 // file: lib/common/plugin/Position.js
@@ -3236,12 +3221,11 @@ define("cordova/plugin/Position", function(require, exports, module) {
 var Coordinates = require('cordova/plugin/Coordinates');
 
 var Position = function(coords, timestamp) {
-	this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
-	this.timestamp = (timestamp !== undefined) ? timestamp : new Date().getTime();
+    this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
+    this.timestamp = (timestamp !== undefined) ? timestamp : new Date().getTime();
 };
 
 module.exports = Position;
-
 });
 
 // file: lib/common/plugin/PositionError.js
@@ -3263,7 +3247,6 @@ PositionError.POSITION_UNAVAILABLE = 2;
 PositionError.TIMEOUT = 3;
 
 module.exports = PositionError;
-
 });
 
 // file: lib/common/plugin/ProgressEvent.js
@@ -3314,7 +3297,6 @@ var ProgressEvent = (function() {
 })();
 
 module.exports = ProgressEvent;
-
 });
 
 // file: lib/common/plugin/accelerometer.js
@@ -3414,7 +3396,6 @@ var accelerometer = {
 };
 
 module.exports = accelerometer;
-
 });
 
 // file: lib/common/plugin/battery.js
@@ -3427,7 +3408,7 @@ var cordova = require('cordova'),
     exec = require('cordova/exec');
 
 function handlers() {
-  return battery.channels.batterystatus.numHandlers + 
+  return battery.channels.batterystatus.numHandlers +
          battery.channels.batterylow.numHandlers +
          battery.channels.batterycritical.numHandlers;
 }
@@ -3470,30 +3451,30 @@ Battery.prototype.onUnsubscribe = function() {
 
 /**
  * Callback for battery status
- * 
- * @param {Object} info			keys: level, isPlugged
+ *
+ * @param {Object} info            keys: level, isPlugged
  */
 Battery.prototype._status = function(info) {
-	if (info) {
-		var me = battery;
+    if (info) {
+        var me = battery;
     var level = info.level;
-		if (me._level !== level || me._isPlugged !== info.isPlugged) {
-			// Fire batterystatus event
-			cordova.fireWindowEvent("batterystatus", info);
-
-			// Fire low battery event
-			if (level === 20 || level === 5) {
-				if (level === 20) {
-					cordova.fireWindowEvent("batterylow", info);
-				}
-				else {
-					cordova.fireWindowEvent("batterycritical", info);
-				}
-			}
-		}
-		me._level = level;
-		me._isPlugged = info.isPlugged;	
-	}
+        if (me._level !== level || me._isPlugged !== info.isPlugged) {
+            // Fire batterystatus event
+            cordova.fireWindowEvent("batterystatus", info);
+
+            // Fire low battery event
+            if (level === 20 || level === 5) {
+                if (level === 20) {
+                    cordova.fireWindowEvent("batterylow", info);
+                }
+                else {
+                    cordova.fireWindowEvent("batterycritical", info);
+                }
+            }
+        }
+        me._level = level;
+        me._isPlugged = info.isPlugged;
+    }
 };
 
 /**
@@ -3506,13 +3487,13 @@ Battery.prototype._error = function(e) {
 var battery = new Battery();
 
 module.exports = battery;
-
 });
 
 // file: lib/blackberry/plugin/blackberry/Contact.js
 define("cordova/plugin/blackberry/Contact", function(require, exports, module) {
 var ContactError = require('cordova/plugin/ContactError'),
     ContactUtils = require('cordova/plugin/blackberry/ContactUtils'),
+    ContactAddress = require('cordova/plugin/ContactAddress'),
     exec = require('cordova/exec');
 
 // ------------------
@@ -3666,12 +3647,12 @@ var saveToDevice = function(contact) {
 
         var type = null;
         var number = null;
-        for ( var i = 0; i < contact.phoneNumbers.length; i += 1) {
-            if (!contact.phoneNumbers[i] || !contact.phoneNumbers[i].value) {
+        for ( var j = 0; j < contact.phoneNumbers.length; j += 1) {
+            if (!contact.phoneNumbers[j] || !contact.phoneNumbers[j].value) {
                 continue;
             }
-            type = contact.phoneNumbers[i].type;
-            number = contact.phoneNumbers[i].value;
+            type = contact.phoneNumbers[j].type;
+            number = contact.phoneNumbers[j].value;
             if (type === 'home') {
                 if (bbContact.homePhone === "") {
                     bbContact.homePhone = number;
@@ -3709,18 +3690,16 @@ var saveToDevice = function(contact) {
         var address = null;
         var bbHomeAddress = null;
         var bbWorkAddress = null;
-        for ( var i = 0; i < contact.addresses.length; i += 1) {
-            address = contact.addresses[i];
+        for ( var k = 0; k < contact.addresses.length; k += 1) {
+            address = contact.addresses[k];
             if (!address || address instanceof ContactAddress === false) {
                 continue;
             }
 
-            if (bbHomeAddress === null
-                    && (!address.type || address.type === "home")) {
+            if (bbHomeAddress === null && (!address.type || address.type === "home")) {
                 bbHomeAddress = createBlackBerryAddress(address);
                 bbContact.homeAddress = bbHomeAddress;
-            } else if (bbWorkAddress === null
-                    && (!address.type || address.type === "work")) {
+            } else if (bbWorkAddress === null && (!address.type || address.type === "work")) {
                 bbWorkAddress = createBlackBerryAddress(address);
                 bbContact.workAddress = bbWorkAddress;
             }
@@ -3736,8 +3715,8 @@ var saveToDevice = function(contact) {
         }
 
         var url = null;
-        for ( var i = 0; i < contact.urls.length; i += 1) {
-            url = contact.urls[i];
+        for ( var m = 0; m < contact.urls.length; m += 1) {
+            url = contact.urls[m];
             if (!url || !url.value) {
                 continue;
             }
@@ -3758,8 +3737,8 @@ var saveToDevice = function(contact) {
         }
 
         var org = null;
-        for ( var i = 0; i < contact.organizations.length; i += 1) {
-            org = contact.organizations[i];
+        for ( var n = 0; n < contact.organizations.length; n += 1) {
+            org = contact.organizations[n];
             if (!org) {
                 continue;
             }
@@ -3775,8 +3754,8 @@ var saveToDevice = function(contact) {
     if (contact.categories && contact.categories instanceof Array) {
         bbContact.categories = [];
         var category = null;
-        for ( var i = 0; i < contact.categories.length; i += 1) {
-            category = contact.categories[i];
+        for ( var o = 0; o < contact.categories.length; o += 1) {
+            category = contact.categories[o];
             if (typeof category == "string") {
                 bbContact.categories.push(category);
             }
@@ -3790,8 +3769,8 @@ var saveToDevice = function(contact) {
     // fail gracefully if photo URL is no good, but log the error
     if (contact.photos && contact.photos instanceof Array) {
         var photo = null;
-        for ( var i = 0; i < contact.photos.length; i += 1) {
-            photo = contact.photos[i];
+        for ( var p = 0; p < contact.photos.length; p += 1) {
+            photo = contact.photos[p];
             if (!photo || !photo.value) {
                 continue;
             }
@@ -3897,10 +3876,17 @@ module.exports = {
         }
     }
 };
+
 });
 
 // file: lib/blackberry/plugin/blackberry/ContactUtils.js
 define("cordova/plugin/blackberry/ContactUtils", function(require, exports, module) {
+var ContactAddress = require('cordova/plugin/ContactAddress'),
+    ContactName = require('cordova/plugin/ContactName'),
+    ContactField = require('cordova/plugin/ContactField'),
+    ContactOrganization = require('cordova/plugin/ContactOrganization'),
+    Contact = require('cordova/plugin/Contact');
+
 /**
  * Mappings for each Contact field that may be used in a find operation. Maps
  * W3C Contact fields to one or more fields in a BlackBerry contact object.
@@ -3990,8 +3976,7 @@ var createContactAddress = function(type, bbAddress) {
     var region = bbAddress.stateProvince || "";
     var postalCode = bbAddress.zipPostal || "";
     var country = bbAddress.country || "";
-    var formatted = streetAddress + ", " + locality + ", " + region + ", "
-            + postalCode + ", " + country;
+    var formatted = streetAddress + ", " + locality + ", " + region + ", " + postalCode + ", " + country;
 
     return new ContactAddress(null, type, formatted, streetAddress, locality,
             region, postalCode, country);
@@ -4043,8 +4028,7 @@ module.exports = {
         //
         var ciFilter = "";
         for ( var i = 0; i < filter.length; i++) {
-            ciFilter = ciFilter + "[" + filter[i].toLowerCase()
-                    + filter[i].toUpperCase() + "]";
+            ciFilter = ciFilter + "[" + filter[i].toLowerCase() + filter[i].toUpperCase() + "]";
         }
 
         // match anything that contains our filter string
@@ -4054,14 +4038,14 @@ module.exports = {
         var filterExpression = null;
         if (fields && fields instanceof Array) {
             var fe = null;
-            for ( var i in fields) {
-                if (!fields[i]) {
+            for ( var f in fields) {
+                if (!fields[f]) {
                     continue;
                 }
 
                 // retrieve the BlackBerry contact fields that map to the one
                 // specified
-                var bbFields = fieldMappings[fields[i]];
+                var bbFields = fieldMappings[fields[f]];
 
                 // BlackBerry doesn't support the field specified
                 if (!bbFields) {
@@ -4112,7 +4096,7 @@ module.exports = {
         var contact = new Contact(bbContact.uid, bbContact.user1);
 
         // nothing to do
-        if (!fields || !(fields instanceof Array) || fields.length == 0) {
+        if (!fields || !(fields instanceof Array) || fields.length === 0) {
             return contact;
         } else if (fields.length == 1 && fields[0] === "*") {
             // Cordova enhancement to allow fields value of ["*"] to indicate
@@ -4130,8 +4114,7 @@ module.exports = {
 
             // name
             if (field.indexOf('name') === 0) {
-                var formattedName = bbContact.title + ' ' + bbContact.firstName
-                        + ' ' + bbContact.lastName;
+                var formattedName = bbContact.title + ' ' + bbContact.firstName + ' ' + bbContact.lastName;
                 contact.name = new ContactName(formattedName,
                         bbContact.lastName, bbContact.firstName, null,
                         bbContact.title, null);
@@ -4254,6 +4237,7 @@ module.exports = {
         return contact;
     }
 };
+
 });
 
 // file: lib/blackberry/plugin/blackberry/DirectoryEntry.js
@@ -4497,7 +4481,6 @@ module.exports = {
         }
     }
 };
-
 });
 
 // file: lib/blackberry/plugin/blackberry/Entry.js
@@ -4505,6 +4488,7 @@ define("cordova/plugin/blackberry/Entry", function(require, exports, module) {
 var FileError = require('cordova/plugin/FileError'),
     LocalFileSystem = require('cordova/plugin/LocalFileSystem'),
     resolveLocalFileSystemURI = require('cordova/plugin/resolveLocalFileSystemURI'),
+    requestFileSystem = require('cordova/plugin/requestFileSystem'),
     exec = require('cordova/exec');
 
 module.exports = {
@@ -4602,8 +4586,7 @@ module.exports = {
    * Clear the resource cache.
    */
   clearCache:function() {
-      if (typeof blackberry.widgetcache === "undefined"
-          || blackberry.widgetcache === null) {
+      if (typeof blackberry.widgetcache === "undefined" || blackberry.widgetcache === null) {
           console.log("blackberry.widgetcache permission not found. Cache clear denied.");
           return;
       }
@@ -4645,7 +4628,6 @@ module.exports = {
       blackberry.app.exit();
   }
 };
-
 });
 
 // file: lib/blackberry/plugin/blackberry/contacts.js
@@ -4667,7 +4649,7 @@ module.exports = {
         }
 
         // Search qualifier is required and cannot be empty.
-        if (!fields || !(fields instanceof Array) || fields.length == 0) {
+        if (!fields || !(fields instanceof Array) || fields.length === 0) {
             if (typeof fail === 'function') {
                 fail(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
             }
@@ -4712,7 +4694,6 @@ module.exports = {
     }
 
 };
-
 });
 
 // file: lib/blackberry/plugin/blackberry/device.js
@@ -4740,7 +4721,6 @@ channel.onCordovaReady.subscribeOnce(function() {
 });
 
 module.exports = me;
-
 });
 
 // file: lib/blackberry/plugin/blackberry/manager.js
@@ -4832,7 +4812,6 @@ module.exports = {
     pause: org.apache.cordova.JavaPluginManager.pause,
     destroy: org.apache.cordova.JavaPluginManager.destroy
 };
-
 });
 
 // file: lib/blackberry/plugin/blackberry/notification.js
@@ -4888,7 +4867,7 @@ module.exports = {
      */
     progressValue : function(value) {
         exec(null, null, 'Notification', 'progressValue', [ value ]);
-    },
+    }
 };
 });
 
@@ -4900,7 +4879,7 @@ var exec = require('cordova/exec'),
 /**
  * Launches a capture of different types.
  *
- * @param (DOMString} type 
+ * @param (DOMString} type
  * @param {Function} successCB
  * @param {Function} errorCB
  * @param {CaptureVideoOptions} options
@@ -4926,9 +4905,9 @@ function _capture(type, successCallback, errorCallback, options) {
  * The Capture interface exposes an interface to the camera and microphone of the hosting device.
  */
 function Capture() {
-	this.supportedAudioModes = [];
-	this.supportedImageModes = [];
-	this.supportedVideoModes = [];
+    this.supportedAudioModes = [];
+    this.supportedImageModes = [];
+    this.supportedVideoModes = [];
 }
 
 /**
@@ -4981,7 +4960,7 @@ var exec = require('cordova/exec'),
          * Asynchronously acquires the current heading.
          * @param {Function} successCallback The function to call when the heading
          * data is available
-         * @param {Function} errorCallback The function to call when there is an error 
+         * @param {Function} errorCallback The function to call when there is an error
          * getting the heading data.
          * @param {CompassOptions} options The options for getting the heading data (not used).
          */
@@ -5005,8 +4984,8 @@ var exec = require('cordova/exec'),
             var fail = function(code) {
                 var ce = new CompassError(code);
                 errorCallback(ce);
-            }
-            
+            };
+
             // Get heading
             exec(win, fail, "Compass", "getHeading", [options]);
         },
@@ -5015,7 +4994,7 @@ var exec = require('cordova/exec'),
          * Asynchronously acquires the heading repeatedly at a given interval.
          * @param {Function} successCallback The function to call each time the heading
          * data is available
-         * @param {Function} errorCallback The function to call when there is an error 
+         * @param {Function} errorCallback The function to call when there is an error
          * getting the heading data.
          * @param {HeadingOptions} options The options for getting the heading data
          * such as timeout and the frequency of the watch. For iOS, filter parameter
@@ -5039,17 +5018,17 @@ var exec = require('cordova/exec'),
             }
 
             var id = utils.createUUID();
-			if (filter > 0) {
-				// is an iOS request for watch by filter, no timer needed
-				timers[id] = "iOS";
-				compass.getCurrentHeading(successCallback, errorCallback, options);
-			} else {
-				// Start watch timer to get headings
-            	timers[id] = window.setInterval(function() {
-                	compass.getCurrentHeading(successCallback, errorCallback);
-            	}, frequency);
-			}
-				
+            if (filter > 0) {
+                // is an iOS request for watch by filter, no timer needed
+                timers[id] = "iOS";
+                compass.getCurrentHeading(successCallback, errorCallback, options);
+            } else {
+                // Start watch timer to get headings
+                timers[id] = window.setInterval(function() {
+                    compass.getCurrentHeading(successCallback, errorCallback);
+                }, frequency);
+            }
+
             return id;
         },
 
@@ -5060,19 +5039,18 @@ var exec = require('cordova/exec'),
         clearWatch:function(id) {
             // Stop javascript timer & remove from timer list
             if (id && timers[id]) {
-            	if (timers[id] != "iOS") {
-              		clearInterval(timers[id]);
-              	} else {
-            		// is iOS watch by filter so call into device to stop
-            		exec(null, null, "Compass", "stopHeading", []);
-            	}
-	            delete timers[id];
+                if (timers[id] != "iOS") {
+                      clearInterval(timers[id]);
+                  } else {
+                    // is iOS watch by filter so call into device to stop
+                    exec(null, null, "Compass", "stopHeading", []);
+                }
+                delete timers[id];
             }
         }
     };
 
 module.exports = compass;
-
 });
 
 // file: lib/common/plugin/contacts.js
@@ -5134,7 +5112,6 @@ var contacts = {
 };
 
 module.exports = contacts;
-
 });
 
 // file: lib/common/plugin/geolocation.js
@@ -5198,7 +5175,7 @@ var geolocation = {
             errorCallback(new PositionError(e.code, e.message));
         };
 
-        exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]); 
+        exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
     },
     /**
      * Asynchronously watches the geolocation for changes to geolocation.  When a change occurs,
@@ -5233,7 +5210,6 @@ var geolocation = {
 };
 
 module.exports = geolocation;
-
 });
 
 // file: lib/common/plugin/network.js
@@ -5298,7 +5274,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
 };
 
 module.exports = new NetworkConnection();
-
 });
 
 // file: lib/common/plugin/notification.js
@@ -5359,7 +5334,6 @@ module.exports = {
         exec(null, null, "Notification", "beep", [count]);
     }
 };
-
 });
 
 // file: lib/common/plugin/requestFileSystem.js
@@ -5404,13 +5378,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
 };
 
 module.exports = requestFileSystem;
-
 });
 
 // file: lib/common/plugin/resolveLocalFileSystemURI.js
 define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
 var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
     FileEntry = require('cordova/plugin/FileEntry'),
+    FileError = require('cordova/plugin/FileError'),
     exec = require('cordova/exec');
 
 /**
@@ -5469,7 +5443,6 @@ module.exports = {
         return {"status" : cordova.callbackStatus.CLASS_NOT_FOUND_EXCEPTION, "message" : "Class " + clazz + " cannot be found"};
     }
 };
-
 });
 
 // file: lib/common/utils.js
@@ -5491,12 +5464,12 @@ var _self = {
      * Does a deep clone of the object.
      */
     clone: function(obj) {
-        if(!obj) { 
+        if(!obj) {
             return obj;
         }
-        
+
         var retVal, i;
-        
+
         if(obj instanceof Array){
             retVal = [];
             for(i = 0; i < obj.length; ++i){
@@ -5504,15 +5477,15 @@ var _self = {
             }
             return retVal;
         }
-        
+
         if (obj instanceof Function) {
             return obj;
         }
-        
+
         if(!(obj instanceof Object)){
             return obj;
         }
-        
+
         if(obj instanceof Date){
             return obj;
         }
@@ -5555,7 +5528,7 @@ var _self = {
      */
     extend: (function() {
         // proxy used to establish prototype chain
-        var F = function() {}; 
+        var F = function() {};
         // extend Child from Parent
         return function(Child, Parent) {
             F.prototype = Parent.prototype;
@@ -5578,7 +5551,6 @@ var _self = {
 };
 
 module.exports = _self;
-
 });
 
 
@@ -5589,20 +5561,6 @@ window.cordova = require('cordova');
     var channel = require("cordova/channel"),
         _self = {
             boot: function () {
-                //---------------
-                // Event handling
-                //---------------
-
-                /**
-                 * Listen for DOMContentLoaded and notify our channel subscribers.
-                 */
-                document.addEventListener('DOMContentLoaded', function() {
-                    channel.onDOMContentLoaded.fire();
-                }, false);
-                if (document.readyState == 'complete') {
-                  channel.onDOMContentLoaded.fire();
-                }
-
                 /**
                  * Create all cordova objects once page has fully loaded and native side is ready.
                  */
@@ -5635,11 +5593,11 @@ window.cordova = require('cordova');
                     channel.join(function() {
                         channel.onDeviceReady.fire();
                     }, channel.deviceReadyChannelsArray);
-                    
+
                 }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
             }
         };
-        
+
     // boot up once native side is ready
     channel.onNativeReady.subscribeOnce(_self.boot);
 
@@ -5652,5 +5610,4 @@ window.cordova = require('cordova');
 
 }(window));
 
-
 })();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/def15ead/javascript/cordova.playbook.js
----------------------------------------------------------------------
diff --git a/javascript/cordova.playbook.js b/javascript/cordova.playbook.js
index 4e74c4f..0a180bb 100644
--- a/javascript/cordova.playbook.js
+++ b/javascript/cordova.playbook.js
@@ -1,4 +1,6 @@
-// File generated at :: Tue Apr 10 2012 15:32:25 GMT-0500 (CDT)
+// commit a42f0ae6245e7609c9bad1eb582777a696201aad
+
+// File generated at :: Tue Apr 24 2012 15:08:45 GMT-0700 (PDT)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -65,10 +67,20 @@ if (typeof module === "object" && typeof require === "function") {
     module.exports.require = require;
     module.exports.define = define;
 }
-
 // file: lib/cordova.js
 define("cordova", function(require, exports, module) {
 var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+    channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+    channel.onDOMContentLoaded.fire();
+}
+
 /**
  * Intercept calls to addEventListener + removeEventListener and handle deviceready,
  * resume, and pause events.
@@ -113,13 +125,18 @@ window.addEventListener = function(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);
-  }
+    var e = evt.toLowerCase();
+    // Check for pause/resume events first.
+    if (e == 'resume') {
+        channel.onResume.unsubscribe(handler);
+    } else if (e == 'pause') {
+        channel.onPause.unsubscribe(handler);
+    // If unsubcribing from an event that is handled by a plugin
+    } else if (typeof documentEventHandlers[e] != "undefined") {
+        documentEventHandlers[e].unsubscribe(handler);
+    } else {
+        m_document_removeEventListener.call(document, evt, handler, capture);
+    }
 };
 
 window.removeEventListener = function(evt, handler, capture) {
@@ -147,9 +164,9 @@ function createEvent(type, data) {
 
 if(typeof window.console === "undefined")
 {
-	window.console = { 
-		log:function(){}
-	};
+    window.console = {
+        log:function(){}
+    };
 }
 
 var cordova = {
@@ -290,7 +307,7 @@ var cordova = {
             console.log("Error: Plugin "+name+" already exists.");
         }
     },
-    
+
     addConstructor: function(func) {
         channel.onCordovaReady.subscribeOnce(function() {
             try {
@@ -302,13 +319,16 @@ var cordova = {
     }
 };
 
-/** 
+/**
  * Legacy variable for plugin support
  * TODO: remove in 2.0.
  */
 if (!window.PhoneGap) {
     window.PhoneGap = cordova;
 }
+if (!window.Cordova) {
+    window.Cordova = cordova;
+}
 
 /**
  * Plugins object
@@ -324,6 +344,8 @@ module.exports = cordova;
 
 // file: lib/common/builder.js
 define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
 function each(objects, func, context) {
     for (var prop in objects) {
         if (objects.hasOwnProperty(prop)) {
@@ -500,10 +522,10 @@ var Channel = function(type, opts) {
 
         /**
          * 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
@@ -540,7 +562,7 @@ var Channel = function(type, opts) {
     utils = require('cordova/utils');
 
 /**
- * Subscribes the given function to the channel. Any time that 
+ * 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.
@@ -585,7 +607,7 @@ Channel.prototype.subscribeOnce = function(f, c) {
     return g;
 };
 
-/** 
+/**
  * Unsubscribes the function with the given guid from the channel.
  */
 Channel.prototype.unsubscribe = function(g) {
@@ -599,7 +621,7 @@ Channel.prototype.unsubscribe = function(g) {
     if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
 };
 
-/** 
+/**
  * Calls all functions subscribed to this channel.
  */
 Channel.prototype.fire = function(e) {
@@ -654,7 +676,6 @@ channel.waitForInitialization('onCordovaInfoReady');
 channel.waitForInitialization('onCordovaConnectionReady');
 
 module.exports = channel;
-
 });
 
 // file: lib/common/common.js
@@ -839,7 +860,6 @@ module.exports = {
         }
     }
 };
-
 });
 
 // file: lib/playbook/exec.js
@@ -902,7 +922,6 @@ module.exports = function(success, fail, service, action, args) {
         utils.alert("Error: "+e);
     }
 };
-
 });
 
 // file: lib/playbook/platform.js
@@ -925,7 +944,6 @@ module.exports = {
         }
     }
 };
-
 });
 
 // file: lib/common/plugin/Acceleration.js
@@ -938,7 +956,6 @@ var Acceleration = function(x, y, z, timestamp) {
 };
 
 module.exports = Acceleration;
-
 });
 
 // file: lib/common/plugin/Camera.js
@@ -1020,35 +1037,34 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
     if (typeof options.encodingType == "number") {
         encodingType = options.encodingType;
     }
-    
+
     var mediaType = Camera.MediaType.PICTURE;
     if (typeof options.mediaType == "number") {
         mediaType = options.mediaType;
     }
     var allowEdit = false;
     if (typeof options.allowEdit == "boolean") {
-    	allowEdit = options.allowEdit;
+        allowEdit = options.allowEdit;
     } else if (typeof options.allowEdit == "number") {
-    	allowEdit = options.allowEdit <= 0 ? false : true;
+        allowEdit = options.allowEdit <= 0 ? false : true;
     }
     var correctOrientation = false;
     if (typeof options.correctOrientation == "boolean") {
-    	correctOrientation = options.correctOrientation;
+        correctOrientation = options.correctOrientation;
     } else if (typeof options.correctOrientation == "number") {
-    	correctOrientation = options.correctOrientation <=0 ? false : true;
+        correctOrientation = options.correctOrientation <=0 ? false : true;
     }
     var saveToPhotoAlbum = false;
-	if (typeof options.saveToPhotoAlbum == "boolean") {
-    	saveToPhotoAlbum = options.saveToPhotoAlbum;
+    if (typeof options.saveToPhotoAlbum == "boolean") {
+        saveToPhotoAlbum = options.saveToPhotoAlbum;
     } else if (typeof options.saveToPhotoAlbum == "number") {
-    	saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+        saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
     }
 
     exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
-}
+};
 
 module.exports = cameraExport;
-
 });
 
 // file: lib/common/plugin/CameraConstants.js
@@ -1073,7 +1089,6 @@ module.exports = {
     SAVEDPHOTOALBUM : 2  // Choose image from picture library (same as PHOTOLIBRARY for Android)
   }
 };
-
 });
 
 // file: lib/common/plugin/CaptureAudioOptions.js
@@ -1082,16 +1097,15 @@ define("cordova/plugin/CaptureAudioOptions", function(require, exports, module)
  * 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;
+    // 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;
-
 });
 
 // file: lib/common/plugin/CaptureError.js
@@ -1103,7 +1117,7 @@ var CaptureError = function(c) {
    this.code = c || null;
 };
 
-// Camera or microphone failed to capture image or sound. 
+// 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;
@@ -1115,7 +1129,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
 CaptureError.CAPTURE_NOT_SUPPORTED = 20;
 
 module.exports = CaptureError;
-
 });
 
 // file: lib/common/plugin/CaptureImageOptions.js
@@ -1124,14 +1137,13 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
  * 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;
+    // 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;
-
 });
 
 // file: lib/common/plugin/CaptureVideoOptions.js
@@ -1140,16 +1152,15 @@ define("cordova/plugin/CaptureVideoOptions", function(require, exports, module)
  * 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;
+    // 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;
-
 });
 
 // file: lib/common/plugin/CompassError.js
@@ -1167,7 +1178,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
 CompassError.COMPASS_NOT_SUPPORTED = 20;
 
 module.exports = CompassError;
-
 });
 
 // file: lib/common/plugin/CompassHeading.js
@@ -1180,7 +1190,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
 };
 
 module.exports = CompassHeading;
-
 });
 
 // file: lib/common/plugin/ConfigurationData.js
@@ -1189,18 +1198,17 @@ define("cordova/plugin/ConfigurationData", function(require, exports, module) {
  * 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. 
+    // 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. 
+    // 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;
-
 });
 
 // file: lib/common/plugin/Connection.js
@@ -1209,15 +1217,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
  * Network status
  */
 module.exports = {
-		UNKNOWN: "unknown",
-		ETHERNET: "ethernet",
-		WIFI: "wifi",
-		CELL_2G: "2g",
-		CELL_3G: "3g",
-		CELL_4G: "4g",
-		NONE: "none"
+        UNKNOWN: "unknown",
+        ETHERNET: "ethernet",
+        WIFI: "wifi",
+        CELL_2G: "2g",
+        CELL_3G: "3g",
+        CELL_4G: "4g",
+        NONE: "none"
 };
-
 });
 
 // file: lib/common/plugin/Contact.js
@@ -1238,7 +1245,7 @@ function convertIn(contact) {
       console.log("Cordova Contact convertIn error: exception creating date.");
     }
     return contact;
-};
+}
 
 /**
 * Converts Complex objects into primitives
@@ -1247,7 +1254,7 @@ function convertIn(contact) {
 
 function convertOut(contact) {
     var value = contact.birthday;
-    if (value != null) {
+    if (value !== null) {
         // try to make it a Date object if it is not already
         if (!value instanceof Date){
             try {
@@ -1262,7 +1269,7 @@ function convertOut(contact) {
         contact.birthday = value;
     }
     return contact;
-};
+}
 
 /**
 * Contains information about a single contact.
@@ -1381,7 +1388,7 @@ Contact.prototype.save = function(successCB, errorCB) {
   var fail = function(code) {
       errorCB(new ContactError(code));
   };
-	var success = function(result) {
+    var success = function(result) {
       if (result) {
           if (typeof successCB === 'function') {
               var fullContact = require('cordova/plugin/contacts').create(result);
@@ -1393,13 +1400,12 @@ Contact.prototype.save = function(successCB, errorCB) {
           fail(ContactError.UNKNOWN_ERROR);
       }
   };
-	var dupContact = convertOut(utils.clone(this));
-	exec(success, fail, "Contacts", "save", [dupContact]);
+    var dupContact = convertOut(utils.clone(this));
+    exec(success, fail, "Contacts", "save", [dupContact]);
 };
 
 
 module.exports = Contact;
-
 });
 
 // file: lib/common/plugin/ContactAddress.js
@@ -1429,7 +1435,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
 };
 
 module.exports = ContactAddress;
-
 });
 
 // file: lib/common/plugin/ContactError.js
@@ -1455,7 +1460,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
 ContactError.PERMISSION_DENIED_ERROR = 20;
 
 module.exports = ContactError;
-
 });
 
 // file: lib/common/plugin/ContactField.js
@@ -1476,7 +1480,6 @@ var ContactField = function(type, value, pref) {
 };
 
 module.exports = ContactField;
-
 });
 
 // file: lib/common/plugin/ContactFindOptions.js
@@ -1494,7 +1497,6 @@ var ContactFindOptions = function(filter, multiple) {
 };
 
 module.exports = ContactFindOptions;
-
 });
 
 // file: lib/common/plugin/ContactName.js
@@ -1519,7 +1521,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
 };
 
 module.exports = ContactName;
-
 });
 
 // file: lib/common/plugin/ContactOrganization.js
@@ -1547,7 +1548,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
 };
 
 module.exports = ContactOrganization;
-
 });
 
 // file: lib/common/plugin/Coordinates.js
@@ -1595,7 +1595,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
 };
 
 module.exports = Coordinates;
-
 });
 
 // file: lib/common/plugin/DirectoryEntry.js
@@ -1603,6 +1602,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
 var utils = require('cordova/utils'),
     exec = require('cordova/exec'),
     Entry = require('cordova/plugin/Entry'),
+    FileError = require('cordova/plugin/FileError'),
     DirectoryReader = require('cordova/plugin/DirectoryReader');
 
 /**
@@ -1685,7 +1685,8 @@ module.exports = DirectoryEntry;
 
 // file: lib/common/plugin/DirectoryReader.js
 define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+    FileError = require('cordova/plugin/FileError') ;
 
 /**
  * An interface that lists the files and directories in a directory.
@@ -1706,10 +1707,10 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
         for (var i=0; i<result.length; i++) {
             var entry = null;
             if (result[i].isDirectory) {
-                entry = new DirectoryEntry();
+                entry = new (require('cordova/plugin/DirectoryEntry'))();
             }
             else if (result[i].isFile) {
-                entry = new FileEntry();
+                entry = new (require('cordova/plugin/FileEntry'))();
             }
             entry.isDirectory = result[i].isDirectory;
             entry.isFile = result[i].isFile;
@@ -1934,7 +1935,6 @@ Entry.prototype.getParent = function(successCallback, errorCallback) {
 };
 
 module.exports = Entry;
-
 });
 
 // file: lib/common/plugin/File.js
@@ -1949,15 +1949,14 @@ define("cordova/plugin/File", function(require, exports, module) {
  */
 
 var File = function(name, fullPath, type, lastModifiedDate, size){
-	this.name = name || '';
-	this.fullPath = fullPath || null;
-	this.type = type || null;
-	this.lastModifiedDate = lastModifiedDate || null;
-	this.size = size || 0;
+    this.name = name || '';
+    this.fullPath = fullPath || null;
+    this.type = type || null;
+    this.lastModifiedDate = lastModifiedDate || null;
+    this.size = size || 0;
 };
 
 module.exports = File;
-
 });
 
 // file: lib/common/plugin/FileEntry.js
@@ -2025,7 +2024,6 @@ FileEntry.prototype.file = function(successCallback, errorCallback) {
 
 
 module.exports = FileEntry;
-
 });
 
 // file: lib/common/plugin/FileError.js
@@ -2055,7 +2053,6 @@ FileError.TYPE_MISMATCH_ERR = 11;
 FileError.PATH_EXISTS_ERR = 12;
 
 module.exports = FileError;
-
 });
 
 // file: lib/common/plugin/FileReader.js
@@ -2309,7 +2306,6 @@ FileReader.prototype.readAsArrayBuffer = function(file) {
 };
 
 module.exports = FileReader;
-
 });
 
 // file: lib/common/plugin/FileSystem.js
@@ -2331,7 +2327,6 @@ var FileSystem = function(name, root) {
 };
 
 module.exports = FileSystem;
-
 });
 
 // file: lib/common/plugin/FileTransfer.js
@@ -2390,16 +2385,16 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
     var win = function(result) {
         var entry = null;
         if (result.isDirectory) {
-            entry = new DirectoryEntry();
+            entry = new (require('cordova/plugin/DirectoryEntry'))();
         }
         else if (result.isFile) {
-            entry = new FileEntry();
+            entry = new (require('cordova/plugin/FileEntry'))();
         }
         entry.isDirectory = result.isDirectory;
         entry.isFile = result.isFile;
         entry.name = result.name;
         entry.fullPath = result.fullPath;
-        successCallback(entry);   
+        successCallback(entry);
     };
     exec(win, errorCallback, 'FileTransfer', 'download', [source, target]);
 };
@@ -2423,7 +2418,6 @@ FileTransferError.INVALID_URL_ERR = 2;
 FileTransferError.CONNECTION_ERR = 3;
 
 module.exports = FileTransferError;
-
 });
 
 // file: lib/common/plugin/FileUploadOptions.js
@@ -2444,7 +2438,6 @@ var FileUploadOptions = function(fileKey, fileName, mimeType, params) {
 };
 
 module.exports = FileUploadOptions;
-
 });
 
 // file: lib/common/plugin/FileUploadResult.js
@@ -2460,13 +2453,12 @@ var FileUploadResult = function() {
 };
 
 module.exports = FileUploadResult;
-
 });
 
 // file: lib/common/plugin/FileWriter.js
 define("cordova/plugin/FileWriter", function(require, exports, module) {
 var exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError');
+    FileError = require('cordova/plugin/FileError'),
     ProgressEvent = require('cordova/plugin/ProgressEvent');
 
 /**
@@ -2625,7 +2617,7 @@ FileWriter.prototype.seek = function(offset) {
         throw new FileError(FileError.INVALID_STATE_ERR);
     }
 
-    if (!offset && offset != 0) {
+    if (!offset && offset !== 0) {
         return;
     }
 
@@ -2725,7 +2717,7 @@ module.exports = FileWriter;
 define("cordova/plugin/Flags", function(require, exports, module) {
 /**
  * Supplies arguments to methods that lookup or create files and directories.
- * 
+ *
  * @param create
  *            {boolean} file or directory if it doesn't exist
  * @param exclusive
@@ -2738,7 +2730,6 @@ function Flags(create, exclusive) {
 }
 
 module.exports = Flags;
-
 });
 
 // file: lib/common/plugin/LocalFileSystem.js
@@ -2756,7 +2747,6 @@ LocalFileSystem.TEMPORARY = 0; //temporary, with no guarantee of persistence
 LocalFileSystem.PERSISTENT = 1; //persistent
 
 module.exports = LocalFileSystem;
-
 });
 
 // file: lib/common/plugin/Media.js
@@ -2938,7 +2928,7 @@ Media.onStatus = function(id, msg, value) {
     }
     else if (msg === Media.MEDIA_ERROR) {
         if (media.errorCallback) {
-        	// value should be a MediaError object when msg == MEDIA_ERROR
+            // value should be a MediaError object when msg == MEDIA_ERROR
             media.errorCallback(value);
         }
     }
@@ -2948,7 +2938,6 @@ Media.onStatus = function(id, msg, value) {
 };
 
 module.exports = Media;
-
 });
 
 // file: lib/common/plugin/MediaError.js
@@ -2969,7 +2958,6 @@ MediaError.MEDIA_ERR_DECODE         = 3;
 MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
 
 module.exports = MediaError;
-
 });
 
 // file: lib/common/plugin/MediaFile.js
@@ -2995,16 +2983,16 @@ utils.extend(MediaFile, File);
 
 /**
  * Request capture format data for a specific file and type
- * 
+ *
  * @param {Function} successCB
  * @param {Function} errorCB
  */
 MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
-	if (typeof this.fullPath === "undefined" || this.fullPath === null) {
-		errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
-	} else {
+    if (typeof this.fullPath === "undefined" || this.fullPath === null) {
+        errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
+    } else {
     exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
-	}	
+    }
 };
 
 /**
@@ -3030,7 +3018,6 @@ MediaFile.cast = function(pluginResult) {
 };
 
 module.exports = MediaFile;
-
 });
 
 // file: lib/common/plugin/MediaFileData.js
@@ -3045,22 +3032,21 @@ define("cordova/plugin/MediaFileData", function(require, exports, module) {
  * @param {float} duration
  */
 var MediaFileData = function(codecs, bitrate, height, width, duration){
-	this.codecs = codecs || null;
-	this.bitrate = bitrate || 0;
-	this.height = height || 0;
-	this.width = width || 0;
-	this.duration = duration || 0;
+    this.codecs = codecs || null;
+    this.bitrate = bitrate || 0;
+    this.height = height || 0;
+    this.width = width || 0;
+    this.duration = duration || 0;
 };
 
 module.exports = MediaFileData;
-
 });
 
 // file: lib/common/plugin/Metadata.js
 define("cordova/plugin/Metadata", function(require, exports, module) {
 /**
  * Information about the state of the file or directory
- * 
+ *
  * {Date} modificationTime (readonly)
  */
 var Metadata = function(time) {
@@ -3068,7 +3054,6 @@ var Metadata = function(time) {
 };
 
 module.exports = Metadata;
-
 });
 
 // file: lib/common/plugin/Position.js
@@ -3076,12 +3061,11 @@ define("cordova/plugin/Position", function(require, exports, module) {
 var Coordinates = require('cordova/plugin/Coordinates');
 
 var Position = function(coords, timestamp) {
-	this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
-	this.timestamp = (timestamp !== undefined) ? timestamp : new Date().getTime();
+    this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
+    this.timestamp = (timestamp !== undefined) ? timestamp : new Date().getTime();
 };
 
 module.exports = Position;
-
 });
 
 // file: lib/common/plugin/PositionError.js
@@ -3103,7 +3087,6 @@ PositionError.POSITION_UNAVAILABLE = 2;
 PositionError.TIMEOUT = 3;
 
 module.exports = PositionError;
-
 });
 
 // file: lib/common/plugin/ProgressEvent.js
@@ -3154,7 +3137,6 @@ var ProgressEvent = (function() {
 })();
 
 module.exports = ProgressEvent;
-
 });
 
 // file: lib/common/plugin/accelerometer.js
@@ -3254,7 +3236,6 @@ var accelerometer = {
 };
 
 module.exports = accelerometer;
-
 });
 
 // file: lib/common/plugin/battery.js
@@ -3267,7 +3248,7 @@ var cordova = require('cordova'),
     exec = require('cordova/exec');
 
 function handlers() {
-  return battery.channels.batterystatus.numHandlers + 
+  return battery.channels.batterystatus.numHandlers +
          battery.channels.batterylow.numHandlers +
          battery.channels.batterycritical.numHandlers;
 }
@@ -3310,30 +3291,30 @@ Battery.prototype.onUnsubscribe = function() {
 
 /**
  * Callback for battery status
- * 
- * @param {Object} info			keys: level, isPlugged
+ *
+ * @param {Object} info            keys: level, isPlugged
  */
 Battery.prototype._status = function(info) {
-	if (info) {
-		var me = battery;
+    if (info) {
+        var me = battery;
     var level = info.level;
-		if (me._level !== level || me._isPlugged !== info.isPlugged) {
-			// Fire batterystatus event
-			cordova.fireWindowEvent("batterystatus", info);
-
-			// Fire low battery event
-			if (level === 20 || level === 5) {
-				if (level === 20) {
-					cordova.fireWindowEvent("batterylow", info);
-				}
-				else {
-					cordova.fireWindowEvent("batterycritical", info);
-				}
-			}
-		}
-		me._level = level;
-		me._isPlugged = info.isPlugged;	
-	}
+        if (me._level !== level || me._isPlugged !== info.isPlugged) {
+            // Fire batterystatus event
+            cordova.fireWindowEvent("batterystatus", info);
+
+            // Fire low battery event
+            if (level === 20 || level === 5) {
+                if (level === 20) {
+                    cordova.fireWindowEvent("batterylow", info);
+                }
+                else {
+                    cordova.fireWindowEvent("batterycritical", info);
+                }
+            }
+        }
+        me._level = level;
+        me._isPlugged = info.isPlugged;
+    }
 };
 
 /**
@@ -3346,7 +3327,6 @@ Battery.prototype._error = function(e) {
 var battery = new Battery();
 
 module.exports = battery;
-
 });
 
 // file: lib/common/plugin/capture.js
@@ -3357,7 +3337,7 @@ var exec = require('cordova/exec'),
 /**
  * Launches a capture of different types.
  *
- * @param (DOMString} type 
+ * @param (DOMString} type
  * @param {Function} successCB
  * @param {Function} errorCB
  * @param {CaptureVideoOptions} options
@@ -3383,9 +3363,9 @@ function _capture(type, successCallback, errorCallback, options) {
  * The Capture interface exposes an interface to the camera and microphone of the hosting device.
  */
 function Capture() {
-	this.supportedAudioModes = [];
-	this.supportedImageModes = [];
-	this.supportedVideoModes = [];
+    this.supportedAudioModes = [];
+    this.supportedImageModes = [];
+    this.supportedVideoModes = [];
 }
 
 /**
@@ -3438,7 +3418,7 @@ var exec = require('cordova/exec'),
          * Asynchronously acquires the current heading.
          * @param {Function} successCallback The function to call when the heading
          * data is available
-         * @param {Function} errorCallback The function to call when there is an error 
+         * @param {Function} errorCallback The function to call when there is an error
          * getting the heading data.
          * @param {CompassOptions} options The options for getting the heading data (not used).
          */
@@ -3462,8 +3442,8 @@ var exec = require('cordova/exec'),
             var fail = function(code) {
                 var ce = new CompassError(code);
                 errorCallback(ce);
-            }
-            
+            };
+
             // Get heading
             exec(win, fail, "Compass", "getHeading", [options]);
         },
@@ -3472,7 +3452,7 @@ var exec = require('cordova/exec'),
          * Asynchronously acquires the heading repeatedly at a given interval.
          * @param {Function} successCallback The function to call each time the heading
          * data is available
-         * @param {Function} errorCallback The function to call when there is an error 
+         * @param {Function} errorCallback The function to call when there is an error
          * getting the heading data.
          * @param {HeadingOptions} options The options for getting the heading data
          * such as timeout and the frequency of the watch. For iOS, filter parameter
@@ -3496,17 +3476,17 @@ var exec = require('cordova/exec'),
             }
 
             var id = utils.createUUID();
-			if (filter > 0) {
-				// is an iOS request for watch by filter, no timer needed
-				timers[id] = "iOS";
-				compass.getCurrentHeading(successCallback, errorCallback, options);
-			} else {
-				// Start watch timer to get headings
-            	timers[id] = window.setInterval(function() {
-                	compass.getCurrentHeading(successCallback, errorCallback);
-            	}, frequency);
-			}
-				
+            if (filter > 0) {
+                // is an iOS request for watch by filter, no timer needed
+                timers[id] = "iOS";
+                compass.getCurrentHeading(successCallback, errorCallback, options);
+            } else {
+                // Start watch timer to get headings
+                timers[id] = window.setInterval(function() {
+                    compass.getCurrentHeading(successCallback, errorCallback);
+                }, frequency);
+            }
+
             return id;
         },
 
@@ -3517,19 +3497,18 @@ var exec = require('cordova/exec'),
         clearWatch:function(id) {
             // Stop javascript timer & remove from timer list
             if (id && timers[id]) {
-            	if (timers[id] != "iOS") {
-              		clearInterval(timers[id]);
-              	} else {
-            		// is iOS watch by filter so call into device to stop
-            		exec(null, null, "Compass", "stopHeading", []);
-            	}
-	            delete timers[id];
+                if (timers[id] != "iOS") {
+                      clearInterval(timers[id]);
+                  } else {
+                    // is iOS watch by filter so call into device to stop
+                    exec(null, null, "Compass", "stopHeading", []);
+                }
+                delete timers[id];
             }
         }
     };
 
 module.exports = compass;
-
 });
 
 // file: lib/common/plugin/contacts.js
@@ -3591,7 +3570,6 @@ var contacts = {
 };
 
 module.exports = contacts;
-
 });
 
 // file: lib/common/plugin/geolocation.js
@@ -3655,7 +3633,7 @@ var geolocation = {
             errorCallback(new PositionError(e.code, e.message));
         };
 
-        exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]); 
+        exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
     },
     /**
      * Asynchronously watches the geolocation for changes to geolocation.  When a change occurs,
@@ -3690,7 +3668,6 @@ var geolocation = {
 };
 
 module.exports = geolocation;
-
 });
 
 // file: lib/common/plugin/network.js
@@ -3755,7 +3732,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
 };
 
 module.exports = new NetworkConnection();
-
 });
 
 // file: lib/common/plugin/notification.js
@@ -3816,7 +3792,6 @@ module.exports = {
         exec(null, null, "Notification", "beep", [count]);
     }
 };
-
 });
 
 // file: lib/playbook/plugin/playbook/device.js
@@ -3845,13 +3820,13 @@ channel.onCordovaReady.subscribeOnce(function() {
 });
 
 module.exports = me;
-
 });
 
 // file: lib/playbook/plugin/playbook/manager.js
 define("cordova/plugin/playbook/manager", function(require, exports, module) {
 var webworks = require('cordova/plugin/webworks/manager'),
     cordova = require('cordova'),
+    MediaFile = require('cordova/plugin/MediaFile'),
     /**
      * Private list of HTML 5 audio objects, indexed by the Cordova media object ids
      */
@@ -3876,8 +3851,7 @@ var webworks = require('cordova/plugin/webworks/manager'),
                             "isPlugged" : state === 2
                         };
 
-                        if (me._isPlugged !== info.isPlugged
-                                && typeof win === 'function') {
+                        if (me._isPlugged !== info.isPlugged && typeof win === 'function') {
                             win(info);
                         }
                     }
@@ -3917,7 +3891,7 @@ var webworks = require('cordova/plugin/webworks/manager'),
                             "name" : blackberry.system.model,
                             "uuid" : blackberry.identity.PIN,
                             "platform" : "PlayBook",
-                            "cordova" : "1.6.1"
+                            "cordova" : "1.7.0rc1"
                         }
                 };
             }
@@ -4218,13 +4192,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
 };
 
 module.exports = requestFileSystem;
-
 });
 
 // file: lib/common/plugin/resolveLocalFileSystemURI.js
 define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
 var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
     FileEntry = require('cordova/plugin/FileEntry'),
+    FileError = require('cordova/plugin/FileError'),
     exec = require('cordova/exec');
 
 /**
@@ -4283,7 +4257,6 @@ module.exports = {
         return {"status" : cordova.callbackStatus.CLASS_NOT_FOUND_EXCEPTION, "message" : "Class " + clazz + " cannot be found"};
     }
 };
-
 });
 
 // file: lib/common/utils.js
@@ -4305,12 +4278,12 @@ var _self = {
      * Does a deep clone of the object.
      */
     clone: function(obj) {
-        if(!obj) { 
+        if(!obj) {
             return obj;
         }
-        
+
         var retVal, i;
-        
+
         if(obj instanceof Array){
             retVal = [];
             for(i = 0; i < obj.length; ++i){
@@ -4318,15 +4291,15 @@ var _self = {
             }
             return retVal;
         }
-        
+
         if (obj instanceof Function) {
             return obj;
         }
-        
+
         if(!(obj instanceof Object)){
             return obj;
         }
-        
+
         if(obj instanceof Date){
             return obj;
         }
@@ -4369,7 +4342,7 @@ var _self = {
      */
     extend: (function() {
         // proxy used to establish prototype chain
-        var F = function() {}; 
+        var F = function() {};
         // extend Child from Parent
         return function(Child, Parent) {
             F.prototype = Parent.prototype;
@@ -4392,7 +4365,6 @@ var _self = {
 };
 
 module.exports = _self;
-
 });
 
 
@@ -4403,20 +4375,6 @@ window.cordova = require('cordova');
     var channel = require("cordova/channel"),
         _self = {
             boot: function () {
-                //---------------
-                // Event handling
-                //---------------
-
-                /**
-                 * Listen for DOMContentLoaded and notify our channel subscribers.
-                 */
-                document.addEventListener('DOMContentLoaded', function() {
-                    channel.onDOMContentLoaded.fire();
-                }, false);
-                if (document.readyState == 'complete') {
-                  channel.onDOMContentLoaded.fire();
-                }
-
                 /**
                  * Create all cordova objects once page has fully loaded and native side is ready.
                  */
@@ -4449,11 +4407,11 @@ window.cordova = require('cordova');
                     channel.join(function() {
                         channel.onDeviceReady.fire();
                     }, channel.deviceReadyChannelsArray);
-                    
+
                 }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
             }
         };
-        
+
     // boot up once native side is ready
     channel.onNativeReady.subscribeOnce(_self.boot);
 
@@ -4465,9 +4423,7 @@ window.cordova = require('cordova');
     }
 
 }(window));
-
 // file: lib/scripts/bootstrap-playbook.js
 require('cordova/channel').onNativeReady.fire();
 
-
-})();
+})();
\ No newline at end of file


Mime
View raw message