jreceiver.common.rpc
Interface PlaylistEncoder

All Superinterfaces:
RpcBase

public interface PlaylistEncoder
extends RpcBase

Playlists-related queries and updates for a (possibly-remote) JRec server, returning formatted results.

Calls are made remotely to a PlaylistsHandler class.

Version:
$Revision: 1.3 $ $Date: 2002/12/29 00:44:08 $
Author:
Reed Esau

Field Summary
static java.lang.String ENCODE_PLAYLISTS
           
static java.lang.String HANDLER_NAME
           
 
Fields inherited from interface jreceiver.common.rpc.RpcBase
DETECT
 
Method Summary
 java.lang.String encodePlaylists(java.lang.String pattern, int rec_offset, int rec_count)
          Obtain a TEXT list of of all playlists (both static files and dynamic playlists) formatted with a caller-specified pattern, for use in displaying a menu to the user.
 
Methods inherited from interface jreceiver.common.rpc.RpcBase
detect
 

Field Detail

HANDLER_NAME

public static final java.lang.String HANDLER_NAME

ENCODE_PLAYLISTS

public static final java.lang.String ENCODE_PLAYLISTS
Method Detail

encodePlaylists

public java.lang.String encodePlaylists(java.lang.String pattern,
                                        int rec_offset,
                                        int rec_count)
                                 throws RpcException
Obtain a TEXT list of of all playlists (both static files and dynamic playlists) formatted with a caller-specified pattern, for use in displaying a menu to the user.

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}=P{1}\r\n";
 
will format each result like
     1d0=PEnglishSettlement\r\n
 
where {0,hex} will be replaced with the source identifier (src_id), in hexadecimal; {1} will be replaced with the playlist 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.

Parameters:
pattern - 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 return
end - int the index of the final item of the results to return
Returns:
String concatenated String records.
Throws:
RpcException -  


Copyright © 2001-2002 Reed Esau, All Rights Reserved.