incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject js commit: Common: Remove dead code MediaFile.cast
Date Tue, 21 Aug 2012 14:36:07 GMT
Updated Branches:
  refs/heads/master 7b33b31a9 -> ec617ee56


Common: Remove dead code MediaFile.cast

I've deleted the MediaFile.cast method as it is dead code. I confirmed that there is no ill
effects on Android from it's removal. I reviewed iOS and BB and it doesn't appear that they
call it either.


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

Branch: refs/heads/master
Commit: ec617ee5652d8ad7d8bd2c7f112e11c6ecb40f83
Parents: 7b33b31
Author: macdonst <simon.macdonald@gmail.com>
Authored: Tue Aug 21 10:33:17 2012 -0400
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Tue Aug 21 10:33:21 2012 -0400

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


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/ec617ee5/lib/common/plugin/MediaFile.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/MediaFile.js b/lib/common/plugin/MediaFile.js
index 5118e86..a04967a 100644
--- a/lib/common/plugin/MediaFile.js
+++ b/lib/common/plugin/MediaFile.js
@@ -31,26 +31,4 @@ MediaFile.prototype.getFormatData = function(successCallback, errorCallback)
{
     }
 };
 
-// TODO: can we axe this?
-/**
- * Casts a PluginResult message property  (array of objects) to an array of MediaFile objects
- * (used in Objective-C and Android)
- *
- * @param {PluginResult} pluginResult
- */
-MediaFile.cast = function(pluginResult) {
-    var mediaFiles = [];
-    for (var i=0; i<pluginResult.message.length; i++) {
-        var mediaFile = new MediaFile();
-        mediaFile.name = pluginResult.message[i].name;
-        mediaFile.fullPath = pluginResult.message[i].fullPath;
-        mediaFile.type = pluginResult.message[i].type;
-        mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
-        mediaFile.size = pluginResult.message[i].size;
-        mediaFiles.push(mediaFile);
-    }
-    pluginResult.message = mediaFiles;
-    return pluginResult;
-};
-
 module.exports = MediaFile;


Mime
View raw message