BlowTorch
 All Classes Namespaces Files Functions Variables Enumerator Pages
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
com.offsetnull.bt.service.Connection Class Reference
Inheritance diagram for com.offsetnull.bt.service.Connection:
Inheritance graph
[legend]
Collaboration diagram for com.offsetnull.bt.service.Connection:
Collaboration graph
[legend]

Classes

class  Data
 

Public Member Functions

 Connection (final String display, final String host, final int port, final StellarService service)
 
final void windowXCallS (final String name, final String function, final Object o) throws RemoteException
 
final void reloadSettings ()
 
final void buildTriggerSystem ()
 
final void registerWindowCallback (final String name, final IWindowCallback callback)
 
final void unregisterWindowCallback (final IWindowCallback callback)
 
final void setTriggersDirty ()
 
final void sendDataToWindow (final String message)
 
final void sendBytesToWindow (final byte[] data)
 
final Data processCommand (final String cmd)
 
final void switchTo (final String connection)
 
final WindowToken[] getWindows ()
 
final String getScript (final String plugin, final String name)
 
final void executeFunctionCallback (final int id, final String callback, final String args)
 
final void pluginXcallS (final String plugin, final String function, final String str)
 
final WindowToken getWindowByName (final String desired)
 
final HashMap< String,
TriggerData
getTriggers ()
 
final HashMap< String,
TriggerData
getPluginTriggers (final String name)
 
final void addTrigger (final TriggerData data)
 
final void updateTrigger (final TriggerData from, final TriggerData to)
 
final void updatePluginTrigger (final String selectedPlugin, final TriggerData from, final TriggerData to)
 
final void newPluginTrigger (final String selectedPlugin, final TriggerData data)
 
final TriggerData getPluginTrigger (final String selectedPlugin, final String pattern)
 
final TriggerData getTrigger (final String pattern)
 
final void setPluginTriggerEnabled (final String selectedPlugin, final boolean enabled, final String key)
 
final void setTriggerEnabled (final boolean enabled, final String key)
 
final void deletePluginTrigger (final String selectedPlugin, final String which)
 
final void deleteTrigger (final String which)
 
final void setAliases (final HashMap< String, AliasData > map)
 
final void setPluginAliases (final String plugin, final HashMap< String, AliasData > map)
 
final AliasData getPluginAlias (final String plugin, final String key)
 
final AliasData getAlias (final String key)
 
final void deleteAlias (final String key)
 
final void deletePluginAlias (final String plugin, final String key)
 
final HashMap< String, AliasDatagetAliases ()
 
final HashMap< String, AliasDatagetPluginAliases (final String plugin)
 
final ArrayList< String > getSystemCommands ()
 
final void setPluginAliasEnabled (final String plugin, final boolean enabled, final String key)
 
final void setAliasEnabled (final boolean enabled, final String key)
 
final byte[] doKeyboardAliasReplace (final byte[] bytes, final Boolean reprocess)
 
final void startReconnect ()
 
final void doReconnect ()
 
final void deletePluginTimer (final String plugin, final String name)
 
final TimerData getTimer (final String name)
 
final void deleteTimer (final String name)
 
final TimerData getPluginTimer (final String plugin, final String name)
 
final void addPluginTimer (final String plugin, final TimerData newtimer)
 
final void updatePluginTimer (final String plugin, final TimerData old, final TimerData newtimer)
 
final void updateTimer (final TimerData old, final TimerData newtimer)
 
final HashMap< String, TimerDatagetTimers ()
 
final HashMap< String, TimerDatagetPluginTimers (final String plugin)
 
final void addTimer (final TimerData newtimer)
 
final boolean isWindowShowing ()
 
final String getDisplayName ()
 
final Context getContext ()
 
final void playTimer (final String key)
 
final void playPluginTimer (final String plugin, final String timer)
 
final void pauseTimer (final String key)
 
final void pausePluginTimer (final String plugin, final String timer)
 
final void stopTimer (final String key)
 
final void stopPluginTimer (final String plugin, final String key)
 
final SettingsGroup getSettings ()
 
final SettingsGroup getPluginSettings (final String plugin)
 
final void updateBooleanSetting (final String key, final boolean value)
 
final void updatePluginBooleanSetting (final String plugin, final String key, final boolean value)
 
final void updateStringSetting (final String key, final String value)
 
final void updatePluginStringSetting (final String plugin, final String key, final String value)
 
final void updateIntegerSetting (final String key, final int value)
 
final void updatePluginIntegerSetting (final String plugin, final String key, final int value)
 
final void updateFloatSetting (final String key, final float value)
 
final void updatePluginFloatSetting (final String plugin, final String key, final float value)
 
final void handleWindowSettingsChanged (final String window, final String key, final String value)
 
final void updateSetting (final String key, final String value)
 
final void updateWindowBufferMaxValue (final String plugin, final String window, final int amount)
 
final void saveMainSettings ()
 
final void exportSettings (final String path)
 
final void startExportSequence (final String path)
 
final void attatchWindowSettingsChangedListener (final WindowToken w)
 
final boolean isKeepLast ()
 
