Examples of UPnPDevice


Examples of com.aelitis.net.upnp.UPnPDevice

      return;
    }
   
    mapper_enabled = upnp_plugin != null && upnp_plugin.isEnabled();
     
    UPnPDevice  device = getUPnPDevice();
   
    if ( mapper_enabled && device != null ){
   
      current_services = upnp_plugin.getServices( device );
     
View Full Code Here

Examples of com.aelitis.net.upnp.UPnPDevice

 
  protected static String
  getDisplayName(
    UPnPDevice    device )
  {
    UPnPDevice  root = device.getRootDevice().getDevice();
   
    String fn = root.getFriendlyName();
   
    if ( fn == null || fn.length() == 0 ){
     
      fn = device.getFriendlyName();
    }
   
    String  dn = root.getModelName();
   
    if ( dn == null || dn.length() == 0 ){
   
      dn = device.getModelName();
    }
View Full Code Here

Examples of com.aelitis.net.upnp.UPnPDevice

  public browseLocation[]
  getBrowseLocations()
  {
    List<browseLocation>  locs = new ArrayList<browseLocation>();
 
    UPnPDevice device = device_may_be_null;
   
    if ( device != null ){
     
      URL    presentation = getPresentationURL( device );

      if ( presentation != null ){
         
        locs.add( new browseLocationImpl( "device.upnp.present_url", presentation ));
      }
     
      int userMode = COConfigurationManager.getIntParameter("User Mode");
     
      if ( userMode > 1 ){
     
        locs.add( new browseLocationImpl( "device.upnp.desc_url", device.getRootDevice().getLocation()));
      }
    }
   
    return( locs.toArray( new browseLocation[ locs.size() ]));
  }
View Full Code Here

Examples of com.aelitis.net.upnp.UPnPDevice

  }
 
  protected URL
  getLocation()
  {
    UPnPDevice device = device_may_be_null;
   
    if ( device != null ){
     
      UPnPRootDevice root = device.getRootDevice();
     
      return( root.getLocation());
    }
   
    return( null );
View Full Code Here

Examples of com.aelitis.net.upnp.UPnPDevice

  public InetAddress
  getAddress()
  {
    try{

      UPnPDevice device = device_may_be_null;
 
      if ( device != null ){
       
        UPnPRootDevice root = device.getRootDevice();
       
        URL location = root.getLocation();
       
        return( InetAddress.getByName( location.getHost() ));
       
View Full Code Here

Examples of com.aelitis.net.upnp.UPnPDevice

  getDisplayProperties(
    List<String[]>  dp )
  {
    super.getDisplayProperties( dp );
   
    UPnPDevice device = device_may_be_null;
   
    if ( device != null ){
     
      UPnPRootDevice root = device.getRootDevice();
     
      URL location = root.getLocation();
     
      addDP( dp, "dht.reseed.ip", location.getHost() + ":" + location.getPort());
 
      String  model_details   = device.getModelName();
      String  model_url    = device.getModelURL();
     
      if ( model_url != null && model_url.length() > 0 ){
        model_details += " (" + model_url + ")";
      }
     
      String  manu_details   = device.getManufacturer();
      String  manu_url    = device.getManufacturerURL();
     
      if ( manu_url != null && manu_url.length() > 0 ){
        manu_details += " (" + manu_url + ")";
      }
     
      addDP( dp, "device.model.desc", device.getModelDescription());
      addDP( dp, "device.model.name", model_details );
      addDP( dp, "device.model.num", device.getModelNumber());
      addDP( dp, "device.manu.desc", manu_details );
    }else{
     
      InetAddress ia = getAddress();
     
View Full Code Here

Examples of com.aelitis.net.upnp.UPnPDevice

    super.generate( writer );
   
    try{
      writer.indent();
     
      UPnPDevice device = device_may_be_null;
     
      if ( device == null ){
       
        writer.println( "upnp_device=null" );
       
      }else{
       
        writer.println( "upnp_device=" + device.getFriendlyName());
      }
 
      writer.println( "dyn_xcode=" + (dynamic_transcode_profile==null?"null":dynamic_transcode_profile.getName()));
    }finally{
     
View Full Code Here

Examples of com.aelitis.net.upnp.UPnPDevice

     
      DeviceMediaRenderer renderer = (DeviceMediaRenderer)device;
     
      if ( renderer instanceof DeviceUPnPImpl ){
       
        UPnPDevice upnp_device = ((DeviceUPnPImpl)renderer).getUPnPDevice();
       
        if ( upnp_device != null ){
         
          String lc_manufacturer   = getOptionalLC( upnp_device.getManufacturer());
          String lc_model      = getOptionalLC( upnp_device.getModelName());
          String lc_fname      = getOptionalLC( upnp_device.getFriendlyName());
         
          if ( lc_manufacturer.startsWith( "samsung" )){
           
            device.setPersistentStringProperty( DeviceImpl.PP_REND_CLASSIFICATION, "samsung.generic" );
           
            TranscodeProfile[] profiles = device.getTranscodeProfiles();
           
            if ( profiles.length == 0 ){
             
              device.setTranscodeRequirement( TranscodeTarget.TRANSCODE_NEVER );
             
            }else{
             
              device.setTranscodeRequirement( TranscodeTarget.TRANSCODE_WHEN_REQUIRED );
            }
          }else if ( lc_manufacturer.startsWith( "western digital" )){
             
              device.setPersistentStringProperty( DeviceImpl.PP_REND_CLASSIFICATION, "western.digital.generic" );
             
              TranscodeProfile[] profiles = device.getTranscodeProfiles();
             
              if ( profiles.length == 0 ){
               
                device.setTranscodeRequirement( TranscodeTarget.TRANSCODE_NEVER );
               
              }else{
               
                device.setTranscodeRequirement( TranscodeTarget.TRANSCODE_WHEN_REQUIRED );
              }
          }else if ( lc_manufacturer.startsWith( "sony" ) && lc_fname.startsWith( "bravia" )){
             
            device.setPersistentStringProperty( DeviceImpl.PP_REND_CLASSIFICATION, "sony.bravia" );
             
          }else if ( lc_model.equals( "windows media player" )){
           
            String model_number = upnp_device.getModelNumber();
           
            if ( model_number != null ){
             
              try{
                int num = Integer.parseInt( model_number );
View Full Code Here

Examples of net.yacy.upnp.devices.UPNPDevice

    this( igd, true, true );
  }
 
  private InternetGatewayDevice( UPNPRootDevice igd, boolean WANIPConnection, boolean WANPPPConnection ) throws UnsupportedOperationException {
    this.igd = igd;
    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.UPnPDevice

      Mediator.getPropertiesViewer().showSubscriptionPanel(false);

    if ( node.category.equals(UPnPDeviceTreeNode.DEVICE)
      ||node.category.equals(UPnPDeviceTreeNode.ROOT_DEVICE)){
      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);
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.