Headers

Headers allow transferring metadata together with the objects. By using headers, OBEX peers can transmit different kinds of information related to a transmitted object, session, etc. For example, the name of the object, its size, a description, and the type of an object can be defined in the headers. According to the IrDA OBEX specification a header consists of two elements:

<HI, the header ID>

<HV, the header value>

HI, the header ID, is an unsigned one-byte integer that identifies what the header contains and how it is formatted. HV consists of one or more bytes in the format and meaning specified by HI. The table below provides information about the OBEX headers. Full information on each header can be found in the IrDA OBEX specification.

Table 17: List of OBEX headers. Source: IrDA OBEX specification

ID

Name

Description

0xC0

Count

Number of objects (used by Connect)

0x01

Name

Name of the object (often a file name)

0x42

Type

Type of object, e.g. text, html, binary, manufacturer-specific

0xC3

Length

The length of the object in bytes

0x440xC4

Time

Date/time stamp - ISO 8601 version - preferredDate/time stamp - 4 byte version (for compatibility only)

0x05

Description

Text description of the object

0x46

Target

Name of the service that an operation is targeted to

0x47

HTTP

An HTTP 1.x header

0x480x49

Body

End of Body

A chunk of the object body.

The final chunk of the object body

0x4A

Who

Identifies the OBEX application, used to tell if it is talking to a peer

0xCB

Connection Id

An identifier used for OBEX connection multiplexing

0x4C

App. Parameters

Extended application request & response information

0x4D

Auth. Challenge

Authentication digest-challenge

0x4E

Auth. Response

Authentication digest-response

0x4F

Object Class

OBEX Object class of object

0x10to 0x2F

Reserved

0x30 to 0x3F

User-defined

Note: Note that the OBEX specification denotes that all headers are optional.