Package org.cybergarage.upnp.std.av.player.action

Examples of org.cybergarage.upnp.std.av.player.action.BrowseAction


      return null;
    Action action = conDir.getAction(ContentDirectory.BROWSE);
    if (action == null)
      return null;

    BrowseAction browseAction = new BrowseAction(action);
    browseAction.setObjectID(objectID);
    browseAction.setBrowseFlag(browseFlag);
    browseAction.setStartingIndex(startIndex);
    browseAction.setRequestedCount(requestedCount);
    browseAction.setFilter(filter);
    browseAction.setSortCriteria(sortCaiteria);
    if (browseAction.postControlAction() == false)
      return null;

    /*
     * ContentDirectory:1 Service Template Version 1.01
     * 2.7.4.2. Argument Descriptions
     *  RequestedCount ui4 Requested number of entries under the object specified by ObjectID.
     *  RequestedCount =0 indicates request all entries.
     * Added to set the RequestedCount parameter using the NumberReturned result when the specified parameter is zero and
     * the NumberReturned parameter is less than the TotalMatches parameter for XMBC.
    */
    if (requestedCount == 0) {
      int numberReturned = browseAction.getNumberReturned();
      int totalMatches = browseAction.getTotalMatches();
      if (numberReturned == 0) {
        if (0 < totalMatches) {
          browseAction.setRequestedCount(totalMatches);
          if (browseAction.postControlAction() == false)
            return null;
        }
        else {
          browseAction.setRequestedCount(9999);
          if (browseAction.postControlAction() == false)
            return null;
        }
      }
    }
   
    Argument resultArg = browseAction.getArgument(BrowseAction.RESULT);
    if (resultArg == null)
      return null;

    String resultStr = resultArg.getValue();
    if (resultStr == null)
View Full Code Here

TOP

Related Classes of org.cybergarage.upnp.std.av.player.action.BrowseAction

Copyright © 2018 www.massapicom. 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.