6. Newly defined MIME content-types
This section defines new MIME content-types for the purposes of interworking with X.400.
6.1. The application/x400-bp content-type
This content-type is defined to carry any X.400(88) body part for which there is no registered IANA mapping.
The content-type field is
application/x400-bp
The parameters are:
bp-type=<INTEGER or OBJECT IDENTIFIER>
The body contains the raw ASN.1 IPM.body octet stream, including the initial tag octet. If the body is a basic body part, the bp-type parameter is set to the number of the body part's context-specific tag, that is, the tag of the IPMS.Body.BodyPart component. If the body is an Extended Body Part, the bp-type parameter is set to the OBJECT IDENTIFIER from
IPMS.body.externally-defined.data.direct-reference
No attempt is made to turn the parameters of Extended Body Parts into MIME parameters. (This task is the responsibility of the recipient's UA). For example, a basic VideotexBodyPart will have
Content-type=application/x400-bp; bp-type=6
whilst a Extended Videotex body part will have
Content-type=application/x400-bp; bp-type=2.6.1.4.5
application/x400-bp will need a content-transfer-encoding of base64 or quoted-printable when carried in 7-bit MIME. Since there is no way to know beforehand the content, it is recommended to just inspect the first 1 KByte or so of data and choose the one that seems to produce the more compact encoding. If this is not feasible, Base64 is recommended.
6.2. The image/g3fax content-type
This content-type is defined to carry G3 Facsimile byte streams. In general, a G3Fax image contains 3 pieces of information:
(1) A set of flags indicating the particular coding
scheme. CCITT Recommendation T.30 defines how the
flags are transmitted over telephones. In this
medium, the flags are carried as parameters in the
MIME content-type header field.
(2) A structure that divides the bits into pages. CCITT
recommendation T.30 describes how to define page
boundaries. A page break algorithm is defined here
that is independent of how the image data is
conveyed.
(3) For each page, a sequence of bits that form the
encoding of the image. CCITT recommendation T.4
defines the bit image format. This is used without
change.
6.2.1. G3Fax Parameters
The following parameters are defined:
(1) page-length - possible values: A4, B4 and Unlimited
(2) page-width - possible values: A3, A4, B4
(3) encoding - possible values: 1-dimensional, 2-
dimensional, Uncompressed
(4) resolution - possible values: Fine, Coarse
(5) DCS - a bit string, represented in Base64.
(6) pages - an integer, giving the number of pages in the
document
If nothing is specified, the default parameter settings are:
page-length=A4
page-width=A4
encoding=1-dimensional
resolution=Coarse
It is possible (but misleading) to view the representation of these values as single-bit flags. They correspond to the following bits of the T.30 control string and X.400 G3FacsimileParameters:
Parameter T.30 bit X.400 bit
page-length=A4 no bit set
page-length=B4 19 21
page-length=Unlimited 20 20
page-width=A4 no bit set
page-width=A3 18 22
page-width=B4 17 23
encoding=1-dimensional no bit set
encoding=2-dimensional 16 8
encoding=Uncompressed 26 30
resolution=Coarse no bit set
resolution=Fine 15 9
The reason for the different bit numbers is that X.400 counts bits in an octet from the MSB down to the LSB, while T.30 uses the opposite numbering scheme. If any bit but these are set in the Device Control String, the DCS parameter should be supplied.
6.2.2. Content Encoding
X.400 defines the g3-facsimile data stream as a SEQUENCE of BIT STRINGs. Each BIT STRING is a page of facsimile image data, encoded as defined by Recommendation T.4. The following content encoding is reversible between MIME and X.400 and ensures that page breaks are honored in the MIME representation. An EOL is defined as a bit sequence of
000000000001 (eleven zeroes and a one).
Each page of the message is delimited by a sequence of six (6) EOLs that MUST start on a byte boundary. The image bit stream is padded as needed to achieve this alignment. Searching for the boundary is a matter of searching for the byte sequence (HEX) 00 10 01 00 10 01 00 10 01, which cannot occur inside the image. See Section 7.5 for the algorithm on conversion between this encoding and the X.400 encoding. The Base64 content-transfer-encoding is appropriate for carrying this content-type.
6.3. The Application/ODA content-type
The "ODA" subtype of application is used to indicate that a body contains information encoded according to the Office Document Architecture [4] standards, using the ODIF representation format. For application/oda, the Content- Type line should also specify an attribute/value pair that indicates the document application profile (DAP), using the key word "profile", and the document class, using the keyword "class". For the keyword "class", the values "formatted", "processable" and "formatted-processable" are legal values. Thus an appropriate header field might look like this:
Content-Type: application/oda; profile=Q112;
class=formatted
Consult the ODA standard [4] for further information. The Base64 content-transfer-encoding is appropriate for carrying ODA.