Explicitly copy a message part to the message being written.
int mtaDecodeMessagePartCopy(mta_decode_t *dctx, int item_code, ...); |
Arguments |
Description |
---|---|
dctx |
A decode context created by mtaMessageDecode(). |
item_code |
Reserved for future use. A value of zero must be supplied for this argument. |
Description
When an output routine is used in conjunction with mtaDecodeMessage(), the inspection routine can explicitly request that the current message part be copied to the output destination. After the inspection routine calls mtaDecodeMessagePartCopy(), it will no longer be called for that message part.
If the inspection routine is called with a data type of MTA_DATA_NONE, the message part copy is implicitly done, even if the inspection routine does not call either mtaDecodeMessagePartCopy() or mtaDecodeMessagePartDelete(). Therefore, the only advantage to making an explicit call to mtaDecodeMessagePartCopy() is that once that call is made, the inspection routine will no longer be called for that particular message part.
Values |
Description |
---|---|
0 |
Normal, successful completion. |
MTA_BADARGS |
A NULL value was supplied for the dctx call argument, or an invalid decode context was supplied for dctx. |
MTA_NO |
Invalid call to this routine. Either no output routine is being used, or the call was made from the output routine itself. Output errors encountered while attempting to write the output may also result in this error. |
This routine is used in Example 5–2.