ADC Home > Reference Library > Reference > Hardware & Drivers > Bluetooth > Bluetooth Framework Reference

 


OBEX.h

Include Path:

<IOBluetooth/OBEX.h>

Path:

/System/Library/Frameworks/IOBluetooth.framework/Versions/A/Headers/OBEX.h

See Also:

Overview

This header contains generic OBEX constants, structs, and C API used for all OBEX communication over any transport. For specific transport API, see that transport's C API. For example, if you wanted to know more about the Bluetooth OBEX implementation, see the documentation for OBEXBluetooth.h.

This file also contains API that will assist in the construction and deconstruction of OBEX headers to and from raw bytes, as well as the creation of vCards and vEvents.

For more information about accessing Bluetooth devices, see Working With Bluetooth Devices.



Functions

OBEXAddApplicationParameterHeader

Add an bytes representing a connection ID to a dictionary of OBEX headers.

OBEXAddAuthorizationChallengeHeader

Add an authorization challenge header to a dictionary of OBEXheaders.

OBEXAddAuthorizationResponseHeader

Add an authorization Response header to a dictionary of OBEXheaders.

OBEXAddBodyHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddByteSequenceHeader

Add an arbitrary byte sequence header to a dictionary of OBEXheaders.

OBEXAddConnectionIDHeader

Add an bytes representing a connection ID to a dictionary of OBEX headers.

OBEXAddCountHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddDescriptionHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddHTTPHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddLengthHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddNameHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddObjectClassHeader

Add an object class header to a dictionary of OBEXheaders.

OBEXAddTargetHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddTime4ByteHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddTimeISOHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddTypeHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddUserDefinedHeader

Add a user-defined custom header to a dictionary of OBEXheaders.

OBEXAddWhoHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXCreateVCard

Creates a formatted vCard, ready to be sent over OBEX or whatever.

OBEXCreateVEvent

Creates a formatted vEvent, ready to be sent over OBEX or whatever. You probably will embed the output in a vCalendar event.

OBEXGetHeaders

Take a data blob and looks for OBEX headers.

OBEXHeadersToBytes

Converts a dictionary of headers to a data pointer, from which you can extract as bytes and pass to the OBEX command/response functions.

OBEXSessionAbort

Send an abort command to a remote OBEX server.

OBEXSessionAbortResponse

Send a response to a abort command to the remote client.

OBEXSessionConnect

Establishes an OBEX connection to the target device for the session. If a transport connection is not open yet, it will be opened if possible.

OBEXSessionConnectResponse

Send a response to a connect command to the remote client.

OBEXSessionDelete

Destroy an OBEX session. If connections are open, they will (eventually) be terminated for you.

OBEXSessionDisconnect

Send a disconnect command to a remote OBEX server.

OBEXSessionDisconnectResponse

Send a response to a disconnect command to the remote client.

OBEXSessionGet

Send a get command to a remote OBEX server.

OBEXSessionGetAvailableCommandPayloadLength

Gets space available for your data for a particular command you are trying to send.

OBEXSessionGetAvailableCommandResponsePayloadLength

Gets space available for your data for a particular command response you are trying to send.

OBEXSessionGetMaxPacketLength

Gets current max packet length.

OBEXSessionGetResponse

Send a response to a get command to the remote client.

OBEXSessionHasOpenOBEXConnection

Allows you to test the session for an open OBEX connection for a particular session.

OBEXSessionPut

Send a put command to a remote OBEX server.

OBEXSessionPutResponse

Send a response to a put command to the remote client.

OBEXSessionSetPath

Send a set path command to a remote OBEX server.

OBEXSessionSetPathResponse

Send a response to a set path command to the remote client.

OBEXSessionSetServerCallback

OBEXAddApplicationParameterHeader


Add an bytes representing a connection ID to a dictionary of OBEX headers.

OBEXError OBEXAddApplicationParameterHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

Application parameter data - should be tag/length/value triplets.

inHeaderDataLength

Length of application parameter data.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Application Request/Response Parameter headers - OBEX Spec, 2.2.11: Byte Sequence


OBEXAddAuthorizationChallengeHeader


Add an authorization challenge header to a dictionary of OBEXheaders.

OBEXError OBEXAddAuthorizationChallengeHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

bytes you want to put in the authorization challenge header.

inHeaderDataLength

length of the bytes you want to put in authorization challenge header.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Authorization Challenge header - OBEX Spec, 2.2.13: Authorization Challenge.


OBEXAddAuthorizationResponseHeader


Add an authorization Response header to a dictionary of OBEXheaders.

OBEXError OBEXAddAuthorizationResponseHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

bytes you want to put in the authorization Response header.

inHeaderDataLength

length of the bytes you want to put in authorization Response header.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Authorization Response header - OBEX Spec, 2.2.14: Authorization Response.


OBEXAddBodyHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddBodyHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    Boolean isEndOfBody, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

Body header data.

inHeaderDataLength

Length of Body header data.

isEndOfBody

Set this flag if you want an end of body header instead of a body header.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Body,EndOfBody headers - OBEX Spec, 2.2.9: Byte Sequence


OBEXAddByteSequenceHeader


Add an arbitrary byte sequence header to a dictionary of OBEXheaders.

OBEXError OBEXAddByteSequenceHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

bytes you want to put in the byte sequence header.

inHeaderDataLength

length of the bytes you want to put in the byte sequence header.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Byte Sequence header - OBEX Spec, 2.2.5: Byte sequence.


OBEXAddConnectionIDHeader


Add an bytes representing a connection ID to a dictionary of OBEX headers.

OBEXError OBEXAddConnectionIDHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

Connection ID data. Should be 4 bytes in length only.

inHeaderDataLength

Length of Connection ID data. This should ONLY be set to equal 4.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

ConnectionID headers - OBEX Spec, 2.2.10: Byte Sequence

*** IMPORTANT NOTE: In bluetooth 1.0, using this function will allow you to pass in any value. You should not pass more than 4 bytes ever. In later releases, if the length passed is not 4, a kOBEXBadArgumentError error will be returned. ***


OBEXAddCountHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddCountHeader(
    uint32_t count, 
    CFMutableDictionaryRef dictRef );  
Parameters
count

Count value you want to add to the OBEX header dictionary.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Count header - OBEX Spec, 2.2.1: 4 byte unsigned integer


OBEXAddDescriptionHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddDescriptionHeader(
    CFStringRef description, 
    CFMutableDictionaryRef dictRef );  
Parameters
description

Description you want to add to the OBEX header dictionary.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Description header - OBEX Spec, 2.2.6: (2-byte) Null terminated unicode string.


OBEXAddHTTPHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddHTTPHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

HTTP header data.

inHeaderDataLength

Length of HTTP header data.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

HTTP header - OBEX Spec, 2.2.8: Byte Sequence


OBEXAddLengthHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddLengthHeader(
    uint32_t length, 
    CFMutableDictionaryRef dictRef );  
Parameters
length

Value of Length header you want to add to the OBEX header dictionary.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Length header - OBEX Spec, 2.2.4: 4 byte unsigned integer


OBEXAddNameHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddNameHeader(
    CFStringRef name, 
    CFMutableDictionaryRef dictRef );  
Parameters
name

name you want to add to the OBEX header dictionary.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Name header - OBEX Spec, 2.2.2: (2-byte) Null terminated unicode string.


OBEXAddObjectClassHeader


Add an object class header to a dictionary of OBEXheaders.

OBEXError OBEXAddObjectClassHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

bytes you want to put in the object class header.

inHeaderDataLength

