You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2012/08/24 02:47:52 UTC
[4/8] js commit: added a common folder for webworks and moved some
playbook air manager plugins into it that also will work on bb10
added a common folder for webworks and moved some playbook air manager plugins into it that also will work on bb10
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/560faa1c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/560faa1c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/560faa1c
Branch: refs/heads/master
Commit: 560faa1c2c954b145fa4d5c448c6ba71a361fa61
Parents: 913da32
Author: Gord Tanner <gt...@gmail.com>
Authored: Wed Aug 22 14:27:03 2012 -0400
Committer: Tim Kim <ti...@nitobi.com>
Committed: Thu Aug 23 17:41:24 2012 -0700
----------------------------------------------------------------------
build/packager.js | 2 +-
lib/webworks/air/plugin/air/accelerometer.js | 22 --
lib/webworks/air/plugin/air/logger.js | 9 -
lib/webworks/air/plugin/air/media.js | 167 ---------------
lib/webworks/air/plugin/air/notification.js | 31 ---
lib/webworks/air/plugin/manager.js | 8 +-
.../common/plugin/webworks/accelerometer.js | 22 ++
lib/webworks/common/plugin/webworks/logger.js | 9 +
lib/webworks/common/plugin/webworks/media.js | 167 +++++++++++++++
.../common/plugin/webworks/notification.js | 31 +++
lib/webworks/qnx/platform.js | 6 +
lib/webworks/qnx/plugin/manager.js | 7 +-
lib/webworks/qnx/plugin/qnx/accelerometer.js | 22 --
lib/webworks/qnx/plugin/qnx/device.js | 3 +-
lib/webworks/qnx/plugin/qnx/requestFileSystem.js | 1 +
.../qnx/plugin/qnx/resolveLocalFileSystemURI.js | 1 +
16 files changed, 248 insertions(+), 260 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/build/packager.js
----------------------------------------------------------------------
diff --git a/build/packager.js b/build/packager.js
index 0011575..4076f16 100644
--- a/build/packager.js
+++ b/build/packager.js
@@ -48,12 +48,12 @@ packager.bundle = function(platform, debug, commitId ) {
}
copyProps(modules, collectFile(path.join('lib', 'webworks'), '', 'exec.js'))
+ copyProps(modules, collectFiles(path.join('lib', 'webworks/common')))
copyProps(modules, collectFiles(path.join('lib', 'webworks/' + lang)))
}
else {
copyProps(modules, collectFiles(path.join('lib', platform)))
}
-
var output = [];
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/air/plugin/air/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/webworks/air/plugin/air/accelerometer.js b/lib/webworks/air/plugin/air/accelerometer.js
deleted file mode 100644
index 68f1183..0000000
--- a/lib/webworks/air/plugin/air/accelerometer.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var cordova = require('cordova'),
- callback;
-
-module.exports = {
- start: function (args, win, fail) {
- window.removeEventListener("devicemotion", callback);
- callback = function (motion) {
- win({
- x: motion.accelerationIncludingGravity.x,
- y: motion.accelerationIncludingGravity.y,
- z: motion.accelerationIncludingGravity.z,
- timestamp: motion.timestamp
- });
- };
- window.addEventListener("devicemotion", callback);
- return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
- },
- stop: function (args, win, fail) {
- window.removeEventListener("devicemotion", callback);
- return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
- }
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/air/plugin/air/logger.js
----------------------------------------------------------------------
diff --git a/lib/webworks/air/plugin/air/logger.js b/lib/webworks/air/plugin/air/logger.js
deleted file mode 100644
index 8b8310b..0000000
--- a/lib/webworks/air/plugin/air/logger.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var cordova = require('cordova');
-
-module.exports = {
- log: function (args, win, fail) {
- console.log(args);
- return {"status" : cordova.callbackStatus.OK,
- "message" : 'Message logged to console: ' + args};
- }
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/air/plugin/air/media.js
----------------------------------------------------------------------
diff --git a/lib/webworks/air/plugin/air/media.js b/lib/webworks/air/plugin/air/media.js
deleted file mode 100644
index 1609238..0000000
--- a/lib/webworks/air/plugin/air/media.js
+++ /dev/null
@@ -1,167 +0,0 @@
-var cordova = require('cordova'),
- audioObjects = {};
-
-module.exports = {
- create: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- src = args[1];
-
- audioObjects[id] = new Audio(src);
- return {"status" : 1, "message" : "Audio object created" };
- },
- startPlayingAudio: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- audio = audioObjects[id],
- result;
-
- if (args.length === 1) {
- return {"status" : 9, "message" : "Media source argument not found"};
- }
-
- if (audio) {
- audio.pause();
- audioObjects[id] = undefined;
- }
-
- audio = audioObjects[id] = new Audio(args[1]);
- audio.play();
-
- return {"status" : 1, "message" : "Audio play started" };
- },
- stopPlayingAudio: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- audio = audioObjects[id],
- result;
-
- if (!audio) {
- return {"status" : 2, "message" : "Audio Object has not been initialized"};
- }
-
- audio.pause();
- audioObjects[id] = undefined;
-
- return {"status" : 1, "message" : "Audio play stopped" };
- },
- seekToAudio: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- audio = audioObjects[id],
- result;
-
- if (!audio) {
- result = {"status" : 2, "message" : "Audio Object has not been initialized"};
- } else if (args.length === 1) {
- result = {"status" : 9, "message" : "Media seek time argument not found"};
- } else {
- try {
- audio.currentTime = args[1];
- } catch (e) {
- console.log('Error seeking audio: ' + e);
- return {"status" : 3, "message" : "Error seeking audio: " + e};
- }
-
- result = {"status" : 1, "message" : "Seek to audio succeeded" };
- }
-
- return result;
- },
- pausePlayingAudio: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- audio = audioObjects[id],
- result;
-
- if (!audio) {
- return {"status" : 2, "message" : "Audio Object has not been initialized"};
- }
-
- audio.pause();
-
- return {"status" : 1, "message" : "Audio paused" };
- },
- getCurrentPositionAudio: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- audio = audioObjects[id],
- result;
-
- if (!audio) {
- return {"status" : 2, "message" : "Audio Object has not been initialized"};
- }
-
- return {"status" : 1, "message" : audio.currentTime };
- },
- getDuration: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- audio = audioObjects[id],
- result;
-
- if (!audio) {
- return {"status" : 2, "message" : "Audio Object has not been initialized"};
- }
-
- return {"status" : 1, "message" : audio.duration };
- },
- startRecordingAudio: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- audio = audioObjects[id],
- result;
-
- if (args.length <= 1) {
- result = {"status" : 9, "message" : "Media start recording, insufficient arguments"};
- }
-
- blackberry.media.microphone.record(args[1], win, fail);
- return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
- },
- stopRecordingAudio: function (args, win, fail) {
- },
- release: function (args, win, fail) {
- if (!args.length) {
- return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
- }
-
- var id = args[0],
- audio = audioObjects[id],
- result;
-
- if (audio) {
- audioObjects[id] = undefined;
- audio.src = undefined;
- //delete audio;
- }
-
- result = {"status" : 1, "message" : "Media resources released"};
-
- return result;
- }
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/air/plugin/air/notification.js
----------------------------------------------------------------------
diff --git a/lib/webworks/air/plugin/air/notification.js b/lib/webworks/air/plugin/air/notification.js
deleted file mode 100644
index fb95527..0000000
--- a/lib/webworks/air/plugin/air/notification.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var cordova = require('cordova');
-
-module.exports = {
- alert: function (args, win, fail) {
- if (args.length !== 3) {
- return {"status" : 9, "message" : "Notification action - alert arguments not found"};
- }
-
- //Unpack and map the args
- var msg = args[0],
- title = args[1],
- btnLabel = args[2];
-
- blackberry.ui.dialog.customAskAsync.apply(this, [ msg, [ btnLabel ], win, { "title" : title } ]);
- return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
- },
- confirm: function (args, win, fail) {
- if (args.length !== 3) {
- return {"status" : 9, "message" : "Notification action - confirm arguments not found"};
- }
-
- //Unpack and map the args
- var msg = args[0],
- title = args[1],
- btnLabel = args[2],
- btnLabels = btnLabel.split(",");
-
- blackberry.ui.dialog.customAskAsync.apply(this, [msg, btnLabels, win, {"title" : title} ]);
- return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
- }
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/air/plugin/manager.js
----------------------------------------------------------------------
diff --git a/lib/webworks/air/plugin/manager.js b/lib/webworks/air/plugin/manager.js
index e2873a8..e6c98f7 100644
--- a/lib/webworks/air/plugin/manager.js
+++ b/lib/webworks/air/plugin/manager.js
@@ -3,12 +3,12 @@ var cordova = require('cordova'),
'Device' : require('cordova/plugin/air/device'),
'Battery' : require('cordova/plugin/air/battery'),
'Camera' : require('cordova/plugin/air/camera'),
- 'Logger' : require('cordova/plugin/air/logger'),
- 'Media' : require('cordova/plugin/air/media'),
+ 'Logger' : require('cordova/plugin/webworks/logger'),
+ 'Media' : require('cordova/plugin/webworks/media'),
'Capture' : require('cordova/plugin/air/capture'),
- 'Accelerometer' : require('cordova/plugin/air/accelerometer'),
+ 'Accelerometer' : require('cordova/plugin/webworks/accelerometer'),
'NetworkStatus' : require('cordova/plugin/air/network'),
- 'Notification' : require('cordova/plugin/air/notification')
+ 'Notification' : require('cordova/plugin/webworks/notification')
};
module.exports = {
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/common/plugin/webworks/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/webworks/common/plugin/webworks/accelerometer.js b/lib/webworks/common/plugin/webworks/accelerometer.js
new file mode 100644
index 0000000..68f1183
--- /dev/null
+++ b/lib/webworks/common/plugin/webworks/accelerometer.js
@@ -0,0 +1,22 @@
+var cordova = require('cordova'),
+ callback;
+
+module.exports = {
+ start: function (args, win, fail) {
+ window.removeEventListener("devicemotion", callback);
+ callback = function (motion) {
+ win({
+ x: motion.accelerationIncludingGravity.x,
+ y: motion.accelerationIncludingGravity.y,
+ z: motion.accelerationIncludingGravity.z,
+ timestamp: motion.timestamp
+ });
+ };
+ window.addEventListener("devicemotion", callback);
+ return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
+ },
+ stop: function (args, win, fail) {
+ window.removeEventListener("devicemotion", callback);
+ return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/common/plugin/webworks/logger.js
----------------------------------------------------------------------
diff --git a/lib/webworks/common/plugin/webworks/logger.js b/lib/webworks/common/plugin/webworks/logger.js
new file mode 100644
index 0000000..8b8310b
--- /dev/null
+++ b/lib/webworks/common/plugin/webworks/logger.js
@@ -0,0 +1,9 @@
+var cordova = require('cordova');
+
+module.exports = {
+ log: function (args, win, fail) {
+ console.log(args);
+ return {"status" : cordova.callbackStatus.OK,
+ "message" : 'Message logged to console: ' + args};
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/common/plugin/webworks/media.js
----------------------------------------------------------------------
diff --git a/lib/webworks/common/plugin/webworks/media.js b/lib/webworks/common/plugin/webworks/media.js
new file mode 100644
index 0000000..1609238
--- /dev/null
+++ b/lib/webworks/common/plugin/webworks/media.js
@@ -0,0 +1,167 @@
+var cordova = require('cordova'),
+ audioObjects = {};
+
+module.exports = {
+ create: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ src = args[1];
+
+ audioObjects[id] = new Audio(src);
+ return {"status" : 1, "message" : "Audio object created" };
+ },
+ startPlayingAudio: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ audio = audioObjects[id],
+ result;
+
+ if (args.length === 1) {
+ return {"status" : 9, "message" : "Media source argument not found"};
+ }
+
+ if (audio) {
+ audio.pause();
+ audioObjects[id] = undefined;
+ }
+
+ audio = audioObjects[id] = new Audio(args[1]);
+ audio.play();
+
+ return {"status" : 1, "message" : "Audio play started" };
+ },
+ stopPlayingAudio: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ audio = audioObjects[id],
+ result;
+
+ if (!audio) {
+ return {"status" : 2, "message" : "Audio Object has not been initialized"};
+ }
+
+ audio.pause();
+ audioObjects[id] = undefined;
+
+ return {"status" : 1, "message" : "Audio play stopped" };
+ },
+ seekToAudio: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ audio = audioObjects[id],
+ result;
+
+ if (!audio) {
+ result = {"status" : 2, "message" : "Audio Object has not been initialized"};
+ } else if (args.length === 1) {
+ result = {"status" : 9, "message" : "Media seek time argument not found"};
+ } else {
+ try {
+ audio.currentTime = args[1];
+ } catch (e) {
+ console.log('Error seeking audio: ' + e);
+ return {"status" : 3, "message" : "Error seeking audio: " + e};
+ }
+
+ result = {"status" : 1, "message" : "Seek to audio succeeded" };
+ }
+
+ return result;
+ },
+ pausePlayingAudio: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ audio = audioObjects[id],
+ result;
+
+ if (!audio) {
+ return {"status" : 2, "message" : "Audio Object has not been initialized"};
+ }
+
+ audio.pause();
+
+ return {"status" : 1, "message" : "Audio paused" };
+ },
+ getCurrentPositionAudio: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ audio = audioObjects[id],
+ result;
+
+ if (!audio) {
+ return {"status" : 2, "message" : "Audio Object has not been initialized"};
+ }
+
+ return {"status" : 1, "message" : audio.currentTime };
+ },
+ getDuration: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ audio = audioObjects[id],
+ result;
+
+ if (!audio) {
+ return {"status" : 2, "message" : "Audio Object has not been initialized"};
+ }
+
+ return {"status" : 1, "message" : audio.duration };
+ },
+ startRecordingAudio: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ audio = audioObjects[id],
+ result;
+
+ if (args.length <= 1) {
+ result = {"status" : 9, "message" : "Media start recording, insufficient arguments"};
+ }
+
+ blackberry.media.microphone.record(args[1], win, fail);
+ return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
+ },
+ stopRecordingAudio: function (args, win, fail) {
+ },
+ release: function (args, win, fail) {
+ if (!args.length) {
+ return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
+ }
+
+ var id = args[0],
+ audio = audioObjects[id],
+ result;
+
+ if (audio) {
+ audioObjects[id] = undefined;
+ audio.src = undefined;
+ //delete audio;
+ }
+
+ result = {"status" : 1, "message" : "Media resources released"};
+
+ return result;
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/common/plugin/webworks/notification.js
----------------------------------------------------------------------
diff --git a/lib/webworks/common/plugin/webworks/notification.js b/lib/webworks/common/plugin/webworks/notification.js
new file mode 100644
index 0000000..fb95527
--- /dev/null
+++ b/lib/webworks/common/plugin/webworks/notification.js
@@ -0,0 +1,31 @@
+var cordova = require('cordova');
+
+module.exports = {
+ alert: function (args, win, fail) {
+ if (args.length !== 3) {
+ return {"status" : 9, "message" : "Notification action - alert arguments not found"};
+ }
+
+ //Unpack and map the args
+ var msg = args[0],
+ title = args[1],
+ btnLabel = args[2];
+
+ blackberry.ui.dialog.customAskAsync.apply(this, [ msg, [ btnLabel ], win, { "title" : title } ]);
+ return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
+ },
+ confirm: function (args, win, fail) {
+ if (args.length !== 3) {
+ return {"status" : 9, "message" : "Notification action - confirm arguments not found"};
+ }
+
+ //Unpack and map the args
+ var msg = args[0],
+ title = args[1],
+ btnLabel = args[2],
+ btnLabels = btnLabel.split(",");
+
+ blackberry.ui.dialog.customAskAsync.apply(this, [msg, btnLabels, win, {"title" : title} ]);
+ return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/qnx/platform.js
----------------------------------------------------------------------
diff --git a/lib/webworks/qnx/platform.js b/lib/webworks/qnx/platform.js
index 83cf116..12d82ce 100644
--- a/lib/webworks/qnx/platform.js
+++ b/lib/webworks/qnx/platform.js
@@ -2,5 +2,11 @@ module.exports = {
id: "qnx",
initialize: function () { },
objects: {
+ requestFileSystem:{
+ path: 'cordova/plugin/qnx/requestFileSystem'
+ },
+ resolveLocalFileSystemURI:{
+ path: 'cordova/plugin/qnx/resolveLocalFileSystemURI'
+ }
}
};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/qnx/plugin/manager.js
----------------------------------------------------------------------
diff --git a/lib/webworks/qnx/plugin/manager.js b/lib/webworks/qnx/plugin/manager.js
index e652866..d25c26d 100644
--- a/lib/webworks/qnx/plugin/manager.js
+++ b/lib/webworks/qnx/plugin/manager.js
@@ -1,8 +1,11 @@
var cordova = require('cordova'),
plugins = {
'NetworkStatus' : require('cordova/plugin/qnx/network'),
- 'Accelerometer' : require('cordova/plugin/qnx/accelerometer'),
- 'Device' : require('cordova/plugin/qnx/device')
+ 'Accelerometer' : require('cordova/plugin/webworks/accelerometer'),
+ 'Device' : require('cordova/plugin/qnx/device'),
+ 'Logger' : require('cordova/plugin/webworks/logger'),
+ 'Notification' : require('cordova/plugin/webworks/notification'),
+ 'Media': require('cordova/plugin/webworks/media')
};
module.exports = {
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/qnx/plugin/qnx/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/webworks/qnx/plugin/qnx/accelerometer.js b/lib/webworks/qnx/plugin/qnx/accelerometer.js
deleted file mode 100644
index 68f1183..0000000
--- a/lib/webworks/qnx/plugin/qnx/accelerometer.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var cordova = require('cordova'),
- callback;
-
-module.exports = {
- start: function (args, win, fail) {
- window.removeEventListener("devicemotion", callback);
- callback = function (motion) {
- win({
- x: motion.accelerationIncludingGravity.x,
- y: motion.accelerationIncludingGravity.y,
- z: motion.accelerationIncludingGravity.z,
- timestamp: motion.timestamp
- });
- };
- window.addEventListener("devicemotion", callback);
- return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
- },
- stop: function (args, win, fail) {
- window.removeEventListener("devicemotion", callback);
- return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
- }
-};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/qnx/plugin/qnx/device.js
----------------------------------------------------------------------
diff --git a/lib/webworks/qnx/plugin/qnx/device.js b/lib/webworks/qnx/plugin/qnx/device.js
index 1907c72..3d211aa 100644
--- a/lib/webworks/qnx/plugin/qnx/device.js
+++ b/lib/webworks/qnx/plugin/qnx/device.js
@@ -7,7 +7,7 @@ channel.waitForInitialization('onCordovaInfoReady');
module.exports = {
getDeviceInfo : function(args, win, fail){
win({
- platform: "PlayBook",
+ platform: "BB10",
version: blackberry.system.softwareVersion,
name: "Dev Alpha",
uuid: blackberry.identity.uuid,
@@ -16,5 +16,4 @@ module.exports = {
return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "Device info returned" };
}
-
};
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/qnx/plugin/qnx/requestFileSystem.js
----------------------------------------------------------------------
diff --git a/lib/webworks/qnx/plugin/qnx/requestFileSystem.js b/lib/webworks/qnx/plugin/qnx/requestFileSystem.js
new file mode 100644
index 0000000..98f4f59
--- /dev/null
+++ b/lib/webworks/qnx/plugin/qnx/requestFileSystem.js
@@ -0,0 +1 @@
+module.exports = window.webkitRequestFileSystem;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/560faa1c/lib/webworks/qnx/plugin/qnx/resolveLocalFileSystemURI.js
----------------------------------------------------------------------
diff --git a/lib/webworks/qnx/plugin/qnx/resolveLocalFileSystemURI.js b/lib/webworks/qnx/plugin/qnx/resolveLocalFileSystemURI.js
new file mode 100644
index 0000000..5b31609
--- /dev/null
+++ b/lib/webworks/qnx/plugin/qnx/resolveLocalFileSystemURI.js
@@ -0,0 +1 @@
+module.exports = window.webkitResolveLocalFileSystemURI;