Re: bluetooth-dev digest, Vol 1 #95 - 2 msgs
Re: bluetooth-dev digest, Vol 1 #95 - 2 msgs
- Subject: Re: bluetooth-dev digest, Vol 1 #95 - 2 msgs
- From: Eric Brown <email@hidden>
- Date: Mon, 24 Mar 2003 11:56:26 -0800
On Monday, March 24, 2003, at 08:02 AM, James Hillhouse wrote:
Stiphane,
The code included in the Apple Developer release is in Cocoa and C++.
Interestingly, the Bluetooth frameworks are written in C++ but the
Bluetooth example applications are written in Obj-C. I've given the
directory tree for both below.
Bluetooth
Frameworks ./System/Library/Frameworks/IOBluetooth.framework/
Versions/A/Header
Bluetooth Sample Code ./Developer/Examples/Bluetooth
It appears that Apple didn't work on any Carbon sample programs.
However, since the frameworks are in C++, you would be able to use
them in your Carbon (C/C++) code easily, using the sample program
headers for inspiration. Reading Obj-C is a bit strange at first, it
was at least for me, and I once thought of myself as a fast learner,
but...now...hmmm.
I wanted to clarify a couple of details. For the most part, it doesn't
matter what language was used to write a particular framework, it only
matters what languages the API supports. In the case of the Bluetooth
frameworks (IOBluetooth.framework and IOBluetoothUI.framework), the
implementations are a combination of C and ObjC. The full public API
is in ObjC with a matching set of C wrappers so that all of the
functionality is accessible from non-ObjC code.
The straight C API should work fine from your Carbon application with
the exception of the functions in the IOBluetoothUI.framework used to
provide access to the device and service selector panels. The panels
are written using Cocoa, and thus have problems running in a Carbon
application. We hope that we will be able to remove this restriction
in a future release.
The RFCOMM client sample application has both ObjC and C versions
within the ChatBluetoothInterface class implementation, so you should
be able to use that as a basic reference.
- Eric
On Monday, March 24, 2003, at 12:00 AM,
email@hidden wrote:
Date: Sun, 23 Mar 2003 13:34:20 +0100
Subject: C Carbon code sample ?
From: =?ISO-8859-1?Q?St=E9phane_Pinel?= <email@hidden>
To: email@hidden
Are there samples code using C Carbon demonstrating Bluetooth SDK
usage
?
Something like send a VCard etc ?
Thanks.
----------------------------------------------------------------------
--
-----------------------
Stiphane Pinel
----------------------------------------------------------------------
--
-----------------------
_______________________________________________
bluetooth-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
bluetooth-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.