|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access Bluetooth Framework Reference\xA0 |
OBEX.h |
Public OBEX technology interfaces.
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 OBEXBluetooth.h.
The 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.
Add bytes representing an application parameter to a dictionary of OBEX headers.
Add an authorization challenge header to a dictionary of OBEXheaders.
Add an authorization Response header to a dictionary of OBEXheaders.
Add bytes of data to a dictionary of OBEXheaders.
Add a byte sequence header to a dictionary of OBEXheaders.
Add bytes representing a connection ID to a dictionary of OBEX headers.
Add a CFStringRef to a dictionary of OBEXheaders.
Add a CFStringRef to a dictionary of OBEXheaders.
Add bytes of data to a dictionary of OBEXheaders.
Add a CFStringRef to a dictionary of OBEXheaders.
Add a CFStringRef to a dictionary of OBEXheaders.
Add an object class header to a dictionary of OBEXheaders.
Add bytes of data to a dictionary of OBEXheaders.
Add a CFStringRef to a dictionary of OBEXheaders.
Add bytes to a dictionary of OBEXheaders.
Add a CFStringRef to a dictionary of OBEXheaders.
Add a user-defined custom header to a dictionary of OBEXheaders.
Add bytes of data to a dictionary of OBEXheaders.
Creates a formatted vCard, ready to be sent over OBEX or whatever.
Creates a formatted vEvent, ready to be sent over OBEX or whatever. You probably will embed the output in a vCalendar event.
Take a data blob and looks for OBEX headers.
Converts a dictionary of headers to a data pointer, from which you can extract as bytes and pass to the OBEX command/response functions.
Send an abort command to a remote OBEX server.
Send a response to a abort command to the remote client.
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.
Send a response to a connect command to the remote client.
Destroy an OBEX session. If connections are open, they will (eventually) be terminated for you.
Send a disconnect command to a remote OBEX server.
Send a response to a disconnect command to the remote client.
Send a get command to a remote OBEX server.
Gets space available for your data for a particular command you are trying to send.
Gets space available for your data for a particular command response you are trying to send.
Gets space available for your data for a particular command response you are trying to send.
Gets current max packet length.
Send a response to a get command to the remote client.
Allows you to test the session for an open OBEX connection for a particular session.
Send a put command to a remote OBEX server.
Send a response to a put command to the remote client.
Send a set path command to a remote OBEX server.
Send a response to a set path command to the remote client.
OBEXAddApplicationParameterHeader |
Add bytes representing an application parameter to a dictionary of OBEX headers.
OBEXError OBEXAddApplicationParameterHeader( const void* inHeaderData, uint32_t inHeaderDataLength, CFMutableDictionaryRef dictRef );
inHeaderDataApplication parameter data - should be tag/length/value triplets.
inHeaderDataLengthLength of application parameter data.
dictRefdictionary you have allocated to hold the headers. Make sure it's mutable.
Error code, kOBEXSuccess (0) if success.
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 );
inHeaderDatabytes you want to put in the authorization challenge header.
inHeaderDataLengthlength of the bytes you want to put in authorization challenge header.
dictRefdictionary you have allocated to hold the headers. Make sure it's mutable.
Error code, kOBEXSuccess (0) if success.
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 );
inHeaderDatabytes you want to put in the authorization Response header.
inHeaderDataLengthlength of the bytes you want to put in authorization Response header.
dictRefdictionary you have allocated to hold the headers. Make sure it's mutable.
Error code, kOBEXSuccess (0) if success.
Authorization Response header - OBEX Spec, 2.2.14: Authorization Response.
OBEXAddBodyHeader |
Add bytes of data to a dictionary of OBEXheaders.
OBEXError OBEXAddBodyHeader( const void* inHeaderData, uint32_t inHeaderDataLength, Boolean isEndOfBody, CFMutableDictionaryRef dictRef );
inHeaderDataBody header data.
inHeaderDataLengthLength of Body header data.
isEndOfBodySet this flag if you want an end of body header instead of a body header.
dictRefdictionary you have allocated to hold the headers. Make sure it's mutable.
Error code, kOBEXSuccess (0) if success.
Body,EndOfBody headers - OBEX Spec, 2.2.9: Byte Sequence
OBEXAddByteSequenceHeader |
Add a byte sequence header to a dictionary of OBEXheaders.
OBEXError OBEXAddByteSequenceHeader( const void* inHeaderData, uint32_t inHeaderDataLength, CFMutableDictionaryRef dictRef );
inHeaderDatabytes you want to put in the byte sequence header.
inHeaderDataLengthlength of the bytes you want to put in the byte sequence header.
dictRefdictionary you have allocated to hold the headers. Make sure it's mutable.
Error code, kOBEXSuccess (0) if success.
Byte Sequence header - OBEX Spec, 2.2.5: Byte sequence. One thing of important note here - since we
don't know what Header Identifier and length you intend to use here, you MUST include your own
identifier and length in the data you pass. Thus, your data must be in this format:
Add bytes representing a connection ID to a dictionary of OBEX headers.
Connection ID data. Should be 4 bytes in length only. Length of Connection ID data. This should ONLY be set to equal 4. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
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. ***
Add a CFStringRef to a dictionary of OBEXheaders.
Count value you want to add to the OBEX header dictionary. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Count header - OBEX Spec, 2.2.1: 4 byte unsigned integer
Add a CFStringRef to a dictionary of OBEXheaders.
Description you want to add to the OBEX header dictionary. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Description header - OBEX Spec, 2.2.6: (2-byte) Null terminated unicode string.
Add bytes of data to a dictionary of OBEXheaders.
HTTP header data. Length of HTTP header data. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
HTTP header - OBEX Spec, 2.2.8: Byte Sequence
Add a CFStringRef to a dictionary of OBEXheaders.
Value of Length header you want to add to the OBEX header dictionary. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Length header - OBEX Spec, 2.2.4: 4 byte unsigned integer
Add a CFStringRef to a dictionary of OBEXheaders.
name you want to add to the OBEX header dictionary. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Name header - OBEX Spec, 2.2.2: (2-byte) Null terminated unicode string.
Add an object class header to a dictionary of OBEXheaders.
bytes you want to put in the object class header. length of the bytes you want to put in the object class header. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Object Class header - OBEX Spec, 2.2.15: Byte sequence.
Add bytes of data to a dictionary of OBEXheaders.
Target header data. Length of Target header data. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Target header - OBEX Spec, 2.2.7: Byte Sequence
Add a CFStringRef to a dictionary of OBEXheaders.
4-byte time value you want to add to the OBEX header dictionary. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Time4Byte headers - OBEX Spec, 2.2.5: 4 Bytes
Add bytes to a dictionary of OBEXheaders.
Time ISO 8601 header data, local times in format YYYYMMDDTHHMMSS and UTC in the format YYYYMMDDTHHMMSSZ. Length of header data. Error code, kOBEXSuccess (0) if success.
TimeISO header - OBEX Spec, 2.2.5: Byte Sequence
Add a CFStringRef to a dictionary of OBEXheaders.
Description containing the name you want to add to the OBEX header dictionary. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Type header - OBEX Spec, 2.2.3: 1-byte Null terminated ascii string.
Add a user-defined custom header to a dictionary of OBEXheaders.
bytes you want to put in the user-defined header. length of the bytes you want to put in user-defined header. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
User Defined header - OBEX Spec, 2.2.20: User Defined Headers.
Add bytes of data to a dictionary of OBEXheaders.
Who header data. Length of Who header data. dictionary you have allocated to hold the headers. Make sure it's mutable. Error code, kOBEXSuccess (0) if success.
Who headers - OBEX Spec, 2.2.10: Byte Sequence
Creates a formatted vCard, ready to be sent over OBEX or whatever.
A pointer to the charset data used for the name. Pass in a #defined charset
for ease of use. Length of name charset assed in above. Pointer to data with Person's first name. Length of Person's first name passed in above. Pointer to data with Person's last name. Length of Person's last name passed in above. Pointer to data with Person's Friendly name. Length of Person's Friendly name passed in above. Pointer to data with Person's Home phone number. Length of Person's Home phone number passed in above. Work phone number. Length of Person's Work phone number passed in above. Cell phone number. Length of Person's Cell phone number passed in above. Fax phone number. Length of Person's Fax phone number passed in above. EMailAddress of person. Length of Person's EMailAddress passed in above. Charset of EMailAddress of person. Length of Person's EMailAddress charset passed in above. Pointer to Organization/business data. Length of Organization/business data. Pointer to the charset the Organization/business is in. Length of data for the Organization/business charset. Pointer to data with Title of person in biz/org. Length of Title of person in biz/org. Pointer to the charset the Title is in. Length of data for the Title charset. An CFDataRef containing the compiled data. nil if we failed.
All parameters are optional. The CFDataRef returned to you is NOT retained. Retain it if you want to keep it.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Creates a formatted vEvent, ready to be sent over OBEX or whatever. You probably will embed the output
in a vCalendar event.
The Charset the passed data is in. Pass in a #defined charset for ease of use. The length of the Charset passed data. The encoding of the summary and location fields. The length of the Charset passed data. 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. The length of the Charset passed data. End of event date. The length of the Charset passed data. Date of Alarm for event, in the format: YYYYMMDDTHHMMSS. The length of the Charset passed data. Category of event, such as "MEETING" or "PHONE CALL". The length of the Charset passed data. Summary of event. Max length is 36 bytes. Longer will result in a bad argument error. The length of the Charset passed data. Summary of event. Max length is 20 bytes. Longer will result in a bad argument error. The length of the Charset passed data. The IRMC Local Unique Identifier Label, max length 12 bytes. Longer will result in
a bad argument error. The length of the Charset passed data. A valid CFDataRef - nil if we failed.
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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Take a data blob and looks for OBEX headers.
The data chunk with the headers you are interested in. The size of the buffer you are passing in. A CFDictionary with the headers found in the data blob inside it.
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:
Converts a dictionary of headers to a data pointer, from which you can extract as bytes and pass to
the OBEX command/response functions.
dictionary that you have added headers to with the above OBEXAddXXXHeader functions. Mutable data ref containing the bytes of all headers.
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:
Send an abort command to a remote OBEX server.
A valid session reference. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a response to a abort command to the remote client.
A valid session reference. What response code you want to send to the remote client. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
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.
A valid session reference. Flags, as defined in the OBEX spec for this command. Maximum packet length you wish to allow. May be negiotiated with host to be less
or more than you specify. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a response to a connect command to the remote client.
A valid session reference. What response code you want to send to the remote client. Flags, as defined in the OBEX spec for this command. Constants, as defined in the OBEX spec for this command. Max packet length you want to support. Must be smaller or equal to the max packet
length specified by the remote client. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Destroy an OBEX session. If connections are open, they will (eventually) be terminated for you.
A valid service reference. An error code value. 0 if successful.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a disconnect command to a remote OBEX server.
A valid session reference. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a response to a disconnect command to the remote client.
A valid session reference. What response code you want to send to the remote client. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a get command to a remote OBEX server.
A valid session reference. TRUE or FALSE - is this the last chunk of header data for this GET. Headers containing data to GET. Size of header data. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your callback
just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Gets space available for your data for a particular command you are trying to send.
A valid session reference. An opcode of what command you are trying to send. Space available for your header data in the payload area for a particular command. An error code value. 0 if successful.
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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Gets space available for your data for a particular command response you are trying to send.
A valid session reference. 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. Space available for your header data in the payload area for a particular command. An error code value. 0 if successful.
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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Gets space available for your data for a particular command response you are trying to send.
A valid session reference. 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. Space available for your header data in the payload area for a particular command. An error code value. 0 if successful.
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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Gets current max packet length.
A valid session reference. Max packet length. An error code value. 0 if successful.
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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a response to a get command to the remote client.
A valid session reference. What response code you want to send to the remote client. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Allows you to test the session for an open OBEX connection for a particular session.
A valid session reference. A valid ptr to an OBEXSessionRef; will contain the newly created session if return
value is kOBEXSuccess. An error code value. 0 if successful.
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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a put command to a remote OBEX server.
A valid session reference. TRUE or FALSE - is this the last chunk of header data for this PUT. Headers containing data to PUT. Don't include your body header data here. Size of header data. Don't include your body header data here. 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). Size of Data for the BODY header to PUT. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your callback
just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a response to a put command to the remote client.
A valid session reference. What response code you want to send to the remote client. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a set path command to a remote OBEX server.
A valid session reference. Flags, as defined in the OBEX spec for this command. Constants, as defined in the OBEX spec for this command. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
Send a response to a set path command to the remote client.
A valid session reference. What response code you want to send to the remote client. Ptr to optional headers you can supply to the command. DO NOT dispose of this
pointer until you callback is called with a success. Size of data at the specified ptr. A valid callback. Will be called for progress, errors and completion. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will
result in an error.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
A valid session reference. A valid callback. Will be called for progress, errors and completion by server
sessions only. Optional parameter; can contain anything you wish. Will be returned in your
callback just as you passed it. An error code value. 0 if successful.
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.
*** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6)
*** You should transition your code to Objective-C equivalents.
*** This API may be removed any time in the future.
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.
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.
of type kOBEXSessionEventTypeAbortCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeAbortCommandResponseReceived (see
OBEXSessionEventTypes).
of type kOBEXSessionEventTypeConnectCommandReceived (see
OBEXSessionEventTypes).
Part of the OBEXSessionEvent structure. Is readable when the event is of type
kOBEXSessionEventTypeConnectCommandResponseReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeDisconnectCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeDisconnectCommandResponseReceived (see
OBEXSessionEventTypes).
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.
of type kOBEXSessionEventTypeError (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeGetCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeGetCommandResponseReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypePutCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypePutCommandResponseReceived (see OBEXSessionEventTypes).
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.
of type kOBEXSessionEventTypeSetPathCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeSetPathCommandResponseReceived (see
OBEXSessionEventTypes).
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.
of type kOBEXSessionEventTypeAbortCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeAbortCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeAbortCommandResponseReceived (see
OBEXSessionEventTypes).
of type kOBEXSessionEventTypeAbortCommandResponseReceived (see
OBEXSessionEventTypes).
of type kOBEXSessionEventTypeConnectCommandReceived (see
OBEXSessionEventTypes).
of type kOBEXSessionEventTypeConnectCommandReceived (see
OBEXSessionEventTypes).
Part of the OBEXSessionEvent structure. Is readable when the event is of type
kOBEXSessionEventTypeConnectCommandResponseReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeDisconnectCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeDisconnectCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeDisconnectCommandResponseReceived (see
OBEXSessionEventTypes).
of type kOBEXSessionEventTypeDisconnectCommandResponseReceived (see
OBEXSessionEventTypes).
of type kOBEXSessionEventTypeError (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeError (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeGetCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeGetCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeGetCommandResponseReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeGetCommandResponseReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypePutCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypePutCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypePutCommandResponseReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypePutCommandResponseReceived (see OBEXSessionEventTypes).
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.
of type kOBEXSessionEventTypeSetPathCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeSetPathCommandReceived (see OBEXSessionEventTypes).
of type kOBEXSessionEventTypeSetPathCommandResponseReceived (see
OBEXSessionEventTypes).
of type kOBEXSessionEventTypeSetPathCommandResponseReceived (see
OBEXSessionEventTypes).
Flags for Connect command.
Flags for Connect command.
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.
Identifiers for OBEX Headers.
Flags for Nonce command during digest challenge.
Flags for Nonce command during digest challenge.
Operation OpCode values for commands.
Response opCode values.
Operation OpCode values for sessions. From the OBEX 1.3 specification.
Flags for SetPath command. Not that these are called "PutFlags". That is a mistake, they are not used
with a Put command. We are not changing the names to maintain backwards compatibility.
Values for Realm during digest response.
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.
Tags for SessionParameters.
Flags for SetPath command. Not that these are called "PutFlags". That is a mistake, they are not used
with a Put command. We are not changing the names to maintain backwards compatibility.
The available/supported OBEX versions.
Flags for Connect command.
Flags for Connect command.
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.
Minimum value in OBEX error range. Maximum value in OBEX error range. Identifiers for OBEX Headers.
Name of the object. Null terminated unicode text. Text description of the object. Null terminated unicode text. Range includes all combos of the upper 2 bits. Reserved. Range includes all combos of the upper 2 bits. Reserved. Range includes all combos of the upper 2 bits. User defined. Range includes all combos of the upper 2 bits. User defined. Type of object - e.g. text, html, binary, etc. Null terminated ASCII text. Date/time stamp - ISO8601 version of time. (YYYYMMDDTHHMMSSZ) Name of service that operation is destined for. An HTTP 1.x header. A Chunk of the object body. The last checking of the object body. Identifies the OBEX applications, used to tell if talking to a peer. Extended application request and resposnse info. Authentication digest-challenge. Authentication digest-reponse. OBEX Object - class of object. Number of objects (used in Connect command). The length of the object in bytes. 4 byte unsigned integer value. Date/time stamp - 4 byte version for compat. only. Seconds since Jan 1, 1970. An identifier used for OBEX connection multiplexing. Used to provide state information when layering OBEX over stateless networks. 16byte UUID. Used to reference the object class and properties. Byte Sequence. Byte sequence required for CreateSession, CloseSession and other OBEX commands. 1-byte quantitied containing the current sequence number. 4-byte unsigned integer that identifies the creator of the object. Flags for Nonce command during digest challenge.
Flags for Nonce command during digest challenge.
Operation OpCode values for commands.
Response opCode values.
Operation OpCode values for sessions. From the OBEX 1.3 specification.
Flags for SetPath command. Not that these are called "PutFlags". That is a mistake, they are not used
with a Put command. We are not changing the names to maintain backwards compatibility.
Values for Realm during digest response.
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.
Tags for SessionParameters.
Flags for SetPath command. Not that these are called "PutFlags". That is a mistake, they are not used
with a Put command. We are not changing the names to maintain backwards compatibility.
The available/supported OBEX versions.
Convenience Macros for working with OBEX Header Identifiers.
Convenience Macros for working with OBEX Header Identifiers.
Convenience Macros for working with OBEX Header Identifiers.
The API should shield you from using these, they are included here to completeness.
Convenience Macros for working with OBEX Header Identifiers.
The API should shield you from using these, they are included here to completeness.
\xA0 \xA0 Last Updated: 2009-10-09
OBEXAddConnectionIDHeader
OBEXError OBEXAddConnectionIDHeader(
const void* inHeaderData,
uint32_t inHeaderDataLength,
CFMutableDictionaryRef dictRef );
Parameters
inHeaderDatainHeaderDataLengthdictRefReturn Value
Discussion
OBEXAddCountHeader
OBEXError OBEXAddCountHeader(
uint32_t count,
CFMutableDictionaryRef dictRef );
Parameters
countdictRefReturn Value
Discussion
OBEXAddDescriptionHeader
OBEXError OBEXAddDescriptionHeader(
CFStringRef description,
CFMutableDictionaryRef dictRef );
Parameters
descriptiondictRefReturn Value
Discussion
OBEXAddHTTPHeader
OBEXError OBEXAddHTTPHeader(
const void* inHeaderData,
uint32_t inHeaderDataLength,
CFMutableDictionaryRef dictRef );
Parameters
inHeaderDatainHeaderDataLengthdictRefReturn Value
Discussion
OBEXAddLengthHeader
OBEXError OBEXAddLengthHeader(
uint32_t length,
CFMutableDictionaryRef dictRef );
Parameters
lengthdictRefReturn Value
Discussion
OBEXAddNameHeader
OBEXError OBEXAddNameHeader(
CFStringRef name,
CFMutableDictionaryRef dictRef );
Parameters
namedictRefReturn Value
Discussion
OBEXAddObjectClassHeader
OBEXError OBEXAddObjectClassHeader(
const void* inHeaderData,
uint32_t inHeaderDataLength,
CFMutableDictionaryRef dictRef );
Parameters
inHeaderDatainHeaderDataLengthdictRefReturn Value
Discussion
OBEXAddTargetHeader
OBEXError OBEXAddTargetHeader(
const void* inHeaderData,
uint32_t inHeaderDataLength,
CFMutableDictionaryRef dictRef );
Parameters
inHeaderDatainHeaderDataLengthdictRefReturn Value
Discussion
OBEXAddTime4ByteHeader
OBEXError OBEXAddTime4ByteHeader(
uint32_t time4Byte,
CFMutableDictionaryRef dictRef );
Parameters
time4BytedictRefReturn Value
Discussion
OBEXAddTimeISOHeader
OBEXError OBEXAddTimeISOHeader(
const void* inHeaderData,
uint32_t inHeaderDataLength,
CFMutableDictionaryRef dictRef );
Parameters
inHeaderDatainHeaderDataLengthReturn Value
Discussion
OBEXAddTypeHeader
OBEXError OBEXAddTypeHeader(
CFStringRef type,
CFMutableDictionaryRef dictRef );
Parameters
descriptiondictRefReturn Value
Discussion
OBEXAddUserDefinedHeader
OBEXError OBEXAddUserDefinedHeader(
const void* inHeaderData,
uint32_t inHeaderDataLength,
CFMutableDictionaryRef dictRef );
Parameters
inHeaderDatainHeaderDataLengthdictRefReturn Value
Discussion
OBEXAddWhoHeader
OBEXError OBEXAddWhoHeader(
const void* inHeaderData,
uint32_t inHeaderDataLength,
CFMutableDictionaryRef dictRef );
Parameters
inHeaderDatainHeaderDataLengthdictRefReturn Value
Discussion
OBEXCreateVCard
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 ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inNameCharsetinNameCharsetLengthinFirstNameinFirstNameLengthinLastNameinLastNameLengthinFriendlyNameinFriendlyNameLengthinHomePhoneinHomePhoneLengthinWorkPhoneinWorkPhoneLengthinCellPhoneinCellPhoneLengthinFaxPhoneinFaxPhoneLengthinEMailAddressinEMailAddressLengthinEMailAddressCharsetinEMailAddressCharsetLengthinOrganizationinOrganizationLengthinOrganizationCharsetinOrganizationCharsetLengthinTitleinTitleLengthinOrganizationCharsetinOrganizationCharsetLengthReturn Value
Discussion
OBEXCreateVEvent
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 ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inCharsetinCharsetLengthinEncodinginCharsetLengthinEventStartDateinCharsetLengthinEventEndDateinCharsetLengthinAlarmDateinCharsetLengthinCategoryinCharsetLengthinSummaryinCharsetLengthinLocationinCharsetLengthinXIRMCLUIDinCharsetLengthReturn Value
Discussion
OBEXGetHeaders
CFDictionaryRef OBEXGetHeaders(
const void* inData,
size_t inDataSize );
Parameters
inDatainDataSizeReturn Value
Discussion
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
CFMutableDataRef OBEXHeadersToBytes(
CFDictionaryRef dictionaryOfHeaders );
Parameters
dictionaryOfHeadersReturn Value
Discussion
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
OBEXError OBEXSessionAbort(
OBEXSessionRef inSessionRef,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefcon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionAbortResponse
OBEXError OBEXSessionAbortResponse(
OBEXSessionRef inSessionRef,
OBEXOpCode inResponseOpCode,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinResponseOpCodeinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionConnect
OBEXError OBEXSessionConnect(
OBEXSessionRef inSessionRef,
OBEXFlags inFlags,
OBEXMaxPacketLength inMaxPacketLength,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinFlagsinMaxPacketLengthinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionConnectResponse
OBEXError OBEXSessionConnectResponse(
OBEXSessionRef inSessionRef,
OBEXOpCode inResponseOpCode,
OBEXFlags inFlags,
OBEXMaxPacketLength inMaxPacketLength,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinResponseOpCodeinFlagsinConstantsinMaxPacketLengthinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionDelete
OBEXError OBEXSessionDelete(
OBEXSessionRef inSessionRef ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefReturn Value
Discussion
OBEXSessionDisconnect
OBEXError OBEXSessionDisconnect(
OBEXSessionRef inSessionRef,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionDisconnectResponse
OBEXError OBEXSessionDisconnectResponse(
OBEXSessionRef inSessionRef,
OBEXOpCode inResponseOpCode,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinResponseOpCodeinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionGet
OBEXError OBEXSessionGet(
OBEXSessionRef inSessionRef,
Boolean inIsFinalChunk,
void *inHeadersData,
size_t inHeadersDataLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinIsFinalChunkinHeadersDatainHeadersDataLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionGetAvailableCommandPayloadLength(OBEXSessionRef, OBEXOpCode, OBEXMaxPacketLength *)
OBEXError OBEXSessionGetAvailableCommandPayloadLength(
OBEXSessionRef inSessionRef,
OBEXOpCode inOpCode,
OBEXMaxPacketLength *outLength ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinOpCodeoutLengthReturn Value
Discussion
OBEXSessionGetAvailableCommandPayloadLength(OBEXSessionRef, OBEXOpCode, OBEXMaxPacketLength *)
OBEXError OBEXSessionGetAvailableCommandResponsePayloadLength(
OBEXSessionRef inSessionRef,
OBEXOpCode inOpCode,
OBEXMaxPacketLength *outLength ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinOpCodeoutLengthReturn Value
Discussion
OBEXSessionGetAvailableCommandResponsePayloadLength
OBEXError OBEXSessionGetAvailableCommandResponsePayloadLength(
OBEXSessionRef inSessionRef,
OBEXOpCode inOpCode,
OBEXMaxPacketLength *outLength ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinOpCodeoutLengthReturn Value
Discussion
OBEXSessionGetMaxPacketLength
OBEXError OBEXSessionGetMaxPacketLength(
OBEXSessionRef inSessionRef,
OBEXMaxPacketLength *outLength ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefoutLengthReturn Value
Discussion
OBEXSessionGetResponse
OBEXError OBEXSessionGetResponse(
OBEXSessionRef inSessionRef,
OBEXOpCode inResponseOpCode,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinResponseOpCodeinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionHasOpenOBEXConnection
OBEXError OBEXSessionHasOpenOBEXConnection(
OBEXSessionRef inSessionRef,
Boolean *outIsConnected ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefoutIsConnectedReturn Value
Discussion
OBEXSessionPut
OBEXError OBEXSessionPut(
OBEXSessionRef inSessionRef,
Boolean inIsFinalChunk,
void *inHeadersData,
size_t inHeadersDataLength,
void *inBodyData,
size_t inBodyDataLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinIsFinalChunkinHeadersDatainHeadersDataLengthinBodyDatainBodyDataLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionPutResponse
OBEXError OBEXSessionPutResponse(
OBEXSessionRef inSessionRef,
OBEXOpCode inResponseOpCode,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinResponseOpCodeinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionSetPath
OBEXError OBEXSessionSetPath(
OBEXSessionRef inSessionRef,
OBEXFlags inFlags,
OBEXConstants inConstants,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefcon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinFlagsinConstantsinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionSetPathResponse
OBEXError OBEXSessionSetPathResponse(
OBEXSessionRef inSessionRef,
OBEXOpCode inResponseOpCode,
void *inOptionalHeaders,
size_t inOptionalHeadersLength,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinResponseOpCodeinOptionalHeadersinOptionalHeadersLengthinCallbackinUserRefConReturn Value
Discussion
OBEXSessionSetServerCallback
OBEXError OBEXSessionSetServerCallback(
OBEXSessionRef inSessionRef,
OBEXSessionEventCallback inCallback,
void *inUserRefCon ) DEPRECATED_IN_BLUETOOTH_VERSION_2_2_AND_LATER;
Parameters
inSessionRefinCallbackinUserRefConReturn Value
Discussion
Typedefs
OBEXAbortCommandData
See Also:typedef struct OBEXAbortCommandData OBEXAbortCommandData;
Discussion
OBEXAbortCommandResponseData
See Also:typedef struct OBEXAbortCommandResponseData OBEXAbortCommandResponseData;
Discussion
OBEXConnectCommandData
See Also:typedef struct OBEXConnectCommandData OBEXConnectCommandData;
Discussion
OBEXConnectCommandResponseData
See Also:
typedef struct OBEXConnectCommandResponseData OBEXConnectCommandResponseData;
Discussion
OBEXDisconnectCommandData
See Also:typedef struct OBEXDisconnectCommandData OBEXDisconnectCommandData;
Discussion
OBEXDisconnectCommandResponseData
See Also:typedef struct OBEXDisconnectCommandResponseData OBEXDisconnectCommandResponseData;
Discussion
OBEXError
typedef int32_t OBEXError;
OBEXErrorData
See Also:
typedef struct OBEXErrorData OBEXErrorData;
Discussion
OBEXGetCommandData
See Also:typedef struct OBEXGetCommandData OBEXGetCommandData;
Discussion
OBEXGetCommandResponseData
See Also:typedef struct OBEXGetCommandResponseData OBEXGetCommandResponseData;
Discussion
OBEXPutCommandData
See Also:typedef struct OBEXPutCommandData OBEXPutCommandData;
Discussion
OBEXPutCommandResponseData
See Also:typedef struct OBEXPutCommandResponseData OBEXPutCommandResponseData;
Discussion
OBEXSessionEvent
typedef struct OBEXSessionEvent OBEXSessionEvent;
OBEXSetPathCommandData
See Also:typedef struct OBEXSetPathCommandData OBEXSetPathCommandData;
Discussion
OBEXSetPathCommandResponseData
See Also:typedef struct OBEXSetPathCommandResponseData OBEXSetPathCommandResponseData;
Discussion
Structs and Unions
OBEXAbortCommandData
See Also:struct OBEXAbortCommandData {
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXAbortCommandData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXAbortCommandData {
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXAbortCommandResponseData
See Also:struct OBEXAbortCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXAbortCommandResponseData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXAbortCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXConnectCommandData
See Also:struct OBEXConnectCommandData {
void *headerDataPtr;
size_t headerDataLength;
OBEXMaxPacketLength maxPacketSize;
OBEXVersion version;
OBEXFlags flags;
};
Discussion
OBEXConnectCommandData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXConnectCommandData {
void *headerDataPtr;
size_t headerDataLength;
OBEXMaxPacketLength maxPacketSize;
OBEXVersion version;
OBEXFlags flags;
};
Discussion
OBEXConnectCommandResponseData
See Also:
struct OBEXConnectCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
OBEXMaxPacketLength maxPacketSize;
OBEXVersion version;
OBEXFlags flags;
};
Discussion
OBEXDisconnectCommandData
See Also:struct OBEXDisconnectCommandData {
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXDisconnectCommandData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXDisconnectCommandData {
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXDisconnectCommandResponseData
See Also:struct OBEXDisconnectCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXDisconnectCommandResponseData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXDisconnectCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXErrorData
See Also:
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
OBEXErrorData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
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
OBEXGetCommandData
See Also:struct OBEXGetCommandData {
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXGetCommandData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXGetCommandData {
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXGetCommandResponseData
See Also:struct OBEXGetCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXGetCommandResponseData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXGetCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXPutCommandData
See Also:struct OBEXPutCommandData {
void *headerDataPtr;
size_t headerDataLength;
size_t bodyDataLeftToSend;
};
Discussion
OBEXPutCommandData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXPutCommandData {
void *headerDataPtr;
size_t headerDataLength;
size_t bodyDataLeftToSend;
};
Discussion
OBEXPutCommandResponseData
See Also:struct OBEXPutCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
OBEXPutCommandResponseData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXPutCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
};
Discussion
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;
};
OBEXSetPathCommandData
See Also:struct OBEXSetPathCommandData {
void *headerDataPtr;
size_t headerDataLength;
OBEXFlags flags;
OBEXConstants constants;
};
Discussion
OBEXSetPathCommandData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXSetPathCommandData {
void *headerDataPtr;
size_t headerDataLength;
OBEXFlags flags;
OBEXConstants constants;
};
Discussion
OBEXSetPathCommandResponseData
See Also:struct OBEXSetPathCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
OBEXFlags flags;
OBEXConstants constants;
};
Discussion
OBEXSetPathCommandResponseData Part of the OBEXSessionEvent structure. Is readable when the event is
See Also:
struct OBEXSetPathCommandResponseData {
OBEXOpCode serverResponseOpCode;
void *headerDataPtr;
size_t headerDataLength;
OBEXFlags flags;
OBEXConstants constants;
};
Discussion
Enumerated Types
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),
};
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),
};
OBEXErrorCodes
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, // operation or item is not supported.
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,
#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1
kOBEXForbiddenError = -21858, // operation was not allowed on remote device (wrong permissions, etc.).
#endif
/* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */
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
kOBEXErrorRangeMinkOBEXErrorRangeMax
OBEXHeaderIdentifiers
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, /* OBEX 1.2 and prior specification only; note that there is another Object Class defined below; this is removed in the 1.3 specification */
kOBEXHeaderIDCount = 0xC0,
kOBEXHeaderIDLength = 0xC3,
kOBEXHeaderIDTime4Byte = 0xC4,
kOBEXHeaderIDConnectionID = 0xCB,
#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1
/* OBEX 1.3 and later specification */
kOBEXHeaderIDOBEX13WANUUID = 0x50,
kOBEXHeaderIDOBEX13ObjectClass = 0x51,
kOBEXHeaderIDOBEX13SessionParameters = 0x52,
kOBEXHeaderIDOBEX13SessionSequenceNumber = 0x93,
kOBEXHeaderIDOBEX13CreatorID = 0xCF,
/* End OBEX 1.3 and later specification */
#endif
/* BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_1_1 */
};
Constants
kOBEXHeaderIDNamekOBEXHeaderIDDescriptionkOBEXHeaderIDReservedRangeStartkOBEXHeaderIDReservedRangeEndkOBEXHeaderIDUserDefinedRangeStartkOBEXHeaderIDUserDefinedRangeEndkOBEXHeaderIDTypekOBEXHeaderIDTimeISOkOBEXHeaderIDTargetkOBEXHeaderIDHTTPkOBEXHeaderIDBodykOBEXHeaderIDEndOfBodykOBEXHeaderIDWhokOBEXHeaderIDAppParameterskOBEXHeaderIDAuthorizationChallengekOBEXHeaderIDAuthorizationResponsekOBEXHeaderIDObjectClasskOBEXHeaderIDCountkOBEXHeaderIDLengthkOBEXHeaderIDTime4BytekOBEXHeaderIDConnectionIDkOBEXHeaderIDOBEX13WANUUIDkOBEXHeaderIDOBEX13ObjectClasskOBEXHeaderIDOBEX13SessionParameterskOBEXHeaderIDOBEX13SessionSequenceNumberkOBEXHeaderIDOBEX13CreatorID
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),
};
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),
};
OBEXOpCodeCommandValues
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
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,
};
OBEXOpCodeSessionValues
enum OBEXOpCodeSessionValues {
kOBEXOpCodeCreateSession = 0x00,
kOBEXOpCodeCloseSession = 0x01,
kOBEXOpCodeSuspendSession = 0x02,
kOBEXOpCodeResumeSession = 0x03,
kOBEXOpCodeSetTimeout = 0x04 /* 0x05-0xFF are reserved */
};
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),
};
OBEXRealmValues
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',
};
OBEXSessionParameterTags
enum OBEXSessionParameterTags {
kOBEXSessionParameterTagDeviceAddress = 0x00,
kOBEXSessionParameterTagNonce = 0x01,
kOBEXSessionParameterTagSessionID = 0x02,
kOBEXSessionParameterTagNextSequenceNumber = 0x03,
kOBEXSessionParameterTagTimeout = 0x04,
kOBEXSessionParameterTagSessionOpcode = 0x05
};
OBEXSetPathFlags
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),
};
OBEXVersions
enum OBEXVersions {
kOBEXVersion10 = 0x10,
};
Macro Definitions
GET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT
#define GET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT( HEADER_ID )
Discussion
OBEX Convenience Macros.
#define GET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT( HEADER_ID )
Discussion