length of the bytes you want to put in the object class header.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Object Class header - OBEX Spec, 2.2.15: Byte sequence.


OBEXAddTargetHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddTargetHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

Target header data.

inHeaderDataLength

Length of Target header data.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Target header - OBEX Spec, 2.2.7: Byte Sequence


OBEXAddTime4ByteHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddTime4ByteHeader(
    uint32_t time4Byte, 
    CFMutableDictionaryRef dictRef );  
Parameters
time4Byte

4-byte time value you want to add to the OBEX header dictionary.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Time4Byte headers - OBEX Spec, 2.2.5: 4 Bytes


OBEXAddTimeISOHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddTimeISOHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

Target header data.

inHeaderDataLength

Length of Target header data.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

TimeISO header - OBEX Spec, 2.2.5: Byte Sequence


OBEXAddTypeHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddTypeHeader(
    CFStringRef type, 
    CFMutableDictionaryRef dictRef );  
Parameters
description

Description containing the name you want to add to the OBEX header dictionary.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Type header - OBEX Spec, 2.2.3: 1-byte Null terminated ascii string.


OBEXAddUserDefinedHeader


Add a user-defined custom header to a dictionary of OBEXheaders.

OBEXError OBEXAddUserDefinedHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

bytes you want to put in the user-defined header.

inHeaderDataLength

length of the bytes you want to put in user-defined header.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

User Defined header - OBEX Spec, 2.2.20: User Defined Headers.


OBEXAddWhoHeader


Add a CFStringRef to a dictionary of OBEXheaders.

OBEXError OBEXAddWhoHeader(
    const void *inHeaderData, 
    uint32_t inHeaderDataLength, 
    CFMutableDictionaryRef dictRef );  
Parameters
inHeaderData

Who header data.

inHeaderDataLength

Length of Who header data.

dictRef

dictionary you have allocated to hold the headers. Make sure it's mutable.

Return Value

Error code, kOBEXSuccess (0) if success.

Discussion

Who headers - OBEX Spec, 2.2.10: Byte Sequence


OBEXCreateVCard


Creates a formatted vCard, ready to be sent over OBEX or whatever.

CFDataRef OBEXCreateVCard(
    const void *inFirstName, 
    uint32_t inFirstNameLength, 
    const void *inLastName, 
    uint32_t inLastNameLength, 
    const void *inFriendlyName, 
    uint32_t inFriendlyNameLength, 
    const void *inNameCharset, 
    uint32_t inNameCharsetLength, 
    const void *inHomePhone, 
    uint32_t inHomePhoneLength, 
    const void *inWorkPhone, 
    uint32_t inWorkPhoneLength, 
    const void *inCellPhone, 
    uint32_t inCellPhoneLength, 
    const void *inFaxPhone, 
    uint32_t inFaxPhoneLength, 
    const void *inEMailAddress, 
    uint32_t inEMailAddressLength, 
    const void *inEMailAddressCharset, 
    uint32_t inEMailAddressCharsetLength, 
    const void *inOrganization, 
    uint32_t inOrganizationLength, 
    const void *inOrganizationCharset, 
    uint32_t inOrganizationCharsetLength, 
    const void *inTitle, 
    uint32_t inTitleLength, 
    const void *inTitleCharset, 
    uint32_t inTitleCharsetLength );  
Parameters
inNameCharset

A pointer to the charset data used for the name. Pass in a #defined charset for ease of use.

inNameCharsetLength

Length of name charset assed in above.

inFirstName

Pointer to data with Person's first name.

inFirstNameLength

Length of Person's first name passed in above.

inLastName

Pointer to data with Person's last name.

inLastNameLength

Length of Person's last name passed in above.

inFriendlyName

Pointer to data with Person's Friendly name.

inFriendlyNameLength

Length of Person's Friendly name passed in above.

inHomePhone

Pointer to data with Person's Home phone number.

inHomePhoneLength

Length of Person's Home phone number passed in above.

inWorkPhone

Work phone number.

inWorkPhoneLength

Length of Person's Work phone number passed in above.

inCellPhone

Cell phone number.

inCellPhoneLength

Length of Person's Cell phone number passed in above.

inFaxPhone

Fax phone number.

inFaxPhoneLength

Length of Person's Fax phone number passed in above.

inEMailAddress

EMailAddress of person.

inEMailAddressLength

Length of Person's EMailAddress passed in above.

inEMailAddressCharset

Charset of EMailAddress of person.

inEMailAddressCharsetLength

Length of Person's EMailAddress charset passed in above.

inOrganization

Pointer to Organization/business data.

inOrganizationLength

Length of Organization/business data.

inOrganizationCharset

Pointer to the charset the Organization/business is in.

inOrganizationCharsetLength

Length of data for the Organization/business charset.

inTitle

Pointer to data with Title of person in biz/org.

inTitleLength

Length of Title of person in biz/org.

inOrganizationCharset

Pointer to the charset the Title is in.

inOrganizationCharsetLength

Length of data for the Title charset.

Return Value

An CFDataRef containing the compiled data. nil if we failed.

Discussion

All parameters are optional. The CFDataRef returned to you is NOT retained. Retain it if you want to keep it.


OBEXCreateVEvent


Creates a formatted vEvent, ready to be sent over OBEX or whatever. You probably will embed the output in a vCalendar event.

CFDataRef OBEXCreateVEvent(
    const char *inCharset, 
    uint32_t inCharsetLength, 
    const char *inEncoding, 
    uint32_t inEncodingLength, 
    const char *inEventStartDate, 
    uint32_t inEventStartDateLength, 
    const char *inEventEndDate, 
    uint32_t inEventEndDateLength, 
    const char *inAlarmDate, 
    uint32_t inAlarmDateLength, 
    const char *inCategory, 
    uint32_t inCategoryLength, 
    const char *inSummary, 
    uint32_t inSummaryLength, 
    const char *inLocation, 
    uint32_t inLocationLength, 
    const char *inXIRMCLUID, 
    uint32_t inXIRMCLUIDLength );  
Parameters
inCharset

The Charset the passed data is in. Pass in a #defined charset for ease of use.

inCharsetLength

The length of the Charset passed data.

inEncoding

The encoding of the summary and location fields.

inCharsetLength

The length of the Charset passed data.

inEventStartDate

Start of event date, in the (ISO8601) format: YYYYMMDDTHHMMSS. e.g. 19960415T083000 = 8:30 am on April 15, 1996. All time values should be in LOCAL time.

inCharsetLength

The length of the Charset passed data.

inEventEndDate

End of event date.

inCharsetLength

The length of the Charset passed data.

inAlarmDate

Date of Alarm for event, in the format: YYYYMMDDTHHMMSS.

inCharsetLength

The length of the Charset passed data.

inCategory

Category of event, such as "MEETING" or "PHONE CALL".

inCharsetLength

The length of the Charset passed data.

inSummary

Summary of event. Max length is 36 bytes. Longer will result in a bad argument error.

inCharsetLength

The length of the Charset passed data.

inLocation

Summary of event. Max length is 20 bytes. Longer will result in a bad argument error.

inCharsetLength

The length of the Charset passed data.

inXIRMCLUID

The IRMC Local Unique Identifier Label, max length 12 bytes. Longer will result in a bad argument error.

inCharsetLength

The length of the Charset passed data.

Return Value

A valid CFDataRef - nil if we failed.

Discussion

All parameters are optional. The CFDataRef returned to you is NOT retained. Retain it if you want to keep it. Be aware that certain devices such as Ericsson phones MUST have certain fields, such as a start and end date.


OBEXGetHeaders


Take a data blob and looks for OBEX headers.

