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 2015/03/06 22:14:27 UTC

cordova-plugin-device git commit: remove defunct windows8 version

Repository: cordova-plugin-device
Updated Branches:
  refs/heads/master a58233693 -> 700ba9c5f


remove defunct windows8 version


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/700ba9c5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/700ba9c5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/700ba9c5

Branch: refs/heads/master
Commit: 700ba9c5f81aec126bed02e8223a025dff43e6bd
Parents: a582336
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Mar 6 13:14:20 2015 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Mar 6 13:14:20 2015 -0800

----------------------------------------------------------------------
 plugin.xml                  |  7 ----
 src/windows8/DeviceProxy.js | 82 ----------------------------------------
 2 files changed, 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/700ba9c5/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 160f4dc..120b66d 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -138,13 +138,6 @@
         <source-file src="src/wp/Device.cs" />
     </platform>
 
-    <!-- windows8 -->
-    <platform name="windows8">
-        <js-module src="src/windows8/DeviceProxy.js" name="DeviceProxy">
-            <merges target="" />
-        </js-module>
-    </platform>
-
     <!-- windows -->
     <platform name="windows">
         <js-module src="src/windows/DeviceProxy.js" name="DeviceProxy">

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/700ba9c5/src/windows8/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/src/windows8/DeviceProxy.js b/src/windows8/DeviceProxy.js
deleted file mode 100644
index 3ddc9b2..0000000
--- a/src/windows8/DeviceProxy.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *
- * 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 {
-    		// App-specific hardware id could be used as uuid, but it changes if the hardware changes...
-    		try {
-    			var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id;
-    			deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid();
-    		} catch (e) {
-    			// Couldn't get the hardware UUID
-    			deviceId = createUUID();
-    		}
-    		//...so cache it per-install
-    		localSettings.values.deviceId = deviceId;
-    	}
-    	
-    	var versionString = window.clientInformation.userAgent.match(/Windows NT ([0-9.]+)/)[1];
-    	
-    	(function(self){
-    		var ROOT_CONTAINER = "{00000000-0000-0000-FFFF-FFFFFFFFFFFF}";
-    		var DEVICE_CLASS_KEY = "{A45C254E-DF1C-4EFD-8020-67D146A850E0},10";
-    		var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10';
-    		var ROOT_CONTAINER_QUERY = "System.Devices.ContainerId:=\"" + ROOT_CONTAINER + "\"";
-    		var HAL_DEVICE_CLASS = "4d36e966-e325-11ce-bfc1-08002be10318";
-    		var DEVICE_DRIVER_VERSION_KEY = "{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3";
-    		var pnpObject = Windows.Devices.Enumeration.Pnp.PnpObject;
-    		pnpObject.findAllAsync(Windows.Devices.Enumeration.Pnp.PnpObjectType.device, [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], ROOT_CONTAINER_QUERY).then(function(rootDevices) {
-    
-    			for (var i = 0; i < rootDevices.length; i++) {
-    				var rootDevice = rootDevices[i];
-    				if (!rootDevice.properties) continue;
-    				if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] == HAL_DEVICE_CLASS) {
-    					versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY];
-    					break;
-    				}
-    			}
-
-                setTimeout(function () {
-                    win({ platform: "windows8", version: versionString, uuid: deviceId, model: window.clientInformation.platform });
-                }, 0);
-    		});
-    	})(this);
-    }
-
-};
-
-require("cordova/exec/proxy").add("Device", module.exports);
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org