java.lang.Object
irate.plugin.Plugin
irate.plugin.lircremote.LircRemoteControlPlugin
- All Implemented Interfaces:
- LircRemoteControlListener
- public class LircRemoteControlPlugin
- extends irate.plugin.Plugin
- implements LircRemoteControlListener
Plugin for remote control based on lirc (Linux/Unix).
| Fields inherited from class irate.plugin.Plugin |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
host
private java.lang.String host
port
private int port
functions
private java.util.Vector functions
listeners
private java.util.Vector listeners
terminating
private boolean terminating
timer
private java.lang.Object timer
ioThread
private LircRemoteControlPlugin.IOThread ioThread
s
private java.net.Socket s
r
private java.io.BufferedReader r
connected
private boolean connected
- True if we are attempting to connect.
connectStatus
private boolean connectStatus
- True if we have actually established a connection.
LircRemoteControlPlugin
public LircRemoteControlPlugin()
getFunctions
public java.util.List getFunctions()
getIdentifier
public java.lang.String getIdentifier()
- Get a short identifier for this Plugin.
getDescription
public java.lang.String getDescription()
- Get a short description of this plugin.
addLircRemoteControlListener
public void addLircRemoteControlListener(LircRemoteControlListener listener)
removeLircRemoteControlListener
public void removeLircRemoteControlListener(LircRemoteControlListener listener)
notifyConnectStatusChanged
private void notifyConnectStatusChanged()
notifyButtonPressed
private void notifyButtonPressed(Button button)
doAttach
protected void doAttach()
- Subclasses to override to do real work of attaching.
Application is available through getApp().
doDetach
protected void doDetach()
- Subclasses to override to do real work of detaching.
Application is available through getApp().
isConnected
private boolean isConnected()
getConnectStatus
public boolean getConnectStatus()
- Return true if we have established a connection to the lirc daemon.
connect
private void connect()
disconnect
private void disconnect()
getHost
public java.lang.String getHost()
setHost
public void setHost(java.lang.String host)
getPort
public int getPort()
setPort
public void setPort(int port)
connectStatusChanged
public void connectStatusChanged(LircRemoteControlPlugin plugin,
boolean connected)
- Specified by:
connectStatusChanged in interface LircRemoteControlListener
buttonPressed
public void buttonPressed(LircRemoteControlPlugin plugin,
Button button)
- Specified by:
buttonPressed in interface LircRemoteControlListener
parseConfig
public void parseConfig(nanoxml.XMLElement elt)
- Parse the configuration stored in the specified element.
formatConfig
public void formatConfig(nanoxml.XMLElement elt)
- Format the configuration of this plugin by modifying the specified
element.