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)