Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

irate.plugin.lircremote
Class LircRemoteControlPlugin  view LircRemoteControlPlugin download LircRemoteControlPlugin.java

java.lang.Object
  extended byirate.plugin.Plugin
      extended byirate.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).


Nested Class Summary
 class LircRemoteControlPlugin.IOThread
           
 
Field Summary
private  boolean connected
          True if we are attempting to connect.
private  boolean connectStatus
          True if we have actually established a connection.
private  java.util.Vector functions
           
private  java.lang.String host
           
private  LircRemoteControlPlugin.IOThread ioThread
           
private  java.util.Vector listeners
           
private  int port
           
private  java.io.BufferedReader r
           
private  java.net.Socket s
           
private  boolean terminating
           
private  java.lang.Object timer
           
 
Fields inherited from class irate.plugin.Plugin
 
Constructor Summary
LircRemoteControlPlugin()
           
 
Method Summary
 void addLircRemoteControlListener(LircRemoteControlListener listener)
           
 void buttonPressed(LircRemoteControlPlugin plugin, Button button)
           
private  void connect()
           
 void connectStatusChanged(LircRemoteControlPlugin plugin, boolean connected)
           
private  void disconnect()
           
protected  void doAttach()
          Subclasses to override to do real work of attaching.
protected  void doDetach()
          Subclasses to override to do real work of detaching.
 void formatConfig(nanoxml.XMLElement elt)
          Format the configuration of this plugin by modifying the specified element.
 boolean getConnectStatus()
          Return true if we have established a connection to the lirc daemon.
 java.lang.String getDescription()
          Get a short description of this plugin.
 java.util.List getFunctions()
           
 java.lang.String getHost()
           
 java.lang.String getIdentifier()
          Get a short identifier for this Plugin.
 int getPort()
           
private  boolean isConnected()
           
private  void notifyButtonPressed(Button button)
           
private  void notifyConnectStatusChanged()
           
 void parseConfig(nanoxml.XMLElement elt)
          Parse the configuration stored in the specified element.
 void removeLircRemoteControlListener(LircRemoteControlListener listener)
           
 void setHost(java.lang.String host)
           
 void setPort(int port)
           
 
Methods inherited from class irate.plugin.Plugin
attach, detach, getApp, isAttached
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

LircRemoteControlPlugin

public LircRemoteControlPlugin()
Method Detail

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.