PageRenderTime 11ms CodeModel.GetById 7ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/razpubs/src/razie/upnp/DeviceBridgeJ.java

http://razpub.googlecode.com/
Java | 30 lines | 22 code | 7 blank | 1 comment | 1 complexity | e65ea54a26cc65f654be949f2d1ec83e MD5 | raw file
 1package razie.upnp;
 2
 3import org.cybergarage.upnp.Device;
 4import org.cybergarage.upnp.Service;
 5import org.cybergarage.upnp.ServiceList;
 6import org.cybergarage.upnp.device.InvalidDescriptionException;
 7
 8import com.razie.pub.base.log.Log;
 9
10/** temp class - scala 2.8 has issues with using Vector[E] */
11public class DeviceBridgeJ extends Device {
12	public Service[] svcs () { return (Service[])getServiceList().toArray(); 	}
13	
14	public ServiceList getServiceList() {
15		ServiceList sl = super.getServiceList();
16	
17		for (int i = 0; i < sl.size(); i++) {
18		Service s = sl.getService(i);
19		try {
20			s.loadSCPD(razscpdStr(s.getServiceID()));
21		} catch (InvalidDescriptionException e) {
22			Log.alarmThis("", e);
23		}
24		}
25		
26		return sl;
27	}
28	
29	public String razscpdStr (String id) { return "";}
30}