ADC Home > Reference Library > Reference > Hardware & Drivers > Bluetooth > Bluetooth Framework Reference
|
IOBluetoothRFCOMMAudioController |
Inherits from: | NSObject |
Declared In: |
Baseclass for various SCO profiles
Close the bluetooth device connection
Close the rfcomm channel
Close the SCO connection
Get the audio device ID this object is attached to
Get the bluetooth device associated with this device
Access to the RFCOMM ID as specified on init for incoming device connections
Access to the RFCOMM ID as specified in the SDP of the device for outgoing connections
Create a new IOBluetoothRFCOMMAudioController for outgoing connect to a device
Create a new IOBluetoothRFCOMMAudioController for a device that is trying to connect in
Get the connection state of the bluetooth device being used
Check if the RFCOMM channel is open
Check if the SCO connection is open
Open the bluetooth device connection
Open rfcomm channel on current bluetooth device on the outgoing RFCOMM channel ID
Open the SCO connection
Send RFCOMM data to the device
Set the RFCOMM channel to use
closeDeviceConnection |
Close the bluetooth device connection
- (IOReturn) closeDeviceConnection;
The result of the first stage of disconnection, kIOReturnNoDevice if no device.
Look for final result in the provided delegate method
closeRFCOMMChannel |
Close the rfcomm channel
- (IOReturn) closeRFCOMMChannel;
Result will be value returned from the channels' "closeChannel" method, kIOReturnNotAttached if no channel is set
Look for final results in the provided delegate method
closeSCOConnection |
Close the SCO connection
- (IOReturn) closeSCOConnection;
kIOReturnSuccess on success or if already closed, various errors if failed
Look for final results in the provided delegate method
getAudioDeviceID |
Get the audio device ID this object is attached to
- (AudioDeviceID) getAudioDeviceID;
The audio device ID this object is attached to, NULL if not attached
getBluetoothDevice |
Get the bluetooth device associated with this device
- (IOBluetoothDevice *) getBluetoothDevice;
The bluetooth device this object is using, otherwise NULL
getIncomingRFCOMMChannelID |
Access to the RFCOMM ID as specified on init for incoming device connections
- (BluetoothRFCOMMChannelID) getIncomingRFCOMMChannelID;
The RFCOMM channel ID of the remote device, 0 if none
getOutgoingRFCOMMChannelID |
Access to the RFCOMM ID as specified in the SDP of the device for outgoing connections
- (BluetoothRFCOMMChannelID) getOutgoingRFCOMMChannelID;
The RFCOMM channel ID of the remote device, 0 if none
initForConnectionToDevice:delegate: |
Create a new IOBluetoothRFCOMMAudioController for outgoing connect to a device
- (id) initForConnectionToDevice: (IOBluetoothDevice *)device delegate: (id)inDelegate;
device
A valid IOBluetoothDevice
inDelegate
An object to act as delegate
A newly created IOBluetoothRFCOMMAudioController object on success, nil on failure
Typically you won't be calling this method directly, instead you'll use methods provided by the subclasses.
initWithIncomingDevice:incomingRFCOMMChannelID:delegate: |
Create a new IOBluetoothRFCOMMAudioController for a device that is trying to connect in
- (id) initWithIncomingDevice: (IOBluetoothDevice *)device incomingRFCOMMChannelID: (BluetoothRFCOMMChannelID)incomingRFCOMMChannelID delegate: (id)inDelegate;
device
A valid IOBluetoothDevice with baseband connection
incomingRFCOMMChannelID
The RFCOMM ID the device is trying to connect to
inDelegate
An object to act as delegate
A newly created IOBluetoothRFCOMMAudioController object on success, nil on failure
Typically you won't be calling this method directly, instead you'll use methods provided by the subclasses.
isDeviceConnected |
Get the connection state of the bluetooth device being used
- (BOOL) isDeviceConnected;
The connection state of the device, FALSE if no device or not connected
isRFCOMMChannelOpen |
Check if the RFCOMM channel is open
- (BOOL) isRFCOMMChannelOpen;
TRUE if open, FALSE if closed or device is nil
isSCOConnected |
Check if the SCO connection is open
- (BOOL) isSCOConnected;
TRUE if open, FALSE if closed or device is nil
openDeviceConnection |
Open the bluetooth device connection
- (IOReturn) openDeviceConnection;
The result of the first stage of connection, kIOReturnNoDevice if no device.
Look for final result in the provided delegate method
openRFCOMMChannel |
Open rfcomm channel on current bluetooth device on the outgoing RFCOMM channel ID
- (IOReturn) openRFCOMMChannel;
Result will be value returned from IOBluetoothDevice openRFCOMMChannelAsync if device is valid, kIOReturnError if no device is set
Look for final result in the provided delegate method
openSCOConnection |
Open the SCO connection
- (IOReturn) openSCOConnection;
kIOReturnSuccess on success or if still open, various errors if failed
Look for final result in the provided delegate method
sendRFCOMMData:length: |
Send RFCOMM data to the device
- (IOReturn) sendRFCOMMData:(const void *)data length:(UInt16)length;
data
Data to be sent to device
length
Length of the data
Result will be value returned from the channels' "writeAsync" method, kIOReturnNotAttached if no channel is set
setRFCOMMChannel: |
Set the RFCOMM channel to use
- (void) setRFCOMMChannel:(IOBluetoothRFCOMMChannel *)rfcommChannel;
rfcommChannel
The channel to use or nil to release the current one
|
Last Updated: 2008-08-07