felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From furf...@apache.org
Subject svn commit: r471326 - in /incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer: core/MyCtrlPoint.java core/upnp/UPnPDeviceImpl.java util/DeviceSetup.java util/DictionaryProp.java
Date Sun, 05 Nov 2006 02:12:31 GMT
Author: furfari
Date: Sat Nov  4 18:12:29 2006
New Revision: 471326

URL: http://svn.apache.org/viewvc?view=rev&rev=471326
Log:
Replaced DictionaryProp.java with a standard Hashtable.
UPnPDevice description  is now built with proper capitalized keys.
That has some consequence for client of imported UPnP devices that 
before now could look for lower case keys.

Removed:
    incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DictionaryProp.java
Modified:
    incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java
    incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java
    incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java

Modified: incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java?view=diff&rev=471326&r1=471325&r2=471326
==============================================================================
--- incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java
(original)
+++ incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java
Sat Nov  4 18:12:29 2006
@@ -64,7 +64,6 @@
 import org.apache.felix.upnp.basedriver.importer.core.event.structs.SubscriptionQueue;
 import org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPDeviceImpl;
 import org.apache.felix.upnp.basedriver.importer.core.upnp.UPnPServiceImpl;
-import org.apache.felix.upnp.basedriver.importer.util.DictionaryProp;
 import org.apache.felix.upnp.basedriver.importer.util.ParseUSN;
 import org.apache.felix.upnp.extra.util.Converter;
 
@@ -468,7 +467,7 @@
 										   * 
 										   * only if there is a compatibile device
 										   */
-					Dictionary dic = new DictionaryProp();
+					Dictionary dic = new Hashtable();
 					for (int i = 0; i < devicesRefs.length; i++) {
 						UPnPDevice device = (UPnPDevice) context.getService(devicesRefs[i]);
 						dic.put(UPnPDevice.ID, device.getDescriptions(null).get(UPnPDevice.UDN));
@@ -560,7 +559,7 @@
 										   * 
 										   * only if there is a compatibile device
 										   */
-					Dictionary dic = new DictionaryProp();
+					Dictionary dic = new Hashtable();
 					/* 
 					 * look for the service that match
 					 */
@@ -577,9 +576,7 @@
 						if (services != null) {
 							for (int j = 0; j < services.length; j++) {
 								dic.put(UPnPService.ID, services[j].getId());
-								dic
-										.put(UPnPService.TYPE, services[j]
-												.getType());
+								dic.put(UPnPService.TYPE, services[j].getType());
 
 								UPnPStateVariable[] stateVars = services[j]
 										.getStateVariables();

Modified: incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java?view=diff&rev=471326&r1=471325&r2=471326
==============================================================================
--- incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java
(original)
+++ incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java
Sat Nov  4 18:12:29 2006
@@ -25,16 +25,13 @@
 import java.util.Hashtable;
 import java.util.Vector;
 
+import org.apache.felix.upnp.basedriver.importer.util.DeviceSetup;
 import org.cybergarage.upnp.Device;
-
 import org.osgi.framework.BundleContext;
 import org.osgi.service.upnp.UPnPDevice;
 import org.osgi.service.upnp.UPnPIcon;
 import org.osgi.service.upnp.UPnPService;
 
-import org.apache.felix.upnp.basedriver.importer.util.DeviceSetup;
-import org.apache.felix.upnp.basedriver.importer.util.DictionaryProp;
-
 /* 
 * @author <a href="mailto:felix-dev@incubator.apache.org">Felix Project Team</a>
 */
@@ -43,7 +40,7 @@
 	/**
 	 * <code>properties</code> Dictionary that contains Device properties
 	 */
-	private DictionaryProp properties;
+	private Dictionary properties;
 	private Vector icons;
 	private Hashtable services;
 	/**
@@ -52,7 +49,7 @@
 	 *            Device
 	 */
 	public UPnPDeviceImpl(Device dev, BundleContext context) {
-		properties = new DictionaryProp();
+		properties = new Hashtable();
 		this.services=new Hashtable();
 		this.icons=new Vector();
 		DeviceSetup.deviceSetup(properties,dev,icons,services);

Modified: incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java?view=diff&rev=471326&r1=471325&r2=471326
==============================================================================
--- incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java
(original)
+++ incubator/felix/trunk/upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java
Sat Nov  4 18:12:29 2006
@@ -20,6 +20,7 @@
 package org.apache.felix.upnp.basedriver.importer.util;
 
 
+import java.util.Dictionary;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
@@ -45,7 +46,7 @@
 
 public class DeviceSetup {
 
-	public static void deviceSetup(DictionaryProp properties, Device dev,Vector icons,Hashtable
services) {
+	public static void deviceSetup(Dictionary properties, Device dev,Vector icons,Hashtable
services) {
 		//TODO if I don't have any device, the size of devlist is 0 
 		DeviceList devList = dev.getDeviceList();
 		/* childrenUDN property */



Mime
View raw message