When an output routine is used in conjunction with mtaDecodeMessage(), the inspection routine may discard the current message part by calling this routine. As an alternative to discarding the part, it may be replaced with a part containing caller-supplied data such as a warning message. This replacement is achieved through the use of item codes.
Once mtaDecodeMessagePartDelete() has been called, the inspection routine will no longer be called for that message part. As such, calling the routine is final and cannot be undone short of cancelling the entire message decode operation itself (for example, by having the caller-supplied read routine return an error, or after mtaDecodeMessage() completes, cancelling the dequeue and enqueue operations with mtaDequeueMessageFinish() and mtaEnqueueFinish()).
The following table lists the item codes for this routine, any additional item code arguments each item code requires, and gives a description of each.
Item Codes |
Additional Arguments |
Description |
---|---|---|
MTA_DECODE_CCHARSET |
const char *charset size_t charset_len |
Specify the character set used for the message part (for example, us-ascii, iso-8859-1). This item code must be followed by two additional call arguments:
|
MTA_DECODE_CDISP |
const char *disposition size_t disposition_len |
Specify the content disposition for the message part (for example, inline, attachment; filename=a.doc). This disposition information will be placed in a Content-disposition: header line. The item code must be followed by two additional call arguments:
|
MTA_DECODE_CLANG, |
const char *language size_t language_len |
Specify the language used for the message part (for example, en, fr). This language information will be placed in a Content-language: header line. The item code must be followed by two additional call arguments:
|
MTA_DECODE_CSUBTYPE |
const char *subtype size_t subtype_len |
Specify the content subtype for the message part (for example, plain or html for text/plain or text/html). This subtype information will be combined with the type and charset information and placed in a Content-type: header line. The item code must be followed by two additional call arguments:
|
MTA_DECODE_CTYPE |
const char *type size_t type_len |
Specify the major content type for the message part (for example, text for text/plain or text/html). This major type information will be combined with the subtype and charset information and placed in a Content-type: header line. The item code must be followed by two additional call arguments:
|
MTA_ITEM_LIST |
mta_item_list_t *item_list |
Specify a pointer to an item list array. The item list array must be terminated with a final array entry with an item code value of 0. For further information on item lists, see Item Codes and Item Lists. |
MTA_REASON |
const char *text size_t text_len |
Specifies the content and length of caller-supplied text or data used to replace the deleted message part. The item code must be followed by two additional call arguments:
|