tfMimeAddPart
Table of Contents >> Optional Protocols >> MIME
| #include <trsocket.h> |
| int tfMimeAddPart | ( |
| ttMimeHandle mimeHandle, | |
| ttUserConstCharPtr idPtr, | |
| ttMimeSrcFunc mpSrcFunc, | |
| ttUserConstCharPtr namePtr, | |
| ttUserConstCharPtr typePtr, | |
| ttUser16Bit encoding, | |
| ttUser16Bit disposition | |
| ); |
Function Description
This function adds a MIME part into the MIME message. No real MIME data is added in, just the description of how to get the input data for this part, and how to encode the part. The data source could be a file, static buffer, or dynamic content.
Parameters
- mimeHandle
- Handle to the message as returned from tfMimeNewMessage().
- idPtr
- Identifier for this MIME part. This is for the source function to identify the part. For example, if the data of the part is to be read from a file, the full path to the file is appropriate to be as the identifier.
- mpSrcFunc
- The function to get the data for this part. The MIME engine calls this function to get a specified length of a buffer out of the source, idPtr is passed as a argument.
- namePtr
- The display name for the part. If the part is a file, the file name is appropriate.
- typePtr
- The content type. Valid values are:
- "text/plain"
- "text/html"
- "audio/basic"
- "video/mpeg"
- "application/octet-stream"
- "application/PostScript"
- encoding
- The encoding scheme. The only valid value is TM_MIME_ENCODING_BASE64.
- disposition
- The encoding scheme. Valid values are:
- TM_MIME_ATTACH
- TM_MIME_INLINE
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- One of the parameters is invalid.