A CMC_message structure contains information about a CMC message.
Header file: | XCMC.H |
typedef struct {
CMC_message_reference *message_reference;
CMC_string message_type;
CMC_string subject;
CMC_time time_sent;
CMC_string text_note;
CMC_recipient *recipients;
CMC_attachment *attachments;
CMC_flags message_flags;
CMC_extension *message_extensions;
} CMC_message;
For the complete specification of CMC message types, see "Remarks."
Message types are used to distinguish between various sorts of messages that might require different processing. For example, the message type might be used by the client application to determine how to display the message or by CMC to determine how to send the message.
CMC message types possible in the message_type member of a CMC_message structure can have the following formats and are case-insensitive.
"OID: " + object_identifier
"CMC: " + cmc_registered_value
"BLT: " + string
An object_identifier is a string containing a series of whitespace separated integers. See CMC_object_identifier for details.
The following is a list of message types:
Bilaterally defined values are arbitrary strings and are used to identify custom message types used by the client application.
As the syntax preceding indicates, the OID:
type identifier indicates a type identified by an object identifier, the CMC:
type identifier indicates a type identified by a CMC registered value, and the BLT:
type identifier indicates a type identified by a bilaterally defined value. Following are examples of valid type identifiers:
OID: 1 2 840 113556 3 2 850
CMC: IPM
BLT: my special message type
You can format type identifiers as you choose; the CMC implementation also defines a canonical type identifier format that allows a client application to easily compare type identifier strings. The CMC implementation always returns type identifiers in this format, which guarantees the following:
OID:
, CMC:
, and BLT:
are returned in uppercase.The CMC specification does not define what it will do with type identifier strings that are not in this format.
The formats of messages with the preceding registered values within a CMC_message structure depend on the messaging protocols employed by the underlying messaging system. Often, non-IPM messages take the form of a program-generated message, which follows a memo-like format similar to an IPM format but serves instead to convey information about a previously sent message.
Note The cmc_registered_value types correspond to X.400 message types; however, non-X.400 messaging systems can also use them. Thus, these message types are meant to apply generically and not specifically to X.400 services.
Some implementations only support the interpersonal message type (CMC: IPM). Some implementations might treat messages of types other than IPM as IPM messages or might generate an error for such messages.
For the text_note member, the format of the message text is a sequence of paragraphs, whether it is passed in memory or in a file. Each paragraph is terminated with the appropriate line terminator for the platform: CR (carriage return) for Macintosh, LF (linefeed) for UNIX, and CR/LF for MS-DOS and Windows. The CMC implementation can word-wrap long lines (paragraphs). There is no guarantee that paragraph formatting will remain constant when a message is saved and read back. For example, the cmc_read function can return a long paragraph as a series of shorter paragraphs.
CMC_attachment, CMC_extension, CMC_recipient, cmc_send, CMC_time