final boolean isFullScren ()
 
final String getHostName ()
 
final int getPort ()
 
final void resetSettings ()
 
final void doResetSettings ()
 
final void startLoadSettingsSequence (final String path)
 
final void doAddLink (final String path)
 
final void addLink (final String path)
 
final void deletePlugin (final String plugin)
 
final void setPluginEnabled (final String plugin, final boolean enabled)
 
final HashMap< String,
DirectionData
getDirectionData ()
 
final void setDirectionData (final HashMap< String, DirectionData > data)
 
final int getTitleBarHeight ()
 
final int getStatusBarHeight ()
 
final boolean isLinkLoaded (final String link)
 
final void initWindows ()
 
final void shutdown ()
 
final String getPluginPath (final String plugin)
 
final void dispatchLuaText (final String str)
 
final void callPluginFunction (final String plugin, final String function)
 
final SettingsChangedListener getSettingsListener ()
 
final void callPlugin (final String plugin, final String function, final String data)
 
final boolean pluginSupports (final String plugin, final String function)
 
final boolean isPluginInstalled (final String desired)
 
final Handler getHandler ()
 
final ArrayList< PlugingetPlugins ()
 
final DataPumper getPump ()
 
final Processor getProcessor ()
 
final String getDisplay ()
 
final String getHost ()
 
final boolean isConnected ()
 
final StellarService getService ()
 
String getPluginOptionValue (String plugin, String key)
 
- Public Member Functions inherited from com.offsetnull.bt.service.SettingsChangedListener
void updateSetting (String key, String value)
 
- Public Member Functions inherited from com.offsetnull.bt.service.ConnectionPluginCallback
WindowToken getWindowByName (String name)
 
void attatchWindowSettingsChangedListener (WindowToken w)
 
void callPlugin (String plugin, String function, String data)
 
boolean pluginSupports (String plugin, String function)
 

Static Public Member Functions

static int getResId (final String variableName, final Context context, final Class<?> c)
 

Static Public Attributes

static final int MESSAGE_STARTUP = 1
 
static final int MESSAGE_STARTCOMPRESS = 2
 
static final int MESSAGE_PROCESSORWARNING = 3
 
static final int MESSAGE_SENDOPTIONDATA = 4
 
static final int MESSAGE_BELLINC = 5
 
static final int MESSAGE_DODIALOG = 6
 
static final int MESSAGE_PROCESS = 7
 
static final int MESSAGE_DISCONNECTED = 8
 
static final int MESSAGE_MCCPFATALERROR = 9
 
static final int MESSAGE_SENDDATA_BYTES = 9
 
static final int MESSAGE_LINETOWINDOW = 10
 
static final int MESSAGE_LUANOTE = 11
 
static final int MESSAGE_DRAWINDOW = 12
 
static final int MESSAGE_NEWWINDOW = 13
 
static final int MESSAGE_WINDOWBUFFER = 15
 
static final int MESSAGE_ADDFUNCTIONCALLBACK = 16
 
static final int MESSAGE_WINDOWXCALLS = 17
 
static final int MESSAGE_INVALIDATEWINDOWTEXT = 18
 
static final int MESSAGE_GMCPTRIGGERED = 19
 
static final int MESSAGE_SENDDATA_STRING = 20
 
static final int MESSAGE_SAVESETTINGS = 21
 
static final int MESSAGE_EXPORTFILE = 22
 
static final int MESSAGE_IMPORTFILE = 23
 
static final int MESSAGE_SENDGMCPDATA = 24
 
static final int MESSAGE_WINDOWXCALLB = 25
 
static final int MESSAGE_PLUGINLUAERROR = 26
 
static final int MESSAGE_CONNECTED = 30
 
static final int MESSAGE_TRIGGER_LUA_ERROR = 32
 
static final int MESSAGE_RELOADSETTINGS = 33
 
static final int MESSAGE_SETTRIGGERSDIRTY = 34
 
static final int MESSAGE_TERMINATED_BY_PEER = 41
 

Protected Member Functions

final void dispatchLuaError (final String message)
 
final void saveDirtyPlugin (final String changedplugin)
 
final void doInvalidateWindowText (final String name) throws RemoteException
 
final void windowXCallB (final String name, final String functions, final byte[] bytes) throws RemoteException
 
final void redrawWindow (final String win)
 
final void lineToWindow (final String target, final Object line) throws RemoteException
 
final void doDisconnect (final boolean override)
 
final void killNetThreads (final boolean noreconnect)
 
final void dispatchDialog (final String str)
 

Detailed Description

Connection class implementation.

Constructor & Destructor Documentation

com.offsetnull.bt.service.Connection.Connection ( final String  display,
final String  host,
final int  port,
final StellarService  service 
)

Public constructor for the Connection.

Parameters
displayThe display name.
hostThe host name.
portThe port number.
serviceParent that initated this connection.

Here is the call graph for this function:

Member Function Documentation

final void com.offsetnull.bt.service.Connection.addLink ( final String  path)

Entry point for the foreground window to add an external plugin and reload the settings.

