You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/08/24 23:57:39 UTC

[49/50] [abbrv] js commit: Common: Remove dead code MediaFile.cast

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

Branch: refs/heads/master
Commit: 9958f6af8565eb3846ad7e4415d141b6cfed311f
Parents: ae75129
Author: macdonst <si...@gmail.com>
Authored: Tue Aug 21 10:33:17 2012 -0400
Committer: Anis Kadri <an...@gmail.com>
Committed: Fri Aug 24 13:49:58 2012 -0700

----------------------------------------------------------------------
 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/9958f6af/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;