CFDictionaryRef OBEXGetHeaders(
    const void *inData,
    size_t inDataSize );  
Parameters
inData

The data chunk with the headers you are interested in.

inDataSize

The size of the buffer you are passing in.

Return Value

A CFDictionary with the headers found in the data blob inside it.

Discussion

You should use this when your callback for PUTs, GETs, etc. give you a data chunk and a size. Pass these params to this function and you will receive a dictionary back full of the parse headers. You can use the CFDictionary calls to get objects out of it, based on the header keys defined above. You are responsible for releasing the CFDictionary returned to you. Example usage:

	CFDictionaryRef   dictionary = OBEXGetHeaders( data, dataLength );
	if( dictionary )
	{
		if( CFDictionaryGetCountOfKey( dictionary, kOBEXHeaderIDKeyName ) > 0 )
		{			
			CFStringRef theStringRef;
			
			theStringRef = (CFStringRef) CFDictionaryGetValue( dictionary, kOBEXHeaderIDKeyName );
			if( theStringRef )
			{				
				// Display it, use it as a filename, whatever.
			}
		}
		
		if( CFDictionaryGetCountOfKey( dictionary, kOBEXHeaderIDKeyConnectionID ) > 0 )
		{
			CFDataRef theDataRef;
			
			theDataRef = (CFDataRef) CFDictionaryGetValue( dictionary, kOBEXHeaderIDKeyConnectionID );
			if( theDataRef )
			{
				// now we have data representing the connection ID.
			}
		}
		
		CFRelease( dictionary );
	}
	


OBEXHeadersToBytes


Converts a dictionary of headers to a data pointer, from which you can extract as bytes and pass to the OBEX command/response functions.

CFMutableDataRef OBEXHeadersToBytes(
    CFDictionaryRef dictionaryOfHeaders );  
Parameters
dictionaryOfHeaders

dictionary that you have added headers to with the above OBEXAddXXXHeader functions.

Return Value

Mutable data ref containing the bytes of all headers.

Discussion

Returns a CFMutableDataRef containing all the header data found in the dictionary, formatted according to the OBEX/IrMC spec. YOU MUST RELEASE IT when you are finished with it (ie. when the OBEX request is complete). All OBEX-specification defined headers are supported and should be returned to the dictionary. Use the keys defined above to get headers from dictionary. Example usage:

	Example usage:

	CFMutableDictionaryRef	dictionary;
	CFMutableDataRef		mGetHeadersDataRef;
	uint8_t* 				headerDataPtr;
	uint32_t 				headerDataLength;
	
	dictionary = CFDictionaryCreateMutable( kCFAllocatorDefault, 0, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks );
	
	// Package up desired headers.

	OBEXAddTypeHeader( CFSTR( "text/x-vCard" ), dictionary ); 

	mGetHeadersDataRef = OBEXHeadersToBytes( dictionary );

	headerDataPtr = CFDataGetBytePtr( mGetHeadersDataRef );
	headerDataLength = CFDataGetLength( mGetHeadersDataRef );
	
	// From here I can pass it to any OBEX command, such as OBEXPut...
	


OBEXSessionAbort


Send an abort command to a remote OBEX server.

OBEXError OBEXSessionAbort(
    OBEXSessionRef inSessionRef, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefcon );  
Parameters
inSessionRef

A valid session reference.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionAbortResponse


Send a response to a abort command to the remote client.

