You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/07/30 02:30:51 UTC

[1/3] git commit: added basic Device support for Windows8

Updated Branches:
  refs/heads/master 3c5832d2c -> e49c7576e


added basic Device support for Windows8


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/61fa9c6f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/61fa9c6f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/61fa9c6f

Branch: refs/heads/master
Commit: 61fa9c6f83b283555487873032939ebbadb69f07
Parents: a89a7c7
Author: purplecabbage <pu...@gmail.com>
Authored: Fri Jul 26 12:00:22 2013 -0700
Committer: purplecabbage <pu...@gmail.com>
Committed: Fri Jul 26 12:00:22 2013 -0700

----------------------------------------------------------------------
 plugin.xml                  |  7 ++++++
 src/windows8/DeviceProxy.js | 54 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/61fa9c6f/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 5e9a7cb..f53799c 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -70,4 +70,11 @@
         <source-file src="src/wp/Device.cs" />
     </platform>
 
+    <!-- windows8 -->
+    <platform name="windows8">
+        <js-module src="src/windows8/DeviceProxy.js" name="DeviceProxy">
+        </js-module>
+        <!--<source-file src="src/windows8/DeviceProxy.js" target-dir="wtf" /> -->
+    </platform>
+
 </plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/61fa9c6f/src/windows8/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/src/windows8/DeviceProxy.js b/src/windows8/DeviceProxy.js
new file mode 100644
index 0000000..a0e1412
--- /dev/null
+++ b/src/windows8/DeviceProxy.js
@@ -0,0 +1,54 @@
+
+cordova.define("org.apache.cordova.core.device.DeviceProxy", function (require, exports, module) {
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+var cordova = require('cordova');
+var utils = require('cordova/utils');
+
+module.exports = {
+
+    getDeviceInfo:function(win,fail,args) {
+
+        // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId
+        var deviceId;
+
+        var localSettings = Windows.Storage.ApplicationData.current.localSettings;
+
+        if (localSettings.values.deviceId) {
+            deviceId = localSettings.values.deviceId;
+        }
+        else {
+            deviceId = localSettings.values.deviceId = utils.createUUID();
+        }
+
+        setTimeout(function () {
+            win({ platform: "windows8", version: "8", uuid: deviceId, cordova: '0.0.0', model: window.clientInformation.platform });
+        }, 0);
+    }
+
+};
+
+
+    require("cordova/commandProxy").add("Device", module.exports);
+
+});


[2/3] git commit: [Windows8] Windows8 is now supported

Posted by pu...@apache.org.
[Windows8] Windows8 is now supported


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/bb2128e4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/bb2128e4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/bb2128e4

Branch: refs/heads/master
Commit: bb2128e484fb7ade9a828e337ed4411f99432b12
Parents: 61fa9c6
Author: purplecabbage <pu...@gmail.com>
Authored: Mon Jul 29 17:27:44 2013 -0700
Committer: purplecabbage <pu...@gmail.com>
Committed: Mon Jul 29 17:27:44 2013 -0700

----------------------------------------------------------------------
 plugin.xml                  | 2 +-
 src/windows8/DeviceProxy.js | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/bb2128e4/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index f53799c..1cf4835 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -73,8 +73,8 @@
     <!-- windows8 -->
     <platform name="windows8">
         <js-module src="src/windows8/DeviceProxy.js" name="DeviceProxy">
+            <merges target="" />
         </js-module>
-        <!--<source-file src="src/windows8/DeviceProxy.js" target-dir="wtf" /> -->
     </platform>
 
 </plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/bb2128e4/src/windows8/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/src/windows8/DeviceProxy.js b/src/windows8/DeviceProxy.js
index a0e1412..bd57323 100644
--- a/src/windows8/DeviceProxy.js
+++ b/src/windows8/DeviceProxy.js
@@ -1,5 +1,3 @@
-
-cordova.define("org.apache.cordova.core.device.DeviceProxy", function (require, exports, module) {
 /*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -48,7 +46,5 @@ module.exports = {
 
 };
 
+require("cordova/commandProxy").add("Device", module.exports);
 
-    require("cordova/commandProxy").add("Device", module.exports);
-
-});


[3/3] git commit: Merge pull request #1 from purplecabbage/AddWindows8Support

Posted by pu...@apache.org.
Merge pull request #1 from purplecabbage/AddWindows8Support

Add windows8 support

Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/e49c7576
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/e49c7576
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/e49c7576

Branch: refs/heads/master
Commit: e49c7576e311717a77d908f1bb16b1691af5c7e8
Parents: 3c5832d bb2128e
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Jul 29 17:29:43 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Jul 29 17:29:43 2013 -0700

----------------------------------------------------------------------
 plugin.xml                  |  7 ++++++
 src/windows8/DeviceProxy.js | 50 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/e49c7576/plugin.xml
----------------------------------------------------------------------