Parameters
pathThe location of the external settings file.
final void com.offsetnull.bt.service.Connection.addPluginTimer ( final String  plugin,
final TimerData  newtimer 
)

Adds a timer to the target plugin.

Parameters
pluginName of the target plugin.
newtimerNew timer data.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.addTimer ( final TimerData  newtimer)

Adds a new timer into the main settings plugin.

Parameters
newtimerNew timer to add.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.addTrigger ( final TriggerData  data)

Adds a trigger into the main settings plugin.

Parameters
dataThe trigger to add.
final void com.offsetnull.bt.service.Connection.attatchWindowSettingsChangedListener ( final WindowToken  w)

Attatches a WindowSettingsChangedListener to the given WindowToken.

Parameters
wThe window to attatch a new settings changed listener to.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.buildTriggerSystem ( )

Work horse function to rebuild the trigger system.

I think this is called from a number of placed, but it should really be called from dispatch() when triggers are dirty.

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.callPlugin ( final String  plugin,
final String  function,
final String  data 
)
final void com.offsetnull.bt.service.Connection.callPluginFunction ( final String  plugin,
final String  function 
)

Calls an anonymous global function in the target plugin. Does not provide an arugment.

Parameters
pluginName of the target plugin.
functionName of the function to call.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.deleteAlias ( final String  key)

Removes an alias form the main settings plugin.

Parameters
keyThe pre part of the alias to delete.
final void com.offsetnull.bt.service.Connection.deletePlugin ( final String  plugin)

Entry poit routine for removing a plugin.

Parameters
pluginThe name of the plugin to remove.
final void com.offsetnull.bt.service.Connection.deletePluginAlias ( final String  plugin,
final String  key 
)

Removes an alias from the target plugin.

Parameters
pluginThe name of the plugin to affect.
keyThe pre part of the alias to remove.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.deletePluginTimer ( final String  plugin,
final String  name 
)

Removes a timer from the target plugin.

Parameters
pluginName of the target plugin.
nameName of the timer to remove.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.deletePluginTrigger ( final String  selectedPlugin,
final String  which 
)

Removes a trigger from the target plugin.

Parameters
selectedPluginName of the plugin to search in.
whichName of the trigger to remove.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.deleteTimer ( final String  name)

Removes a timer from the main settings plugin.

Parameters
nameName of the trigger to remove.
final void com.offsetnull.bt.service.Connection.deleteTrigger ( final String  which)

Removes a trigger from the main settings plugin.

Parameters
whichName of the trigger to remove.
final void com.offsetnull.bt.service.Connection.dispatchDialog ( final String  str)
protected

Called from a few places I think. Triggers the network disconnected dialog in the foreground window. Unless the auto reconnect is set.

Parameters
strThe message fro the dialog.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.dispatchLuaError ( final String  message)
protected

Quick frontend for dispatchNoProcess(...) for sending a lua error message.

Parameters
messageThe message to show.
final void com.offsetnull.bt.service.Connection.dispatchLuaText ( final String  str)

Entry point for Plugins to send data to the foreground window without trigger parsing.

Parameters
strThe string to send.
final void com.offsetnull.bt.service.Connection.doAddLink ( final String  path)

Work horse for the foreground window to add an external plugin and reload the settings.

Parameters
pathThe location of the external settings file.
final void com.offsetnull.bt.service.Connection.doDisconnect ( final boolean  override)
protected

Called from the DataPumper when the net threads have been shut down.

Parameters
overrideIndicates weather the auto reconnect should be overridden.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.doInvalidateWindowText ( final String  name) throws RemoteException
protected

Work horse method for plugins to invalidate a target window's text.

Parameters
nameName of the window that should invalidate it's text.
Exceptions
RemoteExceptionThrown when there is a problem with the aidl bridge.

Here is the call graph for this function:

final byte [] com.offsetnull.bt.service.Connection.doKeyboardAliasReplace ( final byte[]  bytes,
final Boolean  reprocess 
)

Helper function for the keyboard command. Does an alias replacment in a special kind of way.

Parameters
bytesBytes to process.
reprocessWeather to do recursive alias replacement.
Returns
The processed command bytes.

Here is the call graph for this function:

Here is the caller graph for this function:

final void com.offsetnull.bt.service.Connection.doReconnect ( )

Helper method to initiate a reconnect right now.

final void com.offsetnull.bt.service.Connection.doResetSettings ( )

Work horse routine that actually resets the settings.

final void com.offsetnull.bt.service.Connection.executeFunctionCallback ( final int  id,
final String  callback,
final String  args 
)

Calls an anonymous global function in the target plugin with arguments.

Parameters
idThe ID of the plugin to target.
callbackThe name of the desired function to execute.
argsThe data to supply to
callback.

Here is the call graph for this function:

Here is the caller graph for this function:

final void com.offsetnull.bt.service.Connection.exportSettings ( final String  path)

Export settings routine. Called from either the main settings save routine or the export settings dialog.

Parameters
pathFile name to save to. Must be absolute from the OS root directory.

Here is the call graph for this function:

final AliasData com.offsetnull.bt.service.Connection.getAlias ( final String  key)

