© 2006-2007 ETH Zurich

org.ximtec.igesture.tool.view.devicemanager.discoveryservice
Class BluetoothDeviceDiscoveryService

java.lang.Object
  extended by org.ximtec.igesture.tool.view.devicemanager.discoveryservice.BluetoothDeviceDiscoveryService
All Implemented Interfaces:
javax.bluetooth.DiscoveryListener, DeviceDiscoveryService

public class BluetoothDeviceDiscoveryService
extends Object
implements DeviceDiscoveryService, javax.bluetooth.DiscoveryListener

A Bluetooth device discovery service. It implements the DeviceDiscoveryService and DiscoveryListener interfaces.

Author:
Bjorn Puype, bpuype@gmail.com

Field Summary
 
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
BluetoothDeviceDiscoveryService()
          Constructor
 
Method Summary
 void deviceDiscovered(javax.bluetooth.RemoteDevice btDevice, javax.bluetooth.DeviceClass deviceClass)
           
 Set<AbstractGestureDevice<?,?>> discover()
          Discover and return the found devices.
 void dispose()
          Clean-up the discovery service.
 void inquiryCompleted(int discType)
           
 void servicesDiscovered(int transID, javax.bluetooth.ServiceRecord[] servRecord)
           
 void serviceSearchCompleted(int transID, int respCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BluetoothDeviceDiscoveryService

public BluetoothDeviceDiscoveryService()
Constructor

Method Detail

discover

public Set<AbstractGestureDevice<?,?>> discover()
Description copied from interface: DeviceDiscoveryService
Discover and return the found devices.

Specified by:
discover in interface DeviceDiscoveryService
Returns:
The found devices.

deviceDiscovered

public void deviceDiscovered(javax.bluetooth.RemoteDevice btDevice,
                             javax.bluetooth.DeviceClass deviceClass)
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 transID,
                               javax.bluetooth.ServiceRecord[] servRecord)
Specified by:
servicesDiscovered in interface javax.bluetooth.DiscoveryListener

dispose

public void dispose()
Description copied from interface: DeviceDiscoveryService
Clean-up the discovery service.

Specified by:
dispose in interface DeviceDiscoveryService

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.