|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.coffeecrew.mobile.oop.util.OOPFinder
public class OOPFinder
This class is used to locate the remote Obex object passing service url.
The main purpose is that BlueCove
does not implement the selectService()
method. This is a workaround,
that should work on all implementations that support at least basic discovery
mechanisms.
To transfer objects (you do not need this, but if you're interestet in the
connection url, this is the way to retrieve it)
Basic usage is:
OOPFinder oopf = new OOPFinder(); System.out.println("Connection: " + oopf.getConnectionURL());
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 | |
---|---|
OOPFinder()
Creates a new instance of OOPFinder, which is used to locate a remote Obex object passing service |
Method Summary | |
---|---|
void |
deviceDiscovered(javax.bluetooth.RemoteDevice remoteDevice,
javax.bluetooth.DeviceClass cod)
Implementation as defined in the interface javax.bluetooth.DiscoveryListener this code is called from the
implementation when a device was discovered. |
void |
findServices()
This actually locates the Obex object passing service |
java.lang.String |
getConnectionURL()
Fetches the connection URL which is needed to connect to the Obex object passing service. |
void |
inquire()
Executes the actual device inquiry. |
void |
inquiryCompleted(int discType)
Implementation as defined in the interface javax.bluetooth.DiscoveryListener this code is called from the
implementation when an inquiry is completed. |
void |
servicesDiscovered(int transID,
javax.bluetooth.ServiceRecord[] servRecord)
Implementation as defined in the interface javax.bluetooth.DiscoveryListener this code is called from the
implementation when a service was discovered. |
void |
serviceSearchCompleted(int transID,
int respCode)
Implementation as defined in the interface javax.bluetooth.DiscoveryListener this code is called from the
implementation when the service search finished. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OOPFinder()
Method Detail |
---|
public void inquire()
public void inquiryCompleted(int discType)
javax.bluetooth.DiscoveryListener
this code is called from the
implementation when an inquiry is completed.
inquiryCompleted
in interface javax.bluetooth.DiscoveryListener
discType
- How the inquiry completed; either INQUIRY_COMLETED, INQUIRY_ERROR or
INQUIRY_TERMINATEDpublic void servicesDiscovered(int transID, javax.bluetooth.ServiceRecord[] servRecord)
javax.bluetooth.DiscoveryListener
this code is called from the
implementation when a service was discovered.
servicesDiscovered
in interface javax.bluetooth.DiscoveryListener
transID
- Transaction ID, that is posted back from the service searchservRecord
- The service record containing information from the remote devicepublic void serviceSearchCompleted(int transID, int respCode)
javax.bluetooth.DiscoveryListener
this code is called from the
implementation when the service search finished.
serviceSearchCompleted
in interface javax.bluetooth.DiscoveryListener
transID
- The transaction ID that identifies the request that initiated the service searchrespCode
- The status response code of the transactionpublic void deviceDiscovered(javax.bluetooth.RemoteDevice remoteDevice, javax.bluetooth.DeviceClass cod)
javax.bluetooth.DiscoveryListener
this code is called from the
implementation when a device was discovered.
deviceDiscovered
in interface javax.bluetooth.DiscoveryListener
remoteDevice
- The remote device found during the inquirycod
- The class of device, the remote device represents (e.g. mobile, laptop, ...)public java.lang.String getConnectionURL()
public void findServices()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |