|
||||||||||
| 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_L2CAP
|
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 |
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)
|
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
| Method Detail |
|---|
boolean isNativeCodeLoaded()
BluetoothStack.LibraryInformation[] requireNativeLibraries()
System.loadLibrary(java.lang.String)
int getLibraryVersion()
throws BluetoothStateException
BluetoothStateExceptionint detectBluetoothStack()
void enableNativeDebug(Class nativeDebugCallback,
boolean on)
nativeDebugCallback - DebugLog.classon -
void initialize()
throws BluetoothStateException
BluetoothStateExceptionvoid destroy()
String getStackID()
boolean isCurrentThreadInterruptedCallback()
int getFeatureSet()
String getLocalDeviceBluetoothAddress()
throws BluetoothStateException
BluetoothStateExceptionLocalDevice.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
BluetoothStateExceptionLocalDevice.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.
IOExceptionRemoteDevice.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
BluetoothStateExceptionDiscoveryAgent.startInquiry(int, javax.bluetooth.DiscoveryListener)boolean cancelInquiry(DiscoveryListener listener)
DiscoveryAgent.cancelInquiry(javax.bluetooth.DiscoveryListener)
String getRemoteDeviceFriendlyName(long address)
throws IOException
alwaysAsk is true
IOExceptionRemoteDevice.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
BluetoothStateExceptionDiscoveryAgent.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
IOExceptionServiceRecord.populateRecord(int[])
long connectionRfOpenClientConnection(com.intel.bluetooth.BluetoothConnectionParams params)
throws IOException
BluetoothRFCommClientConnection
IOExceptionConnector.open(String, int, boolean)
int rfGetSecurityOpt(long handle,
int expected)
throws IOException
handle - expected - Value specified when connection was open ServiceRecord.xxAUTHENTICATE_xxENCRYPT
IOExceptionRemoteDevice.isAuthenticated(),
RemoteDevice.isEncrypted()
void connectionRfCloseClientConnection(long handle)
throws IOException
IOExceptionBluetoothRFCommClientConnection,
BluetoothRFCommConnection.close(),
BluetoothRFCommConnection.closeConnectionHandle(long)
void connectionRfCloseServerConnection(long handle)
throws IOException
IOExceptionBluetoothRFCommServerConnection,
connectionRfCloseClientConnection(long),
Connection.close()
long rfServerOpen(com.intel.bluetooth.BluetoothConnectionNotifierParams params,
com.intel.bluetooth.ServiceRecordImpl serviceRecord)
throws IOException
BluetoothRFCommConnectionNotifier
IOExceptionConnector.open(String, int, boolean)
void rfServerUpdateServiceRecord(long handle,
com.intel.bluetooth.ServiceRecordImpl serviceRecord,
boolean acceptAndOpen)
throws ServiceRegistrationException
ServiceRegistrationExceptionLocalDevice.updateRecord(javax.bluetooth.ServiceRecord)
long rfServerAcceptAndOpenRfServerConnection(long handle)
throws IOException
BluetoothRFCommServerConnection
IOExceptionBluetoothRFCommConnectionNotifier.acceptAndOpen(),
StreamConnectionNotifier.acceptAndOpen()
void rfServerClose(long handle,
com.intel.bluetooth.ServiceRecordImpl serviceRecord)
throws IOException
IOExceptionBluetoothConnectionNotifierBase.close(),
Connection.close()
long getConnectionRfRemoteAddress(long handle)
throws IOException
IOExceptionRemoteDevice.getRemoteDevice(javax.microedition.io.Connection)
boolean rfEncrypt(long address,
long handle,
boolean on)
throws IOException
IOExceptionRemoteDevice.encrypt(javax.microedition.io.Connection, boolean)
int connectionRfRead(long handle)
throws IOException
IOExceptionInputStream.read(),
BluetoothRFCommInputStream.read()
int connectionRfRead(long handle,
byte[] b,
int off,
int len)
throws IOException
IOExceptionInputStream.read(byte[],int,int),
BluetoothRFCommInputStream.read(byte[],int,int)
int connectionRfReadAvailable(long handle)
throws IOException
IOExceptionInputStream.available(),
BluetoothRFCommInputStream.available()
void connectionRfWrite(long handle,
int b)
throws IOException
IOExceptionBluetoothRFCommOutputStream.write(int)
void connectionRfWrite(long handle,
byte[] b,
int off,
int len)
throws IOException
IOExceptionBluetoothRFCommOutputStream.write(byte[], int, int)
void connectionRfFlush(long handle)
throws IOException
IOExceptionBluetoothRFCommOutputStream.flush()
long l2OpenClientConnection(com.intel.bluetooth.BluetoothConnectionParams params,
int receiveMTU,
int transmitMTU)
throws IOException
BluetoothL2CAPClientConnection
IOException
void l2CloseClientConnection(long handle)
throws IOException
BluetoothL2CAPClientConnection
IOExceptionConnection.close()
long l2ServerOpen(com.intel.bluetooth.BluetoothConnectionNotifierParams params,
int receiveMTU,
int transmitMTU,
com.intel.bluetooth.ServiceRecordImpl serviceRecord)
throws IOException
BluetoothL2CAPConnectionNotifier
IOExceptionConnector.open(String, int, boolean)
void l2ServerUpdateServiceRecord(long handle,
com.intel.bluetooth.ServiceRecordImpl serviceRecord,
boolean acceptAndOpen)
throws ServiceRegistrationException
ServiceRegistrationExceptionLocalDevice.updateRecord(javax.bluetooth.ServiceRecord)
long l2ServerAcceptAndOpenServerConnection(long handle)
throws IOException
BluetoothL2CAPServerConnection
IOExceptionBluetoothL2CAPConnectionNotifier.acceptAndOpen(),
L2CAPConnectionNotifier.acceptAndOpen()
void l2CloseServerConnection(long handle)
throws IOException
BluetoothL2CAPServerConnection
IOExceptionl2CloseClientConnection(long)
void l2ServerClose(long handle,
com.intel.bluetooth.ServiceRecordImpl serviceRecord)
throws IOException
IOExceptionBluetoothConnectionNotifierBase.close(),
Connection.close()
int l2GetSecurityOpt(long handle,
int expected)
throws IOException
IOExceptionrfGetSecurityOpt(long, int)
int l2GetTransmitMTU(long handle)
throws IOException
IOExceptionL2CAPConnection.getTransmitMTU()
int l2GetReceiveMTU(long handle)
throws IOException
IOExceptionL2CAPConnection.getReceiveMTU()
boolean l2Ready(long handle)
throws IOException
IOExceptionL2CAPConnection.ready()
int l2Receive(long handle,
byte[] inBuf)
throws IOException
IOExceptionL2CAPConnection.receive(byte[])
void l2Send(long handle,
byte[] data)
throws IOException
IOExceptionL2CAPConnection.send(byte[])
long l2RemoteAddress(long handle)
throws IOException
IOExceptionRemoteDevice.getRemoteDevice(javax.microedition.io.Connection)
boolean l2Encrypt(long address,
long handle,
boolean on)
throws IOException
IOExceptionRemoteDevice.encrypt(javax.microedition.io.Connection, boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||