Re: Folder Browsing on a BT phone
Re: Folder Browsing on a BT phone
- Subject: Re: Folder Browsing on a BT phone
- From: Bubba Giles <email@hidden>
- Date: Thu, 10 Jul 2003 13:46:01 -0700
Because the phone returns nothing, it most likely has nothing in that
'folder'. Try doing the same request to another mac first if you have one -
as long as you have FTP enabled in the Bluetooth prefs, and you have items
in your shared folder, you should be able to get back a folder listing with
items in it. They look like this:
<?xml version="1.0" encoding="UTF-8"?>
<folder-listing version="1.0">
<file name="a file copy 1.txt" created="19961103T141500Z"
size="1323814"/>
<file name="a file copy 2.txt" created="19961103T141500Z" size="1323814"/>
<file name="a file copy.txt" created="19961103T141500Z" size="1323814"/>
<file name="a file.txt" created="19961103T141500Z" size="1323814"/>
<folder name="folder1" created="19961103T141500Z" size="0"/>
<folder name="folder1 copy" created="19961103T141500Z" size="0"/>
<folder name="folder1 copy 1" created="19961103T141500Z" size="0"/>
<folder name="folder1 copy 2" created="19961103T141500Z" size="0"/>
Or you can use Bluetooth File Exchange to browse the phone and see what it
returns. Does it show any files in the list? If the results are the same, it
most likely doesn9t have any items in it to return. You can try putting a
file on there, using BFE as well.
Jason
email@hidden
>
Thank you so much Giles.
>
>
Indeed that helped.
>
I managed to get some sort of a "listing" from my phone via File
>
Transfer:
>
>
<?xml version="1.0"?> <!DOCTYPE folder-listing
>
SYSTEM"obex-folder-listing.dtd"> <folder-listing
>
version="1.0"></folder-listing>
>
>
Does any one have any idea in what direction I have to move now to
>
actually get the folder and file names?
>
Nokia forums have absolutely NOTHING!
>
>
>
>
On Thursday, July 10, 2003, at 03:02 PM, Bubba Giles wrote:
>
>
> Do this to get the connection ID (as well as something similat to get
>
> the
>
> other headers):
>
>
>
> CFDictionaryRef dictionary = OBEXGetHeaders(
>
> yourcommandresponsedataptr,
>
> yourcommandresponsedatalength );
>
>
>
> Then get keys/values from that dictionary:
>
>
>
> if( dictionary )
>
> {
>
> if( CFDictionaryGetCountOfKey( dictionary,
>
> kOBEXHeaderIDKeyConnectionID ) > 0 )
>
> {
>
> CFDataRef theDataRef;
>
>
>
> theDataRef = (CFDataRef) CFDictionaryGetValue(
>
> dictionary,
>
> kOBEXHeaderIDKeyConnectionID );
>
> if( theDataRef )
>
> {
>
> CFDataGetBytes( theDataRef, CFRangeMake( 0, 4 ),
>
> (uint8_t*) &mConnectionID );
>
> }
>
> }
>
> }
>
>
>
> So, for a type header, you would do:
>
>
>
> if( CFDictionaryGetCountOfKey( dictionaryRef, kOBEXHeaderIDKeyType
>
> ) > 0
>
> )
>
> {
>
> CFStringRef theStringRef = (CFStringRef) CFDictionaryGetValue(
>
> dictionaryRef, kOBEXHeaderIDKeyType );
>
> if( theStringRef )
>
> {
>
> // blah
>
> }
>
> }
>
>
>
> Hopefully that helps!
>
>
>
> Jason
>
> email@hidden
_______________________________________________
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.