YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.openhome.OhIds Class Reference

Track ids of the OpenHome playlist: a number from 1 to 4294967295 (0 means "none"), and the two texts that carry lists of ids: the IdArray (the ids as big-endian 32 bit numbers one after the other, base64 in the XML) and the IdList of ReadList (decimal numbers separated by blanks). More...

Collaboration diagram for de.yaacc.openhome.OhIds:
Collaboration graph

Static Public Member Functions

static boolean isId (long id)
 
static String encodeIdArray (List< Long > ids)
 
static List< Long > decodeIdArray (String base64)
 
static List< Long > parseIdList (String text, int max)
 The ids of an IdList: decimal numbers separated by blanks.
 
static String formatIdList (List< Long > ids)
 

Static Public Attributes

static final long NONE = 0
 
static final long MAX_ID = 0xFFFFFFFFL
 
static final int MAX_LIST = 10_000
 What a controller accepts from a device: far above the 1000 tracks of a playlist, far below a memory problem.
 

Detailed Description

Track ids of the OpenHome playlist: a number from 1 to 4294967295 (0 means "none"), and the two texts that carry lists of ids: the IdArray (the ids as big-endian 32 bit numbers one after the other, base64 in the XML) and the IdList of ReadList (decimal numbers separated by blanks).

The input of a device or a control point is read strictly and bounded.

Member Function Documentation

◆ decodeIdArray()

static List< Long > de.yaacc.openhome.OhIds.decodeIdArray ( String base64)
static
Returns
the ids; never null
Exceptions
IllegalArgumentExceptionfor text that is no id array (not base64, not a multiple of 4 bytes, an id 0, more than MAX_LIST ids)

Referenced by de.yaacc.openhome.OhRemote.idArray().

Here is the caller graph for this function:

◆ parseIdList()

static List< Long > de.yaacc.openhome.OhIds.parseIdList ( String text,
int max )
static

The ids of an IdList: decimal numbers separated by blanks.

Text that is no id is skipped (the reference implementation skips it too); at most max ids are read.


The documentation for this class was generated from the following file: