javascript and native side of a URL caching plugin + android plugin framework is complete

This commit is contained in:
Dave Johnson
2010-07-28 17:26:23 -07:00
parent 742910f369
commit 2b2b4f5dd4
8 changed files with 290 additions and 24 deletions
+18
View File
@@ -0,0 +1,18 @@
PhoneGap.addPlugin = function(name, obj) {
if ( !window.plugins ) {
window.plugins = {};
}
if ( !window.plugins[name] ) {
window.plugins[name] = obj;
}
}
function Cache() {
}
Cache.prototype.getCachedPathForURI = function(uri, success, fail) {
PhoneGap.execAsync(success, fail, 'com.phonegap.api.impl.Cache', 'getCachedPathForURI', [uri]);
};
PhoneGap.addPlugin('cache', new Cache());