cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pplaque...@apache.org
Subject [16/21] js commit: [Tizen, Tizen SDK 2.0 (Magnolia)] - several changes
Date Fri, 17 May 2013 14:22:26 GMT
[Tizen, Tizen SDK 2.0 (Magnolia)] - several changes

add a few console.log ( they will typically be removed from final release)

revert exec to previous version so file can work.(inspiration from bada relying on using require and a plugins array was not a good idea
as it was leading to have circular reference that cound not get solved)

added missing function for files  and file transfer( there are not yet implemented  and mark with my Trigram PPL, as to be implemented , often i just copy an existing similar function )

Added comments in File and File Transfer


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/8bcf44f3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/8bcf44f3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/8bcf44f3

Branch: refs/heads/master
Commit: 8bcf44f309e43f61589538131bdadf8f7b5bdec9
Parents: ba4dff6
Author: pplaquette <pplaquette@apache.org>
Authored: Mon May 13 17:50:27 2013 +0200
Committer: pplaquette <pplaquette@apache.org>
Committed: Mon May 13 17:50:27 2013 +0200

----------------------------------------------------------------------
 lib/tizen/exec.js                       |   57 +++-
 lib/tizen/platform.js                   |   12 +
 lib/tizen/plugin/tizen/Accelerometer.js |    7 +-
 lib/tizen/plugin/tizen/Battery.js       |    4 +
 lib/tizen/plugin/tizen/Camera.js        |    5 +
 lib/tizen/plugin/tizen/Compass.js       |    7 +-
 lib/tizen/plugin/tizen/Contact.js       |   16 +-
 lib/tizen/plugin/tizen/ContactUtils.js  |    8 +-
 lib/tizen/plugin/tizen/Device.js        |    8 +-
 lib/tizen/plugin/tizen/File.js          |  651 ++++++++++++++++++--------
 lib/tizen/plugin/tizen/FileTransfer.js  |  193 +++++---
 lib/tizen/plugin/tizen/Media.js         |   79 +++-
 lib/tizen/plugin/tizen/NetworkStatus.js |   13 +-
 lib/tizen/plugin/tizen/Notification.js  |    5 +
 14 files changed, 757 insertions(+), 308 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/exec.js
----------------------------------------------------------------------
diff --git a/lib/tizen/exec.js b/lib/tizen/exec.js
index 11a3be5..a47ce50 100644
--- a/lib/tizen/exec.js
+++ b/lib/tizen/exec.js
@@ -33,15 +33,34 @@
  * @param {String} action       Action to be run in cordova
  * @param {String[]} [args]     Zero or more arguments to pass to the method
  */
+/**
+ * Execute a cordova command.  It is up to the native side whether this action
+ * is synchronous or asynchronous.  The native side can return:
+ *      Synchronous: PluginResult object as a JSON string
+ *      Asynchronous: Empty string ""
+ * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
+ * depending upon the result of the action.
+ *
+ * @param {Function} successCB  The success callback
+ * @param {Function} failCB     The fail callback
+ * @param {String} service      The name of the service to use
+ * @param {String} action       Action to be run in cordova
+ * @param {String[]} [args]     Zero or more arguments to pass to the method
+ */
+
+console.log("TIZEN EXEC START");
 
-var tizen = require('cordova/plugin/tizen/manager'),
+
+var manager = require('cordova/plugin/tizen/manager'),
     cordova = require('cordova'),
     utils = require('cordova/utils');
 