Gets an alias from the main settings plugin.

Parameters
keyThe pre part of the alias.
Returns
The AliasData associated with key
final HashMap<String, AliasData> com.offsetnull.bt.service.Connection.getAliases ( )

Gets the alias map for the main settings plugin.

Returns
The alais map for the main settings plugin.
final Context com.offsetnull.bt.service.Connection.getContext ( )

Helper method for getting the application context out here in the desert of the Service.

Returns
The application context.

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

Here is the caller graph for this function:

final HashMap<String, DirectionData> com.offsetnull.bt.service.Connection.getDirectionData ( )

Gets the direction data from the main settings plugin.

Returns
The direction map.
final String com.offsetnull.bt.service.Connection.getDisplay ( )

Getter for the display name.

Returns
the launcher display name for this connection.

Here is the caller graph for this function:

final String com.offsetnull.bt.service.Connection.getDisplayName ( )

Getter method for mDisplay.

Returns
the display name for this connection.

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

final Handler com.offsetnull.bt.service.Connection.getHandler ( )

Getter for mHandler.

Returns
The handler associated with this connection.

Here is the caller graph for this function:

final String com.offsetnull.bt.service.Connection.getHost ( )

Getter for the host name.

Returns
the host name this connection uses.

Here is the caller graph for this function:

final String com.offsetnull.bt.service.Connection.getHostName ( )

Getter for mHost.

Returns
mHost;

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

final AliasData com.offsetnull.bt.service.Connection.getPluginAlias ( final String  plugin,
final String  key 
)

Gets an alias for a target plugin.

Parameters
pluginName of the plugin to search.
keyThe pre part of the alias.
Returns
The AliasData associated with key.

Here is the call graph for this function:

final HashMap<String, AliasData> com.offsetnull.bt.service.Connection.getPluginAliases ( final String  plugin)

Gets the alias map for a target plugin.

Parameters
pluginThe desired plugin to interrogate.
Returns
The alias map for plugin.

Here is the call graph for this function:

String com.offsetnull.bt.service.Connection.getPluginOptionValue ( String  plugin,
String  key 
)

Here is the call graph for this function:

final String com.offsetnull.bt.service.Connection.getPluginPath ( final String  plugin)

Gets the path for a plugin.

Parameters
pluginName of the plugin to interrogate.
Returns
The full path of the plugin.

Here is the call graph for this function:

final ArrayList<Plugin> com.offsetnull.bt.service.Connection.getPlugins ( )

Getter for the plugin list.

Returns
The plugin list in loaded order.
final SettingsGroup com.offsetnull.bt.service.Connection.getPluginSettings ( final String  plugin)

Gets the settings object for a target plugin.

Parameters
pluginName of the target plugin.
Returns
The settings for the target plugin. Returns null if name is not a loaded plugin.

Here is the call graph for this function:

final TimerData com.offsetnull.bt.service.Connection.getPluginTimer ( final String  plugin,
final String  name 
)

Gets a timer from the target plugin.

Parameters
pluginName of the target plugin.
nameName of the trigger to get.
Returns
The trigger associated with name.

Here is the call graph for this function:

final HashMap<String, TimerData> com.offsetnull.bt.service.Connection.getPluginTimers ( final String  plugin)

Gets the timer map for a target plugin.

Parameters
pluginName of the target plugin.
Returns
The tier map.

Here is the call graph for this function:

final TriggerData com.offsetnull.bt.service.Connection.getPluginTrigger ( final String  selectedPlugin,
final String  pattern 
)

Gets a trigger in the target plugin.

Parameters
selectedPluginName of the plugin to look in.
patternName of the desired trigger.
Returns
The trigger, null if it does not exist.

Here is the call graph for this function:

final HashMap<String, TriggerData> com.offsetnull.bt.service.Connection.getPluginTriggers ( final String  name)

Helper function to get the triggers for a given plugin.

Parameters
nameThe name of the plugin to interrogate.
Returns
The triggers of the given plugin, null if name does not correspond to a loaded plugin.

Here is the call graph for this function:

final int com.offsetnull.bt.service.Connection.getPort ( )

Getter for this connection's port value.

Returns
the port number this connection is using.

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

Here is the caller graph for this function:

final Processor com.offsetnull.bt.service.Connection.getProcessor ( )

Getter for mProcessor.

Returns
the processor associated with this connection.
final DataPumper com.offsetnull.bt.service.Connection.getPump ( )

Getter for mPump.

Returns
the data pump for this connection.
static int com.offsetnull.bt.service.Connection.getResId ( final String  variableName,
final Context  context,
final Class<?>  c 
)
static

Helper method for reverse mapping R.java constants from name to id.

Parameters
variableNameThe desired field name e.g. "alias_dialog".
contextTHe current application context to use.
cThe class to search, this is usually R.layout or R.drawable.
Returns
The integer id of variableName or -1 if the class does not have a field named variableName.
final String com.offsetnull.bt.service.Connection.getScript ( final String  plugin,
final String  name 
)

Called from the foreground window. This method fetches a named script body from a plugin.

