danger.bluetooth
Class DeviceList

java.lang.Object
  extended by danger.app.Listener
      extended by danger.bluetooth.DeviceList


EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

public final class DeviceList
extends Listener

Since:
3.0

Method Summary
 boolean contains(Device device)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs. 
 void dump()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Dump the device list to the debugger.
 Device findByAddress(Address inAddress)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs. 
 Device findByName(String inName)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs. 
 Device get(Device device)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs. 
 Device get(int index)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs. 
static DeviceList getInstance()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Returns the singleton instance of the Bluetooth dispatcher
static long getLastInquiry()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs. 
 Device getLeastRecentlySeenDevice()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Return the least recently seen device.
 Device[] getList()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs. 
 Device[] getList(boolean inSorted)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs. 
 Device[] getList(int inFilter)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Get a list of devices filtered by class of device.
 Device[] getList(int[] inFilters)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Get a list of devices filtered by multiple class of device specifications.
 Device[] getList(int[] inFilters, boolean inSorted)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Get a list of devices filtered by multiple class of device specifications.
 Device[] getList(int inFilter, boolean inSorted)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Get a list of devices filtered by class of device.
static void registerListener(Listener inListener)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Add a listener to the list
 int size()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Return the size of the device list.
static void unregisterListener(Listener inListener)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Remove a listener from the list
 
Methods inherited from class danger.app.Listener
cancelEvents, childEventPump, childEventPumpDone, eventProblem, isDispatchingThread, receiveEvent, receiveEventInternal, sendEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendLowPriorityEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DeviceList getInstance()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Returns the singleton instance of the Bluetooth dispatcher

Returns:
return the DeviceList instance

get

public final Device get(Device device)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

get

public final Device get(int index)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

contains

public final boolean contains(Device device)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

findByAddress

public final Device findByAddress(Address inAddress)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

findByName

public final Device findByName(String inName)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

registerListener

public static void registerListener(Listener inListener)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Add a listener to the list


unregisterListener

public static void unregisterListener(Listener inListener)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Remove a listener from the list


getList

public final Device[] getList()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

getList

public final Device[] getList(boolean inSorted)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

getList

public final Device[] getList(int inFilter)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Get a list of devices filtered by class of device. The filter can either be a service specification, or a major/minor combination, not both. If service, it needs to be one or more of the service bits or'd together. (i.e. COD_OBJECT_TRANSFER | COD_AUDIO) If major/minor, it needs to be one MAJOR flag, or'd with one or more MINOR flags. (i.e. COD_MAJOR_AUDIO | COD_MINOR_AUDIO_HANDSFREE | COD_MINOR_AUDIO_HEADSET) NOTE: There must be a match in both the major and minor components.

Parameters:
inFilter - Class of device specification.
Returns:
Array of devices that matched the filter. Array can be empty.

getList

public final Device[] getList(int inFilter,
                              boolean inSorted)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Get a list of devices filtered by class of device. The filter can either be a service specification, or a major/minor combination, not both. If service, it needs to be one or more of the service bits or'd together. (i.e. COD_OBJECT_TRANSFER | COD_AUDIO) If major/minor, it needs to be one MAJOR flag, or'd with one or more MINOR flags. (i.e. COD_MAJOR_AUDIO | COD_MINOR_AUDIO_HANDSFREE | COD_MINOR_AUDIO_HEADSET) NOTE: There must be a match in both the major and minor components.

Parameters:
inFilter - Class of device specification.
inSorted - true if you want the return list sorted by name.
Returns:
Array of devices that matched the filter. Array can be empty.

getList

public final Device[] getList(int[] inFilters)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Get a list of devices filtered by multiple class of device specifications. The filters can either be a service specification, or a major/minor combination, not both. If service, it needs to be one or more of the service bits or'd together. (i.e. COD_OBJECT_TRANSFER | COD_AUDIO) If major/minor, it needs to be one MAJOR flag, or'd with one or more MINOR flags. (i.e. COD_MAJOR_AUDIO | COD_MINOR_AUDIO_HANDSFREE | COD_MINOR_AUDIO_HEADSET) NOTE: There must be a match in both the major and minor components.

Parameters:
inFilters - Class of device specifications.
Returns:
Array of devices that matched the filter. Array can be empty.

getList

public final Device[] getList(int[] inFilters,
                              boolean inSorted)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Get a list of devices filtered by multiple class of device specifications. The filters can either be a service specification, or a major/minor combination, not both. If service, it needs to be one or more of the service bits or'd together. (i.e. COD_OBJECT_TRANSFER | COD_AUDIO) If major/minor, it needs to be one MAJOR flag, or'd with one or more MINOR flags. (i.e. COD_MAJOR_AUDIO | COD_MINOR_AUDIO_HANDSFREE | COD_MINOR_AUDIO_HEADSET) NOTE: There must be a match in both the major and minor components.

Parameters:
inFilters - Class of device specifications.
inSorted - true if you want the return list sorted by name.
Returns:
Array of devices that matched the filter. Array can be empty.

getLeastRecentlySeenDevice

public final Device getLeastRecentlySeenDevice()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Return the least recently seen device.

Returns:
Device containing the least recently used device, or null if the list is empty.

size

public final int size()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Return the size of the device list. Note that this includes devices that do not have names which are NOT displayed by DeviceListView.

Returns:
int the number of devices in the device list.

getLastInquiry

public static long getLastInquiry()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.

dump

public void dump()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Dump the device list to the debugger.