com.nutiteq.bluetooth
Class BluetoothAPIDevice

java.lang.Object
  extended by com.nutiteq.bluetooth.BluetoothAPIDevice
All Implemented Interfaces:
BluetoothDevice, LocationDataConnectionProvider, javax.bluetooth.DiscoveryListener

public class BluetoothAPIDevice
extends java.lang.Object
implements BluetoothDevice, javax.bluetooth.DiscoveryListener, LocationDataConnectionProvider

Bluetooth devices implemented on top of Bluetooth API (JSR-82)


Field Summary
static int BLUETOOTH_TIMEOUT
           
 java.util.Vector btServicesFound
           
 
Fields inherited from interface com.nutiteq.bluetooth.BluetoothDevice
UUID_SERIALPORT
 
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
BluetoothAPIDevice(BluetoothHandler handler)
          Create new browser with caller, that could handle found devices.
 
Method Summary
 void deviceDiscovered(javax.bluetooth.RemoteDevice remoteDevice, javax.bluetooth.DeviceClass dClass)
           
 void findRemoteDevices()
          Find all remote devices supporting serial port connection and report them to BluetoothHandler.
 void inquiryCompleted(int discType)
           
 LocationDataConnection openConnection(java.lang.String url)
          Open connection with given url
 void servicesDiscovered(int param, javax.bluetooth.ServiceRecord[] serviceRecord)
           
 void serviceSearchCompleted(int transId, int respCode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLUETOOTH_TIMEOUT

public static final int BLUETOOTH_TIMEOUT
See Also:
Constant Field Values

btServicesFound

public java.util.Vector btServicesFound
Constructor Detail

BluetoothAPIDevice

public BluetoothAPIDevice(BluetoothHandler handler)
Create new browser with caller, that could handle found devices.

Parameters:
handler - handler for receiving found devices
Method Detail

findRemoteDevices

public void findRemoteDevices()
Find all remote devices supporting serial port connection and report them to BluetoothHandler.

Specified by:
findRemoteDevices in interface BluetoothDevice

deviceDiscovered

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

inquiryCompleted

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

serviceSearchCompleted

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

servicesDiscovered

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

openConnection

public LocationDataConnection openConnection(java.lang.String url)
                                      throws java.io.IOException
Description copied from interface: LocationDataConnectionProvider
Open connection with given url

Specified by:
openConnection in interface LocationDataConnectionProvider
Parameters:
url - url for connection
Returns:
return opened connection
Throws:
java.io.IOException - if something went wrong