Using OBEX headers in C/C++
Using OBEX headers in C/C++
- Subject: Using OBEX headers in C/C++
- From: Iain Wallace <email@hidden>
- Date: Wed, 6 Jun 2007 14:53:09 +0100
Hello,
This kinda follows on from:
http://lists.apple.com/archives/Bluetooth-dev/2007/Mar/msg00008.html
I'm wanting to use OBEX in C or C++, but it would appear I can't,
from the above and from trying my own test program. The below won't
compile due to many errors like "error: parse error before '*'
token" (the code may have other issues, I'm new to this, but the
inability to include the correct header is the main stumbling block
at the moment).
Cheers,
Iain
#include <CoreFoundation/CoreFoundation.h>
#include <IOBluetooth/IOBluetoothUserLib.h>
#include <IOBluetooth/IOBluetoothUtilities.h>
#include <IOBluetooth/OBEX.h>
#include <IOBluetooth/OBEXBluetooth.h>
//
========================================================================
===================================================
// main
//
========================================================================
===================================================
int main (int argc, const char * argv[])
{
BluetoothDeviceAddress Phone;
IOBluetoothDeviceRef PhoneAddr;
OBEXSessionRef* Session;
int ret;
ret = 0;
IOBluetoothNSStringToDeviceAddress("00:00:00:00:00:00",&Phone);
PhoneAddr = IOBluetoothDeviceCreateWithAddress(&Phone);
ret =
IOBluetoothOBEXSessionCreateWithIOBluetoothDeviceRefAndChannelNumber
(PhoneAddr,11,Session);
return ret;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden