org.placelab.midp
Class BluetoothClient

java.lang.Object
  extended byorg.placelab.midp.BluetoothClient
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener, javax.bluetooth.DiscoveryListener, UIComponent
Direct Known Subclasses:
EventLogUploadUI, StumbleUploadClient

public abstract class BluetoothClient
extends java.lang.Object
implements javax.bluetooth.DiscoveryListener, javax.microedition.lcdui.CommandListener, UIComponent


Field Summary
protected  UIComponent back
           
protected  javax.microedition.lcdui.Display display
           
static java.lang.String RECORDSTORE_NAME
           
static javax.bluetooth.UUID uuid
           
 
Fields inherited from interface javax.bluetooth.DiscoveryListener
INQUIRY_COMPLETED, INQUIRY_ERROR, INQUIRY_TERMINATED, SERVICE_SEARCH_COMPLETED, SERVICE_SEARCH_DEVICE_NOT_REACHABLE, SERVICE_SEARCH_ERROR, SERVICE_SEARCH_NO_RECORDS, SERVICE_SEARCH_TERMINATED
 
Constructor Summary
BluetoothClient(javax.microedition.lcdui.Display display, UIComponent from)
           
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
           
 void deviceDiscovered(javax.bluetooth.RemoteDevice device, javax.bluetooth.DeviceClass cod)
           
abstract  java.lang.String getName()
           
abstract  byte getServiceType()
           
abstract  void handleConnection(java.io.DataInputStream in, java.io.DataOutputStream out)
           
 void inquiryCompleted(int discType)
           
 void servicesDiscovered(int transID, javax.bluetooth.ServiceRecord[] records)
           
 void serviceSearchCompleted(int transID, int respCode)
           
protected  void setStatus(java.lang.String newStatus)
           
 void showUI(UIComponent from)
          used by one component to activate another component
protected  void updateStatus(java.lang.String newStatus)
           
protected  void updateStatus(java.lang.String newStatus, boolean newLine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uuid

public static final javax.bluetooth.UUID uuid

RECORDSTORE_NAME

public static final java.lang.String RECORDSTORE_NAME
See Also:
Constant Field Values

display

protected javax.microedition.lcdui.Display display

back

protected UIComponent back
Constructor Detail

BluetoothClient

public BluetoothClient(javax.microedition.lcdui.Display display,
                       UIComponent from)
Method Detail

getName

public abstract java.lang.String getName()

getServiceType

public abstract byte getServiceType()

handleConnection

public abstract void handleConnection(java.io.DataInputStream in,
                                      java.io.DataOutputStream out)

showUI

public void showUI(UIComponent from)
Description copied from interface: UIComponent
used by one component to activate another component

Specified by:
showUI in interface UIComponent

updateStatus

protected void updateStatus(java.lang.String newStatus,
                            boolean newLine)

updateStatus

protected void updateStatus(java.lang.String newStatus)

setStatus

protected void setStatus(java.lang.String newStatus)

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable d)
Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener

deviceDiscovered

public void deviceDiscovered(javax.bluetooth.RemoteDevice device,
                             javax.bluetooth.DeviceClass cod)
Specified by:
deviceDiscovered in interface javax.bluetooth.DiscoveryListener

inquiryCompleted

public void inquiryCompleted(int discType)
Specified by:
inquiryCompleted in interface javax.bluetooth.DiscoveryListener

servicesDiscovered

public void servicesDiscovered(int transID,
                               javax.bluetooth.ServiceRecord[] records)
Specified by:
servicesDiscovered in interface javax.bluetooth.DiscoveryListener

serviceSearchCompleted

public void serviceSearchCompleted(int transID,
                                   int respCode)
Specified by:
serviceSearchCompleted in interface javax.bluetooth.DiscoveryListener