ADC Home > Reference Library > Reference > Hardware & Drivers > Bluetooth > Bluetooth Framework Reference
|
OBEXBluetooth.h |
Include Path: | <IOBluetooth/OBEXBluetooth.h> |
Path: | /System/Library/Frameworks/IOBluetooth.framework/Versions/A/Headers/OBEXBluetooth.h |
See Also: |
This header contains the interfaces that define Object Exchange over Bluetooth.
For more information about accessing Bluetooth devices, see Working With Bluetooth Devices.
Create an OBEX session with an IOBluetoothRFCOMMchannel. This implies you are creating a OBEX SERVER session that will dole out info to remote Bluetooth clients.
Create an OBEX session with a device ref and an RFCOMM channel ID. This allows you to bypass the browser if you already know the SDP information.
Create an OBEX session with a service ref, usually obtained from the device browser.
Create an OBEX session with an IOBluetoothRFCOMMchannel. This implies you are creating a OBEX SERVER session that will dole out info to remote Bluetooth clients.
IOBluetoothOBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel |
Create an OBEX session with an IOBluetoothRFCOMMchannel. This implies you are creating a OBEX SERVER session that will dole out info to remote Bluetooth clients.
OBEXError IOBluetoothOBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel( IOBluetoothRFCOMMChannelRef inRFCOMMChannelRef, OBEXSessionEventCallback inCallback, void *inUserRefCon, OBEXSessionRef *outSessionRef );
inRFCOMMChannel
A valid IOBluetoothRFCOMMChannel reference.
inGetResponseCallback
A callback for Get requests sent to your session by a remote device. Must be a valid function ptr, otherwise why even call this?
outSessionRef
A valid ptr to an IOBluetoothOBEXSessionRef; will contain the newly created session if return value is kOBEXSuccess.
An error code value. 0 if successful.
This assumes that the RFCOMM channel you have passed it is already open and ready to transmit data to the session. THIS API WILL CHANGE.
IOBluetoothOBEXSessionCreateWithIOBluetoothDeviceRefAndChannelNumber |
Create an OBEX session with a device ref and an RFCOMM channel ID. This allows you to bypass the browser if you already know the SDP information.
OBEXError IOBluetoothOBEXSessionCreateWithIOBluetoothDeviceRefAndChannelNumber( IOBluetoothDeviceRef inDeviceRef, BluetoothRFCOMMChannelID inChannelID, OBEXSessionRef *outSessionRef );
inDeviceRef
A valid IOBluetoothDeviceRef reference.
inChannelID
A valid RFCOMM channel ID on the target device.
outSessionRef
A valid ptr to an IOBluetoothOBEXSessionRef; will contain the newly created session if return value is kOBEXSuccess.
An error code value. 0 if successful.
You will use a session reference to do all OBEX interaction to a specific device. This method DOES NOT create a connection to the device of any kind.
IOBluetoothOBEXSessionCreateWithIOBluetoothSDPServiceRecordRef |
Create an OBEX session with a service ref, usually obtained from the device browser.
OBEXError IOBluetoothOBEXSessionCreateWithIOBluetoothSDPServiceRecordRef( IOBluetoothSDPServiceRecordRef inSDPServiceRef, OBEXSessionRef *outSessionRef );
inSDPServiceRecordRef
A valid service reference.
outSessionRef
A valid ptr to an IOBluetoothOBEXSessionRef; will contain the newly created session if return value is kOBEXSuccess.
An error code value. 0 if successful.
You will use a session reference to do all OBEX interaction to a specific device. This method DOES NOT create a connection to the device of any kind.
IOBluetoothOBEXSessionOpenTransportConnection |
OBEXError IOBluetoothOBEXSessionOpenTransportConnection( OBEXSessionRef inSessionRef, IOBluetoothOBEXSessionOpenConnectionCallback inCallback, void *inUserRefCon );
inSessionRef
A valid session reference.
inCallback
A valid callback.
inUserRefCon
Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.
An error code value. 0 if successful.
Opens a transport-level connection to a remote target. For example, if you are using a Bluetooth transport, this will establish the baseband/L2CAP/RFCOMM connection to a device. Once the callback is called, the connection will either be opened or have failed with a status code. That status code will most likely have originated from the transport layer being used, so you may receive a Bluetooth error, an IOKit error, etc, but a 0 status should indicate success in all cases.
OBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel |
Create an OBEX session with an IOBluetoothRFCOMMchannel. This implies you are creating a OBEX SERVER session that will dole out info to remote Bluetooth clients.
OBEXError IOBluetoothOBEXSessionCreateWithIncomingIOBluetoothRFCOMMChannel( IOBluetoothRFCOMMChannelRef inRFCOMMChannelRef, OBEXSessionEventCallback inCallback, void *inUserRefCon, OBEXSessionRef *outSessionRef );
inRFCOMMChannel
A valid IOBluetoothRFCOMMChannel reference.
inGetResponseCallback
A callback for Get requests sent to your session by a remote device. Must be a valid function ptr, otherwise why even call this?
outSessionRef
A valid ptr to an IOBluetoothOBEXSessionRef; will contain the newly created session if return value is kOBEXSuccess.
An error code value. 0 if successful.
This assumes that the RFCOMM channel you have passed it is already open and ready to transmit data to the session. THIS API WILL CHANGE.
OBEXSessionOpenTransportConnection |
OBEXError IOBluetoothOBEXSessionOpenTransportConnection( OBEXSessionRef inSessionRef, IOBluetoothOBEXSessionOpenConnectionCallback inCallback, void *inUserRefCon );
inSessionRef
A valid session reference.
inCallback
A valid callback.
inUserRefCon
Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.
An error code value. 0 if successful.
Opens a transport-level connection to a remote target. For example, if you are using a Bluetooth transport, this will establish the baseband/L2CAP/RFCOMM connection to a device. Once the callback is called, the connection will either be opened or have failed with a status code. That status code will most likely have originated from the transport layer being used, so you may receive a Bluetooth error, an IOKit error, etc, but a 0 status should indicate success in all cases.
|
Last Updated: 2008-08-07