incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [1/2] js commit: Added an Echo plugin for benchmarks.
Date Fri, 17 Aug 2012 15:09:17 GMT
Updated Branches:
  refs/heads/master 33d1ef23e -> 5fecf16a6


Added an Echo plugin for benchmarks.


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

Branch: refs/heads/master
Commit: 03a0aca5af999b994811e4ac8c0279d0ada2f262
Parents: 33d1ef2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Aug 16 17:11:23 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Aug 17 11:08:15 2012 -0400

----------------------------------------------------------------------
 lib/common/plugin/echo.js |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/03a0aca5/lib/common/plugin/echo.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/echo.js b/lib/common/plugin/echo.js
new file mode 100644
index 0000000..63b8201
--- /dev/null
+++ b/lib/common/plugin/echo.js
@@ -0,0 +1,14 @@
+var exec = require('cordova/exec');
+
+/**
+ * Sends the given message through exec() to the Echo plugink, which sends it back to the
successCallback.
+ * @param successCallback  invoked with a FileSystem object
+ * @param errorCallback  invoked if error occurs retrieving file system
+ * @param message  The string to be echoed.
+ * @param forceAsync  Whether to force an async return value (for testing native->js bridge).
+ */
+module.exports = function(successCallback, errorCallback, message, forceAsync) {
+    var action = forceAsync ? 'echoAsync' : 'echo';
+    exec(successCallback, errorCallback, "Echo", action, [message]);
+};
+


Mime
View raw message