Parameters
pluginThe plugin to look in.
nameThe name of the script to fetch.
Returns
The script body.

Here is the call graph for this function:

final StellarService com.offsetnull.bt.service.Connection.getService ( )

Getter for mService. This is really ugly and should be fixed immediatly.

Returns
the service that initated this connection.

Here is the caller graph for this function:

final SettingsGroup com.offsetnull.bt.service.Connection.getSettings ( )

Gets the settings object for the main settings plugin.

Returns
The settings for the main settings plugin.

Here is the caller graph for this function:

final SettingsChangedListener com.offsetnull.bt.service.Connection.getSettingsListener ( )
final int com.offsetnull.bt.service.Connection.getStatusBarHeight ( )

Getter for the status bar height.

Returns
the status bar height.

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

final ArrayList<String> com.offsetnull.bt.service.Connection.getSystemCommands ( )

Gets the list of all the installed system commands.

Returns
The system command list.
final TimerData com.offsetnull.bt.service.Connection.getTimer ( final String  name)

Gets a timer from the main settings plugin.

Parameters
nameName of the timer to get.
Returns
The timer associated with name.
final HashMap<String, TimerData> com.offsetnull.bt.service.Connection.getTimers ( )

Gets the timer map for the main settings plugin.

Returns
The timer map.
final int com.offsetnull.bt.service.Connection.getTitleBarHeight ( )

Getter for the title bar height.

Returns
the title bar height.

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

final TriggerData com.offsetnull.bt.service.Connection.getTrigger ( final String  pattern)

Gets a trigger from the main settings plugin.

Parameters
patternName of the trigger to get.
Returns
The trigger, null if it does not exist.
final HashMap<String, TriggerData> com.offsetnull.bt.service.Connection.getTriggers ( )

Helper function to get the triggers for the main conenction settings.

Returns
the triggers for the main connection settings.
final WindowToken com.offsetnull.bt.service.Connection.getWindowByName ( final String  desired)

Helper function to get a window by name.

Parameters
desiredThe name of the window to look up.
Returns
The WindowToken for the corresponding window name.

Here is the call graph for this function:

final WindowToken [] com.offsetnull.bt.service.Connection.getWindows ( )

Gets the current window token list in loaded order as an array.

Returns
The array of window tokens in loaded order.
final void com.offsetnull.bt.service.Connection.handleWindowSettingsChanged ( final String  window,
final String  key,
final String  value 
)

Work horse of the main window settings change listener.

Parameters
windowName of the window that was affected.
keyName of the key that changed.
valueThe value that it was changed to.
final void com.offsetnull.bt.service.Connection.initWindows ( )

Kicks off the loadInternalSettings() routine.

final boolean com.offsetnull.bt.service.Connection.isConnected ( )

getter for mIsConnected.

Returns
the connected state of this connection.
final boolean com.offsetnull.bt.service.Connection.isFullScren ( )

Target for the foreground window to check if the full screen settings is set.

Returns
the value of the full screen option.
final boolean com.offsetnull.bt.service.Connection.isKeepLast ( )

Target for the foreground window to check if the keep last setting is set.

Returns
value of the keep list settings.
final boolean com.offsetnull.bt.service.Connection.isLinkLoaded ( final String  link)

Utility method to test to see if a link has been loaded.

Parameters
linkThe path of the link to test. Relative to the BlowTorch sd card root.
Returns
The state of the target plugin. true = loaded, false = unloaded.
final boolean com.offsetnull.bt.service.Connection.isPluginInstalled ( final String  desired)

Test to see of a plugin is installed.

Parameters
desiredName of the desired plugin.
Returns
is it loaded or not.
final boolean com.offsetnull.bt.service.Connection.isWindowShowing ( )

Helper method to see if the window is currently being shown.

Returns
visibility state of the foreground window.

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

final void com.offsetnull.bt.service.Connection.killNetThreads ( final boolean  noreconnect)
protected

Called from various sources to kill the DataPumper and all of its threads.

Parameters
noreconnecttrue if there should be no reconnect attempt made.
final void com.offsetnull.bt.service.Connection.lineToWindow ( final String  target,
final Object  line 
) throws RemoteException
protected

Actual working method for the LineToWindow Lua function.

Parameters
targetName of the window to recieve the line.
lineThe TextTree.Line to send to
target
Exceptions
RemoteExceptionThrown when there is a problem with the aidl bridge.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.newPluginTrigger ( final String  selectedPlugin,
final TriggerData  data 
)

Adds a new trigger in the target plugin.

Parameters
selectedPluginTarget plugin for the new trigger.
dataThe new trigger.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.pausePluginTimer ( final String  plugin,
final String  timer 
)

Pauses a timer in the target plugin.

Parameters
pluginName of the target plugin.
timerName of the timer to pause.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.pauseTimer ( final String  key)

Pauses a timer in the main settings plugin.

Parameters
keyName of the plugin to pause.
final void com.offsetnull.bt.service.Connection.playPluginTimer ( final String  plugin,
final String  timer 
)

Starts a timer in the target plugin.

Parameters
pluginName of the target plugin.
timerName of the timer to start.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.playTimer ( final String  key)