OBEXError OBEXSessionAbortResponse(
    OBEXSessionRef inSessionRef, 
    OBEXOpCode inResponseOpCode, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inResponseOpCode

What response code you want to send to the remote client.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionConnect


Establishes an OBEX connection to the target device for the session. If a transport connection is not open yet, it will be opened if possible.

OBEXError OBEXSessionConnect(
    OBEXSessionRef inSessionRef, 
    OBEXFlags inFlags, 
    OBEXMaxPacketLength inMaxPacketLength, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inFlags

Flags, as defined in the OBEX spec for this command.

inMaxPacketLength

Maximum packet length you wish to allow. May be negiotiated with host to be less or more than you specify.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback parameter will result in an error. If you have already established an OBEX connection and you call this again you will get an 'kOBEXSessionAlreadyConnectedError' as a result.


OBEXSessionConnectResponse


Send a response to a connect command to the remote client.

OBEXError OBEXSessionConnectResponse(
    OBEXSessionRef inSessionRef, 
    OBEXOpCode inResponseOpCode, 
    OBEXFlags inFlags, 
    OBEXMaxPacketLength inMaxPacketLength, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inResponseOpCode

What response code you want to send to the remote client.

inFlags

Flags, as defined in the OBEX spec for this command.

inConstants

Constants, as defined in the OBEX spec for this command.

inMaxPacketLength

Max packet length you want to support. Must be smaller or equal to the max packet length specified by the remote client.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionDelete


Destroy an OBEX session. If connections are open, they will (eventually) be terminated for you.

OBEXError OBEXSessionDelete(
    OBEXSessionRef inSessionRef );  
Parameters
inSessionRef

A valid service reference.

Return Value

An error code value. 0 if successful.


OBEXSessionDisconnect


Send a disconnect command to a remote OBEX server.

OBEXError OBEXSessionDisconnect(
    OBEXSessionRef inSessionRef, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionDisconnectResponse


Send a response to a disconnect command to the remote client.

OBEXError OBEXSessionDisconnectResponse(
    OBEXSessionRef inSessionRef, 
    OBEXOpCode inResponseOpCode, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inResponseOpCode

What response code you want to send to the remote client.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionGet


Send a get command to a remote OBEX server.

OBEXError OBEXSessionGet(
    OBEXSessionRef inSessionRef, 
    Boolean inIsFinalChunk, 
    void *inHeadersData, 
    size_t inHeadersDataLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inIsFinalChunk

TRUE or FALSE - is this the last chunk of header data for this GET.

inHeadersData

Headers containing data to GET.

inHeadersDataLength

Size of header data.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionGetAvailableCommandPayloadLength


Gets space available for your data for a particular command you are trying to send.

OBEXError OBEXSessionGetAvailableCommandPayloadLength(
    OBEXSessionRef inSessionRef,
    OBEXOpCode inOpCode,
    OBEXMaxPacketLength *outLength );  
Parameters
inSessionRef

A valid session reference.

inOpCode

An opcode of what command you are trying to send.

outLength

Space available for your header data in the payload area for a particular command.

Return Value

An error code value. 0 if successful.

Discussion

The OBEXSession takes care of packaging OBEX opcodes and other information into the proper packet format, allowing you to focus on sending the proper OBEX headers in your commands and command responses. This formatting and datas requires a small bit of information that varies depending on what command or response you are sending. Thus, you should call this function to find out how much space will be left for your headers before you send the command, allowing you to properly chop up your headers before sending them. This will guarantee that (a) you use up all the available space in a packet and (b) that you do not get an error trying to send too much information at once.


OBEXSessionGetAvailableCommandResponsePayloadLength


Gets space available for your data for a particular command response you are trying to send.

OBEXError OBEXSessionGetAvailableCommandResponsePayloadLength(
    OBEXSessionRef inSessionRef,
    OBEXOpCode inOpCode,
    OBEXMaxPacketLength *outLength );  
Parameters
inSessionRef

A valid session reference.

inOpCode

A command opcode that you are responding to. For example, if you receiving a Put command, and want to send back a "bad request" response, you should still pass in the Put command opcode for that response.

outLength

Space available for your header data in the payload area for a particular command.

Return Value

An error code value. 0 if successful.

Discussion

The OBEXSession takes care of packaging OBEX opcodes and other information into the proper packet format, allowing you to focus on sending the proper OBEX headers in your commands and command responses. This formatting and datas requires a small bit of information that varies depending on what command or response you are sending. Thus, you should call this function to find out how much space will be left for your headers before you send the command, allowing you to properly chop up your headers before sending them. This will guarantee that (a) you use up all the available space in a packet and (b) that you do not get an error trying to send too much information at once.


OBEXSessionGetMaxPacketLength


Gets current max packet length.

OBEXError OBEXSessionGetMaxPacketLength(
    OBEXSessionRef inSessionRef,
    OBEXMaxPacketLength *outLength );  
Parameters
inSessionRef

A valid session reference.

outLength

Max packet length.

Return Value

An error code value. 0 if successful.

Discussion

This value *could* change before and after a connect command has been sent or a connect command response has been received, since the recipient could negotiate a lower max packet size.


OBEXSessionGetResponse


Send a response to a get command to the remote client.

OBEXError OBEXSessionGetResponse(
    OBEXSessionRef inSessionRef, 
    OBEXOpCode inResponseOpCode, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inResponseOpCode

What response code you want to send to the remote client.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionHasOpenOBEXConnection


Allows you to test the session for an open OBEX connection for a particular session.

OBEXError OBEXSessionHasOpenOBEXConnection(
    OBEXSessionRef inSessionRef, 
    Boolean *outIsConnected );  
Parameters
inSessionRef

A valid session reference.

outIsConnected

A valid ptr to an OBEXSessionRef; will contain the newly created session if return value is kOBEXSuccess.

Return Value

An error code value. 0 if successful.

Discussion

This method will return true only if (a) you are transport-connected to another OBEX target and (b) an OBEX Connect command has been issued and received successfully.


OBEXSessionPut


Send a put command to a remote OBEX server.

OBEXError OBEXSessionPut(
    OBEXSessionRef inSessionRef, 
    Boolean inIsFinalChunk, 
    void *inHeadersData, 
    size_t inHeadersDataLength, 
    void *inBodyData, 
    size_t inBodyDataLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inIsFinalChunk

TRUE or FALSE - is this the last chunk of header data for this PUT.

inHeadersData

Headers containing data to PUT. Don't include your body header data here.

inHeadersDataLength

Size of header data. Don't include your body header data here.

inBodyData

Data for the BODY header to PUT. DO NOT package your data in an actual BODY header, this will be done for you, based on the finalChunk flag you pass in above (since based on this flag the header ID will be either a BODY or ENDOFBODY header).

inBodyDataLength

Size of Data for the BODY header to PUT.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionPutResponse


Send a response to a put command to the remote client.

OBEXError OBEXSessionPutResponse(
    OBEXSessionRef inSessionRef, 
    OBEXOpCode inResponseOpCode, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inResponseOpCode

What response code you want to send to the remote client.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionSetPath


Send a set path command to a remote OBEX server.

OBEXError OBEXSessionSetPath(
    OBEXSessionRef inSessionRef, 
    OBEXFlags inFlags, 
    OBEXConstants inConstants, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefcon );  
Parameters
inSessionRef

A valid session reference.

inFlags

Flags, as defined in the OBEX spec for this command.

inConstants

Constants, as defined in the OBEX spec for this command.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionSetPathResponse


Send a response to a set path command to the remote client.

OBEXError OBEXSessionSetPathResponse(
    OBEXSessionRef inSessionRef, 
    OBEXOpCode inResponseOpCode, 
    void *inOptionalHeaders, 
    size_t inOptionalHeadersLength, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inResponseOpCode

What response code you want to send to the remote client.

inOptionalHeaders

Ptr to optional headers you can supply to the command. DO NOT dispose of this pointer until you callback is called with a success.

inOptionalHeadersLength

Size of data at the specified ptr.

inCallback

A valid callback. Will be called for progress, errors and completion.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.


OBEXSessionSetServerCallback


OBEXError OBEXSessionSetServerCallback(
    OBEXSessionRef inSessionRef, 
    OBEXSessionEventCallback inCallback, 
    void *inUserRefCon );  
Parameters
inSessionRef

A valid session reference.

inCallback

A valid callback. Will be called for progress, errors and completion by server sessions only.

inUserRefCon

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Return Value

An error code value. 0 if successful.

Discussion

Sets callback to be used when an event occurs on an OBEXSession. This is important for OBEX servers, as you will need a way to be called back when the first command is sent to you. So, be sure to set yourself up to listen for events when you are ready to receive them.

Typedefs


OBEXAbortCommandData


See Also:

OBEXAbortCommandData

typedef struct OBEXAbortCommandData OBEXAbortCommandData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeAbortCommandReceived (see OBEXSessionEventTypes).


OBEXAbortCommandResponseData


See Also:

OBEXAbortCommandResponseData

typedef struct OBEXAbortCommandResponseData OBEXAbortCommandResponseData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeAbortCommandResponseReceived (see OBEXSessionEventTypes).


OBEXConnectCommandData


See Also:

OBEXConnectCommandData

typedef struct OBEXConnectCommandData OBEXConnectCommandData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeConnectCommandReceived (see OBEXSessionEventTypes).


OBEXConnectCommandResponseData


See Also:

OBEXConnectCommandResponseData

typedef struct OBEXConnectCommandResponseData OBEXConnectCommandResponseData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeConnectCommandResponseReceived (see OBEXSessionEventTypes).


OBEXDisconnectCommandData


See Also:

OBEXDisconnectCommandData

typedef struct OBEXDisconnectCommandData OBEXDisconnectCommandData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeDisconnectCommandReceived (see OBEXSessionEventTypes).


OBEXDisconnectCommandResponseData


See Also:

OBEXDisconnectCommandResponseData

typedef struct OBEXDisconnectCommandResponseData OBEXDisconnectCommandResponseData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeDisconnectCommandResponseReceived (see OBEXSessionEventTypes).


OBEXError


Codes for OBEX errors. If the return value was not in the following range, then it is most likely resulting from kernel code/IOKit, and you should consult IOReturn.h for those codes.

See Also:

OBEXErrorCodes

typedef int32_t OBEXError;  


OBEXErrorData


See Also:

OBEXErrorData

typedef struct OBEXErrorData OBEXErrorData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeError (see OBEXSessionEventTypes).


OBEXGetCommandData


See Also:

OBEXGetCommandData

typedef struct OBEXGetCommandData OBEXGetCommandData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeGetCommandReceived (see OBEXSessionEventTypes).


OBEXGetCommandResponseData


See Also:

OBEXGetCommandResponseData

typedef struct OBEXGetCommandResponseData OBEXGetCommandResponseData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeGetCommandResponseReceived (see OBEXSessionEventTypes).


OBEXPutCommandData


See Also:

OBEXPutCommandData

typedef struct OBEXPutCommandData OBEXPutCommandData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypePutCommandReceived (see OBEXSessionEventTypes).


OBEXPutCommandResponseData


See Also:

OBEXPutCommandResponseData

typedef struct OBEXPutCommandResponseData OBEXPutCommandResponseData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypePutCommandResponseReceived (see OBEXSessionEventTypes).


OBEXSessionEvent


See Also:

OBEXSessionEvent

typedef struct OBEXSessionEvent OBEXSessionEvent;  
Discussion

When a new session event occurs, your selector (or C callback) will be given an OBEXSessionEvent pointer, and in it will be information you might find interesting so that you can then reply back appropriately. For example, of you receive a kOBEXSessionEventTypeConnectCommandResponseReceived event, you can then parse out the information related to that event, and if all looks well to you, you could them send a "Get" command to get a file off of the OBEX server you just connected to.


OBEXSetPathCommandData


See Also:

OBEXSetPathCommandData

typedef struct OBEXSetPathCommandData OBEXSetPathCommandData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeSetPathCommandReceived (see OBEXSessionEventTypes).


OBEXSetPathCommandResponseData


See Also:

OBEXSetPathCommandResponseData

typedef struct OBEXSetPathCommandResponseData OBEXSetPathCommandResponseData;  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeSetPathCommandResponseReceived (see OBEXSessionEventTypes).

Structs and Unions


OBEXAbortCommandData


See Also:

OBEXAbortCommandData

struct OBEXAbortCommandData { 
    void *headerDataPtr; 
    size_t headerDataLength; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeAbortCommandReceived (see OBEXSessionEventTypes).


OBEXAbortCommandResponseData


See Also:

OBEXAbortCommandResponseData

struct OBEXAbortCommandResponseData { 
    OBEXOpCode serverResponseOpCode; 
    void *headerDataPtr; 
    size_t headerDataLength; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeAbortCommandResponseReceived (see OBEXSessionEventTypes).


OBEXConnectCommandData


See Also:

OBEXConnectCommandData

struct OBEXConnectCommandData { 
    void *headerDataPtr; 
    size_t headerDataLength; 
    OBEXMaxPacketLength maxPacketSize; 
    OBEXVersion version; 
    OBEXFlags flags; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeConnectCommandReceived (see OBEXSessionEventTypes).


OBEXConnectCommandResponseData


See Also:

OBEXConnectCommandResponseData

struct OBEXConnectCommandResponseData { 
    OBEXOpCode serverResponseOpCode; 
    void *headerDataPtr; 
    size_t headerDataLength; 
    OBEXMaxPacketLength maxPacketSize; 
    OBEXVersion version; 
    OBEXFlags flags; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeConnectCommandResponseReceived (see OBEXSessionEventTypes).


OBEXDisconnectCommandData


See Also:

OBEXDisconnectCommandData

struct OBEXDisconnectCommandData { 
    void *headerDataPtr; 
    size_t headerDataLength; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeDisconnectCommandReceived (see OBEXSessionEventTypes).


OBEXDisconnectCommandResponseData


See Also:

OBEXDisconnectCommandResponseData

struct OBEXDisconnectCommandResponseData { 
    OBEXOpCode serverResponseOpCode; 
    void *headerDataPtr; 
    size_t headerDataLength; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeDisconnectCommandResponseReceived (see OBEXSessionEventTypes).


OBEXErrorData


See Also:

OBEXErrorData

struct OBEXErrorData { 
    OBEXError error; 
    void *dataPtr; // If data was associated with the error, it will be included here if possible. 
    size_t dataLength; // Check the size to see if there is data to be examined. 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeError (see OBEXSessionEventTypes).


OBEXGetCommandData


See Also:

OBEXGetCommandData

struct OBEXGetCommandData { 
    void *headerDataPtr; 
    size_t headerDataLength; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeGetCommandReceived (see OBEXSessionEventTypes).


OBEXGetCommandResponseData


See Also:

OBEXGetCommandResponseData

struct OBEXGetCommandResponseData { 
    OBEXOpCode serverResponseOpCode; 
    void *headerDataPtr; 
    size_t headerDataLength; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeGetCommandResponseReceived (see OBEXSessionEventTypes).


OBEXPutCommandData


See Also:

OBEXPutCommandData

struct OBEXPutCommandData { 
    void *headerDataPtr; 
    size_t headerDataLength; 
    size_t bodyDataLeftToSend; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypePutCommandReceived (see OBEXSessionEventTypes).


OBEXPutCommandResponseData


See Also:

OBEXPutCommandResponseData

struct OBEXPutCommandResponseData { 
    OBEXOpCode serverResponseOpCode; 
    void *headerDataPtr; 
    size_t headerDataLength; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypePutCommandResponseReceived (see OBEXSessionEventTypes).


OBEXSessionEvent


See Also:

OBEXSessionEvent

struct OBEXSessionEvent { 
    OBEXSessionEventType type; 
    OBEXSessionRef session; 
    void *refCon; 
    Boolean isEndOfEventData; 
    void *reserved1; 
    void *reserved2; 
    union { 
        // Client session events.  
        OBEXConnectCommandResponseData connectCommandResponseData; 
        OBEXDisconnectCommandResponseData disconnectCommandResponseData; 
        OBEXPutCommandResponseData putCommandResponseData; 
        OBEXGetCommandResponseData getCommandResponseData; 
        OBEXSetPathCommandResponseData setPathCommandResponseData; 
        OBEXAbortCommandResponseData abortCommandResponseData;  
        // Server session events.  
        OBEXConnectCommandData connectCommandData; 
        OBEXDisconnectCommandData disconnectCommandData; 
        OBEXPutCommandData putCommandData; 
        OBEXGetCommandData getCommandData; 
        OBEXSetPathCommandData setPathCommandData; 
        OBEXAbortCommandData abortCommandData;  
        // Client & Server Session events.  
        OBEXErrorData errorData; 
        } u; 
};  
Discussion

When a new session event occurs, your selector (or C callback) will be given an OBEXSessionEvent pointer, and in it will be information you might find interesting so that you can then reply back appropriately. For example, of you receive a kOBEXSessionEventTypeConnectCommandResponseReceived event, you can then parse out the information related to that event, and if all looks well to you, you could them send a "Get" command to get a file off of the OBEX server you just connected to.


OBEXSetPathCommandData


See Also:

OBEXSetPathCommandData

struct OBEXSetPathCommandData { 
    void *headerDataPtr; 
    size_t headerDataLength; 
    OBEXFlags flags; 
    OBEXConstants constants; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeSetPathCommandReceived (see OBEXSessionEventTypes).


OBEXSetPathCommandResponseData


See Also:

OBEXSetPathCommandResponseData

struct OBEXSetPathCommandResponseData { 
    OBEXOpCode serverResponseOpCode; 
    void *headerDataPtr; 
    size_t headerDataLength; 
    OBEXFlags flags; 
    OBEXConstants constants; 
};  
Discussion

Part of the OBEXSessionEvent structure. Is readable when the event is of type kOBEXSessionEventTypeSetPathCommandResponseReceived (see OBEXSessionEventTypes).

Enumerations


OBEXConnectFlags


Flags for Connect command.

See Also:

OBEXConnectFlagValues

enum OBEXConnectFlagValues { 
    kOBEXConnectFlagNone = (
        0 << 0L),  
    kOBEXConnectFlagSupportMultipleItLMPConnections = (
        1 << 0L), 
    kOBEXConnectFlag1Reserved = (
        1 << 1L), 
    kOBEXConnectFlag2Reserved = (
        1 << 2L), 
    kOBEXConnectFlag3Reserved = (
        1 << 3L), 
    kOBEXConnectFlag4Reserved = (
        1 << 4L), 
    kOBEXConnectFlag5Reserved = (
        1 << 5L), 
    kOBEXConnectFlag6Reserved = (
        1 << 6L), 
    kOBEXConnectFlag7Reserved = (
        1 << 7L), 
};  


OBEXConnectFlagValues


Flags for Connect command.

See Also:

OBEXConnectFlags

enum OBEXConnectFlagValues { 
    kOBEXConnectFlagNone = (
        0 << 0L),  
    kOBEXConnectFlagSupportMultipleItLMPConnections = (
        1 << 0L), 
    kOBEXConnectFlag1Reserved = (
        1 << 1L), 
    kOBEXConnectFlag2Reserved = (
        1 << 2L), 
    kOBEXConnectFlag3Reserved = (
        1 << 3L), 
    kOBEXConnectFlag4Reserved = (
        1 << 4L), 
    kOBEXConnectFlag5Reserved = (
        1 << 5L), 
    kOBEXConnectFlag6Reserved = (
        1 << 6L), 
    kOBEXConnectFlag7Reserved = (
        1 << 7L), 
};  


OBEXErrorCodes


Codes for OBEX errors. If the return value was not in the following range, then it is most likely resulting from kernel code/IOKit, and you should consult IOReturn.h for those codes.

See Also:

OBEXError

enum OBEXErrorCodes { 
    kOBEXErrorRangeMin = -21850, 
    kOBEXErrorRangeMax = -21899,  
    kOBEXSuccess = 0, // Success at whatever you were attempting. 
    kOBEXGeneralError = -21850, // Catch all for misc. errors. 
    kOBEXNoResourcesError = -21851, // An allocation failed, etc. 
    kOBEXUnsupportedError = -21852, // We don't currently handle whatever you are trying to do. 
    kOBEXInternalError = -21853, // A problem has occurred in our internal code. 
    kOBEXBadArgumentError = -21854, // A bad argument was passed to an OBEX function. 
    kOBEXTimeoutError = -21855, // timeout error 
    kOBEXBadRequestError = -21856, // bad request error 
    kOBEXCancelledError = -21857,   
    kOBEXSessionBusyError = -21875, // Session is busy with a command already. 
    kOBEXSessionNotConnectedError = -21876, // Session does not have an open connection. 
    kOBEXSessionBadRequestError = -21877, // Whatever you are trying to do is invalid (trying to send more data than the max packet size supports, e.g.). 
    kOBEXSessionBadResponseError = -21878, // The OBEX Server/client you are talking to has sent us a bad response (e.g. when a Connect Command was sent, we got back "0xA0", which is not correct). 
    kOBEXSessionNoTransportError = -21879, // The underlying transport (Bluetooth, etc.) is not open/available. 
    kOBEXSessionTransportDiedError = -21880, // The underlying transport connection (Bluetooth, etc.) died. 
    kOBEXSessionTimeoutError = -21881, // Timeout occurred performing an operation. 
    kOBEXSessionAlreadyConnectedError = -21882 // Connection over OBEX already established (returned from OBEXConnect). 
};  
Constants
kOBEXErrorRangeMin

Minimum value in OBEX error range.

kOBEXErrorRangeMax

Maximum value in OBEX error range.


OBEXHeaderIdentifiers


Identifiers for OBEX Headers.

enum OBEXHeaderIdentifiers { 
    kOBEXHeaderIDName = 0x01, 
    kOBEXHeaderIDDescription = 0x05, 
    kOBEXHeaderIDReservedRangeStart = 0x10, 
    kOBEXHeaderIDReservedRangeEnd = 0x2F,  
    kOBEXHeaderIDUserDefinedRangeStart = 0x30, 
    kOBEXHeaderIDUserDefinedRangeEnd = 0x3F,  
    kOBEXHeaderIDType = 0x42, 
    kOBEXHeaderIDTimeISO = 0x44, 
    kOBEXHeaderIDTarget = 0x46, 
    kOBEXHeaderIDHTTP = 0x47, 
    kOBEXHeaderIDBody = 0x48, 
    kOBEXHeaderIDEndOfBody = 0x49, 
    kOBEXHeaderIDWho = 0x4A, 
    kOBEXHeaderIDAppParameters = 0x4C, 
    kOBEXHeaderIDAuthorizationChallenge = 0x4D, 
    kOBEXHeaderIDAuthorizationResponse = 0x4E, 
    kOBEXHeaderIDObjectClass = 0x4F,  
    kOBEXHeaderIDCount = 0xC0, 
    kOBEXHeaderIDLength = 0xC3, 
    kOBEXHeaderIDTime4Byte = 0xC4, 
    kOBEXHeaderIDConnectionID = 0xCB, 
};  
Constants
kOBEXHeaderIDName

Name of the object. Null terminated unicode text.

kOBEXHeaderIDDescription

Text description of the object. Null terminated unicode text.

kOBEXHeaderIDReservedRangeStart

Range includes all combos of the upper 2 bits. Reserved.

kOBEXHeaderIDReservedRangeEnd

Range includes all combos of the upper 2 bits. Reserved.

kOBEXHeaderIDUserDefinedRangeStart

Range includes all combos of the upper 2 bits. User defined.

kOBEXHeaderIDUserDefinedRangeEnd

Range includes all combos of the upper 2 bits. User defined.

kOBEXHeaderIDType

Type of object - e.g. text, html, binary, etc. Null terminated ASCII text.

kOBEXHeaderIDTimeISO

Date/time stamp - ISO8601 version of time. (YYYYMMDDTHHMMSSZ)

kOBEXHeaderIDTarget

Name of service that operation is destined for.

kOBEXHeaderIDHTTP

An HTTP 1.x header.

kOBEXHeaderIDBody

A Chunk of the object body.

kOBEXHeaderIDEndOfBody

The last checking of the object body.

kOBEXHeaderIDWho

Identifies the OBEX applications, used to tell if talking to a peer.

kOBEXHeaderIDAppParameters

Extended application request and resposnse info.

kOBEXHeaderIDAuthorizationChallenge

Authentication digest-challenge.

kOBEXHeaderIDAuthorizationResponse

Authentication digest-reponse.

kOBEXHeaderIDObjectClass

OBEX Object - class of object.

kOBEXHeaderIDCount

Number of objects (used in Connect command).

kOBEXHeaderIDLength

The length of the object in bytes. 4 byte unsigned integer value.

kOBEXHeaderIDTime4Byte

Date/time stamp - 4 byte version for compat. only. Seconds since Jan 1, 1970.

kOBEXHeaderIDConnectionID

An identifier used for OBEX connection multiplexing.


OBEXNonceFlags


Flags for Nonce command during digest challenge.

See Also:

OBEXNonceFlagValues

enum OBEXNonceFlagValues { 
    kOBEXNonceFlagNone = (
        0 << 0L),  
    kOBEXNonceFlagSendUserIDInResponse = (
        1 << 0L), 
    kOBEXNonceFlagAccessModeReadOnly = (
        1 << 1L), 
    kOBEXNonceFlag2Reserved = (
        1 << 2L), 
    kOBEXNonceFlag3Reserved = (
        1 << 3L), 
    kOBEXNonceFlag4Reserved = (
        1 << 4L), 
    kOBEXNonceFlag5Reserved = (
        1 << 5L), 
    kOBEXNonceFlag6Reserved = (
        1 << 6L), 
    kOBEXNonceFlag7Reserved = (
        1 << 7L),  
};  


OBEXNonceFlagValues


Flags for Nonce command during digest challenge.

See Also:

OBEXNonceFlags

enum OBEXNonceFlagValues { 
    kOBEXNonceFlagNone = (
        0 << 0L),  
    kOBEXNonceFlagSendUserIDInResponse = (
        1 << 0L), 
    kOBEXNonceFlagAccessModeReadOnly = (
        1 << 1L), 
    kOBEXNonceFlag2Reserved = (
        1 << 2L), 
    kOBEXNonceFlag3Reserved = (
        1 << 3L), 
    kOBEXNonceFlag4Reserved = (
        1 << 4L), 
    kOBEXNonceFlag5Reserved = (
        1 << 5L), 
    kOBEXNonceFlag6Reserved = (
        1 << 6L), 
    kOBEXNonceFlag7Reserved = (
        1 << 7L),  
};  


OBEXOpCodeCommandValues


Operation OpCode values for commands.

enum OBEXOpCodeCommandValues { 
    kOBEXOpCodeReserved = 0x04,  
    kOBEXOpCodeConnect = 0x80, // High bit always set. 
    kOBEXOpCodeDisconnect = 0x81, // High bit always set.  
    kOBEXOpCodePut = 0x02, 
    kOBEXOpCodePutWithHighBitSet = 0x82, 
    kOBEXOpCodeGet = 0x03, 
    kOBEXOpCodeGetWithHighBitSet = 0x83,  
    kOBEXOpCodeReservedWithHighBitSet = 0x84, 
    kOBEXOpCodeSetPath = 0x85, // High bit always set.  
    kOBEXOpCodeAbort = 0xFF, // High bit always set. 
    kOBEXOpCodeReservedRangeStart = 0x06, 
    kOBEXOpCodeReservedRangeEnd = 0x0F, 
    kOBEXOpCodeUserDefinedStart = 0x10, 
    kOBEXOpCodeUserDefinedEnd = 0x1F, 
};  


OBEXOpCodeResponseValues


Response opCode values.

enum OBEXOpCodeResponseValues { 
    kOBEXResponseCodeReservedRangeStart = 0x00, 
    kOBEXResponseCodeReservedRangeEnd = 0x0F,  
    kOBEXResponseCodeContinue = 0x10, 
    kOBEXResponseCodeContinueWithFinalBit = 0x90, 
    kOBEXResponseCodeSuccess = 0x20, 
    kOBEXResponseCodeSuccessWithFinalBit = 0xA0, 
    kOBEXResponseCodeCreated = 0x21, 
    kOBEXResponseCodeCreatedWithFinalBit = 0xA1, 
    kOBEXResponseCodeAccepted = 0x22, 
    kOBEXResponseCodeAcceptedWithFinalBit = 0xA2, 
    kOBEXResponseCodeNonAuthoritativeInfo = 0x23, 
    kOBEXResponseCodeNonAuthoritativeInfoWithFinalBit = 0xA3, 
    kOBEXResponseCodeNoContent = 0x24, 
    kOBEXResponseCodeNoContentWithFinalBit = 0xA4, 
    kOBEXResponseCodeResetContent = 0x25, 
    kOBEXResponseCodeResetContentWithFinalBit = 0xA5, 
    kOBEXResponseCodePartialContent = 0x26, 
    kOBEXResponseCodePartialContentWithFinalBit = 0xA6,  
    kOBEXResponseCodeMultipleChoices = 0x30, 
    kOBEXResponseCodeMultipleChoicesWithFinalBit = 0xB0, 
    kOBEXResponseCodeMovedPermanently = 0x31, 
    kOBEXResponseCodeMovedPermanentlyWithFinalBit = 0xB1, 
    kOBEXResponseCodeMovedTemporarily = 0x32, 
    kOBEXResponseCodeMovedTemporarilyWithFinalBit = 0xB2, 
    kOBEXResponseCodeSeeOther = 0x33, 
    kOBEXResponseCodeSeeOtherWithFinalBit = 0xB3, 
    kOBEXResponseCodeNotModified = 0x34, 
    kOBEXResponseCodeNotModifiedWithFinalBit = 0xB4, 
    kOBEXResponseCodeUseProxy = 0x35, 
    kOBEXResponseCodeUseProxyWithFinalBit = 0xB5,  
    kOBEXResponseCodeBadRequest = 0x40, 
    kOBEXResponseCodeBadRequestWithFinalBit = 0xC0, 
    kOBEXResponseCodeUnauthorized = 0x41, 
    kOBEXResponseCodeUnauthorizedWithFinalBit = 0xC1, 
    kOBEXResponseCodePaymentRequired = 0x42, 
    kOBEXResponseCodePaymentRequiredWithFinalBit = 0xC2, 
    kOBEXResponseCodeForbidden = 0x43, 
    kOBEXResponseCodeForbiddenWithFinalBit = 0xC3, 
    kOBEXResponseCodeNotFound = 0x44, 
    kOBEXResponseCodeNotFoundWithFinalBit = 0xC4, 
    kOBEXResponseCodeMethodNotAllowed = 0x45, 
    kOBEXResponseCodeMethodNotAllowedWithFinalBit = 0xC5, 
    kOBEXResponseCodeNotAcceptable = 0x46, 
    kOBEXResponseCodeNotAcceptableWithFinalBit = 0xC6, 
    kOBEXResponseCodeProxyAuthenticationRequired = 0x47, 
    kOBEXResponseCodeProxyAuthenticationRequiredWithFinalBit= 0xC7, 
    kOBEXResponseCodeRequestTimeOut = 0x48, 
    kOBEXResponseCodeRequestTimeOutWithFinalBit = 0xC8, 
    kOBEXResponseCodeConflict = 0x49, 
    kOBEXResponseCodeConflictWithFinalBit = 0xC9, 
    kOBEXResponseCodeGone = 0x4A, 
    kOBEXResponseCodeGoneWithFinalBit = 0xCA, 
    kOBEXResponseCodeLengthRequired = 0x4B, 
    kOBEXResponseCodeLengthRequiredFinalBit = 0xCB, 
    kOBEXResponseCodePreconditionFailed = 0x4C, 
    kOBEXResponseCodePreconditionFailedWithFinalBit = 0xCC, 
    kOBEXResponseCodeRequestedEntityTooLarge = 0x4D, 
    kOBEXResponseCodeRequestedEntityTooLargeWithFinalBit = 0xCD, 
    kOBEXResponseCodeRequestURLTooLarge = 0x4E, 
    kOBEXResponseCodeRequestURLTooLargeWithFinalBit = 0xCE, 
    kOBEXResponseCodeUnsupportedMediaType = 0x4F, 
    kOBEXResponseCodeUnsupportedMediaTypeWithFinalBit = 0xCF,  
    kOBEXResponseCodeInternalServerError = 0x50, 
    kOBEXResponseCodeInternalServerErrorWithFinalBit = 0xD0, 
    kOBEXResponseCodeNotImplemented = 0x51, 
    kOBEXResponseCodeNotImplementedWithFinalBit = 0xD1, 
    kOBEXResponseCodeBadGateway = 0x52, 
    kOBEXResponseCodeBadGatewayWithFinalBit = 0xD2, 
    kOBEXResponseCodeServiceUnavailable = 0x53, 
    kOBEXResponseCodeServiceUnavailableWithFinalBit = 0xD3, 
    kOBEXResponseCodeGatewayTimeout = 0x54, 
    kOBEXResponseCodeGatewayTimeoutWithFinalBit = 0xD4, 
    kOBEXResponseCodeHTTPVersionNotSupported = 0x55, 
    kOBEXResponseCodeHTTPVersionNotSupportedWithFinalBit = 0xD5,  
    kOBEXResponseCodeDatabaseFull = 0x60, 
    kOBEXResponseCodeDatabaseFullWithFinalBit = 0xE0, 
    kOBEXResponseCodeDatabaseLocked = 0x61, 
    kOBEXResponseCodeDatabaseLockedWithFinalBit = 0xE1, 
};  


OBEXPutFlags


Flags for Put command.

See Also:

OBEXPutFlagValues

enum OBEXPutFlagValues { 
    kOBEXPutFlagNone = (
        0 << 0L),  
    kOBEXPutFlagGoToParentDirFirst = (
        1 << 0L), 
    kOBEXPutFlagDontCreateDirectory = (
        1 << 1L), 
    kOBEXPutFlag2Reserved = (
        1 << 2L), 
    kOBEXPutFlag3Reserved = (
        1 << 3L), 
    kOBEXPutFlag4Reserved = (
        1 << 4L), 
    kOBEXPutFlag5Reserved = (
        1 << 5L), 
    kOBEXPutFlag6Reserved = (
        1 << 6L), 
    kOBEXPutFlag7Reserved = (
        1 << 7L),  
};  


OBEXPutFlagValues


Flags for Put command.

See Also:

OBEXPutFlags

enum OBEXPutFlagValues { 
    kOBEXPutFlagNone = (
        0 << 0L),  
    kOBEXPutFlagGoToParentDirFirst = (
        1 << 0L), 
    kOBEXPutFlagDontCreateDirectory = (
        1 << 1L), 
    kOBEXPutFlag2Reserved = (
        1 << 2L), 
    kOBEXPutFlag3Reserved = (
        1 << 3L), 
    kOBEXPutFlag4Reserved = (
        1 << 4L), 
    kOBEXPutFlag5Reserved = (
        1 << 5L), 
    kOBEXPutFlag6Reserved = (
        1 << 6L), 
    kOBEXPutFlag7Reserved = (
        1 << 7L),  
};  


OBEXRealmValues


Values for Realm during digest response.

enum OBEXRealmValues { 
    kOBEXRealmASCII = 0x00, 
    kOBEXRealmISO88591 = 0x01, 
    kOBEXRealmISO88592 = 0x02, 
    kOBEXRealmISO88593 = 0x03, 
    kOBEXRealmISO88594 = 0x04, 
    kOBEXRealmISO88595 = 0x05, 
    kOBEXRealmISO88596 = 0x06, 
    kOBEXRealmISO88597 = 0x07, 
    kOBEXRealmISO88598 = 0x08, 
    kOBEXRealmISO88599 = 0x09, 
    kOBEXRealmUNICODE = 0xFF, 
};  


OBEXSessionEventTypes


enum OBEXSessionEventTypes { 
    // Client event types.  
    kOBEXSessionEventTypeConnectCommandResponseReceived = 'OCEC', 
    kOBEXSessionEventTypeDisconnectCommandResponseReceived = 'OCED', 
    kOBEXSessionEventTypePutCommandResponseReceived = 'OCEP', 
    kOBEXSessionEventTypeGetCommandResponseReceived = 'OCEG', 
    kOBEXSessionEventTypeSetPathCommandResponseReceived = 'OCES', 
    kOBEXSessionEventTypeAbortCommandResponseReceived = 'OCEA',  
    // Server event types.  
    kOBEXSessionEventTypeConnectCommandReceived = 'OSEC', 
    kOBEXSessionEventTypeDisconnectCommandReceived = 'OSED', 
    kOBEXSessionEventTypePutCommandReceived = 'OSEP', 
    kOBEXSessionEventTypeGetCommandReceived = 'OSEG', 
    kOBEXSessionEventTypeSetPathCommandReceived = 'OSES', 
    kOBEXSessionEventTypeAbortCommandReceived = 'OSEA',  
    // Shared (Server/client) event types.  
    kOBEXSessionEventTypeError = 'OGEE', 
};  
Discussion

When a new session event occurs, your selector (or C callback) will be given an OBEXSessionEvent pointer, and in it will be a 'type' field with one of the following types in it. Based on that type, you can then read the corresponding field in the union to get out interesting data for that event type. For example, if the type of an event is a 'kOBEXSessionEventTypeConnectCommandResponseReceived', you should look in the 'OBEXConnectCommandResponseData' part of the structure's union to find more information pased to you in the event. Note that some you will never see, depending on the type of session you are using - a client or server. If you are a client (most likely case), you will never see the "Command" events, but instead you will only receive the "CommandResponse" events since you will be the issuer oft he commands, not the receiver of them. Both types of sessions will receive error type events.


OBEXVersions


The available/supported OBEX versions. Currently there is only one!

enum OBEXVersions { 
    kOBEXVersion10 = 0x10, 
};  

#defines


GET_HEADER_ID_IS_1_BYTE_QUANTITY


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define GET_HEADER_ID_IS_1_BYTE_QUANTITY( HEADER_ID )  
Discussion

The API should shield you from using these, they are included here to completeness.


GET_HEADER_ID_IS_4_BYTE_QUANTITY


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define GET_HEADER_ID_IS_4_BYTE_QUANTITY( HEADER_ID )  
Discussion

The API should shield you from using these, they are included here to completeness.


GET_HEADER_ID_IS_BYTE_SEQUENCE


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define GET_HEADER_ID_IS_BYTE_SEQUENCE( HEADER_ID )  
Discussion

The API should shield you from using these, they are included here to completeness.


GET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define GET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT( HEADER_ID )  
Discussion

The API should shield you from using these, they are included here to completeness.


IS_RESPONSE_CODE_FINAL_BIT_SET


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define IS_RESPONSE_CODE_FINAL_BIT_SET( RESPONSE_CODE )  
Discussion

The API should shield you from using these, they are included here to completeness.


OBEX Convenience Macros.


Convenience Macros for working with OBEX Header Identifiers.

See Also:

GET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT

GET_HEADER_ID_IS_BYTE_SEQUENCE

GET_HEADER_ID_IS_1_BYTE_QUANTITY

GET_HEADER_ID_IS_4_BYTE_QUANTITY

SET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT

SET_HEADER_ID_IS_BYTE_SEQUENCE

SET_HEADER_ID_IS_1_BYTE_QUANTITY

SET_HEADER_ID_IS_4_BYTE_QUANTITY

IS_RESPONSE_CODE_FINAL_BIT_SET

STRIP_RESPONSE_CODE_FINAL_BIT

#define GET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT( HEADER_ID )  
#define GET_HEADER_ID_IS_BYTE_SEQUENCE( HEADER_ID )  
#define GET_HEADER_ID_IS_1_BYTE_QUANTITY( HEADER_ID )  
#define GET_HEADER_ID_IS_4_BYTE_QUANTITY( HEADER_ID )  
#define SET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT( HEADER_ID )  
#define SET_HEADER_ID_IS_BYTE_SEQUENCE( HEADER_ID )  
#define SET_HEADER_ID_IS_1_BYTE_QUANTITY( HEADER_ID )  
#define SET_HEADER_ID_IS_4_BYTE_QUANTITY( HEADER_ID )  
#define IS_RESPONSE_CODE_FINAL_BIT_SET( RESPONSE_CODE )  
#define STRIP_RESPONSE_CODE_FINAL_BIT( RESPONSE_CODE )  
Discussion

The API should shield you from using these, they are included here to completeness.


SET_HEADER_ID_IS_1_BYTE_QUANTITY


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define SET_HEADER_ID_IS_1_BYTE_QUANTITY( HEADER_ID )  
Discussion

The API should shield you from using these, they are included here to completeness.


SET_HEADER_ID_IS_4_BYTE_QUANTITY


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define SET_HEADER_ID_IS_4_BYTE_QUANTITY( HEADER_ID )  
Discussion

The API should shield you from using these, they are included here to completeness.


SET_HEADER_ID_IS_BYTE_SEQUENCE


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define SET_HEADER_ID_IS_BYTE_SEQUENCE( HEADER_ID )  
Discussion

The API should shield you from using these, they are included here to completeness.


SET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define SET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT( HEADER_ID )  
Discussion

The API should shield you from using these, they are included here to completeness.


STRIP_RESPONSE_CODE_FINAL_BIT


Convenience Macros for working with OBEX Header Identifiers.

See Also:

OBEX

#define STRIP_RESPONSE_CODE_FINAL_BIT( RESPONSE_CODE )  
Discussion

The API should shield you from using these, they are included here to completeness.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-08-07