BlowTorch
 All Classes Namespaces Files Functions Variables Enumerator Pages
Classes | Public Member Functions | List of all members
com.offsetnull.bt.service.Processor Class Reference

Classes

class  GMCPWatcher
 

Public Member Functions

 Processor (final Handler useme, final String pEncoding, final Context pContext)
 
final boolean isDebugTelnet ()
 
final void setDebugTelnet (final boolean debugTelnet)
 
final byte[] rawProcess (final byte[] data)
 
final void dispatchIAC (final byte action, final byte option)
 
final boolean dispatchSUB (final byte[] negotiation)
 
final void setEncoding (final String encoding)
 
final String getEncoding ()
 
final void setDisplayDimensions (final int rows, final int cols)
 
final void disaptchNawsString ()
 
final void reset ()
 
final Object getGMCPValue (final String str)
 
final HashMap< String, Object > getGMCPTable (final String path)
 
final void initGMCP ()
 
final byte[] getGMCPResponse (final String str) throws UnsupportedEncodingException
 
final void dumpGMCP ()
 
final void addWatcher (final String module, final String plugin, final String callback)
 
final void setUseGMCP (final Boolean value)
 
final void setGMCPSupports (final String value)
 

Detailed Description

Class implementation for the telnet state machine.

Constructor & Destructor Documentation

com.offsetnull.bt.service.Processor.Processor ( final Handler  useme,
final String  pEncoding,
final Context  pContext 
)

Constructor.

Parameters
usemereporting handler target.
pEncodingselected encoding to use.
pContextapplication content.

Here is the call graph for this function:

Member Function Documentation

final void com.offsetnull.bt.service.Processor.addWatcher ( final String  module,
final String  plugin,
final String  callback 
)

Adds a new gmcp watcher for a given module path.

Parameters
moduleModule path, e.g. char.vitals.hp.
pluginThe target plugin that is watching.
callbackThe callback function to execute when module has changed.
final void com.offsetnull.bt.service.Processor.disaptchNawsString ( )

Helper method for naws. This may happen because the foreground window changed shape.

Here is the call graph for this function:

Here is the caller graph for this function:

final void com.offsetnull.bt.service.Processor.dispatchIAC ( final byte  action,
final byte  option 
)

Telnet negotiation sequence.

Parameters
actionThe action byte (WILL, WONT, DO, DONT)
optionThe numeric indicator of the telnet negotiation type (TTYPE, GMCP, ECHO ...)

Here is the call graph for this function:

Here is the caller graph for this function:

final boolean com.offsetnull.bt.service.Processor.dispatchSUB ( final byte[]  negotiation)

Telnet subnegotiation handler.

Parameters
negotiationthe subnegotiation sequence.
Returns
I think the return value here means start compression. But that would be bad.

Here is the call graph for this function:

Here is the caller graph for this function:

final void com.offsetnull.bt.service.Processor.dumpGMCP ( )

Utility method to dump the current gmcp data to the log.

Here is the call graph for this function:

final String com.offsetnull.bt.service.Processor.getEncoding ( )

Getter for mEncoding.

Returns
The currently selected encoding.
final byte [] com.offsetnull.bt.service.Processor.getGMCPResponse ( final String  str) throws UnsupportedEncodingException

Helper method to respond to the GMCP negotiation sequence.

Parameters
strThe subnegotiation string.
Returns
The response.
Exceptions
UnsupportedEncodingExceptionThrown if the selected encoding isn't supported.

Here is the caller graph for this function:

final HashMap<String, Object> com.offsetnull.bt.service.Processor.getGMCPTable ( final String  path)

Helper method to get a GMCP table for a given path.

Parameters
pathThe module path, e.g. char.vitals.hp
Returns
The mapping of objects representing the gmcp table at the desired path.

Here is the call graph for this function:

final Object com.offsetnull.bt.service.Processor.getGMCPValue ( final String  str)

Helper method to get a GMCP module quickly.

Parameters
strThe module to get?
Returns
The table of data?

Here is the call graph for this function:

final void com.offsetnull.bt.service.Processor.initGMCP ( )

Utility method to initialize GMCP.

Here is the call graph for this function:

Here is the caller graph for this function:

final boolean com.offsetnull.bt.service.Processor.isDebugTelnet ( )

Getter for mDebugTelnet.

Returns
mDebugTelnet
final byte [] com.offsetnull.bt.service.Processor.rawProcess ( final byte[]  data)

The main processing routine.

Parameters
dataThe data to process.
Returns
The processed data minus telnet data.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Processor.reset ( )

Reset method, this is called when the settings have been foreably reloaded.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Processor.setDebugTelnet ( final boolean  debugTelnet)

Setter for mDebugTelnet.

Parameters
debugTelnetvalue for mDebugTelnet
final void com.offsetnull.bt.service.Processor.setDisplayDimensions ( final int  rows,
final int  cols 
)

Helper method for NAWS.

Parameters
rowsRows in display.
colsColumns in display.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Processor.setEncoding ( final String  encoding)

Setter for mEncoding.

Parameters
encodingSelected encoding.

Here is the caller graph for this function:

final void com.offsetnull.bt.service.Processor.setGMCPSupports ( final String  value)

Setter method for mGMCPSupports.

Parameters
valueThe new value for mGMCPSupports.
final void com.offsetnull.bt.service.Processor.setUseGMCP ( final Boolean  value)

Setter method for mUseGMCP.

Parameters
valuethe new value for mUseGMCP.

Here is the call graph for this function:


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