Starts a timer in the main settings plugin with the target name.

Parameters
keyName of the timer to start.
final boolean com.offsetnull.bt.service.Connection.pluginSupports ( final String  plugin,
final String  function 
)

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.pluginXcallS ( final String  plugin,
final String  function,
final String  str 
)

The reciever of the foreground window PluginXCallS Lua function.

Parameters
pluginThe name of the plugin to look in.
functionThe name of the anonymous global function to call.
strThe argument to pass to function.
final Data com.offsetnull.bt.service.Connection.processCommand ( final String  cmd)

Data generator for outside package use of the Data class.

Returns
A new data Generic command processor. This looks for "." commands.
Parameters
cmdThe input string to parse.
Returns
The Data object containing the string to return to the server and the string to return to the window.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.redrawWindow ( final String  win)
protected

end of the line of the DrawWindow function. I don't think this is used.

Parameters
winName of the window to redraw.
final void com.offsetnull.bt.service.Connection.registerWindowCallback ( final String  name,
final IWindowCallback  callback 
)

Called from the aidl bridge housing in StellarService when the foreground window has started a new window and needs to let the Connection know that a new window is open for it.

Parameters
nameThe name of the new window.
callbackThe IWindowCallback aidl conenction object associated with the window.
final void com.offsetnull.bt.service.Connection.reloadSettings ( )

Calling this method will reload the connection settings and all plugins.

final void com.offsetnull.bt.service.Connection.resetSettings ( )

Entry point for the foreground window to reset the settings for this connection.

final void com.offsetnull.bt.service.Connection.saveDirtyPlugin ( final String  changedplugin)
protected

Saves dirty plugins or the main settings wad.

Parameters
changedpluginThe name of the plugin, "" will save the main settings.
Note
This doesn't work as far as I know.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.saveMainSettings ( )

The main starting point for the save settings routine. This is called for a few different locations.

final void com.offsetnull.bt.service.Connection.sendBytesToWindow ( final byte[]  data)

Sends bytes to the main output window.

Parameters
dataThe bytes to send.
final void com.offsetnull.bt.service.Connection.sendDataToWindow ( final String  message)

Sends a string to the main output window.

Parameters
messageThe string to send.

Here is the caller graph for this function:

final void com.offsetnull.bt.service.Connection.setAliasEnabled ( final boolean  enabled,
final String  key 
)

Sets the enabled state of an alias in the main settings plugin.

Parameters
enabledDesired state of the alias.
keyThe pre part of the alias to affect.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.setAliases ( final HashMap< String, AliasData map)

Sets the aliases for the main settings plugin. This comes from the foreground window in one glob.

Parameters
mapThe new alias map (HashMap<String, AliasData>).
final void com.offsetnull.bt.service.Connection.setDirectionData ( final HashMap< String, DirectionData data)

Sets the directio data for the main settings plugin. This is supplied from the foreground window.

Parameters
dataDiretion data wad from to use for the main settings wad.
final void com.offsetnull.bt.service.Connection.setPluginAliasEnabled ( final String  plugin,
final boolean  enabled,
final String  key 
)

Sets the enabled state of an alias in the target plugin.

Parameters
pluginName of the target plugin.
enabledDesired state of the alias.
keyThe pre part of the alias to affect.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.setPluginAliases ( final String  plugin,
final HashMap< String, AliasData map 
)

Sets the aliases for a given plugin. This comes from the foreground window in one glob.

Parameters
pluginName of the target plugin to affect.
mapThe new alias map (HashMap<String, AliasData>)

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.setPluginEnabled ( final String  plugin,
final boolean  enabled 
)

Sets a plugin enabled.

Parameters
pluginName of the plugin to affect.
enabledDesired state of the plugin.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.setPluginTriggerEnabled ( final String  selectedPlugin,
final boolean  enabled,
final String  key 
)

Sets the enabled state of a trigger in the target plugin.

Parameters
selectedPluginName of the target plugin to affect.
enabledDesired state of the trigger.
keyThe name of the trigger to affect.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.setTriggerEnabled ( final boolean  enabled,
final String  key 
)

Sets the enabled state of a trigger in the main settings plugin.

Parameters
enabledDesired state of the target trigger.
keyName of the trigger to affect.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.setTriggersDirty ( )

Setter for triggersDirty.

Implements com.offsetnull.bt.service.ConnectionPluginCallback.

final void com.offsetnull.bt.service.Connection.shutdown ( )

Immediatly shuts down this connection and all associated data structures.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.startExportSequence ( final String  path)

Access point for the foreground window to initate a custom export action with the provided path.

Parameters
pathPath to save settings to, this must be absolute from the root directory (?)
final void com.offsetnull.bt.service.Connection.startLoadSettingsSequence ( final String  path)

Entry point for the foreground window to import a custom settings file at the given location.

Parameters
pathPath of the settings to load.
final void com.offsetnull.bt.service.Connection.startReconnect ( )

Helper method that kicks off the reconnection sequence.

final void com.offsetnull.bt.service.Connection.stopPluginTimer ( final String  plugin,
final String  key 
)

