Examples of UPNPService


Examples of net.yacy.upnp.services.UPNPService

    UPNPDevice myIGDWANConnDevice = igd.getChildDevice( "urn:schemas-upnp-org:device:WANConnectionDevice:1" );
    if ( myIGDWANConnDevice == null ) {
      throw new UnsupportedOperationException( "device urn:schemas-upnp-org:device:WANConnectionDevice:1 not supported by IGD device " + igd.getModelName() );
    }

    UPNPService wanIPSrv = myIGDWANConnDevice.getService( "urn:schemas-upnp-org:service:WANIPConnection:1" );
    UPNPService wanPPPSrv = myIGDWANConnDevice.getService( "urn:schemas-upnp-org:service:WANPPPConnection:1" );

    if ( ( WANIPConnection && WANPPPConnection ) && ( wanIPSrv == null && wanPPPSrv == null ) ) {
      throw new UnsupportedOperationException( "Unable to find any urn:schemas-upnp-org:service:WANIPConnection:1 or urn:schemas-upnp-org:service:WANPPPConnection:1 service" );
    } else if ( ( WANIPConnection && !WANPPPConnection ) && wanIPSrv == null ) {
      throw new UnsupportedOperationException( "Unable to find any urn:schemas-upnp-org:service:WANIPConnection:1 service" );
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

      DeviceNode device = (DeviceNode) node.getUserObject();
      UPnPDevice upnpDevice = device.getDevice(Activator.context);
      makeProperties(upnpDevice);
    }
    else if (node.category.equals(UPnPDeviceTreeNode.SERVICE)){
      UPnPService service = (UPnPService) node.getUserObject();     
      makeProperties(service);
    }
    else if (node.category.equals(UPnPDeviceTreeNode.ACTION)){
      UPnPAction action = (UPnPAction) node.getUserObject();
      makeProperties(action);
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

                    UPnPDeviceTreeNode parent =  (UPnPDeviceTreeNode)selectedNode.getParent();
                    while (parent.category!=UPnPDeviceTreeNode.ROOT_DEVICE)
                         parent =  (UPnPDeviceTreeNode)parent.getParent();
                    DeviceNode device =  (DeviceNode) parent.getUserObject();
                    String udn = (String)device.getReference().getProperty(UPnPDevice.UDN);
                    UPnPService service =  (UPnPService) selectedNode.getUserObject();
                    url = Mediator.getDriverProxy().getServiceDescriptionURI(udn,service.getId());
                }                   
                Util.openUrl(url);  
            }
        })).setText("Show Description");
        addPopupMenuListener(this);
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

        UPnPDevice dev = (UPnPDevice) tracker.getService(ref);
        if (null == dev)
            return;

        UPnPService services[] = dev.getServices();
        if (null != services && services.length > 0)
        {
            pw.println("  Services:");
            for (int i = 0; i < services.length; i++)
            {
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

                    }
                }
            }
            else if ("serviceDetails".equals(method)) //$NON-NLS-1$
            {
                UPnPService service = requireService(request);
                SessionObject session = getSession(request)//
                .subscribe(require("udn", request), service.getId()); //$NON-NLS-1$

                json = Serializer.serviceToJSON(service, session);
            }
            else if ("invokeAction".equals(method)) //$NON-NLS-1$
            {
                UPnPService service = requireService(request);
                UPnPAction action = service.getAction(require("actionID", request)); //$NON-NLS-1$

                json = invoke(action, //
                    request.getParameterValues("names"), //$NON-NLS-1$
                    request.getParameterValues("vals")); //$NON-NLS-1$
            }
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

                    }
                }
            }
            else if ("serviceDetails".equals(method)) //$NON-NLS-1$
            {
                UPnPService service = requireService(request);
                SessionObject session = getSession(request)//
                .subscribe(require("udn", request), service.getId()); //$NON-NLS-1$

                json = serviceToJSON(service, session);
            }
            else if ("invokeAction".equals(method)) //$NON-NLS-1$
            {
                UPnPService service = requireService(request);
                UPnPAction action = service.getAction(require("actionID", request)); //$NON-NLS-1$

                json = invoke(action, //
                    request.getParameterValues("names"), //$NON-NLS-1$
                    request.getParameterValues("vals")); //$NON-NLS-1$
            }
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

    if (category.equals(DEVICE)||category.equals(ROOT_DEVICE)){
      DeviceNode node =  (DeviceNode) getUserObject();
      return node.toString();
    }
    else if (category.equals(SERVICE)){
      UPnPService node =  (UPnPService) getUserObject();
      return node.getType();
    }
    else if (category.equals(ACTION)){
      UPnPAction node =  (UPnPAction) getUserObject();
      return node.getName();
    }
    else if (category.equals(STATE) ||category.equals(EVENTED_STATE)||category.equals(SUBSCRIBED_STATE)){
      UPnPStateVariable node =  (UPnPStateVariable) getUserObject();
      return node.getName();
    }
    else
      return getUserObject().toString();
  }
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

        final UPnPAction action2 = m_control.createMock(UPnPAction.class);
        EasyMock.expect(action2.getOutputArgumentNames()).andReturn(new String[]{returnType}).anyTimes();
        EasyMock.expect(action2.invoke(null)).andReturn(p).anyTimes();

        final UPnPService service = m_control.createMock(UPnPService.class);
        EasyMock.expect(service.getAction("GetLocation")).andReturn(action1).anyTimes();
        EasyMock.expect(service.getAction("GetServerType")).andReturn(action2).anyTimes();

        UPnPDevice device = m_control.createMock(UPnPDevice.class);
        EasyMock.expect(device.getService(EasyMock.isA(String.class))).andReturn(service).anyTimes();

        return device;
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

        if ( m_devices.size() > 0 ) {
            device = (UPnPDevice)m_devices.iterator().next();
        }

        if (device != null) {
                UPnPService svc = device.getService(SERVICE_ID);
                if (svc != null) {
                    return svc.getAction(name);
                }
        }
        return null;
    }
View Full Code Here

Examples of org.osgi.service.upnp.UPnPService

        if ( m_devices.size() > 0 ) {
            device = (UPnPDevice)m_devices.iterator().next();
        }

        if (device != null) {
                UPnPService svc = device.getService(SERVICE_ID);
                if (svc != null) {
                    return svc.getAction(name);
                }
        }
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.