Re: OBEXAddCountHeader
Re: OBEXAddCountHeader
- Subject: Re: OBEXAddCountHeader
- From: Ralf Menssen <email@hidden>
- Date: Wed, 18 Oct 2006 19:07:42 +0200
Sebastian Krauß schrieb:
OK, just had a look at the documentation.
Looks good. -- But... in my app, I stuck close to Apple's sample code at
/Developer/Examples/Bluetooth/OBEXSample which let me show progress
since my eventSelector got called every time I can write new data.
Will I still be able to do that when I use those APIs which -- in
comparison, at least -- are more high level?
Sebastian
PS: Sorry for not having replied to the other mails; I somehow only
received a few of the answers and discovered the other mails in the web
archive.
No, OBEX File Transfer is an alternative Bluetooth service. You use it
instead of OBEX Object Push. It provides you with some basic file
system functions like copy files, get directory contents of the
device, create new folders, delete files, etc. You connect once and
stay connected until you close the connection.
In your main menu bar you should find that Bluetooth symbol with some
functions to browse a Bluetooth device. This uses OBEX File Transfer.
Documentation is here:
http://developer.apple.com/documentation/DeviceDrivers/Reference/IOBluetooth/OBEXFileTransferServices/Classes/OBEXFileTransferServices/CompositePage.html
And a while ago there was sample code for an OBEX File Transfer
application, don't know where it has gone...
Yes, FileTransfer uses similar mechanisms. When copying a file from the
Mac to the device using
status = [mFileTransferService sendFile:@"Testfile"];
you should provide 2 delegate functions:
1.
- (void)
fileTransferServicesSendFileComplete:(OBEXFileTransferServices*)inServices
error:(OBEXError)inError
and 2. (example):
- (void)
fileTransferServicesSendFileProgress:(OBEXFileTransferServices*)inServices
transferProgress:(NSDictionary*)inProgressDescription;
{
NSNumber *dataTransfered = [inProgressDescription
objectForKey:(NSString *)kFTSProgressBytesTransferredKey];
[_notifier showProgress:[dataTransfered intValue]];
/* Dictionary contains:
kFTSProgressBytesTotalKey = 3880895;
kFTSProgressBytesTransferredKey = 65529;
kFTSProgressEstimatedTimeKey = 51.3941650390625;
kFTSProgressPercentageKey = 1.688502;
kFTSProgressTimeElapsedKey = 0;
kFTSProgressTransferRateKey = 72.4974;
*/
}
Ralf Menssen
nova media
_______________________________________________
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