cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [4/45] js commit: added commandProxy registration, cordova.name is pulled from hostName
Date Sat, 06 Oct 2012 09:19:20 GMT
added commandProxy registration, cordova.name is pulled from hostName


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

Branch: refs/heads/master
Commit: 023fcbab01f9ded2110a61147c8090fe94e6f156
Parents: 8ff53d5
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Fri Oct 5 23:56:54 2012 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Fri Oct 5 23:56:54 2012 -0700

----------------------------------------------------------------------
 lib/windows8/plugin/windows8/CameraProxy.js  |    2 ++
 lib/windows8/plugin/windows8/CaptureProxy.js |    2 ++
 lib/windows8/plugin/windows8/CompassProxy.js |    2 ++
 lib/windows8/plugin/windows8/DeviceProxy.js  |   15 ++++++++++++++-
 4 files changed, 20 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/023fcbab/lib/windows8/plugin/windows8/CameraProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/CameraProxy.js b/lib/windows8/plugin/windows8/CameraProxy.js
index 43dd2ee..c47b966 100644
--- a/lib/windows8/plugin/windows8/CameraProxy.js
+++ b/lib/windows8/plugin/windows8/CameraProxy.js
@@ -343,3 +343,5 @@ module.exports = {
         }
     }
 };
+
+require("cordova/commandProxy").add("Camera",module.exports);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/023fcbab/lib/windows8/plugin/windows8/CaptureProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/CaptureProxy.js b/lib/windows8/plugin/windows8/CaptureProxy.js
index 31df964..cdec66e 100644
--- a/lib/windows8/plugin/windows8/CaptureProxy.js
+++ b/lib/windows8/plugin/windows8/CaptureProxy.js
@@ -159,3 +159,5 @@ module.exports = {
         );
     }
 };
+
+require("cordova/commandProxy").add("Capture",module.exports);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/023fcbab/lib/windows8/plugin/windows8/CompassProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/CompassProxy.js b/lib/windows8/plugin/windows8/CompassProxy.js
index 9d9f1c2..5deada0 100644
--- a/lib/windows8/plugin/windows8/CompassProxy.js
+++ b/lib/windows8/plugin/windows8/CompassProxy.js
@@ -61,3 +61,5 @@ module.exports = {
 
     }
 };
+
+require("cordova/commandProxy").add("Compass",module.exports);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/023fcbab/lib/windows8/plugin/windows8/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/DeviceProxy.js b/lib/windows8/plugin/windows8/DeviceProxy.js
index fb2926e..9fe895b 100644
--- a/lib/windows8/plugin/windows8/DeviceProxy.js
+++ b/lib/windows8/plugin/windows8/DeviceProxy.js
@@ -26,8 +26,21 @@ module.exports = {
 
         getDeviceInfo:function(win,fail,args){
             console.log("NativeProxy::getDeviceInfo");
+
+            var hostNames = Windows.Networking.Connectivity.NetworkInformation.getHostNames();
+                
+            var name = "unknown";
+            hostNames.some(function (nm) {
+                if (nm.displayName.indexOf(".local") > -1) {
+                    name = nm.displayName.split(".local")[0];
+                    return true;
+                }
+            });
+
             setTimeout(function(){
-                win({platform:"windows8", version:"8", name:"TODO", uuid:"TODO", cordova:"2.0.1"});
+                win({platform:"windows8", version:"8", name:name, uuid:"TODO", cordova:"2.2.0"});
             },0);
         }
 };
+
+require("cordova/commandProxy").add("Device",module.exports);


Mime
View raw message