Stops a timer in the target plugin.

Parameters
pluginName of the target plugin.
keyName of the timer to stop.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.stopTimer ( final String  key)

Stops a timer in the main settings plugin.

Parameters
keyName of the timer to stop.
final void com.offsetnull.bt.service.Connection.switchTo ( final String  connection)

Switches to another open connection.

Parameters
connectionName of the connection to switch to.

Here is the caller graph for this function:

final void com.offsetnull.bt.service.Connection.unregisterWindowCallback ( final IWindowCallback  callback)

Called from the aidl bridge housing in StellarService when the foreground window has stopped and destroyed a window and needs to let the Connection know that the IWindowCallback is invalid.

Parameters
callbackThe IWindowCallback aidl connection object of the destroyed window.
final void com.offsetnull.bt.service.Connection.updateBooleanSetting ( final String  key,
final boolean  value 
)

Updates a boolean setting in the main settings plugin.

Parameters
keyid of the setting to affect.
valuenew value for setting key
final void com.offsetnull.bt.service.Connection.updateFloatSetting ( final String  key,
final float  value 
)

Updates a float setting in the main settings plugin.

Parameters
keykey id of the setting to update.
valuethe value to use.
final void com.offsetnull.bt.service.Connection.updateIntegerSetting ( final String  key,
final int  value 
)

Udpates an integer setting in the main settings plugin.

Parameters
keykey id of the setting to affect.
valuethe value to use.
final void com.offsetnull.bt.service.Connection.updatePluginBooleanSetting ( final String  plugin,
final String  key,
final boolean  value 
)

Updates a boolean setting in the target plugin.

Parameters
pluginName of the target plugin.
keykey id of the setting to affect.
valuethe value to use.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.updatePluginFloatSetting ( final String  plugin,
final String  key,
final float  value 
)

Updates a float setting in the target plugin.

Parameters
pluginName of the target plugin.
keykey id of the setting to affect.
valuethe value to use.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.updatePluginIntegerSetting ( final String  plugin,
final String  key,
final int  value 
)

Updates an integer setting in the target plugin.

Parameters
pluginName of the target plugin.
keykey id of the setting to affect.
valuethe value to use.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.updatePluginStringSetting ( final String  plugin,
final String  key,
final String  value 
)

Updates a string setting in the target plugin.

Parameters
pluginName of the target plugin.
keykey id of the setting to affect.
valuethe value to use.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.updatePluginTimer ( final String  plugin,
final TimerData  old,
final TimerData  newtimer 
)

Updates a timer in the target plugin.

Parameters
pluginName of the target plugin.
oldOld timer data.
newtimerNew timer data.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.updatePluginTrigger ( final String  selectedPlugin,
final TriggerData  from,
final TriggerData  to 
)

Updates a trigger in the target plugin.

Parameters
selectedPluginName of the plugin to work in.
fromOld plugin.
toNew plugin.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.updateSetting ( final String  key,
final String  value 
)

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.updateStringSetting ( final String  key,
final String  value 
)

Updates a string setting in the main settings plugin.

Parameters
keykey id of the setting to affect.
valuethe value to use.
final void com.offsetnull.bt.service.Connection.updateTimer ( final TimerData  old,
final TimerData  newtimer 
)

Updates a timer in the main settings plugin.

Parameters
oldOld timer data.
newtimerNew timer data.

Here is the call graph for this function:

final void com.offsetnull.bt.service.Connection.updateTrigger ( final TriggerData  from,
final TriggerData  to 
)

Updates a trigger in the main settings plugin.

Parameters
fromOld trigger.
toNew trigger.
final void com.offsetnull.bt.service.Connection.updateWindowBufferMaxValue ( final String  plugin,
final String  window,
final int  amount 
)

Possibly Deprecated. Sets the buffer size for a target window in a target plugin.

Parameters
pluginThe target plugin.
windowThe target window.
amountThe new buffer size value.
final void com.offsetnull.bt.service.Connection.windowXCallB ( final String  name,
final String  functions,
final byte[]  bytes 
) throws RemoteException
protected

Work horse method for WindowXCallB Lua function.

Parameters
nameName of the target window.
functionsName of the anonymous global function to call.
bytesBytes to provide as an argument to
function
Exceptions
RemoteExceptionThrown when there is a problem with the aidl bridge.
final void com.offsetnull.bt.service.Connection.windowXCallS ( final String  name,
final String  function,
final Object  o 
) throws RemoteException

Work horse method for WindowXCallS Lua function.

Parameters
nameName of the target window.
functionName of the anonymous global function to call
oString argument to provide to
function
Exceptions
RemoteExceptionThrown when there is a problem with the aidl bridge.

Member Data Documentation

final int com.offsetnull.bt.service.Connection.MESSAGE_ADDFUNCTIONCALLBACK = 16
static

Sent from Plugin.RegisterSpecialCommandFunction and registers a .command callback.

final int com.offsetnull.bt.service.Connection.MESSAGE_BELLINC = 5
static

Sent from the Processor indicating the bell character has been recieved.

