org.openuat.util
Interface BluetoothPeerManager.PeerEventsListener
- All Known Implementing Classes:
- BluetoothDemo, BluetoothOpportunisticConnector.BluetoothPeerEventsHandler, ManualAuthentication, OpenUATmidlet
- Enclosing class:
- BluetoothPeerManager
public static interface BluetoothPeerManager.PeerEventsListener
Users of BluetoothPeerManager should most probably implement this
interface and register themselves with addListener. They will then
receive events about discovered devices and services.
- See Also:
BluetoothPeerManager.addListener(org.openuat.util.BluetoothPeerManager.PeerEventsListener)
|
Method Summary |
void |
inquiryCompleted(java.util.Vector newDevices)
This method is called when the inquiry has been completed (either
started as a one-shot process or periodically by the background
inquiry. |
void |
serviceSearchCompleted(javax.bluetooth.RemoteDevice remoteDevice,
java.util.Vector services,
int errorReason)
This method is called when the search for the services of a
specific remote device has completed. |
SEARCH_COMPLETE
static final int SEARCH_COMPLETE
- See Also:
- Constant Field Values
DEVICE_NOT_REACHABLE
static final int DEVICE_NOT_REACHABLE
- See Also:
- Constant Field Values
SEARCH_FAILED
static final int SEARCH_FAILED
- See Also:
- Constant Field Values
SEARCH_ABORTED
static final int SEARCH_ABORTED
- See Also:
- Constant Field Values
inquiryCompleted
void inquiryCompleted(java.util.Vector newDevices)
- This method is called when the inquiry has been completed (either
started as a one-shot process or periodically by the background
inquiry. Implementations may then e.g. use
- Parameters:
newDevices - This vector contains the list of new devices that
have been discovered since the last inquiry
completed. If no new devices have been found
during this inquiry, the vector is empty. Elements
of the vector are of type RemoteDevice.- See Also:
to get a list of devices
discovered so far.
serviceSearchCompleted
void serviceSearchCompleted(javax.bluetooth.RemoteDevice remoteDevice,
java.util.Vector services,
int errorReason)
- This method is called when the search for the services of a
specific remote device has completed.
- Parameters:
remoteDevice - The remote device for which new services have
been searched for.services - The list of services of the remote device. Elements
of the vector are of type ServiceRecord. If no
services were found, then this vector is empty and
the parameter errorReason is set. However, note that
this vector may also be empty when no error occurred
but when the other device simply offers no services
that were searched for.errorReason - 0 indicates successful completion of service
search (either returning a list of matching
services or an empty list if there are none),
1 indicates the remote device was not reachable,
2 that the service search ended with an error
from the Bluetooth stack, and
3 that the search was canceled prematurely by
another thread.
2005-2009, Rene Mayrhofer.