|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BluetoothStack
New native stack support should ONLY implement this interface. No other classes should ideally be changed except BlueCoveImpl where the instance of new class should be created.
Your application should not use this class directly.
Nested Class Summary | |
---|---|
static class |
BluetoothStack.LibraryInformation
|
Field Summary | |
---|---|
static int |
FEATURE_ASSIGN_SERVER_PSM
|
static int |
FEATURE_L2CAP
|
static int |
FEATURE_RSSI
|
static int |
FEATURE_SERVICE_ATTRIBUTES
|
static int |
FEATURE_SET_DEVICE_SERVICE_CLASSES
|
Method Summary | |
---|---|
boolean |
authenticateRemoteDevice(long address)
Attempts to authenticate RemoteDevice. |
boolean |
authenticateRemoteDevice(long address,
String passkey)
Sends an authentication request to a remote Bluetooth device. |
boolean |
cancelInquiry(DiscoveryListener listener)
called by JSR-82 code Device Inquiry |
boolean |
cancelServiceSearch(int transID)
called by JSR-82 code Service search |
void |
connectionRfCloseClientConnection(long handle)
|
void |
connectionRfCloseServerConnection(long handle)
|
void |
connectionRfFlush(long handle)
|
long |
connectionRfOpenClientConnection(com.intel.bluetooth.BluetoothConnectionParams params)
Used to create handle for BluetoothRFCommClientConnection |
int |
connectionRfRead(long handle)
|
int |
connectionRfRead(long handle,
byte[] b,
int off,
int len)
|
int |
connectionRfReadAvailable(long handle)
|
void |
connectionRfWrite(long handle,
byte[] b,
int off,
int len)
|
void |
connectionRfWrite(long handle,
int b)
|
void |
destroy()
|
int |
detectBluetoothStack()
Used if OS Supports multiple Bluetooth stacks 0x01 winsock; 0x02 widcomm; 0x04 bluesoleil; 0x08 BlueZ; 0x10 OS X stack; |
void |
enableNativeDebug(Class nativeDebugCallback,
boolean on)
|
long |
getConnectionRfRemoteAddress(long handle)
|
int |
getFeatureSet()
|
int |
getLibraryVersion()
Used to verify native library version. |
String |
getLocalDeviceBluetoothAddress()
Retrieves the Bluetooth address of the local device. |
DeviceClass |
getLocalDeviceClass()
Retrieves the class of the local device. |
int |
getLocalDeviceDiscoverable()
|
String |
getLocalDeviceName()
Retrieves the name of the local device. |
String |
getLocalDeviceProperty(String property)
|
String |
getRemoteDeviceFriendlyName(long address)
called by implementation when device name is unknown or alwaysAsk is
true
Returns null if the Bluetooth system does not support this feature; If
the remote device does not have a name then an empty string. |
String |
getStackID()
|
void |
initialize()
Call is made when we want to use this stack. |
boolean |
isCurrentThreadInterruptedCallback()
Called from long running native code to see if thread interrupted. |
boolean |
isLocalDevicePowerOn()
|
boolean |
isNativeCodeLoaded()
Used by library initialization to detect if shared library already loaded. |
Boolean |
isRemoteDeviceAuthenticated(long address)
|
Boolean |
isRemoteDeviceTrusted(long address)
|
void |
l2CloseClientConnection(long handle)
Closing BluetoothL2CAPClientConnection |
void |
l2CloseServerConnection(long handle)
Closing BluetoothL2CAPServerConnection |
boolean |
l2Encrypt(long address,
long handle,
boolean on)
|
int |
l2GetReceiveMTU(long handle)
|
int |
l2GetSecurityOpt(long handle,
int expected)
|
int |
l2GetTransmitMTU(long handle)
|
long |
l2OpenClientConnection(com.intel.bluetooth.BluetoothConnectionParams params,
int receiveMTU,
int transmitMTU)
Used to create handle for BluetoothL2CAPClientConnection |
boolean |
l2Ready(long handle)
|
int |
l2Receive(long handle,
byte[] inBuf)
|
long |
l2RemoteAddress(long handle)
|
void |
l2Send(long handle,
byte[] data,
int transmitMTU)
|
long |
l2ServerAcceptAndOpenServerConnection(long handle)
Used to create handle for BluetoothL2CAPServerConnection |
void |
l2ServerClose(long handle,
com.intel.bluetooth.ServiceRecordImpl serviceRecord)
|
long |
l2ServerOpen(com.intel.bluetooth.BluetoothConnectionNotifierParams params,
int receiveMTU,
int transmitMTU,
com.intel.bluetooth.ServiceRecordImpl serviceRecord)
Used to create handle for BluetoothL2CAPConnectionNotifier |
void |
l2ServerUpdateServiceRecord(long handle,
com.intel.bluetooth.ServiceRecordImpl serviceRecord,
boolean acceptAndOpen)
|
boolean |
populateServicesRecordAttributeValues(com.intel.bluetooth.ServiceRecordImpl serviceRecord,
int[] attrIDs)
Called by ServiceRecord.populateRecord(int[] attrIDs) during Service search. |
void |
removeAuthenticationWithRemoteDevice(long address)
Removes authentication between local and remote bluetooth devices. |
BluetoothStack.LibraryInformation[] |
requireNativeLibraries()
List the native libraries that need to be loaded. |
RemoteDevice[] |
retrieveDevices(int option)
|
boolean |
rfEncrypt(long address,
long handle,
boolean on)
|
int |
rfGetSecurityOpt(long handle,
int expected)
|
long |
rfServerAcceptAndOpenRfServerConnection(long handle)
Used to create handle for BluetoothRFCommServerConnection |
void |
rfServerClose(long handle,
com.intel.bluetooth.ServiceRecordImpl serviceRecord)
|
long |
rfServerOpen(com.intel.bluetooth.BluetoothConnectionNotifierParams params,
com.intel.bluetooth.ServiceRecordImpl serviceRecord)
Used to create handle for BluetoothRFCommConnectionNotifier |
void |
rfServerUpdateServiceRecord(long handle,
com.intel.bluetooth.ServiceRecordImpl serviceRecord,
boolean acceptAndOpen)
|
int |
searchServices(int[] attrSet,
UUID[] uuidSet,
RemoteDevice device,
DiscoveryListener listener)
called by JSR-82 code Service search |
boolean |
setLocalDeviceDiscoverable(int mode)
|
void |
setLocalDeviceServiceClasses(int classOfDevice)
Implementation for local device service class |
boolean |
startInquiry(int accessCode,
DiscoveryListener listener)
called by JSR-82 code Device Inquiry |
Field Detail |
---|
static final int FEATURE_L2CAP
static final int FEATURE_SERVICE_ATTRIBUTES
static final int FEATURE_SET_DEVICE_SERVICE_CLASSES
static final int FEATURE_RSSI
static final int FEATURE_ASSIGN_SERVER_PSM
Method Detail |
---|
boolean isNativeCodeLoaded()
BluetoothStack.LibraryInformation[] requireNativeLibraries()
java.lang.System#loadLibrary(java.lang.String)
int getLibraryVersion() throws BluetoothStateException
BluetoothStateException
int detectBluetoothStack()
void enableNativeDebug(Class nativeDebugCallback, boolean on)
nativeDebugCallback
- DebugLog.classon
- void initialize() throws BluetoothStateException
BluetoothStateException
void destroy()
String getStackID()
boolean isCurrentThreadInterruptedCallback()
int getFeatureSet()
String getLocalDeviceBluetoothAddress() throws BluetoothStateException
BluetoothStateException
LocalDevice.getBluetoothAddress()
String getLocalDeviceName()
LocalDevice.getFriendlyName()
DeviceClass getLocalDeviceClass()
LocalDevice.getDeviceClass()
void setLocalDeviceServiceClasses(int classOfDevice)
classOfDevice
- and
,
LocalDevice.updateRecord(javax.bluetooth.ServiceRecord)
boolean setLocalDeviceDiscoverable(int mode) throws BluetoothStateException
BluetoothStateException
LocalDevice.setDiscoverable(int)
int getLocalDeviceDiscoverable()
LocalDevice.getDiscoverable()
boolean isLocalDevicePowerOn()
LocalDevice.isPowerOn()
String getLocalDeviceProperty(String property)
LocalDevice.getProperty(String)
boolean authenticateRemoteDevice(long address) throws IOException
false
if the stack does
not support authentication.
IOException
RemoteDevice.authenticate()
boolean authenticateRemoteDevice(long address, String passkey) throws IOException
address
- Remote Device addresspasskey
- A Personal Identification Number (PIN) to be used for device
authentication.
true
if authentication is successful; otherwise
false
IOException
- if there are error during authentication.void removeAuthenticationWithRemoteDevice(long address) throws IOException
address
- Remote Device address authentication.
IOException
- if there are error during authentication.boolean startInquiry(int accessCode, DiscoveryListener listener) throws BluetoothStateException
BluetoothStateException
DiscoveryAgent.startInquiry(int,
javax.bluetooth.DiscoveryListener)
boolean cancelInquiry(DiscoveryListener listener)
DiscoveryAgent.cancelInquiry(javax.bluetooth.DiscoveryListener)
String getRemoteDeviceFriendlyName(long address) throws IOException
alwaysAsk
is
true
Returns null
if the Bluetooth system does not support this feature; If
the remote device does not have a name then an empty string.
IOException
RemoteDevice.getFriendlyName(boolean)
RemoteDevice[] retrieveDevices(int option)
DiscoveryAgent.retrieveDevices(int)
Boolean isRemoteDeviceTrusted(long address)
RemoteDevice.isTrustedDevice()
Boolean isRemoteDeviceAuthenticated(long address)
RemoteDevice.isAuthenticated()
int searchServices(int[] attrSet, UUID[] uuidSet, RemoteDevice device, DiscoveryListener listener) throws BluetoothStateException
BluetoothStateException
DiscoveryAgent.searchServices(int[],UUID[],javax.bluetooth.RemoteDevice,
javax.bluetooth.DiscoveryListener)
boolean cancelServiceSearch(int transID)
DiscoveryAgent.cancelServiceSearch(int)
boolean populateServicesRecordAttributeValues(com.intel.bluetooth.ServiceRecordImpl serviceRecord, int[] attrIDs) throws IOException
IOException
ServiceRecord.populateRecord(int[])
long connectionRfOpenClientConnection(com.intel.bluetooth.BluetoothConnectionParams params) throws IOException
BluetoothRFCommClientConnection
IOException
Connector.open(String, int, boolean)
int rfGetSecurityOpt(long handle, int expected) throws IOException
handle
- expected
- Value specified when connection was open
ServiceRecord.xxAUTHENTICATE_xxENCRYPT
IOException
RemoteDevice.isAuthenticated()
,
RemoteDevice.isEncrypted()
void connectionRfCloseClientConnection(long handle) throws IOException
IOException
BluetoothRFCommClientConnection
,
BluetoothRFCommConnection.close()
,
BluetoothRFCommConnection.closeConnectionHandle(long)
void connectionRfCloseServerConnection(long handle) throws IOException
IOException
BluetoothRFCommServerConnection
,
connectionRfCloseClientConnection(long)
,
Connection.close()
long rfServerOpen(com.intel.bluetooth.BluetoothConnectionNotifierParams params, com.intel.bluetooth.ServiceRecordImpl serviceRecord) throws IOException
BluetoothRFCommConnectionNotifier
IOException
Connector.open(String, int, boolean)
void rfServerUpdateServiceRecord(long handle, com.intel.bluetooth.ServiceRecordImpl serviceRecord, boolean acceptAndOpen) throws ServiceRegistrationException
ServiceRegistrationException
LocalDevice.updateRecord(javax.bluetooth.ServiceRecord)
long rfServerAcceptAndOpenRfServerConnection(long handle) throws IOException
BluetoothRFCommServerConnection
IOException
BluetoothRFCommConnectionNotifier.acceptAndOpen()
,
StreamConnectionNotifier.acceptAndOpen()
void rfServerClose(long handle, com.intel.bluetooth.ServiceRecordImpl serviceRecord) throws IOException
IOException
BluetoothConnectionNotifierBase.close()
,
Connection.close()
long getConnectionRfRemoteAddress(long handle) throws IOException
IOException
RemoteDevice.getRemoteDevice(javax.microedition.io.Connection)
boolean rfEncrypt(long address, long handle, boolean on) throws IOException
IOException
RemoteDevice.encrypt(javax.microedition.io.Connection,
boolean)
int connectionRfRead(long handle) throws IOException
IOException
InputStream.read()
,
BluetoothRFCommInputStream.read()
int connectionRfRead(long handle, byte[] b, int off, int len) throws IOException
IOException
InputStream.read(byte[],int,int)
,
BluetoothRFCommInputStream.read(byte[],int,int)
int connectionRfReadAvailable(long handle) throws IOException
IOException
InputStream.available()
,
BluetoothRFCommInputStream.available()
void connectionRfWrite(long handle, int b) throws IOException
IOException
BluetoothRFCommOutputStream.write(int)
void connectionRfWrite(long handle, byte[] b, int off, int len) throws IOException
IOException
BluetoothRFCommOutputStream.write(byte[], int, int)
void connectionRfFlush(long handle) throws IOException
IOException
BluetoothRFCommOutputStream.flush()
long l2OpenClientConnection(com.intel.bluetooth.BluetoothConnectionParams params, int receiveMTU, int transmitMTU) throws IOException
BluetoothL2CAPClientConnection
IOException
void l2CloseClientConnection(long handle) throws IOException
BluetoothL2CAPClientConnection
IOException
Connection.close()
long l2ServerOpen(com.intel.bluetooth.BluetoothConnectionNotifierParams params, int receiveMTU, int transmitMTU, com.intel.bluetooth.ServiceRecordImpl serviceRecord) throws IOException
BluetoothL2CAPConnectionNotifier
IOException
Connector.open(String, int, boolean)
void l2ServerUpdateServiceRecord(long handle, com.intel.bluetooth.ServiceRecordImpl serviceRecord, boolean acceptAndOpen) throws ServiceRegistrationException
ServiceRegistrationException
LocalDevice.updateRecord(javax.bluetooth.ServiceRecord)
long l2ServerAcceptAndOpenServerConnection(long handle) throws IOException
BluetoothL2CAPServerConnection
IOException
BluetoothL2CAPConnectionNotifier.acceptAndOpen()
,
L2CAPConnectionNotifier.acceptAndOpen()
void l2CloseServerConnection(long handle) throws IOException
BluetoothL2CAPServerConnection
IOException
l2CloseClientConnection(long)
void l2ServerClose(long handle, com.intel.bluetooth.ServiceRecordImpl serviceRecord) throws IOException
IOException
BluetoothConnectionNotifierBase.close()
,
Connection.close()
int l2GetSecurityOpt(long handle, int expected) throws IOException
IOException
rfGetSecurityOpt(long, int)
int l2GetTransmitMTU(long handle) throws IOException
IOException
L2CAPConnection.getTransmitMTU()
int l2GetReceiveMTU(long handle) throws IOException
IOException
L2CAPConnection.getReceiveMTU()
boolean l2Ready(long handle) throws IOException
IOException
L2CAPConnection.ready()
int l2Receive(long handle, byte[] inBuf) throws IOException
IOException
L2CAPConnection.receive(byte[])
void l2Send(long handle, byte[] data, int transmitMTU) throws IOException
IOException
L2CAPConnection.send(byte[])
long l2RemoteAddress(long handle) throws IOException
IOException
RemoteDevice.getRemoteDevice(javax.microedition.io.Connection)
boolean l2Encrypt(long address, long handle, boolean on) throws IOException
IOException
RemoteDevice.encrypt(javax.microedition.io.Connection,
boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |