congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ItemNode.getFirstResource
Code IndexAdd Tabnine to your IDE (free)

How to use
getFirstResource
method
in
org.cybergarage.upnp.std.av.server.object.item.ItemNode

Best Java code snippets using org.cybergarage.upnp.std.av.server.object.item.ItemNode.getFirstResource (Showing top 3 results out of 315)

origin: cybergarage/cybergarage-upnp

public boolean setAVTransportURI(
    Device dev,
    ItemNode itemNode)
{
  if (dev == null)
    return false;
  
  ResourceNode resNode = itemNode.getFirstResource();
  if (resNode == null)
    return false;
  String resURL = resNode.getURL();
  if (resURL == null || resURL.length() <= 0)
    return false;
  
  Service avTransService = dev.getService(AVTransport.SERVICE_TYPE);
  if (avTransService == null)
    return false;
  
  Action action = avTransService.getAction(AVTransport.SETAVTRANSPORTURI);
  if (action == null)
    return false;
  
  action.setArgumentValue(AVTransport.INSTANCEID, "0");
  action.setArgumentValue(AVTransport.CURRENTURI, resURL);
  action.setArgumentValue(AVTransport.CURRENTURIMETADATA, "");
  
  return action.postControlAction();
}

origin: geniusgithub/MediaPlayer

public boolean setAVTransportURI(
    Device dev,
    ItemNode itemNode)
{
  if (dev == null)
    return false;
  
  ResourceNode resNode = itemNode.getFirstResource();
  if (resNode == null)
    return false;
  String resURL = resNode.getURL();
  if (resURL == null || resURL.length() <= 0)
    return false;
  
  Service avTransService = dev.getService(AVTransport.SERVICE_TYPE);
  if (avTransService == null)
    return false;
  
  Action action = avTransService.getAction(AVTransport.SETAVTRANSPORTURI);
  if (action == null)
    return false;
  
  action.setArgumentValue(AVTransport.INSTANCEID, "0");
  action.setArgumentValue(AVTransport.CURRENTURI, resURL);
  action.setArgumentValue(AVTransport.CURRENTURIMETADATA, "");
  
  return action.postControlAction();
}

origin: geniusgithub/MediaPlayer

   public static MediaItem create(ItemNode node){
     MediaItem item = new MediaItem();
     item.setStringid(node.getID());
     item.setTitle(node.getTitle());
     item.setObjectClass(node.getUPnPClass());
     item.setDate(node.getDateTime());
     item.setAlbum(node.getAlbum());
     item.setAlbumUri(node.getAlbumArtURI());
     item.setArtist(node.getArtist());
     ResourceNode resourceNode = node.getFirstResource();
     if (resourceNode != null){
       item.setRes(resourceNode.getURL());
       item.setprotocolInfo(resourceNode.getProtocolInfo());
       item.setDuration(DlnaUtil.formatDurationString(resourceNode.getDuration()));
       item.setSize(DlnaUtil.formatSizeString(resourceNode.getSize()));
     }
    return item;
   }
}
org.cybergarage.upnp.std.av.server.object.itemItemNodegetFirstResource

Popular methods of ItemNode

  • getID
  • <init>
  • getDateTime
  • isItemNode
  • addNode
  • addResourceNode
  • getContentDirectory
  • getContentInputStream
  • getContentLength
  • getDate
  • getMimeType
  • getNResourceNodeLists
  • getMimeType,
  • getNResourceNodeLists,
  • getPropertyAttribureValue,
  • getPropertyLongValue,
  • getPropertyValue,
  • getProtocolInfo,
  • getResource,
  • getResourceNode,
  • getTitle

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now