Deleted Italian comments
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@422776 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java
index 293d72a..16d4210 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/MyCtrlPoint.java
@@ -163,14 +163,6 @@
Activator.logger.DEBUG("[Importer] deviceNotifyReceived");
Activator.logger.PACKET(ssdpPacket.toString());
/*
- * case is notify case isalive case new root crea e aggiungi il servizio
- * in Osgi con tutta la stirpe case device or service controllo se
- * esiste in OSGi se si nada, se no lo creo partendo dal root case
- * byebye case root deregistro tutta la stirpe case device o service
- * reinstanzio il root con le modifiche
- *
- */
- /*
* if the packet is
* NOTIFY or ISALIVE or *new* ROOT then create and register the UPnPDevice and
* all the embeeded device too
@@ -290,7 +282,6 @@
String[] childrenUDN = (String[]) dev.getDescriptions(null).get(
UPnPDevice.CHILDREN_UDN);
if (childrenUDN == null) {
- //non ha figli
//no children
unregisterUPnPDevice(((OSGiDeviceInfo) devices.get(dev
.getDescriptions(null).get(UPnPDevice.UDN)))
@@ -349,12 +340,6 @@
}
- /*
- * public void registerHierarchyUPnPDevice(Device dev) { registro il root
- * con tutta la sua stirpe in osgi registerUPnPDevice(dev); DeviceList
- * devList = dev.getDeviceList(); for (int i = 0; i < devList.size(); i++) {
- * registerHierarchyUPnPDevice(devList.getDevice(i)); } }
- */
public void unregisterUPnPDevice(ServiceRegistration registration) {
registration.unregister();
@@ -478,19 +463,15 @@
}
if (devicesRefs != null) {/*
- * solo se ci sono dei device
- * compatibili
*
* only if there is a compatibile device
*/
Dictionary dic = new DictionaryProp();
- /* cerco i servizi che matchano */
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));
dic.put(UPnPDevice.TYPE, device.getDescriptions(null).get(UPnPDevice.TYPE));
UPnPService[] services = device.getServices();
- //TODO fare l'unget del servizio UPnPDevice??
//TODO do I have to do the unget of UPnPDevice??
if (services != null) {
for (int j = 0; j < services.length; j++) {
@@ -524,7 +505,6 @@
e.printStackTrace();
}
if (devicesRefs != null) {/*
- * solo se ci sono dei device
*
* only if there is a device
*/
@@ -533,7 +513,6 @@
UPnPDevice device = (UPnPDevice) context
.getService(devicesRefs[i]);
UPnPService[] services = device.getServices();
- //fare l'unget del servizio UPnPDevice??
//do I have to do the unget of UPnPDevice??
if (services != null) {
for (int j = 0; j < services.length; j++) {
@@ -576,15 +555,11 @@
e.printStackTrace();
}
if (devicesRefs != null) {/*
- * solo se ci sono dei device
- * compatibili
*
* only if there is a compatibile device
*/
Dictionary dic = new DictionaryProp();
/*
- * cerco i servizi che matchano
- *
* look for the service that match
*/
for (int i = 0; i < devicesRefs.length; i++) {
@@ -596,7 +571,6 @@
.get(UPnPDevice.TYPE));
UPnPService[] services = device.getServices();
- //fare l'unget del servizio UPnPDevice??
//do I have to do the unget of UPnPDevice??
if (services != null) {
for (int j = 0; j < services.length; j++) {
@@ -642,8 +616,6 @@
e.printStackTrace();
}
if (devicesRefs != null) {/*
- * solo se ci sono dei device
- *
* only if there is a device
*/
@@ -651,7 +623,6 @@
UPnPDevice device = (UPnPDevice) context
.getService(devicesRefs[i]);
UPnPService[] services = device.getServices();
- //fare l'unget del servizio UPnPDevice??
//do I have to do the unget of UPnPDevice??
if (services != null) {
for (int j = 0; j < services.length; j++) {
@@ -776,7 +747,6 @@
String[] oldServicesType =
(String[]) device.getDescriptions(null).get(UPnPServiceImpl.TYPE);
- //per via delle istanze multiple di un tipo di servizio
//to handle multiple instance of a serivice of the same type
Device cyberDevice = findDeviceCtrl(this, udn);
ServiceList serviceList = cyberDevice.getServiceList();
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/event/structs/Monitor.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/event/structs/Monitor.java
index 96bf5fb..a4c23f2 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/event/structs/Monitor.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/event/structs/Monitor.java
@@ -81,8 +81,6 @@
}
/*
- * controllare se bisogna fare un po' di cleaning
- *
public synchronized StateVarsToNotify getStateVars(String sid) {
return (StateVarsToNotify) sidStateVars.get(sid);
}
@@ -115,7 +113,7 @@
MyCtrlPoint ctrl/*##renew, SidRenewer sidRenewer*/) {
//francesco-renew
- // le strutture delle variabili di stato quando si ripulisono?
+ // State variable clean up -- todo?
Vector sids = sidListSid.getSidsFromListener(listener);
if (sids != null) {
@@ -165,8 +163,7 @@
Vector oldSids = sidListSid.getSidsFromListener(listener);
// francesco-renew
- // qua mi sembra che si esca troppo presto
- // i servizi notSubribed si registrano soltanto dopo ""
+ // check subscribed services
if(oldSids==null) return;
for (int i = 0; i < notSubscribed.size(); i++) {
@@ -178,14 +175,8 @@
String oldSid = (String) oldSids.elementAt(i);
if (!subscribed.contains(oldSid)) {
// francesco-renew
- // qua si rimuove il sid dalla lista Listner2Sids
- // ma il Listner dalla lista sid2Listener?
- // la delListner che si esegue dopo � pensata per rimuovere principalmente i
- // listener e ci sono condizioni es. Lista Listener2Sid vuota
- // che nn fanno rimuovere eventuali listener dalla sid2Listener
- // controllare bene !!
-
-
+ // to check -- Listner removal from sid2Listener
+
unsubscribeListenerForSid(oldSid,listener,ctrl);
}
}
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/event/thread/Renewer.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/event/thread/Renewer.java
index ccf616a..ac98e62 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/event/thread/Renewer.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/event/thread/Renewer.java
@@ -73,7 +73,6 @@
}
} else {//renew not ok
bool=false;
- //System.out.println("morto renewer");
subqueue.enqueue(new SidExipired(sid,service));
}
}
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPActionImpl.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPActionImpl.java
index d301bbd..d912068 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPActionImpl.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPActionImpl.java
@@ -60,7 +60,7 @@
* @see org.osgi.service.upnp.UPnPAction#getReturnArgumentName()
*/
public String getReturnArgumentName() {
- /* TODO da discutere .. perche' mi dovrei riparsare l'xml
+ /* TODO should I to parse again the xml?
*/
return null;
@@ -102,9 +102,7 @@
* @see org.osgi.service.upnp.UPnPAction#getStateVariable(java.lang.String)
*/
public UPnPStateVariable getStateVariable(String argumentName) {
- /*TODO controllare se non e'
- troppo brutto il modo di ottenere
- la UPnPStateVariable
+ /*
check if the way to obtain the UPnPStateVariabile is not too bad
@@ -121,26 +119,17 @@
* @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
*/
public Dictionary invoke(Dictionary args) throws Exception {
- /*TODO da controllare se ho capito bene quello che
- richiedeva il metodo
-
+ /*TODO
check if I have understood wath this method should do
*/
/*
- * mi ricavo gli argomenti e i valori
- * e gli inserisco in un ArgumentList
- *
* I look for argument and value and then I add them to ArgumentList
*/
ArgumentList argsList=new ArgumentList();
argsList= act.getInputArgumentList();
for(int i=0;i<argsList.size();i++){
- /*
- TODO assumo che .getArgument(i) mi dia un Argument con solo il nome e non il valore
- che sara' cio che ci mettero' io
- e assumo anche che siano ordinati
-
+ /*
* I assert that .getArgument(i) will return to me an Argument with only the name of the
* Argument and not it's value. I'll set the associated value by myself and
* Also I assert that the Argument are ordered
@@ -151,13 +140,11 @@
UPnPStateVariable stateVar=this.getStateVariable(argumentName);
String upnpType=stateVar.getUPnPDataType();
/*Class javaClass=stateVar.getJavaDataType();*/
- //setto il valore dell'argomento di input
//setting the value related to the input argument
argument.setValue(Converter.toString(args.get(argumentName),upnpType));
}
act.setArgumentValues(argsList);
if(act.postControlAction()==true){
- //TODO controllare cosa succede se non ho argomenti di out
//TODO check what happen if I don't have any output argument
Properties outDic=new Properties();
ArgumentList outArgs=act.getOutputArgumentList();
@@ -170,7 +157,6 @@
//String relateVar=argument.getRelatedStateVariableName();
UPnPStateVariable stateVar=getStateVariable(argumentName);
//String javaType=stateVar.getJavaDataType().getName();
- //TODO ricordarsi di catchare nunber exception
//TODO rember to catch number exception
String upnpType=stateVar.getUPnPDataType();
outDic.put(argumentName,Converter.parseString(argument.getValue(),upnpType));
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java
index a78ff0b..5bb2adb 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPDeviceImpl.java
@@ -73,7 +73,6 @@
public UPnPService[] getServices() {
Enumeration e = services.elements();
if (e == null) {
- //TODO restituisco null o un array vuoto null l'ho letto nella specifica
//TODO should I return null or an empty array? The specification seems to said to return null
return null;
}
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPIconImpl.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPIconImpl.java
index fbdcd71..d8fe6d0 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPIconImpl.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPIconImpl.java
@@ -52,7 +52,6 @@
* @see org.osgi.service.upnp.UPnPIcon#getWidth()
*/
public int getWidth() {
- // TODO se parso una stringa vuota che succede ? da eccezione?penso di si
//TODO what happen if the String is empty? do I get an Exception? I think so
String width=icon.getWidth();
if(width.length()==0){
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPServiceImpl.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPServiceImpl.java
index 183015f..e8f530b 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPServiceImpl.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPServiceImpl.java
@@ -44,7 +44,6 @@
actions = new Hashtable();
stateVariables=new Hashtable();
/*
- * azioni
* action
*/
ActionList actionlist = service.getActionList();
@@ -86,7 +85,6 @@
* @see org.osgi.service.upnp.UPnPService#getVersion()
*/
public String getVersion() {
- // TODO da controllare si puo' migliorare lastindexof
//TODO to check can I speed up this? May be using lastIndexOf
String [] splited=service.getServiceType().split(":");
return splited[splited.length-1];
@@ -97,7 +95,6 @@
* @see org.osgi.service.upnp.UPnPService#getAction(java.lang.String)
*/
public UPnPAction getAction(String name) {
- // TODO da controllare
//TODO to check
return (UPnPAction) actions.get(name);
}
@@ -108,7 +105,6 @@
* @see org.osgi.service.upnp.UPnPService#getActions()
*/
public UPnPAction[] getActions() {
- // TODO ricontrollare
//TODO check again
Enumeration e=actions.elements();
if(e==null){
@@ -129,7 +125,6 @@
* @see org.osgi.service.upnp.UPnPService#getStateVariables()
*/
public UPnPStateVariable[] getStateVariables() {
- // TODO ricontrollare
//TODO check again
UPnPStateVariableImpl [] vars =new UPnPStateVariableImpl[stateVariables.size()];
Enumeration e=stateVariables.elements();
@@ -150,7 +145,6 @@
* @see org.osgi.service.upnp.UPnPService#getStateVariable(java.lang.String)
*/
public UPnPStateVariable getStateVariable(String name) {
- // TODO ricontrollare
//TODO chack again
return (UPnPStateVariableImpl) stateVariables.get(name);
}
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPStateVariableImpl.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPStateVariableImpl.java
index 6fd1336..c5bdecf 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPStateVariableImpl.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/core/upnp/UPnPStateVariableImpl.java
@@ -128,7 +128,6 @@
* @see org.osgi.service.upnp.UPnPStateVariable#getDefaultValue()
*/
public Object getDefaultValue() {
- //TODO da implementare da zero.. e' raccommended ..
//TODO must be implemented from scretch, it's just raccommend
return null;
}
@@ -161,7 +160,6 @@
* @see org.osgi.service.upnp.UPnPStateVariable#getMinimum()
*/
public Number getMinimum() {
- // TODO stessa cosa get maximum
//TODO the same thing for getMaximum
AllowedValueRange allowedValueRange = variable.getAllowedValueRange();
if(allowedValueRange==null){
@@ -185,7 +183,6 @@
* @see org.osgi.service.upnp.UPnPStateVariable#getMaximum()
*/
public Number getMaximum() {
- // TODO suppongo che le invochino con cognizione di causa ??
//TODO I think that this method will be invoked from people that know what is doing
AllowedValueRange allowedValueRange = variable.getAllowedValueRange();
if(allowedValueRange==null){
@@ -209,7 +206,6 @@
* @see org.osgi.service.upnp.UPnPStateVariable#getStep()
*/
public Number getStep() {
- // TODO stssa cosa di getmaximum
//TODO same things of getMaxium
AllowedValueRange allowedValueRange = variable.getAllowedValueRange();
if(allowedValueRange==null){
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java
index 738c679..28ce900 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/DeviceSetup.java
@@ -44,7 +44,6 @@
public class DeviceSetup {
public static void deviceSetup(DictionaryProp properties, Device dev,Vector icons,Hashtable services) {
- //TODO se non ho device ho una devlist con zero elementi
//TODO if I don't have any device, the size of devlist is 0
DeviceList devList = dev.getDeviceList();
/* childrenUDN property */
@@ -66,7 +65,6 @@
properties.put(Constants.UPNP_IMPORT, "http://felix.apache.org");
/* FRIENDLY_NAME */
- //TODO controllato in metodo getFriendlyName se non esiste il frinedly mi restituisce una stringa vuota
//check the implementation fo getFriendlyName made by CyberLink
properties.put(UPnPDevice.FRIENDLY_NAME, dev.getFriendlyName());
/* MANUFACTURER */
@@ -110,12 +108,9 @@
}
}
/*
- * servizi del device
* service of this device
*/
- ServiceList serviceList = dev.getServiceList();//ok mi restituisce una
- // service list con zero
- // elementi
+ ServiceList serviceList = dev.getServiceList();
/*
* if dev contain no service I'll get an empty SserviceList object
*/
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/HTTPRequestForIcon.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/HTTPRequestForIcon.java
index eb8e605..858b3c3 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/HTTPRequestForIcon.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/HTTPRequestForIcon.java
@@ -30,7 +30,6 @@
this.url = url;
}
public InputStream getInputStream() throws IOException {
- //TODO da discutere
//TODO we should speak about that
InetAddress inet = InetAddress.getByName(url.getHost());
int port = url.getPort();
@@ -75,9 +74,9 @@
return in;
/*
- * utilizzando la classe di satoshi HTTPResponse response=new
- * HTTPResponse(in); InputStream
- * iconInStream=response.getContentInputStream(); return iconInStream;
+ * HTTPResponse response=new HTTPResponse(in);
+ * InputStream iconInStream=response.getContentInputStream();
+ * return iconInStream;
*
*/
/*
diff --git a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/ParseLocation.java b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/ParseLocation.java
index 887ad17..6fe9acf 100644
--- a/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/ParseLocation.java
+++ b/org.apache.felix.upnp.basedriver/src/main/java/org/apache/felix/upnp/basedriver/importer/util/ParseLocation.java
@@ -22,7 +22,6 @@
*/
public class ParseLocation {
public static String getUrlBase(String location){
- //http://148.12.14.144:65888/
String [] splited=location.split("/");
return splited[0]+"/"+"/"+splited[2];
}
diff --git a/org.apache.felix.upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/SetTargetAction.java b/org.apache.felix.upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/SetTargetAction.java
index 54b41e2..42fb290 100644
--- a/org.apache.felix.upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/SetTargetAction.java
+++ b/org.apache.felix.upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/SetTargetAction.java
@@ -79,7 +79,6 @@
* @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary)
*/
public Dictionary invoke(Dictionary args) throws Exception {
- System.out.println("Accesa");
Boolean value = (Boolean) args.get(NEW_TARGET_VALUE);
model.doSwitch(value.booleanValue());
return null;