+console.log("TIZEN EXEC START 2");
+
 module.exports = function(successCB, failCB, service, action, args) {
 
     try {
-        var v = tizen.exec(successCB, failCB, service, action, args);
+        var v = manager.exec(successCB, failCB, service, action, args);
 
         // If status is OK, then return value back to caller
         if (v.status == cordova.callbackStatus.OK) {
@@ -78,3 +97,37 @@ module.exports = function(successCB, failCB, service, action, args) {
         utils.alert("Error: " + e);
     }
 };
+
+console.log("TIZEN EXEC END ");
+
+/*
+var plugins = {
+    "Device": require('cordova/plugin/tizen/Device'),
+    "NetworkStatus": require('cordova/plugin/tizen/NetworkStatus'),
+    "Accelerometer": require('cordova/plugin/tizen/Accelerometer'),
+    "Battery": require('cordova/plugin/tizen/Battery'),
+    "Compass": require('cordova/plugin/tizen/Compass'),
+    //"Capture": require('cordova/plugin/tizen/Capture'), not yet available
+    "Camera": require('cordova/plugin/tizen/Camera'),
+    "FileTransfer": require('cordova/plugin/tizen/FileTransfer'),
+    "Media": require('cordova/plugin/tizen/Media'),
+    "Notification": require('cordova/plugin/tizen/Notification')
+};
+
+console.log("TIZEN EXEC START");
+
+module.exports = function(success, fail, service, action, args) {
+    try {
+        console.log("exec: " + service + "." + action);
+        plugins[service][action](success, fail, args);
+    }
+    catch(e) {
+        console.log("missing exec: " + service + "." + action);
+        console.log(args);
+        console.log(e);
+        console.log(e.stack);
+    }
+};
+
+console.log("TIZEN EXEC START");
+*/

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/platform.js
----------------------------------------------------------------------
diff --git a/lib/tizen/platform.js b/lib/tizen/platform.js
index 1860b57..82aed6e 100644
--- a/lib/tizen/platform.js
+++ b/lib/tizen/platform.js
@@ -19,9 +19,15 @@
  *
 */
 
+console.log("TIZEN PLATFORM START");
+
+
 module.exports = {
     id: "tizen",
     initialize: function() {
+
+        console.log("TIZEN PLATFORM initialize start");
+
         var modulemapper = require('cordova/modulemapper');
 
         //modulemapper.loadMatchingModules(/cordova.*\/plugininit$/);
@@ -29,5 +35,11 @@ module.exports = {
         modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
 
         modulemapper.mapModules(window);
+
+        console.log("TIZEN PLATFORM initialize end");
+
     }
 };
+
+console.log("TIZEN PLATFORM START");
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/Accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Accelerometer.js b/lib/tizen/plugin/tizen/Accelerometer.js
index f6d6d20..4006c5c 100644
--- a/lib/tizen/plugin/tizen/Accelerometer.js
+++ b/lib/tizen/plugin/tizen/Accelerometer.js
@@ -21,6 +21,8 @@
 
 var accelerometerCallback = null;
 
+console.log("TIZEN ACCELEROMETER START");
+
 module.exports = {
 
     start: function (successCallback, errorCallback) {
@@ -34,7 +36,7 @@ module.exports = {
                 x: motion.accelerationIncludingGravity.x,
                 y: motion.accelerationIncludingGravity.y,
                 z: motion.accelerationIncludingGravity.z,
-                timestamp: motion.interval
+                timestamp: new Date().getTime()
             });
         };
         window.addEventListener("devicemotion", accelerometerCallback, true);
@@ -45,3 +47,6 @@ module.exports = {
         accelerometerCallback = null;
     }
 };
+
+console.log("TIZEN ACCELEROMETER END");
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/Battery.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Battery.js b/lib/tizen/plugin/tizen/Battery.js
index 12b678b..a3aae49 100644
--- a/lib/tizen/plugin/tizen/Battery.js
+++ b/lib/tizen/plugin/tizen/Battery.js
@@ -22,6 +22,8 @@
 /*global tizen:false */
 var batteryListenerId = null;
 
+console.log("TIZEN BATTERY START");
+
 module.exports = {
     start: function(successCallback, errorCallback) {
         var batterySuccessCallback = function(power) {
@@ -42,3 +44,5 @@ module.exports = {
         batteryListenerId = null;
     }
 };
+
+console.log("TIZEN BATTERY END");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/Camera.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Camera.js b/lib/tizen/plugin/tizen/Camera.js
index f88b6fc..1449f7b 100644
--- a/lib/tizen/plugin/tizen/Camera.js
+++ b/lib/tizen/plugin/tizen/Camera.js
@@ -22,6 +22,9 @@
 /*global tizen:false */
 var Camera = require('cordova/plugin/CameraConstants');
 
+
+console.log("TIZEN CAMERA START");
+
 function cameraMakeReplyCallback(successCallback, errorCallback) {
     return {
         onsuccess: function(reply) {
@@ -101,3 +104,5 @@ module.exports = {
             );
         }
 };
+
+console.log("TIZEN CAMERA END");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/Compass.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Compass.js b/lib/tizen/plugin/tizen/Compass.js
index b7fd029..105c6d7 100644
--- a/lib/tizen/plugin/tizen/Compass.js
+++ b/lib/tizen/plugin/tizen/Compass.js
@@ -20,11 +20,13 @@
 */
 
 var CompassError = require('cordova/plugin/CompassError'),
-    CompassHeading = require('cordova/plugin/CompassHeadings');
+    CompassHeading = require('cordova/plugin/CompassHeading');
 
 var compassCallback = null,
     compassReady = false;
 
+console.log("TIZEN COMPASS START");
+
 module.exports = {
     getHeading: function(successCallback, errorCallback) {
 
@@ -47,3 +49,6 @@ module.exports = {
         }
     }
 };
+
+console.log("TIZEN COMPASS END");
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/Contact.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Contact.js b/lib/tizen/plugin/tizen/Contact.js
index 466cc1a..0aebb2b 100644
--- a/lib/tizen/plugin/tizen/Contact.js
+++ b/lib/tizen/plugin/tizen/Contact.js
@@ -20,14 +20,22 @@
 */
 
 /*global tizen:false */
+//var ContactError = require('cordova/plugin/ContactError'),
+//    ContactUtils = require('cordova/plugin/tizen/ContactUtils');
+
+// ------------------
+// Utility functions
+// ------------------
+
+
+console.log("TIZEN CONTACT START");
+
+
 var ContactError = require('cordova/plugin/ContactError'),
     ContactUtils = require('cordova/plugin/tizen/ContactUtils'),
     utils = require('cordova/utils'),
     exec = require('cordova/exec');
 
-// ------------------
-// Utility functions
-// ------------------
 
 
 /**
@@ -535,3 +543,5 @@ module.exports = {
         }
     }
 };
+
+console.log("TIZEN CONTACT END");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/ContactUtils.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/ContactUtils.js b/lib/tizen/plugin/tizen/ContactUtils.js
index 7283998..042dc80 100644
--- a/lib/tizen/plugin/tizen/ContactUtils.js
+++ b/lib/tizen/plugin/tizen/ContactUtils.js
@@ -20,12 +20,14 @@
 */
 
 /*global tizen:false */
-var ContactAddress = require('cordova/plugin/ContactAddress'),
+var Contact = require('cordova/plugin/Contact'),
+    ContactAddress = require('cordova/plugin/ContactAddress'),
     ContactName = require('cordova/plugin/ContactName'),
     ContactField = require('cordova/plugin/ContactField'),
     ContactOrganization = require('cordova/plugin/ContactOrganization'),
-    utils = require('cordova/utils'),
-    Contact = require('cordova/plugin/Contact');
+    utils = require('cordova/utils');
+
+
 
 /**
  * Mappings for each Contact field that may be used in a find operation. Maps

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/Device.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Device.js b/lib/tizen/plugin/tizen/Device.js
index ae63d38..15be7fe 100644
--- a/lib/tizen/plugin/tizen/Device.js
+++ b/lib/tizen/plugin/tizen/Device.js
@@ -22,6 +22,9 @@
 /*global tizen:false */
 var channel = require('cordova/channel');
 
+console.log("TIZEN DEVICE START");
+
+
 // Tell cordova channel to wait on the CordovaInfoReady event
 //channel.waitForInitialization('onCordovaInfoReady');
 
@@ -45,7 +48,8 @@ Device.prototype.getDeviceInfo = function() {
         this.version = deviceCapabilities.platformVersion;
         this.uuid = deviceCapabilities.duid;
         this.model = deviceCapabilities.platformName;
-    
+        this.name = this.model;
+
         channel.onCordovaInfoReady.fire();
      }
      else {
@@ -55,4 +59,6 @@ Device.prototype.getDeviceInfo = function() {
 
 module.exports = new Device();
 
+console.log("TIZEN DEVICE END");
+
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/File.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/File.js b/lib/tizen/plugin/tizen/File.js
index 645bb79..3de7335 100644
--- a/lib/tizen/plugin/tizen/File.js
+++ b/lib/tizen/plugin/tizen/File.js
@@ -19,6 +19,9 @@
  *
 */
 
+
+console.log("TIZEN FILE START");
+
 /*global WebKitBlobBuilder:false */
 var FileError = require('cordova/plugin/FileError'),
     DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
@@ -44,332 +47,564 @@ function makeEntry(entry) {
 }
 
 module.exports = {
-    /* requestFileSystem */
+    /* common/equestFileSystem.js, args = [type, size] */
     requestFileSystem: function(successCallback, errorCallback, args) {
         var type = args[0],
             size = args[1];
 
-        nativeRequestFileSystem(type, size, function(nativeFs) {
-            successCallback(new FileSystem(getFileSystemName(nativeFs), makeEntry(nativeFs.root)));
-        }, function(error) {
-            errorCallback(error.code);
-        });
+        nativeRequestFileSystem(
+            type,
+            size,
+            function(nativeFs) {
+                successCallback(new FileSystem(getFileSystemName(nativeFs), makeEntry(nativeFs.root)));
+            },
+            function(error) {
+                errorCallback(error.code);
+            }
+        );
     },
 
-    /* resolveLocalFileSystemURI */
+    /* common/resolveLocalFileSystemURI.js, args= [uri] */
     resolveLocalFileSystemURI: function(successCallback, errorCallback, args) {
         var uri = args[0];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            successCallback(makeEntry(entry));
-        }, function(error) {
-            errorCallback(error.code);
-        });
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                successCallback(makeEntry(entry));
+            },
+            function(error) {
+                errorCallback(error.code);
+            }
+        );
     },
 
-    /* DirectoryReader */
+    /* common/DirectoryReader.js, args = [this.path] */
     readEntries: function(successCallback, errorCallback, args) {
         var uri = args[0];
 
-        nativeResolveLocalFileSystemURI(uri, function(dirEntry) {
-            var reader = dirEntry.createReader();
-            reader.readEntries(function(entries) {
-                var retVal = [];
-                for (var i = 0; i < entries.length; i++) {
-                    retVal.push(makeEntry(entries[i]));
-                }
-                successCallback(retVal);
-            }, function(error) {
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(dirEntry) {
+                var reader = dirEntry.createReader();
+
+                reader.readEntries(
+                    function(entries) {
+                        var retVal = [];
+                        for (var i = 0; i < entries.length; i++) {
+                            retVal.push(makeEntry(entries[i]));
+                        }
+                        successCallback(retVal);
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     },
 
-    /* Entry */
+    /* common/Entry.js , args = [this.fullPath] */
     getMetadata: function(successCallback, errorCallback, args) {
         var uri = args[0];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            entry.getMetadata(function(metaData) {
-                successCallback(metaData.modificationTime);
-            }, function(error) {
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                entry.getMetadata(
+                    function(metaData) {
+                        successCallback(metaData.modificationTime);
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
+    },
+
+    /* args = [this.fullPath, metadataObject] */
+    /* PPL to be implemented */
+    setMetadata: function(successCallback, errorCallback, args) {
+        var uri = args[0],
+            metadata = args[1];
+
+        if (errorCallback) {
+            errorCallback(FileError.NOT_FOUND_ERR);
+        }
     },
 
+
+    /* args = [srcPath, parent.fullPath, name] */
     moveTo: function(successCallback, errorCallback, args) {
         var srcUri = args[0],
             parentUri = args[1],
             name = args[2];
 
-        nativeResolveLocalFileSystemURI(srcUri, function(source) {
-            nativeResolveLocalFileSystemURI(parentUri, function(parent) {
-                source.moveTo(parent, name, function(entry) {
-                    successCallback(makeEntry(entry));
-                }, function(error) {
-                    errorCallback(error.code);
-                });
-            }, function(error) {
+        nativeResolveLocalFileSystemURI(
+            srcUri,
+            function(source) {
+                nativeResolveLocalFileSystemURI(
+                    parentUri,
+                    function(parent) {
+                        source.moveTo(
+                            parent,
+                            name,
+                            function(entry) {
+                                successCallback(makeEntry(entry));
+                            },
+                            function(error) {
+                                errorCallback(error.code);
+                        }
+                        );
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     },
 
+    /* args = [srcPath, parent.fullPath, name] */
     copyTo: function(successCallback, errorCallback, args) {
         var srcUri = args[0],
             parentUri = args[1],
             name = args[2];
 
-        nativeResolveLocalFileSystemURI(srcUri, function(source) {
-            nativeResolveLocalFileSystemURI(parentUri, function(parent) {
-                source.copyTo(parent, name, function(entry) {
-                    successCallback(makeEntry(entry));
-                }, function(error) {
-                    errorCallback(error.code);
-                });
-            }, function(error) {
+        nativeResolveLocalFileSystemURI(
+            srcUri,
+            function(source) {
+                nativeResolveLocalFileSystemURI(
+                    parentUri,
+                    function(parent) {
+                        source.copyTo(
+                            parent,
+                            name,
+                            function(entry) {
+                                successCallback(makeEntry(entry));
+                            },
+                            function(error) {
+                                errorCallback(error.code);
+                            }
+                        );
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     },
 
+
+    /* args = [this.fullPath] */
     remove: function(successCallback, errorCallback, args) {
         var uri = args[0];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            if (entry.fullPath === "/") {
-                errorCallback(FileError.NO_MODIFICATION_ALLOWED_ERR);
-            } else {
-                entry.remove(successCallback, function(error) {
-                    errorCallback(error.code);
-                });
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                if (entry.fullPath === "/") {
+                    errorCallback(FileError.NO_MODIFICATION_ALLOWED_ERR);
+                }
+                else {
+                    entry.remove(
+                        successCallback,
+                        function(error) {
+                            errorCallback(error.code);
+                        }
+                    );
+                }
+            },
+            function(error) {
+                errorCallback(error.code);
             }
-        }, function(error) {
-            errorCallback(error.code);
-        });
+        );
     },
 
+    /* args = [this.fullPath] */
     getParent: function(successCallback, errorCallback, args) {
         var uri = args[0];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            entry.getParent(function(entry) {
-                successCallback(makeEntry(entry));
-            }, function(error) {
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                entry.getParent(
+                    function(entry) {
+                        successCallback(makeEntry(entry));
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     },
 
-    /* FileEntry */
+    /* common/FileEntry.js, args = [this.fullPath] */
     getFileMetadata: function(successCallback, errorCallback, args) {
         var uri = args[0];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            entry.file(function(file) {
-                var retVal = new File(file.name, decodeURI(entry.toURL()), file.type, file.lastModifiedDate, file.size);
-                successCallback(retVal);
-            }, function(error) {
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                entry.file(
+                    function(file) {
+                        var retVal = new File(file.name, decodeURI(entry.toURL()), file.type, file.lastModifiedDate, file.size);
+                        successCallback(retVal);
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     },
 
-    /* DirectoryEntry */
+    /* common/DirectoryEntry.js , args = [this.fullPath, path, options] */
     getDirectory: function(successCallback, errorCallback, args) {
         var uri = args[0],
             path = args[1],
             options = args[2];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            entry.getDirectory(path, options, function(entry) {
-                successCallback(makeEntry(entry));
-            }, function(error) {
-                if (error.code === FileError.INVALID_MODIFICATION_ERR) {
-                    if (options.create) {
-                        errorCallback(FileError.PATH_EXISTS_ERR);
-                    } else {
-                        errorCallback(FileError.ENCODING_ERR);
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                entry.getDirectory(
+                    path,
+                    options,
+                    function(entry) {
+                        successCallback(makeEntry(entry));
+                    },
+                    function(error) {
+                        if (error.code === FileError.INVALID_MODIFICATION_ERR) {
+                            if (options.create) {
+                                errorCallback(FileError.PATH_EXISTS_ERR);
+                            }
+                            else {
+                                errorCallback(FileError.ENCODING_ERR);
+                            }
+                        }
+                        else {
+                            errorCallback(error.code);
+                        }
                     }
-                } else {
-                    errorCallback(error.code);
-                }
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+                );
+            },
+            function(error) {
+                errorCallback(error.code);
+            }
+        );
     },
 
+    /* args = [this.fullPath] */
     removeRecursively: function(successCallback, errorCallback, args) {
         var uri = args[0];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            if (entry.fullPath === "/") {
-                errorCallback(FileError.NO_MODIFICATION_ALLOWED_ERR);
-            } else {
-                entry.removeRecursively(successCallback, function(error) {
-                    errorCallback(error.code);
-                });
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                if (entry.fullPath === "/") {
+                    errorCallback(FileError.NO_MODIFICATION_ALLOWED_ERR);
+                }
+                else {
+                    entry.removeRecursively(
+                        successCallback,
+                        function(error) {
+                            errorCallback(error.code);
+                        }
+                    );
+                }
+            },
+            function(error) {
+                errorCallback(error.code);
             }
-        }, function(error) {
-            errorCallback(error.code);
-        });
+        );
     },
 
+    /* args = [this.fullPath, path, options] */
     getFile: function(successCallback, errorCallback, args) {
         var uri = args[0],
             path = args[1],
             options = args[2];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            entry.getFile(path, options, function(entry) {
-                successCallback(makeEntry(entry));
-            }, function(error) {
-                if (error.code === FileError.INVALID_MODIFICATION_ERR) {
-                    if (options.create) {
-                        errorCallback(FileError.PATH_EXISTS_ERR);
-                    } else {
-                        errorCallback(FileError.ENCODING_ERR);
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                entry.getFile(
+                    path,
+                    options,
+                    function(entry) {
+                        successCallback(makeEntry(entry));
+                    },
+                    function(error) {
+                        if (error.code === FileError.INVALID_MODIFICATION_ERR) {
+                            if (options.create) {
+                                errorCallback(FileError.PATH_EXISTS_ERR);
+                            }
+                            else {
+                                errorCallback(FileError.ENCODING_ERR);
+                            }
+                        }
+                        else {
+                            errorCallback(error.code);
+                        }
                     }
-                } else {
-                    errorCallback(error.code);
-                }
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+                );
+            },
+            function(error) {
+                errorCallback(error.code);
+            }
+        );
     },
 
-    /* FileReader */
+    /* common/FileReader.js, args = execArgs = [filepath, encoding, file.start, file.end] */
     readAsText: function(successCallback, errorCallback, args) {
         var uri = args[0],
             encoding = args[1];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            var onLoadEnd = function(evt) {
-                    if (!evt.target.error) {
-                        successCallback(evt.target.result);
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                var onLoadEnd = function(evt) {
+                        if (!evt.target.error) {
+                            successCallback(evt.target.result);
+                        }
+                    },
+                    onError = function(evt) {
+                        errorCallback(evt.target.error.code);
+                    };
+
+                var reader = new NativeFileReader();
+
+                reader.onloadend = onLoadEnd;
+                reader.onerror = onError;
+
+                entry.file(
+                    function(file) {
+                        reader.readAsText(file, encoding);
+                    },
+                    function(error) {
+                        errorCallback(error.code);
                     }
+                );
             },
-                onError = function(evt) {
-                    errorCallback(evt.target.error.code);
-            };
+            function(error) {
+                errorCallback(error.code);
+            }
+        );
+    },
 
-            var reader = new NativeFileReader();
+    /* args = execArgs = [this._fileName, file.start, file.end] */
+    readAsDataURL: function(successCallback, errorCallback, args) {
+        var uri = args[0];
 
-            reader.onloadend = onLoadEnd;
-            reader.onerror = onError;
-            entry.file(function(file) {
-                reader.readAsText(file, encoding);
-            }, function(error) {
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                var onLoadEnd = function(evt) {
+                        if (!evt.target.error) {
+                            successCallback(evt.target.result);
+                        }
+                    },
+                    onError = function(evt) {
+                        errorCallback(evt.target.error.code);
+                    };
+
+                var reader = new NativeFileReader();
+
+                reader.onloadend = onLoadEnd;
+                reader.onerror = onError;
+                entry.file(
+                    function(file) {
+                        reader.readAsDataURL(file);
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     },
 
-    readAsDataURL: function(successCallback, errorCallback, args) {
+    /* args = execArgs =  [this._fileName, file.start, file.end] */
+    /* PPL, to Be implemented , for now it is pasted from readAsText...*/
+    readAsBinaryString: function(successCallback, errorCallback, args) {
         var uri = args[0];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            var onLoadEnd = function(evt) {
-                    if (!evt.target.error) {
-                        successCallback(evt.target.result);
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                var onLoadEnd = function(evt) {
+                        if (!evt.target.error) {
+                            successCallback(evt.target.result);
+                        }
+                    },
+                    onError = function(evt) {
+                        errorCallback(evt.target.error.code);
+                    };
+
+                var reader = new NativeFileReader();
+
+                reader.onloadend = onLoadEnd;
+                reader.onerror = onError;
+
+                entry.file(
+                    function(file) {
+                        reader.readAsDataURL(file);
+                    },
+                    function(error) {
+                        errorCallback(error.code);
                     }
+                );
             },
-                onError = function(evt) {
-                    errorCallback(evt.target.error.code);
-            };
+            function(error) {
+                errorCallback(error.code);
+            }
+        );
+    },
+
+
+    /* args = execArgs =  [this._fileName, file.start, file.end] */
+    /* PPL, to Be implemented , for now it is pasted from readAsText...*/
+    readAsArrayBuffer: function(successCallback, errorCallback, args) {
+        var uri = args[0];
 
-            var reader = new NativeFileReader();
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                var onLoadEnd = function(evt) {
+                        if (!evt.target.error) {
+                        successCallback(evt.target.result);
+                        }
+                    },
+                    onError = function(evt) {
+                        errorCallback(evt.target.error.code);
+                    };
+
+                var reader = new NativeFileReader();
 
-            reader.onloadend = onLoadEnd;
-            reader.onerror = onError;
-            entry.file(function(file) {
-                reader.readAsDataURL(file);
-            }, function(error) {
+                reader.onloadend = onLoadEnd;
+                reader.onerror = onError;
+
+                entry.file(
+                    function(file) {
+                        reader.readAsDataURL(file);
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     },
 
-    /* FileWriter */
+    /* common/FileWriter.js, args = [this.fileName, text, this.position] */
     write: function(successCallback, errorCallback, args) {
         var uri = args[0],
             text = args[1],
             position = args[2];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            var onWriteEnd = function(evt) {
-                    if(!evt.target.error) {
-                        successCallback(evt.target.position - position);
-                    } else {
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                var onWriteEnd = function(evt) {
+                        if(!evt.target.error) {
+                            successCallback(evt.target.position - position);
+                        }
+                        else {
+                            errorCallback(evt.target.error.code);
+                        }
+                    },
+                    onError = function(evt) {
                         errorCallback(evt.target.error.code);
-                    }
-            },
-                onError = function(evt) {
-                    errorCallback(evt.target.error.code);
-            };
+                    };
 
-            entry.createWriter(function(writer) {
-                var blob = new WebKitBlobBuilder();
-                blob.append(text);
+                entry.createWriter(
+                    function(writer) {
+                        var blob = new WebKitBlobBuilder();
+                        blob.append(text);
 
-                writer.onwriteend = onWriteEnd;
-                writer.onerror = onError;
+                        writer.onwriteend = onWriteEnd;
+                        writer.onerror = onError;
 
-                writer.seek(position);
-                writer.write(blob.getBlob('text/plain'));
-            }, function(error) {
+                        writer.seek(position);
+                        writer.write(blob.getBlob('text/plain'));
+                    },
+                    function(error) {
+                        errorCallback(error.code);
+                    }
+                );
+            },
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     },
 
+    /* args = [this.fileName, size] */
     truncate: function(successCallback, errorCallback, args) {
         var uri = args[0],
             size = args[1];
 
-        nativeResolveLocalFileSystemURI(uri, function(entry) {
-            var onWriteEnd = function(evt) {
-                    if(!evt.target.error) {
-                        successCallback(evt.target.length);
-                    } else {
+        nativeResolveLocalFileSystemURI(
+            uri,
+            function(entry) {
+                var onWriteEnd = function(evt) {
+                        if(!evt.target.error) {
+                            successCallback(evt.target.length);
+                        }
+                        else {
+                            errorCallback(evt.target.error.code);
+                        }
+                    },
+                    onError = function(evt) {
                         errorCallback(evt.target.error.code);
+                    };
+
+                entry.createWriter(
+                    function(writer) {
+                        writer.onwriteend = onWriteEnd;
+                        writer.onerror = onError;
+                        writer.truncate(size);
+                    },
+                    function(error) {
+                        errorCallback(error.code);
                     }
+                );
             },
-                onError = function(evt) {
-                    errorCallback(evt.target.error.code);
-            };
-
-            entry.createWriter(function(writer) {
-                writer.onwriteend = onWriteEnd;
-                writer.onerror = onError;
-
-                writer.truncate(size);
-            }, function(error) {
+            function(error) {
                 errorCallback(error.code);
-            });
-        }, function(error) {
-            errorCallback(error.code);
-        });
+            }
+        );
     }
 };
+
+
+console.log("TIZEN FILE END");
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/FileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/FileTransfer.js b/lib/tizen/plugin/tizen/FileTransfer.js
index 6dda07c..c8d885c 100644
--- a/lib/tizen/plugin/tizen/FileTransfer.js
+++ b/lib/tizen/plugin/tizen/FileTransfer.js
@@ -20,6 +20,10 @@
 */
 
 /*global WebKitBlobBuilder:false */
+
+
+console.log("TIZEN FILE TRANSFER START");
+
 var FileEntry = require('cordova/plugin/FileEntry'),
     FileTransferError = require('cordova/plugin/FileTransferError'),
     FileUploadResult = require('cordova/plugin/FileUploadResult');
@@ -37,6 +41,7 @@ function getFileName(filePath) {
 }
 
 module.exports = {
+    /* common/FileTransfer.js, args = [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id, httpMethod] */
     upload: function(successCallback, errorCallback, args) {
         var filePath = args[0],
             server = args[1],
@@ -47,66 +52,77 @@ module.exports = {
             /*trustAllHosts = args[6],*/
             chunkedMode = args[7];
 
-        nativeResolveLocalFileSystemURI(filePath, function(entry) {
-            entry.file(function(file) {
-                function uploadFile(blobFile) {
-                    var fd = new FormData();
-
-                    fd.append(fileKey, blobFile, fileName);
-                    for (var prop in params) {
-                        if(params.hasOwnProperty(prop)) {
-                            fd.append(prop, params[prop]);
-                        }
-                    }
-
-                    var xhr = new XMLHttpRequest();
-                    xhr.open("POST", server);
-                    xhr.onload = function(evt) {
-                        if (xhr.status == 200) {
-                            var result = new FileUploadResult();
-                            result.bytesSent = file.size;
-                            result.responseCode = xhr.status;
-                            result.response = xhr.response;
-                            successCallback(result);
-                        } else if (xhr.status == 404) {
-                            errorCallback(new FileTransferError(FileTransferError.INVALID_URL_ERR));
-                        } else {
-                            errorCallback(new FileTransferError(FileTransferError.CONNECTION_ERR));
+        nativeResolveLocalFileSystemURI(
+            filePath,
+            function(entry) {
+                entry.file(
+                    function(file) {
+                        function uploadFile(blobFile) {
+                            var fd = new FormData();
+
+                            fd.append(fileKey, blobFile, fileName);
+
+                            for (var prop in params) {
+                                if(params.hasOwnProperty(prop)) {
+                                    fd.append(prop, params[prop]);
+                                }
+                            }
+                            var xhr = new XMLHttpRequest();
+
+                            xhr.open("POST", server);
+
+                            xhr.onload = function(evt) {
+                                if (xhr.status == 200) {
+                                    var result = new FileUploadResult();
+                                    result.bytesSent = file.size;
+                                    result.responseCode = xhr.status;
+                                    result.response = xhr.response;
+                                    successCallback(result);
+                                }
+                                else if (xhr.status == 404) {
+                                    errorCallback(new FileTransferError(FileTransferError.INVALID_URL_ERR));
+                                }
+                                else {
+                                    errorCallback(new FileTransferError(FileTransferError.CONNECTION_ERR));
+                                }
+                            };
+
+                            xhr.ontimeout = function(evt) {
+                                errorCallback(new FileTransferError(FileTransferError.CONNECTION_ERR));
+                            };
+
+                            xhr.send(fd);
                         }
-                    };
-                    xhr.ontimeout = function(evt) {
-                        errorCallback(new FileTransferError(FileTransferError.CONNECTION_ERR));
-                    };
 
-                    xhr.send(fd);
-                }
+                        var bytesPerChunk;
 
-                var bytesPerChunk;
-                if (chunkedMode === true) {
-                    bytesPerChunk = 1024 * 1024; // 1MB chunk sizes.
-                } else {
-                    bytesPerChunk = file.size;
-                }
-                var start = 0;
-                var end = bytesPerChunk;
-                while (start < file.size) {
-                    var chunk = file.webkitSlice(start, end, mimeType);
-                    uploadFile(chunk);
-                    start = end;
-                    end = start + bytesPerChunk;
-                }
+                        if (chunkedMode === true) {
+                            bytesPerChunk = 1024 * 1024; // 1MB chunk sizes.
+                        }
+                        else {
+                            bytesPerChunk = file.size;
+                        }
+                        var start = 0;
+                        var end = bytesPerChunk;
+                        while (start < file.size) {
+                            var chunk = file.webkitSlice(start, end, mimeType);
+                            uploadFile(chunk);
+                            start = end;
+                            end = start + bytesPerChunk;
+                        }
+                    },
+                    function(error) {
+                        errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
+                    }
+                );
             },
             function(error) {
                 errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
             }
-            );
-        },
-        function(error) {
-            errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-        }
         );
     },
 
+    /* args = [source, target, trustAllHosts, this._id, headers] */
     download: function(successCallback, errorCallback, args) {
         var url = args[0],
             filePath = args[1];
@@ -114,42 +130,56 @@ module.exports = {
         var xhr = new XMLHttpRequest();
 
         function writeFile(fileEntry) {
-            fileEntry.createWriter(function(writer) {
-                writer.onwriteend = function(evt) {
-                    if (!evt.target.error) {
-                        successCallback(new FileEntry(fileEntry.name, fileEntry.toURL()));
-                    } else {
+            fileEntry.createWriter(
+                function(writer) {
+                    writer.onwriteend = function(evt) {
+                        if (!evt.target.error) {
+                            successCallback(new FileEntry(fileEntry.name, fileEntry.toURL()));
+                        } else {
+                            errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
+                        }
+                    };
+
+                    writer.onerror = function(evt) {
                         errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                    }
-                };
+                    };
 
-                writer.onerror = function(evt) {
-                    errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                };
+                    var builder = new WebKitBlobBuilder();
+                    builder.append(xhr.response);
 
-                var builder = new WebKitBlobBuilder();
-                builder.append(xhr.response);
-                var blob = builder.getBlob();
-                writer.write(blob);
-            },
-            function(error) {
-                errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-            });
+                    var blob = builder.getBlob();
+                    writer.write(blob);
+                },
+                function(error) {
+                    errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
+                }
+            );
         }
 
         xhr.onreadystatechange = function () {
             if (xhr.readyState == xhr.DONE) {
                 if (xhr.status == 200 && xhr.response) {
-                    nativeResolveLocalFileSystemURI(getParentPath(filePath), function(dir) {
-                        dir.getFile(getFileName(filePath), {create: true}, writeFile, function(error) {
+                    nativeResolveLocalFileSystemURI(
+                        getParentPath(filePath),
+                        function(dir) {
+                            dir.getFile(
+                                getFileName(filePath),
+                                {create: true},
+                                writeFile,
+                                function(error) {
+                                    errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
+                                }
+                            );
+                        },
+                        function(error) {
                             errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                        });
-                    }, function(error) {
-                        errorCallback(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
-                    });
-                } else if (xhr.status == 404) {
+                        }
+                    );
+                }
+                else if (xhr.status == 404) {
                     errorCallback(new FileTransferError(FileTransferError.INVALID_URL_ERR));
-                } else {
+                }
+                else {
                     errorCallback(new FileTransferError(FileTransferError.CONNECTION_ERR));
                 }
             }
@@ -158,5 +188,16 @@ module.exports = {
         xhr.open("GET", url, true);
         xhr.responseType = "arraybuffer";
         xhr.send();
+    },
+
+
+    /* args = [this._id]); */
+    abort: function(successCallback, errorCallback, args) {
+        errorCallback(FileTransferError.ABORT_ERR);
     }
+
 };
+
+
+console.log("TIZEN FILE TRANSFER END");
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/Media.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Media.js b/lib/tizen/plugin/tizen/Media.js
index 68f5b05..8502f42 100644
--- a/lib/tizen/plugin/tizen/Media.js
+++ b/lib/tizen/plugin/tizen/Media.js
@@ -23,55 +23,87 @@
 var MediaError = require('cordova/plugin/MediaError'),
     audioObjects = {};
 
+console.log("TIZEN MEDIA START");
+
 module.exports = {
+
+
     create: function (successCallback, errorCallback, args) {
         var id = args[0], src = args[1];
+
         console.log("media::create() - id =" + id + ", src =" + src);
+
         audioObjects[id] = new Audio(src);
+
         audioObjects[id].onStalledCB = function () {
             console.log("media::onStalled()");
-             audioObjects[id].timer = window.setTimeout(function () {
-                    audioObjects[id].pause();
-                    if (audioObjects[id].currentTime !== 0)
-                        audioObjects[id].currentTime = 0;
-                    console.log("media::onStalled() - MEDIA_ERROR -> " + MediaError.MEDIA_ERR_ABORTED);
-                    var err = new MediaError(MediaError.MEDIA_ERR_ABORTED, "Stalled");
-                    Media.onStatus(id, Media.MEDIA_ERROR, err);
-                }, 2000);
+
+            audioObjects[id].timer = window.setTimeout(
+                    function () {
+                        audioObjects[id].pause();
+
+                        if (audioObjects[id].currentTime !== 0)
+                            audioObjects[id].currentTime = 0;
+
+                        console.log("media::onStalled() - MEDIA_ERROR -> " + MediaError.MEDIA_ERR_ABORTED);
+
+                        var err = new MediaError(MediaError.MEDIA_ERR_ABORTED, "Stalled");
+
+                        Media.onStatus(id, Media.MEDIA_ERROR, err);
+                    },
+                    2000);
         };
+
         audioObjects[id].onEndedCB = function () {
             console.log("media::onEndedCB() - MEDIA_STATE -> MEDIA_STOPPED");
+
             Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STOPPED);
         };
+
         audioObjects[id].onErrorCB = function () {
             console.log("media::onErrorCB() - MEDIA_ERROR -> " + event.srcElement.error);
+
             Media.onStatus(id, Media.MEDIA_ERROR, event.srcElement.error);
         };
+
         audioObjects[id].onPlayCB = function () {
             console.log("media::onPlayCB() - MEDIA_STATE -> MEDIA_STARTING");
+
             Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STARTING);
         };
+
         audioObjects[id].onPlayingCB = function () {
             console.log("media::onPlayingCB() - MEDIA_STATE -> MEDIA_RUNNING");
+
             Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_RUNNING);
         };
+
         audioObjects[id].onDurationChangeCB = function () {
             console.log("media::onDurationChangeCB() - MEDIA_DURATION -> " +  audioObjects[id].duration);
+
             Media.onStatus(id, Media.MEDIA_DURATION, audioObjects[id].duration);
         };
+
         audioObjects[id].onTimeUpdateCB = function () {
             console.log("media::onTimeUpdateCB() - MEDIA_POSITION -> " +  audioObjects[id].currentTime);
+
             Media.onStatus(id, Media.MEDIA_POSITION, audioObjects[id].currentTime);
         };
+
         audioObjects[id].onCanPlayCB = function () {
             console.log("media::onCanPlayCB()");
+
             window.clearTimeout(audioObjects[id].timer);
+
             audioObjects[id].play();
         };
       },
+
     startPlayingAudio: function (successCallback, errorCallback, args) {
         var id = args[0], src = args[1], options = args[2];
+
         console.log("media::startPlayingAudio() - id =" + id + ", src =" + src + ", options =" + options);
+
         audioObjects[id].addEventListener('canplay', audioObjects[id].onCanPlayCB);
         audioObjects[id].addEventListener('ended', audioObjects[id].onEndedCB);
         audioObjects[id].addEventListener('timeupdate', audioObjects[id].onTimeUpdateCB);
@@ -80,16 +112,24 @@ module.exports = {
         audioObjects[id].addEventListener('play', audioObjects[id].onPlayCB);
         audioObjects[id].addEventListener('error', audioObjects[id].onErrorCB);
         audioObjects[id].addEventListener('stalled', audioObjects[id].onStalledCB);
+
         audioObjects[id].play();
     },
+
     stopPlayingAudio: function (successCallback, errorCallback, args) {
         var id = args[0];
+
         window.clearTimeout(audioObjects[id].timer);
+
         audioObjects[id].pause();
+
         if (audioObjects[id].currentTime !== 0)
             audioObjects[id].currentTime = 0;
+
         console.log("media::stopPlayingAudio() - MEDIA_STATE -> MEDIA_STOPPED");
+
         Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STOPPED);
+
         audioObjects[id].removeEventListener('canplay', audioObjects[id].onCanPlayCB);
         audioObjects[id].removeEventListener('ended', audioObjects[id].onEndedCB);
         audioObjects[id].removeEventListener('timeupdate', audioObjects[id].onTimeUpdateCB);
@@ -99,35 +139,50 @@ module.exports = {
         audioObjects[id].removeEventListener('error', audioObjects[id].onErrorCB);
         audioObjects[id].removeEventListener('error', audioObjects[id].onStalledCB);
     },
+
     seekToAudio: function (successCallback, errorCallback, args) {
+
         var id = args[0], milliseconds = args[1];
+
         console.log("media::seekToAudio()");
-         audioObjects[id].currentTime = milliseconds;
+
+        audioObjects[id].currentTime = milliseconds;
         successCallback( audioObjects[id].currentTime);
     },
+
     pausePlayingAudio: function (successCallback, errorCallback, args) {
         var id = args[0];
+
         console.log("media::pausePlayingAudio() - MEDIA_STATE -> MEDIA_PAUSED");
+
         audioObjects[id].pause();
+
         Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_PAUSED);
     },
+
     getCurrentPositionAudio: function (successCallback, errorCallback, args) {
         var id = args[0];
         console.log("media::getCurrentPositionAudio()");
         successCallback(audioObjects[id].currentTime);
     },
+
     release: function (successCallback, errorCallback, args) {
         var id = args[0];
         window.clearTimeout(audioObjects[id].timer);
         console.log("media::release()");
     },
+
     setVolume: function (successCallback, errorCallback, args) {
         var id = args[0], volume = args[1];
+
         console.log("media::setVolume()");
+
         audioObjects[id].volume = volume;
     },
+
     startRecordingAudio: function (successCallback, errorCallback, args) {
         var id = args[0], src = args[1];
+
         console.log("media::startRecordingAudio() - id =" + id + ", src =" + src);
 
         function gotStreamCB(stream) {
@@ -147,10 +202,16 @@ module.exports = {
         }
         successCallback();
     },
+
     stopRecordingAudio: function (successCallback, errorCallback, args) {
         var id = args[0];
+
         console.log("media::stopRecordingAudio() - id =" + id);
+
         audioObjects[id].pause();
         successCallback();
     }
 };
+
+console.log("TIZEN MEDIA END");
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/NetworkStatus.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/NetworkStatus.js b/lib/tizen/plugin/tizen/NetworkStatus.js
index d2d0d93..b51832b 100644
--- a/lib/tizen/plugin/tizen/NetworkStatus.js
+++ b/lib/tizen/plugin/tizen/NetworkStatus.js
@@ -22,6 +22,8 @@
 /*global tizen:false */
 var Connection = require('cordova/plugin/Connection');
 
+console.log("TIZEN CONNECTION AKA NETWORK STATUS START");
+
 module.exports = {
     getConnectionInfo: function (successCallback, errorCallback) {
 
@@ -62,13 +64,16 @@ module.exports = {
             connectionCB();
         }
 
+        deviceCapabilities = tizen.systeminfo.getCapabilities();
+
 
-        if (tizen.systeminfo.isSupported("WIFI_NETWORK")) {
+        if (deviceCapabilities.wifi) {
             tizen.systeminfo.getPropertyValue("WIFI_NETWORK", wifiSuccessCB, errorCB);
         }
 
-        if (tizen.systeminfo.isSupported("CELLULAR_NETWORK")) {
-            tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", cellularSuccessCB, errorCB);
-        }
+        tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", cellularSuccessCB, errorCB);
+
     }
 };
+
+console.log("TIZEN CONNECTION AKA NETWORK STATUS END");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8bcf44f3/lib/tizen/plugin/tizen/Notification.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Notification.js b/lib/tizen/plugin/tizen/Notification.js
index 6c34b0c..4f6ca22 100644
--- a/lib/tizen/plugin/tizen/Notification.js
+++ b/lib/tizen/plugin/tizen/Notification.js
@@ -24,6 +24,10 @@ var SoundBeat = require('cordova/plugin/tizen/SoundBeat');
 /* TODO: get resource path from app environment? */
 var soundBeat = new SoundBeat(["./sounds/beep.wav"]);
 
+
+console.log("TIZEN NOTIFICATION START");
+
+
 module.exports = {
 
     alert: function(message, alertCallback, title, buttonName) {
@@ -160,4 +164,5 @@ module.exports = {
     }
 };
 
+console.log("TIZEN NOTIFICATION END");
 


Mime
View raw message