felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r674879 [10/12] - in /felix/trunk/upnp: ./ basedriver/ basedriver/src/main/java/org/apache/felix/upnp/basedriver/ basedriver/src/main/java/org/apache/felix/upnp/basedriver/controller/ basedriver/src/main/java/org/apache/felix/upnp/basedrive...
Date Tue, 08 Jul 2008 16:59:57 GMT
Modified: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/ControlPoint.java
URL: http://svn.apache.org/viewvc/felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/ControlPoint.java?rev=674879&r1=674878&r2=674879&view=diff
==============================================================================
--- felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/ControlPoint.java (original)
+++ felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/ControlPoint.java Tue Jul  8 09:59:54 2008
@@ -1,375 +1,375 @@
-/* 
- * 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.
- */
-
-package org.apache.felix.upnp.tester;
-
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.net.URL;
-
-import javax.swing.AbstractAction;
-import javax.swing.ButtonGroup;
-import javax.swing.ImageIcon;
-import javax.swing.JFrame;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
-import javax.swing.JPanel;
-import javax.swing.JPopupMenu;
-import javax.swing.JRadioButtonMenuItem;
-import javax.swing.JSplitPane;
-import javax.swing.event.PopupMenuEvent;
-import javax.swing.event.PopupMenuListener;
-
-import org.osgi.framework.BundleException;
-
-import org.apache.felix.upnp.tester.discovery.DriverProxy;
-import org.apache.felix.upnp.tester.discovery.RootDeviceListener;
-import org.apache.felix.upnp.tester.gui.LogPanel;
-import org.apache.felix.upnp.tester.gui.PropertiesViewer;
-import org.apache.felix.upnp.tester.gui.TreeViewer;
-import org.apache.felix.upnp.tester.gui.Util;
- 
-/* 
-* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
-*/
-public class ControlPoint implements PopupMenuListener {
-	RootDeviceListener listener;
-	TreeViewer viewer;
-	PropertiesViewer properties;
-	JFrame frame;
-	
-	
-	public ControlPoint() {
-		frame = new JFrame("Felix UPnPDevice Tester");
-       try {
-            URL eventIconUrl = Util.class.getResource("IMAGES/logo.gif");           
-            ImageIcon icon=  new ImageIcon(eventIconUrl,"logo");
-            frame.setIconImage(icon.getImage());
-       }
-        catch (Exception ex){
-                System.out.println("Resource: IMAGES/logo.gif not found : " + ex.toString());
-        }
-		//frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-        
-		frame.addWindowListener(new WindowAdapter(){
-			public void windowClosing(WindowEvent e){
-				try {
-					Activator.context.getBundle().stop();
-				} catch (BundleException ex) {
-					ex.printStackTrace();
-				}
-			}
-
-		});       
-		frame.setBounds(0,0,300,200);
-        
-        
-        doMenuBar(frame);
-		doControlPanel();
-        Mediator.setControlPoint(this);
-        Mediator.setMainFrame(frame);
-		listener = new RootDeviceListener();
-        Mediator.setRootDeviceListener(listener);
-		listener.setDeviceNodeListener(viewer);
-		
-		frame.pack();
-		frame.setVisible(true);
-        
-		DriverProxy driverProxy = new DriverProxy();
-        Mediator.setDriverProxy(driverProxy);
-        
-		listener.activate();
-	}
-	
-	public void close(){
-		listener.deactive();
-		frame.dispose();
-        Mediator.getDriverProxy().close();           
-	}
-	
-	private void doControlPanel(){
-		JPanel panel = new JPanel(new BorderLayout());
-		viewer = new TreeViewer();
-		viewer.setPreferredSize(new Dimension(180,450));
-		properties = new PropertiesViewer();
-		Mediator.setPropertiesViewer(properties);
-	
-		JSplitPane treeSplitter = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,viewer,properties);
-		JPanel logPanel = new LogPanel();
-		logPanel.setPreferredSize(new Dimension(180,100));
-		JSplitPane logSplitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT,treeSplitter,logPanel);
-		panel.add(logSplitter);
-		frame.getContentPane().add(panel);
-		
-		
-	}
-	
-      /////////////////////////// MENU /////////////////////////////
-    JMenu searchMenu,loggerMenu,cyberMenu;  
-    public void doMenuBar(JFrame frame) {
-
-        JMenuBar menuBar = new JMenuBar();
-        
-        //////////////// FILE
-        JMenu file_menu = new JMenu("File");
-        file_menu.setMnemonic(KeyEvent.VK_F);
-
-        searchMenu = new JMenu("Search");
-        final String ALL_DEVICE = "ssdp:all";
-        final String ROOT_DEVICE = "upnp:rootdevice";
-        searchMenu.setMnemonic(KeyEvent.VK_L);
-        searchMenu.setEnabled(false);
-        AbstractAction searchAction = new AbstractAction(){
-            public void actionPerformed(ActionEvent e) {
-                DriverProxy controller = Mediator.getDriverProxy();
-                if (e.getActionCommand().equals(ALL_DEVICE))
-                    controller.doSearch(ALL_DEVICE);
-                else if (e.getActionCommand().equals(ROOT_DEVICE))
-                    controller.doSearch(ROOT_DEVICE);
-            }
-        };
-        
-        JMenuItem rootDeviceItem = new JMenuItem("Root Devices");
-        rootDeviceItem.setMnemonic(KeyEvent.VK_R);
-        rootDeviceItem.addActionListener(searchAction);
-        rootDeviceItem.setActionCommand(ROOT_DEVICE);
-        searchMenu.add(rootDeviceItem);
-        
-        JMenuItem allDeviceItem = new JMenuItem("All Devices");
-        allDeviceItem .setMnemonic(KeyEvent.VK_A);
-        allDeviceItem .addActionListener(searchAction);
-        allDeviceItem .setActionCommand(ALL_DEVICE);
-        searchMenu.add(allDeviceItem);
-        
-        
-        JMenuItem checkIncompleteItem = new JMenuItem("Print Pending Devices");
-        checkIncompleteItem.setMnemonic(KeyEvent.VK_I);
-        checkIncompleteItem.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    Mediator.getRootDeviceListener().checkIncompleteDevice();
-                }
-            });
-        
-        JMenuItem checkErrataItem = new JMenuItem("Check Errata UPnPDevices");
-        checkErrataItem.setMnemonic(KeyEvent.VK_E);
-        checkErrataItem.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {                    
-                    RootDeviceListener.checkErrataDevice();}
-            });
-        
-        
-        loggerMenu = new JMenu("Felix Logger");
-        final String NO_LOGGING ="No Logging";
-        final String ERROR ="Error";
-        final String WARNING ="Warning";
-        final String INFO ="Info";
-        final String DEBUG ="Debug";
-
-        loggerMenu.getPopupMenu().addPopupMenuListener(this);
-        loggerMenu.setMnemonic(KeyEvent.VK_L);
-        loggerMenu.setEnabled(false);
-        AbstractAction loggerAction = new AbstractAction(){
-            public void actionPerformed(ActionEvent e) {
-                DriverProxy controller = Mediator.getDriverProxy();
-                if (e.getActionCommand().equals(NO_LOGGING))
-                    controller.setLogLevel(0);
-                else if (e.getActionCommand().equals(ERROR))
-                    controller.setLogLevel(1);
-                else if (e.getActionCommand().equals(WARNING))
-                    controller.setLogLevel(2);
-                else if (e.getActionCommand().equals(INFO))
-                    controller.setLogLevel(3);
-                else if (e.getActionCommand().equals(DEBUG))
-                    controller.setLogLevel(4);
-            }
-        };
-       
-        ButtonGroup group = new ButtonGroup();
-        
-        JRadioButtonMenuItem rbMenuItem = new JRadioButtonMenuItem(NO_LOGGING);
-        rbMenuItem.setSelected(true);
-        rbMenuItem.setMnemonic(KeyEvent.VK_N);
-        rbMenuItem.setActionCommand(NO_LOGGING);
-        rbMenuItem.addActionListener(loggerAction);
-        group.add(rbMenuItem);
-        loggerMenu.add(rbMenuItem);
-        loggerMenu.addSeparator();
-        
-        rbMenuItem = new JRadioButtonMenuItem(ERROR);
-        rbMenuItem.setMnemonic(KeyEvent.VK_E);
-        rbMenuItem.setActionCommand(ERROR);
-        rbMenuItem.addActionListener(loggerAction);
-        group.add(rbMenuItem);
-        loggerMenu.add(rbMenuItem);
-
-        rbMenuItem = new JRadioButtonMenuItem(WARNING);
-        rbMenuItem.setMnemonic(KeyEvent.VK_W);
-        rbMenuItem.setActionCommand(WARNING);
-        rbMenuItem.addActionListener(loggerAction);
-        group.add(rbMenuItem);
-        loggerMenu.add(rbMenuItem);
-        
-        rbMenuItem = new JRadioButtonMenuItem(INFO);
-        rbMenuItem.setMnemonic(KeyEvent.VK_I);
-        rbMenuItem.setActionCommand(INFO);
-        rbMenuItem.addActionListener(loggerAction);
-        group.add(rbMenuItem);
-        loggerMenu.add(rbMenuItem);
-        
-        rbMenuItem = new JRadioButtonMenuItem(DEBUG);
-        rbMenuItem.setMnemonic(KeyEvent.VK_D);
-        rbMenuItem.setActionCommand(DEBUG);
-        rbMenuItem.addActionListener(loggerAction);
-        group.add(rbMenuItem);
-        loggerMenu.add(rbMenuItem);
-
-        final String ON ="On";
-        final String OFF ="Off";
-        cyberMenu = new JMenu("Cyber Debugger");
-        cyberMenu.getPopupMenu().addPopupMenuListener(this);
-        cyberMenu.setMnemonic(KeyEvent.VK_C);
-        cyberMenu.setEnabled(false);
-        AbstractAction cyberAction = new AbstractAction(){
-            public void actionPerformed(ActionEvent e) {
-                DriverProxy controller = Mediator.getDriverProxy();
-                if (e.getActionCommand().equals(ON))
-                    controller.setCyberDebug(true);
-                else if (e.getActionCommand().equals(OFF))
-                    controller.setCyberDebug(false);
-            }
-        };
-
-       
-        ButtonGroup cyberGroup = new ButtonGroup();
-        rbMenuItem = new JRadioButtonMenuItem(ON);
-        rbMenuItem.setSelected(true);
-        rbMenuItem.setMnemonic(KeyEvent.VK_O);
-        rbMenuItem.setActionCommand(ON);
-        rbMenuItem.addActionListener(cyberAction);
-        cyberGroup.add(rbMenuItem);
-        cyberMenu.add(rbMenuItem);
-
-        rbMenuItem = new JRadioButtonMenuItem(OFF);
-        rbMenuItem.setMnemonic(KeyEvent.VK_F);
-        rbMenuItem.setActionCommand(OFF);
-        rbMenuItem.addActionListener(cyberAction);
-        cyberGroup.add(rbMenuItem);
-        cyberMenu.add(rbMenuItem);
-        
-        /*
-        JMenuItem clearSubscriptionItem = new JMenuItem("Clear Subscriptions");
-        clearSubscriptionItem.setMnemonic(KeyEvent.VK_S);
-        clearSubscriptionItem.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-// to do
-                    }
-            });
-        */
-        
-        JMenuItem exitItem = new JMenuItem("Exit");
-        exitItem.setMnemonic(KeyEvent.VK_X);
-        exitItem.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    try {
-                        Activator.context.getBundle().stop();
-                    }catch (Exception ex){
-                        ex.printStackTrace();
-                    }
-                }
-            });
-        
-
-        file_menu.add(searchMenu);
-        file_menu.addSeparator();
-        file_menu.add(loggerMenu);
-        file_menu.add(cyberMenu);
-        file_menu.addSeparator();
-        file_menu.add(checkIncompleteItem);
-        file_menu.add(checkErrataItem);
-        //file_menu.addSeparator();
-        //file_menu.add(clearSubscriptionItem);
-        file_menu.addSeparator();
-        file_menu.add(exitItem);
-
-        menuBar.add(file_menu);                   
-        frame.setJMenuBar(menuBar);
-
-    }
-
- 
-    public void enableMenus(boolean driverAvailable,int logLevel,boolean cyberDebug) {
-        searchMenu.setEnabled(driverAvailable);
-        Component[] items = searchMenu.getPopupMenu().getComponents();
-        for (int i=0;i < items.length;i++)
-            items[i].setEnabled(driverAvailable);
-
-        loggerMenu.setEnabled(driverAvailable);
-        items = loggerMenu.getPopupMenu().getComponents();
-        for (int i=0;i < items.length;i++)
-            items[i].setEnabled(driverAvailable);
-        if (driverAvailable){
-                ((JRadioButtonMenuItem)items[logLevel>0?logLevel+1:0]).setSelected(true);
-        }
-        cyberMenu.setEnabled(driverAvailable);           
-        items = cyberMenu.getPopupMenu().getComponents();
-        for (int i=0;i < items.length;i++)
-            items[i].setEnabled(driverAvailable);
-        if (driverAvailable){
-            if (cyberDebug)
-                ((JRadioButtonMenuItem)items[0]).setSelected(true);
-            else
-                ((JRadioButtonMenuItem)items[1]).setSelected(true);
-        }
-   }
-
-    public void popupMenuCanceled(PopupMenuEvent e) { }
-    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
-
-    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
-        JPopupMenu loggerPopup = loggerMenu.getPopupMenu();
-        JPopupMenu cyberPopup = cyberMenu.getPopupMenu();
-        if (e.getSource()==loggerPopup){
-            int logLevel = Mediator.getDriverProxy().getLogLevel();
-            Component[] items = loggerPopup.getComponents();
-            ((JRadioButtonMenuItem)items[logLevel>0?logLevel+1:0]).setSelected(true);          
-        }
-        else if (e.getSource()==cyberPopup){
-            boolean cyberDebug = Mediator.getDriverProxy().getCyberDebug();
-            Component[] items = cyberPopup.getComponents();
-            if (cyberDebug)
-                ((JRadioButtonMenuItem)items[0]).setSelected(true);
-            else
-                ((JRadioButtonMenuItem)items[1]).setSelected(true);            
-        }
-       
-        
-    }
-
-
-
-	
-}
+/* 
+ * 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.
+ */
+
+package org.apache.felix.upnp.tester;
+
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.net.URL;
+
+import javax.swing.AbstractAction;
+import javax.swing.ButtonGroup;
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.JSplitPane;
+import javax.swing.event.PopupMenuEvent;
+import javax.swing.event.PopupMenuListener;
+
+import org.osgi.framework.BundleException;
+
+import org.apache.felix.upnp.tester.discovery.DriverProxy;
+import org.apache.felix.upnp.tester.discovery.RootDeviceListener;
+import org.apache.felix.upnp.tester.gui.LogPanel;
+import org.apache.felix.upnp.tester.gui.PropertiesViewer;
+import org.apache.felix.upnp.tester.gui.TreeViewer;
+import org.apache.felix.upnp.tester.gui.Util;
+ 
+/* 
+* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+*/
+public class ControlPoint implements PopupMenuListener {
+	RootDeviceListener listener;
+	TreeViewer viewer;
+	PropertiesViewer properties;
+	JFrame frame;
+	
+	
+	public ControlPoint() {
+		frame = new JFrame("Felix UPnPDevice Tester");
+       try {
+            URL eventIconUrl = Util.class.getResource("IMAGES/logo.gif");           
+            ImageIcon icon=  new ImageIcon(eventIconUrl,"logo");
+            frame.setIconImage(icon.getImage());
+       }
+        catch (Exception ex){
+                System.out.println("Resource: IMAGES/logo.gif not found : " + ex.toString());
+        }
+		//frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        
+		frame.addWindowListener(new WindowAdapter(){
+			public void windowClosing(WindowEvent e){
+				try {
+					Activator.context.getBundle().stop();
+				} catch (BundleException ex) {
+					ex.printStackTrace();
+				}
+			}
+
+		});       
+		frame.setBounds(0,0,300,200);
+        
+        
+        doMenuBar(frame);
+		doControlPanel();
+        Mediator.setControlPoint(this);
+        Mediator.setMainFrame(frame);
+		listener = new RootDeviceListener();
+        Mediator.setRootDeviceListener(listener);
+		listener.setDeviceNodeListener(viewer);
+		
+		frame.pack();
+		frame.setVisible(true);
+        
+		DriverProxy driverProxy = new DriverProxy();
+        Mediator.setDriverProxy(driverProxy);
+        
+		listener.activate();
+	}
+	
+	public void close(){
+		listener.deactive();
+		frame.dispose();
+        Mediator.getDriverProxy().close();           
+	}
+	
+	private void doControlPanel(){
+		JPanel panel = new JPanel(new BorderLayout());
+		viewer = new TreeViewer();
+		viewer.setPreferredSize(new Dimension(180,450));
+		properties = new PropertiesViewer();
+		Mediator.setPropertiesViewer(properties);
+	
+		JSplitPane treeSplitter = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,viewer,properties);
+		JPanel logPanel = new LogPanel();
+		logPanel.setPreferredSize(new Dimension(180,100));
+		JSplitPane logSplitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT,treeSplitter,logPanel);
+		panel.add(logSplitter);
+		frame.getContentPane().add(panel);
+		
+		
+	}
+	
+      /////////////////////////// MENU /////////////////////////////
+    JMenu searchMenu,loggerMenu,cyberMenu;  
+    public void doMenuBar(JFrame frame) {
+
+        JMenuBar menuBar = new JMenuBar();
+        
+        //////////////// FILE
+        JMenu file_menu = new JMenu("File");
+        file_menu.setMnemonic(KeyEvent.VK_F);
+
+        searchMenu = new JMenu("Search");
+        final String ALL_DEVICE = "ssdp:all";
+        final String ROOT_DEVICE = "upnp:rootdevice";
+        searchMenu.setMnemonic(KeyEvent.VK_L);
+        searchMenu.setEnabled(false);
+        AbstractAction searchAction = new AbstractAction(){
+            public void actionPerformed(ActionEvent e) {
+                DriverProxy controller = Mediator.getDriverProxy();
+                if (e.getActionCommand().equals(ALL_DEVICE))
+                    controller.doSearch(ALL_DEVICE);
+                else if (e.getActionCommand().equals(ROOT_DEVICE))
+                    controller.doSearch(ROOT_DEVICE);
+            }
+        };
+        
+        JMenuItem rootDeviceItem = new JMenuItem("Root Devices");
+        rootDeviceItem.setMnemonic(KeyEvent.VK_R);
+        rootDeviceItem.addActionListener(searchAction);
+        rootDeviceItem.setActionCommand(ROOT_DEVICE);
+        searchMenu.add(rootDeviceItem);
+        
+        JMenuItem allDeviceItem = new JMenuItem("All Devices");
+        allDeviceItem .setMnemonic(KeyEvent.VK_A);
+        allDeviceItem .addActionListener(searchAction);
+        allDeviceItem .setActionCommand(ALL_DEVICE);
+        searchMenu.add(allDeviceItem);
+        
+        
+        JMenuItem checkIncompleteItem = new JMenuItem("Print Pending Devices");
+        checkIncompleteItem.setMnemonic(KeyEvent.VK_I);
+        checkIncompleteItem.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent e) {
+                    Mediator.getRootDeviceListener().checkIncompleteDevice();
+                }
+            });
+        
+        JMenuItem checkErrataItem = new JMenuItem("Check Errata UPnPDevices");
+        checkErrataItem.setMnemonic(KeyEvent.VK_E);
+        checkErrataItem.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent e) {                    
+                    RootDeviceListener.checkErrataDevice();}
+            });
+        
+        
+        loggerMenu = new JMenu("Felix Logger");
+        final String NO_LOGGING ="No Logging";
+        final String ERROR ="Error";
+        final String WARNING ="Warning";
+        final String INFO ="Info";
+        final String DEBUG ="Debug";
+
+        loggerMenu.getPopupMenu().addPopupMenuListener(this);
+        loggerMenu.setMnemonic(KeyEvent.VK_L);
+        loggerMenu.setEnabled(false);
+        AbstractAction loggerAction = new AbstractAction(){
+            public void actionPerformed(ActionEvent e) {
+                DriverProxy controller = Mediator.getDriverProxy();
+                if (e.getActionCommand().equals(NO_LOGGING))
+                    controller.setLogLevel(0);
+                else if (e.getActionCommand().equals(ERROR))
+                    controller.setLogLevel(1);
+                else if (e.getActionCommand().equals(WARNING))
+                    controller.setLogLevel(2);
+                else if (e.getActionCommand().equals(INFO))
+                    controller.setLogLevel(3);
+                else if (e.getActionCommand().equals(DEBUG))
+                    controller.setLogLevel(4);
+            }
+        };
+       
+        ButtonGroup group = new ButtonGroup();
+        
+        JRadioButtonMenuItem rbMenuItem = new JRadioButtonMenuItem(NO_LOGGING);
+        rbMenuItem.setSelected(true);
+        rbMenuItem.setMnemonic(KeyEvent.VK_N);
+        rbMenuItem.setActionCommand(NO_LOGGING);
+        rbMenuItem.addActionListener(loggerAction);
+        group.add(rbMenuItem);
+        loggerMenu.add(rbMenuItem);
+        loggerMenu.addSeparator();
+        
+        rbMenuItem = new JRadioButtonMenuItem(ERROR);
+        rbMenuItem.setMnemonic(KeyEvent.VK_E);
+        rbMenuItem.setActionCommand(ERROR);
+        rbMenuItem.addActionListener(loggerAction);
+        group.add(rbMenuItem);
+        loggerMenu.add(rbMenuItem);
+
+        rbMenuItem = new JRadioButtonMenuItem(WARNING);
+        rbMenuItem.setMnemonic(KeyEvent.VK_W);
+        rbMenuItem.setActionCommand(WARNING);
+        rbMenuItem.addActionListener(loggerAction);
+        group.add(rbMenuItem);
+        loggerMenu.add(rbMenuItem);
+        
+        rbMenuItem = new JRadioButtonMenuItem(INFO);
+        rbMenuItem.setMnemonic(KeyEvent.VK_I);
+        rbMenuItem.setActionCommand(INFO);
+        rbMenuItem.addActionListener(loggerAction);
+        group.add(rbMenuItem);
+        loggerMenu.add(rbMenuItem);
+        
+        rbMenuItem = new JRadioButtonMenuItem(DEBUG);
+        rbMenuItem.setMnemonic(KeyEvent.VK_D);
+        rbMenuItem.setActionCommand(DEBUG);
+        rbMenuItem.addActionListener(loggerAction);
+        group.add(rbMenuItem);
+        loggerMenu.add(rbMenuItem);
+
+        final String ON ="On";
+        final String OFF ="Off";
+        cyberMenu = new JMenu("Cyber Debugger");
+        cyberMenu.getPopupMenu().addPopupMenuListener(this);
+        cyberMenu.setMnemonic(KeyEvent.VK_C);
+        cyberMenu.setEnabled(false);
+        AbstractAction cyberAction = new AbstractAction(){
+            public void actionPerformed(ActionEvent e) {
+                DriverProxy controller = Mediator.getDriverProxy();
+                if (e.getActionCommand().equals(ON))
+                    controller.setCyberDebug(true);
+                else if (e.getActionCommand().equals(OFF))
+                    controller.setCyberDebug(false);
+            }
+        };
+
+       
+        ButtonGroup cyberGroup = new ButtonGroup();
+        rbMenuItem = new JRadioButtonMenuItem(ON);
+        rbMenuItem.setSelected(true);
+        rbMenuItem.setMnemonic(KeyEvent.VK_O);
+        rbMenuItem.setActionCommand(ON);
+        rbMenuItem.addActionListener(cyberAction);
+        cyberGroup.add(rbMenuItem);
+        cyberMenu.add(rbMenuItem);
+
+        rbMenuItem = new JRadioButtonMenuItem(OFF);
+        rbMenuItem.setMnemonic(KeyEvent.VK_F);
+        rbMenuItem.setActionCommand(OFF);
+        rbMenuItem.addActionListener(cyberAction);
+        cyberGroup.add(rbMenuItem);
+        cyberMenu.add(rbMenuItem);
+        
+        /*
+        JMenuItem clearSubscriptionItem = new JMenuItem("Clear Subscriptions");
+        clearSubscriptionItem.setMnemonic(KeyEvent.VK_S);
+        clearSubscriptionItem.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent e) {
+// to do
+                    }
+            });
+        */
+        
+        JMenuItem exitItem = new JMenuItem("Exit");
+        exitItem.setMnemonic(KeyEvent.VK_X);
+        exitItem.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent e) {
+                    try {
+                        Activator.context.getBundle().stop();
+                    }catch (Exception ex){
+                        ex.printStackTrace();
+                    }
+                }
+            });
+        
+
+        file_menu.add(searchMenu);
+        file_menu.addSeparator();
+        file_menu.add(loggerMenu);
+        file_menu.add(cyberMenu);
+        file_menu.addSeparator();
+        file_menu.add(checkIncompleteItem);
+        file_menu.add(checkErrataItem);
+        //file_menu.addSeparator();
+        //file_menu.add(clearSubscriptionItem);
+        file_menu.addSeparator();
+        file_menu.add(exitItem);
+
+        menuBar.add(file_menu);                   
+        frame.setJMenuBar(menuBar);
+
+    }
+
+ 
+    public void enableMenus(boolean driverAvailable,int logLevel,boolean cyberDebug) {
+        searchMenu.setEnabled(driverAvailable);
+        Component[] items = searchMenu.getPopupMenu().getComponents();
+        for (int i=0;i < items.length;i++)
+            items[i].setEnabled(driverAvailable);
+
+        loggerMenu.setEnabled(driverAvailable);
+        items = loggerMenu.getPopupMenu().getComponents();
+        for (int i=0;i < items.length;i++)
+            items[i].setEnabled(driverAvailable);
+        if (driverAvailable){
+                ((JRadioButtonMenuItem)items[logLevel>0?logLevel+1:0]).setSelected(true);
+        }
+        cyberMenu.setEnabled(driverAvailable);           
+        items = cyberMenu.getPopupMenu().getComponents();
+        for (int i=0;i < items.length;i++)
+            items[i].setEnabled(driverAvailable);
+        if (driverAvailable){
+            if (cyberDebug)
+                ((JRadioButtonMenuItem)items[0]).setSelected(true);
+            else
+                ((JRadioButtonMenuItem)items[1]).setSelected(true);
+        }
+   }
+
+    public void popupMenuCanceled(PopupMenuEvent e) { }
+    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+
+    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+        JPopupMenu loggerPopup = loggerMenu.getPopupMenu();
+        JPopupMenu cyberPopup = cyberMenu.getPopupMenu();
+        if (e.getSource()==loggerPopup){
+            int logLevel = Mediator.getDriverProxy().getLogLevel();
+            Component[] items = loggerPopup.getComponents();
+            ((JRadioButtonMenuItem)items[logLevel>0?logLevel+1:0]).setSelected(true);          
+        }
+        else if (e.getSource()==cyberPopup){
+            boolean cyberDebug = Mediator.getDriverProxy().getCyberDebug();
+            Component[] items = cyberPopup.getComponents();
+            if (cyberDebug)
+                ((JRadioButtonMenuItem)items[0]).setSelected(true);
+            else
+                ((JRadioButtonMenuItem)items[1]).setSelected(true);            
+        }
+       
+        
+    }
+
+
+
+	
+}

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/ControlPoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/ControlPoint.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/ControlPoint.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/Mediator.java
URL: http://svn.apache.org/viewvc/felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/Mediator.java?rev=674879&r1=674878&r2=674879&view=diff
==============================================================================
--- felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/Mediator.java (original)
+++ felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/Mediator.java Tue Jul  8 09:59:54 2008
@@ -1,93 +1,93 @@
-/* 
- * 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.
- */
-
-package org.apache.felix.upnp.tester;
-
-
-import javax.swing.JFrame;
-import javax.swing.JTree;
-
-import org.apache.felix.upnp.tester.discovery.DriverProxy;
-import org.apache.felix.upnp.tester.discovery.RootDeviceListener;
-import org.apache.felix.upnp.tester.gui.PropertiesViewer;
-import org.apache.felix.upnp.tester.gui.TreeViewer;
-
-/* 
-* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
-*/
-public  class Mediator {
-	static PropertiesViewer props;
-	static JTree tree;
-    static JFrame frame; 
-    static DriverProxy driverProxy;
-    static RootDeviceListener rootDeviceListener; 
-    static ControlPoint controlPoint; 
-    static TreeViewer treeViewer; 
-	
-
-	public static void setPropertiesViewer(PropertiesViewer props){
-		Mediator.props=props;
-	}
-	public static PropertiesViewer getPropertiesViewer(){
-		return props;
-	}
-	
-    public static void setUPnPDeviceTree(JTree tree){
-        Mediator.tree=tree;
-    }
-    public static JTree getUPnPDeviceTree(){
-        return tree;
-    }
-    
-    public static void setTreeViewer(TreeViewer treeViewer){
-        Mediator.treeViewer=treeViewer;
-    }
-    public static TreeViewer getTreeViewer(){
-        return treeViewer;
-    }
-	
-    public static void setMainFrame(JFrame frame){
-        Mediator.frame=frame;
-    }
-    public static JFrame getMainFrame(){
-        return frame;
-    }
-    public static void setControlPoint(ControlPoint controlPoint){
-        Mediator.controlPoint=controlPoint;
-    }
-    public static ControlPoint getControlPoint(){
-        return controlPoint;
-    }
-    
-    public static void setDriverProxy(DriverProxy driverProxy) {
-        Mediator.driverProxy = driverProxy;        
-    }
-    
-    public static DriverProxy getDriverProxy(){
-        return driverProxy;
-    }
-    
-    public static void setRootDeviceListener(RootDeviceListener listener) {
-        Mediator.rootDeviceListener = listener;        
-    }
-    
-    public static RootDeviceListener getRootDeviceListener(){
-        return rootDeviceListener;
-    }
-}
+/* 
+ * 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.
+ */
+
+package org.apache.felix.upnp.tester;
+
+
+import javax.swing.JFrame;
+import javax.swing.JTree;
+
+import org.apache.felix.upnp.tester.discovery.DriverProxy;
+import org.apache.felix.upnp.tester.discovery.RootDeviceListener;
+import org.apache.felix.upnp.tester.gui.PropertiesViewer;
+import org.apache.felix.upnp.tester.gui.TreeViewer;
+
+/* 
+* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+*/
+public  class Mediator {
+	static PropertiesViewer props;
+	static JTree tree;
+    static JFrame frame; 
+    static DriverProxy driverProxy;
+    static RootDeviceListener rootDeviceListener; 
+    static ControlPoint controlPoint; 
+    static TreeViewer treeViewer; 
+	
+
+	public static void setPropertiesViewer(PropertiesViewer props){
+		Mediator.props=props;
+	}
+	public static PropertiesViewer getPropertiesViewer(){
+		return props;
+	}
+	
+    public static void setUPnPDeviceTree(JTree tree){
+        Mediator.tree=tree;
+    }
+    public static JTree getUPnPDeviceTree(){
+        return tree;
+    }
+    
+    public static void setTreeViewer(TreeViewer treeViewer){
+        Mediator.treeViewer=treeViewer;
+    }
+    public static TreeViewer getTreeViewer(){
+        return treeViewer;
+    }
+	
+    public static void setMainFrame(JFrame frame){
+        Mediator.frame=frame;
+    }
+    public static JFrame getMainFrame(){
+        return frame;
+    }
+    public static void setControlPoint(ControlPoint controlPoint){
+        Mediator.controlPoint=controlPoint;
+    }
+    public static ControlPoint getControlPoint(){
+        return controlPoint;
+    }
+    
+    public static void setDriverProxy(DriverProxy driverProxy) {
+        Mediator.driverProxy = driverProxy;        
+    }
+    
+    public static DriverProxy getDriverProxy(){
+        return driverProxy;
+    }
+    
+    public static void setRootDeviceListener(RootDeviceListener listener) {
+        Mediator.rootDeviceListener = listener;        
+    }
+    
+    public static RootDeviceListener getRootDeviceListener(){
+        return rootDeviceListener;
+    }
+}

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/Mediator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/Mediator.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/Mediator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/UPnPSubscriber.java
URL: http://svn.apache.org/viewvc/felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/UPnPSubscriber.java?rev=674879&r1=674878&r2=674879&view=diff
==============================================================================
--- felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/UPnPSubscriber.java (original)
+++ felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/UPnPSubscriber.java Tue Jul  8 09:59:54 2008
@@ -1,90 +1,90 @@
-/* 
- * 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.
- */
- 
-package org.apache.felix.upnp.tester;
-
-import java.util.Dictionary;
-import java.util.HashMap;
-import java.util.Properties;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Filter;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.upnp.UPnPDevice;
-import org.osgi.service.upnp.UPnPEventListener;
-import org.osgi.service.upnp.UPnPService;
-
-/* 
-* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
-*/
-public class UPnPSubscriber {
-	private BundleContext context;
-	private UPnPEventListener listener;
-	private HashMap hash;
-	
-	private class Subscription implements UPnPEventListener{
-	    ServiceRegistration registration;
-	    
-	    Subscription(String keys){
-	 		try {
-				Filter filter = context.createFilter(keys);
-				Properties props = new Properties();
-				props.put(UPnPEventListener.UPNP_FILTER, filter);
-				registration = context.registerService(UPnPEventListener.class.getName(), this, props);
-			}catch (Exception ex){
-				System.out.println(ex);
-			}
-	    }
-	    
-	    public void unsubscribe(){
-			registration.unregister();
-	    }
-	    
-        public void notifyUPnPEvent(String arg0, String arg1, Dictionary arg2) {
-            listener.notifyUPnPEvent( arg0,  arg1,  arg2);
-        }
-	}
-	
-	
-	public UPnPSubscriber(BundleContext context,UPnPEventListener listener){
-		this.context = context;
-		this.listener = listener;
-		hash = new HashMap();
-	}
-	
-	public void subscribe(String deviceId, String serviceId){
-		String keys = "(&(" + UPnPDevice.ID + "="+ deviceId + ")(" + UPnPService.ID + "=" + serviceId + "))";
-		if (hash.get(keys) == null){
-		    hash.put(keys, new Subscription(keys));
-		}
-	}
-	
-	public void unsubscribe(String deviceId, String serviceId){
-		String keys = "(&(" + UPnPDevice.ID + "="+ deviceId + ")(" + UPnPService.ID + "=" + serviceId + "))";
-		if (hash.containsKey(keys)) {
-		    Subscription subscription = (Subscription) hash.get(keys);
-		    subscription.unsubscribe();
-			hash.remove(keys);
-		}
-	}
-
-
- 	
-
-}
+/* 
+ * 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.
+ */
+ 
+package org.apache.felix.upnp.tester;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Properties;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Filter;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.upnp.UPnPDevice;
+import org.osgi.service.upnp.UPnPEventListener;
+import org.osgi.service.upnp.UPnPService;
+
+/* 
+* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+*/
+public class UPnPSubscriber {
+	private BundleContext context;
+	private UPnPEventListener listener;
+	private HashMap hash;
+	
+	private class Subscription implements UPnPEventListener{
+	    ServiceRegistration registration;
+	    
+	    Subscription(String keys){
+	 		try {
+				Filter filter = context.createFilter(keys);
+				Properties props = new Properties();
+				props.put(UPnPEventListener.UPNP_FILTER, filter);
+				registration = context.registerService(UPnPEventListener.class.getName(), this, props);
+			}catch (Exception ex){
+				System.out.println(ex);
+			}
+	    }
+	    
+	    public void unsubscribe(){
+			registration.unregister();
+	    }
+	    
+        public void notifyUPnPEvent(String arg0, String arg1, Dictionary arg2) {
+            listener.notifyUPnPEvent( arg0,  arg1,  arg2);
+        }
+	}
+	
+	
+	public UPnPSubscriber(BundleContext context,UPnPEventListener listener){
+		this.context = context;
+		this.listener = listener;
+		hash = new HashMap();
+	}
+	
+	public void subscribe(String deviceId, String serviceId){
+		String keys = "(&(" + UPnPDevice.ID + "="+ deviceId + ")(" + UPnPService.ID + "=" + serviceId + "))";
+		if (hash.get(keys) == null){
+		    hash.put(keys, new Subscription(keys));
+		}
+	}
+	
+	public void unsubscribe(String deviceId, String serviceId){
+		String keys = "(&(" + UPnPDevice.ID + "="+ deviceId + ")(" + UPnPService.ID + "=" + serviceId + "))";
+		if (hash.containsKey(keys)) {
+		    Subscription subscription = (Subscription) hash.get(keys);
+		    subscription.unsubscribe();
+			hash.remove(keys);
+		}
+	}
+
+
+ 	
+
+}

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/UPnPSubscriber.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/UPnPSubscriber.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/UPnPSubscriber.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceChangeListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceChangeListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceChangeListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNode.java
URL: http://svn.apache.org/viewvc/felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNode.java?rev=674879&r1=674878&r2=674879&view=diff
==============================================================================
--- felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNode.java (original)
+++ felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNode.java Tue Jul  8 09:59:54 2008
@@ -1,215 +1,215 @@
-/* 
- * 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.
- */
-
-package org.apache.felix.upnp.tester.discovery;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.upnp.UPnPDevice;
-
-/* 
-* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
-*/
-public class DeviceNode {
-	
-	private ServiceReference sr;
-	private boolean isRootNode;
-	private String udn ;
-	private boolean hasChild;
-	private int numberOfSons;
-	private ArrayList children;
-	private DeviceNode parent;
-	
-	public DeviceNode(ServiceReference sr){
-		//PRE: argument is always UPnPDevice service reference
-		if (sr == null) 
-			throw new IllegalArgumentException("null is not a valid arg in DeviceNode constructor");
-		this.sr = sr;
-		udn = (String) sr.getProperty(UPnPDevice.UDN);
-		parent=null;
-		isRootNode = (sr.getProperty(UPnPDevice.PARENT_UDN) == null);
-		String[] sons = ((String[]) sr.getProperty(UPnPDevice.CHILDREN_UDN));
-		hasChild = (sons != null);
-		if (hasChild) {
-			children = new ArrayList();
-			numberOfSons = sons.length;
-		}
-		/*
-		//Operation to let DeviceNode::isComplete() O(1)
-		isComplete = !hasChild;
-		*/					
-	}
-	
-	public ServiceReference getReference(){
-		return sr;
-	}
-	public UPnPDevice getDevice(BundleContext ctx){
-		return (UPnPDevice)ctx.getService(sr);
-	}
-	
-	public void attach(DeviceNode node){
-		if (node == null) 
-			throw new IllegalArgumentException("null is not a valid arg in DeviceNode.attach() method");
-		node.parent = this;
-		/*
-		//Operation to let DeviceNode::isComplete() O(1)
-		if((numberOfSons==children.size()-1)
-				&&(node.isComplete())){
-			this.isComplete = true;
-		}
-		*/
-		children.add(node);
-	}
-	
-	public DeviceNode dethatch(String name){
-		DeviceNode dn = this.search(name);
-		if(dn==null) 
-			return null;
-		
-		if(dn.parent!=null){
-			Iterator list = dn.parent.children.iterator();
-			while (list.hasNext()) {
-				DeviceNode x = (DeviceNode) list.next();
-				if(x.udn.equals(name)){
-					list.remove();
-					/*
-					//Operation to let DeviceNode::isComplete() O(1)
-					dn.parent.isComplete=false;
-					*/					
-					break;
-				}
-			}
-		}
-		dn.parent=null;
-		return dn;
-	}
-	
-	public Collection getAllChildren(){
-		if((this.children==null)||(this.children.size()==0)) 
-			return new ArrayList();
-		
-		Vector v = new Vector(this.children);
-		Iterator list = this.children.iterator();
-		while (list.hasNext()) {
-			DeviceNode x = (DeviceNode) list.next();
-			Collection c = x.getAllChildren();
-			if(c==null) continue;
-			v.addAll(c);
-		}
-		return v;
-	}
-
-	public Collection getChildren(){
-		if((this.children==null)||(this.children.size()==0)) 
-			return new ArrayList();
-		return this.children;
-	}	
-	
-	/**
-	 * @param name <code>String</code> that contain the UDN to look for
-	 * @return return a <code>DeviceNode</code> that have the UDN equals to name and <br>
-	 * 		if there is any <code>DeviceNode</code> with the proper UDN value return <code>null</code>
-	 */
-	public DeviceNode search(String name){
-		if (name == null) 
-			throw new IllegalArgumentException("null is not a valid arg in DeviceNode.search() method");
-		if (name.equals(udn))
-			return this;
-		else if (hasChild){
-			Iterator list = children.iterator();
-			while (list.hasNext()){
-				DeviceNode child = (DeviceNode)list.next();
-				DeviceNode node = child.search(name);
-				if (node != null) return node;				
-			}
-		}
-		return null;
-	}
-	
-	/**
-	 * 
-	 * @param udn
-	 * @return <code>true</code> if and only if this <code>DeviceNode</code>
-	 * 		contains a DeviceNode with UDN equals to passed argument or if
-	 * 		its USN is equal to passed argument
-	 */
-	public boolean contains(String udn){
-		return this.search(udn)!=null;
-	}
-	
-	public boolean isComplete(){	
-		/*
-		//Operation to let DeviceNode::isComplete() O(1)
-		return isComplete;
-		*/		
-		if (! hasChild) return true;
-		if (numberOfSons != children.size())return false;
-		Iterator list = children.iterator();
-		while (list.hasNext()){
-			DeviceNode child = (DeviceNode)list.next();
-			if (! child.isComplete()) return false;
-		}
-		return true;
-	}
-	
-	public DeviceNode isAttachable(DeviceNode node){
-		if (node == null) 
-			throw new IllegalArgumentException("null is not a valid arg in DeviceNode.isAttachable() method");
-		String parentUDN=(String) node.getReference().getProperty(UPnPDevice.PARENT_UDN);
-		if(parentUDN==null) return null;
-		return search(parentUDN);		
-	}
-		
-	public boolean isRoot(){
-		return isRootNode;		
-	}
-	
-	public boolean equals(String udn){
-		return this.udn.equals(udn);
-	}
-	
-	public String toString(){
-		return udn;
-	}		
-	public boolean isLeaf() {
-		return !hasChild;
-	}
-    
-    public void print(){
-        System.out.println("####Device Node");
-        String[] props = sr.getPropertyKeys();
-        for (int i=0;i< props.length;i++){
-            Object prop= sr.getProperty(props[i]);
-            if (prop instanceof String[]){
-                System.out.println(props[i]+ "=");
-                String[] multiple = (String[])prop;
-                for (int j=0;j< multiple.length;j++){
-                    System.out.println(multiple[j]+ ";"); 
-                }
-
-            }
-            else System.out.println(props[i]+ "="+ prop);
-        }
-        System.out.println("####Device Node");
-   }
-}
+/* 
+ * 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.
+ */
+
+package org.apache.felix.upnp.tester.discovery;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.upnp.UPnPDevice;
+
+/* 
+* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+*/
+public class DeviceNode {
+	
+	private ServiceReference sr;
+	private boolean isRootNode;
+	private String udn ;
+	private boolean hasChild;
+	private int numberOfSons;
+	private ArrayList children;
+	private DeviceNode parent;
+	
+	public DeviceNode(ServiceReference sr){
+		//PRE: argument is always UPnPDevice service reference
+		if (sr == null) 
+			throw new IllegalArgumentException("null is not a valid arg in DeviceNode constructor");
+		this.sr = sr;
+		udn = (String) sr.getProperty(UPnPDevice.UDN);
+		parent=null;
+		isRootNode = (sr.getProperty(UPnPDevice.PARENT_UDN) == null);
+		String[] sons = ((String[]) sr.getProperty(UPnPDevice.CHILDREN_UDN));
+		hasChild = (sons != null);
+		if (hasChild) {
+			children = new ArrayList();
+			numberOfSons = sons.length;
+		}
+		/*
+		//Operation to let DeviceNode::isComplete() O(1)
+		isComplete = !hasChild;
+		*/					
+	}
+	
+	public ServiceReference getReference(){
+		return sr;
+	}
+	public UPnPDevice getDevice(BundleContext ctx){
+		return (UPnPDevice)ctx.getService(sr);
+	}
+	
+	public void attach(DeviceNode node){
+		if (node == null) 
+			throw new IllegalArgumentException("null is not a valid arg in DeviceNode.attach() method");
+		node.parent = this;
+		/*
+		//Operation to let DeviceNode::isComplete() O(1)
+		if((numberOfSons==children.size()-1)
+				&&(node.isComplete())){
+			this.isComplete = true;
+		}
+		*/
+		children.add(node);
+	}
+	
+	public DeviceNode dethatch(String name){
+		DeviceNode dn = this.search(name);
+		if(dn==null) 
+			return null;
+		
+		if(dn.parent!=null){
+			Iterator list = dn.parent.children.iterator();
+			while (list.hasNext()) {
+				DeviceNode x = (DeviceNode) list.next();
+				if(x.udn.equals(name)){
+					list.remove();
+					/*
+					//Operation to let DeviceNode::isComplete() O(1)
+					dn.parent.isComplete=false;
+					*/					
+					break;
+				}
+			}
+		}
+		dn.parent=null;
+		return dn;
+	}
+	
+	public Collection getAllChildren(){
+		if((this.children==null)||(this.children.size()==0)) 
+			return new ArrayList();
+		
+		Vector v = new Vector(this.children);
+		Iterator list = this.children.iterator();
+		while (list.hasNext()) {
+			DeviceNode x = (DeviceNode) list.next();
+			Collection c = x.getAllChildren();
+			if(c==null) continue;
+			v.addAll(c);
+		}
+		return v;
+	}
+
+	public Collection getChildren(){
+		if((this.children==null)||(this.children.size()==0)) 
+			return new ArrayList();
+		return this.children;
+	}	
+	
+	/**
+	 * @param name <code>String</code> that contain the UDN to look for
+	 * @return return a <code>DeviceNode</code> that have the UDN equals to name and <br>
+	 * 		if there is any <code>DeviceNode</code> with the proper UDN value return <code>null</code>
+	 */
+	public DeviceNode search(String name){
+		if (name == null) 
+			throw new IllegalArgumentException("null is not a valid arg in DeviceNode.search() method");
+		if (name.equals(udn))
+			return this;
+		else if (hasChild){
+			Iterator list = children.iterator();
+			while (list.hasNext()){
+				DeviceNode child = (DeviceNode)list.next();
+				DeviceNode node = child.search(name);
+				if (node != null) return node;				
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * 
+	 * @param udn
+	 * @return <code>true</code> if and only if this <code>DeviceNode</code>
+	 * 		contains a DeviceNode with UDN equals to passed argument or if
+	 * 		its USN is equal to passed argument
+	 */
+	public boolean contains(String udn){
+		return this.search(udn)!=null;
+	}
+	
+	public boolean isComplete(){	
+		/*
+		//Operation to let DeviceNode::isComplete() O(1)
+		return isComplete;
+		*/		
+		if (! hasChild) return true;
+		if (numberOfSons != children.size())return false;
+		Iterator list = children.iterator();
+		while (list.hasNext()){
+			DeviceNode child = (DeviceNode)list.next();
+			if (! child.isComplete()) return false;
+		}
+		return true;
+	}
+	
+	public DeviceNode isAttachable(DeviceNode node){
+		if (node == null) 
+			throw new IllegalArgumentException("null is not a valid arg in DeviceNode.isAttachable() method");
+		String parentUDN=(String) node.getReference().getProperty(UPnPDevice.PARENT_UDN);
+		if(parentUDN==null) return null;
+		return search(parentUDN);		
+	}
+		
+	public boolean isRoot(){
+		return isRootNode;		
+	}
+	
+	public boolean equals(String udn){
+		return this.udn.equals(udn);
+	}
+	
+	public String toString(){
+		return udn;
+	}		
+	public boolean isLeaf() {
+		return !hasChild;
+	}
+    
+    public void print(){
+        System.out.println("####Device Node");
+        String[] props = sr.getPropertyKeys();
+        for (int i=0;i< props.length;i++){
+            Object prop= sr.getProperty(props[i]);
+            if (prop instanceof String[]){
+                System.out.println(props[i]+ "=");
+                String[] multiple = (String[])prop;
+                for (int j=0;j< multiple.length;j++){
+                    System.out.println(multiple[j]+ ";"); 
+                }
+
+            }
+            else System.out.println(props[i]+ "="+ prop);
+        }
+        System.out.println("####Device Node");
+   }
+}

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNode.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNode.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNodeListener.java
URL: http://svn.apache.org/viewvc/felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNodeListener.java?rev=674879&r1=674878&r2=674879&view=diff
==============================================================================
--- felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNodeListener.java (original)
+++ felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNodeListener.java Tue Jul  8 09:59:54 2008
@@ -1,28 +1,28 @@
-/* 
- * 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.
- */
-
-package org.apache.felix.upnp.tester.discovery;
-
-/* 
-* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
-*/
-public interface DeviceNodeListener {
-	public void deviceDetected(DeviceNode d);
-	public void rootDeviceUnplugged(String udn);
-}
+/* 
+ * 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.
+ */
+
+package org.apache.felix.upnp.tester.discovery;
+
+/* 
+* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+*/
+public interface DeviceNodeListener {
+	public void deviceDetected(DeviceNode d);
+	public void rootDeviceUnplugged(String udn);
+}

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNodeListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNodeListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DeviceNodeListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DevicesList.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DevicesList.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DevicesList.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DriverProxy.java
URL: http://svn.apache.org/viewvc/felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DriverProxy.java?rev=674879&r1=674878&r2=674879&view=diff
==============================================================================
--- felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DriverProxy.java (original)
+++ felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DriverProxy.java Tue Jul  8 09:59:54 2008
@@ -1,123 +1,123 @@
-/* 
- * 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.
- */
-
-package org.apache.felix.upnp.tester.discovery;
-
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceListener;
-import org.osgi.framework.ServiceReference;
-
-import org.apache.felix.upnp.basedriver.controller.DevicesInfo;
-import org.apache.felix.upnp.basedriver.controller.DriverController;
-import org.apache.felix.upnp.tester.Activator;
-import org.apache.felix.upnp.tester.Mediator;
-/* 
-* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
-*/
-public class DriverProxy implements ServiceListener {
-    private DevicesInfo devicesInfo;
-    private DriverController drvController;
-    public DriverProxy(){
-        ServiceReference sr = Activator.context.getServiceReference(DevicesInfo.class.getName());
-        if (sr != null){
-            devicesInfo = (DevicesInfo)Activator.context.getService(sr);
-            drvController = (DriverController) devicesInfo;
-            Mediator.getControlPoint().enableMenus(true,getLogLevel(),getCyberDebug());
-            Mediator.getTreeViewer().setPopupMenuEnabled(true);
-        }
-        String filter =  "(" + Constants.OBJECTCLASS + "=" + DevicesInfo.class.getName() + ")" ;
-        try {
-            Activator.context.addServiceListener(this,filter);  
-        } catch (Exception ignored){};
-     }
-    
-    public boolean isDriverAvailable(){
-        return (drvController != null);
-    }
-    
-    public String getDeviceDescriptionURI(String udn){
-        if (devicesInfo != null)
-            return devicesInfo.getLocationURL(udn);
-        return "";
-    }
-    
-    public String getServiceDescriptionURI(String udn,String serviceId){
-        if (devicesInfo != null)
-            return devicesInfo.getSCPDURL(udn,serviceId);
-        return null;
-    }
-    
-    public String resolveRelativeUrl(String udn,String link){
-        if (devicesInfo != null)
-            return devicesInfo.resolveRelativeUrl(udn,link);
-        return null;
-    }
-    
-    public boolean getCyberDebug(){
-        if (drvController != null)
-            return drvController.getCyberDebug();
-        return false;
-    }
-    public void setCyberDebug(boolean b){
-        if (drvController != null)
-            drvController.setCyberDebug(b);
-    }
-    public int getLogLevel(){
-        if (drvController != null)
-            return drvController.getLogLevel();
-        return 0;
-    }
-    
-    public void setLogLevel(int value){
-        if (drvController != null)
-            drvController.setLogLevel(value);
-    }
-    public void doSearch(String target){
-        if (drvController != null)
-            drvController.search(target);
-    }
-    
-    
-    public void serviceChanged(ServiceEvent e) {
-        switch(e.getType()){
-            case ServiceEvent.REGISTERED:{
-                Object service = Activator.context.getService(e.getServiceReference());
-                if (service != null){
-                devicesInfo = (DevicesInfo) service;
-                drvController = (DriverController) devicesInfo;
-                Mediator.getControlPoint().enableMenus(true,getLogLevel(),getCyberDebug());
-                Mediator.getTreeViewer().setPopupMenuEnabled(true);
-                }
-            };break;
-            case ServiceEvent.UNREGISTERING:{   
-                devicesInfo = null;
-                drvController =null;
-                Mediator.getControlPoint().enableMenus(false,0,false);
-                Mediator.getTreeViewer().setPopupMenuEnabled(false);
-            };break;
-        }       
-    }
-    
-    public void close(){
-        Activator.context.removeServiceListener(this);           
-    }
-
-
-}
+/* 
+ * 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.
+ */
+
+package org.apache.felix.upnp.tester.discovery;
+
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+
+import org.apache.felix.upnp.basedriver.controller.DevicesInfo;
+import org.apache.felix.upnp.basedriver.controller.DriverController;
+import org.apache.felix.upnp.tester.Activator;
+import org.apache.felix.upnp.tester.Mediator;
+/* 
+* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+*/
+public class DriverProxy implements ServiceListener {
+    private DevicesInfo devicesInfo;
+    private DriverController drvController;
+    public DriverProxy(){
+        ServiceReference sr = Activator.context.getServiceReference(DevicesInfo.class.getName());
+        if (sr != null){
+            devicesInfo = (DevicesInfo)Activator.context.getService(sr);
+            drvController = (DriverController) devicesInfo;
+            Mediator.getControlPoint().enableMenus(true,getLogLevel(),getCyberDebug());
+            Mediator.getTreeViewer().setPopupMenuEnabled(true);
+        }
+        String filter =  "(" + Constants.OBJECTCLASS + "=" + DevicesInfo.class.getName() + ")" ;
+        try {
+            Activator.context.addServiceListener(this,filter);  
+        } catch (Exception ignored){};
+     }
+    
+    public boolean isDriverAvailable(){
+        return (drvController != null);
+    }
+    
+    public String getDeviceDescriptionURI(String udn){
+        if (devicesInfo != null)
+            return devicesInfo.getLocationURL(udn);
+        return "";
+    }
+    
+    public String getServiceDescriptionURI(String udn,String serviceId){
+        if (devicesInfo != null)
+            return devicesInfo.getSCPDURL(udn,serviceId);
+        return null;
+    }
+    
+    public String resolveRelativeUrl(String udn,String link){
+        if (devicesInfo != null)
+            return devicesInfo.resolveRelativeUrl(udn,link);
+        return null;
+    }
+    
+    public boolean getCyberDebug(){
+        if (drvController != null)
+            return drvController.getCyberDebug();
+        return false;
+    }
+    public void setCyberDebug(boolean b){
+        if (drvController != null)
+            drvController.setCyberDebug(b);
+    }
+    public int getLogLevel(){
+        if (drvController != null)
+            return drvController.getLogLevel();
+        return 0;
+    }
+    
+    public void setLogLevel(int value){
+        if (drvController != null)
+            drvController.setLogLevel(value);
+    }
+    public void doSearch(String target){
+        if (drvController != null)
+            drvController.search(target);
+    }
+    
+    
+    public void serviceChanged(ServiceEvent e) {
+        switch(e.getType()){
+            case ServiceEvent.REGISTERED:{
+                Object service = Activator.context.getService(e.getServiceReference());
+                if (service != null){
+                devicesInfo = (DevicesInfo) service;
+                drvController = (DriverController) devicesInfo;
+                Mediator.getControlPoint().enableMenus(true,getLogLevel(),getCyberDebug());
+                Mediator.getTreeViewer().setPopupMenuEnabled(true);
+                }
+            };break;
+            case ServiceEvent.UNREGISTERING:{   
+                devicesInfo = null;
+                drvController =null;
+                Mediator.getControlPoint().enableMenus(false,0,false);
+                Mediator.getTreeViewer().setPopupMenuEnabled(false);
+            };break;
+        }       
+    }
+    
+    public void close(){
+        Activator.context.removeServiceListener(this);           
+    }
+
+
+}

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DriverProxy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DriverProxy.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/DriverProxy.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/RootDeviceListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/RootDeviceListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: felix/trunk/upnp/tester/src/main/java/org/apache/felix/upnp/tester/discovery/RootDeviceListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message