OBEX.h

Public OBEX technology interfaces.

Overview

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.

Included Headers

  • <stdio.h>

  • <stdint.h>

  • <CoreServices/CoreServices.h>

  • <IOBluetooth/IOBluetoothUserLib.h>

Topics

Miscellaneous

GET_HEADER_ID_IS_NULL_TERMINATED_UNICODE_TEXT

Convenience Macros for working with OBEX Header Identifiers.

OBEX Convenience Macros.

Convenience Macros for working with OBEX Header Identifiers.

OBEXAddApplicationParameterHeader

Add bytes representing an application parameter 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 bytes of data to a dictionary of OBEXheaders.

OBEXAddByteSequenceHeader

Add a byte sequence header to a dictionary of OBEXheaders.

OBEXAddConnectionIDHeader

Add 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 bytes of data 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 bytes of data to a dictionary of OBEXheaders.

OBEXAddTime4ByteHeader

Add a CFStringRef to a dictionary of OBEXheaders.

OBEXAddTimeISOHeader

Add bytes 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 bytes of data to a dictionary of OBEXheaders.

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.

OBEXSessionGetAvailableCommandPayloadLength(OBEXSessionRef, OBEXOpCode, OBEXMaxPacketLength *)

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

Data Types

See the Overview for header-level documentation.

OBEXSessionEvent

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.

OBEXSessionEvent

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.

Constants

See the Overview for header-level documentation.

OBEXConnectFlagValues

Flags for Connect command.

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.

OBEXHeaderIdentifiers

Identifiers for OBEX Headers.

OBEXNonceFlagValues

Flags for Nonce command during digest challenge.

OBEXOpCodeCommandValues

Operation OpCode values for commands.

OBEXOpCodeResponseValues

Response opCode values.

OBEXOpCodeSessionValues

Operation OpCode values for sessions. From the OBEX 1.3 specification.

OBEXSetPathFlags

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.

OBEXRealmValues

Values for Realm during digest response.

OBEXSessionEventTypes

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.

OBEXSessionParameterTags

Tags for SessionParameters.

OBEXVersions

The available/supported OBEX versions.