|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Tune-related queries and updates for a (possibly-remote) JRec server
| Field Summary | |
static java.lang.String |
ENCODE_BINARY
|
static java.lang.String |
ENCODE_TEXT
|
static java.lang.String |
GET_KEYCOUNT_FOR_PLAYLIST
|
static java.lang.String |
GET_KEYCOUNT_FOR_QUERY
|
static java.lang.String |
GET_KEYS_FOR_FOLDER
|
static java.lang.String |
GET_KEYS_FOR_PLAYLIST
|
static java.lang.String |
GET_KEYS_FOR_QUERY
|
static java.lang.String |
HANDLER_NAME
|
| Fields inherited from interface jreceiver.common.rpc.ServerTable |
DELETE_RECS, GET_KEY_COUNT, GET_KEYS, GET_REC, GET_RECS, STORE_REC, STORE_RECS |
| Fields inherited from interface jreceiver.common.rpc.RpcBase |
DETECT |
| Method Summary | |
byte[] |
encodeBinary(TuneQuery tune_query,
int driver_id,
byte[] pattern,
int rec_offset,
int rec_count)
Obtain a BINARY list of tunes for a hash query, custom formatted with a caller-specified pattern, typically for use in building an internal playlist in an embedded device where memory is at a premium. |
java.lang.String |
encodeText(TuneQuery tune_query,
int driver_id,
java.lang.String pattern,
int rec_offset,
int rec_count)
Obtain a TEXT list of tunes for a hash query, custom formatted with a caller-specified pattern, for use in displaying a menu to the user. |
int |
getKeyCountForPlaylist(int pl_src_id,
int driver_id)
Return a count of Tune ids for a particular playlist, filtering out mime-types not supported by the specified driver. |
int |
getKeyCountForQuery(TuneQuery tune_query,
int driver_id)
Return a count of Tune ids for a hash query, filtering out mime-types not supported by the specified driver. |
java.util.Vector |
getKeysForFolder(int folder_id,
int driver_id,
java.lang.String order_by,
int rec_offset,
int rec_count)
Return a list of Tune ids for a particular folder, filtering out mime-types not supported by the specified driver. |
java.util.Vector |
getKeysForPlaylist(int pl_src_id,
int driver_id,
java.lang.String order_by,
int rec_offset,
int rec_count)
Return a list of Tune ids for a particular playlist, filtering out mime-types not supported by the specified driver. |
java.util.Vector |
getKeysForQuery(TuneQuery tune_query,
int driver_id,
java.lang.String order_by,
int rec_offset,
int rec_count)
Return a list of Tune ids for a hash query, filtering out mime-types not supported by the specified driver. |
| Methods inherited from interface jreceiver.common.rpc.ServerTable |
deleteRecs, getKeyCount, getKeys, getRec, getRec, getRecs, getRecs, storeRec, storeRecs |
| Methods inherited from interface jreceiver.common.rpc.RpcBase |
detect |
| Field Detail |
public static final java.lang.String HANDLER_NAME
public static final java.lang.String GET_KEYS_FOR_FOLDER
public static final java.lang.String GET_KEYS_FOR_PLAYLIST
public static final java.lang.String GET_KEYCOUNT_FOR_PLAYLIST
public static final java.lang.String GET_KEYS_FOR_QUERY
public static final java.lang.String GET_KEYCOUNT_FOR_QUERY
public static final java.lang.String ENCODE_TEXT
public static final java.lang.String ENCODE_BINARY
| Method Detail |
public java.util.Vector getKeysForFolder(int folder_id,
int driver_id,
java.lang.String order_by,
int rec_offset,
int rec_count)
throws RpcException
public java.util.Vector getKeysForPlaylist(int pl_src_id,
int driver_id,
java.lang.String order_by,
int rec_offset,
int rec_count)
throws RpcException
public int getKeyCountForPlaylist(int pl_src_id,
int driver_id)
throws RpcException
public int getKeyCountForQuery(TuneQuery tune_query,
int driver_id)
throws RpcException
Important note: this may be deprecated at some point in the future and be replaced by a full-featured interface.
filter - String any filter that you'd specify in a dynamic playlist
public java.util.Vector getKeysForQuery(TuneQuery tune_query,
int driver_id,
java.lang.String order_by,
int rec_offset,
int rec_count)
throws RpcException
Important note: this may be deprecated at some point in the future and be replaced by a full-featured interface.
filter - String any filter that you'd specify in a dynamic playlist
public byte[] encodeBinary(TuneQuery tune_query,
int driver_id,
byte[] pattern,
int rec_offset,
int rec_count)
throws RpcException
Data is returned as a byte array. All results are concatenated. Any record separators needed must be specified in the pattern.
Formatting of each record is done through a MessageFormatB (binary) pattern. As an example, the following
String pattern = "{0,word,le}{1,word,le}{2,word,le}";
will return each query result as
c001000 e5655000 b5010000
where each result is encoded as a 12-byte record, where
{0,word,le} will be replaced with the source identifier
(src_id) as a 4-byte word in little-endian order; {1...}
will be replaced with the filesize and {2...} replaced with
the offset in the tune file of the first MPEG frame.
This method provides a wrapper for the remote call to the server.
tune_query - Hashtable TODO: point to documentationpattern - byte[] a MessageFormatB pattern where {0} will be replaced
with the src_id and {1} will be replaced with the filesize and {2} replaced
with the MPEG data offset.begin - int the index of the first item of the results to returnend - int the index of the final item of the results to returnbyte[] concatenated binary recordsRpcException -
public java.lang.String encodeText(TuneQuery tune_query,
int driver_id,
java.lang.String pattern,
int rec_offset,
int rec_count)
throws RpcException
Data is returned as a String. All results are concatenated. Any record separators needed must be specified in the pattern.
Formatting of each record is done through a MessageFormat pattern. As an example, the following
String pattern = "{0,hex}=T{1}\r\n";
will format each result matching the filter as
1d0=TSenses Working Overtime\r\n
where {0,hex} will be replaced with the source identifier
(src_id), in hexadecimal; {1} will be replaced with the
tune title.
Note that the 'hex' element format isn't a standard formatter of MessageFormat, but it is supported here in a minor kludge.
This method provides a wrapper for the remote call to the server.
tune_query - Hashtable TODO: point to documentationpattern - String a MessageFormat pattern where {0} will be replaced
with the src_id and {1} will be replaced with the tune title.begin - int the index of the first item of the results to returnend - int the index of the final item of the results to returnString concatenated String records.RpcException -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||