|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access Bluetooth Framework Reference\xA0 |
OBEXBluetooth.h |
Object Exchange over Bluetooth.
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 ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
inRFCOMMChannelA valid IOBluetoothRFCOMMChannel reference.
inGetResponseCallbackA callback for Get requests sent to your session by a remote device. Must be a valid function ptr, otherwise why even call this?
outSessionRefA 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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.
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 ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
inDeviceRefA valid IOBluetoothDeviceRef reference.
inChannelIDA valid RFCOMM channel ID on the target device.
outSessionRefA 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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.
IOBluetoothOBEXSessionCreateWithIOBluetoothSDPServiceRecordRef |
Create an OBEX session with a service ref, usually obtained from the device browser.
OBEXError IOBluetoothOBEXSessionCreateWithIOBluetoothSDPServiceRecordRef( IOBluetoothSDPServiceRecordRef inSDPServiceRef, OBEXSessionRef *outSessionRef ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
inSDPServiceRecordRefA valid service reference.
outSessionRefA 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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.
IOBluetoothOBEXSessionOpenTransportConnection |
OBEXError IOBluetoothOBEXSessionOpenTransportConnection( OBEXSessionRef inSessionRef, IOBluetoothOBEXSessionOpenConnectionCallback inCallback, void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
inSessionRefA valid session reference.
inCallbackA valid callback.
inUserRefConOptional 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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.
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 ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
inRFCOMMChannelA valid IOBluetoothRFCOMMChannel reference.
inGetResponseCallbackA callback for Get requests sent to your session by a remote device. Must be a valid function ptr, otherwise why even call this?
outSessionRefA 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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.
OBEXSessionOpenTransportConnection |
OBEXError IOBluetoothOBEXSessionOpenTransportConnection( OBEXSessionRef inSessionRef, IOBluetoothOBEXSessionOpenConnectionCallback inCallback, void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
inSessionRefA valid session reference.
inCallbackA valid callback.
inUserRefConOptional 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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.
\xA0
\xA0
Last Updated: 2009-10-09