diff --git a/framework/assets/js/crypto.js b/framework/assets/js/crypto.js index 3218a0c5..79512731 100644 --- a/framework/assets/js/crypto.js +++ b/framework/assets/js/crypto.js @@ -1,25 +1,15 @@ -com.phonegap.CryptoHandlerProxy = function() { - this.className = "com.phonegap.CryptoHandler"; -}; -com.phonegap.CryptoHandlerProxy.prototype.encrypt = function(pass, text) { - return PhoneGap.exec(this.className, "encrypt", [pass, text]); -}; -com.phonegap.CryptoHandlerProxy.prototype.decrypt = function(pass, text) { - return PhoneGap.exec(this.className, "decrypt", [pass, text]); -}; -com.phonegap.CryptoHandler = new com.phonegap.CryptoHandlerProxy(); var Crypto = function() { }; Crypto.prototype.encrypt = function(seed, string, callback) { - com.phonegap.CryptoHandler.encrypt(seed, string); this.encryptWin = callback; + PhoneGap.execAsync(null, null, "Crypto", "encrypt", [seed, string]); }; Crypto.prototype.decrypt = function(seed, string, callback) { - com.phonegap.CryptoHandler.decrypt(seed, string); this.decryptWin = callback; + PhoneGap.execAsync(null, null, "Crypto", "decrypt", [seed, string]); }; Crypto.prototype.gotCryptedString = function(string) { diff --git a/framework/assets/js/media.js b/framework/assets/js/media.js index 34b7be83..b3e57ab1 100755 --- a/framework/assets/js/media.js +++ b/framework/assets/js/media.js @@ -135,21 +135,21 @@ MediaError.MEDIA_ERR_NONE_SUPPORTED = 4; * Start or resume playing audio file. */ Media.prototype.play = function() { - PhoneGap.execAsync(null, null, "com.phonegap.AudioHandler", "startPlayingAudio", [this.id, this.src]); + PhoneGap.execAsync(null, null, "Media", "startPlayingAudio", [this.id, this.src]); }; /** * Stop playing audio file. */ Media.prototype.stop = function() { - return PhoneGap.execAsync(null, null, "com.phonegap.AudioHandler", "stopPlayingAudio", [this.id]); + return PhoneGap.execAsync(null, null, "Media", "stopPlayingAudio", [this.id]); }; /** * Pause playing audio file. */ Media.prototype.pause = function() { - PhoneGap.execAsync(null, null, "com.phonegap.AudioHandler", "pausePlayingAudio", [this.id]); + PhoneGap.execAsync(null, null, "Media", "pausePlayingAudio", [this.id]); }; /** @@ -168,20 +168,20 @@ Media.prototype.getDuration = function() { * @return */ Media.prototype.getCurrentPosition = function(success, fail) { - PhoneGap.execAsync(success, fail, "com.phonegap.AudioHandler", "getCurrentPositionAudio", [this.id]); + PhoneGap.execAsync(success, fail, "Media", "getCurrentPositionAudio", [this.id]); }; /** * Start recording audio file. */ Media.prototype.startRecord = function() { - PhoneGap.execAsync(null, null, "com.phonegap.AudioHandler", "startRecordingAudio", [this.id, this.src]); + PhoneGap.execAsync(null, null, "Media", "startRecordingAudio", [this.id, this.src]); }; /** * Stop recording audio file. */ Media.prototype.stopRecord = function() { - PhoneGap.execAsync(null, null, "com.phonegap.AudioHandler", "stopRecordingAudio", [this.id]); + PhoneGap.execAsync(null, null, "Media", "stopRecordingAudio", [this.id]); }; diff --git a/framework/assets/js/storage.js b/framework/assets/js/storage.js index 7930f3cf..ba234035 100644 --- a/framework/assets/js/storage.js +++ b/framework/assets/js/storage.js @@ -1,13 +1,3 @@ -com.phonegap.StorageProxy = function() { - this.className = "com.phonegap.Storage"; -}; -com.phonegap.StorageProxy.prototype.executeSql = function(query, params, id) { - return PhoneGap.exec(this.className, "executeSql", [query, params, id]); -}; -com.phonegap.StorageProxy.prototype.openDatabase = function(name, version, display_name, size) { - return PhoneGap.exec(this.className, "openDatabase", [name, version, display_name, size]); -}; -com.phonegap.Storage = new com.phonegap.StorageProxy(); /* * This is purely for the Android 1.5/1.6 HTML 5 Storage @@ -53,7 +43,7 @@ var Tx = function() { }; Tx.prototype.executeSql = function(query, params, win, fail) { - com.phonegap.Storage.executeSql(query, params, this.id); + PhoneGap.execAsync(null, null, "Storage", "executeSql", [query, params, this.id]); tx.win = win; tx.fail = fail; }; @@ -72,7 +62,7 @@ Rows.prototype.item = function(row_id) { }; var dbSetup = function(name, version, display_name, size) { - com.phonegap.Storage.openDatabase(name, version, display_name, size) + PhoneGap.execAsync(null, null, "Storage", "openDatabase", [name, version, display_name, size]); db_object = new DatabaseShell(); return db_object; };