final int com.offsetnull.bt.service.Connection.MESSAGE_CONNECTED = 30
static

Sent from DataPumper indicating that the tcp connection to the server has started.

final int com.offsetnull.bt.service.Connection.MESSAGE_DISCONNECTED = 8
static

Sent from the DataPumper when the connection has been lost.

final int com.offsetnull.bt.service.Connection.MESSAGE_DODIALOG = 6
static

Not sure where this is sent from, I think the Xml parser or the datapumper. Used to put up an alert dialog with some text to the foreground window if connected.

final int com.offsetnull.bt.service.Connection.MESSAGE_DRAWINDOW = 12
static

Sent from Plugin.DrawWindowFunction, I think this is no longer used and deprecated.

final int com.offsetnull.bt.service.Connection.MESSAGE_EXPORTFILE = 22
static

Sent from either the foreground window or the save settings routine, exports settings to a given path.

final int com.offsetnull.bt.service.Connection.MESSAGE_GMCPTRIGGERED = 19
static

Sent from Processor indicating that gmcp has triggered.

final int com.offsetnull.bt.service.Connection.MESSAGE_IMPORTFILE = 23
static

Sent from either the foreground window or the settings loader routing, imports settings from a given location into this active connection.

final int com.offsetnull.bt.service.Connection.MESSAGE_INVALIDATEWINDOWTEXT = 18
static

Sent from plugin functions, used to redraw a target window.

final int com.offsetnull.bt.service.Connection.MESSAGE_LINETOWINDOW = 10
static

Sent from Plugin.LineToWindowFunction contains a TextTree.Line object to send to a specific window.

final int com.offsetnull.bt.service.Connection.MESSAGE_LUANOTE = 11
static

Sent from Plugin.NoteFunction with text to send to the output window.

final int com.offsetnull.bt.service.Connection.MESSAGE_MCCPFATALERROR = 9
static

Sent from the DataPumper indicating a fatal mccp error.

final int com.offsetnull.bt.service.Connection.MESSAGE_NEWWINDOW = 13
static

Sent from Plugin.NewWindowFucntion used to create a new miniwindow with then given configuration.

final int com.offsetnull.bt.service.Connection.MESSAGE_PLUGINLUAERROR = 26
static

Sent from Plugin, indicating an error condition from a script entry point.

final int com.offsetnull.bt.service.Connection.MESSAGE_PROCESS = 7
static

Sent from Processor, contains the non-telnet related data in the incoming transmission.

final int com.offsetnull.bt.service.Connection.MESSAGE_PROCESSORWARNING = 3
static

Sent by various objects to throw text to the window bypassing the trigger parse routine.

final int com.offsetnull.bt.service.Connection.MESSAGE_RELOADSETTINGS = 33
static

Sent from the foreground window, initiates the settings reloading process.

final int com.offsetnull.bt.service.Connection.MESSAGE_SAVESETTINGS = 21
static

Sent from various sources, initates the settings loader routine.

final int com.offsetnull.bt.service.Connection.MESSAGE_SENDDATA_BYTES = 9
static

Sent from the foreground window with data to be sent to the server.

final int com.offsetnull.bt.service.Connection.MESSAGE_SENDDATA_STRING = 20
static

Sent from various sources, containing a string to be sent to the server in the selected encoding.

final int com.offsetnull.bt.service.Connection.MESSAGE_SENDGMCPDATA = 24
static

Sent from Plugin.SendGMCPDataFunction, sends the given data to the server using gmcp.

final int com.offsetnull.bt.service.Connection.MESSAGE_SENDOPTIONDATA = 4
static

Sent from the Processor to send data to the DataPumper's output thread.

final int com.offsetnull.bt.service.Connection.MESSAGE_SETTRIGGERSDIRTY = 34
static

Sent from various sources, indicates that triggers need to be rebuilt, I believe this is deprecated.

final int com.offsetnull.bt.service.Connection.MESSAGE_STARTCOMPRESS = 2
static

Bridge between Processor and DataPumper to initiate MCCP compression.

final int com.offsetnull.bt.service.Connection.MESSAGE_STARTUP = 1
static

Initiates the connection with the server.

final int com.offsetnull.bt.service.Connection.MESSAGE_TERMINATED_BY_PEER = 41
static

Sent from the DataPumper indicating the orderly shutdown of the tcp connection.

final int com.offsetnull.bt.service.Connection.MESSAGE_TRIGGER_LUA_ERROR = 32
static

Sent from AckWithResponder when a trigger executes script code that results in error.

final int com.offsetnull.bt.service.Connection.MESSAGE_WINDOWBUFFER = 15
static

Sent from Plugin.WindowBufferFunction and sets the buffering option of a window. I think this is deprecated.

final int com.offsetnull.bt.service.Connection.MESSAGE_WINDOWXCALLB = 25
static

Sent from Plugin.WindowXCallB, same as WindowXCallS only great care is taken to preserve the "bytes".

final int com.offsetnull.bt.service.Connection.MESSAGE_WINDOWXCALLS = 17
static

Sent from Plugin.WindowXCallSFunction, calls an anonymous global function in the target window with data.


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